:root {
  color-scheme: dark;
  --nav-height: 56px;
  --bg: #0c1113;
  --surface: #131a1d;
  --surface-2: #192226;
  --border: #2d383c;
  --border-strong: #46555a;
  --text: #f0f2f0;
  --muted: #9faab0;
  --gold: #e9be70;
  --gold-dim: #b58d43;
  --emerald: #8ad5a6;
  --crimson: #ef6b6b;
  --radius: 14px;
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 14px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body.office-mode {
  overflow: hidden;
  height: 100dvh;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2f3b3f; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #4a5c62; }

button, input, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

.icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ── Top Navbar (Quiet Charcoal Chrome) ─────────────────────────────────── */

.universe-header {
  height: var(--nav-height);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  background: linear-gradient(115deg, #141a1df2, #0d1215fa);
  border-bottom: 1px solid #283236;
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(16px);
}

.brand {
  padding-right: 10px;
  border-right: 1px solid #2a3337;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-name {
  font-size: 16.5px;
  font-weight: 650;
  letter-spacing: -0.4px;
  color: #f6f4ee;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: stretch;
  height: 100%;
  gap: 1px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.main-nav::-webkit-scrollbar { display: none; }

.main-nav a {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 3.8px;
  font-size: 11.2px;
  color: #b4bcbf;
  white-space: nowrap;
  transition: color 0.16s ease;
}
.main-nav a:hover { color: #ffffff; }
.main-nav a.active {
  color: #fff7ea;
  font-weight: 600;
}
.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--gold);
}

.universe-utilities {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.nav-ticker {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3.5px 7.5px;
  border-radius: 999px;
  background: #172024;
  border: 1px solid #2e3b40;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.ticker-sym { color: var(--muted); font-weight: 600; font-size: 10px; }
.nav-ticker strong { color: var(--gold); font-weight: 650; }
.ticker-sep { color: #4c5a60; }
.ticker-eq { color: var(--emerald); font-weight: 600; }

.local-mode, .autopilot-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #d6e2df;
  white-space: nowrap;
}
.autopilot-pill {
  padding: 3.5px 7.5px;
  border-radius: 999px;
  background: #172226;
  border: 1px solid #314247;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}
.autopilot-pill:hover {
  border-color: var(--gold);
  background: #1d2b30;
}
.status-dot.paused {
  background: #9faab0;
  box-shadow: none;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #98d48c;
  box-shadow: 0 0 10px #98d48c66;
  display: inline-block;
}
.status-dot.locked {
  background: var(--crimson);
  box-shadow: 0 0 10px var(--crimson);
}

.icon-button {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 0;
  background: transparent;
  color: #c2cbcd;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.icon-button:hover {
  background: #222d31;
  color: #fff4db;
}
.icon-button.small { width: 26px; height: 26px; }

.owner-profile {
  padding-left: 10px;
  border-left: 1px solid #2c363a;
}
.owner-initial, .owner-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #d9c69e;
  color: #2c2416;
  font-weight: 700;
  font-size: 13px;
  display: inline-grid;
  place-items: center;
  border: 2px solid #596350;
}

/* ── Emergency Lockout Strip ────────────────────────────────────────────── */

.lockout-strip {
  background: #4b1d21;
  border-bottom: 1px solid #963b42;
  color: #fde8e8;
  padding: 7px 24px;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 25;
}
.strip-action {
  margin-left: auto;
  background: #fde8e8;
  color: #4b1d21;
  border: 0;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 11.5px;
  font-weight: 650;
  cursor: pointer;
}

/* ── Interactive Illustrated Human Office Stage ─────────────────────────── */

.office-view {
  height: calc(100dvh - var(--nav-height));
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  height: 100%;
}
.overview-grid.detail-open {
  grid-template-columns: minmax(0, 1fr) 340px;
}

.office-stage {
  position: relative;
  height: 100%;
  background: #eae4db;
  overflow: hidden;
}

.office-canvas-host {
  position: absolute;
  inset: 0;
}
.office-canvas-host canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}
.office-canvas-host canvas:active { cursor: grabbing; }

/* 3D Floating Speech Bubbles & Name Tags (CSS2DRenderer) */
.three-labels-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  overflow: hidden;
}
.person3d {
  transform: translateY(-6px);
  text-align: center;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  transition: opacity 0.2s ease;
}
.bubble3d {
  max-width: 228px;
  padding: 5.5px 10px;
  border-radius: 11px;
  background: rgba(14, 20, 26, 0.86);
  color: #f4f1e8;
  font-size: 11px;
  line-height: 1.36;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.42);
  position: relative;
  border: 1px solid rgba(233, 190, 112, 0.42);
  font-weight: 500;
  backdrop-filter: blur(8px);
}
.bubble3d::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 8px;
  height: 8px;
  background: rgba(14, 20, 26, 0.9);
  border-right: 1px solid rgba(233, 190, 112, 0.42);
  border-bottom: 1px solid rgba(233, 190, 112, 0.42);
  transform: translateX(-50%) rotate(45deg);
}
.bubble3d.hide { display: none; }
.bubble3d.hi {
  background: rgba(15, 36, 28, 0.9);
  border-color: rgba(138, 213, 166, 0.65);
  color: #e9fbf0;
  font-weight: 600;
}
.bubble3d.hi::after {
  background: rgba(15, 36, 28, 0.92);
  border-color: rgba(138, 213, 166, 0.65);
}
.tag3d {
  pointer-events: auto;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 2.5px 9px;
  border-radius: 999px;
  font-size: 10.6px;
  font-weight: 700;
  color: #ffffff;
  background: var(--c, #3a74cc);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
}
.tag3d small {
  font-weight: 500;
  opacity: 0.92;
}
.tag3d:hover {
  filter: brightness(1.12);
}

.mood-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5.5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(233, 190, 112, 0.36);
  background: rgba(233, 190, 112, 0.12);
  color: #f6e4bc;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.mood-pill-btn:hover {
  border-color: var(--gold);
  background: rgba(233, 190, 112, 0.22);
}

.office-hover-hint {
  position: absolute;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(13, 19, 24, 0.88);
  border: 1px solid rgba(233, 190, 112, 0.45);
  color: #f3e5c5;
  font-size: 11px;
  font-weight: 600;
  z-index: 6;
  pointer-events: none;
  backdrop-filter: blur(8px);
}

/* Quick Camera Room Shortcuts */
.room-shortcuts {
  position: absolute;
  top: 14px;
  left: 18px;
  display: flex;
  gap: 6px;
  z-index: 5;
  opacity: 0.96;
  flex-wrap: wrap;
}

.scene-shortcut {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #3c4648;
  background: #11191bd9;
  color: #d4dad7;
  font-size: 11px;
  cursor: pointer;
  backdrop-filter: blur(12px);
}
.scene-shortcut:hover {
  border-color: var(--gold);
  color: #fff6df;
}

/* Bottom Stage Overlays */
.scene-actions {
  position: absolute;
  left: 20px;
  bottom: 62px;
  display: flex;
  gap: 6px;
  z-index: 5;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 9px;
  border: 1px solid #354144;
  background: #11191ceb;
  color: #cfd7d3;
  font-size: 11.5px;
  cursor: pointer;
  backdrop-filter: blur(12px);
}
.pill-btn:hover {
  border-color: #93a187;
  color: #fff6e1;
  background: #1c282b;
}
.pill-btn .icon { width: 13px; height: 13px; color: var(--gold); }

.stage-caption {
  position: absolute;
  left: 20px;
  bottom: 16px;
  height: 35px;
  padding: 0 14px;
  border-radius: 8px;
  background: #10171be8;
  border: 1px solid #384346;
  color: #ced5d4;
  font-size: 11.5px;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 340px;
  z-index: 5;
}
#stage-status-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.camera-tools {
  position: absolute;
  left: 50%;
  bottom: 15px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #141c20f0;
  border: 1px solid #444e51;
  box-shadow: 0 8px 28px #0009;
  z-index: 5;
}
.camera-tools output {
  width: 42px;
  text-align: center;
  font-size: 11px;
  color: #cfd6d4;
  font-variant-numeric: tabular-nums;
}
.cam-sep {
  width: 1px;
  height: 18px;
  background: #394346;
  margin: 0 3px;
}
.camera-follow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid #3c4749;
  background: #1b2427;
  color: #dde3df;
  font-size: 11px;
  cursor: pointer;
}
.camera-follow[aria-pressed="false"] .status-dot { background: #606c6e; box-shadow: none; }

.arka-cta-pill {
  position: absolute;
  right: 20px;
  bottom: 15px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 15px 5px 6px;
  border-radius: 999px;
  background: #152322f0;
  border: 1px solid #63847c;
  color: #f3f4eb;
  font-size: 12px;
  font-weight: 500;
  box-shadow: 0 8px 26px #0008;
  z-index: 5;
}
.arka-cta-pill:hover { border-color: var(--gold); }
.arka-cta-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #8ea39a;
}

