/* Local-only overrides from The Collective Command Center — Brand Guide. */
:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #0f1724;
  background: #eef4fa;
  --ink: #0f1724;
  --ink-2: #27364a;
  --muted: #64748b;
  --quiet: #95a4b6;
  --line: #d8e4f0;
  --surface: #ffffff;
  --canvas: #f8fbff;
  --bg: #eef4fa;
  --brand: #1461a5;
  --brand-2: #2a7ac5;
  --cyan: #38c6f4;
  --navy: #071b35;
  --green: #1f7a4d;
  --green-soft: #e8f6ee;
  --amber: #a87710;
  --amber-soft: #fff4d8;
  --red: #b44444;
  --red-soft: #fff0f0;
  --info-soft: #e8f3ff;
  --purple: #1461a5;
  --purple-soft: #e8f3ff;
  --shadow: 0 24px 70px rgba(21, 58, 96, .12);
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

body { color: var(--ink); background: var(--bg); }
.workspace-view-nav { display: flex; flex-wrap: wrap; gap: 7px; margin: -6px 0 16px; }
.workspace-view-nav a { display: inline-flex; padding: 6px 10px; color: var(--navy); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; font-size: 11px; font-weight: 700; text-decoration: none; }
.workspace-view-nav a:hover, .workspace-view-nav a:focus-visible { color: var(--brand); border-color: var(--brand); outline-offset: 2px; }
.topbar { height: 84px; background: var(--surface); border-bottom-color: var(--line); }
.brand { gap: 12px; color: var(--ink); }
.brand-logo { display: block; width: 170px; height: auto; max-height: 66px; flex: none; }
.brand-context { display: flex; flex-direction: column; gap: 4px; padding-left: 13px; border-left: 1px solid var(--line); color: var(--muted); font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .9px; line-height: 1.35; }
.brand-context strong { color: var(--navy); font-size: 10px; font-weight: 800; letter-spacing: .6px; }
.topbar-right { gap: 12px; }
.local-indicator { color: var(--navy); font-family: var(--mono); font-size: 10px; font-weight: 800; letter-spacing: .8px; }
.indicator-dot, .tiny-dot { background: var(--brand-2); box-shadow: 0 0 0 3px var(--info-soft); }
.create-button, .action-disabled { border-radius: 999px; }
.create-button { border-color: var(--line); background: var(--canvas); color: var(--muted); }
.create-button small { border-left-color: var(--line); color: var(--quiet); }

main { background: var(--bg); }
h1, h2, h3, .metric-value { color: var(--ink); font-family: var(--serif); font-weight: 700; }
h1 { font-size: 31px; letter-spacing: -.6px; }
.panel-heading h2, .detail-header h2 { font-family: var(--serif); font-size: 19px; letter-spacing: -.2px; }
.info-card-heading h3 { color: var(--ink-2); font-family: var(--serif); font-size: 15px; font-weight: 700; letter-spacing: 0; }
.metric-value { font-size: 28px; line-height: 1; letter-spacing: -.3px; }
.eyebrow, .section-kicker, .metric-head, .read-only-label, .roster-columns, .local-indicator, .notice-stamp, .field-label, .stage-label, .config-title {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .8px;
}
.eyebrow, .section-kicker { color: var(--muted); }
.eyebrow-line { background: var(--brand); }
.intro-copy, .detail-summary { color: var(--muted); }
.snapshot-card, .metric-card, .panel, .detail-header, .info-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.snapshot-icon, .footer-mark, .read-only-label span { color: var(--brand); }
.snapshot-card strong { color: var(--ink-2); }
.snapshot-card div span, .metric-foot, .field-label, .field-sub, .stage-label, .stage-id, .stage-time, .event-provenance { color: var(--muted); }
.notice-band { background: var(--info-soft); border-color: var(--line); border-radius: 8px; }
.notice-icon { color: var(--brand); border-color: var(--brand-2); }
.notice-band strong { color: var(--navy); }
.notice-band p span { color: var(--ink-2); }
.notice-stamp { color: var(--brand); border-color: var(--line); background: var(--surface); border-radius: 999px; }

.metric-card { position: relative; min-width: 0; overflow: hidden; border-radius: 8px; padding-top: 18px; }
.metric-head > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.metric-icon { flex: 0 0 23px; }
.metric-card::before { position: absolute; top: 0; right: 0; left: 0; height: 4px; background: var(--brand); content: ""; }
.metric-card:nth-child(2)::before { background: var(--brand-2); }
.metric-card:nth-child(3)::before { background: var(--amber); }
.metric-card:nth-child(4)::before { background: var(--red); }
.metric-head { color: var(--muted); }
.violet, .blue { color: var(--brand); background: var(--info-soft); }
.amber { color: var(--amber); background: var(--amber-soft); }
.rose { color: var(--red); background: var(--red-soft); }

