/* Commercial Safe — design tokens · v2.0 (real-app polish) */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,500;9..144,600&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* === Surface system — cool neutral, app-grade =========================== */
  --bg:             #F5F7FB;   /* page background — pale cool blue-grey */
  --surface:        #FFFFFF;   /* card / raised surface */
  --surface-soft:   #F9FAFC;   /* hover, inset, sidebar */
  --surface-warm:   #FBF9F4;   /* warm card variant for editorial moments */
  --surface-dark:   #0F1A2E;   /* dark surface (login hero, status card) */
  --surface-deeper: #0A1322;   /* deepest dark */

  /* === Borders ============================================================ */
  --border:         #D8DDE7;
  --border-soft:    #E8ECF2;
  --border-strong:  #BFC6D2;

  /* === Ink ================================================================ */
  --ink:            #0F1A2E;
  --ink-soft:       #475467;
  --ink-faint:      #98A2B3;
  --ink-mute:       #B7BFCC;

  /* === Brand ============================================================== */
  --navy:           #1E3A8A;
  --navy-deep:      #1E2A56;
  --navy-darker:    #14213F;
  --navy-soft:      #3756B0;
  --navy-tint:      #DCE3F2;

  /* === Status ============================================================= */
  --success:        #047857;
  --success-soft:   #D1FAE5;
  --success-line:   #A7F3D0;
  --warning:        #B45309;
  --warning-soft:   #FEF3C7;
  --warning-line:   #FDE68A;
  --danger:         #B91C1C;
  --danger-deep:    #7F1D1D;
  --danger-soft:    #FEE2E2;
  --danger-line:    #FECACA;

  /* === Premium accent ===================================================== */
  --gold:           #B89460;
  --gold-soft:      #F2EDE0;
  --gold-line:      rgba(184,148,93,0.35);
  --gold-veil:      rgba(184,148,93,0.10);

  /* === Legacy aliases — keep existing classes working ===================== */
  --bone:           var(--surface);
  --bone-soft:      var(--surface-soft);
  --linen:          var(--border-soft);
  --rule:           var(--border);
  --rule-soft:      var(--border-soft);
  --rule-faint:     var(--border-soft);
  --moss:           var(--navy);
  --moss-deep:      var(--surface-dark);
  --moss-shadow:    var(--surface-deeper);
  --leaf:           var(--success);
  --champagne:      var(--gold);
  --champagne-soft: var(--gold-soft);
  --champagne-veil: var(--gold-veil);
  --champagne-line: var(--gold-line);
  --ochre:          var(--warning);
  --ochre-soft:     var(--warning-line);
  --burgundy:       var(--danger);
  --burgundy-deep:  var(--danger-deep);
  --burgundy-soft:  var(--danger-line);
  --sapphire:       var(--navy-soft);

  /* === Typography ========================================================= */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  /* === Elevation — subtle, layered ======================================== */
  --shadow-xs:    0 1px 2px rgba(15,26,46,0.04);
  --shadow-sm:    0 1px 2px rgba(15,26,46,0.05), 0 1px 3px rgba(15,26,46,0.06);
  --shadow-md:    0 2px 4px rgba(15,26,46,0.05), 0 4px 12px rgba(15,26,46,0.08);
  --shadow-lg:    0 8px 24px rgba(15,26,46,0.10), 0 2px 6px rgba(15,26,46,0.06);
  --shadow-inset: inset 0 1px 0 rgba(255,255,255,0.06);

  /* === Radii ============================================================== */
  --r-sm: 4px;
  --r:    6px;
  --r-md: 8px;
  --r-lg: 12px;

  /* foil compatibility */
  --foil-card:  var(--shadow-xs);
  --foil-edge:  var(--shadow-sm);
  --foil-dark:  inset 0 1px 0 rgba(220,198,143,0.18);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss01', 'tnum';
  letter-spacing: -0.005em;
}

/* No more decorative grain — clean app surface */
body::before { display: none; }

/* === Typography ============================================================ */

h1, h2, h3, h4 {
  font-family: var(--font-body);
  color: var(--ink);
  letter-spacing: -0.022em;
}
h1 {
  font-size: 28px; line-height: 1.15; font-weight: 600;
  letter-spacing: -0.028em;
}
h2 {
  font-size: 20px; line-height: 1.25; font-weight: 600;
  letter-spacing: -0.02em;
}
h3 {
  font-size: 16px; line-height: 1.3; font-weight: 600;
}
h4 {
  font-size: 12px; line-height: 1.3; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint);
}

