/* ============================================================
   AD AeroReg — Stylesheet v1.0
   Brand: #25064d | #1a6daf | #25abbe | #fdcd12 | #f45eac
============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
 /* ── Logo colors — uncomment to restore ──
  --bg:           #0e0220;
  --surface:      #1a0535;
  --surface2:     #240a4a;
  --card:         #1e0840;
  --border:       #3a1560;
  --border2:      #4d2280;
  --purple:       #25064d;
  --blue:         #1a6daf;
  --teal:         #25abbe;
  --gold:         #fdcd12;
  --gold-dark:    #c9a30e;
  --pink:         #f45eac;
  --green:        #27ae60;
  --red:          #c0392b;
  --orange:       #e67e22;
  --text:         #f0e8ff;
  --text-muted:   #9a7abf;
  --text-dim:     #6a5090;
  ── end logo colors ── */

  /* ── Classic dark theme (active) ── */
  --bg:           #1a1a2e;
  --surface:      #16213e;
  --surface2:     #0f3460;
  --card:         #16213e;
  --border:       #0f3460;
  --border2:      #1a4a8a;
  --purple:       #0f3460;
  --blue:         #1a6daf;
  --teal:         #00b4d8;
  --gold:         #e94560;
  --gold-dark:    #c73652;
  --gold-fill:    #edcb84;
  --pink:         #e94560;
  --green:        #27ae60;
  --red:          #c0392b;
  --orange:       #e67e22;
  --text:         #eaeaea;
  --text-muted:   #a0a0b0;
  --text-dim:     #606080;

  /* ── Layout & fonts — always active ── */
  --mono:         'IBM Plex Mono', 'Courier New', monospace;
  --sans:         'Inter', system-ui, -apple-system, sans-serif;
  --sidebar-w:    220px;
  --topbar-h:     52px;
  --radius:       8px;     /* cards, panels, modals */
  --radius-sm:    6px;     /* buttons, inputs, badges */
  --radius-pill:  999px;   /* genuine status pills only */
}

/* ============================================================
   LIGHT THEME — activates automatically when OS is light mode
   ADD this block immediately after the closing } above
   ============================================================ */

/* Light mode vars — html[data-theme="light"] (resolved from the user's Light/Dark/Auto pref by the
   FOUC setter in header.php; NOT @media, which would override a manual Dark choice). theme.css loads
   AFTER this and wins for any shared var. */
html[data-theme="light"] {
    --bg:           #f0f4f8;
    --surface:      #ffffff;
    --surface2:     #e8edf4;
    --card:         #ffffff;
    --border:       #d0dae6;
    --border2:      #b0bece;
    --purple:       #1e3a5f;
    --blue:         #1a6daf;
    --teal:         #0077a8;
    --gold:         #c0392b;
    --gold-dark:    #a93226;
    --pink:         #c0392b;
    --green:        #1e8449;
    --red:          #c0392b;
    --orange:       #d35400;
    --text:         #1a1a2e;
    --text-muted:   #4a5a70;
    --text-dim:     #8a9bb0;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--sans); min-height: 100vh; line-height: 1.55; -webkit-font-smoothing: antialiased; letter-spacing: -.005em; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-dark); }
button { cursor: pointer; font-family: var(--sans); }
input, select, textarea { font-family: var(--sans); }
/* Data tokens (P/N, S/N, numbers, dates, indexes) stay monospace for alignment + the instrument feel. */
.mono { font-family: var(--mono); font-feature-settings: "tnum"; }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

/* ── App Shell ───────────────────────────────────────────── */
.app-shell { display: flex; min-height: 100vh; }

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w); height: 100vh; min-height: 100vh; background: var(--purple);
  border-right: 1px solid var(--border); display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; z-index: 200; transition: transform .25s;
}
.sidebar-logo {
  display: flex; align-items: center; gap: 10px; padding: 16px 14px;
  border-bottom: 1px solid var(--border); background: var(--surface);
}
.sidebar-logo-img { width: 38px; height: 38px; flex-shrink: 0; }
.sidebar-title { font-family: var(--sans); font-size: 16px; font-weight: 400; letter-spacing: .05em; color: var(--gold); text-transform: uppercase; }
.sidebar-sub { font-size: 9px; color: var(--text-muted); letter-spacing: .05em; font-family: var(--sans); text-transform: uppercase; }
.sidebar-nav { flex: 1; padding: 12px 0; overflow-y: auto; }
.nav-group-label { font-family: var(--sans); font-size: 9px; letter-spacing: .07em; color: var(--text-dim); text-transform: uppercase; padding: 16px 14px 4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 14px;
  color: var(--text-muted); font-family: var(--sans); font-size: 13px; letter-spacing: 0; font-weight: 500;
  transition: all .15s; border-left: 3px solid transparent;
}
.nav-item:hover { background: rgba(255,255,255,.05); color: var(--text); }
.nav-item.active { background: rgba(253,205,18,.08); color: var(--gold); border-left-color: var(--gold); }
.sidebar-user {
  padding: 12px 14px; border-top: 1px solid var(--border); display: flex;
  align-items: center; gap: 8px; background: var(--surface);
}
.sidebar-user-avatar { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--sans); font-size: 12px; font-weight: 500; color: #000; flex-shrink: 0; }
.sidebar-user-name { font-size: 11px; color: var(--text); font-family: var(--sans); font-weight: 400; }
.sidebar-user-role { font-size: 9px; color: var(--text-muted); font-family: var(--sans); letter-spacing: .05em; text-transform: uppercase; }
.sidebar-logout { margin-left: auto; color: var(--text-muted); font-size: 16px; padding: 4px; transition: color .15s; }
.sidebar-logout:hover { color: var(--red); }

