/* ─────────────────────────────────────────────────────────────
   DOFE Grievance System — Bootstrap 5 theme
   Nepal Government aesthetic. Designed on top of Bootstrap, with
   custom design tokens, type scale, and Nepali-first components.
   ───────────────────────────────────────────────────────────── */

:root {
  /* Brand palette */
  --crimson: #B2002D;
  --crimson-700: #8C0024;
  --crimson-50: #FCEEF1;
  --ink: #0F1216;
  --ink-2: #2A2F38;
  --ink-3: #5B6371;
  --ink-4: #8C95A4;
  --navy: #0F2A4A;
  --navy-700: #0A1D33;
  --navy-50: #EEF2F7;
  --parchment: #F7F4EC;
  --parchment-2: #EFE9DA;
  --paper: #FFFFFF;
  --line: #E3DED1;
  --line-2: #CFC8B6;
  --gold: #B58A2A;
  --green: #2F7A4F;
  --green-50: #E8F3EC;
  --amber: #B8730B;
  --amber-50: #FBF2DF;
  --rose-50: #FBE7EB;

  /* Type stacks */
  --font-np: "Noto Sans Devanagari", "Mukta", system-ui, sans-serif;
  --font-display: "Mukta", "Noto Sans Devanagari", serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Shadows */
  --shadow-1: 0 1px 0 rgba(15,18,22,0.04), 0 1px 2px rgba(15,18,22,0.06);
  --shadow-2: 0 8px 24px rgba(15,18,22,0.08), 0 2px 6px rgba(15,18,22,0.06);

  /* Bootstrap overrides */
  --bs-primary: var(--crimson);
  --bs-primary-rgb: 178, 0, 45;
  --bs-secondary: var(--navy);
  --bs-body-bg: var(--parchment);
  --bs-body-color: var(--ink-2);
  --bs-body-font-family: var(--font-np);
  --bs-body-font-size: 14.5px;
  --bs-body-line-height: 1.55;
  --bs-border-color: var(--line);
  --bs-link-color: var(--navy);
  --bs-link-hover-color: var(--crimson);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  background: var(--parchment);
  color: var(--ink-2);
  font-family: var(--font-np);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Utility classes */
.np { font-family: var(--font-np); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.display { font-family: var(--font-display); }
.text-ink { color: var(--ink) !important; }
.text-ink-2 { color: var(--ink-2) !important; }
.text-ink-3 { color: var(--ink-3) !important; }
.text-ink-4 { color: var(--ink-4) !important; }
.text-crimson { color: var(--crimson) !important; }
.text-navy { color: var(--navy) !important; }
.text-green { color: var(--green) !important; }
.text-amber { color: var(--amber) !important; }
.bg-parchment { background: var(--parchment) !important; }
.bg-parchment-2 { background: var(--parchment-2) !important; }
.bg-paper { background: var(--paper) !important; }
.bg-ink { background: var(--ink) !important; }
.border-soft { border: 1px solid var(--line) !important; }
.border-soft-2 { border: 1px solid var(--line-2) !important; }
.rounded-12 { border-radius: 12px !important; }
.rounded-14 { border-radius: 14px !important; }

/* ───── Buttons ───── */
.btn {
  font-family: var(--font-np);
  font-size: 14px;
  font-weight: 500;
  padding: 9px 16px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background .12s, border-color .12s, color .12s;
  border: 1px solid transparent;
}
.btn:focus { box-shadow: none; }
.btn-primary {
  background: var(--crimson);
  border-color: var(--crimson);
  color: #fff;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
  background: var(--crimson-700) !important;
  border-color: var(--crimson-700) !important;
  color: #fff !important;
}
.btn-dark {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.btn-dark:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn-outline {
  background: var(--paper);
  border: 1px solid var(--line-2);
  color: var(--ink-2);
}
.btn-outline:hover { background: var(--parchment-2); color: var(--ink); }
.btn-ghost {
  background: transparent;
  color: var(--ink-2);
  border: 1px solid var(--line-2);
}
.btn-ghost:hover { background: var(--parchment-2); color: var(--ink); }
.btn-link-quiet {
  background: transparent; border: 0; padding: 4px 6px;
  color: var(--navy); font-size: 13px; font-weight: 500;
  text-decoration: none;
}
.btn-link-quiet:hover { text-decoration: underline; }

/* ───── Forms ───── */
.form-label { font-size: 13px; color: var(--ink-2); font-weight: 500; margin-bottom: 6px; }
.form-label .req { color: var(--crimson); margin-left: 2px; }
.form-control, .form-select {
  font-family: var(--font-np);
  font-size: 14px;
  border: 1px solid var(--line-2);
  background: var(--paper);
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--ink);
}
.form-control:focus, .form-select:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(15,42,74,0.12);
}
.form-text { font-size: 11.5px; color: var(--ink-4); margin-top: 4px; }
.input-group-text {
  background: var(--parchment-2);
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  font-size: 13px;
  font-family: var(--font-mono);
}
.form-check-input { accent-color: var(--crimson); }
.form-check-input:checked { background-color: var(--crimson); border-color: var(--crimson); }
.form-check-label { font-size: 13.5px; color: var(--ink-2); }

/* ───── Cards ───── */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-1);
}
.card-section-title {
  font-family: var(--font-np);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  margin: 0 0 14px;
}

