/* ============================================================
   EQUANU — Command Desk (desktop web)
   Tokens taken verbatim from EQUANU Command Desk.dc.html.
   Dark is default; light supported via [data-theme="light"].
   ============================================================ */
:root {
  --bg:#0C1820; --rail:#0A151D; --rail2:#0B1922; --surface:#10222C; --inset:#16303C;
  --line:#16303C; --line2:#122731; --line3:#224150; --track:#0C1820;
  --ink:#EAF1F2; --t1:#C8D6DC; --t2:#9DB1BC; --t3:#6E8794; --t4:#42565F; --t5:#3A5360;
  --merc:#4FB7B3; --merctx:#4FB7B3; --mercsoft:#1E4A4C;
  --gold:#C6A15B; --goldtx:#C6A15B; --gain:#2E9E73; --loss:#CE6B5B;
  --slate:#7C93A0; --slatetx:#7C93A0; --caution:#E0A33E;
  --halt:#C0473F; --halttx:#E0A99F; --haltbg:#2a1512; --haltbd:#3a2420;
  --arm1:#33505E; --arm2:#5A7785; --pivotbg:#0E2A2B; --diabg:#0E1E27;
  --hanger:#3A5360; --ringbg:#0E2027; --navactive:#13262F; --cash:#2A4350;
  --cardsh:none; --scroll:#1b3845;
  --font-display:'Hanken Grotesk',system-ui,sans-serif;
  --font-body:'Geist',system-ui,sans-serif;
  --font-mono:'Geist Mono',ui-monospace,monospace;
  --settle:1500ms cubic-bezier(.16,.7,.27,1);
}
:root[data-theme="light"] {
  --bg:#F1F4F3; --rail:#E7EBEA; --rail2:#EBEEED; --surface:#FBFCFC; --inset:#EAEEED;
  --line:#DCE3E1; --line2:#E6EBE9; --line3:#CBD4D2; --track:#E6EBE9;
  --ink:#11242E; --t1:#243640; --t2:#44575F; --t3:#5E7480; --t4:#8597A0; --t5:#9AABB2;
  --merctx:#2C8C88; --mercsoft:#D7EEEC; --goldtx:#9A7833; --gain:#1F8A5F; --loss:#C0543F;
  --slatetx:#566B74; --caution:#B07614; --halt:#B23A33; --halttx:#A4413A; --haltbg:#FBEDEA; --haltbd:#F0D2CB;
  --pivotbg:#FFFFFF; --diabg:#EAEEED; --hanger:#AFC0C6; --ringbg:#FFFFFF; --navactive:#E1E7E5; --cash:#B7C5C9;
  --cardsh:0 1px 2px rgba(20,40,52,.07); --scroll:#C6D0CE;
}

* { box-sizing:border-box; }
html, body { margin:0; padding:0; }
body { background:var(--bg); color:var(--ink); font-family:var(--font-body); font-size:15px; line-height:1.5; -webkit-font-smoothing:antialiased; }
.mono { font-family:var(--font-mono); font-variant-numeric:tabular-nums; }
a { color:inherit; text-decoration:none; }
::-webkit-scrollbar { width:9px; height:9px; }
::-webkit-scrollbar-thumb { background:var(--scroll); border-radius:9px; }
::-webkit-scrollbar-track { background:transparent; }
@keyframes eqpulse { 0%,100%{opacity:.3} 50%{opacity:1} }
:focus-visible { outline:2px solid var(--merc); outline-offset:2px; border-radius:6px; }

/* ---------------- SHELL ---------------- */
.desk-shell { display:flex; height:100vh; width:100%; overflow:hidden; }