/* Editorial display variants — used sparingly for hero / audit moments */
.h1-display, .display { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.03em; }

.eyebrow {
  font-family: var(--font-body); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-faint); font-weight: 600;
}
.eyebrow--gold { color: var(--gold); }
.mono { font-family: var(--font-mono); font-feature-settings: 'tnum', 'zero'; letter-spacing: -0.01em; }
.figure {
  font-family: var(--font-mono); font-weight: 500;
  font-feature-settings: 'tnum'; letter-spacing: -0.025em;
}
.serif-num {
  font-family: var(--font-display); font-weight: 400;
  font-feature-settings: 'lnum', 'tnum'; letter-spacing: -0.04em;
}

/* === Layout primitives ==================================================== */

.shell { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; }
.shell--sidebar { grid-template-columns: 240px 1fr; grid-template-rows: auto 1fr; }

.topbar {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: relative;
  z-index: 20;
}

.brand { display: flex; align-items: baseline; gap: 8px; }
.brand__mark {
  font-family: var(--font-body);
  font-size: 16px; font-weight: 600; letter-spacing: -0.02em;
  color: var(--navy);
}
.brand__sub {
  font-family: var(--font-body);
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-faint); padding-bottom: 1px; font-weight: 500;
}
.brand__rule { display: none; } /* no more inline rule */

/* Sidebar */
.sidebar {
  border-right: 1px solid var(--border);
  padding: 16px 0;
  background: var(--surface-soft);
}
.sidebar__heading {
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-faint); padding: 16px 20px 6px; font-weight: 600;
}
.nav-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 14px;
  margin: 1px 8px;
  font-size: 13px; color: var(--ink-soft);
  border-radius: var(--r);
  cursor: pointer; font-weight: 500;
  transition: background 0.12s ease, color 0.12s ease;
  border-left: none;
  text-decoration: none;
}
.nav-item:hover { background: var(--border-soft); color: var(--ink); }
.nav-item--active {
  background: var(--navy-tint); color: var(--navy);
  font-weight: 600;
}
.nav-item--active::after { display: none; }
.nav-item--active .nav-item__ico { color: var(--navy); }
.nav-item__count { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); }
.nav-item--alert .nav-item__count { color: var(--danger); font-weight: 600; }

.main { padding: 24px 32px 48px; max-width: none; }
.main--wide { max-width: none; }
.main--narrow { max-width: 1080px; margin: 0 auto; }

/* === Page head ============================================================ */

.page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px; padding-bottom: 0;
  border-bottom: none;
  gap: 24px; flex-wrap: wrap;
}
.page-head::after { display: none; }
.page-head__title { display: flex; flex-direction: column; gap: 4px; }
.page-head__date {
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint);
}

/* === Card — proper raised surface with shadow ============================= */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.card::before { display: none; }
.card--inset {
  background: var(--surface-soft);
  box-shadow: none;
}
.card__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
  gap: 16px;
}
.card__title { font-family: var(--font-body); font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.card__meta {
  font-family: var(--font-mono); font-size: 10px; color: var(--ink-faint);
  letter-spacing: 0.04em; text-transform: uppercase;
}

/* === Stat tile — Inter bold, refined ====================================== */

.stat {
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  position: relative;
}
.stat::before { display: none; }
.stat__label {
  font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 8px; font-weight: 600;
}
.stat__value {
  font-family: var(--font-body); font-size: 28px; font-weight: 600;
  line-height: 1.1; color: var(--ink);
  letter-spacing: -0.025em;
  font-feature-settings: 'tnum';
}
.stat__value--mono {
  font-family: var(--font-mono); font-size: 24px; font-weight: 600;
  letter-spacing: -0.04em;
}
.stat__value--display {
  font-family: var(--font-display); font-size: 36px; font-weight: 400;
  letter-spacing: -0.04em;
}
.stat__delta { font-family: var(--font-body); font-size: 12px; margin-top: 6px; color: var(--ink-soft); }
.stat__delta--up { color: var(--success); }
.stat__delta--down { color: var(--danger); }

/* === Status indicators ==================================================== */

.tick {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  border: 1.5px solid var(--success); color: var(--success);
  border-radius: 50%; background: var(--success-soft);
  font-size: 11px; font-weight: 600;
}
.diamond {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px;
  background: var(--danger); color: var(--surface);
  transform: rotate(45deg); border-radius: 3px;
  font-size: 0;
}
.diamond::after { content: ''; width: 5px; height: 5px; background: var(--surface); border-radius: 1px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot--green { background: var(--success); }
.dot--ochre { background: var(--warning); }
.dot--red { background: var(--danger); }

/* === Tags · pills ========================================================= */

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-body); font-size: 11px; font-weight: 500;
  letter-spacing: 0; text-transform: none;
  padding: 2px 8px; border: 1px solid var(--border-strong); color: var(--ink-soft);
  background: var(--surface-soft);
  border-radius: var(--r-sm);
  line-height: 1.5;
}
.tag--green { color: var(--success); border-color: var(--success-line); background: var(--success-soft); }
.tag--ochre { color: var(--warning); border-color: var(--warning-line); background: var(--warning-soft); }
.tag--red   { color: var(--danger); border-color: var(--danger-line); background: var(--danger-soft); }
.tag--gold  { color: var(--gold); border-color: var(--gold-line); background: var(--gold-veil); }

