/* Telicx dashboard — design system.
 * Brand: deep cobalt (#0A33CC) + signal gold (#F2B705) + soft white. UI type =
 * Geist. Cadence/structure modeled on the proven dealer dashboard, rebuilt clean. */

:root {
  /* palette */
  --cobalt: #0a33cc;
  --cobalt-600: #1740d6;
  --cobalt-300: #5b8cff;
  --gold: #f2b705;
  --gold-700: #c9971a;
  --ink: #0b1020;

  /* light theme (default) */
  --bg: #f7f9fc;
  --panel: #ffffff;
  --panel-2: #f1f4fb;
  --border: #dde3ef;
  --text: #14182280;
  --text: #141822;
  --text-dim: #56607a;
  --text-muted: #8893a8;
  --accent: var(--cobalt);
  --accent-tint: rgba(10, 51, 204, 0.08);
  --accent-tint-2: rgba(10, 51, 204, 0.14);

  --green: #15935b;
  --red: #e5484d;
  --amber: #d97706;
  --new: #0e7490;   /* teal — new vehicles */
  --used: #b45309;  /* amber — used vehicles */

  --shadow: 0 1px 2px rgba(11, 16, 32, 0.04), 0 4px 16px rgba(11, 16, 32, 0.06);
  --shadow-lg: 0 8px 40px rgba(11, 16, 32, 0.14);
  --radius: 14px;
  --radius-sm: 10px;
  --canvas: 1500px;
  --gutter: 28px;
  --font: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

:root[data-theme='dark'] {
  --bg: #070b18;
  --panel: #0f1426;
  --panel-2: #131a30;
  --border: #212a45;
  --text: #eef2fb;
  --text-dim: #9aa6c4;
  --text-muted: #6b769a;
  --accent: #4f74ff;
  --accent-tint: rgba(79, 116, 255, 0.14);
  --accent-tint-2: rgba(79, 116, 255, 0.22);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 18px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 50px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }
html {
  /* pan/scroll yes, pinch-zoom no (reliable across iOS/Android); don't let iOS
     auto-inflate text in landscape. */
  touch-action: pan-x pan-y;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* nothing ever scrolls the page sideways */
  max-width: 100%;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
/* wide tables scroll WITHIN their card; the page never overflows the screen */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap > table { min-width: 100%; }
.lbl-short { display: none; }
a { color: var(--accent); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.numeric, .num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }

/* ---------- header ---------- */
.app-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  height: 60px; padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 30px; width: 30px; border-radius: 7px; display: block; }
.brand img.brand-logo { height: 26px; width: auto; border-radius: 0; }
.brand .dealer { color: var(--text-dim); font-size: 13px; padding-left: 12px; margin-left: 4px; border-left: 1px solid var(--border); }
.header-spacer { flex: 1; }
.role-chip {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--accent); background: var(--accent-tint); padding: 4px 10px; border-radius: 999px;
}
.store-pills { display: flex; gap: 4px; background: var(--panel-2); padding: 3px; border-radius: 999px; }
.store-pills button {
  border: 0; background: transparent; color: var(--text-dim);
  font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 999px;
}
.store-pills button.active { background: var(--panel); color: var(--text); box-shadow: var(--shadow); }
.icon-btn {
  border: 1px solid var(--border); background: var(--panel); color: var(--text-dim);
  width: 34px; height: 34px; border-radius: 9px; font-size: 15px; display: grid; place-items: center;
}
.icon-btn:hover { color: var(--text); border-color: var(--accent); }

/* ---------- primary nav ---------- */
.primary-nav {
  position: sticky; top: 60px; z-index: 40;
  display: flex; gap: 2px; padding: 0 var(--gutter);
  background: var(--panel); border-bottom: 1px solid var(--border); overflow-x: auto;
}
.primary-nav button {
  border: 0; background: transparent; color: var(--text-dim);
  font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 14px 16px; border-bottom: 2px solid transparent; white-space: nowrap;
}
.primary-nav button:hover { color: var(--text); }
.primary-nav button.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- layout ---------- */
main { max-width: var(--canvas); margin: 0 auto; padding: var(--gutter); }
.page-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 8px; }
.page-head h1 { font-size: 22px; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
.page-head .as-of { color: var(--text-muted); font-size: 12px; }
.head-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.period-sel { display: inline-flex; background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px; padding: 2px; }
.period-sel button { border: 0; background: transparent; color: var(--text-dim); font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 999px; white-space: nowrap; }
.period-sel button.active { background: var(--accent); color: #fff; }
.period-sel button:not(.active):hover { color: var(--text); }
.grid { display: grid; gap: 18px; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-2 { grid-template-columns: 1.4fr 1fr; }
@media (max-width: 900px) { .cols-3, .cols-2 { grid-template-columns: 1fr; } }

/* ---------- cards ---------- */
.card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
}
.card h2 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim); margin: 0 0 14px; }
/* Rail hugs the card's rounded top: card clips overflow, rail rounds its top
   corners to follow the curve instead of poking square corners past it. */
.card.kpi { overflow: hidden; }
.card .accent-rail { height: 3px; border-radius: var(--radius) var(--radius) 0 0; margin: -18px -18px 16px; }

