/* ═══════════════════════════════════════════════════════
   KONARK INTELLIGENCE LABS — STRATEGIC DASHBOARD
   Theme: Refined dark luxury / financial institution
   ═══════════════════════════════════════════════════════ */

:root {
  --navy:    #0D1B2A;
  --navy2:   #162032;
  --navy3:   #1E2D42;
  --navy4:   #243448;
  --gold:    #C9A84C;
  --gold2:   #E8C86A;
  --gold3:   #F5DFA0;
  --blue:    #2E86C1;
  --blue2:   #5DADE2;
  --teal:    #1ABC9C;
  --red:     #E74C3C;
  --red2:    #FF6B6B;
  --green:   #27AE60;
  --green2:  #2ECC71;
  --amber:   #F39C12;
  --white:   #F8F6F0;
  --white2:  #EDE9DF;
  --gray1:   #8B9BAD;
  --gray2:   #5A6A7A;
  --gray3:   #3A4A5A;
  --border:  rgba(201,168,76,0.18);
  --border2: rgba(201,168,76,0.08);
  --sidebar-w: 240px;
  --ff-display: 'Playfair Display', Georgia, serif;
  --ff-body:    'DM Sans', system-ui, sans-serif;
  --ff-mono:    'DM Mono', monospace;

  /* Aliases used by index.php / JS renderers */
  --ff:   'DM Sans', system-ui, sans-serif;
  --ffd:  'Playfair Display', Georgia, serif;
  --ffm:  'DM Mono', monospace;
  --g1:   #8B9BAD;
  --g2:   #5A6A7A;
  --g3:   #3A4A5A;
  --bdr:  rgba(201,168,76,0.18);
  --bdr2: rgba(201,168,76,0.08);
  --sw:   240px;

  /* Font-size scale (controlled by +/- buttons) */
  --fs-scale: 1;
}

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

html, body {
  height: 100%;
  font-family: var(--ff-body);
  background: var(--navy);
  color: var(--white);
  font-size: calc(14px * var(--fs-scale));
  line-height: 1.6;
  overflow: hidden;
}

/* ── SHELL ─────────────────────────────────────────────── */
.shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── SIDEBAR ───────────────────────────────────────────── */
.sidebar {
  width: var(--sw);
  min-width: var(--sw);
  background: var(--navy2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform 0.28s ease;
  z-index: 100;
  flex-shrink: 0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 18px 20px;
  border-bottom: 1px solid var(--border2);
}

.brand-mark {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold2) 100%);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-display);
  font-weight: 700; font-size: calc(13px * var(--fs-scale));
  color: var(--navy);
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.brand-text {
  display: flex; flex-direction: column; gap: 1px;
  min-width: 0;
}
.brand-name {
  font-family: var(--ff-display);
  font-size: calc(12px * var(--fs-scale)); font-weight: 600;
  color: var(--gold2); line-height: 1.2;
}
.brand-sub {
  font-size: calc(10px * var(--fs-scale)); color: var(--gray1);
  font-weight: 300; letter-spacing: 0.03em;
}

/* Nav */
.sidebar-nav { flex: 1; padding: 12px 0; }

.nav-section { margin-bottom: 2px; }

.nav-main {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 18px;
  background: none; border: none; cursor: pointer;
  color: var(--gray1); font-family: var(--ff-body);
  font-size: calc(13px * var(--fs-scale)); font-weight: 500;
  text-align: left;
  transition: all 0.18s;
  border-left: 2px solid transparent;
}
.nav-main:hover { color: var(--white2); background: var(--border2); }
.nav-main.active {
  color: var(--gold2);
  background: rgba(201,168,76,0.07);
  border-left-color: var(--gold);
}

.nav-icon { font-size: calc(14px * var(--fs-scale)); opacity: 0.7; }
.nav-arrow { margin-left: auto; font-size: calc(10px * var(--fs-scale)); transition: transform 0.2s; }
.nav-arrow.open { transform: rotate(90deg); }

