/* ── Tradeshow Hub v3 — Base Design System ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Surfaces */
  --bg:       #F7F8FB;
  --panel:    #FFFFFF;
  --panel2:   #F3F4F8;
  --sunk:     #ECEEF4;
  --line:     #E3E6EE;
  --line2:    #EDF0F6;

  /* Text */
  --ink:      #0D1117;
  --ink2:     #1E2435;
  --mute:     #5A6278;
  --faint:    #9299B2;

  /* Brand */
  --brand:        #C8102E;
  --brand-dark:   #A80D27;
  --brand-soft:   rgba(200,16,46,.08);
  --brand-soft2:  rgba(200,16,46,.15);

  /* Rail (sidebar) */
  --rail:         #111420;
  --rail2:        #191D2E;
  --rail3:        #202438;
  --rail-ink:     #CBD0E0;
  --rail-mute:    #676D88;
  --rail-line:    rgba(255,255,255,.07);

  /* Status */
  --ok:           #1A7F4B;
  --ok-soft:      #E2F5EC;
  --warn:         #C07A00;
  --warn-soft:    #FFF3D6;
  --crit:         #C8102E;
  --crit-soft:    #FFE8EB;
  --info:         #1557B0;
  --info-soft:    #E5EFFF;

  /* Tier colors */
  --t1-bg: #EEEEF8; --t1-fg: #3B3FA0;
  --t2-bg: #E0F5F0; --t2-fg: #0A7560;
  --t3-bg: #FFF0DC; --t3-fg: #9A5C00;

  /* Misc */
  --shadow:    0 1px 3px rgba(13,17,23,.06), 0 2px 6px rgba(13,17,23,.04);
  --shadow-md: 0 4px 14px rgba(13,17,23,.10);
  --shadow-lg: 0 12px 40px rgba(13,17,23,.15);
  --r:   10px;
  --rs:   7px;
  --h:   36px;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:    #12151F;
    --panel: #1A1E2E;
    --panel2:#1E2234;
    --sunk:  #202436;
    --line:  #2C3048;
    --line2: #252840;
    --ink:   #E8ECF5;
    --ink2:  #BFC5D8;
    --mute:  #8A91AA;
    --faint: #5C6280;
    --brand: #E8324A;
    --brand-soft: rgba(232,50,74,.12);
    --ok:   #4CAF76; --ok-soft:  #0F2B1A;
    --warn: #D99A2E; --warn-soft:#2A2010;
    --crit: #E8324A; --crit-soft:#2D1018;
    --info: #5B9CF0; --info-soft:#0F1E38;
    --t1-bg:#202348; --t1-fg:#9099EE;
    --t2-bg:#0F2920; --t2-fg:#3DC4A8;
    --t3-bg:#281E0A; --t3-fg:#D4A040;
    --shadow: 0 1px 3px rgba(0,0,0,.3), 0 2px 6px rgba(0,0,0,.2);
    --shadow-md: 0 4px 14px rgba(0,0,0,.35);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg:    #12151F; --panel: #1A1E2E; --panel2:#1E2234; --sunk:  #202436;
  --line:  #2C3048; --line2: #252840; --ink:   #E8ECF5; --ink2:  #BFC5D8;
  --mute:  #8A91AA; --faint: #5C6280; --brand: #E8324A;
  --brand-soft: rgba(232,50,74,.12);
  --ok:#4CAF76;--ok-soft:#0F2B1A;--warn:#D99A2E;--warn-soft:#2A2010;
  --crit:#E8324A;--crit-soft:#2D1018;--info:#5B9CF0;--info-soft:#0F1E38;
  --t1-bg:#202348;--t1-fg:#9099EE;--t2-bg:#0F2920;--t2-fg:#3DC4A8;
  --t3-bg:#281E0A;--t3-fg:#D4A040;
  --shadow:0 1px 3px rgba(0,0,0,.3),0 2px 6px rgba(0,0,0,.2);
  --shadow-md:0 4px 14px rgba(0,0,0,.35);--shadow-lg:0 12px 40px rgba(0,0,0,.5);
  color-scheme: dark;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--info); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
img { max-width: 100%; }

/* ── App Shell ── */
.app {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 180ms ease;
}
.app.rail-collapsed { grid-template-columns: 60px minmax(0, 1fr); }
@media (max-width: 768px) {
  .app, .app.rail-collapsed { grid-template-columns: 1fr !important; }
}

/* ── Rail ── */
.rail {
  background: var(--rail);
  display: flex;
  flex-direction: column;
  padding: 0 10px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  border-top: 3px solid var(--brand);
  width: 230px;
  flex-shrink: 0;
  transition: width 180ms ease;
}
.app.rail-collapsed .rail { width: 60px; }