/* Story Dialogue Card */
.story-card {
  position: absolute;
  left: 20px;
  bottom: 108px;
  width: min(355px, calc(100% - 40px));
  padding: 14px 16px;
  border-radius: 14px;
  background: #131d20f2;
  border: 1px solid #54665e;
  box-shadow: 0 14px 36px #000a;
  z-index: 6;
  backdrop-filter: blur(16px);
}
.story-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  letter-spacing: 1.4px;
  color: var(--gold);
  margin-bottom: 8px;
}
.story-speaker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.story-speaker strong { display: block; font-size: 13px; }
.story-speaker small { color: var(--muted); font-size: 11px; }
.story-line {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: #eef1ec;
}

/* Settings Popover */
.office-settings {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 288px;
  padding: 18px;
  border-radius: 14px;
  background: #152024f7;
  border: 1px solid #48585b;
  box-shadow: 0 18px 50px #000b;
  z-index: 12;
}
.settings-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}
.settings-head h3 { margin: 4px 0 0; font-size: 16px; }
.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  padding: 6px 0;
  cursor: pointer;
}
.field-block {
  margin-top: 12px;
  display: grid;
  gap: 5px;
}
.field-block span {
  font-size: 9.5px;
  letter-spacing: 1.3px;
  color: var(--muted);
}
.field-block select, .std-select, .std-input {
  background: #10171a;
  border: 1px solid #354347;
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text);
  font-size: 12.5px;
}