/* === Buttons — refined, with subtle shadow ================================ */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-size: 13px; font-weight: 500;
  padding: 8px 14px; border: 1px solid var(--ink); background: var(--ink); color: var(--surface);
  border-radius: var(--r);
  cursor: pointer; letter-spacing: -0.005em;
  transition: all 0.12s ease;
  box-shadow: var(--shadow-xs);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { background: var(--navy-darker); border-color: var(--navy-darker); box-shadow: var(--shadow-sm); }
.btn--moss {
  background: var(--navy); border-color: var(--navy); color: var(--surface);
}
.btn--moss:hover { background: var(--navy-deep); border-color: var(--navy-deep); }
.btn--ghost {
  background: var(--surface); color: var(--ink); border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
}
.btn--ghost:hover { background: var(--surface-soft); border-color: var(--ink-soft); }
.btn--danger {
  background: var(--surface); border-color: var(--danger); color: var(--danger);
  box-shadow: var(--shadow-xs);
}
.btn--danger:hover { background: var(--danger); border-color: var(--danger); color: var(--surface); }
.btn--danger-solid {
  background: var(--danger); border-color: var(--danger); color: var(--surface);
}
.btn--lg { padding: 10px 18px; font-size: 14px; }
.btn--xl { padding: 12px 20px; font-size: 14px; width: 100%; justify-content: center; }
.btn__hint {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em;
  opacity: 0.7; margin-left: auto;
}
.btn--with-ico { gap: 6px; }
.btn--with-ico svg { color: currentColor; }

/* === Inputs — body font, refined ========================================== */

.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.field__label {
  font-size: 11px; letter-spacing: 0; text-transform: none;
  color: var(--ink-soft); font-weight: 500;
}
.field__input {
  font-family: var(--font-body); font-size: 14px;
  padding: 9px 12px;
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--ink);
  border-radius: var(--r);
  outline: none; transition: border-color 0.12s, box-shadow 0.12s;
  letter-spacing: -0.005em;
}
.field__input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(30,58,138,0.12); }

/* === Tables =============================================================== */

.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left; font-size: 11px; letter-spacing: 0; text-transform: none;
  color: var(--ink-faint); font-weight: 600;
  padding: 10px 12px; border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
}
.tbl th:first-child { border-top-left-radius: var(--r-md); }
.tbl th:last-child { border-top-right-radius: var(--r-md); }
.tbl td {
  padding: 12px 12px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px; color: var(--ink);
}
.tbl td.figure { font-family: var(--font-mono); font-size: 12px; }
.tbl tr:hover td { background: var(--surface-soft); }
.tbl tbody tr:last-child td:first-child { border-bottom-left-radius: var(--r-md); }
.tbl tbody tr:last-child td:last-child { border-bottom-right-radius: var(--r-md); }

/* Wrap tables in surface for app-card feel */
table.tbl { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-xs); overflow: hidden; }

/* === Grid helpers ========================================================= */

.row { display: grid; gap: 14px; }
.row--6 { grid-template-columns: repeat(6, 1fr); }
.row--4 { grid-template-columns: repeat(4, 1fr); }
.row--3 { grid-template-columns: repeat(3, 1fr); }
.row--2 { grid-template-columns: 1fr 1fr; }
.row--asym { grid-template-columns: 2fr 1fr; }