.nav-sub {
  overflow: hidden;
  max-height: 400px;
  transition: max-height 0.28s ease;
}
.nav-sub.collapsed { max-height: 0; }

.nav-sub-item {
  display: block; width: 100%;
  padding: 8px 18px 8px 42px;
  background: none; border: none; cursor: pointer;
  color: var(--gray1); font-family: var(--ff-body);
  font-size: calc(12px * var(--fs-scale)); text-align: left;
  transition: all 0.15s;
  border-left: 2px solid transparent;
}
.nav-sub-item:hover { color: var(--white2); background: var(--border2); }
.nav-sub-item.active {
  color: var(--gold3);
  background: rgba(201,168,76,0.06);
  border-left-color: var(--gold);
}
.nav-sub-item.locked { opacity: 0.35; cursor: not-allowed; }

/* User badge in sidebar footer */
.user-badge { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.user-avatar-sm {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: calc(11px * var(--fs-scale)); font-weight: 600; flex-shrink: 0;
}
.user-info-sm { flex: 1; min-width: 0; }
.user-name-sm {
  font-size: calc(12px * var(--fs-scale)); font-weight: 500; color: var(--white2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-role-sm {
  font-size: calc(10px * var(--fs-scale)); color: var(--gray2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.logout-btn {
  font-size: calc(12px * var(--fs-scale)); color: var(--gray2); background: none; border: none;
  cursor: pointer; padding: 0; text-decoration: underline;
  transition: color 0.15s; display: block; margin-bottom: 8px;
}
.logout-btn:hover { color: var(--gray1); }

.sidebar-footer {
  padding: 16px 18px;
  border-top: 1px solid var(--border2);
}
.conf-badge {
  display: inline-block;
  font-size: calc(9px * var(--fs-scale)); font-weight: 600; letter-spacing: 0.12em;
  color: var(--gold); border: 1px solid var(--gold);
  padding: 2px 8px; border-radius: 3px;
  opacity: 0.6;
}
.sidebar-meta { font-size: calc(10px * var(--fs-scale)); color: var(--gray2); margin-top: 4px; }

/* ── MAIN ──────────────────────────────────────────────── */
.main {
  flex: 1; overflow-y: auto;
  background: var(--navy);
}

#content-area {
  min-height: 100vh;
  padding: 0;
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── PAGE HEADER ───────────────────────────────────────── */
.page-header {
  padding: 32px 40px 24px;
  border-bottom: 1px solid var(--border2);
  background: linear-gradient(180deg, var(--navy2) 0%, transparent 100%);
}
.page-eyebrow {
  font-size: calc(10px * var(--fs-scale)); letter-spacing: 0.14em; font-weight: 600;
  color: var(--gold); text-transform: uppercase; margin-bottom: 6px;
}
.page-title {
  font-family: var(--ff-display);
  font-size: calc(26px * var(--fs-scale)); font-weight: 700;
  color: var(--white); line-height: 1.2;
}
.page-subtitle {
  font-size: calc(13px * var(--fs-scale)); color: var(--gray1);
  margin-top: 6px; font-weight: 300;
}

/* ── CONTENT BODY ──────────────────────────────────────── */
.content-body { padding: 32px 40px 48px; }

/* ── METRIC CARDS ──────────────────────────────────────── */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}
.metric-card {
  background: var(--navy2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s;
}
.metric-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--gold) 0%, transparent 100%);
}
.metric-card:hover { border-color: rgba(201,168,76,0.4); }
.metric-label {
  font-size: calc(10px * var(--fs-scale)); letter-spacing: 0.08em; font-weight: 500;
  color: var(--gray1); text-transform: uppercase; margin-bottom: 8px;
}
.metric-value {
  font-family: var(--ff-mono);
  font-size: calc(22px * var(--fs-scale)); font-weight: 500;
  color: var(--gold2); line-height: 1;
}
.metric-sub {
  font-size: calc(11px * var(--fs-scale)); color: var(--gray2); margin-top: 5px;
}
.metric-card.green .metric-value { color: var(--green2); }
.metric-card.green::before { background: linear-gradient(90deg, var(--green) 0%, transparent 100%); }
.metric-card.blue .metric-value { color: var(--blue2); }
.metric-card.blue::before { background: linear-gradient(90deg, var(--blue) 0%, transparent 100%); }
.metric-card.red .metric-value { color: var(--red2); }
.metric-card.red::before { background: linear-gradient(90deg, var(--red) 0%, transparent 100%); }

/* ── SECTION BLOCKS ────────────────────────────────────── */
.section-block {
  margin-bottom: 32px;
}
.section-label {
  font-size: calc(10px * var(--fs-scale)); letter-spacing: 0.14em; font-weight: 600;
  color: var(--gold); text-transform: uppercase;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px;
}
.section-label::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--border) 0%, transparent 100%);
}