.rail-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 10px 14px;
  border-bottom: 1px solid var(--rail-line);
  margin: 0 -10px;
  flex-shrink: 0;
  overflow: hidden;
  white-space: nowrap;
}
.rail-brand-mark {
  width: 32px; height: 32px;
  background: var(--brand);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: #fff;
  flex-shrink: 0;
}
.rail-brand-text { overflow: hidden; transition: opacity 180ms, width 180ms; }
.rail-brand-label { font-size: 13.5px; font-weight: 700; color: #fff; line-height: 1.3; }
.rail-brand-sub { font-size: 9.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .13em; color: var(--rail-mute); }
.app.rail-collapsed .rail-brand-text { opacity: 0; width: 0; }

.nav-section {
  font-size: 9.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--rail-mute); padding: 14px 10px 4px; margin: 0 -10px;
  white-space: nowrap; overflow: hidden;
}
.app.rail-collapsed .nav-section { opacity: 0; height: 0; padding: 0; overflow: hidden; }

.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px; border-radius: 7px;
  color: var(--rail-ink); font-size: 13px; font-weight: 500;
  cursor: pointer; user-select: none;
  transition: background .12s, color .12s;
  position: relative; overflow: hidden; white-space: nowrap;
  text-decoration: none; border: none; background: none; width: 100%; text-align: left;
}
.nav-item svg {
  width: 15px; height: 15px; flex: none;
  stroke: currentColor; fill: none; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
  opacity: .65; transition: opacity .12s; flex-shrink: 0;
}
.nav-item span { transition: opacity 180ms, width 180ms; white-space: nowrap; overflow: hidden; }
.app.rail-collapsed .nav-item { justify-content: center; padding: 9px 0; }
.app.rail-collapsed .nav-item span { opacity: 0; width: 0; }
.nav-item:hover { background: var(--rail3); color: #fff; }
.nav-item:hover svg { opacity: 1; }
.nav-item.on { background: rgba(200,16,46,.18); color: #fff; }
.nav-item.on svg { opacity: 1; stroke: var(--brand); }
.nav-item.on::before {
  content: ''; position: absolute;
  left: -10px; top: 6px; bottom: 6px;
  width: 3px; background: var(--brand); border-radius: 0 3px 3px 0;
}
.app.rail-collapsed .nav-item.on::before { display: none; }

.nav-badge {
  margin-left: auto; min-width: 18px; height: 18px;
  background: var(--crit); color: #fff;
  font-size: 9.5px; font-weight: 700; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 5px;
  flex-shrink: 0;
}
.app.rail-collapsed .nav-badge { display: none; }

.rail-footer {
  margin-top: auto;
  padding: 12px 10px 0;
  border-top: 1px solid var(--rail-line);
  margin-left: -10px; margin-right: -10px;
  display: flex; align-items: center; gap: 9px;
  overflow: hidden; white-space: nowrap;
}
.rail-footer-avatar {
  width: 30px; height: 30px; border-radius: 7px;
  background: var(--brand); display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.rail-footer-info { overflow: hidden; transition: opacity 180ms, width 180ms; }
.rail-footer-name { font-size: 12.5px; font-weight: 600; color: #fff; }
.rail-footer-role { font-size: 10px; color: var(--rail-mute); }
.app.rail-collapsed .rail-footer-info { opacity: 0; width: 0; }

/* ── Work Area ── */
.work { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 0 20px; height: 52px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
  flex-shrink: 0;
}
.topbar-crumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--mute); flex: 1; min-width: 0; overflow: hidden; }
.topbar-crumb b { color: var(--ink); font-weight: 600; }
.topbar-crumb .sep { color: var(--faint); font-size: 11px; }
.topbar-crumb a { color: var(--mute); text-decoration: none; cursor: pointer; white-space: nowrap; }
.topbar-crumb a:hover { color: var(--ink); }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.page { padding: 24px; overflow-y: auto; flex: 1; }
.page-hd { margin-bottom: 22px; }
.page-hd h1 { font-size: 22px; font-weight: 800; letter-spacing: -.4px; }
.page-hd p  { font-size: 13px; color: var(--mute); margin-top: 3px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 15px; border-radius: var(--rs);
  border: 1.5px solid var(--line); background: var(--panel);
  color: var(--ink); font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--sunk); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.sm { padding: 5px 11px; font-size: 12px; }
.btn.xs { padding: 3px 8px; font-size: 11.5px; }
.btn.danger { color: var(--crit); border-color: var(--crit-soft); }
.btn.danger:hover { background: var(--crit-soft); }
.btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ── KPI Cards ── */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.kpi {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); padding: 16px 18px;
  position: relative; overflow: hidden;
}
.kpi::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: var(--kpi-color, var(--brand));
}
.kpi-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--mute); margin-bottom: 8px; }
.kpi-value { font-size: 28px; font-weight: 800; letter-spacing: -.8px; line-height: 1; }
.kpi-sub { font-size: 12px; color: var(--mute); margin-top: 5px; }
.kpi-sub .up { color: var(--ok); } .kpi-sub .dn { color: var(--crit); }