/* ── Topbar ──────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h); background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px; padding: 0 20px;
  position: fixed; top: 0; left: var(--sidebar-w); right: 0; z-index: 100;
}
.topbar-toggle { display: none; background: none; border: none; color: var(--text-muted); font-size: 20px; }
.topbar-title { flex: 1; font-family: var(--sans); font-size: 15px; font-weight: 600; letter-spacing: -.005em; color: var(--text); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-notif { position: relative; background: none; border: 1px solid var(--border2); color: var(--text-muted); padding: 5px 10px; border-radius: var(--radius); transition: all .15s; }
.topbar-notif:hover { border-color: var(--gold); color: var(--gold); }
.notif-badge { position: absolute; top: -6px; right: -6px; background: var(--pink); color: #fff; font-size: 9px; min-width: 16px; height: 16px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-family: var(--sans); font-weight: 400; }
.topbar-profile { font-family: var(--sans); font-size: 12px; color: var(--text-muted); letter-spacing: .02em; }

/* ── Notification panel ──────────────────────────────────── */
.notif-panel {
  position: fixed; top: var(--topbar-h); right: 0; width: 340px; max-height: 60vh;
  background: var(--surface2); border: 1px solid var(--border2); border-top: none;
  z-index: 150; display: none; overflow-y: auto;
}
.notif-panel.open { display: block; }
.notif-panel-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface); }
.notif-panel-header span { font-family: var(--sans); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--gold); }
.notif-panel-header button { background: none; border: 1px solid var(--border2); color: var(--text-muted); font-size: 10px; padding: 3px 8px; font-family: var(--sans); letter-spacing: .02em; }
.notif-item { padding: 12px 14px; border-bottom: 1px solid var(--border); transition: background .15s; }
.notif-item:hover { background: rgba(253,205,18,.05); }
.notif-item.unread { border-left: 3px solid var(--gold); }
.notif-item-title { font-size: 12px; color: var(--text); margin-bottom: 4px; }
.notif-item-msg { font-size: 11px; color: var(--text-muted); line-height: 1.5; }
.notif-item-time { font-size: 10px; color: var(--text-dim); margin-top: 4px; }

/* ── Main content ────────────────────────────────────────── */
.main-content { margin-left: var(--sidebar-w); padding-top: var(--topbar-h); min-height: 100vh; }
.page-content { padding: 24px; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.page-header h1 { font-family: var(--sans); font-size: 21px; font-weight: 600; letter-spacing: -.01em; color: var(--text); }
.page-header p { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
/* TD-18 wayfinding — the "you are here" breadcrumb band (see breadcrumb() in includes/functions.php) */
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 12px; margin: 0 0 14px; line-height: 1.4; }
.crumbs .crumb { color: var(--text-muted); text-decoration: none; }
.crumbs a.crumb:hover { color: var(--gold); text-decoration: underline; }
.crumbs .crumb-current { color: var(--text); font-weight: 600; }
.crumbs .crumb-sep { color: var(--text-dim); user-select: none; }
/* TD-17 — the shared "Assets" lens tab-bar (My Assets · Fleet · Lease contracts) at the top of all three surfaces */
.tab-bar.asset-lens { margin: 0 0 18px; }
/* Timeline v2 (S78) — RUNWAY (lease contract page): the lease as a JOURNEY. Tarmac = the term; gold chevrons
   = Delivery→Redelivery; img/plane-top.png = the 'today' marker taxiing right with a gold elapsed trail;
   maintenance = taxiway loops off the runway. (Retires the interim shared .mx-* band; the asset profile uses
   the .gantt-* CATEGORY GANTT below.) */
.runway-wrap { margin: 0 0 16px; padding: 12px 14px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--cockpit-shadow); }
.runway-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.runway-head h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--head); margin: 0; }
.runway-svg { width: 100%; height: auto; display: block; }
.rw-svg-gold { stroke: var(--gold); }
.rw-loop { cursor: pointer; }
.rw-loop-lbl { fill: var(--text-muted); font-family: var(--sans); }
.rw-scale { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 10px; color: var(--text-dim); font-family: var(--mono); margin-top: 6px; }
.rw-scale .rw-mid { color: var(--gold); font-weight: 600; }
.rw-more { cursor: pointer; color: var(--gold); font-size: 11px; white-space: nowrap; }
.rw-empty { font-size: 12px; color: var(--text-muted); margin-top: 8px; }

/* Timeline v2 (S78) — CATEGORY GANTT (asset profile / maintenance planner): rows per system, bars on a
   shared rolling-window axis. A PLAN view — "what's due across every system, when, how long out of service". */
