/**
 * Design Tokens — Shipping IRR Engine
 *
 * Single source of truth for all visual primitives.
 * All component CSS should reference these variables — never hardcode
 * raw colour hex / pixel values in component files.
 *
 * Organised into layers:
 *   1. Primitive palette    — raw colours (not used directly in components)
 *   2. Semantic tokens      — contextual mappings consumed by components
 *   3. Spacing scale        — 4px base unit
 *   4. Typography scale
 *   5. Elevation / shadow scale
 *   6. Motion / animation
 */

:root {
  /* ── 1. Primitive Palette ────────────────────────────────────────── */

  /* Neutrals */
  --color-gray-0:   #ffffff;
  --color-gray-50:  #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2937;
  --color-gray-900: #111827;

  /* Brand — deep navy + teal accent */
  --color-navy-900: #0d1b2a;
  --color-navy-800: #122033;
  --color-navy-700: #1a2e47;
  --color-navy-600: #22395a;
  --color-navy-500: #2d4d78;

  --color-teal-300: #5eead4;
  --color-teal-400: #2dd4bf;
  --color-teal-500: #14b8a6;
  --color-teal-600: #0d9488;
  --color-teal-700: #0f766e;

  /* Semantic status */
  --color-green-50:  #f0fdf4;
  --color-green-200: #bbf7d0;
  --color-green-500: #22c55e;
  --color-green-600: #16a34a;
  --color-green-700: #15803d;

  --color-amber-50:  #fffbeb;
  --color-amber-200: #fde68a;
  --color-amber-500: #f59e0b;
  --color-amber-600: #d97706;

  --color-red-50:  #fef2f2;
  --color-red-200: #fecaca;
  --color-red-500: #ef4444;
  --color-red-600: #dc2626;
  --color-red-700: #b91c1c;

  --color-blue-50:  #eff6ff;
  --color-blue-200: #bfdbfe;
  --color-blue-500: #3b82f6;
  --color-blue-600: #2563eb;


  /* ── 2. Semantic Tokens ─────────────────────────────────────────── */

  /* Surfaces */
  --surface-base:       var(--color-navy-900);
  --surface-raised:     var(--color-navy-800);
  --surface-overlay:    var(--color-navy-700);
  --surface-border:     rgba(255,255,255,0.08);
  --surface-border-strong: rgba(255,255,255,0.18);

  /* Text */
  --text-primary:       rgba(255,255,255,0.92);
  --text-secondary:     rgba(255,255,255,0.60);
  --text-tertiary:      rgba(255,255,255,0.38);
  --text-on-accent:     #ffffff;
  --text-inverse:       var(--color-gray-900);

  /* Brand accent */
  --accent-primary:     var(--color-teal-500);
  --accent-primary-hover: var(--color-teal-400);
  --accent-primary-active: var(--color-teal-600);

  /* Status */
  --status-proceed:      var(--color-green-500);
  --status-proceed-bg:   rgba(34,197,94,0.12);
  --status-proceed-border: rgba(34,197,94,0.28);

  --status-conditional:  var(--color-amber-500);
  --status-conditional-bg: rgba(245,158,11,0.12);
  --status-conditional-border: rgba(245,158,11,0.28);

  --status-decline:      var(--color-red-500);
  --status-decline-bg:   rgba(239,68,68,0.12);
  --status-decline-border: rgba(239,68,68,0.28);

  --status-info:         var(--color-blue-500);
  --status-info-bg:      rgba(59,130,246,0.10);

  /* Confidence colours (provenance system) */
  --confidence-green:   var(--color-green-500);
  --confidence-green-bg: rgba(34,197,94,0.10);
  --confidence-amber:   var(--color-amber-500);
  --confidence-amber-bg: rgba(245,158,11,0.10);
  --confidence-red:     var(--color-red-500);
  --confidence-red-bg:  rgba(239,68,68,0.10);

  /* Interactive */
  --interactive-default: var(--color-navy-700);
  --interactive-hover:   var(--color-navy-600);
  --interactive-active:  var(--color-navy-500);
  --interactive-focus:   var(--color-teal-500);
  --focus-ring:          0 0 0 2px rgba(20,184,166,0.5);


  /* ── 3. Spacing Scale (4px base) ────────────────────────────────── */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;


  /* ── 4. Typography ──────────────────────────────────────────────── */
  --font-family-ui:   -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
  --font-family-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --font-family-data: 'Tabular', 'SF Mono', var(--font-family-mono);

  --font-size-xs:   10px;
  --font-size-sm:   11px;
  --font-size-base: 13px;
  --font-size-md:   14px;
  --font-size-lg:   16px;
  --font-size-xl:   20px;
  --font-size-2xl:  24px;
  --font-size-3xl:  30px;

  --font-weight-normal:   400;
  --font-weight-medium:   500;
  --font-weight-semibold: 600;
  --font-weight-bold:     700;

  --line-height-tight:  1.2;
  --line-height-snug:   1.4;
  --line-height-normal: 1.6;

  --letter-spacing-tight:  -0.02em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide:   0.04em;
  --letter-spacing-wider:  0.08em;
  --letter-spacing-widest: 0.12em;


  /* ── 5. Radii ────────────────────────────────────────────────────── */
  --radius-sm:  4px;
  --radius-md:  6px;
  --radius-lg:  8px;
  --radius-xl:  12px;
  --radius-full: 9999px;


  /* ── 6. Elevation / Shadows ─────────────────────────────────────── */
  --shadow-sm:  0 1px 2px rgba(0,0,0,0.3);
  --shadow-md:  0 2px 8px rgba(0,0,0,0.4);
  --shadow-lg:  0 4px 16px rgba(0,0,0,0.5);
  --shadow-xl:  0 8px 32px rgba(0,0,0,0.6);


  /* ── 7. Motion ───────────────────────────────────────────────────── */
  --duration-instant: 80ms;
  --duration-fast:    150ms;
  --duration-normal:  220ms;
  --duration-slow:    350ms;
  --ease-default:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:          cubic-bezier(0.4, 0, 1, 1);
  --ease-out:         cubic-bezier(0, 0, 0.2, 1);


  /* ── 8. Layout ────────────────────────────────────────────────────── */
  --topbar-height: 52px;
  --sidebar-default-width: 280px;
  --sidebar-min-width: 220px;
  --sidebar-max-width: 420px;
  --tab-bar-height: 42px;
  --irr-bar-height: 48px;
  --content-max-width: 1280px;
}


/* ── Utility classes based on tokens ────────────────────────────── */

.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary  { color: var(--text-tertiary); }
.text-accent    { color: var(--accent-primary); }

.text-xs   { font-size: var(--font-size-xs); }
.text-sm   { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-md   { font-size: var(--font-size-md); }
.text-lg   { font-size: var(--font-size-lg); }

.font-mono { font-family: var(--font-family-mono); }
.font-data { font-family: var(--font-family-data); letter-spacing: var(--letter-spacing-tight); }

.badge--proceed    { background: var(--status-proceed-bg);    color: var(--status-proceed);    border: 1px solid var(--status-proceed-border); }
.badge--conditional { background: var(--status-conditional-bg); color: var(--status-conditional); border: 1px solid var(--status-conditional-border); }
.badge--decline    { background: var(--status-decline-bg);    color: var(--status-decline);    border: 1px solid var(--status-decline-border); }

.confidence--green { color: var(--confidence-green); }
.confidence--amber { color: var(--confidence-amber); }
.confidence--red   { color: var(--confidence-red); }

/* Minimal reset — app styles live in App.css */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body, #root {
  width: 100%;
  height: 100%;
}

body {
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Shipping IRR Engine — Clean Light UI v3
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  /* ── Backgrounds ─────────────────────────────────────────────────────── */
  --bg-base:      #f0f2f5;
  --bg-surface:   #ffffff;
  --bg-card:      #ffffff;
  --bg-elevated:  #f5f7fa;
  --bg-input:     #f8f9fb;
  --bg-hover:     rgba(37, 99, 235, 0.06);
  --bg-glass:     rgba(255, 255, 255, 0.92);

  /* ── Borders ─────────────────────────────────────────────────────────── */
  --border:       #dde1e8;
  --border-accent: rgba(37, 99, 235, 0.30);
  --border-bright: #c5cbd6;

  /* ── Text ────────────────────────────────────────────────────────────── */
  --text:         #1a1f2e;
  --text-secondary: #475569;
  --text-muted:   #6b7a8d;
  --text-faint:   #a0aec0;

  /* ── Brand Accents ───────────────────────────────────────────────────── */
  --blue:         #2563eb;
  --blue-bright:  #1d4ed8;
  --blue-dim:     rgba(37, 99, 235, 0.08);
  --blue-glow:    rgba(37, 99, 235, 0.15);

  --green:        #059669;
  --green-bright: #047857;
  --green-dim:    rgba(5, 150, 105, 0.08);

  --red:          #dc2626;
  --red-dim:      rgba(220, 38, 38, 0.08);

  --amber:        #d97706;
  --amber-dim:    rgba(217, 119, 6, 0.08);

  --purple:       #7c3aed;
  --purple-dim:   rgba(124, 58, 237, 0.08);

  --teal:         #0d9488;
  --teal-dim:     rgba(13, 148, 136, 0.08);

  /* ── Shadows ─────────────────────────────────────────────────────────── */
  --shadow-sm:    0 1px 2px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:    0 2px 8px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.06);
  --shadow-lg:    0 4px 16px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.06);
  --shadow-glow:  0 0 12px rgba(37,99,235,0.10);

  /* ── Sizing ──────────────────────────────────────────────────────────── */
  --sidebar-width: 460px;
  --topbar-height: 58px;
  --radius:        10px;
  --radius-sm:     7px;
  --radius-xs:     4px;
}


/* ═══════════════════════════════════════════════════════════════════════════
   Dark Mode — applied via [data-theme="dark"] on <html>
   Also respects OS preference when no explicit choice is stored.
   ═══════════════════════════════════════════════════════════════════════════ */

[data-theme="dark"],
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    /* Backgrounds */
    --bg-base:      #0d0f17;
    --bg-surface:   #13161f;
    --bg-card:      #181b26;
    --bg-elevated:  #1e2130;
    --bg-input:     #13161f;
    --bg-hover:     rgba(99, 139, 235, 0.09);
    --bg-glass:     rgba(19, 22, 31, 0.93);

    /* Borders */
    --border:        #252840;
    --border-accent: rgba(99, 139, 235, 0.30);
    --border-bright: #323655;

    /* Text */
    --text:           #e4e8f4;
    --text-secondary: #8e9ab2;
    --text-muted:     #606a80;
    --text-faint:     #3e4560;

    /* Brand accents — slightly lighter for dark bg legibility */
    --blue:        #4f8ef7;
    --blue-bright: #3b82f6;
    --blue-dim:    rgba(79, 142, 247, 0.13);
    --blue-glow:   rgba(79, 142, 247, 0.22);

    --green:        #10b981;
    --green-bright: #059669;
    --green-dim:    rgba(16, 185, 129, 0.13);

    --red:     #f87171;
    --red-dim: rgba(248, 113, 113, 0.13);

    --amber:     #fbbf24;
    --amber-dim: rgba(251, 191, 36, 0.13);

    --purple:     #a78bfa;
    --purple-dim: rgba(167, 139, 250, 0.13);

    --teal:     #2dd4bf;
    --teal-dim: rgba(45, 212, 191, 0.13);

    /* Shadows — heavier on dark bg */
    --shadow-sm:   0 1px 3px rgba(0,0,0,0.40), 0 1px 2px rgba(0,0,0,0.30);
    --shadow-md:   0 2px 8px rgba(0,0,0,0.45), 0 1px 3px rgba(0,0,0,0.30);
    --shadow-lg:   0 4px 20px rgba(0,0,0,0.55), 0 2px 8px rgba(0,0,0,0.35);
    --shadow-glow: 0 0 14px rgba(79, 142, 247, 0.18);
  }
}