/* KPI card */
.kpi .big { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.kpi .big small { font-size: 14px; color: var(--text-muted); font-weight: 500; }
.kpi-rows { margin-top: 12px; display: grid; gap: 7px; }
.kpi-rows .row { display: flex; justify-content: space-between; font-size: 13px; }
.kpi-rows .row span:first-child { color: var(--text-dim); }
.kpi-rows .row span:last-child { font-weight: 600; font-variant-numeric: tabular-nums; }
.bench { margin-top: 12px; font-size: 11.5px; color: var(--text-muted); border-top: 1px dashed var(--border); padding-top: 10px; }
.bench .up { color: var(--green); font-weight: 600; }
.bench .down { color: var(--amber); font-weight: 600; }

/* store table */
.ministore { width: 100%; border-collapse: collapse; font-size: 13px; }
.ministore th, .ministore td { text-align: right; padding: 8px 6px; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.ministore th:first-child, .ministore td:first-child { text-align: left; font-weight: 600; }
.ministore th { color: var(--text-muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.ministore tr:last-child td { border-bottom: 0; font-weight: 700; }

/* ---------- cadence: daily actions / focus ---------- */
.focus-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.focus-list li { display: flex; gap: 11px; align-items: flex-start; font-size: 14px; }
.focus-list .dot { flex: none; width: 22px; height: 22px; border-radius: 7px; background: var(--accent-tint); color: var(--accent); display: grid; place-items: center; font-size: 12px; font-weight: 700; margin-top: 1px; }
.focus-list li.done span.t { color: var(--text-muted); text-decoration: line-through; }
.cadence-foot { margin-top: 14px; font-size: 12px; color: var(--text-muted); display: flex; gap: 8px; align-items: center; }
.spinner { width: 14px; height: 14px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- A.D.A.M. chat ---------- */
.chat-wrap { display: flex; flex-direction: column; height: calc(100vh - 60px - 47px - 2px); max-width: var(--canvas); margin: 0 auto; }
.chat-head { padding: 18px var(--gutter) 12px; }
.chat-head h1 { margin: 0; font-size: 20px; }
.chat-head p { margin: 2px 0 0; color: var(--text-dim); font-size: 13px; }
.chat-log { flex: 1; overflow-y: auto; padding: 8px var(--gutter) 20px; display: flex; flex-direction: column; gap: 16px; }
.msg { display: flex; gap: 12px; max-width: 860px; }
.msg .av { flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg.user .bubble { background: var(--accent); color: #fff; border-radius: 14px 14px 4px 14px; padding: 11px 15px; }
.msg.user .av { background: var(--cobalt-600); color: #fff; }
.msg.adam .av { background: var(--ink); color: var(--gold); }
.msg.adam .bubble { background: var(--panel); border: 1px solid var(--border); border-radius: 14px 14px 14px 4px; padding: 4px 18px; box-shadow: var(--shadow); }
.bubble { font-size: 14.5px; }
.bubble p { margin: 10px 0; } .bubble h2, .bubble h3 { font-size: 15px; margin: 14px 0 6px; }
.bubble table { border-collapse: collapse; width: 100%; margin: 10px 0; font-size: 13px; }
.bubble th, .bubble td { border: 1px solid var(--border); padding: 6px 9px; text-align: left; }
.bubble th { background: var(--panel-2); }
.bubble ul, .bubble ol { margin: 8px 0; padding-left: 20px; }
.bubble code { background: var(--panel-2); padding: 1px 5px; border-radius: 4px; font-family: var(--font-mono); font-size: 12px; }
.follow-ups { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.follow-ups button { border: 1px solid var(--border); background: var(--panel); color: var(--accent); font-size: 12.5px; padding: 6px 12px; border-radius: 999px; }
.follow-ups button:hover { border-color: var(--accent); background: var(--accent-tint); }
.chat-input { border-top: 1px solid var(--border); background: var(--panel); padding: 12px var(--gutter); display: flex; gap: 10px; align-items: flex-end; }
.chat-input textarea { flex: 1; resize: none; border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: 12px; padding: 11px 14px; font: inherit; font-size: 14.5px; max-height: 160px; }
.chat-input textarea:focus { outline: none; border-color: var(--accent); }
.send-btn { border: 0; background: var(--accent); color: #fff; width: 42px; height: 42px; border-radius: 11px; font-size: 18px; display: grid; place-items: center; }
.send-btn:disabled { opacity: .5; }
.meta-line { font-size: 11px; color: var(--text-muted); margin-top: 8px; }
.thinking-label { color: var(--text-muted); font-size: 13.5px; margin-left: 9px; vertical-align: middle; }
.bubble.streaming { display: flex; align-items: center; }

/* ---------- team playbook (contribution loop) ---------- */
.chat-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }

/* ----- A.D.A.M. chat: Claude-style sidebar ----- */
.chat-shell { display: flex; height: calc(100vh - 60px - 47px - 2px); max-width: var(--canvas); margin: 0 auto; }
.chat-shell .chat-wrap { height: 100%; flex: 1 1 auto; min-width: 0; max-width: none; margin: 0; }
.chat-sidebar { flex: none; width: 248px; border-right: 1px solid var(--border); background: var(--panel); display: flex; flex-direction: column; }
.chat-sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 10px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-dim); }
.new-chat-btn { background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: 6px 10px; font-size: 12px; font-weight: 600; cursor: pointer; }
.new-chat-btn:hover { filter: brightness(1.06); }
.chat-list { flex: 1; overflow-y: auto; padding: 2px 8px 14px; display: flex; flex-direction: column; gap: 2px; }
.chat-item { position: relative; display: flex; align-items: center; gap: 4px; padding: 8px; border-radius: 8px; cursor: pointer; }
.chat-item:hover, .chat-item.active { background: var(--panel-2); }
.chat-item-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.chat-item-menu { flex: none; opacity: 0; border: 0; background: none; color: var(--text-dim); cursor: pointer; font-size: 17px; line-height: 1; padding: 0 4px; border-radius: 6px; }
.chat-item:hover .chat-item-menu, .chat-item.active .chat-item-menu { opacity: 1; }
.chat-item-menu:hover { background: var(--border); color: var(--text); }
.chat-menu { position: absolute; right: 6px; top: 34px; z-index: 50; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 4px; display: flex; flex-direction: column; min-width: 132px; }
.chat-menu button { text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 6px; font-size: 13px; color: var(--text); cursor: pointer; }
.chat-menu button:hover { background: var(--panel-2); }
.chat-menu button.danger { color: var(--red); }
.chat-head-titles { flex: 1; min-width: 0; }
.chat-menu-toggle { display: none; flex: none; background: none; border: 1px solid var(--border); border-radius: 8px; color: var(--text); width: 36px; height: 36px; font-size: 16px; cursor: pointer; }
.chat-empty { margin: auto; text-align: center; color: var(--text-dim); max-width: 380px; padding: 20px; }
.chat-empty .big { font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing: .02em; margin-bottom: 6px; }

/* ----- Financial flow (Sankey-style) ----- */
.flow-card { padding: 16px 18px 12px; }
.flow-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; gap: 12px; }
.flow-head h2 { font-size: 13px; margin: 0; text-transform: uppercase; letter-spacing: .04em; color: var(--text-dim); }
.flow-fs-btn { flex: none; border: 1px solid var(--border); background: var(--panel); color: var(--text); border-radius: 8px; padding: 5px 11px; font-size: 12px; font-weight: 600; cursor: pointer; }
.flow-fs-btn:hover { background: var(--panel-2); }
.flow-host { width: 100%; position: relative; overflow: hidden; aspect-ratio: 1120 / 720; }
.flow-host .flow-svg { position: absolute; inset: 0; width: 100%; height: 100%; will-change: transform; }
.flow-svg { display: block; width: 100%; height: auto; }
.flow-link { transition: fill-opacity .15s; stroke: var(--panel); stroke-width: 1.25; stroke-opacity: .9; }
.flow-link:hover { fill-opacity: .58 !important; }
.flow-stream.clickable { cursor: pointer; }
.flow-stream .flow-link { transition: fill-opacity .15s; }
.flow-stream.clickable:hover .flow-link { fill-opacity: .62 !important; }
.flow-node.clickable:hover rect { filter: brightness(1.12); }
.flow-node rect { transition: filter .12s; }
/* Exact-shape hit-testing: every child of a flow group is inert; only the
   transparent flow-hit path/rect receives pointer events, so hover follows
   the ribbon/bar outline instead of its bounding box. */
.flow-node > *, .flow-stream > * { pointer-events: none; }
.flow-svg text { pointer-events: none; } /* labels never steal a ribbon's hover */
.flow-hit { pointer-events: all; }
.flow-chev { fill: #fff; font-size: 14px; font-weight: 700; opacity: .92; }
.flow-depth { fill: #fff; font-size: 9px; font-weight: 700; letter-spacing: .5px; opacity: .72; }
.flow-leaf-dot { fill: var(--text-muted); opacity: .6; }
/* dead-end (no drill, no records): grayed, no hover lift */
.flow-stream.dead { cursor: default; }
.flow-stream.dead .flow-link { transition: none; }
.flow-stream.dead:hover .flow-link { fill-opacity: .22 !important; }
/* cursor-following tooltip */
.flow-tip { position: fixed; z-index: 300; display: none; pointer-events: none;
  background: var(--ink, #1a2438); color: #fff; font-size: 12px; font-weight: 600;
  padding: 6px 10px; border-radius: 7px; max-width: 320px; line-height: 1.35;
  box-shadow: 0 4px 16px rgba(0,0,0,.22); white-space: nowrap; }
.flow-label { font-size: 11px; font-weight: 700; fill: var(--text); }
.flow-label.strong { letter-spacing: .05em; }
.flow-sub { font-size: 11px; font-weight: 600; fill: var(--text-dim); }
.flow-hint { text-align: center; font-size: 12px; color: var(--text-muted); margin-top: 6px; }
/* Persona switcher pill — demo only. */
.persona-pill { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px 0 8px; border-radius: 999px; background: linear-gradient(180deg, var(--accent), var(--accent-2, var(--accent))); color: #fff; border: 1px solid transparent; font-size: 12px; font-weight: 600; cursor: pointer; box-shadow: 0 1px 2px rgba(10, 51, 204, .15); }
.persona-pill:hover { filter: brightness(1.05); }
.persona-dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; opacity: .9; }
.persona-label { font-weight: 700; }
.persona-role { font-size: 10.5px; opacity: .85; text-transform: uppercase; letter-spacing: .04em; padding: 1px 6px; background: rgba(255,255,255,.18); border-radius: 4px; }
.persona-caret { font-size: 10px; opacity: .8; }
.persona-menu { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg, 0 8px 24px rgba(0,0,0,.12)); min-width: 280px; max-width: 320px; padding: 8px; max-height: 70vh; overflow-y: auto; }
.persona-menu-head { font-size: 10.5px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; padding: 6px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.persona-menu-loading { font-size: 13px; color: var(--text-muted); padding: 14px 10px; text-align: center; }
.persona-menu-item { display: block; width: 100%; text-align: left; background: transparent; border: 0; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.persona-menu-item:hover { background: var(--accent-tint); }
.persona-menu-item.active { background: var(--accent-tint); border-left: 3px solid var(--accent); padding-left: 7px; }
.pm-name { font-size: 13px; font-weight: 700; color: var(--text); }
.pm-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.flow-detail-host { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 14px; }
.flow-strip-cap { font-size: 11px; font-weight: 700; color: var(--text-muted); letter-spacing: .05em; text-transform: uppercase; margin-bottom: 10px; }
.flow-strip { display: flex; gap: 10px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: thin; }
.flow-strip::-webkit-scrollbar { height: 6px; }
.flow-strip::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.flow-strip-card { flex: 0 0 auto; min-width: 142px; padding: 10px 14px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; transition: background .12s, transform .12s, border-color .12s; }
.flow-strip-card.clickable { cursor: pointer; }
.flow-strip-card.clickable:hover { background: var(--accent-tint); border-color: var(--accent); transform: translateY(-1px); }
.flow-strip-card.emph { background: var(--panel); border-color: var(--accent); }
.flow-strip-card.emph .fsc-val { color: var(--accent); }
.flow-strip-card.up .fsc-val { color: var(--green); }
.flow-strip-card.down .fsc-val { color: var(--red); }
.fsc-lbl { font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.fsc-val { font-size: 19px; font-weight: 800; color: var(--text); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.fsc-sub { font-size: 10.5px; color: var(--text-muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.flow-rotate { display: none; }
/* real fullscreen (desktop/Android) + CSS pseudo-fullscreen (iOS) both fill the screen */
.flow-card.flow-fs-css { position: fixed; inset: 0; z-index: 200; margin: 0; border-radius: 0; overflow: auto; display: flex; flex-direction: column; justify-content: center; background: var(--bg); }
.flow-card:fullscreen { background: var(--bg); display: flex; flex-direction: column; justify-content: center; padding: 24px; }
.flow-card:fullscreen .flow-svg, .flow-card.flow-fs-css .flow-svg { max-height: 88vh; }
.flow-svg { transform-origin: 50% 50%; }
.flow-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 1px; margin: 2px 0 8px; min-height: 24px; }
.flow-crumb { background: none; border: 0; color: var(--accent); font-size: 13px; font-weight: 600; cursor: pointer; padding: 3px 6px; border-radius: 6px; }
.flow-crumb:hover { background: var(--panel-2); }
.flow-crumb.active { color: var(--text); cursor: default; }
.flow-crumb-sep { color: var(--text-muted); font-size: 13px; padding: 0 1px; }
/* portrait phone: the flow needs width → nudge to landscape, keep the P&L table below */
@media (max-width: 820px) and (orientation: portrait) {
  .flow-card .flow-host, .flow-card .flow-hint { display: none; }
  .flow-card .flow-rotate { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; color: var(--text-dim); font-size: 13px; padding: 26px 16px 16px; }
  .flow-card .flow-rotate .big { font-size: 34px; line-height: 1; }
  .flow-card.flow-fs-css .flow-host, .flow-card.flow-fs-css .flow-hint { display: block; }
  .flow-card.flow-fs-css .flow-rotate { display: none; }
}
.ghost-btn { border: 1px solid var(--border); background: var(--panel); color: var(--accent); font-size: 12.5px; font-weight: 600; padding: 7px 12px; border-radius: 999px; white-space: nowrap; flex: none; }
.ghost-btn:hover { border-color: var(--accent); background: var(--accent-tint); }
.lead { color: var(--text-dim); font-size: 14px; max-width: 720px; margin: 0 0 18px; }
.muted { color: var(--text-muted); font-size: 13px; margin: 0 0 12px; }
.select, .field textarea { width: 100%; border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: 10px; padding: 11px 13px; font: inherit; font-size: 14px; }
.field textarea { resize: vertical; min-height: 70px; }
.select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.cands { display: grid; gap: 12px; }
.cand { border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: var(--panel-2); }
.cand-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.cand-head strong { font-size: 14px; }
.cand-meta { font-size: 11.5px; color: var(--text-muted); }
.cand-body { font-size: 13.5px; color: var(--text-dim); white-space: pre-wrap; overflow-wrap: anywhere; }
.cand-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.mini { border: 1px solid var(--border); background: var(--panel); color: var(--text-dim); font-size: 12px; font-weight: 600; padding: 6px 11px; border-radius: 8px; }
.mini:hover { color: var(--text); border-color: var(--accent); }
.mini.ok { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, var(--border)); }
.mini.danger { color: var(--red); }
.tag { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.tag.shared { background: var(--accent-tint); color: var(--accent); }
.tag.tenant { background: var(--panel); color: var(--text-dim); border: 1px solid var(--border); }
.import-result { margin-top: 14px; font-size: 13px; }
.import-ok { color: var(--green); font-weight: 600; font-size: 14px; }
.muted code { background: var(--panel-2); padding: 1px 6px; border-radius: 5px; font-size: 11.5px; }

/* ---------- auth ---------- */
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(1200px 600px at 50% -10%, var(--accent-tint-2), transparent), var(--bg); }
.auth-card { width: 100%; max-width: 400px; background: var(--panel); border: 1px solid var(--border); border-radius: 20px; padding: 34px; box-shadow: var(--shadow-lg); }
.auth-card .brand { justify-content: center; margin-bottom: 6px; }
.auth-card .brand img { height: 44px; width: 44px; }
.auth-card h1 { text-align: center; font-size: 20px; margin: 14px 0 2px; }
.auth-card .sub { text-align: center; color: var(--text-dim); font-size: 13px; margin: 0 0 22px; }
.auth-sub { font-size: 13.5px; color: var(--text-dim); margin: -4px 0 16px; line-height: 1.5; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--text-dim); margin-bottom: 5px; }
.field input { width: 100%; border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: 10px; padding: 11px 13px; font: inherit; font-size: 15px; }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.section-h { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim); margin: 0 0 12px; }
.lastrun { font-size: 12.5px; color: var(--text-muted); margin-bottom: 10px; }
.nowrap { white-space: nowrap; }
.input { width: 100%; border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: 10px; padding: 11px 13px; font: inherit; font-size: 15px; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-dim); margin: 8px 0; cursor: pointer; }
.check-row input { width: auto; }
.token-box { display: block; margin-top: 8px; padding: 10px 12px; background: var(--bg); border: 1px dashed var(--border); border-radius: 8px; font-family: var(--font-mono); font-size: 12px; word-break: break-all; color: var(--accent); }
.code-input { letter-spacing: 0.4em; text-align: center; font-size: 22px !important; font-variant-numeric: tabular-nums; }
.btn-primary { width: 100%; border: 0; background: var(--accent); color: #fff; font-weight: 600; font-size: 15px; padding: 12px; border-radius: 10px; margin-top: 6px; }
.btn-primary:hover { background: var(--cobalt-600); }
.btn-primary:disabled { opacity: .6; }
.auth-err { color: var(--red); font-size: 13px; margin-top: 12px; text-align: center; min-height: 18px; }
.auth-foot { text-align: center; margin-top: 18px; font-size: 12px; color: var(--text-muted); }
.tagline { text-align: center; margin-top: 16px; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-700); font-weight: 600; }

/* ---------- sub-nav (within a pillar) ---------- */
.subnav { display: flex; gap: 6px; margin-bottom: 18px; }
.subnav button { border: 1px solid var(--border); background: var(--panel); color: var(--text-dim); font-size: 13px; font-weight: 600; padding: 7px 16px; border-radius: 999px; }
.subnav button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.subnav button:not(.active):hover { color: var(--text); border-color: var(--accent); }

/* ---------- goals & pace gauges ---------- */
.gauges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 900px) { .gauges { grid-template-columns: repeat(2, 1fr); } }
.gauge-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.gauge-top span:first-child { color: var(--text-dim); font-size: 13px; }
.gauge-val { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.gauge-bar { height: 8px; background: var(--panel-2); border-radius: 99px; overflow: hidden; }
.gauge-fill { height: 100%; border-radius: 99px; transition: width .4s; }
.gauge-fill.ok { background: var(--green); }
.gauge-fill.warn { background: var(--amber); }
.gauge-foot { display: flex; justify-content: space-between; margin-top: 7px; font-size: 11.5px; color: var(--text-muted); }
.gauge-foot .up { color: var(--green); font-weight: 600; }
.gauge-foot .down { color: var(--amber); font-weight: 600; }

/* ---------- gross-by-rooftop chart ---------- */
.chart-legend { display: flex; gap: 16px; font-size: 12px; color: var(--text-dim); margin-bottom: 14px; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.chart-legend .dot-new { background: var(--new); } .chart-legend .dot-used { background: var(--used); }
.bars { display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 84px 1fr 92px; align-items: center; gap: 12px; }
.bar-label { font-size: 13px; font-weight: 600; color: var(--text-dim); }
.bar-track { display: flex; height: 22px; background: var(--panel-2); border-radius: 6px; overflow: hidden; }
.bar-seg { height: 100%; } .bar-seg.seg-new { background: var(--new); } .bar-seg.seg-used { background: var(--used); } .bar-seg.seg-int { background: var(--text-muted); }
.bar-seg.seg-amber { background: var(--amber); } .bar-seg.seg-red { background: var(--red); }
.deal-table .num-col.aged { color: var(--amber); font-weight: 700; }
.bar-val { text-align: right; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- month-over-month trend (vertical bars) ---------- */
.trend { display: flex; align-items: flex-end; gap: 12px; min-height: 150px; padding-top: 8px; }
.trend-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-width: 0; }
.trend-val { font-size: 11px; font-weight: 700; color: var(--text-dim); margin-bottom: 5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.trend-bar { width: 100%; max-width: 56px; min-height: 4px; background: linear-gradient(var(--cobalt-300), var(--accent)); border-radius: 6px 6px 0 0; transition: height .4s; }
.trend-label { font-size: 11px; color: var(--text-muted); margin-top: 8px; text-align: center; line-height: 1.3; }
.trend-label b { color: var(--text); }

/* ---------- deal log table ---------- */
.deal-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.deal-table th, .deal-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.deal-table th { color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.deal-table .num-col { text-align: right; font-variant-numeric: tabular-nums; }
.deal-table tr:hover td { background: var(--accent-tint); }
.type-badge { font-size: 11px; font-weight: 600; text-transform: capitalize; padding: 2px 9px; border-radius: 99px; }
.type-badge.new { background: color-mix(in srgb, var(--new) 18%, transparent); color: var(--new); }
.type-badge.used { background: color-mix(in srgb, var(--used) 20%, transparent); color: var(--used); }

.empty { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty .big { font-size: 15px; color: var(--text-dim); margin-bottom: 6px; }

/* ---------- detail modal ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(7, 11, 24, 0.55); backdrop-filter: blur(2px); z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; max-width: 440px; width: 100%; max-height: 86vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 15px 18px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--panel); }
.modal-head h2 { margin: 0; font-size: 16px; }
.modal-x { border: 0; background: transparent; color: var(--text-dim); font-size: 16px; line-height: 1; padding: 4px; }
.modal-x:hover { color: var(--text); }
.modal-body { padding: 14px 18px 18px; }
.detail-tbl { width: 100%; border-collapse: collapse; }
.detail-tbl td { padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.detail-tbl tr:last-child td { border-bottom: 0; }
.detail-tbl td.k { color: var(--text-dim); }
.detail-tbl td.v { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; padding-left: 14px; }
.pii-note { margin-top: 14px; font-size: 11.5px; color: var(--text-dim); background: var(--accent-tint); padding: 11px 13px; border-radius: 10px; line-height: 1.5; }
.row-clickable { cursor: pointer; }
.row-clickable:hover td { background: var(--accent-tint); }

/* =================================================================
   MOBILE — everything fits the screen; no pinch-zoom, no sideways page
   scroll, tables run edge-to-edge and scroll within their card, all nav
   tabs visible (shrunk to fit).
   ================================================================= */
@media (max-width: 680px) {
  main { padding: 14px 14px 28px; }

  /* ----- header: keep it light ----- */
  .app-header { gap: 10px; padding: 0 14px; height: 56px; }
  .app-header { top: 0; }
  .brand img { height: 26px; width: 26px; }
  .brand .wordmark { font-size: 16px; }
  .brand .dealer { display: none; }        /* room is precious; dealer name is in the page */
  .role-chip { display: none; }
  .store-pills button { padding: 5px 10px; font-size: 11px; }

  /* ----- primary nav: all tabs visible, shrink to fit ----- */
  .primary-nav { top: 56px; padding: 0 4px; overflow-x: visible; }
  .primary-nav button { flex: 1 1 0; min-width: 0; padding: 12px 2px; font-size: 11px; letter-spacing: 0.01em; border-bottom-width: 3px; }
  .lbl-full { display: none; }
  .lbl-short { display: inline; }

  /* ----- layout: stack ----- */
  .page-head h1 { font-size: 19px; }
  .cols-3, .cols-2 { grid-template-columns: 1fr; }
  .gauges { grid-template-columns: 1fr 1fr; gap: 14px; }
  .grid { gap: 14px; }
  .card { padding: 16px 14px; }
  .card h2 { font-size: 12px; }
  /* detailed KPI cards (Sales/Service/Inventory): tighten so they're glanceable */
  .card.kpi { padding: 14px; }
  .card.kpi .accent-rail { margin: -14px -14px 12px; }
  .kpi .big { font-size: 22px; }
  .kpi-rows { gap: 5px; margin-top: 8px; }
  .kpi-rows .row { font-size: 12.5px; }
  .kpi .bench { margin-top: 8px; padding-top: 7px; font-size: 10.5px; }
  /* simple single-value metric cards (CRM/Financials/Group): 2-up + compact */
  .grid.metrics { grid-template-columns: 1fr 1fr; gap: 12px; }
  .grid.metrics .card { padding: 13px; }
  .grid.metrics .card h2 { font-size: 10px; margin-bottom: 7px; }
  .grid.metrics .accent-rail { margin: -13px -13px 9px; }
  .grid.metrics .big { font-size: 19px; }
  .grid.metrics .bench { font-size: 10px; margin-top: 7px; padding-top: 6px; }

  /* ----- tables: edge-to-edge, scroll within the card, first col frozen ----- */
  .card > .table-wrap,
  .card > .table-wrap:last-child { margin: 4px -14px -16px; width: calc(100% + 28px); }
  .deal-table th, .deal-table td,
  .ministore th, .ministore td { white-space: nowrap; padding: 10px 12px; font-size: 12.5px; }
  .deal-table th:first-child, .deal-table td:first-child,
  .ministore th:first-child, .ministore td:first-child {
    position: sticky; left: 0; background: var(--panel); z-index: 1;
    box-shadow: 1px 0 0 var(--border);
  }
  .deal-table tr:hover td:first-child { background: var(--accent-tint); }

  /* ----- A.D.A.M. chat ----- */
  /* Claude-style mobile chat: full-width text, no avatars, plain A.D.A.M. replies,
     a subtle right-aligned bubble for the user. */
  .chat-wrap { height: calc(100dvh - 56px - 45px); }
  /* sidebar slides over on mobile; ☰ in the head toggles it */
  .chat-shell { height: calc(100dvh - 56px - 45px); position: relative; overflow: hidden; }
  .chat-shell .chat-wrap { height: 100%; width: 100%; }
  .chat-sidebar { position: absolute; z-index: 60; top: 0; bottom: 0; left: 0; width: 82%; max-width: 290px; transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
  .chat-sidebar.open { transform: translateX(0); }
  .chat-menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .chat-head { padding: 14px 16px 8px; }
  .chat-head h1 { font-size: 18px; }
  .chat-head p { font-size: 12.5px; }
  .ghost-btn { padding: 6px 10px; font-size: 12px; }
  .chat-log { padding: 10px 16px 18px; gap: 20px; }
  .msg { max-width: 100%; gap: 0; }
  .msg .av { display: none; }                          /* no avatars — use the width */
  .msg.adam { display: block; }
  .msg.adam .bubble { background: transparent; border: 0; box-shadow: none; padding: 0; border-radius: 0; }
  .msg.user { display: flex; justify-content: flex-end; }
  .msg.user .bubble { background: var(--accent); color: #fff; border-radius: 16px 16px 4px 16px; padding: 10px 14px; max-width: 84%; }
  .bubble { font-size: 15.5px; line-height: 1.58; max-width: 100%; overflow-wrap: anywhere; }
  .bubble p { margin: 9px 0; }
  .bubble table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; max-width: 100%; }
  .follow-ups { margin-top: 12px; }
  .follow-ups button { font-size: 13.5px; padding: 8px 13px; }
  .chat-input { padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); }
  .chat-input textarea { font-size: 16px; }            /* ≥16px stops iOS focus-zoom */

  /* ----- subnav fits ----- */
  .subnav { gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .subnav button { white-space: nowrap; }
}

/* very small phones (≤360px): tighten the nav a touch more */
@media (max-width: 360px) {
  .primary-nav button { font-size: 10px; padding: 11px 1px; }
  .brand .wordmark { font-size: 15px; }
}

/* ── A.D.A.M. dock — page-aware floating advisor ─────────────────── */
.adam-fab {
  position: fixed; right: 22px; bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  width: 58px; height: 58px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--accent); color: var(--gold); box-shadow: var(--shadow-lg);
  display: flex; align-items: center; justify-content: center; z-index: 60;
  transition: transform .16s ease, opacity .16s ease;
}
.adam-fab:hover { transform: translateY(-2px) scale(1.04); }
.adam-fab.hidden { opacity: 0; transform: scale(.6); pointer-events: none; }
.adam-fab .fab-mark { font-family: var(--font-mono, monospace); font-weight: 800; font-size: 23px; line-height: 1; letter-spacing: -.04em; }

.adam-dock {
  position: fixed; right: 22px; bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  width: 390px; max-width: calc(100vw - 32px); height: 70vh; max-height: 620px;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden;
  z-index: 61; opacity: 0; transform: translateY(16px) scale(.98); pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.adam-dock.open { opacity: 1; transform: none; pointer-events: auto; }
/* Enlarged in-place — does NOT navigate to the A.D.A.M. tab. Brian flagged: the ⤢
   should just grow the dock, not yank the user out of their current context.    */
.adam-dock.expanded { width: min(840px, calc(100vw - 44px)); height: min(880px, calc(100vh - 60px)); max-height: calc(100vh - 60px); }
.dock-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.dock-id { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.dock-av { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--gold); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono, monospace); font-weight: 800; font-size: 13px; }
.dock-chip { font-size: 11px; font-weight: 600; color: var(--accent); background: var(--accent-tint); padding: 2px 9px; border-radius: 999px; }
.dock-tools { display: flex; gap: 2px; }
.dock-x { background: none; border: none; color: var(--text-muted); font-size: 15px; cursor: pointer; padding: 4px 7px; border-radius: 8px; }
.dock-x:hover { color: var(--text); background: var(--panel-2); }
.dock-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.dock-msg { display: flex; }
.dock-msg.user { justify-content: flex-end; }
.dock-msg.adam { flex-direction: column; align-items: flex-start; }
.dock-bubble { font-size: 14px; line-height: 1.5; max-width: 88%; }
.dock-msg.user .dock-bubble { background: var(--accent); color: #fff; border-radius: 13px 13px 4px 13px; padding: 9px 13px; }
.dock-msg.adam .dock-bubble { background: var(--panel-2); border: 1px solid var(--border); border-radius: 13px 13px 13px 4px; padding: 4px 14px; max-width: 100%; }
.dock-bubble.streaming { padding: 11px 14px; }
.dock-bubble p { margin: 9px 0; }
.dock-bubble table { border-collapse: collapse; width: 100%; margin: 9px 0; font-size: 12.5px; display: block; overflow-x: auto; }
.dock-bubble th, .dock-bubble td { border: 1px solid var(--border); padding: 5px 8px; text-align: left; white-space: nowrap; }
.dock-bubble code { font-family: var(--font-mono, monospace); font-size: 12.5px; }
.dock-tips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.dock-tips button { font-size: 12px; color: var(--accent); background: var(--accent-tint); border: 1px solid transparent; border-radius: 999px; padding: 6px 11px; cursor: pointer; }
.dock-tips button:hover { border-color: var(--accent); }
.dock-input { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--border); }
.dock-ta { flex: 1; resize: none; border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: 12px; padding: 10px 13px; font: inherit; font-size: 16px; max-height: 120px; }
.dock-ta:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.dock-send { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; border: none; background: var(--accent); color: #fff; font-size: 17px; cursor: pointer; }
.dock-send:disabled { opacity: .5; cursor: default; }

/* dock → full-width bottom sheet on phones */
@media (max-width: 680px) {
  .adam-fab { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: 54px; height: 54px; }
  .adam-dock {
    right: 0; left: 0; bottom: 0; width: 100%; max-width: 100%;
    height: 82vh; max-height: none; border-radius: 18px 18px 0 0;
    transform: translateY(100%);
  }
  .adam-dock.open { transform: none; }
  .dock-input { padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
}

/* ── "Start your engine" — once-a-day brand splash on first auth of the day ─ */
.engine-start { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center;
  background: linear-gradient(160deg, #0b1f4d 0%, var(--cobalt) 60%, #2f6bff 100%);
  opacity: 1; transition: opacity .6s ease; cursor: pointer; }
.engine-start.leaving { opacity: 0; pointer-events: none; }
.engine-start .es-mark { position: relative; width: min(72vw, 560px); }
.engine-start .es-mark img { width: 100%; height: auto; display: block;
  clip-path: inset(0 100% 0 0); opacity: 0;
  animation: es-streak 1.3s cubic-bezier(.22, .61, .36, 1) .25s forwards;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, .3)); }
.engine-start .es-spark { position: absolute; left: 61.5%; top: 13%; width: 120px; height: 120px;
  margin: -60px 0 0 -60px; pointer-events: none; opacity: 0; transform: scale(.2);
  background: radial-gradient(circle, rgba(255, 233, 160, .95) 0%, rgba(216, 163, 26, .55) 32%, rgba(216, 163, 26, 0) 68%);
  animation: es-spark .7s ease-out 1.2s forwards; }
@keyframes es-streak { 0% { clip-path: inset(0 100% 0 0); opacity: .15; } 16% { opacity: 1; } 100% { clip-path: inset(0 0 0 0); opacity: 1; } }
@keyframes es-spark { 0% { opacity: 0; transform: scale(.2); } 55% { opacity: 1; transform: scale(1.3); } 100% { opacity: .55; transform: scale(1); } }
.engine-start.no-anim .es-mark img { clip-path: none; opacity: 1; animation: none; }
.engine-start.no-anim .es-spark { animation: none; opacity: .5; transform: none; }
@media (max-width: 560px) { .engine-start .es-spark { width: 84px; height: 84px; margin: -42px 0 0 -42px; } }

/* ── Manifest placeholders ("Coming soon" tabs) + data-gated nav ─────────── */
.subnav button.is-placeholder { opacity: 0.5; }
.subnav button.is-placeholder.active { opacity: 1; }
.placeholder-card { text-align: center; padding: 56px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.placeholder-card .ph-icon { font-size: 42px; line-height: 1; opacity: 0.9; }
.placeholder-card .ph-title { font-size: 18px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.placeholder-card .ph-sub { font-size: 14px; color: var(--text-dim); max-width: 360px; }
/* data-gated pillar: visible but not clickable until its required feed arrives (Phase 5) */
.primary-nav button.is-disabled { opacity: 0.4; cursor: not-allowed; }
.primary-nav button.is-disabled:hover { background: none; }

/* ── Admin data-health console (Phase 7) ─────────────────────────────────── */
.hstat-live { background: #16a34a; }
.hstat-stale { background: #d8a31a; }
.hstat-pending { background: #94a3b8; }
.hstat-error { background: #dc2626; }
.health-infra { display: flex; flex-wrap: wrap; gap: 12px; margin: 4px 0 22px; }
.hbadge { display: flex; align-items: center; gap: 9px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
.hbadge-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.hbadge-label { font-weight: 600; font-size: 13.5px; color: var(--text); }
.hbadge-detail { font-size: 12.5px; color: var(--text-dim); }
.health-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.hc { padding: 16px 18px; }
.hc-head { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.hc-icon { font-size: 18px; }
.hc-title { font-weight: 700; font-size: 15px; flex: 1; }
.hc-pill { font-size: 11.5px; font-weight: 700; color: #fff; padding: 2px 9px; border-radius: 999px; }
.hc-feed { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 13px; }
.hc-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.hc-feed-name { color: var(--text); flex: 1; }
.hc-feed-meta { color: var(--text-dim); font-size: 12px; white-space: nowrap; }
.hc-feed.muted, .health-card .muted { color: var(--text-dim); }