.roster-heading, .roster-controls, .roster-foot, .detail-badges, .channel-row, .event-row, .provenance-line { border-color: var(--line); }
.count-pill { color: var(--brand); background: var(--info-soft); border-radius: 999px; }
.read-only-label, .roster-columns { color: var(--muted); }
.search-wrap { border-color: var(--line); border-radius: 8px; background: var(--surface); }
.search-wrap input { color: var(--ink); }
.search-wrap input::placeholder { color: var(--quiet); }
.filter-row select, .run-filter select { color: var(--ink-2); background: var(--canvas); border: 1px solid var(--line); border-radius: 8px; }
.roster-item { border-top-color: var(--line); }
.roster-item:hover { background: var(--canvas); }
.roster-item.selected { background: var(--info-soft); box-shadow: inset 3px 0 var(--brand); }
.roster-name, .field-value, .config-value, .trigger-id, .stage-value { color: var(--ink-2); }
.roster-owner, .mode-label, .field-sub, .config-note, .history-note, .event-time, .event-id, .event-result, .channel-name, .channel-state { color: var(--muted); }
.agent-avatar, .detail-avatar { border-radius: 8px; }
.avatar-active, .avatar-tested, .avatar-configured { color: var(--brand); background: var(--info-soft); }
.avatar-blocked { color: var(--red); background: var(--red-soft); }
.avatar-retired { color: var(--muted); background: var(--canvas); }
.badge { border-radius: 999px; }
.state-active, .mode-enabled { color: var(--green); background: var(--green-soft); }
.state-configured, .state-tested { color: var(--brand); background: var(--info-soft); }
.state-blocked { color: var(--red); background: var(--red-soft); }
.state-retired, .mode-paused, .badge-synthetic { color: var(--muted); background: var(--canvas); }
.health-label { color: var(--muted); }
.health-healthy { color: var(--green); }
.health-healthy .health-dot { background-color: var(--green); }
.health-stale, .health-warning { color: var(--amber); }
.health-stale .health-dot, .health-warning .health-dot { background-color: var(--amber); }
.health-unavailable { color: var(--red); }
.health-unavailable .health-dot { background-color: var(--red); }
.health-unknown { color: var(--muted); }
.health-unknown .health-dot { background: var(--quiet); }
.detail-badges .health-healthy { background: var(--green-soft); }
.detail-badges .health-stale, .detail-badges .health-warning { background: var(--amber-soft); }
.detail-badges .health-unavailable { background: var(--red-soft); }
.detail-badges .health-unknown { background: var(--canvas); }
.roster-foot, .page-footer { color: var(--muted); }
.detail-panel { gap: 12px; }
.detail-header { border-radius: 8px; }
.detail-header h2 { color: var(--ink); }
.action-disabled { border-color: var(--line); background: var(--canvas); color: var(--muted); }
.badge-synthetic { color: var(--brand); background: var(--info-soft); }
.field-label { color: var(--muted); }
.field-sub { font-family: var(--sans); text-transform: none; letter-spacing: 0; }
.swap-note { border-color: var(--line); background: var(--info-soft); color: var(--ink-2); border-radius: 8px; }
.swap-mark { color: var(--brand); }
.stage-card, .config-box { border-color: var(--line); background: var(--surface); border-radius: 8px; }
.stage-recorded .stage-value, .channel-state.configured { color: var(--green); }
.stage-missing .stage-value, .status-denied, .status-missing, .event-error, .error-label { color: var(--red); }
.stage-unverified .stage-value, .status-unverified { color: var(--amber); }
.inline-status { border-radius: 999px; background: var(--canvas); color: var(--muted); }
.status-denied, .status-missing { background: var(--red-soft); }
.status-unverified { background: var(--amber-soft); }
.config-note { color: var(--muted); }
.run-filter select { background: var(--surface); }
.event-dot { background: var(--brand-2); }
.event-denied .event-dot, .event-interrupted .event-dot { background: var(--red); }
.event-duplicate-evidence .event-dot { background: var(--amber); }
.event-top .badge { color: var(--muted); background: var(--canvas); }
.event-top .event-badge-succeeded { color: var(--green); background: var(--green-soft); }
.event-top .event-badge-denied, .event-top .event-badge-interrupted { color: var(--red); background: var(--red-soft); }
.event-top .event-badge-duplicate-evidence { color: var(--amber); background: var(--amber-soft); }
.event-result { color: var(--ink-2); }
.missing-copy, .duplicate-note { color: var(--amber); }
.event-error { border-left-color: var(--red); background: var(--red-soft); color: var(--ink-2); }
.error-label { color: var(--red); }
.duplicate-note { background: var(--amber-soft); border-color: #f0dfb5; border-radius: 8px; }
.provenance-icon { color: var(--brand); }
.page-footer { border-top-color: var(--line); }
.footer-sep { color: var(--quiet); }
.page-footer code, .trigger-id { color: var(--brand); }

:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; }
.search-wrap:focus-within { outline: 2px solid var(--brand-2); outline-offset: 2px; }

@media (max-width: 780px) {
  .topbar { height: 72px; }
  .brand-logo { width: 148px; max-height: 57px; }
}

@media (max-width: 480px) {
  .topbar { height: 64px; padding: 0 12px; }
  .brand-logo { width: 126px; max-height: 48px; }
  .brand-context { display: none; }
  .topbar-right { gap: 8px; }
  .local-indicator { font-size: 8px; letter-spacing: .35px; gap: 5px; }
  .create-button { padding: 7px 8px; }
}