/* ── PROSE ─────────────────────────────────────────────── */
.prose {
  font-size: calc(14px * var(--fs-scale)); color: var(--white2);
  line-height: 1.75; font-weight: 300;
  max-width: 800px;
}
.prose strong { color: var(--gold3); font-weight: 500; }
.prose p { margin-bottom: 12px; }

/* ── DATA TABLE ────────────────────────────────────────── */
.data-table-wrap { overflow-x: auto; border-radius: 10px; margin-bottom: 24px; }
.data-table {
  width: 100%; border-collapse: collapse;
  font-size: calc(13px * var(--fs-scale));
}
.data-table thead tr {
  background: var(--navy3);
}
.data-table thead th {
  padding: 12px 16px; text-align: left;
  font-size: calc(10px * var(--fs-scale)); letter-spacing: 0.09em; font-weight: 600;
  color: var(--gold); text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table tbody tr {
  border-bottom: 1px solid var(--border2);
  transition: background 0.12s;
}
.data-table tbody tr:hover { background: var(--navy3); }
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody td {
  padding: 11px 16px; color: var(--white2);
  vertical-align: middle;
}
.data-table tbody td:first-child { font-weight: 500; color: var(--white); }
.data-table .total-row td {
  background: var(--navy3);
  color: var(--gold2); font-weight: 600;
  border-top: 1px solid var(--border);
}
.data-table .neg { color: var(--red2); }
.data-table .pos { color: var(--green2); }
.data-table .highlight td { color: var(--gold2); }

/* Pill badges */
.pill {
  display: inline-block; padding: 2px 9px;
  border-radius: 20px; font-size: calc(11px * var(--fs-scale)); font-weight: 500;
  letter-spacing: 0.02em;
}
.pill-red   { background: rgba(231,76,60,0.18); color: var(--red2); }
.pill-amber { background: rgba(243,156,18,0.18); color: var(--amber); }
.pill-green { background: rgba(39,174,96,0.18); color: var(--green2); }
.pill-blue  { background: rgba(46,134,193,0.18); color: var(--blue2); }
.pill-gold  { background: rgba(201,168,76,0.18); color: var(--gold2); }

/* ── EDITABLE INPUTS ───────────────────────────────────── */
.input-table { width: 100%; border-collapse: collapse; font-size: calc(13px * var(--fs-scale)); }
.input-table thead th {
  padding: 10px 14px; text-align: left;
  font-size: calc(10px * var(--fs-scale)); letter-spacing: 0.08em;
  color: var(--gold); text-transform: uppercase;
  background: var(--navy3);
  border-bottom: 1px solid var(--border);
}
.input-table tbody tr {
  border-bottom: 1px solid var(--border2);
  transition: background 0.12s;
}
.input-table tbody tr:hover { background: rgba(201,168,76,0.03); }
.input-table tbody td { padding: 9px 14px; color: var(--white2); }
.input-table tbody td:first-child { font-weight: 500; color: var(--white); }

.num-input {
  background: var(--navy3);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: #7FC8F8;
  font-family: var(--ff-mono); font-size: calc(12px * var(--fs-scale));
  padding: 5px 8px;
  width: 90px; text-align: right;
  outline: none;
  transition: border-color 0.15s;
}
.num-input:focus {
  border-color: var(--gold);
  background: var(--navy4);
}
.num-input:hover { border-color: rgba(201,168,76,0.4); }

.inflation-bar {
  display: flex; align-items: center; gap: 12px;
  background: var(--navy2); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 20px;
  margin-bottom: 20px;
}
.inflation-bar label { font-size: calc(13px * var(--fs-scale)); color: var(--gray1); white-space: nowrap; }
.inflation-bar input[type=range] {
  flex: 1; accent-color: var(--gold);
  cursor: pointer;
}
.inflation-val {
  font-family: var(--ff-mono); font-size: calc(15px * var(--fs-scale));
  color: var(--gold2); font-weight: 500; min-width: 42px;
}
.recalc-note {
  font-size: calc(11px * var(--fs-scale)); color: var(--gray2);
  margin-top: 4px;
}

/* ── CHART CONTAINERS ──────────────────────────────────── */
.chart-grid-2 {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 20px; margin-bottom: 24px;
}
.chart-grid-1 { margin-bottom: 24px; }
.chart-card {
  background: var(--navy2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 22px;
}
.chart-card-title {
  font-size: calc(12px * var(--fs-scale)); font-weight: 600;
  color: var(--white); margin-bottom: 3px;
  letter-spacing: 0.01em;
}
.chart-card-sub {
  font-size: calc(11px * var(--fs-scale)); color: var(--gray2); margin-bottom: 14px;
}
.chart-wrap { position: relative; width: 100%; }

/* ── VESTING TIMELINE ──────────────────────────────────── */
.vesting-timeline {
  display: flex; gap: 0;
  margin: 20px 0;
  position: relative;
}
.vesting-timeline::before {
  content: '';
  position: absolute; top: 22px; left: 30px; right: 30px; height: 2px;
  background: var(--border);
}
.vest-node {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 8px; position: relative; z-index: 1;
}
.vest-dot {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--navy3); border: 2px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-mono); font-size: calc(13px * var(--fs-scale)); font-weight: 500;
  color: var(--gold2);
}
.vest-label { font-size: calc(11px * var(--fs-scale)); color: var(--gray1); line-height: 1.3; max-width: 100px; }
.vest-pct { font-size: calc(12px * var(--fs-scale)); font-weight: 600; color: var(--gold2); }

