/* =============================================================================
   The Oglethorpe Collective — Business Management Platform
   Design language: refined wealth-management aesthetic.
   Deep navy structure, warm cream surfaces, gold accents, generous whitespace.
   ============================================================================= */

:root {
  --ink:        #0E1F36;       /* deep navy — primary text + sidebar */
  --ink-2:      #213047;
  --ink-soft:   #4D5C72;       /* secondary text */
  --paper:      #FAF7F0;       /* cream — body background */
  --paper-2:    #F4EFE3;       /* slightly warmer cream — inset surfaces */
  --card:       #FFFFFF;       /* card surface */
  --line:       #E8E2D2;       /* divider lines */
  --line-2:     #DCD4C0;
  --gold:       #B58B3F;       /* primary accent */
  --gold-soft:  #D9B97C;
  --gold-bg:    #F4ECDA;
  --positive:   #2F6F50;
  --positive-bg:#E5EFE9;
  --negative:   #A33A3A;
  --negative-bg:#F4E3E1;
  --warn:       #B97A1B;
  --warn-bg:    #FAEED7;
  --info:       #2B5475;
  --info-bg:    #E2EBF3;
  --shadow:     0 1px 2px rgba(14,31,54,0.04), 0 4px 16px rgba(14,31,54,0.05);
  --shadow-lg:  0 8px 32px rgba(14,31,54,0.10);
  --radius:     6px;
  --radius-lg:  10px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  color: var(--ink);
}
h1 { font-size: 2.0rem; line-height: 1.15; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; font-weight: 600; }

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

code, pre {
  font-family: 'JetBrains Mono', Menlo, Consolas, monospace;
  font-size: 0.85em;
}

/* =============================================================================
   LOGIN
   ============================================================================= */
.login-body {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  background: linear-gradient(135deg, var(--ink) 0%, #1a2e4a 100%);
  padding: 2rem;
}
.login-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 880px;
  width: 100%;
  background: var(--paper);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  min-height: 460px;
}
.login-mark {
  background: linear-gradient(160deg, var(--ink) 0%, var(--ink-2) 100%);
  color: var(--paper);
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}
.login-mark::after {
  content: '';
  position: absolute;
  inset: auto 2.5rem 2rem;
  height: 1px;
  background: var(--gold);
  width: 36px;
}
.login-monogram {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3rem;
  font-weight: 600;
  color: var(--gold-soft);
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}
.login-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  margin-bottom: 0.25rem;
}
.login-tag { color: var(--gold-soft); font-size: 0.85rem; letter-spacing: 0.05em; text-transform: uppercase; }
.login-card {
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-card h1 { font-size: 1.6rem; margin-bottom: 0.25rem; }
.login-card .muted { color: var(--ink-soft); margin-bottom: 1.5rem; }
.login-card label { display: block; margin-bottom: 1rem; }
.login-card label span { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); display: block; margin-bottom: 0.4rem; }
.login-card input { width: 100%; padding: 0.7rem 0.9rem; border: 1px solid var(--line-2); background: var(--card); border-radius: var(--radius); font-size: 0.95rem; }
.login-card input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-bg); }
@media (max-width: 720px) { .login-shell { grid-template-columns: 1fr; } .login-mark { padding: 2rem; } }

.alert { padding: 0.7rem 0.9rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: 0.875rem; border: 1px solid; }
.alert-error { background: var(--negative-bg); border-color: var(--negative); color: var(--negative); }
.alert-warn  { background: var(--warn-bg); border-color: var(--warn); color: var(--warn); }
.alert-info  { background: var(--info-bg); border-color: var(--info); color: var(--info); }
.alert-success { background: var(--positive-bg); border-color: var(--positive); color: var(--positive); }
.small { font-size: 0.8rem; }

/* =============================================================================
   APP SHELL (sidebar + main)
   ============================================================================= */
body { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }

.sidebar {
  background: var(--ink);
  color: rgba(255,255,255,0.85);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  padding: 1.4rem 1.25rem 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.brand-mark {
  width: 38px; height: 38px;
  border-radius: 6px;
  background: var(--gold);
  color: var(--ink);
  display: grid; place-items: center;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.04em;
}
.brand-name { font-family: 'Cormorant Garamond', serif; font-size: 1.05rem; color: #fff; line-height: 1.1; }
.brand-sub { font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255,255,255,0.5); margin-top: 2px; }

.nav { padding: 0.75rem 0.5rem; flex: 1; }
.nav-section {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.4);
  padding: 1rem 0.75rem 0.4rem;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.75rem;
  color: rgba(255,255,255,0.8);
  border-radius: 6px;
  margin: 1px 0;
  font-size: 0.875rem;
  transition: background 0.12s, color 0.12s;
}
.nav-link:hover { background: rgba(255,255,255,0.05); color: #fff; text-decoration: none; }
.nav-link.active { background: rgba(181,139,63,0.16); color: var(--gold-soft); }
.nav-i { display: inline-block; width: 16px; text-align: center; font-size: 0.85rem; color: var(--gold-soft); opacity: 0.7; }
.nav-link.active .nav-i { opacity: 1; }

.sidebar-footer {
  padding: 1rem 1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.user-pill {
  display: flex; gap: 0.6rem; align-items: center; font-size: 0.78rem;
}
.user-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--positive); box-shadow: 0 0 0 3px rgba(47,111,80,0.2); }
.user-name { color: rgba(255,255,255,0.85); }
.user-logout { color: var(--gold-soft); font-size: 0.72rem; }