/* Explicit data-theme="dark" always wins (overrides media query) */
[data-theme="dark"] {
  --bg-base:      #0d0f17;
  --bg-surface:   #13161f;
  --bg-card:      #181b26;
  --bg-elevated:  #1e2130;
  --bg-input:     #13161f;
  --bg-hover:     rgba(99, 139, 235, 0.09);
  --bg-glass:     rgba(19, 22, 31, 0.93);

  --border:        #252840;
  --border-accent: rgba(99, 139, 235, 0.30);
  --border-bright: #323655;

  --text:           #e4e8f4;
  --text-secondary: #8e9ab2;
  --text-muted:     #606a80;
  --text-faint:     #3e4560;

  --blue:        #4f8ef7;
  --blue-bright: #3b82f6;
  --blue-dim:    rgba(79, 142, 247, 0.13);
  --blue-glow:   rgba(79, 142, 247, 0.22);

  --green:        #10b981;
  --green-bright: #059669;
  --green-dim:    rgba(16, 185, 129, 0.13);

  --red:     #f87171;
  --red-dim: rgba(248, 113, 113, 0.13);

  --amber:     #fbbf24;
  --amber-dim: rgba(251, 191, 36, 0.13);

  --purple:     #a78bfa;
  --purple-dim: rgba(167, 139, 250, 0.13);

  --teal:     #2dd4bf;
  --teal-dim: rgba(45, 212, 191, 0.13);

  --shadow-sm:   0 1px 3px rgba(0,0,0,0.40), 0 1px 2px rgba(0,0,0,0.30);
  --shadow-md:   0 2px 8px rgba(0,0,0,0.45), 0 1px 3px rgba(0,0,0,0.30);
  --shadow-lg:   0 4px 20px rgba(0,0,0,0.55), 0 2px 8px rgba(0,0,0,0.35);
  --shadow-glow: 0 0 14px rgba(79, 142, 247, 0.18);
}

/* Lock badge — sits inline in the group label when results aren't available */
.tab-group-lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 5px;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  pointer-events: none;
  opacity: 0.7;
  vertical-align: middle;
}

/* Theme toggle button animation */
.theme-toggle-icon {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s;
}
[data-theme="dark"] .theme-toggle-sun  { display: none; }
[data-theme="light"] .theme-toggle-moon { display: none; }
:root:not([data-theme]) .theme-toggle-moon { display: none; }

/* ─── Reset & Base ──────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg-base);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
  font-size: 13px;
}

/* ─── App Shell ─────────────────────────────────────────────────────────── */
.app { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

/* ─── Topbar ────────────────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-height);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  z-index: 50;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.topbar::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(37,99,235,0.15), transparent);
  pointer-events: none;
}

.topbar-left { display: flex; align-items: center; gap: 10px; }

.logo {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--blue-dim), rgba(37,99,235,0.04));
  border: 1px solid var(--border-accent);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--blue);
  flex-shrink: 0;
}
.logo svg { width: 16px; height: 16px; }

.topbar-brand h1 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text);
  line-height: 1.2;
}
.topbar-sub {
  font-size: 9.5px;
  color: #6b7a8d;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  font-weight: 600;
  display: block;
  margin-top: 1px;
}

.topbar-right { display: flex; align-items: center; gap: 10px; }

.topbar-badges { display: flex; gap: 5px; flex-wrap: wrap; }
.badge {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  letter-spacing: 0.1px;
}
.badge-accent {
  background: linear-gradient(135deg, rgba(5,150,105,0.10), rgba(5,150,105,0.05));
  border-color: rgba(5,150,105,0.30);
  color: var(--green);
  font-weight: 700;
}

.btn-run {
  display: flex; align-items: center; gap: 7px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  letter-spacing: 0.1px;
  box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}
.btn-run:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(37,99,235,0.30);
}
.btn-run:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(37,99,235,0.15); }
.btn-run:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-run svg { width: 12px; height: 12px; }

/* ─── Layout ────────────────────────────────────────────────────────────── */
.layout { display: flex; flex: 1; overflow: hidden; }

/* ─── Ultrawide cap: centre content at comfortable reading/working width ── */
.content-inner {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

/* Wide screens: give sidebar more breathing room, cap content column */
@media (min-width: 1800px) {
  .content { padding: 24px 40px; }
}
@media (min-width: 2200px) {
  .content { padding: 28px 60px; }
  .content-inner { max-width: 1600px; }
}

/* ─── Sidebar ───────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;   /* needed for resize handle positioning */
  flex-shrink: 0;       /* prevent layout engine from compressing it */
}

/* ── Sidebar collapsed state ── */
.sidebar.collapsed {
  width: 0 !important;
  min-width: 0 !important;
  overflow: hidden;
  border-right: none;
}
.sidebar.collapsed .sidebar-scroll { display: none; }
.sidebar.collapsed .sidebar-resize-handle { display: none; }

/* Sidebar header row — collapse toggle button */
.sidebar-header-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 4px 4px 2px;
}
.btn-sidebar-collapse {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 4px);
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.btn-sidebar-collapse:hover {
  background: var(--bg-hover, rgba(0,0,0,0.05));
  color: var(--text);
}

/* Expand button — shown only when sidebar is fully collapsed */
.sidebar-expand-btn {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 10px 6px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  transition: background 0.15s, color 0.15s;
}
.sidebar-expand-btn:hover {
  background: var(--bg-card);
  color: var(--text);
}

/* ── Input Overview tab layout ── */
.input-overview {
  padding: 20px;
  overflow-y: auto;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ov-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.ov-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px 16px;
  flex: 1;
  min-width: 260px;
  max-width: 420px;
}

.ov-card-wide {
  flex: 2;
  max-width: 600px;
}

.ov-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.ov-card-header h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  flex: 1;
}
.ov-card-icon {
  display: flex;
  align-items: center;
  color: var(--blue);
  flex-shrink: 0;
}
.ov-card-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-transform: capitalize;
  white-space: nowrap;
}

/* Drag-to-resize handle — sits flush against the right border */
.sidebar-resize-handle {
  position: absolute;
  top: 0;
  right: -3px;          /* straddles the border: 3px inside + 3px outside */
  width: 6px;
  height: 100%;
  cursor: col-resize;
  z-index: 20;
  background: transparent;
  transition: background 0.15s;
}
.sidebar-resize-handle:hover,
.sidebar-resize-handle:active {
  background: rgba(37, 99, 235, 0.18);
  border-right: 2px solid var(--blue-bright);
}
.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(37,99,235,0.20) transparent;
}
.sidebar-scroll::-webkit-scrollbar { width: 4px; }
.sidebar-scroll::-webkit-scrollbar-thumb {
  background: rgba(37,99,235,0.20);
  border-radius: 2px;
}
.sidebar-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(37,99,235,0.35);
}

/* Sidebar top header area — contains project name + import zone */
.sidebar-top-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px 12px;
  margin-bottom: 8px;
}

/* Project name */
.project-name-field { margin-bottom: 8px; }
.sidebar-top-card .vessel-import-zone { margin-bottom: 0; }
.project-name-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-bright);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  padding: 6px 0;
  outline: none;
  transition: border-color 0.2s;
  letter-spacing: -0.2px;
}
.project-name-input::placeholder { color: var(--text-muted); font-weight: 500; }
.project-name-input:focus { border-color: var(--blue); }

/* ── Sections ──────────────────────────────────────────────────────────── */
.section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 6px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.section:hover { border-color: var(--border-bright); }

.section-header {
  padding: 9px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}
.section-header:hover { background: var(--bg-hover); }

.section-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-secondary);
}
.section-icon { width: 14px; height: 14px; color: var(--text-muted); display: flex; }
.section-icon svg { width: 100%; height: 100%; }

.section-badge {
  background: var(--bg-elevated);
  border-radius: 10px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
}

.chevron { color: var(--text-muted); font-size: 11px; }
.section-body { padding: 12px 10px 14px; border-top: 1px solid var(--border); }

/* ── Form Grid ─────────────────────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.form-grid.compact { gap: 6px; }
/* Single-column variant for dense sections */
.form-grid.single { grid-template-columns: 1fr; }

.field { display: flex; flex-direction: column; gap: 4px; }
.field.full  { grid-column: 1 / -1; }
.field.wide  { grid-column: 1 / -1; }   /* alias */
/* Force a field to span 2 cols even when not .full */
.field.span2 { grid-column: span 2; }

.field label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  /* Allow wrapping so long labels don't get ellipsis-clipped in narrow columns */
  white-space: normal;
  line-height: 1.3;
  word-break: break-word;
}

.field-input-wrap {
  display: flex;
  align-items: stretch;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
  min-height: 32px;
}
.field-input-wrap:focus-within {
  border-color: var(--blue-bright);
  box-shadow: 0 0 0 2px rgba(37,99,235,0.12);
}

.field-input-wrap.highlighted,
.field.autofill .field-input-wrap {
  border-color: rgba(217,119,6,0.5);
  box-shadow: 0 0 0 2px rgba(217,119,6,0.10);
}
.field.autofill > label { color: var(--amber); }

.field-input-wrap input,
.field-input-wrap select {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  padding: 0 8px;
  height: 32px;
  color: var(--text);
  font-size: 12.5px;
  outline: none;
  font-family: inherit;
  line-height: 32px;   /* vertically centres text in all browsers */
}
.field-input-wrap select {
  cursor: pointer;
  /* selects need explicit height to match inputs in all browsers */
  height: 32px;
  padding: 0 6px;
  appearance: auto;
}
.field-input-wrap input[type="number"]  { -moz-appearance: textfield; }
.field-input-wrap input[type="number"]::-webkit-inner-spin-button { opacity: 0; }
/* Date inputs: reserve space for the calendar icon */
.field-input-wrap input[type="date"] {
  padding-right: 6px;
  font-size: 12px;
  line-height: normal;  /* date inputs need this for proper rendering */
}

.field-affix {
  display: flex;
  align-items: center;
  padding: 0 7px;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  user-select: none;
  background: rgba(0,0,0,0.02);
  border-left: 1px solid var(--border);
  flex-shrink: 0;
}
.field-affix.prefix {
  border-left: none;
  border-right: 1px solid var(--border);
  padding: 0 8px;
}

/* Sub-sections */
.sub-section { margin-top: 12px; }
.sub-section:first-child { margin-top: 0; }
.sub-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--border);
}
.sub-section-header span {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* TC / Survey cards */
.tc-card {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px 12px;
  margin-bottom: 8px;
  transition: border-color 0.15s;
}
.tc-card:hover { border-color: var(--border-bright); }
.tc-card:last-of-type { margin-bottom: 0; }
.tc-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--border);
}
/* Card type indicator stripe */
.tc-card-type-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--blue-bright);
  flex-shrink: 0;
}
.tc-card-type-dot.survey { background: #8b5cf6; }
.tc-name-input {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  outline: none;
  flex: 1;
  min-width: 0;
  padding: 0;
}
.tc-name-input::placeholder { color: var(--text-muted); font-weight: 400; }
/* Survey/TC row layouts */
.tc-row {
  display: grid;
  grid-template-columns: 1fr;   /* default: single column, full width */
  gap: 6px;
}
.tc-row.two   { grid-template-columns: 1fr 1fr; }
.tc-row.three { grid-template-columns: 1fr 1fr 1fr; }
.tc-row + .tc-row { margin-top: 6px; }
/* inside tc-row, .full class has no extra effect (already 1 col) */
.tc-row .field.full { grid-column: auto; }

.btn-icon-sm {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.btn-icon-sm:hover { background: var(--red-dim); color: var(--red); border-color: rgba(220,38,38,0.25); }
.btn-icon-sm svg { width: 13px; height: 13px; }

/* Add buttons */
.btn-add {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  background: transparent;
  border: 1px dashed var(--border-bright);
  border-radius: var(--radius-sm);
  padding: 7px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  margin-top: 7px;
  letter-spacing: 0.2px;
}
.btn-add:hover { border-color: var(--blue-bright); color: var(--blue); background: var(--blue-dim); }
.btn-add svg { width: 12px; height: 12px; }

.btn-add-sm {
  display: flex; align-items: center; gap: 4px;
  background: transparent; border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 0;
  transition: color 0.15s;
}
.btn-add-sm:hover { color: var(--blue); }
.btn-add-sm svg { width: 11px; height: 11px; }

/* Rate curve */
.rate-curve { display: flex; flex-direction: column; gap: 4px; }
.rate-row { display: flex; align-items: center; gap: 7px; }
.rate-year { font-size: 11px; font-weight: 700; color: var(--text-secondary); min-width: 38px; }
.rate-row input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 7px;
  color: var(--text);
  font-size: 11px;
  outline: none;
  font-family: inherit;
}
.rate-row input:focus { border-color: var(--blue); }
.rate-pct { font-size: 10.5px; color: var(--text-muted); min-width: 44px; text-align: right; }

/* Info row */
.info-row {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  background: rgba(0,0,0,0.02);
  border: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.6;
  word-break: break-word;
}
.info-row strong { color: var(--text-secondary); font-weight: 600; }
/* Pipe separator for multi-stat info rows */
.info-row .sep { margin: 0 5px; opacity: 0.35; }

/* Toggle */
.toggle-label {
  display: flex; align-items: center; gap: 7px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-secondary);
}
.toggle-label input[type="checkbox"] {
  width: 13px; height: 13px;
  accent-color: var(--blue);
}

