/* ════════════════════════════════════════════════════════════════════════
   V6 TODAY COMMAND SURFACE  (data-view="home" → #v6-today)
   ────────────────────────────────────────────────────────────────────────
   "Today becomes an executive command surface, not a dumping ground."
   3-column governed home: Working Brief + Decision Queue | Ask Atlas +
   Operating Graph | Pending Approvals + Pipeline Coverage + Trust Rail.

   Theme-aware: light surfaces use literal warm-paper values from the V6
   mockup; dark panels are always-dark by design (both light + dark theme).
   No hardcoded user/org strings live here — all personalized text binds to
   JARVIS_CONFIG at runtime (#greeting-headline, [data-brief], data-bind).
   ════════════════════════════════════════════════════════════════════════ */

#v6-today { display: block; }

/* ── Page head ───────────────────────────────────────────────────────── */
.v6-today-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: end;
  margin-bottom: 16px;
}
.v6-today-head .eyebrow {
  font-size: 12px; font-weight: 900;
  letter-spacing: .06em; text-transform: uppercase;
  color: #536174; margin: 0 0 5px;
}
.v6-today-head h2 {
  margin: 0;
  font: 850 32px/1.08 var(--font-display, Inter, "Segoe UI", system-ui, sans-serif);
  color: var(--ink, #1d1810);
}
.v6-today-head .lede {
  margin: 8px 0 0; max-width: 680px;
  color: #526175; font-size: 16px; line-height: 1.4;
}
.v6-today-head .head-actions { display: flex; gap: 10px; }
.v6-head-btn {
  height: 40px; padding: 0 16px; border-radius: 8px;
  font-size: 14px; font-weight: 800;
  border: 1px solid #d7d0c3; background: #fffdf8;
  color: var(--ink, #1d1810); cursor: pointer;
  transition: transform .12s ease, box-shadow .18s ease, background .18s ease;
}
.v6-head-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(29,24,14,.1); }
.v6-head-btn:focus-visible { outline: 2px solid #0f857c; outline-offset: 2px; }
.v6-head-btn.primary { background: #121d27; color: #fff; border-color: #121d27; }
.v6-head-btn.primary:hover { background: #0f857c; border-color: #0f857c; }

/* ── 3-column grid ───────────────────────────────────────────────────── */
.v6-today-grid {
  display: grid;
  grid-template-columns: 1.08fr .92fr .72fr;
  gap: 16px;
  align-items: start;
}
.v6-today-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* ── Panels ──────────────────────────────────────────────────────────── */
.v6-panel {
  background: rgba(255,253,248,.94);
  border: 1px solid #d7d0c3;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(29,24,14,.07);
  overflow: hidden;
}
.v6-panel.dark {
  background: linear-gradient(145deg, #121d27, #172832);
  color: #eff6fb;
  border-color: rgba(255,255,255,.12);
}
.v6-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #d7d0c3;
}
.v6-panel.dark .v6-panel-header { border-color: rgba(255,255,255,.1); }
.v6-panel-header h3 { margin: 0; font-size: 18px; font-weight: 800; }
.v6-panel-body { padding: 16px 18px; }

.v6-chip {
  display: inline-flex; align-items: center;
  height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: 11px; font-weight: 850; letter-spacing: .03em;
  background: #efe9dc; color: #6a6253; border: 1px solid #ddd5c6;
  white-space: nowrap;
}
.v6-chip.teal  { background: #d7efe9; color: #0f6157; border-color: #b3ddd3; }
.v6-chip.blue  { background: #e0e9fb; color: #17468e; border-color: #bacbf0; }
.v6-panel.dark .v6-chip { background: rgba(255,255,255,.1); color: #cfe0ec; border-color: rgba(255,255,255,.18); }

/* ── Morning Brief ───────────────────────────────────────────────────── */
.v6-brief-lead {
  margin: 0 0 12px;
  font: 800 19px/1.25 var(--font-display, Inter, system-ui, sans-serif);
  color: var(--ink, #1d1810);
}
.v6-brief-text {
  margin: 0 0 14px; color: #526175; font-size: 14px; line-height: 1.5;
}
.v6-brief-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.v6-brief-item {
  display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start;
  padding: 10px 12px; border: 1px solid #e6e0d4; border-radius: 8px;
  background: rgba(255,255,255,.5);
}
.v6-brief-item .num {
  width: 28px; height: 28px; border-radius: 7px;
  display: grid; place-items: center;
  background: #0f857c; color: #fff; font-weight: 850; font-size: 13px;
}
.v6-bi-label {
  display: block; font-size: 11px; font-weight: 900; letter-spacing: .05em;
  text-transform: uppercase; color: #647184; margin-bottom: 2px;
}
.v6-bi-val { display: block; font-weight: 700; font-size: 14px; color: var(--ink, #1d1810); }

/* ── Decision Queue items ────────────────────────────────────────────── */
.v6-decision-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid #ebe7de;
}
.v6-decision-item:last-child { border-bottom: 0; }
.v6-decision-icon {
  width: 28px; height: 28px; border-radius: 6px;
  display: grid; place-items: center;
  font-size: 14px;
  background: #fbecd0;
}
.v6-decision-body { min-width: 0; }
.v6-decision-title { font-weight: 750; font-size: 15px; margin-bottom: 3px; color: var(--ink, #1d1810); }
.v6-decision-meta { font-size: 13px; color: #647184; }
.v6-action-btn {
  height: 32px; padding: 0 12px; border-radius: 6px;
  font-size: 13px; font-weight: 750;
  border: 1px solid #d7d0c3;
  background: #fffdf8;
  color: var(--ink, #1d1810);
  cursor: pointer; white-space: nowrap;
  transition: transform .1s ease, box-shadow .15s ease;
}
.v6-action-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(29,24,14,.1); }
.v6-action-btn:focus-visible { outline: 2px solid #0f857c; outline-offset: 2px; }
.v6-action-btn.approve  { background: #dff2e7; color: #17623a; border-color: #b7dfca; }
.v6-action-btn.escalate { background: #fde1ea; color: #9c1844; border-color: #f5b8cc; }
.v6-action-btn.assign   { background: #e0e9fb; color: #17468e; border-color: #bacbf0; }

.v6-empty { color: #8a8270; font-size: 14px; padding: 8px 0; }

/* ── Ask Atlas panel (dark, hosts voice orb) ─────────────────────────── */
.v6-ask {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 14px;
  padding: 18px;
}
.v6-ask .v6-ask-eyebrow {
  font-size: 12px; font-weight: 900; letter-spacing: .06em;
  text-transform: uppercase; color: #9fb0bf; margin: 0 0 4px;
}
.v6-ask h3 { margin: 0; font: 850 22px var(--font-display, Inter, system-ui, sans-serif); }
.v6-ask .v6-ask-sub { margin: 0; color: #b9c8d4; font-size: 14px; line-height: 1.45; }
/* Voice orb mount sits inside Ask Atlas — orb element styled by jarvis.css */
.v6-ask-orb { display: grid; place-items: center; padding: 6px 0; }
.v6-ask-btn {
  height: 42px; border-radius: 8px; border: 0;
  background: var(--gold); color: #1d1810; font-weight: 850; font-size: 14px;
  cursor: pointer; transition: background .18s ease, transform .12s ease;
}
.v6-ask-btn:hover { background: #e2bb6a; transform: translateY(-1px); }
.v6-ask-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ── Operating Graph card ────────────────────────────────────────────── */
.v6-ops {
  padding: 18px;
  display: grid;
  gap: 14px;
}
.v6-ops .v6-ops-eyebrow {
  font-size: 12px; font-weight: 900; letter-spacing: .06em;
  text-transform: uppercase; color: #9fb0bf; margin: 0;
}
.v6-ops h3 { margin: 0; font: 800 22px/1.18 var(--font-display, Inter, system-ui, sans-serif); }
.v6-ops-graph {
  display: flex;
  gap: 0;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  padding: 16px 8px 6px;
  font-size: 13px;
}
.v6-ops-node {
  padding: 8px 12px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 6px;
  font-weight: 750;
  text-align: center;
  font-size: 12px;
}
.v6-ops-arrow { padding: 0 8px; color: #c18a25; font-size: 18px; }
.v6-ops-link {
  justify-self: start; color: var(--gold); font-weight: 800; font-size: 13px;
  text-decoration: none; border-bottom: 1px solid transparent;
}
.v6-ops-link:hover { border-bottom-color: var(--gold); }

/* ── Pending Approvals ───────────────────────────────────────────────── */
.v6-approval-item {
  display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center;
  padding: 11px 0; border-bottom: 1px solid #ebe7de;
}
.v6-approval-item:last-child { border-bottom: 0; }
.v6-approval-desc { font-size: 14px; font-weight: 650; color: var(--ink, #1d1810); }
.v6-approval-src  { display: block; font-size: 12px; color: #8a8270; margin-top: 2px; }

/* H5 / L2 (2026-06-25 audit): the Pending-Approvals "— attestation sessions"
   line stays hidden until a real count is wired. The element carries [hidden]
   (index.html:#v6-attestation-line), but a bare em-dash reads as broken if any
   `span { display:… }` rule overrides that attribute. This locks the hidden
   state to the attribute itself — JS reveals the line by removing [hidden] once
   #v6-attestation-count resolves to a number. */
#v6-attestation-line[hidden] { display: none !important; }

/* ── Pipeline Coverage (compact) ─────────────────────────────────────── */
.v6-coverage {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 18px;
  font-size: 14px;
}
.v6-coverage a { color: #0f857c; font-weight: 800; text-decoration: none; }
.v6-coverage a:hover { text-decoration: underline; }
.v6-coverage .v6-cov-stat { font-weight: 850; color: var(--ink, #1d1810); }

/* ── Trust Rail (always dark) ────────────────────────────────────────── */
.v6-trust-rail {
  background: linear-gradient(145deg, #121d27, #172832);
  color: #eff6fb;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 16px 18px;
}
.v6-trust-rail h3 { margin: 0 0 4px; font-size: 16px; font-weight: 800; }
.v6-trust-rail .v6-trust-line {
  margin: 0 0 12px; color: #b9c8d4; font-size: 13px; line-height: 1.45;
}
.v6-trust-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: 14px;
}
.v6-trust-item:last-child { border-bottom: 0; }
.v6-trust-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; background: #647184; }
.v6-trust-dot.live    { background: #0f857c; box-shadow: 0 0 0 3px rgba(15,133,124,.25); }
.v6-trust-dot.warn    { background: #c18a25; }
.v6-trust-dot.offline { background: #ca3f6b; }
.v6-trust-label { flex: 1 1 auto; }
.v6-trust-meta  { color: #9fb0bf; font-size: 12px; }
.v6-trust-kpis {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.1);
}
.v6-trust-kpi strong { display: block; font: 850 22px var(--font-display, Inter, system-ui, sans-serif); }
.v6-trust-kpi span { display: block; font-size: 11px; color: #9fb0bf; letter-spacing: .04em; text-transform: uppercase; margin-top: 2px; }

/* ── Dark-theme remap of warm light surfaces ─────────────────────────── */
html[data-theme="dark"] .v6-today-head h2,
[data-theme="dark"] .v6-today-head h2,
.theme-dark .v6-today-head h2 { color: #eef2f6; }
html[data-theme="dark"] .v6-panel,
[data-theme="dark"] .v6-panel,
.theme-dark .v6-panel {
  background: var(--surface, #161c24);
  border-color: var(--border, rgba(255,255,255,.12));
  color: var(--ink, #e8edf2);
}
[data-theme="dark"] .v6-panel:not(.dark) .v6-panel-header,
.theme-dark .v6-panel:not(.dark) .v6-panel-header { border-color: var(--border, rgba(255,255,255,.12)); }
[data-theme="dark"] .v6-head-btn,
.theme-dark .v6-head-btn { background: var(--surface, #161c24); color: var(--ink, #e8edf2); border-color: var(--border, rgba(255,255,255,.16)); }
[data-theme="dark"] .v6-brief-item,
.theme-dark .v6-brief-item { background: rgba(255,255,255,.04); border-color: var(--border, rgba(255,255,255,.1)); }
[data-theme="dark"] .v6-decision-title,
[data-theme="dark"] .v6-brief-lead,
[data-theme="dark"] .v6-bi-val,
[data-theme="dark"] .v6-approval-desc,
[data-theme="dark"] .v6-coverage .v6-cov-stat,
.theme-dark .v6-decision-title,
.theme-dark .v6-brief-lead,
.theme-dark .v6-bi-val,
.theme-dark .v6-approval-desc,
.theme-dark .v6-coverage .v6-cov-stat { color: var(--ink, #e8edf2); }
[data-theme="dark"] .v6-action-btn,
.theme-dark .v6-action-btn { background: var(--surface, #161c24); color: var(--ink, #e8edf2); border-color: var(--border, rgba(255,255,255,.16)); }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1280px) {
  .v6-today-grid { grid-template-columns: 1fr 1fr; }
  .v6-today-col.col-trust { grid-column: 1 / -1; }
}
@media (max-width: 880px) {
  .v6-today-head { grid-template-columns: 1fr; }
  .v6-today-head .head-actions { flex-wrap: wrap; }
  .v6-today-grid { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════════════════════════════
   V6 KPI Strip — used on Today page and Day Brief
   ════════════════════════════════════════════════════════════════════════ */
.v6-kpi-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 14px;
  flex-shrink: 0;
}
.v6-kpi-tile {
  background: rgba(255,253,248,.94);
  border: 1px solid #d7d0c3;
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 0 4px 12px rgba(29,24,14,.05);
}
.v6-kpi-tile .val {
  font: 800 22px/1.1 "Aptos Display", Inter;
  color: #c18a25;
  margin-bottom: 2px;
}
.v6-kpi-tile .lbl { font-size: 12px; color: #8a95a3; }
.v6-kpi-tile .delta { font-size: 12px; color: #0f857c; margin-top: 3px; }
.v6-kpi-tile .delta.neg { color: #ca3f6b; }

[data-theme="dark"] .v6-kpi-tile {
  background: rgba(22,30,40,.95);
  border-color: rgba(255,255,255,.12);
}
[data-theme="dark"] .v6-kpi-tile .val { color: var(--gold); }
[data-theme="dark"] .v6-kpi-tile .lbl,
[data-theme="dark"] .v6-kpi-tile .delta { color: #8a95a3; }

@media (max-width: 1280px) {
  .v6-kpi-strip { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .v6-kpi-strip { grid-template-columns: repeat(2, 1fr); }
}