/* Main area */
.main { padding: 0; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.9rem 2rem;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.crumbs {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  color: var(--ink);
}
.topbar-actions { display: flex; align-items: center; gap: 0.75rem; }
.topbar-date { font-size: 0.78rem; color: var(--ink-soft); }
.save-status { font-size: 0.75rem; color: var(--ink-soft); min-width: 80px; }

.view { padding: 2rem; max-width: 1400px; width: 100%; }

.loading { display: grid; place-items: center; padding: 4rem; color: var(--ink-soft); gap: 1rem; }
.spinner {
  width: 28px; height: 28px;
  border: 2px solid var(--line);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =============================================================================
   CARDS, BUTTONS, FORMS
   ============================================================================= */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 1.25rem; }
.card-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}
.card-head h2, .card-head h3 { margin: 0; }
.card-head-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.btn-primary, .btn-secondary, .btn-ghost, .ghost, button.danger {
  font: inherit;
  padding: 0.55rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  border: 1px solid transparent;
  transition: all 0.12s;
  font-size: 0.85rem;
  font-weight: 500;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.btn-primary:hover { background: var(--ink-2); }
.btn-secondary {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}
.btn-secondary:hover { background: var(--gold-soft); }
.btn-ghost, .ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-2);
}
.btn-ghost:hover, .ghost:hover { background: var(--paper-2); border-color: var(--ink-soft); }
button.danger {
  background: transparent;
  color: var(--negative);
  border-color: var(--negative);
}
button.danger:hover { background: var(--negative-bg); }
button:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-link {
  background: none;
  border: none;
  color: var(--gold);
  cursor: pointer;
  padding: 0;
  font: inherit;
}
.btn-link:hover { text-decoration: underline; }

input, select, textarea {
  font: inherit;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--line-2);
  background: var(--card);
  border-radius: var(--radius);
  color: var(--ink);
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-bg);
}
textarea { font-family: 'Inter', sans-serif; resize: vertical; min-height: 80px; }
.field { margin-bottom: 0.85rem; }
.field label, .field-label { font-size: 0.75rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.05em; display: block; margin-bottom: 0.3rem; font-weight: 500; }
.field-row { display: flex; gap: 0.75rem; }
.field-row > .field { flex: 1; }

/* Toggle switch */
.toggle {
  display: inline-flex; align-items: center; gap: 0.6rem;
  cursor: pointer;
  user-select: none;
}
.toggle-track {
  width: 36px; height: 20px;
  background: var(--line-2);
  border-radius: 999px;
  position: relative;
  transition: background 0.15s;
}
.toggle-track::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  top: 2px; left: 2px;
  transition: left 0.15s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle input:checked + .toggle-track { background: var(--ink); }
.toggle input:checked + .toggle-track::after { left: 18px; }
.toggle-label { font-size: 0.85rem; color: var(--ink); }

/* =============================================================================
   TABLES
   ============================================================================= */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.table th, .table td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.table thead th {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--paper-2);
  border-bottom: 1px solid var(--line-2);
  position: sticky;
  top: 0;
  z-index: 1;
}
.table tbody tr:hover { background: var(--paper-2); }
.table tbody tr.subtotal { background: var(--paper-2); font-weight: 600; }
.table tbody tr.total {
  background: var(--gold-bg);
  font-weight: 700;
  border-top: 2px solid var(--gold);
}
.table .num, .num { font-variant-numeric: tabular-nums; text-align: right; font-family: 'JetBrains Mono', monospace; font-size: 0.82rem; }
.table .neg { color: var(--negative); }
.table .pos { color: var(--positive); }
.table .editable input,
.table .editable select { padding: 0.3rem 0.4rem; font-size: 0.85rem; min-width: 0; }
.table th.actions, .table td.actions { width: 1%; white-space: nowrap; }

.table-wrap { overflow-x: auto; max-width: 100%; }
.table-wrap.scroll { max-height: 60vh; overflow-y: auto; }

/* =============================================================================
   KPI TILES
   ============================================================================= */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
}
.kpi::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--gold);
}
.kpi-label {
  font-size: 0.72rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
  margin-bottom: 0.35rem;
}
.kpi-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
}
.kpi-sub {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: var(--ink-soft);
}
.kpi-sub.pos { color: var(--positive); }
.kpi-sub.neg { color: var(--negative); }