/* ─── Main Content ──────────────────────────────────────────────────────── */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(37,99,235,0.20) transparent;
}
.content::-webkit-scrollbar { width: 4px; }
.content::-webkit-scrollbar-thumb { background: rgba(37,99,235,0.20); border-radius: 2px; }

/* Error banner */
.error-banner {
  background: var(--red-dim);
  border: 1px solid rgba(220,38,38,0.25);
  border-radius: var(--radius);
  padding: 11px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.error-banner button {
  background: transparent; border: none;
  color: var(--red); font-size: 17px; cursor: pointer; opacity: 0.8;
}
.error-banner button:hover { opacity: 1; }

/* ─── Empty State ───────────────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 40px;
  text-align: center;
  gap: 0;
}

.empty-hero {
  position: relative;
  margin-bottom: 28px;
}
.empty-icon-ring {
  width: 88px; height: 88px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--blue-dim), rgba(37,99,235,0.03));
  border: 1px solid var(--border-accent);
  display: flex; align-items: center; justify-content: center;
  color: var(--blue);
  box-shadow: var(--shadow-glow);
  position: relative;
  z-index: 1;
}
.empty-icon-ring svg { width: 40px; height: 40px; }
.empty-icon-ring::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 30px;
  border: 1px solid rgba(37,99,235,0.12);
  z-index: 0;
}

.empty-state h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
  color: var(--text);
}
.empty-state p {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 380px;
  margin-bottom: 28px;
  line-height: 1.65;
}

.empty-features {
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
  flex-wrap: wrap;
  justify-content: center;
}
.empty-feature-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
}
.empty-feature-chip-dot {
  width: 6px; height: 6px; border-radius: 50%;
}

.btn-run-lg {
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 12px 32px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.1px;
  box-shadow: 0 4px 16px rgba(37,99,235,0.25);
}
.btn-run-lg:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37,99,235,0.30);
}
.btn-run-lg svg { width: 16px; height: 16px; }

/* Loading state */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 16px;
  color: var(--text-muted);
}
.loading-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.2px;
}

/* Spinners */
.spinner-sm {
  width: 13px; height: 13px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
.spinner-lg {
  width: 38px; height: 38px;
  border: 3px solid var(--border-bright);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── IRR Mode Bar (persistent strip above tabs) ───────────────────────── */
.irr-mode-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius);
  padding: 10px 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.irr-mode-bar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--blue-bright), var(--green), transparent);
  opacity: 0.5;
}

.irr-mode-bar-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted);
  white-space: nowrap;
  padding-right: 4px;
  border-right: 1px solid var(--border);
  margin-right: 4px;
}

.irr-mode-bar-buttons {
  display: flex;
  gap: 6px;
}

.irr-bar-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.irr-bar-btn:hover {
  border-color: var(--blue-bright);
  background: var(--blue-dim);
}
.irr-bar-btn.active {
  border-color: rgba(37,99,235,0.55);
  background: rgba(37,99,235,0.12);
  box-shadow: 0 0 0 1px rgba(37,99,235,0.2);
}
.irr-bar-btn.green:hover { border-color: var(--green); background: var(--green-dim); }
.irr-bar-btn.green.active {
  border-color: rgba(5,150,105,0.55);
  background: rgba(5,150,105,0.12);
  box-shadow: 0 0 0 1px rgba(5,150,105,0.2);
}

.irr-bar-btn-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}
.irr-bar-btn.active .irr-bar-btn-name { color: var(--blue-bright); }
.irr-bar-btn.green.active .irr-bar-btn-name { color: var(--green); }

.irr-bar-btn-irr {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.irr-bar-btn.active .irr-bar-btn-irr { color: var(--blue-bright); }
.irr-bar-btn.green.active .irr-bar-btn-irr { color: var(--green); }

.irr-bar-delta {
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.5px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
}
.irr-bar-delta.positive { background: var(--green-dim); color: var(--green); border: 1px solid rgba(5,150,105,0.25); }
.irr-bar-delta.negative { background: var(--red-dim); color: var(--red); border: 1px solid rgba(220,38,38,0.2); }

.irr-bar-commentary {
  flex: 1;
  min-width: 200px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.6;
  padding-left: 12px;
  border-left: 1px solid var(--border);
}

/* ─── Tab Bar ───────────────────────────────────────────────────────────── */
/* ── Full-width navigation strip ────────────────────────────────────────── */
.nav-strip {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-strip::-webkit-scrollbar { display: none; }

.tab-bar {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0 16px;
  width: 100%;
  position: static;
}

/* ── Tab group: two-row column (label on top, buttons below) ───────────── */
.tab-group {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
/* Separator between groups — thin vertical rule with spacing */
.tab-group + .tab-group {
  border-left: 1px solid var(--border);
  margin-left: 6px;
  padding-left: 6px;
}

/* Section label — row 1: tiny, centered, purely descriptive header.
   Visually impossible to confuse with a button: no hover, no cursor, muted. */
.tab-group-label {
  display: block;
  text-align: center;
  font-size: 8.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--text-faint);
  opacity: 0.45;
  padding: 5px 6px 2px;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
  line-height: 1;
}

/* Tab buttons row — row 2: the actual clickable tabs */
.tab-group-tabs {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  height: 36px;
}

/* Tab buttons — underline indicator style, no pill/card */
.tab-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  height: 100%;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s, background 0.12s, opacity 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
}
.tab-btn:hover { color: var(--text); background: rgba(37,99,235,0.04); }
.tab-btn.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
  font-weight: 600;
  background: transparent;
}

/* ── Results tabs: locked state when no analysis has been run ────────────
   Tabs appear dimmed + cursor is default until results arrive.
   On unlock, a subtle pop animation draws the eye. */
.tab-btn.results-locked {
  opacity: 0.38;
  cursor: default;
  color: var(--text-faint);
}
.tab-btn.results-locked:hover {
  background: transparent;
  color: var(--text-faint);
}
.tab-btn.results-unlocked {
  animation: tab-unlock 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes tab-unlock {
  0%   { opacity: 0.38; transform: translateY(3px) scale(0.97); }
  60%  { opacity: 1;    transform: translateY(-1px) scale(1.01); }
  100% { opacity: 1;    transform: translateY(0) scale(1); }
}

.tab-icon { width: 12px; height: 12px; display: flex; flex-shrink: 0; }
.tab-icon svg { width: 100%; height: 100%; }

/* Tab badge (e.g. narrative ✓) */
.tab-badge-dot {
  font-size: 9px;
  color: var(--green);
  line-height: 1;
}

/* Legacy divider — kept for compat, hidden */
.tab-bar-divider { display: none; }

/* ─── KPI Row ───────────────────────────────────────────────────────────── */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.kpi {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  border-left: 3px solid var(--kpi-color, var(--blue));
  position: relative;
  overflow: hidden;
  transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s, background 0.18s;
  cursor: pointer;
}
.kpi::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(var(--kpi-r,79),var(--kpi-g,156),var(--kpi-b,249),0.04), transparent 60%);
  pointer-events: none;
  transition: opacity 0.18s;
}
.kpi:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08), 0 0 0 1px var(--kpi-color, var(--blue));
  border-color: var(--kpi-color, var(--blue));
  background: var(--bg-elevated);
}
.kpi:hover::before { opacity: 3; }
.kpi:active { transform: translateY(0) scale(0.99); }

/* Tooltip shown on hover for KPI context */
.kpi-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elevated);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  z-index: 100;
  pointer-events: none;
  box-shadow: var(--shadow-md);
}
.kpi:hover .kpi-tooltip { display: block; }

.kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.kpi-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.kpi-icon { width: 15px; height: 15px; color: var(--text-faint); }
.kpi-icon svg { width: 100%; height: 100%; }
.kpi-value {
  font-size: 24px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--kpi-color, var(--text));
  line-height: 1.15;
  letter-spacing: -0.5px;
}
.kpi-sub {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* Small KPIs */
.kpi-row-sm {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 7px;
  margin-bottom: 14px;
}
.kpi-sm {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.kpi-sm-label { font-size: 9.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; font-weight: 600; display: block; margin-bottom: 3px; }
.kpi-sm-value { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ─── Charts ────────────────────────────────────────────────────────────── */
.chart-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: border-color 0.2s;
}
.chart-card:hover { border-color: var(--border-bright); }
.chart-card h3 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
  letter-spacing: -0.2px;
}

/* ─── Cards ─────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}
.card h3 {
  padding: 13px 16px;
  font-size: 13px;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  letter-spacing: -0.2px;
}
.card-desc { padding: 0 16px 10px; font-size: 11px; color: var(--text-muted); }
.card-header-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}
.card-header-row h3 { padding: 0; border: none; }

.toggle-group {
  display: flex; gap: 2px;
  background: var(--bg-base);
  border-radius: var(--radius-sm);
  padding: 2px;
}
.toggle-group button {
  padding: 4px 11px;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.toggle-group button:hover { color: var(--text); }
.toggle-group button.active {
  background: var(--bg-card);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* ─── Tables ────────────────────────────────────────────────────────────── */
.table-scroll { overflow-x: auto; }

.cf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.cf-table.compact { font-size: 11px; }

.cf-table thead th {
  background: var(--bg-elevated);
  padding: 8px 11px;
  text-align: right;
  font-weight: 700;
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 1;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.cf-table thead th:first-child { text-align: left; }

.cf-table tbody td {
  padding: 6px 11px;
  text-align: right;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  white-space: nowrap;
}
.cf-table tbody td:first-child { text-align: left; color: var(--text-secondary); }
.cf-table tbody td.negative { color: var(--red); }
.cf-table tbody td.positive { color: var(--green); }
.cf-table tbody tr:hover td { background: var(--bg-hover); }

.cf-table .sticky-col {
  position: sticky; left: 0;
  background: var(--bg-card); z-index: 1;
  font-weight: 500; min-width: 160px;
}
.cf-table thead .sticky-col { background: var(--bg-elevated); z-index: 2; }
.cf-table .total-col { background: var(--bg-elevated); font-weight: 700; }
.cf-table .section-row td {
  padding: 9px 11px 3px;
  font-size: 9.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-muted); border-bottom: none;
  background: var(--bg-card);
}
.cf-table .subtotal-row td { font-weight: 700; background: rgba(37,99,235,0.03); }
.cf-table .highlight-row td { background: rgba(217,119,6,0.06); }

/* ─── Heatmap ───────────────────────────────────────────────────────────── */
.heatmap {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.heatmap th, .heatmap td {
  padding: 9px 13px;
  text-align: center;
  border: 1px solid var(--border);
}
.heatmap thead th {
  background: var(--bg-elevated);
  font-weight: 700; font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.4px;
}
.heatmap .hm-label {
  text-align: left; font-weight: 700;
  color: var(--text-secondary); background: var(--bg-elevated);
}
.heatmap td { font-weight: 600; font-size: 11.5px; transition: all 0.15s; }
.heatmap td.hm-pos   { background: rgba(5,150,105,0.12); color: var(--green); }
.heatmap td.hm-high  { background: rgba(5,150,105,0.18); color: #047857; }
.heatmap td.hm-neg   { background: var(--red-dim); color: var(--red); }
.heatmap td.hm-base  {
  background: var(--blue-dim); color: var(--blue-bright);
  border: 2px solid var(--blue-bright); font-weight: 800;
}

/* ─── Dashboard ─────────────────────────────────────────────────────────── */
.dashboard { display: flex; flex-direction: column; gap: 0; }

/* ─── IRR Mode Panel ────────────────────────────────────────────────────── */
.irr-mode-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: 0 0 0 1px rgba(37,99,235,0.08), var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.irr-mode-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--blue-bright), var(--green), transparent);
  opacity: 0.6;
}

.irr-mode-panel-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.irr-mode-toggle {
  display: flex;
  align-items: stretch;
  gap: 10px;
  flex-wrap: wrap;
}