/* ── RISK MATRIX VISUAL ────────────────────────────────── */
.risk-row { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 12px; padding: 14px 18px;
  background: var(--navy2); border: 1px solid var(--border2); border-radius: 8px;
  transition: border-color 0.15s; }
.risk-row:hover { border-color: var(--border); }
.risk-score {
  width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-mono); font-weight: 600; font-size: calc(14px * var(--fs-scale));
}
.risk-score.s-low    { background: rgba(39,174,96,0.18); color: var(--green2); }
.risk-score.s-medium { background: rgba(243,156,18,0.18); color: var(--amber); }
.risk-score.s-high   { background: rgba(231,76,60,0.18); color: var(--red2); }
.risk-name { font-weight: 500; color: var(--white); font-size: calc(13px * var(--fs-scale)); margin-bottom: 3px; }
.risk-mitigation { font-size: calc(12px * var(--fs-scale)); color: var(--gray1); }
.risk-tags { display: flex; gap: 6px; margin-top: 5px; }

/* ── EXEC SUMMARY HIGHLIGHTS ───────────────────────────── */
.highlight-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px; margin-bottom: 28px;
}
.highlight-card {
  background: var(--navy2); border: 1px solid var(--border);
  border-radius: 10px; padding: 20px;
}
.highlight-icon { font-size: calc(22px * var(--fs-scale)); margin-bottom: 10px; }
.highlight-title { font-size: calc(13px * var(--fs-scale)); font-weight: 600; color: var(--white); margin-bottom: 5px; }
.highlight-text { font-size: calc(12px * var(--fs-scale)); color: var(--gray1); line-height: 1.5; }