/* ── Panels ── */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.panel-hd {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 18px 12px; border-bottom: 1px solid var(--line);
}
.panel-hd h2 { font-size: 14px; font-weight: 700; flex: 1; margin: 0; }

/* ── Chips ── */
.chip { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.chip-ok   { background: var(--ok-soft);   color: var(--ok);   }
.chip-warn { background: var(--warn-soft); color: var(--warn); }
.chip-crit { background: var(--crit-soft); color: var(--crit); }
.chip-info { background: var(--info-soft); color: var(--info); }
.chip-mute { background: var(--sunk);      color: var(--mute); }
.chip-brand{ background: var(--brand-soft);color: var(--brand);}

/* ── Tier badges ── */
.tier-badge { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 800; flex-shrink: 0; }
.t1 { background: var(--t1-bg); color: var(--t1-fg); }
.t2 { background: var(--t2-bg); color: var(--t2-fg); }
.t3 { background: var(--t3-bg); color: var(--t3-fg); }

/* ── Show rows ── */
.show-row {
  display: grid;
  grid-template-columns: 36px minmax(0,1fr) 100px 90px 20px;
  align-items: center; gap: 12px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--line2);
  cursor: pointer; transition: background .1s;
}
.show-row:last-child { border-bottom: none; }
.show-row:hover { background: var(--sunk); }
.show-name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.show-meta { font-size: 12px; color: var(--mute); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.show-date { font-size: 11.5px; font-family: 'JetBrains Mono', monospace; color: var(--mute); text-align: right; white-space: nowrap; }
.show-chevron { width: 16px; height: 16px; stroke: var(--faint); fill: none; stroke-width: 2; stroke-linecap: round; }

/* ── Progress bar ── */
.prog-bar  { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; margin-top: 5px; }
.prog-fill { height: 100%; border-radius: 2px; transition: width .4s ease; }

/* ── Month header ── */
.month-hd {
  padding: 7px 18px 6px;
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--mute);
  background: var(--panel2); border-bottom: 1px solid var(--line);
}

/* ── Activity feed ── */
.activity-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 18px; border-bottom: 1px solid var(--line2); }
.activity-item:last-child { border-bottom: none; }
.activity-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.activity-text { font-size: 12.5px; color: var(--mute); line-height: 1.45; flex: 1; }
.activity-text b { color: var(--ink); font-weight: 600; }
.activity-time { font-size: 11px; font-family: 'JetBrains Mono', monospace; color: var(--faint); flex-shrink: 0; margin-top: 2px; white-space: nowrap; }

/* ── Show detail ── */
.show-banner {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px 20px; margin-bottom: 14px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.show-banner-tier { width: 54px; height: 54px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; flex-shrink: 0; }
.show-banner-info { flex: 1; min-width: 0; }
.show-banner-name { font-size: 19px; font-weight: 800; letter-spacing: -.3px; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.show-banner-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.show-banner-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.show-readiness { display: flex; gap: 10px; }
.rk-item { text-align: center; min-width: 48px; }
.rk-label { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin-bottom: 4px; }
.rk-icon { font-size: 17px; font-weight: 800; line-height: 1; }

/* ── Tab bar ── */
.tab-bar { display: flex; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 4px; margin-bottom: 14px; flex-wrap: wrap; }
.tab { flex: 1; min-width: max-content; padding: 7px 11px; border-radius: 6px; border: none; background: transparent; color: var(--mute); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: background .12s, color .12s; white-space: nowrap; text-align: center; }
.tab:hover { background: var(--sunk); color: var(--ink); }
.tab.on { background: var(--brand); color: #fff; }

/* ── Field grid ── */
.field-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 16px; }
.field-item { display: flex; flex-direction: column; gap: 4px; }
.field-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.field-val { font-size: 13.5px; font-weight: 500; }
.field-val.empty { color: var(--faint); font-style: italic; }
.field-section { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--mute); padding: 12px 16px 8px; border-top: 1px solid var(--line); }

/* ── Table ── */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { padding: 9px 14px; text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--mute); background: var(--panel2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--line2); }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: var(--sunk); }

/* ── Form elements ── */
input[type="text"], input[type="email"], input[type="date"], input[type="number"], input[type="tel"], select, textarea {
  width: 100%; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: var(--rs);
  background: var(--panel); color: var(--ink); font-size: 13.5px; font-family: inherit;
  transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); }