.irr-mode-btn {
  flex: 1;
  min-width: 190px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.irr-mode-btn:hover {
  border-color: var(--border-bright);
  background: rgba(0,0,0,0.03);
  transform: translateY(-1px);
}
.irr-mode-btn.active {
  border-color: rgba(37,99,235,0.5);
  background: rgba(37,99,235,0.08);
  box-shadow: 0 0 0 1px rgba(37,99,235,0.15), inset 0 1px 0 rgba(37,99,235,0.1);
}
.irr-mode-btn.active.active-green {
  border-color: rgba(5,150,105,0.5);
  background: rgba(5,150,105,0.08);
  box-shadow: 0 0 0 1px rgba(5,150,105,0.15), inset 0 1px 0 rgba(5,150,105,0.1);
}
.irr-mode-btn-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.irr-mode-btn.active .irr-mode-btn-label { color: var(--blue-bright); }
.irr-mode-btn.active.active-green .irr-mode-btn-label { color: var(--green); }

.irr-mode-btn-irr {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
.irr-mode-btn.active .irr-mode-btn-irr { color: var(--blue-bright); }
.irr-mode-btn.active.active-green .irr-mode-btn-irr { color: var(--green); }
.irr-mode-btn-sub { font-size: 10px; color: var(--text-muted); margin-top: 1px; }

.irr-delta-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 22px;
  font-weight: 800;
  min-width: 90px;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
}
.irr-delta-pill.positive {
  background: rgba(5,150,105,0.10);
  color: var(--green);
  border: 1px solid rgba(5,150,105,0.3);
}
.irr-delta-pill.negative {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(220,38,38,0.25);
}

.irr-mode-commentary {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(37,99,235,0.05);
  border: 1px solid rgba(37,99,235,0.12);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.65;
}
.irr-mode-commentary-icon { color: var(--blue); flex-shrink: 0; margin-top: 2px; }

/* ─── Contract Timeline ─────────────────────────────────────────────────── */
.contract-timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.contract-timeline-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.contract-timeline-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.1px;
}
.contract-timeline-legend {
  display: flex; align-items: center; gap: 6px;
  font-size: 10.5px; color: var(--text-muted);
}
.tl-legend-dot {
  width: 8px; height: 8px; border-radius: 2px; display: inline-block;
}
.tl-legend-dot.tl-tc   { background: var(--green); opacity: 0.85; }
.tl-legend-dot.tl-spot { background: var(--amber); opacity: 0.75; }

.contract-timeline-bar {
  display: flex;
  height: 40px;
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.tl-segment {
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  transition: opacity 0.15s;
  cursor: default;
}
.tl-segment:hover { opacity: 0.85; }
.tl-segment-tc   { background: rgba(5,150,105,0.20); border-right: 1px solid rgba(5,150,105,0.35); }
.tl-segment-spot { background: rgba(217,119,6,0.15); border-right: 1px solid rgba(217,119,6,0.25); }
.tl-segment:last-child { border-right: none; }

.tl-segment-label {
  font-size: 9.5px; font-weight: 700;
  text-align: center; color: var(--text);
  padding: 0 4px; line-height: 1.4;
  pointer-events: none; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}

.contract-timeline-dates {
  display: flex; position: relative;
  margin-top: 4px; height: 16px;
}
.tl-date-label { display: flex; overflow: visible; flex-shrink: 0; }
.tl-date-start { font-size: 9.5px; color: var(--text-muted); white-space: nowrap; }
.tl-date-end { position: absolute; right: 0; font-size: 9.5px; color: var(--text-muted); white-space: nowrap; }

.contract-timeline-chips {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: 9px;
}
.tl-chip {
  display: flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 20px;
  font-size: 10.5px; border: 1px solid;
}
.tl-chip-tc   { background: rgba(5,150,105,0.10); border-color: rgba(5,150,105,0.25); color: var(--green); }
.tl-chip-spot { background: rgba(217,119,6,0.10); border-color: rgba(217,119,6,0.25); color: var(--amber); }
.tl-chip-name { font-weight: 700; }
.tl-chip-rate { opacity: 0.85; }
.tl-chip-duration { opacity: 0.7; }
.tl-chip-lock { font-size: 9px; }

/* ─── Vessel Import Zone ────────────────────────────────────────────────── */
.vessel-import-zone {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
  padding: 8px 10px;
  border: 1.5px dashed var(--border-accent);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  cursor: default;
  transition: all 0.15s;
  user-select: none;
}
.vessel-import-zone.dragging {
  border-color: var(--blue-bright);
  background: var(--blue-dim);
  color: var(--blue-bright);
  box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
}
.vessel-import-zone.loading { opacity: 0.7; }

.import-browse-btn {
  margin-left: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-xs);
  padding: 2px 9px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.import-browse-btn:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-dim); }

.import-error {
  background: var(--red-dim);
  border: 1px solid rgba(220,38,38,0.2);
  border-radius: var(--radius-xs);
  padding: 6px 10px;
  font-size: 11px;
  color: var(--red);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.import-success {
  background: rgba(5,150,105,0.08);
  border: 1px solid rgba(5,150,105,0.2);
  border-radius: var(--radius-xs);
  padding: 6px 10px;
  font-size: 11px;
  color: var(--green);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ─── Tab Badge ─────────────────────────────────────────────────────────── */
.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green);
  color: #000;
  font-size: 9px;
  font-weight: 700;
  border-radius: 9px;
  padding: 1px 5px;
  margin-left: 5px;
  line-height: 1.4;
}

/* ─── Sanity Warning Banner ──────────────────────────────────────────────── */
.sanity-banner {
  background: rgba(217,119,6,0.06);
  border: 1px solid var(--amber);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 16px;
}
.sanity-banner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
}
.sanity-risk-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 20px;
  color: #000;
}
.sanity-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sanity-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.sanity-icon { flex-shrink: 0; width: 14px; }
.sanity-cat  { color: var(--text-muted); font-size: 11px; flex-shrink: 0; }
.sanity-item.sanity-error   { color: var(--red); }
.sanity-item.sanity-warning { color: var(--amber); }

/* ─── Narrative Tab ──────────────────────────────────────────────────────── */
.narrative-tab {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 4px 0 24px;
  /* Full page width — no max-width constraint */
}
.narrative-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.narrative-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.narrative-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}
.narrative-irr-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.narrative-irr-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.narrative-irr-value { font-size: 28px; font-weight: 700; color: var(--green); line-height: 1; }
.narrative-moic-value { font-size: 14px; color: var(--amber); }

/* Metrics grid */
.narrative-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.narrative-metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 2px solid transparent;
}
.narrative-metric-green  { border-top-color: var(--green); }
.narrative-metric-blue   { border-top-color: var(--blue); }
.narrative-metric-amber  { border-top-color: var(--amber); }
.narrative-metric-purple { border-top-color: var(--purple); }
.narrative-metric-teal   { border-top-color: var(--teal); }
.narrative-metric-red    { border-top-color: var(--red); }
.nm-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.nm-value { font-size: 17px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }

/* Body text */
.narrative-body {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.narrative-para {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}
.narrative-para-risk {
  color: var(--amber);
  background: rgba(217,119,6,0.05);
  border-left: 3px solid var(--amber);
  padding-left: 12px;
  border-radius: 0 4px 4px 0;
}

/* Section titles */
.narrative-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* Risk items */
.narrative-risk-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
}
.narrative-risk-items { display: flex; flex-wrap: wrap; gap: 10px; }
.narrative-risk-item {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid;
  border-radius: var(--radius-xs);
  padding: 6px 12px;
  font-size: 12px;
}
.nri-label { font-weight: 600; }
.nri-value { color: var(--text-muted); }

/* Assumptions */
.narrative-assumptions {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
}
.narrative-assumption-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.narrative-assumption-row:last-child { border-bottom: none; }
.na-label { color: var(--text-muted); }
.na-value { font-weight: 600; color: var(--text-primary); }

/* ─── Derived / Auto-computed value indicators ────────────────────────── */

/* Small muted text shown below a field when its value is derived/auto-computed */
.derived-hint {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 2px;
}

/* Inline badges: "Auto" (green) / "Manual" (amber) */
.derived-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.6;
  flex-shrink: 0;
}
.derived-badge.auto {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(5, 150, 105, 0.3);
}
.derived-badge.override {
  background: var(--amber-dim);
  color: var(--amber);
  border: 1px solid rgba(217, 119, 6, 0.3);
}

/* Small auto-sync badge shown in field labels (e.g. "Maturity ⟳ auto") */
.sync-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 700;
  text-transform: lowercase;
  letter-spacing: 0.02em;
  background: var(--blue-dim);
  color: var(--blue);
  border: 1px solid var(--border-accent);
}

/* Button to clear a manual override and revert to auto-computed value */
.btn-clear-override {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 10px;
  color: var(--text-muted);
  padding: 2px 4px;
  border-radius: 4px;
  font-family: inherit;
  transition: color 0.15s, background 0.15s;
}
.btn-clear-override:hover {
  background: var(--bg-elevated);
  color: var(--blue);
}

/* ─── LTV equity labels (Debt Structure card) ───────────────────────────── */
.ltv-equity-bar {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
  gap: 2px;
}
.ltv-equity-bar-debt   { background: #64748b; border-radius: 4px 0 0 4px; transition: width 0.2s; }
.ltv-equity-bar-equity { background: #2563eb; border-radius: 0 4px 4px 0; flex: 1; transition: width 0.2s; }
.ltv-equity-labels {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.ltv-equity-labels span { white-space: nowrap; }

/* ─── LTV / Utilization Sliders ─────────────────────────────────────────── */

.ltv-slider-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0 2px;
}

.ltv-slider-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 48px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Range input styles */
/* ═══════════════════════════════════════════════════════════════════════════
   Enhanced form components — FormField, Section, InputCard
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Field validation states ── */
.field.has-error .field-input-wrap {
  border-color: var(--red);
  box-shadow: 0 0 0 2px rgba(220,38,38,0.10);
}
.field.has-warning .field-input-wrap {
  border-color: var(--amber);
  box-shadow: 0 0 0 2px rgba(217,119,6,0.10);
}
.field.has-error > label  { color: var(--red); }
.field.has-warning > label { color: var(--amber); }

/* ── Field hint / helper / error text ── */
.field-hint {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 2px;
}
.field-hint-error {
  color: var(--red);
  font-weight: 500;
}
.field-hint-warning {
  color: var(--amber);
  font-weight: 500;
}

/* ── Required asterisk ── */
.field-required {
  color: var(--red);
  font-weight: 700;
  margin-left: 1px;
}

/* ── Section title layout with description ── */
.section-title-block {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.section-name {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-secondary);
}
.section-desc {
  font-size: 10px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-muted);
  line-height: 1.3;
}

/* ── Section status left-border ── */
.section-status-ok    { border-left: 3px solid var(--green); }
.section-status-warn  { border-left: 3px solid var(--amber); }
.section-status-error { border-left: 3px solid var(--red); }

/* ═══════════════════════════════════════════════════════════════════════════
   InputCard — for the Input Overview tab
   ═══════════════════════════════════════════════════════════════════════════ */
.icard {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.icard:hover { border-color: var(--border-bright); }

.icard-status-ok    { border-left: 3px solid var(--green); }
.icard-status-warn  { border-left: 3px solid var(--amber); }
.icard-status-error { border-left: 3px solid var(--red); }

.icard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}
.icard-header-left {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.icard-icon {
  width: 18px;
  height: 18px;
  color: var(--blue);
  flex-shrink: 0;
  margin-top: 2px;
  display: flex;
  align-items: center;
}
.icard-icon svg { width: 100%; height: 100%; }

.icard-title-group { flex: 1; min-width: 0; }
.icard-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 3px;
  letter-spacing: -0.1px;
}
.icard-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.45;
}

.icard-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.icard-metric {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
  white-space: nowrap;
}
.icard-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
  text-transform: capitalize;
}

.icard-body {
  padding: 14px 16px;
  flex: 1;
}
.icard-body.no-pad { padding: 0; }

.icard-footer {
  border-top: 1px solid var(--border);
  padding: 8px 16px;
  background: var(--bg-elevated);
}
.icard-info-row {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}
.icard-info-row strong { color: var(--text-secondary); }

/* ═══════════════════════════════════════════════════════════════════════════
   Input Overview page layout
   ═══════════════════════════════════════════════════════════════════════════ */
.ov-page {
  padding: 16px 20px 24px;
  overflow-y: auto;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--bg-base);
}

/* ── Summary metrics bar ── */
.ov-summary-bar {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  flex-wrap: wrap;
  row-gap: 8px;
  box-shadow: var(--shadow-sm);
}
.ov-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 16px;
}
.ov-stat:first-child { padding-left: 0; }
.ov-stat-divider {
  width: 1px;
  height: 28px;
  background: var(--border);
  flex-shrink: 0;
}
.ov-stat-label {
  font-size: 9.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.ov-stat-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.ov-stat-green { color: var(--green); }
.ov-stat-red   { color: var(--red);   }

/* ── Card grid ── */
.ov-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: start;
}
.ov-grid-2col {
  grid-template-columns: repeat(2, 1fr);
}

/* Stacked container (two cards vertically) */
.ov-stacked {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Responsive: collapse to 2-col below ~1100px, 1-col below ~700px */
@media (max-width: 1100px) {
  .ov-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .ov-grid,
  .ov-grid-2col { grid-template-columns: 1fr; }
  .ov-summary-bar { flex-direction: column; align-items: flex-start; }
  .ov-stat-divider { display: none; }
  .ov-stat { padding: 0; }
}


/* ═══════════════════════════════════════════════════════════════════════════
   Compact Sidebar — CGroup / CRow inline field layout
   ═══════════════════════════════════════════════════════════════════════════ */

.compact-sidebar {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--bg-surface);
}