/* ───── Pills / Status badges ───── */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-family: var(--font-np); font-weight: 500;
}
.pill .pdot { width: 6px; height: 6px; border-radius: 50%; }
.pill-new { background: var(--navy-50); color: var(--navy); }
.pill-new .pdot { background: var(--navy); }
.pill-prog { background: var(--amber-50); color: var(--amber); }
.pill-prog .pdot { background: var(--amber); }
.pill-hear { background: #EEEAFB; color: #5B47C9; }
.pill-hear .pdot { background: #5B47C9; }
.pill-done { background: var(--green-50); color: var(--green); }
.pill-done .pdot { background: var(--green); }
.pill-rej { background: var(--rose-50); color: var(--crimson); }
.pill-rej .pdot { background: var(--crimson); }

.tag {
  display: inline-flex; padding: 2px 8px; border-radius: 4px;
  background: var(--parchment-2); color: var(--ink-2);
  font-size: 11px; font-family: var(--font-np);
}

/* ───── Government chrome ───── */
.gov-bar {
  background: var(--navy);
  color: #fff;
  font-family: var(--font-np);
  font-size: 12px;
  padding: 6px 24px;
  letter-spacing: 0.02em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-bottom: 2px solid var(--crimson);
  flex-wrap: wrap;
}
.gov-bar .gb-section { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.gov-bar .gb-dot { width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,0.4); }

.gov-head {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 16px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-np);
  flex-wrap: wrap;
}
.gov-head .crest { width: 56px; height: 56px; object-fit: contain; flex-shrink: 0; }
.gov-head .gh-titles { flex: 1; line-height: 1.25; min-width: 0; }
.gov-head .gh-ministry { font-size: 12px; color: var(--ink-3); letter-spacing: 0.02em; }
.gov-head .gh-dept { font-size: 18px; font-weight: 600; color: var(--ink); margin-top: 1px; font-family: var(--font-display); }
.gov-head .gh-sub { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.gov-head .gh-lang {
  display: flex; gap: 0;
  border: 1px solid var(--line-2);
  border-radius: 999px; overflow: hidden;
  font-size: 12px; flex-shrink: 0;
}
.gov-head .gh-lang button {
  background: transparent; border: 0;
  padding: 6px 12px; color: var(--ink-3); cursor: pointer;
  font-family: inherit;
}
.gov-head .gh-lang button.active { background: var(--ink); color: #fff; }

.gov-footer {
  background: var(--ink); color: #8C95A4;
  padding: 16px 28px; font-size: 12px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-family: var(--font-np);
}

/* ───── App shell (sidebar layout) ───── */
.app-shell { display: flex; min-height: 100vh; background: var(--parchment); }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-content { flex: 1; padding: 24px; overflow-x: auto; }

.sidebar {
  width: 260px;
  background: var(--ink);
  color: #C9CFD8;
  font-family: var(--font-np);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar .sb-brand {
  padding: 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; gap: 12px;
}
.sidebar .sb-brand img { width: 36px; height: 36px; }
.sidebar .sb-brand-t { line-height: 1.2; }
.sidebar .sb-brand-a { font-size: 14px; font-weight: 600; color: #fff; font-family: var(--font-display); }
.sidebar .sb-brand-b { font-size: 11px; color: #8C95A4; margin-top: 2px; }
.sidebar nav { padding: 14px 8px; flex: 1; }
.sidebar .nav-group {
  font-size: 11px; color: #6B7280;
  padding: 12px 12px 4px;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.sidebar .nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: 6px;
  font-size: 14px; color: #C9CFD8;
  text-decoration: none;
  position: relative;
  margin-bottom: 2px;
}
.sidebar .nav-item:hover { background: rgba(255,255,255,0.05); color: #fff; }
.sidebar .nav-item.active { background: rgba(178,0,45,0.15); color: #fff; }
.sidebar .nav-item.active::before {
  content: ""; position: absolute; left: -8px; top: 6px; bottom: 6px;
  width: 3px; background: var(--crimson); border-radius: 0 2px 2px 0;
}
.sidebar .nav-item .ic { width: 18px; height: 18px; opacity: 0.85; flex-shrink: 0; }
.sidebar .nav-item .cnt {
  margin-left: auto; font-size: 11px;
  background: rgba(255,255,255,0.08); padding: 2px 7px;
  border-radius: 999px; color: #fff; font-family: var(--font-mono);
}
.sidebar .sb-footer {
  padding: 14px 16px; border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; gap: 10px;
}
.sidebar .sb-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--crimson); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
}
.sidebar .sb-user { flex: 1; font-size: 12px; line-height: 1.3; min-width: 0; }
.sidebar .sb-user .a { color: #fff; }
.sidebar .sb-user .b { color: #8C95A4; }
.sidebar .sb-logout {
  width: 28px; height: 28px;
  background: transparent; border: 0;
  color: #8C95A4; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.sidebar .sb-logout:hover { color: #fff; }

/* Mobile burger */
.sidebar-toggle {
  display: none;
  background: var(--paper); border: 1px solid var(--line-2);
  width: 38px; height: 38px; border-radius: 8px;
  align-items: center; justify-content: center;
  margin-right: 6px; cursor: pointer;
}
.sidebar-toggle svg { color: var(--ink-2); }

/* ───── Topbar ───── */
.topbar {
  height: 62px; background: var(--paper);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center;
  padding: 0 24px; gap: 14px;
  font-family: var(--font-np);
  position: sticky; top: 0; z-index: 10;
}
.topbar .crumb { font-size: 13px; color: var(--ink-3); min-width: 0; }
.topbar .crumb b { color: var(--ink); font-weight: 600; }
.topbar .tb-search {
  margin-left: auto;
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line-2); border-radius: 8px;
  padding: 6px 10px; width: 320px; max-width: 100%;
  background: var(--parchment);
}
.topbar .tb-search input {
  border: 0; outline: none; background: transparent;
  font-family: inherit; font-size: 13px; flex: 1; min-width: 0;
}
.topbar .tb-icbtn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--parchment); display: inline-flex;
  align-items: center; justify-content: center;
  cursor: pointer; position: relative; border: 1px solid var(--line);
  flex-shrink: 0;
}
.topbar .tb-icbtn .badge-dot {
  position: absolute; top: 4px; right: 4px;
  width: 8px; height: 8px; background: var(--crimson);
  border-radius: 50%; border: 1.5px solid var(--paper);
}
.topbar .tb-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--navy); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; font-family: var(--font-np);
  flex-shrink: 0;
}
.kbd {
  font-family: var(--font-mono); font-size: 11px;
  padding: 2px 6px; border-radius: 4px;
  border: 1px solid var(--line-2); background: var(--parchment);
  color: var(--ink-3);
}

/* ───── Tables ───── */
.tbl {
  width: 100%; border-collapse: collapse;
  font-family: var(--font-np); font-size: 13.5px;
}
.tbl thead th {
  text-align: left; font-weight: 500; color: var(--ink-3); font-size: 12px;
  padding: 10px 12px; border-bottom: 1px solid var(--line);
  background: var(--parchment); letter-spacing: 0.03em; text-transform: uppercase;
}
.tbl tbody td {
  padding: 14px 12px; border-bottom: 1px solid var(--line);
  color: var(--ink-2); vertical-align: middle;
}
.tbl tbody tr:hover { background: var(--parchment); }
.tbl .id-col { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }

/* ───── KPI tiles ───── */
.kpi {
  position: relative; overflow: hidden;
  padding: 18px;
}
.kpi-accent {
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
}
.kpi-label {
  font-size: 12px; color: var(--ink-3);
  font-family: var(--font-np);
  letter-spacing: 0.04em; text-transform: uppercase;
}
.kpi-val {
  font-family: var(--font-display);
  font-size: 32px; font-weight: 600;
  color: var(--ink); line-height: 1; margin-top: 12px;
}
.kpi-delta {
  font-size: 12px; font-family: var(--font-np);
  margin-top: 10px;
}

/* ───── Stepper ───── */
.stepper {
  display: flex; align-items: center;
  background: var(--paper); border: 1px solid var(--line);
  padding: 14px 22px; border-radius: 10px;
  font-family: var(--font-np);
}
.stepper .stp { display: flex; align-items: center; gap: 10px; }
.stepper .stp .n {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 12px;
  border: 1px solid var(--line-2); background: var(--paper); color: var(--ink-3);
}
.stepper .stp .lab { font-size: 13px; color: var(--ink-3); }
.stepper .stp.done .n { background: var(--green); color: #fff; border-color: var(--green); }
.stepper .stp.done .lab { color: var(--ink-2); }
.stepper .stp.cur .n { background: var(--ink); color: #fff; border-color: var(--ink); }
.stepper .stp.cur .lab { color: var(--ink); font-weight: 500; }
.stepper .line { flex: 1; height: 1px; background: var(--line-2); margin: 0 14px; min-width: 16px; }
.stepper .line.done { background: var(--green); }

/* ───── Timeline ───── */
.tl { display: flex; flex-direction: column; }
.tl .ev { display: flex; gap: 14px; position: relative; padding: 0 0 20px 0; }
.tl .ev::before {
  content: ""; position: absolute; left: 11px; top: 24px; bottom: 0;
  width: 1.5px; background: var(--line-2);
}
.tl .ev:last-child::before { display: none; }
.tl .ev .dot {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--line-2);
  flex-shrink: 0; display: flex; align-items: center; justify-content: center; z-index: 1;
}
.tl .ev.done .dot { background: var(--green); border-color: var(--green); color: #fff; }
.tl .ev.cur .dot {
  background: var(--crimson); border-color: var(--crimson);
  box-shadow: 0 0 0 4px rgba(178,0,45,0.15);
}
.tl .ev .body { flex: 1; font-family: var(--font-np); padding-top: 1px; min-width: 0; }
.tl .ev .body .t { font-size: 14px; color: var(--ink); font-weight: 500; }
.tl .ev .body .meta { font-size: 12px; color: var(--ink-4); margin-top: 2px; }
.tl .ev .body .note {
  font-size: 13px; color: var(--ink-3); margin-top: 6px;
  padding: 8px 10px; background: var(--parchment);
  border-radius: 6px; line-height: 1.5;
}

/* ───── Repeatable form sections ───── */
.repeat-list { display: flex; flex-direction: column; gap: 12px; }
.repeat-item {
  position: relative;
  background: var(--parchment);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px 14px;
}
.repeat-item-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 1px dashed var(--line-2);
}
.repeat-item-title {
  font-family: var(--font-np); font-size: 12px;
  color: var(--ink-3); letter-spacing: 0.04em;
  text-transform: uppercase; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.repeat-item-num {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px;
  background: var(--ink); color: #fff;
}
.repeat-remove {
  background: transparent; border: 0; cursor: pointer;
  font-family: var(--font-np); font-size: 12px; color: var(--crimson);
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 8px; border-radius: 6px;
  transition: background .12s;
}
.repeat-remove:hover { background: var(--rose-50); }
.btn-add-more {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 12px;
  padding: 10px 16px;
  background: var(--paper);
  border: 1px dashed var(--line-2);
  border-radius: 8px;
  color: var(--navy);
  font-family: var(--font-np); font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: all .12s;
}
.btn-add-more:hover {
  background: var(--navy-50);
  border-color: var(--navy);
  border-style: solid;
}
.btn-add-more .plus {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--navy); color: #fff;
}
.repeat-empty {
  padding: 18px;
  border: 1px dashed var(--line-2);
  border-radius: 10px;
  background: var(--parchment);
  color: var(--ink-3);
  font-family: var(--font-np);
  font-size: 13px;
  text-align: center;
  line-height: 1.55;
}

/* ───── OTP input row ───── */
.otp-row { display: flex; gap: 8px; }
.otp-box {
  flex: 1; min-width: 0;
  height: 52px;
  text-align: center;
  font-family: var(--font-mono); font-size: 22px; font-weight: 600;
  border: 1.5px solid var(--line-2);
  background: var(--parchment);
  color: var(--ink);
  border-radius: 10px;
  outline: none;
  transition: all .15s;
  padding: 0;
}
.otp-box.filled { background: var(--paper); }
.otp-box:focus, .otp-box.active {
  border-color: var(--crimson); border-width: 2px;
  background: var(--paper);
  box-shadow: 0 0 0 4px rgba(178,0,45,0.12);
}

/* ───── Page navigation switcher (floating) ───── */
#page-nav { position: fixed; top: 14px; right: 14px; z-index: 9999; font-family: var(--font-np); }
#page-nav .pn-toggle {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; background: var(--ink); color: #fff;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  font-family: inherit; font-size: 13px; cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,0.18);
}
#page-nav .pn-toggle:hover { background: var(--ink-2); }
#page-nav .pn-cur { font-weight: 500; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#page-nav .pn-count {
  font-family: var(--font-mono); font-size: 11px;
  color: rgba(255,255,255,0.6); padding-left: 6px;
  border-left: 1px solid rgba(255,255,255,0.15);
}
#page-nav .pn-panel {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 280px; background: var(--paper);
  border: 1px solid var(--line-2); border-radius: 12px;
  box-shadow: 0 18px 50px rgba(15,18,22,0.18);
  padding: 8px;
  display: none; max-height: 70vh; overflow: auto;
}
#page-nav.open .pn-panel { display: block; }
#page-nav .pn-group {
  font-size: 11px; color: var(--ink-3);
  padding: 12px 10px 4px; font-weight: 600;
  letter-spacing: 0.04em; border-top: 1px solid var(--line); margin-top: 4px;
}
#page-nav .pn-group:first-of-type { border-top: 0; margin-top: 0; }
#page-nav .pn-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 6px;
  font-size: 13px; color: var(--ink-2); text-decoration: none;
}
#page-nav .pn-link:hover { background: var(--parchment); }
#page-nav .pn-link.active { background: var(--crimson-50); color: var(--crimson); font-weight: 500; }
#page-nav .pn-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); }
#page-nav .pn-link.active .pn-dot { background: var(--crimson); }