/* =============================================================================
   GRID HELPERS
   ============================================================================= */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 920px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.row { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.row.spread { justify-content: space-between; }
.spacer { flex: 1; }

.muted { color: var(--ink-soft); }
.tag {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  background: var(--paper-2);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 0.72rem;
  color: var(--ink-soft);
  font-weight: 500;
}
.tag.gold { background: var(--gold-bg); border-color: var(--gold-soft); color: var(--gold); }
.tag.green { background: var(--positive-bg); border-color: var(--positive); color: var(--positive); }
.tag.red { background: var(--negative-bg); border-color: var(--negative); color: var(--negative); }
.tag.blue { background: var(--info-bg); border-color: var(--info); color: var(--info); }
.tag.warn { background: var(--warn-bg); border-color: var(--warn); color: var(--warn); }

/* =============================================================================
   MODALS
   ============================================================================= */
.modal-root { position: fixed; inset: 0; z-index: 1000; pointer-events: none; }
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(14, 31, 54, 0.50);
  display: grid; place-items: center;
  pointer-events: auto;
  padding: 2rem;
  animation: fadeIn 0.15s;
}
@keyframes fadeIn { from { opacity: 0; } }
.modal {
  background: var(--paper);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.modal.large { max-width: 900px; }
.modal.xlarge { max-width: 1200px; }
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--line);
  background: var(--card);
}
.modal-head h3 { margin: 0; }
.modal-close {
  background: none; border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--ink-soft);
  padding: 0;
  line-height: 1;
  width: 28px; height: 28px;
  border-radius: 4px;
}
.modal-close:hover { background: var(--paper-2); color: var(--ink); }
.modal-body { padding: 1.5rem; overflow-y: auto; flex: 1; }
.modal-foot {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--line);
  display: flex; gap: 0.5rem; justify-content: flex-end;
  background: var(--card);
}

/* =============================================================================
   TOASTS
   ============================================================================= */
.toast-root {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  display: flex; flex-direction: column; gap: 0.5rem;
  z-index: 2000;
}
.toast {
  background: var(--ink);
  color: var(--paper);
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  box-shadow: var(--shadow-lg);
  min-width: 240px;
  animation: slideUp 0.15s;
  border-left: 3px solid var(--gold);
}
.toast.error { border-left-color: var(--negative); }
.toast.success { border-left-color: var(--positive); }
@keyframes slideUp { from { transform: translateY(8px); opacity: 0; } }

/* =============================================================================
   FILE DROPZONE
   ============================================================================= */
.dropzone {
  border: 2px dashed var(--line-2);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  background: var(--paper-2);
  transition: all 0.15s;
  cursor: pointer;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--gold);
  background: var(--gold-bg);
}
.dropzone-hint { font-size: 0.8rem; color: var(--ink-soft); margin-top: 0.25rem; }

/* =============================================================================
   CHARTS
   ============================================================================= */
.chart-box {
  position: relative;
  height: 280px;
}
.chart-box.tall { height: 360px; }

/* =============================================================================
   PRESENTATION MODE (key initiatives → AI presentation)
   ============================================================================= */
.presentation-mode {
  position: fixed; inset: 0;
  background: var(--paper);
  z-index: 1500;
  display: flex; flex-direction: column;
}
.presentation-head {
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
}
.presentation-stage {
  flex: 1;
  display: grid; place-items: center;
  padding: 2rem;
  overflow-y: auto;
}
.slide {
  background: var(--card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 980px;
  min-height: 540px;
  padding: 3rem 4rem;
  box-shadow: var(--shadow-lg);
  font-family: 'Inter', sans-serif;
  color: var(--ink);
  display: none;
}
.slide.active { display: flex; flex-direction: column; }
.slide h1, .slide h2 { font-family: 'Cormorant Garamond', serif; }
.slide h1 { font-size: 2.6rem; margin-bottom: 0.6rem; }
.slide h2 { font-size: 1.7rem; color: var(--gold); margin-bottom: 1.25rem; }
.slide ul { padding-left: 1.2rem; line-height: 1.7; }
.slide ul li { margin-bottom: 0.4rem; }
.slide.title-slide {
  text-align: center;
  align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--ink) 0%, var(--ink-2) 100%);
  color: var(--paper);
}
.slide.title-slide h1 { color: var(--paper); font-size: 3rem; }
.slide.title-slide .meta { color: var(--gold-soft); }
.slide-counter { font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; color: var(--ink-soft); }

/* =============================================================================
   INITIATIVES KANBAN-LIKE LAYOUT
   ============================================================================= */