/* === Utility ============================================================== */

.hr { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.hr-soft { border: none; border-top: 1px solid var(--border-soft); margin: 14px 0; }
.muted { color: var(--ink-soft); }
.faint { color: var(--ink-faint); }
.center { text-align: center; }

/* page reveal */
@keyframes lift { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.lift { animation: lift 0.45s cubic-bezier(0.16, 1, 0.3, 1) both; }
.lift:nth-child(2) { animation-delay: 0.04s; }
.lift:nth-child(3) { animation-delay: 0.08s; }
.lift:nth-child(4) { animation-delay: 0.12s; }
.lift:nth-child(5) { animation-delay: 0.16s; }

/* === Foil seal — kept for editorial moments =============================== */

.seal {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px;
  border: 1px solid var(--gold);
  color: var(--gold);
  border-radius: 50%;
  font-family: var(--font-display); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--gold-soft);
  font-weight: 500;
}

/* === Injected fixed sidebar =============================================== */

.sidebar--fixed {
  position: fixed; left: 0; top: 0; bottom: 0; width: 240px;
  border-right: 1px solid var(--border); background: var(--surface-soft);
  overflow-y: auto; padding: 0 0 16px; z-index: 30;
  display: flex; flex-direction: column;
}
body.cs-with-rail { padding-left: 240px; }
body.cs-with-rail .topbar { padding-left: 16px; }

/* sidebar brand block */
.sidebar__brand {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  text-decoration: none;
  background: var(--surface);
}
.sidebar__brand-mark {
  width: 28px; height: 28px;
  background: var(--navy); color: var(--surface);
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 13px; font-weight: 600;
  letter-spacing: 0;
  box-shadow: var(--shadow-xs), inset 0 1px 0 rgba(255,255,255,0.1);
  flex-shrink: 0;
}
.sidebar__brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.sidebar__brand-name { font-family: var(--font-body); font-weight: 600; font-size: 14px; color: var(--ink); letter-spacing: -0.01em; }
.sidebar__brand-sub { font-family: var(--font-body); font-size: 10px; color: var(--ink-faint); letter-spacing: 0.06em; text-transform: uppercase; margin-top: 2px; }

.sidebar__role {
  margin: 4px 16px 14px;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold); font-weight: 600;
  padding-bottom: 12px; padding-left: 6px;
  border-bottom: 1px solid var(--border-soft);
}
.sidebar__role::before {
  content: ''; display: inline-block;
  width: 6px; height: 6px; border-radius: 50%; background: var(--gold);
  margin-right: 8px; vertical-align: middle;
  box-shadow: 0 0 0 2px var(--gold-veil);
}
.sidebar__role::after { display: none; }
.sidebar__foot {
  margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border-soft);
}

.nav-item__ico { color: var(--ink-faint); flex-shrink: 0; }
.nav-item:hover .nav-item__ico { color: var(--ink); }
.nav-item__label { flex: 1; display: flex; align-items: center; gap: 10px; }

/* === Breadcrumb (auto-injected) =========================================== */

.cs-crumb {
  font-family: var(--font-body); font-size: 12px; letter-spacing: 0;
  text-transform: none; color: var(--ink-faint); margin-bottom: 14px;
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.cs-crumb a { color: var(--ink-soft); text-decoration: none; }
.cs-crumb a:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.cs-crumb__sep { color: var(--ink-mute); }
.cs-crumb__current { color: var(--ink); font-weight: 500; }

/* === Page-map helper ====================================================== */

.mock-nav {
  position: fixed; bottom: 16px; right: 16px; z-index: 999;
  background: var(--ink); color: var(--surface);
  padding: 8px 14px; font-family: var(--font-body); font-size: 11px;
  font-weight: 500; letter-spacing: 0;
  border: none; border-radius: var(--r-md); cursor: pointer;
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.mock-nav:hover { background: var(--navy-deep); }
.mock-nav__panel {
  position: fixed; bottom: 60px; right: 16px; z-index: 999;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md);
  width: 300px; padding: 14px; display: none;
  box-shadow: var(--shadow-lg);
  max-height: 70vh; overflow-y: auto;
}
.mock-nav__panel--open { display: block; }
.mock-nav__panel h5 {
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-faint); margin: 10px 0 4px; font-weight: 600;
}
.mock-nav__panel a {
  display: block; padding: 5px 8px; font-size: 12px;
  color: var(--ink-soft); text-decoration: none; font-weight: 500;
  border-radius: var(--r-sm);
}
.mock-nav__panel a:hover { color: var(--navy); background: var(--surface-soft); }
.mock-nav__panel a.is-current { color: var(--navy); font-weight: 600; }