.gantt-wrap { margin: 0 0 16px; padding: 12px 14px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--cockpit-shadow); }
.gantt-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.gantt-head h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--head); margin: 0; }
.gantt-body { position: relative; display: flex; flex-direction: column; gap: 6px; }
.gantt-row { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 10px; }
.gantt-rowlabel { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); text-align: right; line-height: 1.2; }
.gantt-track { position: relative; height: 30px; border-radius: 6px; background: var(--card-head-bg); }
.gantt-today { position: absolute; top: -3px; bottom: -3px; width: 0; border-left: 2px dashed var(--gold); z-index: 1; }
.gantt-bar { position: absolute; top: 4px; height: 22px; min-width: 22px; border: 1.5px solid; border-radius: 6px; display: flex; align-items: center; gap: 5px; padding: 0 7px; overflow: hidden; white-space: nowrap; box-shadow: 0 1px 3px rgba(0,0,0,.12); transition: transform .1s; z-index: 2; }
.gantt-bar:hover { transform: translateY(-1px); z-index: 4; }
.gantt-ic { display: inline-flex; align-items: center; line-height: 1; flex: none; }
.gantt-ic svg { display: block; }
.gantt-lbl { font-size: 11px; color: var(--text); overflow: hidden; text-overflow: ellipsis; }
.gantt-point { width: 26px; padding: 0; justify-content: center; border-radius: 50%; }
.gantt-point .gantt-lbl { display: none; }
.gantt-derived { opacity: .75; border-style: dashed; background: rgba(136,146,160,.10) !important; box-shadow: none; cursor: default; }
.gantt-axis { display: grid; grid-template-columns: 92px 1fr; gap: 10px; margin-top: 8px; }
.gantt-axis-scale { position: relative; display: flex; justify-content: space-between; font-size: 10px; color: var(--text-dim); font-family: var(--mono); }
.gantt-axis-now { position: absolute; transform: translateX(-50%); color: var(--gold); font-weight: 600; }
.gantt-empty { font-size: 12px; color: var(--text-muted); margin-top: 8px; }

/* ── Auth pages ──────────────────────────────────────────── */
.auth-content { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); padding: 24px; position: relative; overflow: hidden; }
.auth-card { background: var(--surface); border: 1px solid var(--border2); width: 100%; max-width: 420px; padding: 0; position: relative; z-index: 1; }
.auth-card-header { padding: 24px 28px; border-bottom: 1px solid var(--border); background: var(--purple); text-align: center; }
.auth-logo { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 10px; }
.auth-logo img { width: 48px; height: 48px; }
.auth-logo-title { font-family: var(--sans); font-size: 22px; font-weight: 500; letter-spacing: .04em; color: var(--gold); text-transform: uppercase; }
.auth-logo-sub { font-size: 9px; color: var(--text-muted); letter-spacing: .05em; font-family: var(--sans); text-transform: uppercase; }
.auth-card-body { padding: 28px; }
.auth-radar { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
#bgCanvas { width: 100%; height: 100%; }

/* ── Cards ───────────────────────────────────────────────── */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(0,0,0,.28), 0 6px 18px rgba(0,0,0,.20); }
.card-header { padding: 13px 18px; border-bottom: 1px solid var(--border); background: var(--card-head-bg); border-radius: var(--radius) var(--radius) 0 0; display: flex; align-items: center; justify-content: space-between; }
.card-header h2 { font-family: var(--sans); font-size: 13.5px; font-weight: 600; letter-spacing: 0; color: var(--text); }
.card-body { padding: 18px; }

/* ── Detail list — canonical label/value spec rows (platform-wide) ──────────
   Baseline-aligned so each label lines up with the FIRST line of its value;
   the divider sits on the whole ROW, so it never goes ragged when a value
   wraps to multiple lines or carries a pill/badge. Use everywhere we show
   label → value detail (replaces ad-hoc 2-column grids). */
.detail-list { display: flex; flex-direction: column; }
.detail-row {
  display: flex; gap: 16px; align-items: baseline;
  padding: 11px 0; border-bottom: 1px solid var(--border);
}
.detail-row:first-child { padding-top: 0; }
.detail-row:last-child  { padding-bottom: 0; border-bottom: none; }
.detail-k { flex: 0 0 165px; font-size: 10px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); }
.detail-v { flex: 1 1 auto; min-width: 0; font-size: 13.5px; color: var(--text); line-height: 1.5; }
.detail-v.mono { font-family: var(--mono); font-weight: 600; }
@media (max-width: 560px) { .detail-row { flex-direction: column; gap: 3px; align-items: stretch; } .detail-k { flex-basis: auto; } }

/* ── Forms ───────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label { font-family: var(--sans); font-size: 10px; font-weight: 600; letter-spacing: .04em; color: var(--text-muted); text-transform: uppercase; }
.form-label.required::after { content: ' *'; color: var(--pink); }
.form-control {
  background: var(--bg); border: 1px solid var(--border2); color: var(--text);
  font-family: var(--sans); font-size: 13.5px; padding: 9px 12px; outline: none;
  transition: border-color .15s, box-shadow .15s; width: 100%; border-radius: var(--radius-sm);
  color-scheme: dark;
}
.form-control:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(226,185,111,.12); }
.form-control:disabled { opacity: .5; cursor: not-allowed; }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-hint { font-size: 10px; color: var(--text-dim); margin-top: 3px; }
.form-error-msg { background: rgba(192,57,43,.12); border: 1px solid rgba(192,57,43,.3); color: #e74c3c; font-size: 12px; padding: 8px 12px; border-radius: var(--radius); display: none; margin-bottom: 14px; }
.form-error-msg.show { display: block; }
.form-section { margin-bottom: 28px; }
.form-section-title { font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: 0; color: var(--text); margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.form-section-title::before { content: ''; width: 4px; height: 4px; background: var(--gold); display: inline-block; flex-shrink: 0; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn { font-family: var(--sans); font-size: 13px; letter-spacing: 0; font-weight: 550; text-transform: none; padding: 9px 16px; border: none; border-radius: var(--radius-sm); transition: all .15s; display: inline-flex; align-items: center; gap: 6px; }
.btn-primary { background: var(--gold-fill); color: #000; }
/* Subtle lift on hover (brightness + soft shadow) — keeps the click affordance
   without the dated colour-swap. Gold stays the lighter --gold at rest. */