textarea { resize: vertical; min-height: 80px; }

/* ── Toast ── */
.toast-wrap { position: fixed; bottom: 24px; right: 24px; z-index: 1000; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 13px; font-weight: 500; box-shadow: var(--shadow-md); pointer-events: auto; display: flex; align-items: center; gap: 8px; animation: toastIn .18s ease; max-width: 320px; }
.toast.ok   { background: var(--ok);   }
.toast.err  { background: var(--crit); }
.toast.warn { background: var(--warn); }
@keyframes toastIn { from { opacity:0; transform: translateY(8px); } to { opacity:1; transform: none; } }

/* ── Loading ── */
.loading-wrap { display: flex; align-items: center; justify-content: center; padding: 60px 20px; }
.spinner { width: 28px; height: 28px; border: 2.5px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Banner ── */
.banner { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--rs); font-size: 13px; font-weight: 500; margin-bottom: 14px; }
.banner.ok   { background: var(--ok-soft);   color: var(--ok);   border: 1px solid rgba(26,127,75,.2); }
.banner.warn { background: var(--warn-soft); color: var(--warn); border: 1px solid rgba(192,122,0,.2); }
.banner.crit { background: var(--crit-soft); color: var(--crit); border: 1px solid rgba(200,16,46,.2); }
.banner.info { background: var(--info-soft); color: var(--info); border: 1px solid rgba(21,87,176,.2); }

/* ── Modal ── */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 500; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: var(--panel); border-radius: 12px; box-shadow: var(--shadow-lg); max-width: 480px; width: 100%; max-height: 90vh; overflow-y: auto; }
.modal-hd { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-hd h2 { font-size: 15px; font-weight: 700; flex: 1; margin: 0; }
.modal-body { padding: 20px; }
.modal-ft { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); }

/* ── Notification bell ── */
.notif-btn { width: 34px; height: 34px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--panel); cursor: pointer; display: flex; align-items: center; justify-content: center; position: relative; color: var(--mute); transition: background .12s, color .12s; }
.notif-btn:hover { background: var(--sunk); color: var(--ink); }
.notif-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.notif-dot { position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; background: var(--crit); border-radius: 50%; border: 2px solid var(--panel); }

/* ── Misc utilities ── */
.sep-line { height: 1px; background: var(--line); margin: 0 -18px; }
.empty { padding: 40px 20px; text-align: center; color: var(--faint); font-size: 13px; }
.fw6 { font-weight: 600; } .fw7 { font-weight: 700; } .fw8 { font-weight: 800; }
.mono { font-family: 'JetBrains Mono', monospace; }
.two-col { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .two-col { grid-template-columns: 1fr; } }

/* ── Notification drawer ── */
.notif-drawer { position: fixed; top: 52px; right: 0; width: 340px; background: var(--panel); border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0 0 0 10px; box-shadow: var(--shadow-lg); z-index: 200; max-height: calc(100vh - 64px); overflow-y: auto; display: none; }
.notif-drawer.open { display: block; }
.notif-drawer-hd { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); z-index: 1; }
.notif-drawer-hd h2 { font-size: 14px; font-weight: 700; flex: 1; margin: 0; }

/* ── Sub-bar (breadcrumb strip) ── */
.sub-bar { display: flex; align-items: center; gap: 10px; padding: 7px 20px; background: var(--panel2); border-bottom: 1px solid var(--line); min-height: 36px; position: sticky; top: 52px; z-index: 40; }
.back-btn { display: none; align-items: center; gap: 4px; padding: 3px 10px 3px 6px; border: 1px solid var(--line); border-radius: 6px; background: none; color: var(--mute); font-size: 12px; font-weight: 500; cursor: pointer; transition: background .12s; }
.back-btn.visible { display: flex; }
.back-btn:hover { background: var(--panel); color: var(--ink); }
.back-btn svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .rail { position: fixed; inset: 0 auto 0 0; z-index: 300; transform: translateX(-110%); transition: transform 240ms cubic-bezier(.4,0,.2,1); box-shadow: none; height: 100dvh; padding-bottom: 24px; }
  .rail.mobile-open { transform: translateX(0); box-shadow: 6px 0 32px rgba(0,0,0,.4); }
  .mob-backdrop { display: none; position: fixed; inset: 0; z-index: 299; background: rgba(0,0,0,.5); }
  .mob-backdrop.visible { display: block; }
  .kpi-row { grid-template-columns: repeat(2,1fr); }
  .field-grid { grid-template-columns: repeat(2,1fr); }
  .show-row { grid-template-columns: 36px minmax(0,1fr) 90px 20px; }
  .show-row .show-date { display: none; }
}