/* ───── Auth pages ───── */
.auth-page { min-height: 100vh; background: var(--parchment); display: flex; flex-direction: column; }
.auth-body {
  flex: 1;
  display: grid; grid-template-columns: 1.05fr 1fr;
  gap: 56px; max-width: 1200px; width: 100%;
  margin: 0 auto; padding: 48px 32px;
  align-items: center;
}
.auth-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px; background: var(--paper);
  border: 1px solid var(--line-2); border-radius: 999px;
  font-size: 12px; color: var(--ink-3); margin-bottom: 18px;
}
.auth-eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--crimson); }
.auth-h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700; color: var(--ink);
  line-height: 1.15; margin: 0 0 16px;
  letter-spacing: -0.01em;
}
.auth-p {
  font-size: 15px; color: var(--ink-3);
  line-height: 1.65; margin: 0 0 28px; max-width: 480px;
}
.auth-card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 14px; padding: 32px;
  width: 100%; max-width: 460px;
  box-shadow: 0 12px 40px rgba(15,18,22,0.06), 0 2px 6px rgba(15,18,22,0.04);
}
.auth-title { font-family: var(--font-display); font-size: 24px; font-weight: 600; color: var(--ink); margin: 0 0 8px; }
.auth-sub { font-size: 13.5px; color: var(--ink-3); margin: 0; line-height: 1.55; }