/* Right Contextual Inspector */
.office-inspector {
  height: 100%;
  overflow-y: auto;
  background: #11191c;
  border-left: 1px solid #2d393d;
  padding: 18px;
}
.ins-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.eyebrow {
  font-size: 9.5px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--muted);
}
.emp-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #596c68;
}
.emp-avatar.large {
  width: 68px;
  height: 68px;
  border-radius: 16px;
}

.ins-profile {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 14px;
}
.ins-profile h3 { margin: 0; font-size: 17px; }
.ins-profile p { margin: 3px 0 0; font-size: 12px; color: var(--muted); }

.ins-box {
  background: #162024;
  border: 1px solid #2b383d;
  border-radius: 11px;
  padding: 12px;
  margin-bottom: 12px;
}
.ins-box h4 {
  margin: 0 0 6px;
  font-size: 11.5px;
  color: var(--gold);
}
.ins-box p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: #d7dfdd;
}

/* ── 2. RUANG ARKA SPLIT VIEW ───────────────────────────────────────────── */

.arka-view {
  height: calc(100dvh - var(--nav-height));
}
.arka-split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr);
  height: 100%;
  min-height: 0;
}
.arka-stage-slot {
  position: relative;
  background: #050708;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.arka-console {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #11191d;
  border-left: 1px solid #2b373b;
}
.arka-console-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  background: #162024;
  border-bottom: 1px solid #2c393e;
}
.arka-head-avatar {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  object-fit: cover;
  border: 1.5px solid var(--gold);
}
.arka-console-head h2 { margin: 3px 0 4px; font-size: 18px; }
.arka-console-head p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.45; }