.btn-primary:hover { filter: brightness(1.05); box-shadow: 0 2px 12px rgba(237,203,132,.22); }
.btn-primary:active { filter: brightness(.97); box-shadow: none; }
.btn-secondary { background: transparent; color: var(--teal); border: 1px solid rgba(37,171,190,.3); }
.btn-secondary:hover { background: rgba(37,171,190,.1); }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border2); }
.btn-ghost:hover { color: var(--text); border-color: var(--text-muted); }
.btn-danger { background: transparent; color: var(--red); border: 1px solid rgba(192,57,43,.3); }
.btn-danger:hover { background: rgba(192,57,43,.1); }
.btn-success { background: var(--green); color: #fff; }
/* Filled neutral button — for a secondary row action (e.g. Edit) that needs a
   distinct background from the ghost View button. High contrast in both themes. */
.btn-edit { background: var(--surface2); color: var(--text); border: 1px solid var(--border2); }
.btn-edit:hover { border-color: var(--text-muted); filter: brightness(1.08); }
.btn-sm { padding: 5px 12px; font-size: 10px; }
.btn-xs { padding: 3px 8px; font-size: 9px; }
.btn-icon { padding: 6px 10px; }

/* ── Tables ──────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th { font-family: var(--sans); font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border2); background: var(--surface); white-space: nowrap; cursor: pointer; user-select: none; }
.data-table th:hover { color: var(--gold); }
.data-table th .sort-icon { margin-left: 4px; opacity: .4; }
.data-table th.sorted .sort-icon { opacity: 1; color: var(--gold); }
.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:hover td { background: rgba(253,205,18,.03); }
.data-table tr.clickable { cursor: pointer; }

/* ── Badges ──────────────────────────────────────────────── */
.badge { display: inline-block; white-space: nowrap; padding: 3px 10px; font-family: var(--sans); font-size: 10.5px; letter-spacing: .03em; font-weight: 600; text-transform: uppercase; border-radius: var(--radius-sm); }
.badge-available { background: rgba(39,174,96,.18); color: #2ecc71; border: 1px solid rgba(39,174,96,.35); }
.badge-gone { background: rgba(192,57,43,.18); color: #e74c3c; border: 1px solid rgba(192,57,43,.35); }
.badge-deal-available { background: rgba(26,109,175,.18); color: #3498db; border: 1px solid rgba(26,109,175,.35); }
.badge-deal-negotiations { background: rgba(230,126,34,.18); color: #e67e22; border: 1px solid rgba(230,126,34,.35); }
.badge-deal-loi { background: rgba(253,205,18,.18); color: var(--gold); border: 1px solid rgba(253,205,18,.35); }
.badge-deal-dropped { background: rgba(192,57,43,.15); color: #e74c3c; border: 1px solid rgba(192,57,43,.3); }
.badge-deal-sold { background: rgba(39,174,96,.2); color: #2ecc71; border: 1px solid rgba(39,174,96,.4); }
.badge-sv { background: rgba(39,174,96,.15); color: #27ae60; border: 1px solid rgba(39,174,96,.3); }
.badge-unsv { background: rgba(192,57,43,.15); color: #e74c3c; border: 1px solid rgba(192,57,43,.3); }
.badge-admin { background: rgba(253,205,18,.15); color: var(--gold); border: 1px solid rgba(253,205,18,.3); }
.badge-editor { background: rgba(37,171,190,.15); color: var(--teal); border: 1px solid rgba(37,171,190,.3); }
.badge-viewer { background: rgba(26,109,175,.15); color: var(--blue); border: 1px solid rgba(26,109,175,.3); }
.badge-pending { background: rgba(230,126,34,.15); color: var(--orange); border: 1px solid rgba(230,126,34,.3); }

/* ── Status selects with color preview ───────────────────── */
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 4px; }

/* ── Buyer chips ─────────────────────────────────────────── */
.buyer-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.buyer-chip { padding: 2px 10px; font-size: 10px; font-family: var(--sans); letter-spacing: .02em; border-radius: 2px; font-weight: 400; }

/* ── Dashboard ───────────────────────────────────────────── */
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card { background: var(--card); border: 1px solid var(--border); padding: 18px; border-left: 3px solid var(--gold); }
.stat-card-val { font-family: var(--sans); font-size: 36px; font-weight: 700; color: var(--gold); }
.stat-card-label { font-family: var(--sans); font-size: 10px; letter-spacing: .05em; color: var(--text-muted); text-transform: uppercase; margin-top: 4px; }
.stat-card.blue { border-left-color: var(--blue); }
.stat-card.blue .stat-card-val { color: var(--blue); }
.stat-card.teal { border-left-color: var(--teal); }
.stat-card.teal .stat-card-val { color: var(--teal); }
.stat-card.green { border-left-color: var(--green); }
.stat-card.green .stat-card-val { color: var(--green); }
.stat-card.red { border-left-color: var(--red); }
.stat-card.red .stat-card-val { color: var(--red); }
.stat-card.pink { border-left-color: var(--pink); }
.stat-card.pink .stat-card-val { color: var(--pink); }
.dashboard-panel { background: var(--card); border: 1px solid var(--border); }
.dashboard-panel-header { padding: 12px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.dashboard-panel-header h3 { font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: 0; color: var(--text); }
.dashboard-panel-body { padding: 14px 18px; max-height: 400px; overflow-y: auto; }
.reminder-item { padding: 10px 0; border-bottom: 1px solid var(--border); }
.reminder-item:last-child { border-bottom: none; }
.reminder-time { font-size: 10px; color: var(--gold); margin-bottom: 3px; }
.reminder-text { font-size: 12px; color: var(--text); }
.reminder-link { font-size: 11px; color: var(--teal); margin-top: 3px; display: block; }

/* ── Modals ──────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.75); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: var(--surface2); border: 1px solid var(--border2); width: 100%; max-width: 640px; max-height: 90vh; overflow-y: auto; border-radius: var(--radius); }
.modal-lg { max-width: 900px; }
.modal-xl { max-width: 1100px; }
.modal-supplymap { max-width: 1240px; }   /* #22 Supply Map — roomier so the map + supplier list breathe */
.modal-header { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: var(--surface2); z-index: 1; }
.modal-header h3 { font-family: var(--sans); font-size: 15px; font-weight: 600; letter-spacing: -.005em; color: var(--text); }
.modal-close { background: none; border: 1px solid var(--border2); color: var(--text-muted); width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; font-size: 16px; transition: all .15s; border-radius: var(--radius); }
.modal-close:hover { border-color: var(--red); color: var(--red); }
.modal-body { padding: 20px; }
.modal-footer { padding: 14px 18px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* ── Tabs ────────────────────────────────────────────────── */
.tab-bar { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab-btn { font-family: var(--sans); font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; padding: 10px 16px; background: none; border: none; border-bottom: 2px solid transparent; color: var(--text-muted); transition: all .15s; cursor: pointer; }
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── Engine blocks ───────────────────────────────────────── */
.engine-blocks { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.engine-block { background: var(--bg); border: 1px solid var(--border2); padding: 14px; }
.engine-block-title { font-family: var(--sans); font-size: 10px; letter-spacing: .05em; color: var(--teal); text-transform: uppercase; margin-bottom: 12px; border-bottom: 1px solid rgba(37,171,190,.2); padding-bottom: 6px; }

/* ── File upload area ────────────────────────────────────── */
.upload-area { border: 2px dashed var(--border2); padding: 24px; text-align: center; transition: border-color .15s; cursor: pointer; border-radius: var(--radius); }
.upload-area:hover, .upload-area.dragover { border-color: var(--gold); background: rgba(253,205,18,.04); }
.upload-area-icon { font-size: 28px; margin-bottom: 8px; }
.upload-area-text { font-family: var(--sans); font-size: 12.5px; letter-spacing: 0; color: var(--text-muted); }
.upload-area input { display: none; }
.file-list { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.file-item { display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--border); padding: 7px 10px; border-radius: var(--radius); }
.file-item-name { flex: 1; font-size: 11px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item-size { font-size: 10px; color: var(--text-dim); }
.file-item-remove { background: none; border: none; color: var(--red); font-size: 14px; padding: 0 4px; }

/* ── Negotiations log ────────────────────────────────────── */
.neg-log { display: flex; flex-direction: column; gap: 12px; }
.neg-entry { background: var(--bg); border: 1px solid var(--border); padding: 12px 14px; border-radius: var(--radius); }
.neg-entry-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.neg-entry-date { font-family: var(--sans); font-size: 10px; color: var(--gold); letter-spacing: .02em; }
.neg-entry-author { font-size: 10px; color: var(--text-muted); }
.neg-entry-text { font-size: 12px; line-height: 1.6; color: var(--text); white-space: pre-wrap; }
.neg-reminder { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 10px; color: var(--teal); }

/* ── Filters bar ─────────────────────────────────────────── */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 20px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--border); }
.filter-group { display: flex; align-items: center; gap: 6px; }
.filter-label { font-family: var(--sans); font-size: 9px; letter-spacing: .05em; color: var(--text-muted); text-transform: uppercase; white-space: nowrap; }
.filter-control { background: var(--card); border: 1px solid var(--border2); color: var(--text); font-family: var(--mono); font-size: 11px; padding: 5px 9px; outline: none; border-radius: var(--radius); }
.filter-control:focus { border-color: var(--gold); }
.filter-sep { width: 1px; height: 20px; background: var(--border2); }
.result-count { background: rgba(253,205,18,.1); color: var(--gold); border: 1px solid rgba(253,205,18,.25); padding: 3px 10px; font-family: var(--mono); font-size: 11px; border-radius: var(--radius); }

/* ── Toast ───────────────────────────────────────────────── */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: var(--surface2); border: 1px solid var(--border2); padding: 12px 18px; min-width: 260px; font-size: 12px; border-radius: var(--radius); pointer-events: all; transform: translateX(120%); opacity: 0; transition: all .3s; display: flex; align-items: center; gap: 10px; }
.toast.show { transform: translateX(0); opacity: 1; }
.toast.ok { border-left: 3px solid var(--green); }
.toast.err { border-left: 3px solid var(--red); }
.toast.warn { border-left: 3px solid var(--orange); }
.toast.info { border-left: 3px solid var(--teal); }

/* ── Loading spinner ─────────────────────────────────────── */
.spinner { width: 32px; height: 32px; border: 3px solid var(--border2); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Deal view ───────────────────────────────────────────── */
.deal-header { background: var(--surface2); border: 1px solid var(--border2); padding: 20px 24px; margin-bottom: 20px; display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.deal-title { font-family: var(--sans); font-size: 20px; font-weight: 600; letter-spacing: -.01em; color: var(--text); }
.deal-meta { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.deal-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.deal-party { background: var(--card); border: 1px solid var(--border); padding: 14px; }
.deal-party-label { font-family: var(--sans); font-size: 9px; letter-spacing: .05em; color: var(--text-muted); text-transform: uppercase; margin-bottom: 8px; }
.deal-party-name { font-family: var(--sans); font-size: 16px; font-weight: 400; color: var(--text); }

/* ── Public landing page ─────────────────────────────────── */
.landing-page { min-height: 100vh; background: var(--bg); display: flex; flex-direction: column; }
.landing-hero { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 24px; text-align: center; position: relative; }
.landing-logo { width: 100px; height: 100px; margin-bottom: 24px; }
.landing-title { font-family: var(--sans); font-size: 36px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.landing-subtitle { font-family: var(--sans); font-size: 14px; letter-spacing: .07em; color: var(--text-muted); text-transform: uppercase; margin-bottom: 48px; }
.landing-actions { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.landing-action { padding: 15px 32px; font-family: var(--sans); font-size: 14px; font-weight: 600; letter-spacing: 0; border-radius: var(--radius-sm); transition: all .2s; }
.landing-action-primary { background: var(--gold-fill); color: #000; }
.landing-action-primary:hover { filter: brightness(1.05); box-shadow: 0 4px 16px rgba(237,203,132,.25); color: #000; }
.landing-action-ghost { background: transparent; border: 2px solid var(--gold); color: var(--gold); }
.landing-action-ghost:hover { background: rgba(253,205,18,.1); }

/* ── Empty state ─────────────────────────────────────────── */
.empty-state { text-align: center; padding: 60px 24px; }
.empty-state-icon { font-size: 48px; margin-bottom: 12px; opacity: .3; }
.empty-state-text { font-family: var(--sans); font-size: 14px; letter-spacing: 0; color: var(--text-muted); }

/* ── Pagination ──────────────────────────────────────────── */
.pagination { display: flex; align-items: center; gap: 4px; margin-top: 16px; justify-content: center; flex-wrap: wrap; }
.page-btn { background: var(--card); border: 1px solid var(--border2); color: var(--text-muted); padding: 5px 10px; font-family: var(--sans); font-size: 11px; border-radius: var(--radius); transition: all .15s; }
.page-btn:hover { border-color: var(--gold); color: var(--gold); }
.page-btn.active { background: var(--gold-fill); color: #000; border-color: var(--gold-fill); font-weight: 700; }

/* ── LOI warning banner ──────────────────────────────────── */
.loi-banner { background: rgba(253,205,18,.1); border: 1px solid rgba(253,205,18,.3); border-left: 4px solid var(--gold); padding: 12px 16px; margin-bottom: 16px; display: flex; align-items: flex-start; gap: 10px; }
.loi-banner-icon { font-size: 18px; flex-shrink: 0; }
.loi-banner-text { font-size: 12px; line-height: 1.6; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .deal-parties { grid-template-columns: 1fr; }
  .form-grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .topbar { left: 0; }
  .main-content { margin-left: 0; }
  .topbar-toggle { display: block; }
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
  .engine-blocks { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .page-content { padding: 14px; }
  .landing-title { font-size: 24px; }
  .landing-actions { flex-direction: column; }
  .landing-action { padding: 14px 28px; }
}

/* ── Date / time input icons (calendar, clock) — dark mode fix ── */
input[type="date"].form-control,
input[type="datetime-local"].form-control,
input[type="time"].form-control,
input[type="month"].form-control {
  color-scheme: dark;
}
input[type="date"].form-control::-webkit-calendar-picker-indicator,
input[type="datetime-local"].form-control::-webkit-calendar-picker-indicator,
input[type="time"].form-control::-webkit-calendar-picker-indicator {
  filter: invert(0.8) sepia(0.2) saturate(2) hue-rotate(10deg) brightness(1.2);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity .15s;
}
input[type="date"].form-control::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"].form-control::-webkit-calendar-picker-indicator:hover,
input[type="time"].form-control::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

/* ── Password field wrapper with toggle eye ── */
.pw-wrap { position: relative; }
.pw-wrap .form-control { padding-right: 38px; }
.pw-toggle {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; padding: 2px 4px;
  color: #ffffff;
  display: none; align-items: center; justify-content: center;
  transition: color .15s; line-height: 1;
}
.pw-toggle:hover { color: var(--gold); }
html[data-theme="light"] .pw-toggle { color: #333333; }
html[data-theme="light"] .pw-toggle:hover { color: var(--gold); }

/* ── RMA extension sub-row (deal lists) ─────────────────────────────── */
/* An attached "↳ RMA" lineage row shown directly beneath its parent deal. */
.data-table tr.has-rma-ext > td { border-bottom: none; }      /* fuse parent to child */
.rma-ext-row > td { border-top: none; padding-top: 0; }
.rma-ext-spacer { width: 36px; background: transparent; }
.rma-ext-cell {
  padding: 4px 12px 11px 14px;
  background: linear-gradient(to right, rgba(253,205,18,.06), transparent 55%);
  border-left: 2px solid rgba(253,205,18,.55);
  white-space: nowrap;
}
.rma-ext-glyph { color: var(--text-dim); margin-right: 9px; font-size: 1rem; vertical-align: middle; }
.rma-ext-tag {
  font-family: var(--sans); font-size: 9px; font-weight: 800; letter-spacing: .09em;
  background: var(--gold-fill); color: #1a1a1a; padding: 2px 6px; border-radius: 4px; margin-right: 9px;
  vertical-align: middle;
}
.rma-ext-no {
  font-family: var(--mono); font-weight: 600; font-size: .82rem; color: var(--text);
  margin-right: 11px; vertical-align: middle;
}
.rma-ext-pill {
  font-family: var(--sans); font-size: .72rem; font-weight: 700;
  padding: 2px 10px; border-radius: 12px; margin-right: 12px; vertical-align: middle;
}
.rma-ext-amber  { background: rgba(214,158,46,.16); color: #b7791f; }
.rma-ext-blue   { background: rgba(52,152,219,.16); color: #2980b9; }
.rma-ext-purple { background: rgba(155,89,182,.16); color: #8e44ad; }
.rma-ext-green  { background: rgba(39,174,96,.16);  color: #27ae60; }
.rma-ext-red    { background: rgba(231,76,60,.16);  color: #e74c3c; }
.rma-ext-grey   { background: var(--surface); color: var(--text-muted); }
.rma-ext-link { font-size: .78rem; color: var(--teal); font-weight: 600; text-decoration: none; vertical-align: middle; }
.rma-ext-link:hover { text-decoration: underline; }
/* "It's your turn" badge — fires only for the party who owes the next action. */
.rma-ext-turn {
  display: inline-block; font-family: var(--sans); font-size: .68rem; font-weight: 700;
  letter-spacing: .02em; padding: 2px 9px; border-radius: var(--radius-pill);
  margin-right: 10px; vertical-align: middle; white-space: nowrap;
  background: rgba(231,76,60,.14); color: #e74c3c; border: 1px solid rgba(231,76,60,.35);
}
/* "Action needed" pulsing row dot — turn-signal on list rows (matches Module A asset deals). */
.row-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:#e5484d;margin-right:6px;vertical-align:middle;animation:rowpulse 1.5s infinite}
@keyframes rowpulse{0%,100%{opacity:1}50%{opacity:.4}}

/* ── Spine Slice 1 (S51): loud PMA / DER disclosure badges — amber, deliberately NOT the platform
   gold so they never blend in (owner-locked). Black text always; same chip in light + dark. ── */
.badge-pma, .badge-der {
  display: inline-block; padding: 1px 7px; border-radius: var(--radius-pill);
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em; line-height: 1.5;
  background: #f59e0b; color: #111; vertical-align: middle; white-space: nowrap;
}
.badge-der { background: #e8871e; }
.badge-pma[title], .badge-der[title] { cursor: help; }
/* S111 — the positive OEM counterpart (seller-declared). Green so it reads as reassurance, distinct from
   the amber PMA/DER caution and from the platform gold. Black text, same chip in light + dark. */
.badge-oem {
  display: inline-block; padding: 1px 7px; border-radius: var(--radius-pill);
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em; line-height: 1.5;
  background: #1e8449; color: #fff; vertical-align: middle; white-space: nowrap;
}
.badge-oem[title] { cursor: help; }

/* Help bubble (S62) — a ? circle revealing an explanation balloon on hover AND click (touch),
   custom-styled (NOT the native title tooltip). Reusable anywhere: helpq('text') in app.js builds it. */
.help-q { display:inline-flex; align-items:center; justify-content:center; width:15px; height:15px;
  margin-left:4px; border-radius:50%; border:1px solid var(--border2); color:var(--text-muted);
  font-size:10px; font-weight:700; line-height:1; cursor:help; position:relative; vertical-align:middle;
  user-select:none; }
.help-q:hover { border-color:var(--gold); color:var(--gold); }
/* the balloon is a SINGLE position:fixed element (js/app.js positions it at the bubble + clamps to the
   viewport) → never clipped by a scrolling modal, whatever row the bubble is on. */
#anHelpPop { display:none; position:fixed; z-index:99999; width:240px; max-width:80vw;
  background:var(--card); color:var(--text); border:1px solid var(--border2); border-radius:var(--radius-sm);
  padding:.5rem .6rem; font-size:.75rem; font-weight:400; line-height:1.4; text-align:left;
  box-shadow:0 6px 20px rgba(0,0,0,.5); white-space:normal; pointer-events:none; }

/* ============================================================
   Card-cockpit component layer (§G(2), S66)
   SCOPED under .an-cockpit + ck- prefix so it NEVER reskins the
   platform globally (incremental page-by-page mandate). Reused by
   the lease cockpit now; dashboard/marketplace next. Drives off the
   live theme vars → works in both light and the S64 slate dark.
   Reference: _dev/mockups/an_light_mockup.html (owner-approved S63).
============================================================ */
.an-cockpit { max-width: 1180px; }
.an-cockpit .ck-back { display:inline-flex; align-items:center; gap:6px; font-size:.82rem; font-weight:600;
  color:var(--text-muted); text-decoration:none; margin-bottom:.9rem; }
.an-cockpit .ck-back:hover { color:var(--gold); }

.an-cockpit .ck-grid { display:grid; gap:16px; grid-template-columns:repeat(3,1fr); }
.an-cockpit .ck-span { grid-column:1 / -1; }
@media (max-width:900px){ .an-cockpit .ck-grid { grid-template-columns:1fr; } }

.an-cockpit .ck-card { background:var(--card); border:1px solid var(--border); border-radius:var(--radius);
  box-shadow:var(--cockpit-shadow); padding:16px 18px; }
.an-cockpit .ck-card h3 { margin:0 0 12px; font-size:12px; text-transform:uppercase; letter-spacing:.07em;
  color:var(--head); font-weight:700; }
.an-cockpit .ck-card h3 .ck-note { text-transform:none; letter-spacing:0; font-weight:400; color:var(--text-muted); font-size:.72rem; }

.an-cockpit .ck-kv { display:flex; justify-content:space-between; gap:10px; padding:6px 0;
  border-bottom:1px solid var(--border); font-size:14px; }
.an-cockpit .ck-kv:last-child { border-bottom:0; }
.an-cockpit .ck-kv .k { color:var(--text-muted); }
.an-cockpit .ck-kv .v { font-weight:600; text-align:right; }
.an-cockpit .ck-lead { font-size:19px; font-weight:750; color:var(--text); letter-spacing:-.3px; }
.an-cockpit .ck-sub { color:var(--text-muted); font-size:12.5px; }
.an-cockpit .ck-big { font-size:24px; font-weight:750; letter-spacing:-.5px; }

.an-cockpit .ck-chip { display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:650;
  padding:3px 9px; border-radius:var(--radius-pill); white-space:nowrap; }
.an-cockpit .ck-chip .ck-dot { width:7px; height:7px; border-radius:50%; background:currentColor; display:inline-block; }
.an-cockpit .ck-chip.good { background:var(--good-bg); color:var(--green); }
.an-cockpit .ck-chip.warn { background:var(--warn-bg); color:var(--gold); }
.an-cockpit .ck-chip.crit { background:var(--crit-bg); color:var(--red); }
.an-cockpit .ck-chip.mut  { background:var(--card-head-bg); color:var(--text-muted); border:1px solid var(--border); }

.an-cockpit .ck-achead { display:flex; gap:14px; align-items:flex-start; }
.an-cockpit .ck-badge { width:56px; height:56px; border-radius:12px;
  background:linear-gradient(160deg,var(--card-head-bg),var(--bg)); border:1px solid var(--border);
  display:grid; place-items:center; font-size:26px; flex:none; }

.an-cockpit .ck-btnlist { display:flex; flex-direction:column; gap:8px; }
.an-cockpit .ck-btn { display:flex; align-items:center; gap:10px; background:var(--card-head-bg);
  border:1px solid var(--border); color:var(--text); font:inherit; font-size:13.5px; font-weight:600;
  padding:9px 12px; border-radius:var(--radius-sm); cursor:pointer; text-align:left; width:100%; }
.an-cockpit .ck-btn:hover { border-color:var(--gold); }
.an-cockpit .ck-btn.primary { background:var(--gold-fill); color:#1c1608; border-color:transparent; }
.an-cockpit .ck-btn.danger { color:var(--red); }
.an-cockpit .ck-btn .i { width:16px; text-align:center; }

.an-cockpit .ck-docrow { display:flex; align-items:center; gap:10px; padding:7px 0;
  border-bottom:1px solid var(--border); font-size:13.5px; }
.an-cockpit .ck-docrow:last-child { border-bottom:0; }
.an-cockpit .ck-docrow .i { width:18px; text-align:center; }
.an-cockpit .ck-docrow a { color:var(--text); text-decoration:none; font-weight:500; }
.an-cockpit .ck-docrow a:hover { color:var(--gold); }

/* horizontal lease timeline */
.an-cockpit .ck-timeline { display:flex; align-items:center; gap:0; overflow-x:auto; }
.an-cockpit .ck-node { display:flex; flex-direction:column; gap:4px; align-items:center; min-width:120px; text-align:center; }
.an-cockpit .ck-node .mk { width:34px; height:34px; border-radius:50%; display:grid; place-items:center;
  font-size:15px; background:var(--card-head-bg); border:2px solid var(--border); color:var(--text-muted); }
.an-cockpit .ck-node.done .mk { background:var(--good-bg); border-color:var(--green); color:var(--green); }
.an-cockpit .ck-node.next .mk { background:var(--warn-bg); border-color:var(--gold); color:var(--gold); }
.an-cockpit .ck-node .lb { font-size:12.5px; font-weight:650; }
.an-cockpit .ck-node .dt { font-size:11px; color:var(--text-muted); }
.an-cockpit .ck-segline { height:2px; flex:1; min-width:26px; background:var(--border); margin-top:-18px; }

/* tables inside cockpit cards inherit the platform .data-table; just tighten top margin */
.an-cockpit .ck-card .data-table { margin-top:.25rem; }

/* ── Airport / ICAO autocomplete (reusable, S73) ── */
.ap-dd{position:fixed;z-index:12000;max-height:320px;overflow-y:auto;background:var(--card);border:1px solid var(--border2);border-radius:var(--radius-sm);box-shadow:0 8px 28px rgba(0,0,0,.28)}
.ap-item{padding:.5rem .7rem;cursor:pointer;font-size:.86rem;border-bottom:1px solid var(--border);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ap-item:last-child{border-bottom:0}
.ap-item:hover{background:var(--card-head-bg)}
.ap-code{font-family:var(--mono);font-weight:700;color:var(--gold)}
.ap-iata{font-family:var(--mono);font-size:.74rem;color:var(--text-muted);border:1px solid var(--border2);border-radius:var(--radius-sm);padding:0 .25rem}
.ap-name{color:var(--text)}
.ap-loc{color:var(--text-muted);font-size:.8rem}
.ap-picked{display:block;margin-top:.25rem;font-size:.76rem;color:var(--text-muted);min-height:1em}
.ap-rc{font-family:var(--sans);color:var(--text-muted);font-size:.8rem}

/* S80 — shared document icons (includes/functions/doc_icons.php). currentColor→gold; align with row text. */
.doc-ic{color:var(--gold);vertical-align:-.18em;flex:none}
.doc-ic text{font-family:var(--mono)}