/* === Icons ================================================================ */

.ico {
  width: 1em; height: 1em;
  flex-shrink: 0;
  stroke: currentColor; fill: none;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  vertical-align: -0.15em;
  display: inline-block;
}
.ico--sm { width: 14px; height: 14px; stroke-width: 1.6; }
.ico--md { width: 16px; height: 16px; stroke-width: 1.5; }
.ico--lg { width: 20px; height: 20px; stroke-width: 1.5; }
.ico--xl { width: 32px; height: 32px; stroke-width: 1.4; }

/* === Anchor reset ========================================================= */

a { color: inherit; text-decoration: none; }
a.lnk, a:not([class]) { color: var(--navy); text-decoration: none; font-weight: 500; }
a.lnk:hover, a:not([class]):hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--navy-soft); }

/* === Responsive =========================================================== */

@media (max-width: 1024px) {
  .main { padding: 18px 20px 40px; }
  .topbar { padding: 10px 16px; }

  .shell--sidebar { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr; }
  .sidebar, .sidebar--fixed {
    position: relative; top: 0; width: 100%; height: auto;
    border-right: none; border-bottom: 1px solid var(--border);
    padding: 6px 12px; display: flex; gap: 4px; overflow-x: auto;
    flex-wrap: nowrap; white-space: nowrap;
  }
  body.cs-with-rail { padding-left: 0; }
  .sidebar__role, .sidebar__heading, .sidebar__foot { display: none; }
  .nav-item { padding: 7px 12px; flex-shrink: 0; gap: 6px; margin: 0; }

  .row--6 { grid-template-columns: repeat(3, 1fr); }
  .row--4 { grid-template-columns: repeat(2, 1fr); }
  .row--asym { grid-template-columns: 1fr; }
  .row--3 { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .main { padding: 14px 14px 32px; }
  .topbar { padding: 10px 14px; flex-wrap: wrap; gap: 8px; }

  .row--6 { grid-template-columns: repeat(2, 1fr); }
  .row--4 { grid-template-columns: 1fr 1fr; }
  .row--3 { grid-template-columns: 1fr; }
  .row--2 { grid-template-columns: 1fr; }

  .page-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .page-head > div:last-child { width: 100%; }

  h1 { font-size: 22px; }
  h2 { font-size: 18px; }

  .card { padding: 14px 16px; }
  .stat { padding: 12px 14px; }
  .stat__value { font-size: 24px; }

  .tabs { overflow-x: auto; gap: 16px; padding-bottom: 4px; }
  .tab { white-space: nowrap; flex-shrink: 0; }

  table.tbl thead { display: none; }
  table.tbl, table.tbl tbody, table.tbl tr, table.tbl td { display: block; width: 100%; }
  table.tbl tr { border: 1px solid var(--border); margin-bottom: 8px; padding: 10px 12px; border-radius: var(--r); background: var(--surface); }
  table.tbl td { border: none; padding: 4px 0; font-size: 12px; }
  table.tbl td::before {
    content: attr(data-label);
    display: inline-block; min-width: 100px;
    font-size: 11px; color: var(--ink-faint); font-weight: 500;
    margin-right: 8px;
  }

  body[data-page="login"] { grid-template-columns: 1fr !important; }
  .hero { padding: 32px 24px !important; }
  .form-side { padding: 32px 24px !important; }

  .ai-shell { grid-template-columns: 1fr !important; }
  .ai-side, .ai-context { display: none; }

  .layout { grid-template-columns: 1fr !important; }
  .pane--right { border-left: none; border-top: 1px solid var(--border); }
  .pane { padding: 24px 20px !important; }

  .evac-main { grid-template-columns: 1fr !important; }
  .evac-strip { grid-template-columns: repeat(2, 1fr) !important; }
  .control-pane { border-left: none !important; border-top: 1px solid var(--border); }

  .summary-row { grid-template-columns: repeat(2, 1fr) !important; }
}