.arka-chat-stream {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.arka-msg {
  max-width: 92%;
  padding: 12px 15px;
  border-radius: 13px;
  background: #1a262b;
  border: 1px solid #324349;
  font-size: 13px;
  line-height: 1.6;
}
.arka-msg.founder {
  align-self: flex-end;
  background: #233832;
  border-color: #496b60;
}
.arka-msg-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 6px;
}
.msg-heading {
  display: block;
  font-size: 13.5px;
  color: #fff6e0;
  margin-bottom: 6px;
}
.msg-bullet {
  display: flex;
  gap: 8px;
  margin: 4px 0;
}
.inline-code {
  background: #0f1619;
  border: 1px solid #2e3d42;
  padding: 1px 6px;
  border-radius: 5px;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11.5px;
  color: var(--gold);
}

.arka-quick-prompts {
  display: flex;
  gap: 7px;
  padding: 10px 22px;
  overflow-x: auto;
  border-top: 1px solid #263236;
}
.prompt-chip {
  background: #182226;
  border: 1px solid #324045;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11.5px;
  color: #c8d2d0;
  white-space: nowrap;
  cursor: pointer;
}
.prompt-chip:hover { border-color: var(--gold); color: #fff; }

.arka-composer {
  display: flex;
  gap: 10px;
  padding: 14px 22px;
  background: #151f23;
  border-top: 1px solid #2b383d;
}
.arka-composer input {
  flex: 1;
  background: #0e1417;
  border: 1px solid #334247;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  outline: none;
}
.arka-composer input:focus { border-color: var(--gold); }

/* ── Standard Multi-Page Container (Dashboard, Ledger, News, Team, Activity) ── */

.page-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 32px 28px 64px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 26px;
}
.page-head h1 { margin: 6px 0 6px; font-size: 28px; font-weight: 650; letter-spacing: -0.6px; }
.page-head p { margin: 0; color: var(--muted); font-size: 13.5px; }

.btn-gold, .btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-gold {
  background: #2a473a;
  border-color: #5b826d;
  color: #f3f8f2;
}
.btn-gold:hover { background: #355949; border-color: var(--gold); }
.btn-outline {
  background: #172024;
  border-color: #344247;
  color: #d6dedc;
}
.btn-outline:hover { border-color: var(--gold); color: #fff; }

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.metric-card, .surface-card {
  background: linear-gradient(135deg, #182125, #11181b);
  border: 1px solid #2c383d;
  border-radius: var(--radius);
  padding: 18px 20px;
}
.metric-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}
.metric-val {
  font-size: 26px;
  font-weight: 650;
  margin: 10px 0 6px;
  font-variant-numeric: tabular-nums;
}
.metric-val.pos { color: var(--emerald); }
.metric-val.neg { color: var(--crimson); }
.metric-sub { font-size: 12px; color: var(--muted); margin: 0; }

.dash-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr);
  gap: 18px;
}

.pipeline-steps {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 10px;
}
.pipeline-steps li {
  background: #182227;
  border: 1px solid #2f3c42;
  border-radius: 11px;
  padding: 12px 13px;
}
.pipeline-steps li.active {
  background: #2b2c22;
  border-color: #9e8a58;
}
.pipeline-steps strong { display: block; font-size: 12.5px; margin-bottom: 4px; }
.pipeline-steps small { color: var(--muted); font-size: 11.5px; }