/* Header: project name + collapse button */
.cl-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px 6px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.cl-project-name {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0;
}
.cl-project-name::placeholder { color: var(--text-muted); font-weight: 400; }
.cl-collapse-btn {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
  font-size: 15px;
  line-height: 1;
  transition: background 0.12s, color 0.12s;
  flex-shrink: 0;
}
.cl-collapse-btn:hover { background: var(--bg-elevated); color: var(--text); border-color: var(--border); }

/* Compact file import hint */
.cl-import {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  font-size: 10.5px;
  color: var(--text-muted);
  background: var(--bg-input);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.12s, color 0.12s;
  user-select: none;
}
.cl-import:hover { background: var(--blue-dim); color: var(--blue); }
.cl-import.dragging { background: var(--blue-dim); color: var(--blue-bright); }
.cl-import.loading  { opacity: 0.65; }

/* Status strip: import error / success */
.cl-status-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 4px 10px;
  font-size: 10px;
  flex-shrink: 0;
}
.cl-status-strip.error  { background: var(--red-dim);   color: var(--red);   }
.cl-status-strip.ok     { background: var(--green-dim); color: var(--green); }
.cl-status-strip button {
  background: none; border: none; cursor: pointer;
  color: inherit; opacity: 0.6; font-size: 11px; padding: 0;
}

/* Collapsible groups */
.cl-groups {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(37,99,235,0.12) transparent;
}
.cl-groups::-webkit-scrollbar { width: 3px; }
.cl-groups::-webkit-scrollbar-thumb { background: rgba(37,99,235,0.18); border-radius: 2px; }

.cl-group { border-bottom: 1px solid var(--border); }

.cl-group-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 10px;
  background: var(--bg-elevated);
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  min-height: 28px;
  transition: background 0.12s;
}
.cl-group-hdr:hover { background: rgba(37,99,235,0.05); }
.cl-group-hdr-left { display: flex; align-items: center; gap: 5px; }
.cl-group-name {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-secondary);
}
.cl-group-badge {
  font-size: 9.5px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
.cl-chevron { font-size: 9px; color: var(--text-faint); }
.cl-group-body { background: var(--bg-surface); }

/* Field rows: label | input | unit  (3-column grid) */
.cl-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-bottom: 1px solid rgba(0,0,0,0.025);
  min-height: 30px;
}
.cl-row:last-child { border-bottom: none; }
.cl-row.has-error .cl-label { color: var(--red); }
.cl-row.has-warn  .cl-label { color: var(--amber); }

.cl-label {
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.cl-unit {
  font-size: 9.5px;
  color: var(--text-faint);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Compact input — shared by number and date inputs */
.cl-input {
  width: 100%;
  height: 26px;
  padding: 0 7px;
  background: var(--bg-input);
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--text);
  font-size: 12px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
  -moz-appearance: textfield;
}
.cl-input::-webkit-inner-spin-button { opacity: 0; }
.cl-input:hover  { border-color: var(--border); }
.cl-input:focus  { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(37,99,235,0.10); }
.cl-input-date   { font-size: 11px; padding: 0 4px; }
.cl-input.has-error { border-color: var(--red);   box-shadow: 0 0 0 2px rgba(220,38,38,0.08); }
.cl-input.has-warn  { border-color: var(--amber); box-shadow: 0 0 0 2px rgba(217,119,6,0.08); }

/* Compact select */
.cl-select {
  width: 100%;
  height: 26px;
  padding: 0 5px;
  background: var(--bg-input);
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--text);
  font-size: 11.5px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: border-color 0.12s;
}
.cl-select:hover { border-color: var(--border); }
.cl-select:focus { border-color: var(--blue); }

/* Slider row: label | range | value */
.cl-slider-row {
  display: grid;
  grid-template-columns: 72px 1fr 32px;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-bottom: 1px solid rgba(0,0,0,0.025);
  min-height: 30px;
}
.cl-slider-row:last-child { border-bottom: none; }
.cl-slider-label { font-size: 10.5px; color: var(--text-muted); }
.cl-slider {
  height: 3px;
  cursor: pointer;
  accent-color: var(--blue);
  width: 100%;
}
.cl-slider-val {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: right;
  white-space: nowrap;
}

/* Mini LTV bar inside Financing group */
.cl-ltv-bar {
  display: flex;
  height: 3px;
  margin: 5px 10px 0;
  border-radius: 2px;
  overflow: hidden;
}
.cl-ltv-debt   { background: var(--blue); transition: width 0.2s; }
.cl-ltv-equity { background: var(--green); transition: width 0.2s; }
.cl-ltv-labels {
  display: flex;
  justify-content: space-between;
  padding: 2px 10px 3px;
  font-size: 9px;
  color: var(--text-faint);
}

/* Derived / read-only info row */
.cl-derived {
  padding: 3px 10px 4px;
  font-size: 10px;
  color: var(--text-muted);
  font-style: italic;
  border-bottom: 1px solid rgba(0,0,0,0.025);
}
.cl-derived:last-child { border-bottom: none; }

/* TC contracts info row inside Revenue */
.cl-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 10px;
  font-size: 10.5px;
  color: var(--text-muted);
  background: var(--blue-dim);
  gap: 8px;
}
.cl-info-link {
  color: var(--blue);
  cursor: pointer;
  font-size: 10px;
  font-weight: 600;
  flex-shrink: 0;
  text-decoration: none;
}
.cl-info-link:hover { text-decoration: underline; }

/* KPI strip pinned to bottom */
.cl-kpi-strip {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  gap: 0;
  flex-shrink: 0;
}
.cl-kpi {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}
.cl-kpi-label {
  font-size: 8px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.cl-kpi-value {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cl-kpi-sep {
  width: 1px;
  height: 24px;
  background: var(--border);
  flex-shrink: 0;
  margin: 0 8px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Input Overview v2 — clean full-page layout
   ═══════════════════════════════════════════════════════════════════════════ */

.ov2-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--bg-base);
}

/* Sticky summary bar */
.ov2-summary {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 8px 20px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  flex-wrap: wrap;
  row-gap: 4px;
}
.ov2-stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 0 16px;
}
.ov2-stat:first-child { padding-left: 0; }
.ov2-stat-label {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.ov2-stat-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.ov2-stat-value.green { color: var(--green); }
.ov2-stat-value.red   { color: var(--red); }
.ov2-stat-value.blue  { color: var(--blue); }
.ov2-stat-div {
  width: 1px;
  height: 26px;
  background: var(--border);
  flex-shrink: 0;
}

/* Scrollable body */
.ov2-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(37,99,235,0.15) transparent;
}
.ov2-body::-webkit-scrollbar { width: 4px; }
.ov2-body::-webkit-scrollbar-thumb { background: rgba(37,99,235,0.2); border-radius: 2px; }

/* Section card */
.ov2-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.ov2-card-hdr {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px 9px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}
.ov2-card-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.1px;
}
.ov2-card-meta {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}
.ov2-card-body { padding: 14px 16px; }
.ov2-card-footer {
  padding: 8px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.ov2-card-footer strong { color: var(--text-secondary); font-weight: 600; }

/* Section row grid */
.ov2-row {
  display: grid;
  gap: 20px;
  align-items: start;
}
.ov2-row-2 { grid-template-columns: 1fr 1fr; }
.ov2-row-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 1000px) { .ov2-row-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px)  { .ov2-row-2, .ov2-row-3 { grid-template-columns: 1fr; } }

/* Sub-section heading inside a card */
.ov2-sub {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted);
  margin: 12px 0 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--border);
}
.ov2-sub:first-child { margin-top: 0; }

/* Computed reference line */
.ov2-computed {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: var(--blue-dim);
  border: 1px solid var(--border-accent);
  border-radius: 4px;
  font-size: 11px;
  margin-top: 8px;
}
.ov2-computed-label { color: var(--text-muted); }
.ov2-computed-value { font-weight: 700; color: var(--blue-bright); font-variant-numeric: tabular-nums; }

/* ═══════════════════════════════════════════════════════════════════════════
   Input Overview v3 — sub-tab layout
   ═══════════════════════════════════════════════════════════════════════════ */

.ov3-page { display: flex; flex-direction: column; height: 100%; overflow: hidden; background: var(--bg-base); }

/* Top summary bar */
.ov3-topbar { display: flex; align-items: center; padding: 0 20px; background: var(--bg-surface); border-bottom: 1px solid var(--border); flex-shrink: 0; flex-wrap: wrap; }
.ov3-topbar-stat { display: flex; flex-direction: column; gap: 2px; padding: 9px 16px; }
.ov3-topbar-stat:first-child { padding-left: 4px; }
.ov3-topbar-label { font-size: 9px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; }
.ov3-topbar-value { font-size: 12.5px; font-weight: 700; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ov3-topbar-value--green { color: var(--green); }
.ov3-topbar-value--red   { color: var(--red); }
.ov3-topbar-value--blue  { color: var(--blue); }
.ov3-topbar-div { width: 1px; height: 24px; background: var(--border); flex-shrink: 0; align-self: center; }

/* Sub-tab navigation */
.ov3-nav { display: flex; align-items: center; gap: 2px; padding: 0 16px; background: var(--bg-surface); border-bottom: 1px solid var(--border); flex-shrink: 0; overflow-x: auto; scrollbar-width: none; }
.ov3-nav::-webkit-scrollbar { display: none; }
.ov3-nav-item { display: flex; align-items: center; gap: 6px; padding: 10px 12px; font-size: 12px; font-weight: 500; color: var(--text-muted); background: transparent; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; transition: color 0.15s, border-color 0.15s; }
.ov3-nav-item:hover { color: var(--text); }
.ov3-nav-item--active { color: var(--blue); font-weight: 600; border-bottom-color: var(--blue); }
.ov3-nav-badge { font-size: 9.5px; font-weight: 700; padding: 1px 5px; border-radius: 8px; line-height: 1.5; }
.ov3-nav-badge--ok    { background: var(--green-dim); color: var(--green); }
.ov3-nav-badge--warn  { background: var(--amber-dim); color: var(--amber); }
.ov3-nav-badge--error { background: var(--red-dim);   color: var(--red); }

/* Scrollable body */
.ov3-body { flex: 1; overflow-y: auto; padding: 28px 32px 48px; scrollbar-width: thin; scrollbar-color: rgba(37,99,235,0.15) transparent; }
.ov3-body::-webkit-scrollbar { width: 4px; }
.ov3-body::-webkit-scrollbar-thumb { background: rgba(37,99,235,0.2); border-radius: 2px; }

/* Section + two-col */
.ov3-section { display: flex; flex-direction: column; gap: 20px; max-width: 1200px; width: 100%; margin: 0 auto; }
.ov3-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.ov3-3col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .ov3-2col, .ov3-3col { grid-template-columns: 1fr; } }

/* Panel */
.ov3-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.ov3-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 16px 9px; border-bottom: 1px solid var(--border); background: var(--bg-elevated); }
.ov3-panel-title { font-size: 11.5px; font-weight: 700; color: var(--text); letter-spacing: -0.1px; }
.ov3-panel-meta { font-size: 11px; color: var(--text-muted); font-weight: 500; white-space: nowrap; }
.ov3-panel-body { padding: 14px 16px; }
.ov3-panel-footer { padding: 8px 16px; border-top: 1px solid var(--border); background: var(--bg-elevated); font-size: 11px; color: var(--text-muted); display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.ov3-panel-footer strong { color: var(--text-secondary); font-weight: 600; }

/* Sub-heading */
.ov3-sub { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.7px; color: var(--text-muted); margin: 12px 0 8px; padding-bottom: 5px; border-bottom: 1px solid var(--border); }
.ov3-sub:first-child { margin-top: 0; }

/* Read-only info rows */
.ov3-info-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.ov3-info-row:last-child { border-bottom: none; }
.ov3-info-label { font-size: 11px; color: var(--text-muted); min-width: 150px; flex-shrink: 0; }
.ov3-info-value { font-size: 12px; font-weight: 600; color: var(--text); flex: 1; font-variant-numeric: tabular-nums; }
.ov3-info-value--blue  { color: var(--blue); }
.ov3-info-value--green { color: var(--green); }
.ov3-info-tag { font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; padding: 1px 5px; background: var(--blue-dim); color: var(--blue); border-radius: 4px; flex-shrink: 0; }

/* Read-only field (measurement basis) */
.ov3-readonly-field { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 4px; font-size: 12px; color: var(--text-secondary); min-height: 30px; }
.ov3-readonly-tag { font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-muted); }