.initiative-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}
.initiative {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex; flex-direction: column;
  gap: 0.5rem;
}
.initiative-title { font-family: 'Cormorant Garamond', serif; font-size: 1.25rem; font-weight: 600; }
.initiative-meta { font-size: 0.78rem; color: var(--ink-soft); }
.initiative-files { font-size: 0.78rem; }
.initiative-actions { display: flex; gap: 0.5rem; margin-top: auto; padding-top: 0.5rem; }

/* =============================================================================
   PIPELINE FUNNEL
   ============================================================================= */
.funnel { display: grid; gap: 0.5rem; padding: 1rem 0; }
.funnel-row {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  align-items: center;
  gap: 1rem;
}
.funnel-bar {
  height: 30px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-soft) 100%);
  border-radius: 4px;
  display: flex; align-items: center; padding-left: 0.7rem;
  color: var(--ink); font-weight: 600; font-size: 0.85rem;
}

/* =============================================================================
   INVESTMENTS GRID
   ============================================================================= */
.inv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.inv-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex; flex-direction: column; gap: 0.4rem;
}
.inv-card .inv-name { font-family: 'Cormorant Garamond', serif; font-size: 1.2rem; font-weight: 600; }
.inv-card .inv-mgr  { font-size: 0.85rem; color: var(--ink-soft); }
.inv-card .inv-tags { display: flex; gap: 0.3rem; flex-wrap: wrap; margin-top: 0.4rem; }
.inv-card .inv-summary { font-size: 0.82rem; color: var(--ink-soft); margin-top: 0.5rem; line-height: 1.45; }

/* =============================================================================
   SCROLLBARS (subtle)
   ============================================================================= */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 5px; border: 2px solid var(--paper); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-soft); }

/* Print refinement (for printing initiative presentations) */
@media print {
  .sidebar, .topbar, .modal-root, .toast-root { display: none !important; }
  body { display: block; }
  .view { padding: 0; }
}

/* Mobile fallback (sidebar collapses) */
@media (max-width: 720px) {
  body { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .view { padding: 1rem; }
}

/* =============================================================================
   QUARTERLY ACTUALS
   ============================================================================= */
.actuals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
  padding: 1rem;
}
.actuals-card {
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: flex; flex-direction: column; gap: 0.6rem;
}
.actuals-card.locked {
  background: rgba(14, 31, 54, 0.04);
  border-color: var(--ink-soft);
  opacity: 0.92;
}
.ac-head {
  display: flex; justify-content: space-between; align-items: center;
}
.ac-key {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
}
.ac-actions { display: flex; gap: 0.4rem; }
.ac-section {
  border-top: 1px solid var(--line-1);
  padding-top: 0.6rem;
  display: flex; flex-direction: column; gap: 0.4rem;
}
.ac-section:first-of-type { border-top: 0; padding-top: 0; }
.ac-section-title {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 0.8rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.ac-field {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0.5rem;
}
.ac-field input {
  width: 130px;
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--paper);
}
.ac-field input:disabled {
  background: rgba(14, 31, 54, 0.04);
  color: var(--ink-soft);
  cursor: not-allowed;
}
.actuals-card textarea {
  width: 100%;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  padding: 0.4rem;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--paper);
  resize: vertical;
}
.actuals-card textarea:disabled {
  background: rgba(14, 31, 54, 0.04);
  color: var(--ink-soft);
}
th.q-locked {
  background: rgba(14, 31, 54, 0.06);
  color: var(--ink);
}

/* =============================================================================
   FORECAST ASSUMPTIONS — form-grid + hire list
   ============================================================================= */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}
.form-field {
  display: flex; flex-direction: column; gap: 0.25rem;
}
.form-field input {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
}
.hire-list { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 0.6rem; }
.hire-row {
  display: grid;
  grid-template-columns: 100px 1fr 130px auto;
  gap: 0.5rem; align-items: center;
}
.hire-row input {
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  background: var(--paper);
}

/* =============================================================================
   VERSIONS
   ============================================================================= */
.snap-list {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--line-1);
}
.snap-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--line-1);
  gap: 1rem;
}
.snap-row:hover { background: rgba(14, 31, 54, 0.02); }
.snap-label { font-weight: 500; color: var(--ink); }
.snap-actions { display: flex; gap: 0.4rem; flex-shrink: 0; }
.snap-kind {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.snap-kind.kind-auto    { background: rgba(14, 31, 54, 0.08); color: var(--ink-soft); }
.snap-kind.kind-manual  { background: rgba(181, 139, 63, 0.15); color: var(--gold); }
.snap-kind.kind-close   { background: rgba(20, 130, 90, 0.12); color: var(--positive, #14825a); }

/* btn-tiny if not already present */
.btn-tiny {
  padding: 0.25rem 0.55rem;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--ink-soft);
}
.btn-ghost:hover { color: var(--ink); border-color: var(--ink-soft); }
