:root {
  --brand: #4b47f5;
  --brand-dark: #312dd8;
  --ink: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --surface: #f8fafc;
  --soft: #eef2ff;
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.hidden { display: none !important; }

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(75, 71, 245, .08), transparent 38%),
    linear-gradient(315deg, rgba(37, 99, 235, .08), transparent 36%),
    #fff;
}

.login-card {
  width: min(440px, 100%);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 24px 70px rgba(15, 23, 42, .12);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-row strong {
  display: block;
  font-size: 18px;
}

.brand-row small {
  color: var(--muted);
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: var(--brand);
  font-size: 26px;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(75, 71, 245, .32);
}

h1, h2, p { margin-top: 0; }

.login-card h1 {
  margin: 30px 0 10px;
  font-size: 34px;
  letter-spacing: 0;
}

.login-card p {
  color: var(--muted);
  line-height: 1.55;
}

label {
  display: block;
  margin: 18px 0 8px;
  color: #475569;
  font-size: 13px;
  font-weight: 750;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: #fff;
  color: var(--ink);
}

input, select {
  height: 50px;
  padding: 0 14px;
}

textarea {
  padding: 14px;
  resize: vertical;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(75, 71, 245, .12);
}

button {
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
}

.primary, .secondary, .ghost, .approve, .correction, .reject {
  height: 48px;
  padding: 0 18px;
}

.primary {
  width: 100%;
  margin-top: 22px;
  color: #fff;
  background: var(--brand);
}

.secondary {
  color: var(--brand);
  background: var(--soft);
}

.ghost {
  color: #475569;
  background: #fff;
  border: 1px solid var(--line);
}

.message {
  min-height: 22px;
  margin: 14px 0 0;
  color: var(--danger);
  font-size: 14px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
  background: var(--surface);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 28px;
  border-right: 1px solid var(--line);
  background: #fff;
}

nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  height: 46px;
  padding: 0 14px;
  text-align: left;
  color: #475569;
  background: #fff;
}

.nav-item.active {
  color: #fff;
  background: var(--brand);
}

#logoutButton {
  margin-top: auto;
}

.content {
  padding: 32px;
}

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

.eyebrow {
  margin-bottom: 6px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .08em;
}

.topbar h1 {
  margin: 0;
  font-size: 34px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metrics article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.metrics span {
  display: block;
  font-size: 30px;
  font-weight: 850;
}

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

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 12px;
  margin-bottom: 18px;
}

.empty {
  padding: 42px;
  border: 1px dashed #cbd5e1;
  border-radius: 22px;
  text-align: center;
  background: #fff;
}

.empty p {
  margin-bottom: 0;
  color: var(--muted);
}

.request-list {
  display: grid;
  gap: 16px;
}

.request-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .06);
}

.request-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.status-pending { color: var(--warning); background: #fff7ed; }
.status-approved { color: var(--success); background: #ecfdf5; }
.status-rejected { color: var(--danger); background: #fef2f2; }
.status-needs_correction { color: #7c3aed; background: #f5f3ff; }
.status-unverified { color: #475569; background: #f1f5f9; }

.request-card h2 {
  margin: 12px 0 4px;
  font-size: 24px;
}

.request-meta, .request-date {
  color: var(--muted);
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.profile-grid div {
  padding: 12px;
  border-radius: 14px;
  background: var(--surface);
}

.profile-grid small {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-weight: 750;
}

.documents {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.doc-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 56px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  text-decoration: none;
}

.doc-link span {
  color: var(--brand);
  font-weight: 850;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.approve {
  color: #fff;
  background: var(--success);
}

.correction {
  color: #4c1d95;
  background: #ede9fe;
}

.reject {
  color: #fff;
  background: var(--danger);
}

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

  .sidebar {
    position: static;
    height: auto;
  }

  nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metrics, .profile-grid, .documents, .toolbar {
    grid-template-columns: 1fr;
  }

  .content {
    padding: 22px;
  }
}