/* ---------------- NAV RAIL ---------------- */
.nav-rail { flex:0 0 78px; display:flex; flex-direction:column; align-items:center; padding:18px 0 14px; border-inline-end:1px solid var(--line); background:var(--rail); }
.nav-logo { width:34px; height:34px; border-radius:9px; border:1.5px solid var(--gold); display:flex; align-items:center; justify-content:center; margin-bottom:22px; flex:none; }
.nav-logo-bob { width:13px; height:13px; border-radius:50%; border:1.5px solid var(--gold); position:relative; }
.nav-logo-bob::before { content:""; position:absolute; left:50%; top:-4px; bottom:-4px; width:1.5px; background:var(--gold); transform:translateX(-50%); }
.nav-group { display:flex; flex-direction:column; gap:2px; width:100%; align-items:center; }
.nav-group.scroll { flex:1 1 auto; overflow-y:auto; overflow-x:hidden; }
.nav-group.scroll::-webkit-scrollbar { width:0; }
.nav-item { position:relative; width:58px; padding:8px 0; display:flex; flex-direction:column; align-items:center; gap:3px; border-radius:10px; color:var(--t4); cursor:pointer; border:0; background:none; }
.nav-badge { position:absolute; top:2px; right:9px; min-width:15px; height:15px; padding:0 4px; border-radius:999px; background:var(--caution,#E0A33E); color:var(--on-accent,#0C1820); font-family:var(--font-mono); font-size:9px; font-weight:700; line-height:15px; text-align:center; }
.nav-item .ic { font-size:16px; line-height:1; }
.nav-item .lb { font-size:9.5px; letter-spacing:.03em; }
.nav-item.is-active { color:var(--ink); background:var(--navactive); }
.nav-item.is-active .ic { color:var(--merc); }
.nav-divider { width:34px; height:1px; background:var(--line); margin:6px 0; }

/* Authority Dial (rail bottom) */
.dial-wrap { border-top:1px solid var(--line); padding-top:14px; display:flex; flex-direction:column; align-items:center; gap:7px; width:100%; }
.dial { position:relative; width:54px; height:54px; border-radius:50%; background:var(--diabg); box-shadow:0 0 0 1px var(--line); display:flex; align-items:center; justify-content:center; border:0; cursor:pointer; }
.dial-ring { position:absolute; inset:-3px; border-radius:50%; border:3px solid var(--gold); box-shadow:0 0 14px rgba(198,161,91,.35); }
.dial-mark { font-family:var(--font-display); font-weight:700; font-size:13px; color:var(--goldtx); }
.dial-label { font-size:8.5px; letter-spacing:.08em; color:var(--t5); text-transform:uppercase; text-align:center; }
.dial-action { font-size:10px; font-weight:600; color:var(--halt); border:1px solid var(--haltbd); border-radius:7px; padding:3px 8px; background:none; cursor:pointer; }
.is-killed .dial-ring { border-color:var(--halt); box-shadow:none; }
.is-killed .dial-mark { color:var(--halt); }
.dial-action--resume { color:var(--merctx); border-color:var(--mercsoft); }

/* ---------------- WORKSPACE ---------------- */
.workspace { flex:1 1 auto; height:100vh; overflow-y:auto; padding:26px 30px 60px; min-width:0; }
.desk-header { display:flex; justify-content:space-between; align-items:flex-start; flex-wrap:wrap; gap:14px; margin-bottom:18px; }
.page-h1 { font-family:var(--font-display); font-weight:700; font-size:30px; letter-spacing:-0.02em; white-space:nowrap; margin:0; }
.page-sub { font-size:13px; color:var(--t3); margin-top:4px; }
.header-status { display:flex; align-items:center; gap:8px; font-size:13px; color:var(--t3); margin-top:6px; }
.live-dot { width:7px; height:7px; border-radius:50%; background:var(--merc); animation:eqpulse 2.4s ease-in-out infinite; }
.dotsep { color:var(--t5); }
.acct-switch { display:flex; align-items:center; gap:9px; border:1px solid var(--line); border-radius:9px; background:var(--surface); padding:7px 11px; cursor:pointer; }
.acct-chip { width:22px; height:22px; border-radius:6px; background:var(--mercsoft); color:var(--merctx); display:flex; align-items:center; justify-content:center; font-family:var(--font-display); font-weight:700; font-size:11px; }

/* cards */
.panel { background:var(--surface); border:1px solid var(--line); border-radius:12px; box-shadow:var(--cardsh); }
.panel-pad { padding:16px 20px; }
.panel-head { font-size:11px; letter-spacing:.12em; color:var(--t3); text-transform:uppercase; font-weight:600; }
.panel-note { font-size:11px; color:var(--t5); font-family:var(--font-mono); }
.row-between { display:flex; align-items:center; justify-content:space-between; }

/* ---------------- THE BEAM PANEL ---------------- */
.beam-panel { position:relative; overflow:hidden; border-radius:14px; padding:26px 28px; display:flex; flex-wrap:wrap; gap:24px 30px; margin-bottom:16px; }
.beam-glow { position:absolute; left:30%; top:-30%; width:340px; height:340px; border-radius:50%; background:radial-gradient(circle, rgba(79,183,179,.10), transparent 65%); pointer-events:none; }
.beam-left { flex:1 1 380px; min-width:280px; position:relative; }
.beam-right { flex:1 1 250px; min-width:240px; border-inline-start:1px solid var(--line); padding-inline-start:28px; }

.beam-stage { position:relative; height:236px; margin-top:6px; }
.beam-edge { position:absolute; bottom:0; font-size:10.5px; letter-spacing:.1em; color:var(--t4); text-transform:uppercase; }
.beam-edge.left { left:0; } .beam-edge.right { right:0; }
.beam-edge.plumb { left:50%; transform:translateX(-50%); font-size:9.5px; letter-spacing:.14em; color:var(--gold); }
.beam-plumb { position:absolute; left:50%; top:46px; width:2px; height:150px; margin-left:-1px; background:linear-gradient(var(--gold), rgba(198,161,91,.12)); opacity:.85; }
.beam-bob { position:absolute; left:50%; top:42px; width:8px; height:8px; margin-left:-4px; background:var(--gold); transform:rotate(45deg); }
.beam-post { position:absolute; left:50%; bottom:20px; width:5px; height:140px; margin-left:-2.5px; background:linear-gradient(var(--arm1),var(--inset)); border-radius:3px; }
.beam-base { position:absolute; left:50%; bottom:14px; width:130px; height:9px; margin-left:-65px; background:linear-gradient(var(--arm1),#13252F); border-radius:5px; }
.beam-fulcrum { position:absolute; left:50%; top:54px; width:15px; height:15px; margin-left:-7.5px; border-radius:50%; background:var(--pivotbg); box-shadow:0 0 0 2px var(--merc); z-index:3; }
.beam-bar-group { position:absolute; left:50%; top:54px; width:220px; height:9px; margin-left:-110px; margin-top:-4.5px; transform-origin:50% 50%; transition:transform var(--settle); z-index:2; }
.beam-bar { width:100%; height:9px; border-radius:6px; background:linear-gradient(90deg,var(--arm1),var(--arm2),var(--arm1)); }
.beam-pan { position:absolute; top:4px; display:flex; flex-direction:column; align-items:center; transform-origin:50% 0; transition:transform var(--settle); }
.beam-pan.left { left:-39px; } .beam-pan.right { left:181px; }
.beam-hanger { width:2px; height:50px; background:var(--hanger); }
.beam-pan-box { width:78px; height:46px; background:var(--inset); border:1px solid var(--line3); border-radius:9px; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.beam-pan-box .lb { font-size:8.5px; letter-spacing:.05em; color:var(--t3); text-transform:uppercase; }
.beam-pan-box .v { font-size:16px; font-weight:600; font-family:var(--font-mono); }

.total-value { display:flex; align-items:baseline; gap:7px; margin-top:5px; }
.total-aed { font-size:15px; color:var(--goldtx); font-family:var(--font-mono); font-weight:500; }
.total-fig { font-size:40px; font-weight:600; color:var(--goldtx); font-family:var(--font-mono); letter-spacing:-0.01em; }
.total-delta { font-size:13.5px; font-family:var(--font-mono); margin-top:3px; }
.total-delta.gain { color:var(--gain); } .total-delta.loss { color:var(--loss); }
.hr { height:1px; background:var(--line); margin:16px 0; }
.drift-readout { font-size:22px; font-weight:600; font-family:var(--font-mono); color:var(--ink); }
.drift-chip { display:inline-flex; align-items:center; gap:7px; padding:5px 11px; border-radius:999px; font-size:11.5px; font-weight:500; margin-top:7px; }
.drift-chip .d { width:6px; height:6px; border-radius:50%; background:currentColor; }
.beam-foot { font-size:12px; color:var(--t4); margin-top:14px; line-height:1.45; }

/* ---------------- ALLOCATION ---------------- */
.alloc-bar { display:flex; height:10px; border-radius:6px; gap:2px; background:var(--track); overflow:hidden; margin:12px 0 14px; }
.alloc-seg { height:100%; }
.alloc-legend { display:flex; flex-wrap:wrap; gap:10px 22px; }
.alloc-item { display:flex; align-items:center; gap:7px; }
.alloc-dot { width:9px; height:9px; border-radius:2px; }
.alloc-name { font-size:12.5px; color:var(--t2); }
.alloc-pct { font-size:12.5px; font-family:var(--font-mono); color:var(--ink); }

/* ---------------- TABLES ---------------- */
.dt { width:100%; }
.dt-head { display:flex; align-items:center; padding:10px 0 8px; font-size:10px; letter-spacing:.1em; color:var(--t4); text-transform:uppercase; }
.dt-row { display:flex; align-items:center; padding:11px 0; border-bottom:1px solid var(--line2); width:100%; background:none; border-left:0; border-right:0; border-top:0; color:inherit; text-align:left; cursor:pointer; }
.dt-row:last-child { border-bottom:0; }
.dt-name { flex:1; display:flex; align-items:center; gap:11px; min-width:0; }
.dt-tag { width:34px; height:34px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-family:var(--font-mono); font-weight:700; font-size:11px; flex:none; }
.dt-sym { font-size:14.5px; font-weight:600; font-family:var(--font-display); }
.dt-subname { font-size:11.5px; color:var(--t3); }
.dt-c { font-family:var(--font-mono); font-size:13.5px; text-align:end; }
.c-last { flex:0 0 120px; color:var(--t1); }
.c-today { flex:0 0 100px; }
.c-value { flex:0 0 140px; color:var(--ink); font-weight:500; }
.c-src { flex:0 0 96px; text-align:end; }
.up { color:var(--gain); } .down { color:var(--loss); }
.src-badge { font-size:10.5px; font-family:var(--font-mono); padding:3px 9px; border-radius:999px; }
.src-premium { color:var(--goldtx); background:rgba(198,161,91,.12); }
.src-open { color:var(--merctx); background:var(--mercsoft); }

/* mini sparkline */
.spark { display:inline-flex; align-items:flex-end; gap:2px; height:26px; }
.spark-bar { width:3px; border-radius:1px; }

/* ---------------- MAJLIS RAIL ---------------- */
.majlis-rail { flex:0 0 376px; height:100vh; overflow-y:auto; padding:22px 20px 50px; border-inline-start:1px solid var(--line); background:var(--rail2); }
.rail-label { font-size:11px; letter-spacing:.14em; color:var(--t3); text-transform:uppercase; font-weight:600; margin:18px 0 11px; }
.rail-label:first-child { margin-top:0; }
.council-strip { display:flex; align-items:center; gap:8px; }
.council-av { position:relative; width:34px; height:34px; border-radius:50%; background:var(--ringbg); display:flex; align-items:center; justify-content:center; font-family:var(--font-display); font-weight:700; font-size:11.5px; }
.council-av .status { position:absolute; right:-1px; bottom:-1px; width:9px; height:9px; border-radius:50%; box-shadow:0 0 0 2px var(--rail2); }
.council-count { font-size:12px; color:var(--t3); margin-inline-start:4px; }
.awaiting-row { display:flex; align-items:center; gap:9px; margin:16px 0 10px; }
.awaiting-row .t { font-size:13px; font-weight:600; font-family:var(--font-display); color:var(--t1); }
.pending-pill { font-size:11px; font-family:var(--font-mono); color:var(--caution); background:rgba(224,163,62,.12); padding:3px 9px; border-radius:999px; }

.prop-card { background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:15px; margin-bottom:11px; transition:opacity .35s, transform .35s; }
.prop-head { display:flex; align-items:center; gap:9px; margin-bottom:9px; }
.prop-av { width:32px; height:32px; border-radius:50%; background:var(--ringbg); display:flex; align-items:center; justify-content:center; font-family:var(--font-display); font-weight:700; font-size:11px; flex:none; }
.prop-id { flex:1; min-width:0; }
.prop-name { font-size:14px; font-weight:600; font-family:var(--font-display); }
.prop-role { font-size:11px; color:var(--t3); }
.prop-time { font-size:11px; font-family:var(--font-mono); color:var(--t5); }
.prop-status { display:inline-flex; align-items:center; gap:6px; font-size:11px; color:var(--caution); background:rgba(224,163,62,.12); padding:3px 9px; border-radius:999px; margin-bottom:9px; }
.prop-status .d { width:5px; height:5px; border-radius:50%; background:currentColor; }
.prop-action { font-size:15px; font-weight:600; font-family:var(--font-display); line-height:1.3; }
.prop-why { font-size:12.5px; color:var(--t2); margin-top:5px; line-height:1.45; }
.prop-controls { display:flex; gap:8px; margin-top:13px; }
.prop-controls form { display:flex; flex:1; margin:0; }
.prop-controls .hold-form { flex:0 0 88px; }
.btn-approve { flex:1; width:100%; background:var(--merc); color:var(--bg); border:0; border-radius:9px; padding:9px 0; font-size:13px; font-weight:600; font-family:var(--font-body); cursor:pointer; }
.btn-hold { flex:1; width:100%; background:none; color:var(--t2); border:1px solid var(--line3); border-radius:9px; padding:9px 0; font-size:13px; font-weight:500; font-family:var(--font-body); cursor:pointer; }
.prop-empty { border:1px dashed var(--line3); border-radius:12px; padding:22px 14px; text-align:center; font-size:13px; color:var(--t3); line-height:1.6; }

.mandate-row { display:flex; justify-content:space-between; font-size:12px; color:var(--t2); }
.mandate-bar { height:6px; border-radius:999px; background:var(--inset); overflow:hidden; margin:8px 0 14px; }
.mandate-fill { height:100%; background:var(--merc); border-radius:999px; }
.cleared-item { display:flex; gap:9px; align-items:flex-start; margin-bottom:11px; }
.cleared-check { color:var(--merc); font-size:13px; }
.cleared-text { flex:1; font-size:12.5px; color:var(--t1); }
.cleared-sub { font-size:11px; color:var(--merctx); }
.cleared-time { font-size:11px; font-family:var(--font-mono); color:var(--t5); }

.feed-item { display:flex; gap:9px; align-items:center; margin-bottom:10px; }
.feed-time { flex:0 0 42px; font-size:11px; font-family:var(--font-mono); color:var(--t5); }
.feed-dot { width:7px; height:7px; border-radius:50%; flex:none; }
.feed-text { font-size:12.5px; color:var(--t2); }

/* stand-down banner */
.halt-banner { display:flex; align-items:center; gap:9px; background:var(--haltbg); border:1px solid var(--haltbd); border-radius:10px; padding:11px 13px; margin-bottom:14px; }
.halt-banner .d { width:8px; height:8px; border-radius:50%; background:var(--halt); }
.halt-banner .t { font-size:12.5px; color:var(--halttx); }

/* ---------------- SECONDARY SCREEN BITS ---------------- */
.pills { display:flex; flex-wrap:wrap; gap:7px; margin-bottom:16px; }
.pill { font-size:12.5px; color:var(--t2); background:none; border:0; box-shadow:inset 0 0 0 1px var(--line3); padding:7px 14px; border-radius:999px; cursor:pointer; }
.pill.is-active { color:var(--bg); background:var(--merc); box-shadow:none; }
.grid-cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:14px; }
.stat-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:14px; margin-bottom:18px; }
.stat-card { background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:16px 18px; }
.stat-label { font-size:11px; letter-spacing:.1em; color:var(--t3); text-transform:uppercase; }
.stat-value { font-size:24px; font-weight:600; font-family:var(--font-mono); margin-top:6px; }
.chip { font-size:9.5px; font-weight:600; padding:3px 9px; border-radius:999px; }
.chip-delegated { color:var(--goldtx); background:rgba(198,161,91,.12); }
.chip-managed { color:var(--caution); background:rgba(224,163,62,.12); }
.chip-advise { color:var(--merctx); background:var(--mercsoft); }
.chip-observe { color:var(--slatetx); box-shadow:inset 0 0 0 1px var(--line3); }
.chip-stood { color:var(--halt); background:var(--haltbg); }
.audit-row { display:flex; gap:12px; align-items:center; padding:9px 0; border-bottom:1px solid var(--line2); font-size:12.5px; }
.audit-time { flex:0 0 64px; font-family:var(--font-mono); color:var(--t5); font-size:11.5px; }
.audit-id { flex:0 0 64px; font-family:var(--font-mono); color:var(--t4); font-size:11.5px; }
.audit-text { flex:1; color:var(--t2); }
.audit-tag { font-size:10px; font-family:var(--font-mono); padding:2px 8px; border-radius:999px; }

.placeholder { display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; min-height:60vh; gap:10px; color:var(--t3); }
.placeholder .ic { font-size:34px; color:var(--t4); }
.placeholder h2 { font-family:var(--font-display); font-weight:700; font-size:22px; color:var(--ink); margin:0; }
.placeholder p { max-width:420px; font-size:13.5px; line-height:1.6; margin:0; }
.placeholder code { font-family:var(--font-mono); color:var(--merctx); background:var(--track); padding:2px 7px; border-radius:6px; }

/* ---------------- TOAST ---------------- */
.toast-host { position:fixed; bottom:26px; left:50%; transform:translateX(-50%); z-index:50; display:flex; flex-direction:column; gap:8px; align-items:center; }
.toast { display:flex; align-items:center; gap:9px; background:var(--inset); border:1px solid var(--line3); border-radius:11px; padding:11px 16px; box-shadow:0 12px 40px rgba(0,0,0,.5); font-size:13px; color:var(--ink); animation:toastin .3s cubic-bezier(.16,.7,.27,1); }
.toast .d { width:7px; height:7px; border-radius:50%; background:var(--merc); }
.toast.is-out { animation:toastout .3s ease forwards; }
@keyframes toastin { from{opacity:0;transform:translateY(12px)} to{opacity:1;transform:translateY(0)} }
@keyframes toastout { to{opacity:0;transform:translateY(8px)} }

/* ---------------- RESPONSIVE ---------------- */
@media (max-width:1180px) { .majlis-rail { display:none; } }
@media (max-width:760px) {
  .nav-item .lb { display:none; }
  .nav-rail { flex-basis:60px; }
  .nav-item { width:44px; }
  .workspace { padding:20px 16px 50px; }
  .page-h1 { font-size:24px; }
}
@media (prefers-reduced-motion:reduce) {
  *, *::before, *::after { transition-duration:.001ms !important; animation-duration:.001ms !important; }
}

.toast--halt .d { background:var(--halt); }
.toast--halt { border-color:var(--haltbd); }