.donut-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 12px;
}
.donut-legend {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
  display: grid;
  gap: 8px;
  font-size: 12.5px;
}
.donut-legend li {
  display: flex;
  justify-content: space-between;
}

.clean-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  margin-top: 10px;
}
.clean-table th, .clean-table td {
  padding: 11px 12px;
  text-align: left;
  border-bottom: 1px solid #253035;
}
.clean-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.team-card {
  background: linear-gradient(135deg, #182125, #11181b);
  border: 1px solid #2c383d;
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.team-card-head {
  display: flex;
  align-items: center;
  gap: 13px;
}
.team-card-head h3 { margin: 0; font-size: 16px; }
.team-card-head small { color: var(--muted); font-size: 12px; }

.model-bar {
  display: flex;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #253136;
}
.model-bar select { width: 110px; }
.model-bar input { flex: 1; min-width: 0; }

.event-feed-list {
  display: grid;
  gap: 10px;
}
.event-item {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 13px 16px;
  border-radius: 12px;
  background: #151e22;
  border: 1px solid #29353a;
}
.event-item p { margin: 3px 0 0; color: #cfd8d7; font-size: 12.5px; }
.event-item time { margin-left: auto; font-size: 11.5px; color: var(--muted); white-space: nowrap; }

.brain-dialog {
  width: min(760px, 92vw);
  max-height: 85vh;
  background: #131c20;
  color: var(--text);
  border: 1px solid #48595e;
  border-radius: 16px;
  padding: 0;
}
.brain-dialog::backdrop { background: #000a; }
.brain-body { padding: 22px; overflow-y: auto; max-height: 78vh; }
.code-block {
  background: #0b1012;
  border: 1px solid #263338;
  border-radius: 10px;
  padding: 12px;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11.5px;
  white-space: pre-wrap;
  max-height: 210px;
  overflow-y: auto;
  color: #dbe4e2;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  background: #182522;
  border: 1px solid #597a6c;
  color: #f2f6f0;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 12.5px;
  box-shadow: 0 12px 32px #0009;
  z-index: 60;
}

@media (max-width: 980px) {
  .arka-split, .dash-columns, .overview-grid.detail-open, .xau-chart-layout {
    grid-template-columns: 1fr;
  }
  .nav-ticker { display: none; }
}

/* ── Phase 2: XAUUSD Live SMC Chart, Reason Dossier, & 9-Agent Evolution ── */

.xau-chart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, 1fr);
  gap: 18px;
  align-items: start;
}

.xau-canvas-wrap {
  width: 100%;
  height: 500px;
  border-radius: 12px;
  border: 1px solid #28363b;
  background: #0c1316;
  overflow: hidden;
  position: relative;
  cursor: crosshair;
}

.tf-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.tf-pill {
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid #2d3c41;
  background: #152024;
  color: #b8c4c7;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.tf-pill:hover { border-color: var(--gold); color: #fff; }
.tf-pill.active {
  background: #2b2517;
  border-color: var(--gold);
  color: var(--gold);
}

.reason-dossier-list {
  display: grid;
  gap: 10px;
}

.reason-row {
  padding: 11px 13px;
  border-radius: 11px;
  background: #151f23;
  border: 1px solid #27353b;
}
.reason-row-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.3px;
}
.reason-row p {
  margin: 0;
  font-size: 12.2px;
  line-height: 1.55;
  color: #d3dcda;
}

.iq-meter {
  width: 100%;
  height: 6px;
  background: #1b282d;
  border-radius: 999px;
  overflow: hidden;
  margin: 6px 0 4px;
}
.iq-meter > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #b58d43, #8ad5a6);
  border-radius: 999px;
}

.forensic-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 650;
}
.forensic-badge.prime { background: #173326; color: #8ad5a6; border: 1px solid #35694e; }
.forensic-badge.toxic { background: #361a1d; color: #ef6b6b; border: 1px solid #6e3238; }
.forensic-badge.neutral { background: #222c30; color: #cbd5d8; border: 1px solid #3c4d54; }



/* ── Phase 7: ForexFactory WIB Calendar & Multi-TF Top-Down Strip ───────── */
.ff-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 14px;
  margin-bottom: 10px;
  border-bottom: 1px solid #26343a;
}

.ff-day-row td {
  background: linear-gradient(90deg, #1b272d, #131c21);
  color: var(--gold);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.4px;
  padding: 9px 12px !important;
  border-top: 1px solid #2d3e46;
  border-bottom: 1px solid #2d3e46;
}

.ff-folder-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.ff-folder-badge.RED {
  background: rgba(239, 68, 68, 0.18);
  color: #ff8080;
  border: 1px solid rgba(239, 68, 68, 0.48);
}
.ff-folder-badge.ORANGE {
  background: rgba(249, 115, 22, 0.18);
  color: #fdba74;
  border: 1px solid rgba(249, 115, 22, 0.45);
}
.ff-folder-badge.YELLOW {
  background: rgba(234, 179, 8, 0.15);
  color: #fde047;
  border: 1px solid rgba(234, 179, 8, 0.4);
}
.ff-folder-badge.HOLIDAY {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.ff-actual {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.ff-actual.BETTER { color: var(--emerald); }
.ff-actual.WORSE { color: var(--crimson); }
.ff-actual.INLINE { color: #e2e8f0; }

.mtf-ladder {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  gap: 9px;
  margin-bottom: 16px;
}
.mtf-rung {
  background: #131c20;
  border: 1px solid #25343b;
  border-radius: 11px;
  padding: 10px 12px;
}
.mtf-rung strong {
  display: block;
  font-size: 10.8px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 3px;
}
.mtf-rung span {
  font-size: 12px;
  color: #d6e0de;
  line-height: 1.45;
}

/* ── Phase 15: Topbar Active Brain Pill, LLM Usage Dashboard & Hermes Journal ── */

.nav-llm-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(233, 190, 112, 0.1);
  border: 1px solid rgba(233, 190, 112, 0.34);
  font-size: 10.8px;
  font-weight: 600;
  color: #f6e7c4;
  white-space: nowrap;
  transition: border-color 0.16s ease, background 0.16s ease;
}
.nav-llm-pill:hover {
  border-color: var(--gold);
  background: rgba(233, 190, 112, 0.18);
}
.nav-llm-pill .llm-calls {
  font-size: 10.2px;
  color: var(--muted);
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  padding-left: 6px;
}
@media (max-width: 1390px) {
  .nav-llm-pill .llm-calls { display: none; }
}
.llm-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
  flex-shrink: 0;
}
.llm-dot.live {
  background: #38e89e;
  box-shadow: 0 0 8px rgba(56, 232, 158, 0.7);
}

.llm-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.llm-kpi-row > div {
  background: #10181c;
  border: 1px solid #243339;
  border-radius: 10px;
  padding: 10px 12px;
}
.llm-kpi-row span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.llm-kpi-row strong {
  display: block;
  font-size: 19px;
  font-weight: 700;
  color: #f4f7f6;
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}
.llm-kpi-row small {
  display: block;
  font-size: 10.8px;
  color: var(--muted);
  margin-top: 2px;
}

.llm-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 68px;
  margin-top: 10px;
}
.llm-bars > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 4px;
}
.llm-bars span {
  width: 100%;
  max-width: 28px;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, var(--gold), #5b826d);
}
.llm-bars small {
  font-size: 10px;
  color: var(--muted);
}

.hermes-journal-list {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}
.hermes-journal-item {
  background: #111a1e;
  border: 1px solid #25343b;
  border-left: 3px solid var(--gold);
  border-radius: 10px;
  padding: 11px 13px;
}

/* ── Phase 18: VPS Health & Infrastructure Command Center ───────────────── */
.vps-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  background: linear-gradient(135deg, #121c22 0%, #172329 55%, #1d2219 100%);
  border: 1px solid #35474d;
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 18px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
}
.vps-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 10px;
  font-size: 12.2px;
  color: #c5d1cf;
}
.vps-score-ring {
  position: relative;
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
}
.vps-score-ring svg {
  width: 116px;
  height: 116px;
  transform: rotate(-90deg);
}
.vps-score-center {
  position: absolute;
  text-align: center;
}
.vps-score-center strong {
  display: block;
  font-size: 26px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.vps-score-center small {
  font-size: 10px;
  letter-spacing: 0.8px;
  color: var(--muted);
  text-transform: uppercase;
}
.vps-pulse-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
  animation: vpsPulse 2s ease-in-out infinite;
}
@keyframes vpsPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.84); }
}