.auth-mini-steps { display: flex; gap: 6px; margin-bottom: 18px; }
.auth-mini-step {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  background: var(--parchment); color: var(--ink-3);
  border: 1px solid var(--line-2);
}
.auth-mini-step.done { background: var(--green); color: #fff; border-color: var(--green); }
.auth-mini-step.cur { background: var(--ink); color: #fff; border-color: var(--ink); }

.auth-feat-li { display: flex; gap: 12px; align-items: center; font-size: 14px; color: var(--ink-2); margin-bottom: 12px; }
.auth-feat-ic {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--paper); border: 1px solid var(--line); color: var(--crimson);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

.auth-step-row { display: flex; gap: 14px; padding: 0 0 18px; position: relative; }
.auth-step-row:last-child { padding-bottom: 0; }
.auth-step-row:not(:last-child)::before {
  content: ""; position: absolute; left: 17px; top: 36px; bottom: 4px;
  width: 2px; background: var(--line-2);
}
.auth-step-row.done:not(:last-child)::before { background: var(--green); }
.auth-step-n {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--paper); border: 1.5px solid var(--line-2); color: var(--ink-3);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 13px; font-weight: 600; z-index: 1;
}
.auth-step-row.done .auth-step-n { background: var(--green); border-color: var(--green); color: #fff; }
.auth-step-row.cur .auth-step-n { background: var(--crimson); border-color: var(--crimson); color: #fff; box-shadow: 0 0 0 4px rgba(178,0,45,0.15); }
.auth-step-t { font-size: 14px; font-weight: 500; color: var(--ink-3); }
.auth-step-row.done .auth-step-t, .auth-step-row.cur .auth-step-t { color: var(--ink); }
.auth-step-d { font-size: 12px; color: var(--ink-4); margin-top: 2px; }

.auth-info {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: 8px;
  font-size: 12.5px; line-height: 1.55;
  margin: 14px 0;
}
.auth-info-soft { background: var(--parchment); border: 1px solid var(--line); color: var(--ink-3); }
.auth-info-soft b { color: var(--ink); }
.auth-info-warn { background: var(--amber-50); color: var(--amber); }

.auth-or { display: flex; align-items: center; gap: 10px; margin: 18px 0 14px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-or span { font-size: 11px; color: var(--ink-4); }

/* ───── Charts (lightweight CSS) ───── */
.bar-row { display: flex; align-items: flex-end; gap: 10px; height: 220px; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.bar-col { flex: 1; display: flex; gap: 3px; align-items: flex-end; height: 100%; min-width: 0; }
.bar { flex: 1; border-radius: 3px 3px 0 0; }
.bar.bar-crimson { background: var(--crimson); }
.bar.bar-navy { background: var(--navy); }

.hbar-row { display: flex; align-items: center; gap: 14px; padding: 8px 0; }
.hbar-lab { width: 110px; font-size: 13px; color: var(--ink-2); flex-shrink: 0; }
.hbar-track {
  flex: 1; height: 14px; background: var(--line);
  border-radius: 3px; overflow: hidden;
}
.hbar-fill { height: 100%; background: linear-gradient(90deg, var(--navy), var(--crimson)); }
.hbar-val {
  width: 60px; text-align: right;
  font-size: 13px; color: var(--ink-2); font-weight: 600;
  font-family: var(--font-mono);
}

/* ───── Responsive ───── */
@media (max-width: 992px) {
  .gov-bar { padding: 6px 16px; font-size: 11px; }
  .gov-head { padding: 12px 16px; gap: 12px; }
  .gov-head .gh-dept { font-size: 16px; }
  .auth-body { grid-template-columns: 1fr; gap: 32px; padding: 32px 20px; }
  .auth-card { max-width: 100%; justify-self: stretch; }

  .sidebar {
    position: fixed; top: 0; left: -280px; z-index: 1050;
    transition: left .2s ease-out;
    height: 100vh;
  }
  .sidebar.open { left: 0; box-shadow: 0 0 60px rgba(0,0,0,0.3); }
  .sidebar-backdrop {
    display: none;
    position: fixed; inset: 0; background: rgba(0,0,0,0.4);
    z-index: 1040;
  }
  .sidebar-backdrop.show { display: block; }
  .sidebar-toggle { display: inline-flex; }
  .topbar .tb-search { width: 200px; }
}

@media (max-width: 768px) {
  body { font-size: 14px; }
  .gov-bar { gap: 8px; }
  .gov-bar .gb-section:last-child { display: none; }
  .gov-head { padding: 10px 14px; }
  .gov-head .crest { width: 44px; height: 44px; }
  .gov-head .gh-dept { font-size: 15px; }
  .gov-head .gh-ministry { font-size: 10.5px; }
  .gov-head .gh-sub { font-size: 12px; }

  .app-content { padding: 16px; }
  .topbar { padding: 0 14px; height: 56px; }
  .topbar .tb-search { display: none; }
  .topbar .crumb { font-size: 12px; }

  .auth-card { padding: 22px; }
  .auth-title { font-size: 20px; }
  .otp-row { gap: 6px; }
  .otp-box { height: 48px; font-size: 19px; }

  #page-nav { top: auto; bottom: 14px; right: 14px; }
  #page-nav .pn-panel { bottom: calc(100% + 8px); top: auto; }
  #page-nav .pn-cur { max-width: 110px; }

  .stepper { padding: 10px 14px; flex-wrap: wrap; gap: 8px; }
  .stepper .stp { gap: 6px; }
  .stepper .stp .lab { font-size: 12px; }
  .stepper .line { display: none; }

  .tbl thead th, .tbl tbody td { padding: 10px 8px; font-size: 12.5px; }

  .gov-footer { padding: 14px 16px; font-size: 11px; flex-direction: column; gap: 4px; }
}

@media (max-width: 480px) {
  .otp-box { height: 42px; font-size: 16px; }
  .auth-card { padding: 18px; }
  .auth-h1 { font-size: 24px; }
  .kpi-val { font-size: 26px; }
}

/* Print-friendly */
@media print {
  .gov-bar, .topbar, .sidebar, #page-nav, .gov-footer, .btn { display: none !important; }
}