/* ── PHASE TIMELINE ────────────────────────────────────── */
.phase-list { display: flex; flex-direction: column; gap: 12px; }
.phase-item {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--navy2); border: 1px solid var(--border2);
  border-radius: 8px; padding: 16px 18px;
}
.phase-num {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--navy3); border: 1px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-mono); font-size: calc(12px * var(--fs-scale)); font-weight: 500;
  color: var(--gold); flex-shrink: 0;
}
.phase-name { font-weight: 600; color: var(--white); font-size: calc(13px * var(--fs-scale)); margin-bottom: 3px; }
.phase-months { font-size: calc(11px * var(--fs-scale)); color: var(--gold2); margin-bottom: 5px; }
.phase-detail { font-size: calc(12px * var(--fs-scale)); color: var(--gray1); line-height: 1.5; }

/* ── ACTION CHECKLIST ──────────────────────────────────── */
.checklist { display: flex; flex-direction: column; gap: 8px; }
.check-item {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--navy2); border: 1px solid var(--border2);
  border-radius: 8px; padding: 12px 16px;
}
.check-box {
  width: 18px; height: 18px; border: 1.5px solid var(--gold);
  border-radius: 4px; flex-shrink: 0; margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.15s;
}
.check-box.done { background: var(--gold); border-color: var(--gold); }
.check-box.done::after { content: '✓'; font-size: calc(11px * var(--fs-scale)); color: var(--navy); font-weight: 700; }
.check-day { font-size: calc(11px * var(--fs-scale)); color: var(--gold2); font-weight: 500; min-width: 40px; flex-shrink: 0; }
.check-text { font-size: calc(13px * var(--fs-scale)); color: var(--white2); }
.check-owner { font-size: calc(11px * var(--fs-scale)); color: var(--gray2); margin-top: 2px; }

/* ── UPDATE FLASH ──────────────────────────────────────── */
.update-flash {
  display: none;
  position: fixed; top: 20px; right: 20px;
  background: var(--navy3); border: 1px solid var(--gold);
  border-radius: 8px; padding: 10px 18px;
  font-size: calc(12px * var(--fs-scale)); color: var(--gold2);
  font-weight: 500; z-index: 999;
  animation: slideIn 0.2s ease;
}
.update-flash.show { display: block; }
@keyframes slideIn { from { opacity:0; transform: translateX(10px); } to { opacity:1; transform:none; } }

/* ── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 1024px) {
  :root { --sw: 210px; --sidebar-w: 210px; }
  .chart-grid-2 { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .content-body { padding: 20px 24px 40px; }
  .page-header { padding: 24px 24px 18px; }
}
@media (max-width: 767px) {
  html, body { overflow: auto; }
  .sidebar-toggle { display: flex; }
  #app-shell { flex-direction: column; }
  .sidebar {
    position: fixed; top: 0; left: 0; height: 100vh;
    transform: translateX(-100%); z-index: 200;
    width: 260px !important; min-width: 260px !important;
    box-shadow: 4px 0 24px rgba(0,0,0,0.5);
  }
  .sidebar.open { transform: translateX(0); }
  .main { width: 100%; }
  .page-header { padding: 56px 16px 16px; }
  .content-body { padding: 16px 14px 40px; }
  .chart-grid-2 { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .vesting-timeline { flex-direction: column; align-items: flex-start; gap: 12px; }
  .vesting-timeline::before { display: none; }
  .vest-node { flex-direction: row; text-align: left; max-width: 100%; }
  .login-box { width: 92vw; padding: 28px 22px; }
  .fs-bar { bottom: 14px; right: 14px; }
  .inflation-bar { flex-direction: column; align-items: flex-start; gap: 8px; }
  .inflation-bar input[type=range] { width: 100%; }
}
@media (max-width: 420px) {
  .metric-grid { grid-template-columns: 1fr; }
  .highlight-grid { grid-template-columns: 1fr; }
}

/* ── SCROLLBAR ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--navy); }
::-webkit-scrollbar-thumb { background: var(--gray3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray2); }

/* ══════════════════════════════════════════════════════════
   LOGIN SCREEN  (was missing entirely)
   ══════════════════════════════════════════════════════════ */