.vps-gauge-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.vps-gauge-card {
  background: #131d21;
  border: 1px solid #26353b;
  border-radius: 14px;
  padding: 15px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.vps-gauge-card:hover {
  border-color: #465d63;
  transform: translateY(-1px);
}
.vps-mini-ring {
  position: relative;
  width: 74px;
  height: 74px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}
.vps-mini-ring svg {
  width: 74px;
  height: 74px;
  transform: rotate(-90deg);
}
.vps-mini-ring span {
  position: absolute;
  font-size: 14px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: #f2f6f5;
}
.vps-gauge-info {
  min-width: 0;
  flex: 1;
}
.vps-gauge-info .eyebrow {
  display: block;
  margin-bottom: 2px;
}
.vps-gauge-info strong {
  display: block;
  font-size: 14.5px;
  color: #f3f7f6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vps-gauge-info small {
  display: block;
  font-size: 11.3px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.4;
}

.vps-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.vps-svg-chart {
  width: 100%;
  height: 156px;
  display: block;
  margin-top: 8px;
  border-radius: 10px;
  background: #0d1519;
  border: 1px solid #213036;
}
.vps-legend {
  display: flex;
  gap: 14px;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 6px;
}
.vps-legend i {
  display: inline-block;
  width: 10px;
  height: 3px;
  border-radius: 2px;
  vertical-align: middle;
  margin-right: 5px;
}

.vps-core-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.vps-core-item {
  background: #0f181c;
  border: 1px solid #223138;
  border-radius: 9px;
  padding: 7px 8px;
}
.vps-core-head {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.vps-core-bar {
  height: 5px;
  background: #1d2b31;
  border-radius: 99px;
  overflow: hidden;
  margin-top: 5px;
}
.vps-core-bar > span {
  display: block;
  height: 100%;
  border-radius: 99px;
  transition: width 0.4s ease;
}

.vps-service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}
.vps-svc-card {
  background: #10191d;
  border: 1px solid #25343b;
  border-radius: 12px;
  padding: 12px 14px;
}
.vps-svc-card.ok { border-left: 3px solid var(--emerald); }
.vps-svc-card.warn { border-left: 3px solid var(--crimson); }
.vps-svc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}
.vps-svc-head strong { font-size: 13px; color: #f0f5f4; }
.vps-svc-card p { margin: 0; font-size: 11.5px; color: var(--muted); line-height: 1.45; }

.vps-controls-bar {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.vps-readiness-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.vps-ready-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: #10191d;
  border: 1px solid #24333a;
  font-size: 12.2px;
}
.vps-alert-banner {
  background: rgba(220, 68, 68, 0.12);
  border: 1px solid rgba(239, 98, 98, 0.45);
  border-radius: 12px;
  padding: 12px 15px;
  margin-bottom: 16px;
  font-size: 12.5px;
  color: #ffd5d5;
  display: grid;
  gap: 5px;
}
@media (max-width: 1080px) {
  .vps-gauge-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vps-service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .vps-hero, .vps-gauge-grid, .vps-chart-grid, .vps-service-grid { grid-template-columns: 1fr; }
}