/* Size segment row */
.ov3-segment-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 6px; margin-top: 10px; }
.ov3-segment-left { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.ov3-segment-label { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }
.ov3-segment-value { font-size: 14px; font-weight: 700; color: var(--text); }
.ov3-segment-select { width: 100%; height: 28px; font-size: 12px; background: var(--bg-input); border: 1px solid var(--border); border-radius: 4px; padding: 0 6px; color: var(--text); }
.ov3-segment-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex-shrink: 0; }

/* Confidence */
.ov3-confidence { display: flex; align-items: center; gap: 5px; }
.ov3-confidence-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ov3-confidence-dot--high    { background: var(--green); }
.ov3-confidence-dot--medium  { background: var(--amber); }
.ov3-confidence-dot--low     { background: var(--red); }
.ov3-confidence-dot--unknown { background: var(--text-faint); }
.ov3-confidence-label { font-size: 10px; color: var(--text-muted); }

/* Manual override toggle */
.ov3-override-toggle { display: flex; align-items: center; gap: 4px; cursor: pointer; font-size: 10px; color: var(--text-muted); }
.ov3-override-toggle input[type="checkbox"] { width: 11px; height: 11px; accent-color: var(--amber); }

/* Classification notes */
.ov3-cl-notes { margin-top: 6px; padding: 6px 10px; background: var(--amber-dim); border: 1px solid rgba(217,119,6,0.25); border-radius: 5px; font-size: 11px; color: var(--amber); line-height: 1.5; }

/* Slider value */
.ov3-slider-val { min-width: 36px; text-align: right; font-weight: 700; color: var(--text-secondary); }

/* Empty state */
.ov3-empty { padding: 24px 16px; text-align: center; font-size: 12px; color: var(--text-muted); font-style: italic; }

/* ═══════════════════════════════════════════════════════════════════════════
   Compact Sidebar — c-* class aliases
   (App.jsx refactor uses c-* instead of cl-* — these provide the styles)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Import zone (compact sidebar version, was vessel-import-zone) */
.import-zone {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1.5px dashed var(--border-accent);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
  flex-shrink: 0;
}
.import-zone:hover  { background: var(--blue-dim); color: var(--blue); border-color: var(--blue); }
.import-zone.dragging { border-color: var(--blue-bright); background: var(--blue-dim); color: var(--blue-bright); box-shadow: 0 0 0 2px rgba(37,99,235,0.15); }
.import-zone.loading  { opacity: 0.7; cursor: default; }

/* Autofill notice strip */
.autofill-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 10px;
  font-size: 10.5px;
  background: var(--green-dim);
  color: var(--green);
  flex-shrink: 0;
}
.autofill-notice button {
  background: none; border: none; cursor: pointer;
  color: inherit; opacity: 0.6; font-size: 13px; padding: 0 2px; line-height: 1;
}

/* Collapsible groups */
.c-group { border-bottom: 1px solid var(--border); }

.c-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 10px;
  background: var(--bg-elevated);
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  min-height: 28px;
  transition: background 0.12s;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-secondary);
}
.c-group-header:hover { background: rgba(37,99,235,0.05); }

.c-badge {
  font-size: 9.5px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  margin-left: 4px;
}
.c-chevron { font-size: 9px; color: var(--text-faint); margin-left: auto; }

.c-group-body { background: var(--bg-surface); }

/* Field rows */
.c-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-bottom: 1px solid rgba(0,0,0,0.025);
  min-height: 30px;
}
.c-row:last-child { border-bottom: none; }
.c-row-error .c-label { color: var(--red); }
.c-row-warn  .c-label { color: var(--amber); }

.c-label {
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  display: flex;
  align-items: baseline;
  gap: 3px;
}
.c-unit {
  font-size: 9px;
  color: var(--text-faint);
  white-space: nowrap;
  flex-shrink: 0;
}
.c-value {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

/* Shared input base */
.c-num, .c-text, .c-date {
  width: 100%;
  height: 26px;
  padding: 0 7px;
  background: var(--bg-input);
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--text);
  font-size: 12px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.c-num { -moz-appearance: textfield; }
.c-num::-webkit-inner-spin-button { opacity: 0; }
.c-date { font-size: 11px; padding: 0 4px; }
.c-num:hover, .c-text:hover, .c-date:hover { border-color: var(--border); }
.c-num:focus, .c-text:focus, .c-date:focus { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(37,99,235,0.10); }
.c-num-error { border-color: var(--red)   !important; box-shadow: 0 0 0 2px rgba(220,38,38,0.08) !important; }
.c-num-warn  { border-color: var(--amber) !important; box-shadow: 0 0 0 2px rgba(217,119,6,0.08) !important; }

/* Compact select */
.c-sel {
  width: 100%;
  height: 26px;
  padding: 0 5px;
  background: var(--bg-input);
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--text);
  font-size: 11.5px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: border-color 0.12s;
}
.c-sel:hover { border-color: var(--border); }
.c-sel:focus { border-color: var(--blue); }

/* Icon button (reset / clear) */
.c-icon-btn {
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  flex-shrink: 0;
  transition: background 0.12s, color 0.12s;
  padding: 0;
}
.c-icon-btn:hover { background: var(--bg-elevated); color: var(--text); border-color: var(--border); }

/* Derived / read-only info rows */
.c-derived {
  padding: 3px 10px 4px;
  font-size: 10px;
  color: var(--text-muted);
  font-style: italic;
  border-bottom: 1px solid rgba(0,0,0,0.025);
}
.c-derived:last-child { border-bottom: none; }

.c-derived-inline {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
  padding: 2px 0;
}

/* Contract / survey sub-containers */
.c-contract, .c-survey {
  border-bottom: 1px solid var(--border);
  background: rgba(37,99,235,0.02);
}
.c-contract:last-of-type, .c-survey:last-of-type { border-bottom: none; }

/* Add / Remove buttons */
.c-add {
  display: block;
  width: 100%;
  padding: 6px 10px;
  background: none;
  border: none;
  border-top: 1px solid var(--border);
  color: var(--blue);
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
}
.c-add:hover { background: var(--blue-dim); }

.c-remove {
  display: block;
  width: 100%;
  padding: 4px 10px;
  background: none;
  border: none;
  color: var(--red);
  font-size: 10.5px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
  opacity: 0.75;
}
.c-remove:hover { background: var(--red-dim); opacity: 1; }

/* Sidebar vessel details */
.sidebar-vessel-details {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s;
  flex-shrink: 0;
}
.sidebar-vessel-details:hover { background: var(--bg-elevated); }

.svd-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.svd-meta {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Vessel details edit panel */
.sidebar-vessel-details-edit {
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  flex-shrink: 0;
}
.svd-edit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.svd-done {
  background: var(--blue);
  border: none;
  border-radius: 4px;
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
  font-family: inherit;
  padding: 2px 10px;
  cursor: pointer;
  transition: background 0.12s;
}
.svd-done:hover { background: var(--blue-bright); }

.svd-section {
  padding: 6px 10px 4px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.svd-section:last-child { border-bottom: none; }

.svd-section-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-faint);
  margin-bottom: 4px;
}
.svd-field {
  display: grid;
  grid-template-columns: 80px 1fr;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
}
.svd-field label {
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
}
.svd-field input, .svd-field select {
  height: 24px;
  padding: 0 6px;
  background: var(--bg-input);
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--text);
  font-size: 11.5px;
  font-family: inherit;
  outline: none;
  width: 100%;
  transition: border-color 0.12s;
}
.svd-field input:focus, .svd-field select:focus { border-color: var(--blue); }

/* Sidebar nav shortcuts */
.sidebar-nav-shortcuts {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--border);
  margin-top: auto;
  flex-shrink: 0;
}
.sidebar-nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s, color 0.12s;
}
.sidebar-nav-btn:last-child { border-bottom: none; }
.sidebar-nav-btn:hover { background: var(--blue-dim); color: var(--blue); }

/* Scrollable groups wrapper inside compact-sidebar */
.c-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(37,99,235,0.12) transparent;
}
.c-scroll::-webkit-scrollbar { width: 3px; }
.c-scroll::-webkit-scrollbar-thumb { background: rgba(37,99,235,0.18); border-radius: 2px; }

/* ── Tab bar: sticky within the content scroll area ──────────────────────── */
.tab-bar {
  position: sticky;
  top: 0;
  z-index: 20;
}

/* ── Sidebar collapse strip (replaces nav shortcuts) ─────────────────────── */
.c-collapse-strip {
  border-top: 1px solid var(--border);
  padding: 0;
  flex-shrink: 0;
}
.c-collapse-btn {
  display: block;
  width: 100%;
  padding: 8px 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s, color 0.12s;
}
.c-collapse-btn:hover { background: var(--bg-elevated); color: var(--text); }

/* ═══════════════════════════════════════════════════════════════════════════
   FINANCIALS & STRUCTURE MODULE
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Shell ────────────────────────────────────────────────────────────────── */
.fin-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* ── Sub-navigation ───────────────────────────────────────────────────────── */
.fin-subnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
  flex-shrink: 0;
}
.fin-subnav-inner { display: flex; gap: 4px; }
.fin-subnav-btn {
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.12s;
}
.fin-subnav-btn:hover  { border-color: var(--blue); color: var(--blue); background: var(--blue-dim); }
.fin-subnav-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; }
.fin-subnav-meta { font-size: 10px; font-weight: 700; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.08em; }

.fin-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-top: 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(37,99,235,0.12) transparent;
}

/* ── Section header ───────────────────────────────────────────────────────── */
.fin-sec-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  padding: 0 0 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

/* ── Institutional table ──────────────────────────────────────────────────── */
.fin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.fin-table th {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  padding: 6px 8px 5px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.fin-table td {
  padding: 5px 8px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  vertical-align: middle;
  color: var(--text);
}
.fin-table tr:last-child td { border-bottom: none; }
.fin-table tr:hover td { background: var(--bg-hover); }
.fin-row-derived td { background: rgba(37,99,235,0.025); }
.fin-row-derived:hover td { background: rgba(37,99,235,0.05) !important; }
.fin-row-label { font-size: 12px; color: var(--text-secondary); }
.fin-amt-col { text-align: right; font-variant-numeric: tabular-nums; font-family: "SF Mono", "Consolas", monospace; }
.fin-amt-cell {
  font-family: "SF Mono", "Consolas", monospace;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  color: var(--text);
  padding: 2px 4px;
  border-radius: 3px;
  border: 1px solid transparent;
  transition: border-color 0.1s;
}
.fin-amt-cell:hover { border-color: var(--border); background: var(--bg-input); }
.fin-total-row td {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text);
  border-top: 2px solid var(--border);
  padding: 8px 8px;
  font-variant-numeric: tabular-nums;
  font-family: "SF Mono", "Consolas", monospace;
}
.fin-total-row { background: var(--bg-elevated); }

/* ── Action buttons ───────────────────────────────────────────────────────── */
.fin-add-btn {
  font-size: 10px; font-weight: 700; padding: 3px 10px;
  background: var(--blue-dim); border: 1px solid var(--border-accent); border-radius: 4px;
  color: var(--blue); cursor: pointer; font-family: inherit; transition: all 0.12s;
}
.fin-add-btn:hover { background: var(--blue); color: #fff; }
.fin-del-btn {
  width: 18px; height: 18px; display: flex; align-items: center; justify-content: center;
  background: none; border: none; color: var(--text-faint); cursor: pointer; font-size: 14px;
  border-radius: 3px; padding: 0; transition: all 0.1s;
}
.fin-del-btn:hover { color: var(--red); background: var(--red-dim); }
.fin-label-input {
  width: 100%; height: 22px; padding: 0 6px; background: transparent;
  border: 1px solid transparent; border-radius: 3px; font-size: 12px;
  font-family: inherit; color: var(--text); outline: none;
}
.fin-label-input:focus { border-color: var(--blue); background: var(--bg-input); }

/* ════════════════════════════════════════════════════════════════════════════
   USES & SOURCES
   ════════════════════════════════════════════════════════════════════════════ */

.fin-us-shell { display: flex; flex-direction: column; gap: 0; }

/* Balance bar */
.fin-balance-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; font-size: 11px; font-weight: 600;
  border-radius: 4px; margin-bottom: 14px; flex-shrink: 0;
}
.fin-balance-bar.ok   { background: var(--green-dim); color: var(--green); border: 1px solid rgba(5,150,105,0.25); }
.fin-balance-bar.warn { background: var(--amber-dim); color: var(--amber); border: 1px solid rgba(217,119,6,0.25); }