#login-screen {
  position: fixed; inset: 0; background: var(--navy);
  display: flex; align-items: center; justify-content: center; z-index: 999;
}
.login-box {
  width: 400px; background: var(--navy2);
  border: 1px solid var(--border); border-radius: 16px;
  padding: 44px 40px 40px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}
.login-logo {
  font-family: var(--ff-display);
  font-size: calc(32px * var(--fs-scale)); font-weight: 700; color: var(--gold2); margin-bottom: 4px;
}
.login-tagline {
  font-size: calc(12px * var(--fs-scale)); color: var(--gray1); margin-bottom: 36px;
  letter-spacing: 0.04em; font-weight: 300;
}
.login-label {
  display: block; font-size: calc(11px * var(--fs-scale)); letter-spacing: 0.1em; font-weight: 500;
  color: var(--gray1); text-transform: uppercase; margin-bottom: 7px;
}
.login-input {
  display: block; width: 100%; background: var(--navy3);
  border: 1px solid var(--border); border-radius: 8px;
  color: var(--white); font-family: var(--ff-body); font-size: calc(14px * var(--fs-scale));
  padding: 11px 14px; outline: none; margin-bottom: 20px;
  transition: border-color 0.15s, background 0.15s;
}
.login-input:focus { border-color: var(--gold); background: var(--navy4); }
.login-btn {
  display: block; width: 100%; background: var(--gold); border: none;
  border-radius: 8px; color: var(--navy); font-family: var(--ff-body);
  font-weight: 600; font-size: calc(15px * var(--fs-scale)); padding: 12px; cursor: pointer;
  transition: background 0.15s, transform 0.1s; margin-top: 8px;
}
.login-btn:hover  { background: var(--gold2); }
.login-btn:active { transform: scale(0.99); }
.login-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.login-err {
  font-size: calc(13px * var(--fs-scale)); color: var(--red2); margin-top: 14px;
  min-height: 18px; text-align: center;
}

/* ══════════════════════════════════════════════════════════
   APP SHELL  (was missing)
   ══════════════════════════════════════════════════════════ */
#app-shell { display: none; height: 100vh; overflow: hidden; }
#app-shell.visible { display: flex; }

.main { flex: 1; overflow-y: auto; background: var(--navy); min-width: 0; }

/* ══════════════════════════════════════════════════════════
   SIDEBAR TOGGLE + OVERLAY  (mobile, was missing)
   ══════════════════════════════════════════════════════════ */
.sidebar-toggle {
  display: none; position: fixed; top: 14px; left: 14px; z-index: 300;
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--navy2); border: 1px solid var(--border);
  color: var(--gold2); font-size: calc(18px * var(--fs-scale)); cursor: pointer;
  align-items: center; justify-content: center;
}
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.6); z-index: 150; backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

/* ══════════════════════════════════════════════════════════
   FONT SIZE CONTROL BAR  (was missing)
   ══════════════════════════════════════════════════════════ */
