:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #667085;
  --line: #dfe4ea;
  --brand: #c91f2f;
  --brand-dark: #971522;
  --accent: #0f766e;
  --warn: #b45309;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(560px, 680px) minmax(360px, 1fr);
}

.auth-panel {
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 36px;
  overflow: auto;
  min-width: 0;
}

.auth-cover {
  padding: 48px;
  display: flex;
  align-items: flex-end;
  background:
    linear-gradient(135deg, rgba(17, 24, 39, 0.72), rgba(15, 118, 110, 0.58)),
    url("https://images.unsplash.com/photo-1497366754035-f200968a6e72?auto=format&fit=crop&w=1600&q=80");
  background-size: cover;
  background-position: center;
  color: white;
  min-width: 0;
}

.cover-copy {
  max-width: 660px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--brand);
  color: white;
  font-weight: 800;
}

.brand-title {
  font-size: 18px;
  font-weight: 800;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 24px;
}

.tab {
  height: 42px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  cursor: pointer;
}

.tab.active {
  border-color: var(--brand);
  color: var(--brand);
  font-weight: 700;
}

.form {
  display: grid;
  gap: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: white;
}

.button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.button.secondary {
  background: #111827;
}

.button.ghost {
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
}

.message {
  display: none;
  padding: 12px;
  border-radius: 8px;
  background: #eef6f5;
  color: var(--accent);
  border: 1px solid #b7ddda;
}

.message.error {
  background: #fff1f2;
  color: var(--brand-dark);
  border-color: #fecdd3;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.sidebar {
  background: #111827;
  color: white;
  padding: 24px;
}

.nav {
  display: grid;
  gap: 8px;
  margin-top: 28px;
}

.nav button {
  text-align: left;
  color: white;
  background: transparent;
  border: 0;
  border-radius: 8px;
  padding: 11px 12px;
  cursor: pointer;
}

.nav button.active,
.nav button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.content {
  padding: 28px;
  overflow: auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
}

.muted {
  color: var(--muted);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.toolbar input {
  max-width: 360px;
  width: 100%;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 800;
}

.status.pending {
  background: #fff7ed;
  color: var(--warn);
}

.status.approved {
  background: #ecfdf5;
  color: #047857;
}

.status.rejected {
  background: #fff1f2;
  color: var(--brand-dark);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.metric {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.metric strong {
  display: block;
  font-size: 28px;
  margin-top: 10px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.dashboard-tile {
  min-height: 124px;
  display: grid;
  place-items: center;
  gap: 10px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  text-align: center;
}

.dashboard-tile:hover {
  border-color: var(--brand);
}

.tile-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 2px solid #c7ced8;
  border-radius: 50%;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
}

.empty-state {
  max-width: 720px;
}

.empty-state h2,
.panel h2 {
  margin-top: 0;
}

.pending-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.pending-screen .panel {
  max-width: 560px;
}

@media (max-width: 1200px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-panel {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    border-right: 0;
  }

  .auth-cover {
    display: none;
  }
}

@media (max-width: 900px) {
  .auth-shell,
  .app-shell {
    grid-template-columns: 1fr;
  }

  .auth-panel {
    border-right: 0;
  }

  .auth-cover {
    min-height: 280px;
    align-items: center;
  }

  .sidebar {
    position: static;
  }

  .cards,
  .form-grid {
    grid-template-columns: 1fr;
  }
}