/* Capital stack */
.fin-stack-panel { margin-bottom: 20px; padding: 14px 16px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 6px; }
.fin-stack-label { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 10px; }
.fin-stack-bar-wrap { display: flex; height: 28px; border-radius: 4px; overflow: hidden; background: var(--bg-input); border: 1px solid var(--border); }
.fin-stack-seg { display: flex; align-items: center; justify-content: center; transition: width 0.3s ease; position: relative; min-width: 0; }
.fin-stack-seg-label { font-size: 9px; font-weight: 700; color: rgba(255,255,255,0.9); white-space: nowrap; text-shadow: 0 1px 2px rgba(0,0,0,0.4); }
.fin-stack-empty { flex: 1; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--text-faint); font-style: italic; }
.fin-stack-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.fin-stack-legend-item { display: flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--text-secondary); }
.fin-stack-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.fin-stack-dot-sm { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; margin-right: 5px; vertical-align: middle; }
.fin-stack-metrics { display: flex; gap: 24px; margin-top: 10px; border-top: 1px solid var(--border); padding-top: 10px; }
.fin-stack-metrics span { font-size: 11px; color: var(--text-secondary); display: flex; align-items: baseline; gap: 4px; }
.fin-stack-metrics strong { font-size: 13px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.fin-metric-label { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }

/* Two-column layout */
.fin-us-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.fin-us-col { display: flex; flex-direction: column; gap: 0; }

/* ════════════════════════════════════════════════════════════════════════════
   RUNNING COSTS
   ════════════════════════════════════════════════════════════════════════════ */

.fin-rc-shell { display: flex; flex-direction: column; gap: 16px; }

/* Summary strip */
.fin-rc-summary {
  display: flex; align-items: center; gap: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 6px; overflow: hidden;
}
.fin-rc-kpi {
  flex: 1; padding: 12px 16px; border-right: 1px solid var(--border);
}
.fin-rc-kpi:last-of-type { border-right: none; }
.fin-rc-kpi-label { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); margin-bottom: 2px; }
.fin-rc-kpi-value { font-size: 15px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; font-family: "SF Mono","Consolas",monospace; }
.fin-rc-kpi-sub { font-size: 9.5px; color: var(--text-faint); margin-top: 1px; }

.fin-period-btn {
  padding: 4px 11px; border: 1px solid var(--border); border-radius: 4px;
  background: transparent; color: var(--text-muted); font-size: 10.5px; font-weight: 600;
  font-family: inherit; cursor: pointer; transition: all 0.12s;
}
.fin-period-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* Body split */
.fin-rc-body { display: grid; grid-template-columns: 1fr 300px; gap: 20px; }
.fin-rc-table-col { display: flex; flex-direction: column; gap: 10px; }

/* Cost category */
.fin-rc-category { border: 1px solid var(--border); border-radius: 5px; overflow: hidden; }
.fin-rc-cat-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 10px; background: var(--bg-elevated);
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-secondary);
}
.fin-rc-cat-total { font-variant-numeric: tabular-nums; font-family: "SF Mono","Consolas",monospace; font-size: 12px; font-weight: 800; color: var(--text); }
.fin-rc-tbl { margin: 0; }
.fin-rc-input {
  width: 90px; height: 24px; padding: 0 7px; text-align: right;
  background: var(--bg-input); border: 1px solid transparent; border-radius: 3px;
  font-size: 12px; font-family: "SF Mono","Consolas",monospace; font-variant-numeric: tabular-nums;
  color: var(--text); outline: none; transition: border-color 0.1s;
  -moz-appearance: textfield;
}
.fin-rc-input::-webkit-inner-spin-button { opacity: 0; }
.fin-rc-input:focus { border-color: var(--blue); background: var(--bg-surface); }

/* Grand total */
.fin-rc-grand-total {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: 5px;
  font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums; font-family: "SF Mono","Consolas",monospace;
  color: var(--text);
}

/* Chart column */
.fin-rc-chart-col { display: flex; flex-direction: column; gap: 12px; }
.fin-rc-chart-title { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); }
.fin-chart-empty { height: 140px; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--text-faint); font-style: italic; border: 1px dashed var(--border); border-radius: 5px; }
.fin-rc-legend { display: flex; flex-direction: column; gap: 4px; }
.fin-rc-legend-row { display: flex; align-items: center; gap: 7px; font-size: 10.5px; color: var(--text-secondary); }
.fin-rc-legend-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fin-rc-legend-val { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text); font-size: 10.5px; }

/* Burn bar */
.fin-burn-bar-wrap { display: flex; flex-direction: column; gap: 5px; padding: 10px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 5px; }
.fin-burn-bar-label { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); margin-bottom: 4px; }
.fin-burn-row { display: flex; align-items: center; gap: 8px; }
.fin-burn-row-label { font-size: 10px; color: var(--text-muted); width: 72px; flex-shrink: 0; }
.fin-burn-row-bar { flex: 1; height: 8px; background: var(--bg-input); border-radius: 3px; overflow: hidden; }
.fin-burn-row-val { font-size: 10.5px; font-weight: 700; font-variant-numeric: tabular-nums; font-family: "SF Mono","Consolas",monospace; width: 90px; text-align: right; color: var(--text); flex-shrink: 0; }

/* ════════════════════════════════════════════════════════════════════════════
   PROJECT STRUCTURE
   ════════════════════════════════════════════════════════════════════════════ */

.fin-ps-shell { display: flex; flex-direction: column; height: 100%; min-height: 600px; }

/* Toolbar */
.fin-ps-toolbar {
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
  padding: 8px 0 10px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.fin-ps-toolbar-label { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); margin-right: 4px; flex-shrink: 0; }
.fin-ps-add-btn {
  padding: 3px 9px; border-radius: 4px; border: 1px solid;
  background: transparent; font-size: 10.5px; font-weight: 600;
  font-family: inherit; cursor: pointer; transition: all 0.12s; white-space: nowrap;
}
.fin-ps-add-btn:hover { opacity: 0.75; background: rgba(255,255,255,0.05); }
.fin-ps-ctrl-btn {
  padding: 4px 10px; border: 1px solid var(--border); border-radius: 4px;
  background: var(--bg-elevated); color: var(--text-secondary);
  font-size: 12px; font-family: inherit; cursor: pointer; transition: all 0.12s;
}
.fin-ps-ctrl-btn:hover { border-color: var(--blue); color: var(--blue); }

/* Body split */
.fin-ps-body { display: flex; flex: 1; overflow: hidden; gap: 0; margin-top: 10px; }
.fin-ps-canvas-wrap { flex: 1; position: relative; background: #0a0f1a; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.fin-ps-svg { width: 100%; height: 100%; min-height: 560px; display: block; cursor: default; }
.fin-ps-connect-hint {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  background: var(--amber); color: #fff; font-size: 11px; font-weight: 700;
  padding: 5px 14px; border-radius: 4px; z-index: 10; white-space: nowrap; pointer-events: none;
}

/* Inspector */
.fin-ps-inspector {
  width: 220px; flex-shrink: 0; margin-left: 12px;
  border: 1px solid var(--border); border-radius: 6px; background: var(--bg-surface);
  overflow-y: auto; display: flex; flex-direction: column;
}
.fin-ps-inspector-empty {
  padding: 20px 14px; text-align: center; color: var(--text-muted); font-size: 11.5px; flex: 1;
}
.fin-ps-legend { text-align: left; margin-top: 16px; }
.fin-ps-legend-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 10.5px; color: var(--text-secondary); text-transform: capitalize; }
.fin-ps-insp-content { display: flex; flex-direction: column; flex: 1; }
.fin-ps-insp-header { display: flex; align-items: center; gap: 10px; padding: 12px 12px; flex-shrink: 0; }
.fin-ps-insp-body { padding: 10px 12px; flex: 1; overflow-y: auto; }
.fin-ps-field-label { display: block; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin: 10px 0 4px; }
.fin-ps-field-label:first-child { margin-top: 0; }
.fin-ps-field-input {
  width: 100%; height: 26px; padding: 0 7px;
  background: var(--bg-input); border: 1px solid var(--border); border-radius: 4px;
  font-size: 12px; font-family: inherit; color: var(--text); outline: none;
  transition: border-color 0.1s;
}
.fin-ps-field-input:focus { border-color: var(--blue); }
.fin-ps-action-btn {
  padding: 5px 12px; border-radius: 4px; border: 1px solid var(--blue);
  background: var(--blue-dim); color: var(--blue);
  font-size: 11px; font-weight: 600; font-family: inherit; cursor: pointer; transition: all 0.12s;
}
.fin-ps-action-btn:hover { background: var(--blue); color: #fff; }
.fin-ps-action-btn.danger { border-color: var(--red); background: var(--red-dim); color: var(--red); }
.fin-ps-action-btn.danger:hover { background: var(--red); color: #fff; }

/* ── Financials: Equity Ticket Strip (Uses & Sources) ─────────────────────── */
.fin-ticket-strip {
  display: flex; align-items: center; gap: 24px;
  background: linear-gradient(135deg, rgba(37,99,235,0.12), rgba(37,99,235,0.05));
  border: 1px solid rgba(37,99,235,0.3); border-radius: 8px;
  padding: 16px 20px; margin-bottom: 16px;
}
.fin-ticket-strip.surplus {
  background: linear-gradient(135deg, rgba(217,119,6,0.12), rgba(217,119,6,0.05));
  border-color: rgba(217,119,6,0.4);
}
.fin-ticket-main { display: flex; flex-direction: column; gap: 4px; min-width: 180px; }
.fin-ticket-label { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); }
.fin-ticket-value { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); line-height: 1; }
.fin-ticket-sub { font-size: 11px; color: var(--text-muted); }
.fin-ticket-metrics { display: flex; gap: 20px; flex-wrap: wrap; }
.fin-ticket-metric { display: flex; flex-direction: column; gap: 2px; }
.fin-metric-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.fin-ticket-metric-val { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }

/* ── Financials: Equity callout box (bottom of Sources column) ────────────── */
.fin-equity-callout {
  margin-top: 12px; padding: 14px 16px;
  background: linear-gradient(135deg, rgba(37,99,235,0.10), rgba(37,99,235,0.04));
  border: 1px solid rgba(37,99,235,0.3); border-radius: 6px;
  display: flex; flex-direction: column; gap: 4px;
}
.fin-equity-callout.warn {
  background: linear-gradient(135deg, rgba(217,119,6,0.10), rgba(217,119,6,0.04));
  border-color: rgba(217,119,6,0.4);
}
.fin-equity-callout-label { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); }
.fin-equity-callout.warn .fin-equity-callout-label { color: var(--amber, #d97706); }
.fin-equity-callout-value { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); }
.fin-equity-callout-sub { font-size: 10.5px; color: var(--text-muted); }

/* ── Financials: Running Costs — derived note ─────────────────────────────── */
.fin-rc-derived-note {
  font-size: 10.5px; color: var(--text-muted); font-style: italic;
  padding: 6px 10px 2px; border-left: 2px solid var(--border);
  margin: 4px 0 8px 0;
}

/* ── Financials: Breakeven strip ──────────────────────────────────────────── */
.fin-rc-breakeven {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; border-radius: 6px; font-size: 12px;
  margin-top: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}
.fin-rc-breakeven.positive { background: rgba(5,150,105,0.08); border-color: rgba(5,150,105,0.3); color: var(--green, #059669); }
.fin-rc-breakeven.negative { background: rgba(217,119,6,0.08); border-color: rgba(217,119,6,0.3); color: var(--amber, #d97706); }

/* ── Financials: Dot sm (inline color dot in sources table) ───────────────── */
.fin-stack-dot-sm {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 6px; flex-shrink: 0; vertical-align: middle;
}

/* ── Financials: Grand total row ────────────────────────

/* ── Financials: Grand total row ──────────────────────────────────────────── */
.fin-rc-grand-total {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 14px 16px; margin-top: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: 6px;
  font-size: 13px; font-weight: 700; color: var(--text);
}

/* ── Financials: Burn bar rows ─────────────────────────────────────────────── */
.fin-burn-bar-wrap { margin-top: 16px; }
.fin-burn-bar-label { font-size: 10px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }
.fin-burn-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.fin-burn-row-label { font-size: 11px; color: var(--text-muted); width: 80px; flex-shrink: 0; }
.fin-burn-row-bar { flex: 1; height: 8px; background: var(--bg-input); border-radius: 3px; overflow: hidden; }
.fin-burn-row-val { font-size: 11px; font-variant-numeric: tabular-nums; color: var(--text); width: 76px; text-align: right; flex-shrink: 0; }

/* ── Financials: Period toggle buttons ─────────────────────────────────────── */
.fin-period-btn {
  padding: 4px 10px; font-size: 11px; font-weight: 600; border-radius: 4px; cursor: pointer;
  background: var(--bg-input); border: 1px solid var(--border); color: var(--text-muted);
  transition: all 0.15s;
}
.fin-period-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.fin-period-btn:hover:not(.active) { border-color: var(--blue); color: var(--blue); }

/* ── Financials: Chart empty ────────────────────────────────────────────────── */
.fin-chart-empty {
  display: flex; align-items: center; justify-content: center;
  height: 140px; color: var(--text-muted); font-size: 12px; font-style: italic;
  border: 1px dashed var(--border); border-radius: 6px;
}

/* ── Financials: RC legend ──────────────────────────────────────────────────── */
.fin-rc-legend { margin-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.fin-rc-legend-row { display: flex; align-items: center; gap: 6px; font-size: 11px; }
.fin-rc-legend-label { flex: 1; color: var(--text-secondary); }
.fin-rc-legend-val { font-variant-numeric: tabular-nums; color: var(--text-muted); }

/* ── Financials: Project Structure ─────────────────────────────────────────── */
.fin-ps-shell { display: flex; flex-direction: column; height: 100%; }
.fin-ps-toolbar {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 10px 16px; border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}
.fin-ps-toolbar-label { font-size: 10px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-muted); }
.fin-ps-add-btn {
  padding: 4px 10px; font-size: 11px; font-weight: 600; border-radius: 4px; cursor: pointer;
  background: transparent; border: 1px solid; transition: all 0.15s;
}
.fin-ps-add-btn:hover { opacity: 0.8; }
.fin-ps-ctrl-btn {
  padding: 4px 8px; font-size: 12px; border-radius: 4px; cursor: pointer;
  background: var(--bg-input); border: 1px solid var(--border); color: var(--text-muted);
}
.fin-ps-ctrl-btn:hover { border-color: var(--blue); color: var(--blue); }
.fin-ps-body { display: flex; flex: 1; overflow: hidden; }
.fin-ps-canvas-wrap { flex: 1; position: relative; overflow: hidden; }
.fin-ps-connect-hint {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  z-index: 10; background: var(--amber-dim, rgba(217,119,6,0.12));
  border: 1px solid var(--amber, #d97706); border-radius: 6px;
  padding: 6px 14px; font-size: 12px; font-weight: 600; color: var(--amber, #d97706);
  pointer-events: none;
}
.fin-ps-svg { width: 100%; height: 100%; display: block; background: var(--bg-canvas, #0a0e1a); }
.fin-ps-inspector {
  width: 240px; flex-shrink: 0; border-left: 1px solid var(--border);
  background: var(--bg-surface); overflow-y: auto;
}
.fin-ps-inspector-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; padding: 24px 16px; text-align: center; color: var(--text-muted);
  font-size: 12px;
}
.fin-ps-legend { margin-top: 20px; width: 100%; }
.fin-ps-legend-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 11px; color: var(--text-muted); }
.fin-ps-insp-content { display: flex; flex-direction: column; height: 100%; }
.fin-ps-insp-header {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  background: var(--bg-elevated);
}
.fin-ps-insp-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.fin-ps-field-label { font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-top: 8px; }
.fin-ps-field-input {
  padding: 5px 8px; font-size: 12px; border-radius: 4px;
  background: var(--bg-input); border: 1px solid var(--border); color: var(--text);
  outline: none; width: 100%; margin-top: 2px;
}
.fin-ps-field-input:focus { border-color: var(--blue); }
.fin-ps-action-btn {
  flex: 1; padding: 6px 10px; font-size: 11px; font-weight: 600; border-radius: 4px; cursor: pointer;
  background: var(--bg-input); border: 1px solid var(--border); color: var(--text-secondary);
}
.fin-ps-action-btn:hover { border-color: var(--blue); color: var(--blue); }
.fin-ps-action-btn.danger { color: var(--red, #dc2626); border-color: rgba(220,38,38,0.3); }
.fin-ps-action-btn.danger:hover { background: rgba(220,38,38,0.08); }

/* ── Financials: OPEX breakdown toggle button ──────────────────────────────── */
.fin-breakdown-btn {
  padding: 3px 9px; font-size: 10px; font-weight: 600; border-radius: 4px; cursor: pointer;
  background: transparent; border: 1px solid var(--border); color: var(--text-muted);
  white-space: nowrap; transition: all 0.15s;
}
.fin-breakdown-btn:hover { border-color: var(--blue); color: var(--blue); }

/* ── SG&A expandable breakdown (InputOverviewTab) ──────────────────────────── */
.sga-section { margin-top: 12px; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.sga-toggle {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; padding: 8px 12px; background: var(--bg-elevated);
  border: none; cursor: pointer; font-size: 12px; font-weight: 600;
  color: var(--text); text-align: left;
}
.sga-toggle:hover { background: var(--bg-input); }
.sga-toggle-label { display: flex; align-items: center; gap: 6px; }
.sga-toggle-arrow { font-size: 9px; color: var(--text-muted); }
.sga-toggle-total { font-size: 11px; color: var(--text-muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.sga-body { padding: 4px 0 2px; background: var(--bg-surface); }
.sga-row {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 12px; min-height: 30px;
}
.sga-row:hover { background: var(--bg-input); }
.sga-row-label { flex: 1; font-size: 12px; color: var(--text-secondary); }
.sga-row-input {
  width: 90px; height: 24px; padding: 0 6px; font-size: 12px;
  font-family: "SF Mono", monospace; text-align: right;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: 3px; color: var(--text); outline: none;
}
.sga-row-input:focus { border-color: var(--blue); }
.sga-row--custom .sga-row-label-input {
  flex: 1; height: 24px; padding: 0 6px; font-size: 12px;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: 3px; color: var(--text); outline: none;
}
.sga-row-del {
  width: 20px; height: 20px; border: none; background: transparent;
  color: var(--text-faint); cursor: pointer; font-size: 14px; line-height: 1;
  border-radius: 3px; display: flex; align-items: center; justify-content: center;
}
.sga-row-del:hover { background: rgba(220,38,38,0.1); color: var(--red, #dc2626); }
.sga-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 12px; border-top: 1px solid var(--border); margin-top: 2px;
}
.sga-add-btn {
  font-size: 11px; font-weight: 600; color: var(--blue);
  background: none; border: none; cursor: pointer; padding: 0;
}
.sga-add-btn:hover { text-decoration: underline; }
.sga-total { font-size: 11px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* ════════════════════════════════════════════════════════════════════════════
   LOGIN SCREEN
   ════════════════════════════════════════════════════════════════════════════ */
.login-backdrop {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg-base);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.login-card {
  width: 100%; max-width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 36px 32px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.3);
  display: flex; flex-direction: column; align-items: center; gap: 0;
}
.login-logo { margin-bottom: 14px; }
.login-title { font-size: 20px; font-weight: 800; color: var(--text); margin: 0 0 4px; text-align: center; }
.login-sub { font-size: 12px; color: var(--text-muted); margin: 0 0 28px; text-align: center; }
.login-form { width: 100%; display: flex; flex-direction: column; gap: 14px; }
.login-field { display: flex; flex-direction: column; gap: 5px; }
.login-label { font-size: 11px; font-weight: 600; color: var(--text-secondary); letter-spacing: 0.04em; text-transform: uppercase; }
.login-input {
  height: 40px; padding: 0 12px; border-radius: 8px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  color: var(--text); font-size: 14px; font-family: inherit;
  transition: border-color 0.15s; outline: none;
}
.login-input:focus { border-color: var(--blue); }
.login-error {
  padding: 8px 12px; border-radius: 6px; font-size: 12px;
  background: rgba(239,68,68,0.10); border: 1px solid rgba(239,68,68,0.3);
  color: #ef4444;
}
.login-btn {
  height: 42px; border-radius: 8px; border: none;
  background: var(--blue); color: #fff;
  font-size: 14px; font-weight: 700; font-family: inherit;
  cursor: pointer; transition: all 0.15s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 4px;
}
.login-btn:hover { background: #1d4ed8; }
.login-btn:disabled { opacity: 0.6; cursor: default; }
.login-footer { font-size: 11px; color: var(--text-faint); margin-top: 20px; text-align: center; }

/* ════════════════════════════════════════════════════════════════════════════
   ADMIN PANEL
   ════════════════════════════════════════════════════════════════════════════ */
.admin-panel { padding: 24px 28px; max-width: 900px; }
.admin-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.admin-title { font-size: 18px; font-weight: 800; color: var(--text); margin: 0 0 4px; }
.admin-sub { font-size: 12px; color: var(--text-muted); margin: 0; }
.admin-create-btn {
  padding: 8px 16px; border-radius: 7px; border: none;
  background: var(--blue); color: #fff; font-size: 13px; font-weight: 700;
  font-family: inherit; cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.admin-create-btn:hover { background: #1d4ed8; }

.admin-flash {
  padding: 10px 14px; border-radius: 7px; font-size: 12.5px; margin-bottom: 14px;
  border: 1px solid; font-weight: 600;
}
.admin-flash.ok { background: rgba(5,150,105,0.10); border-color: rgba(5,150,105,0.3); color: #059669; }
.admin-flash.err { background: rgba(239,68,68,0.10); border-color: rgba(239,68,68,0.3); color: #ef4444; }

.admin-loading { padding: 32px; text-align: center; color: var(--text-muted); font-size: 13px; }

.admin-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; padding: 16px 20px; margin-bottom: 10px;
}
.admin-card.inactive { opacity: 0.6; }
.admin-create-card { margin-bottom: 18px; border-color: rgba(37,99,235,0.3); background: rgba(37,99,235,0.04); }
.admin-card-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 12px; }

.admin-user-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.admin-user-info { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-username { font-size: 14px; font-weight: 700; color: var(--text); }
.admin-email { font-size: 11px; color: var(--text-muted); }
.admin-user-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-last-login { font-size: 11px; color: var(--text-muted); }

.admin-edit-btn {
  padding: 4px 12px; border-radius: 5px; font-size: 12px; font-weight: 600;
  background: var(--bg-elevated); border: 1px solid var(--border);
  color: var(--text-secondary); cursor: pointer; transition: all 0.12s; font-family: inherit;
}
.admin-edit-btn:hover { border-color: var(--blue); color: var(--blue); }
.admin-toggle-btn {
  padding: 4px 12px; border-radius: 5px; font-size: 12px; font-weight: 600;
  border: 1px solid; cursor: pointer; transition: all 0.12s; font-family: inherit;
}
.admin-toggle-btn.deactivate { background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.3); color: #ef4444; }
.admin-toggle-btn.deactivate:hover { background: rgba(239,68,68,0.16); }
.admin-toggle-btn.activate { background: rgba(5,150,105,0.08); border-color: rgba(5,150,105,0.3); color: #059669; }
.admin-toggle-btn.activate:hover { background: rgba(5,150,105,0.16); }

.admin-edit-form { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.admin-form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.admin-form-field { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 160px; }
.admin-form-field label { font-size: 10.5px; font-weight: 600; color: var(--text-muted); letter-spacing: 0.04em; text-transform: uppercase; }
.admin-input {
  height: 34px; padding: 0 10px; border-radius: 6px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  color: var(--text); font-size: 13px; font-family: inherit;
  outline: none; transition: border-color 0.15s;
}
.admin-input:focus { border-color: var(--blue); }

.admin-perm-title { font-size: 11px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }

.admin-save-btn {
  padding: 7px 18px; border-radius: 6px; border: none;
  background: var(--blue); color: #fff; font-size: 13px; font-weight: 700;
  font-family: inherit; cursor: pointer; transition: all 0.15s;
}
.admin-save-btn:hover { background: #1d4ed8; }
.admin-cancel-btn {
  padding: 7px 18px; border-radius: 6px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  color: var(--text-secondary); font-size: 13px; font-weight: 600;
  font-family: inherit; cursor: pointer; transition: all 0.15s;
}
.admin-cancel-btn:hover { border-color: var(--border-bright); color: var(--text); }

/* Admin tab group — subtle purple accent */
.tab-group-admin .tab-group-label { color: rgba(124,58,237,0.7); }

/* ── Account Modal ─────────────────────────────────────�
/* ── Account Modal — slide-in panel from top-right ──────────────────────── */
.account-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: transparent;
}

.account-modal {
  position: fixed;
  top: var(--topbar-height, 58px);
  right: 12px;
  width: 340px;
  max-height: calc(100vh - var(--topbar-height, 58px) - 24px);
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 151;
  animation: account-drop-in 0.18s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes account-drop-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.account-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--border);
}

.account-modal-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.account-modal-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.account-close-btn {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.12s, background 0.12s;
}
.account-close-btn:hover { color: var(--text); background: var(--bg-elevated); }

.account-section {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.account-section:last-child { border-bottom: none; }

.account-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  margin-bottom: 10px;
}

.account-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 12px;
}

.account-info-label { color: var(--text-muted); }
.account-info-value { color: var(--text); font-weight: 500; }