.fs-bar {
  position: fixed; bottom: 20px; right: 20px; z-index: 200;
  background: var(--navy3); border: 1px solid var(--border);
  border-radius: 40px; padding: 6px 10px;
  display: flex; align-items: center; gap: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.fs-btn {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--navy2); border: 1px solid var(--border);
  color: var(--gold2); font-size: 18px; font-weight: 400;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; line-height: 1; font-family: var(--ff-body); padding: 0;
  flex-shrink: 0;
}
.fs-btn:hover { background: var(--navy4); border-color: var(--gold); }
.fs-label {
  font-size: 11px; color: var(--gray1); min-width: 34px;
  text-align: center; font-family: var(--ff-mono);
}

/* ══════════════════════════════════════════════════════════
   FLASH NOTIFICATION  (replaces .update-flash)
   ══════════════════════════════════════════════════════════ */
.flash {
  display: none; position: fixed; top: 18px; right: 18px;
  background: var(--navy3); border: 1px solid var(--gold);
  border-radius: 8px; padding: 9px 16px;
  font-size: calc(12px * var(--fs-scale)); color: var(--gold2); font-weight: 500;
  z-index: 999; pointer-events: none;
}
.flash.show { display: block; animation: slideIn 0.2s ease; }

/* ══════════════════════════════════════════════════════════
   TABLE ALIASES  (.dt / .dtw used by render.js)
   ══════════════════════════════════════════════════════════ */
.dtw { overflow-x: auto; border-radius: 10px; margin-bottom: 20px; border: 1px solid var(--border2); }
.dt  { width: 100%; border-collapse: collapse; font-size: calc(13px * var(--fs-scale)); }
.dt thead tr  { background: var(--navy3); }
.dt thead th  {
  padding: 11px 14px; text-align: left;
  font-size: calc(10px * var(--fs-scale)); letter-spacing: 0.08em; font-weight: 600;
  color: var(--gold); text-transform: uppercase;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.dt tbody tr  { border-bottom: 1px solid var(--border2); transition: background 0.12s; }
.dt tbody tr:last-child { border-bottom: none; }
.dt tbody tr:hover { background: var(--navy3); }
.dt tbody td  { padding: 10px 14px; color: var(--white2); vertical-align: middle; }
.dt tbody td:first-child { font-weight: 500; color: var(--white); }
.dt .tr-total td {
  background: var(--navy3); color: var(--gold2); font-weight: 600;
  border-top: 1px solid var(--border); border-bottom: none;
}
.dt .tr-section td {
  background: rgba(201,168,76,0.05); color: var(--gold);
  font-size: calc(10px * var(--fs-scale)); letter-spacing: 0.08em; text-transform: uppercase;
  font-weight: 600; padding: 7px 14px;
}
.neg { color: var(--red2)  !important; }
.pos { color: var(--green2) !important; }

/* ══════════════════════════════════════════════════════════
   COMPONENT ALIASES  (used by render.js)
   ══════════════════════════════════════════════════════════ */
/* .vest-tl = vesting timeline (render.js uses vest-tl not vesting-timeline) */
.vest-tl { display: flex; gap: 0; margin: 18px 0; position: relative; }
.vest-tl::before {
  content: ''; position: absolute; top: 22px; left: 30px; right: 30px;
  height: 2px; background: var(--border);
}
/* .hl-grid / .hl-card = highlight grid used in exec summary */
.hl-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(190px,1fr)); gap: 12px; margin-bottom: 24px; }
.hl-card { background: var(--navy2); border: 1px solid var(--border); border-radius: 10px; padding: 18px; }
.hl-icon  { font-size: calc(22px * var(--fs-scale)); margin-bottom: 9px; }
.hl-title { font-size: calc(13px * var(--fs-scale)); font-weight: 600; color: var(--white); margin-bottom: 4px; }
.hl-text  { font-size: calc(12px * var(--fs-scale)); color: var(--gray1); line-height: 1.5; }
/* .risk-mit = risk mitigation text (render.js uses .risk-mit not .risk-mitigation) */
.risk-mit { font-size: calc(12px * var(--fs-scale)); color: var(--gray1); }
/* .s-med = medium risk (render.js uses s-med not s-medium) */
.s-med { background: rgba(243,156,18,0.18); color: var(--amber); }
/* .inf-bar = inflation rate control bar */
.inf-bar {
  display: flex; align-items: center; gap: 12px;
  background: var(--navy2); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 18px; margin-bottom: 18px; flex-wrap: wrap;
}
.inf-bar label { font-size: calc(13px * var(--fs-scale)); color: var(--gray1); white-space: nowrap; }
.inf-bar input[type=range] { flex: 1; min-width: 100px; accent-color: var(--gold); cursor: pointer; }
.inf-val { font-family: var(--ff-mono); font-size: calc(15px * var(--fs-scale)); color: var(--gold2); font-weight: 500; min-width: 42px; }
/* Access denied page */
.access-denied {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; height: 60vh; gap: 16px; color: var(--gray1); text-align: center;
}
.access-denied .icon { font-size: calc(52px * var(--fs-scale)); opacity: 0.3; }
.access-denied h2   { font-family: var(--ff-display); font-size: calc(22px * var(--fs-scale)); color: var(--gray2); }
.access-denied p    { font-size: calc(13px * var(--fs-scale)); color: var(--gray2); }


/* ── OVERVIEW PAGE ─────────────────────────────────────── */
.ov-hero { background: linear-gradient(135deg, rgba(201,168,76,0.10), rgba(46,134,193,0.06)); border: 1px solid var(--bdr); border-radius: 12px; padding: 22px 26px; margin-bottom: 26px; }
.ov-hero p { font-size: calc(14px * var(--fs-scale)); line-height: 1.65; color: var(--white2); margin-bottom: 18px; max-width: 900px; }
.ov-hero strong { color: var(--gold2); }
.ov-stats { display: flex; gap: 14px; flex-wrap: wrap; }
.ov-stat { flex: 1 1 160px; background: var(--navy2); border: 1px solid var(--bdr2); border-radius: 10px; padding: 12px 16px; }
.ov-stat-n { font-family: var(--ffd); font-size: calc(26px * var(--fs-scale)); color: var(--gold2); line-height: 1.1; }
.ov-stat-l { font-size: calc(12px * var(--fs-scale)); color: var(--gray1); margin-top: 4px; line-height: 1.4; }
.ov-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.ov-card { display: flex; gap: 14px; background: var(--navy2); border: 1px solid var(--bdr2); border-left: 3px solid var(--gold); border-radius: 10px; padding: 14px 16px; }
.ov-card-icon { font-size: calc(22px * var(--fs-scale)); flex-shrink: 0; line-height: 1.2; }
.ov-card-title { font-size: calc(14px * var(--fs-scale)); font-weight: 600; color: var(--white); margin-bottom: 4px; }
.ov-card-text { font-size: calc(12.5px * var(--fs-scale)); color: var(--gray1); line-height: 1.55; }
.ov-who-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.ov-who { background: var(--navy2); border: 1px solid var(--bdr2); border-top: 3px solid var(--blue); border-radius: 10px; padding: 14px 16px; }
.ov-who-name { font-size: calc(13px * var(--fs-scale)); font-weight: 600; color: var(--blue2); margin-bottom: 6px; }
.ov-who-text { font-size: calc(12.5px * var(--fs-scale)); color: var(--gray1); line-height: 1.55; }
.ov-foot { font-size: calc(11.5px * var(--fs-scale)); color: var(--gray2); font-style: italic; margin-top: 6px; }
@media (max-width: 900px) {
  .ov-who-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .ov-grid, .ov-who-row { grid-template-columns: 1fr; }
  .ov-hero { padding: 16px; }
}
@media print {
  .sidebar, .fs-bar, .sidebar-toggle { display: none !important; }
  .main { margin: 0 !important; }
}
