/* ============================================================
   TIDAL ENGINE — application styles
   Inherits the TIDAL Time shell. Tokens from TIDAL UI Kit v1.0.
   ============================================================ */

@font-face {
  font-family: "Monument Extended";
  src: url("fonts/PPMonumentExtended-Regular.otf") format("opentype");
  font-weight: 400 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Monument Extended";
  src: url("fonts/PPMonumentExtended-Black.otf") format("opentype");
  font-weight: 700 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "PP Neue Montreal";
  src: url("fonts/PPNeueMontreal-Book.otf") format("opentype");
  font-weight: 400 500; font-style: normal; font-display: swap;
}

:root {
  --black: #000000;
  --orange: #FF4000;
  --amber: #FFB020;
  --green: #95C11F;
  --teal: #50BCBD;
  --white: #FFFFFF;

  --bg: #060606;
  --surf-1: #0d0d0d;
  --surf-2: #141414;
  --surf-3: #191919;
  --surf-4: #222222;

  --line: #1c1c1c;
  --line-2: #2a2a2a;
  --line-3: #3a3a3a;

  --fg: #FFFFFF;
  --fg-2: #d6d6d6;
  --fg-3: #A0A0A0;
  --fg-4: #777777;
  --fg-5: #555555;

  --font-display: "Monument Extended", "Arial Black", Impact, sans-serif;
  --font-body: "PP Neue Montreal", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --r-sm: 4px; --r-md: 6px; --r-lg: 8px; --r-pill: 999px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --fast: 140ms; --med: 240ms;

  --sidebar-w: 240px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font-family: inherit; cursor: pointer; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #1f1f1f; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #2a2a2a; }

/* ===== App layout ============================================ */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

/* ===== Sidebar =============================================== */
.side {
  background: var(--black);
  border-right: 1px solid var(--line);
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.side-scroll { flex: 1; overflow-y: auto; padding: 0 16px 12px; }
.side-scroll::-webkit-scrollbar { width: 6px; }

.brand { padding: 26px 20px 22px; display: flex; flex-direction: column; }
.brand-lock { width: fit-content; }
.brand-lock img { display: block; height: 23px; width: auto; }
.brand-sub {
  display: block; text-align: right; margin-top: 1px;
  font-family: var(--font-body); font-weight: 500; font-size: 14px;
  color: var(--orange); letter-spacing: 0.02em; line-height: 1;
}

.nav-sec {
  font-family: var(--font-display); font-weight: 700;
  font-size: 10px; letter-spacing: 0.16em; color: var(--fg-4);
  text-transform: uppercase; padding: 18px 12px 9px;
}
.nav-sec:first-child { padding-top: 4px; }

.nav-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  padding: 10px 12px; margin-bottom: 2px;
  border: 1px solid transparent; border-radius: var(--r-lg);
  background: transparent; color: var(--fg);
  font-family: var(--font-display); font-weight: 700;
  font-size: 12.5px; letter-spacing: 0.07em; text-transform: uppercase;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.nav-item svg { width: 17px; height: 17px; flex: none; stroke-width: 1.6; }
.nav-item:hover:not(.is-active):not(.is-soon) { background: #111; }
.nav-item.is-active {
  border-color: var(--orange);
  color: var(--orange);
  background: rgba(255,64,0,0.06);
}
.nav-item.is-active .nav-dot {
  margin-left: auto; width: 6px; height: 6px; border-radius: 50%;
  background: var(--orange);
}
.nav-item.is-soon { color: var(--fg-5); cursor: default; }
.nav-item.is-soon svg { opacity: 0.6; }
.nav-soon {
  margin-left: auto; font-size: 9px; letter-spacing: 0.14em;
  color: var(--fg-5); border: 1px solid #2a2a2a; border-radius: var(--r-sm);
  padding: 2px 5px;
}
.nav-label { white-space: nowrap; }

/* user card */
.user-card {
  margin: 0 16px 16px; padding: 14px;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surf-1);
}
.user-row { display: flex; align-items: center; gap: 11px; }
.avatar {
  position: relative; width: 38px; height: 38px; border-radius: 50%;
  background: var(--orange); color: #000;
  display: grid; place-items: center; flex: none;
  font-family: var(--font-display); font-weight: 700; font-size: 13px; letter-spacing: 0.02em;
}
.avatar .online {
  position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px;
  border-radius: 50%; background: var(--green); border: 2.5px solid var(--surf-1);
}
.user-meta { min-width: 0; }
.user-name { font-family: var(--font-body); font-weight: 500; font-size: 14px; color: var(--fg); line-height: 1.2; }
.user-role { font-family: var(--font-display); font-weight: 700; font-size: 9.5px; letter-spacing: 0.14em; color: var(--orange); margin-top: 3px; }
.signout {
  display: flex; align-items: center; justify-content: center; gap: 9px; white-space: nowrap;
  width: 100%; margin-top: 12px; padding: 9px;
  border: 1px solid var(--line-2); border-radius: var(--r-md); background: transparent;
  color: var(--fg-2); font-family: var(--font-display); font-weight: 700;
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  transition: border-color var(--fast), color var(--fast);
}
.signout svg { width: 15px; height: 15px; stroke-width: 1.7; }
.signout:hover { border-color: var(--line-3); color: var(--fg); }

/* ===== Main ================================================== */
.main { min-width: 0; display: flex; flex-direction: column; }
.content { padding: 46px 56px 80px; max-width: 1360px; width: 100%; }

/* page header */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 40px; margin-bottom: 34px; }
.page-head-l { min-width: 0; }
.eyebrow {
  font-family: var(--font-body); font-weight: 500; font-size: 12px;
  letter-spacing: 0.18em; color: var(--orange); text-transform: uppercase; margin: 0 0 14px;
}
.page-title {
  font-family: var(--font-display); font-weight: 900; text-transform: uppercase;
  font-size: 54px; line-height: 0.95; letter-spacing: -0.01em; margin: 0; color: var(--fg); white-space: nowrap;
}
.page-title .dot { color: var(--orange); }
.page-desc { font-family: var(--font-body); font-size: 15px; color: var(--fg-3); margin: 14px 0 0; max-width: 60ch; }
.page-head-r { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; padding-top: 30px; }

/* ===== Segmented control ===================================== */
.seg { display: inline-flex; gap: 3px; padding: 4px; background: var(--surf-2); border: 1px solid var(--line); border-radius: var(--r-lg); }
.seg-btn {
  border: 0; background: transparent; color: var(--fg-3);
  padding: 8px 16px; border-radius: var(--r-md);
  font-family: var(--font-body); font-weight: 500; font-size: 13.5px; white-space: nowrap;
  transition: background var(--fast), color var(--fast);
}
.seg-btn:hover { color: var(--fg); }
.seg-btn.is-active { background: var(--orange); color: #000; font-weight: 500; }
.seg-btn.amber.is-active { background: var(--amber); color: #000; }
.seg-btn .count { opacity: 0.7; margin-left: 6px; font-variant-numeric: tabular-nums; }

/* ===== Pills / tags ========================================== */
.pill {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-family: var(--font-display); font-weight: 700; font-size: 9.5px;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 4px 8px; border-radius: var(--r-sm); border: 1px solid var(--line-2); color: var(--fg-3);
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.orange { border-color: var(--orange); color: var(--orange); }
.pill.amber { border-color: var(--amber); color: var(--amber); }
.pill.green { border-color: var(--green); color: var(--green); }
.pill.teal { border-color: var(--teal); color: var(--teal); }
.pill.solid-orange { background: var(--orange); border-color: var(--orange); color: #000; }
.pill.muted { color: var(--fg-4); border-color: var(--line-2); }

/* ===== Buttons =============================================== */
.btn {
  display: inline-flex; align-items: center; gap: 9px; white-space: nowrap;
  border: 1px solid var(--line-2); background: transparent; color: var(--fg);
  padding: 10px 16px; border-radius: var(--r-md);
  font-family: var(--font-display); font-weight: 700; font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase;
  transition: all var(--fast) var(--ease);
}
.btn svg { width: 15px; height: 15px; stroke-width: 1.7; }
.btn:hover { border-color: var(--line-3); }
.btn:active { transform: scale(0.985); }
.btn.primary { background: var(--orange); border-color: var(--orange); color: #000; }
.btn.primary:hover { background: #ff552080; background: #ff5a24; }
.btn.ghost-danger:hover { border-color: var(--orange); color: var(--orange); }
.btn.sm { padding: 8px 12px; font-size: 10px; }

/* ===== Cards / panels ======================================== */
.panel { background: var(--surf-1); border: 1px solid var(--line); border-radius: var(--r-lg); }

/* ===== Empty state =========================================== */
.empty {
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surf-1);
  min-height: 320px; display: grid; place-items: center; text-align: center; padding: 60px 24px;
}
.empty-icon {
  width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--line-3);
  display: grid; place-items: center; margin: 0 auto 22px; color: var(--fg-3);
}
.empty-icon svg { width: 22px; height: 22px; stroke-width: 1.6; }
.empty h3 {
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
  letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 10px;
}
.empty p { font-family: var(--font-body); font-size: 14px; color: var(--fg-3); margin: 0; max-width: 42ch; }

/* ===== QUEUE ================================================= */
.queue-meta { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; font-family: var(--font-body); font-size: 13px; color: var(--fg-3); }
.queue-meta b { color: var(--fg); font-weight: 500; }
.queue-cap { display: flex; align-items: center; gap: 9px; }
.cap-track { width: 120px; height: 6px; border-radius: 3px; background: var(--surf-3); overflow: hidden; }
.cap-fill { height: 100%; background: var(--orange); border-radius: 3px; }

.qrow {
  display: grid; grid-template-columns: 46px 1fr auto; gap: 22px; align-items: center;
  padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surf-1); margin-bottom: 10px; text-align: left; width: 100%;
  transition: border-color var(--fast), background var(--fast), transform var(--fast);
}
.qrow:hover { border-color: var(--line-3); background: #101010; }
.qrow:active { transform: scale(0.997); }
.qrank { font-family: var(--font-display); font-weight: 900; font-size: 30px; color: var(--fg-5); line-height: 1; text-align: center; font-variant-numeric: tabular-nums; }
.qrow.top .qrank { color: var(--orange); }
.qbody { min-width: 0; }
.qhead { display: flex; align-items: center; gap: 12px; margin-bottom: 9px; flex-wrap: wrap; }
.qname { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: 0.01em; color: var(--fg); white-space: nowrap; }
.qsub { font-family: var(--font-body); font-size: 12.5px; color: var(--fg-4); }
.qlines { display: flex; flex-direction: column; gap: 7px; }
.qline { display: flex; gap: 10px; font-family: var(--font-body); font-size: 13.5px; line-height: 1.45; }
.qline .qtag { flex: none; width: 64px; font-family: var(--font-display); font-weight: 700; font-size: 9px; letter-spacing: 0.12em; color: var(--fg-4); padding-top: 3px; }
.qline .qtext { color: var(--fg-2); }
.qline .qtext b { color: var(--fg); font-weight: 500; }
.qline.trigger .qtag { color: var(--orange); }
.qright { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.qscore { text-align: right; }
.qscore .num { font-family: var(--font-display); font-weight: 900; font-size: 26px; color: var(--fg); line-height: 1; }
.qscore .lbl { font-family: var(--font-display); font-weight: 700; font-size: 8.5px; letter-spacing: 0.14em; color: var(--fg-4); text-transform: uppercase; margin-top: 5px; }
.qchev { color: var(--fg-5); }

/* ===== SIGNALS feed ========================================= */
.feed { display: flex; flex-direction: column; }
.feed-day { font-family: var(--font-display); font-weight: 700; font-size: 10px; letter-spacing: 0.14em; color: var(--fg-4); text-transform: uppercase; padding: 22px 0 12px; }
.feed-day:first-child { padding-top: 0; }
.signal {
  display: grid; grid-template-columns: 64px 28px 1fr auto; gap: 16px; align-items: start;
  padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surf-1); margin-bottom: 8px; text-align: left; width: 100%;
  transition: border-color var(--fast), background var(--fast);
}
.signal:hover { border-color: var(--line-3); background: #101010; }
.signal-time { font-family: var(--font-body); font-size: 12px; color: var(--fg-4); padding-top: 2px; font-variant-numeric: tabular-nums; }
.signal-ico { width: 28px; height: 28px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--surf-3); color: var(--fg-2); }
.signal-ico svg { width: 15px; height: 15px; stroke-width: 1.7; }
.signal-ico.hot { background: rgba(255,64,0,0.12); color: var(--orange); }
.signal-body b { font-family: var(--font-body); font-weight: 500; font-size: 14px; color: var(--fg); }
.signal-body .acct { color: var(--orange); }
.signal-body p { margin: 4px 0 0; font-size: 13px; color: var(--fg-3); }
.signal-type { font-family: var(--font-display); font-weight: 700; font-size: 9px; letter-spacing: 0.12em; color: var(--fg-4); text-transform: uppercase; white-space: nowrap; padding-top: 4px; }

/* ===== APPROVALS ============================================ */
.appr-layout { display: grid; grid-template-columns: 340px 1fr; gap: 14px; align-items: start; }
.appr-list { display: flex; flex-direction: column; gap: 8px; }
.appr-card {
  text-align: left; width: 100%; padding: 16px; border: 1px solid var(--line);
  border-radius: var(--r-lg); background: var(--surf-1);
  transition: border-color var(--fast), background var(--fast);
}
.appr-card:hover { border-color: var(--line-3); }
.appr-card.is-active { border-color: var(--orange); background: rgba(255,64,0,0.05); }
.appr-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.appr-card-name { font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: 0.01em; }
.appr-card-sub { font-family: var(--font-body); font-size: 12px; color: var(--fg-4); margin-bottom: 8px; }
.appr-card-snip { font-family: var(--font-body); font-size: 13px; color: var(--fg-3); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.appr-card-meta { display: flex; align-items: center; gap: 8px; margin-top: 11px; }

.appr-detail { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surf-1); overflow: hidden; }
.appr-det-head { padding: 22px 26px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.appr-det-name { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: 0.01em; margin: 0 0 6px; }
.appr-det-sub { font-family: var(--font-body); font-size: 13px; color: var(--fg-3); }
.appr-det-sub .acct { color: var(--orange); }
.appr-meta-grid { display: flex; gap: 26px; padding: 16px 26px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.appr-meta-item .k { font-family: var(--font-display); font-weight: 700; font-size: 9px; letter-spacing: 0.12em; color: var(--fg-4); text-transform: uppercase; margin-bottom: 5px; }
.appr-meta-item .v { font-family: var(--font-body); font-size: 13.5px; color: var(--fg); }

.email-wrap { padding: 22px 26px; }
.email-field { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-family: var(--font-body); font-size: 13.5px; }
.email-field .ef-k { width: 64px; color: var(--fg-4); flex: none; }
.email-field .ef-v { color: var(--fg-2); }
.email-subject { font-family: var(--font-body); font-weight: 500; font-size: 17px; color: var(--fg); margin: 18px 0 14px; }
.email-body {
  width: 100%; min-height: 240px; background: transparent; border: 1px solid transparent;
  border-radius: var(--r-md); color: var(--fg-2); font-family: var(--font-body); font-size: 14.5px;
  line-height: 1.6; padding: 10px; resize: vertical; transition: border-color var(--fast), background var(--fast);
}
.email-body:hover { border-color: var(--line); }
.email-body:focus { outline: none; border-color: var(--line-3); background: #0a0a0a; }
.edit-hint { font-family: var(--font-body); font-size: 11.5px; color: var(--fg-5); margin: 8px 0 0; display: flex; align-items: center; gap: 7px; }
.edit-hint svg { width: 13px; height: 13px; stroke-width: 1.7; }

.sources { padding: 4px 26px 24px; }
.sources-h { font-family: var(--font-display); font-weight: 700; font-size: 10px; letter-spacing: 0.14em; color: var(--fg-4); text-transform: uppercase; margin: 18px 0 12px; display: flex; align-items: center; gap: 8px; }
.source {
  display: grid; grid-template-columns: 24px 1fr auto; gap: 12px; align-items: center;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surf-2); margin-bottom: 8px;
}
.source-num { font-family: var(--font-display); font-weight: 900; font-size: 12px; color: var(--orange); text-align: center; }
.source-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.source-body .st { font-family: var(--font-body); font-weight: 500; font-size: 13px; color: var(--fg); }
.source-body .sd { font-family: var(--font-body); font-size: 12px; color: var(--fg-4); }
.source-link { color: var(--fg-4); display: grid; place-items: center; }
.source-link svg { width: 15px; height: 15px; stroke-width: 1.7; }
.source-link:hover { color: var(--orange); }

.appr-actions { display: flex; gap: 10px; padding: 18px 26px; border-top: 1px solid var(--line); background: var(--surf-2); }
.appr-actions .spacer { flex: 1; }

.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--surf-4); border: 1px solid var(--line-3); border-radius: var(--r-md);
  padding: 13px 20px; font-family: var(--font-body); font-size: 13.5px; color: var(--fg);
  display: flex; align-items: center; gap: 10px; opacity: 0; pointer-events: none;
  transition: opacity var(--med) var(--ease), transform var(--med) var(--ease); z-index: 90;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast svg { width: 17px; height: 17px; stroke-width: 2; color: var(--green); }

/* ===== ICPS ================================================= */
.icp-summary { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; margin-bottom: 14px; }
.cap-card { padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surf-1); }
.cap-card h4 { font-family: var(--font-display); font-weight: 700; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-3); margin: 0 0 4px; }
.cap-card .cap-note { font-family: var(--font-body); font-size: 12.5px; color: var(--fg-4); margin: 0 0 18px; }
.cap-bar { display: flex; height: 36px; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); }
.cap-seg { display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 11px; color: #000; transition: flex-basis var(--med) var(--ease); overflow: hidden; white-space: nowrap; }
.cap-legend { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.cap-leg-row { display: flex; align-items: center; gap: 10px; font-family: var(--font-body); font-size: 13px; }
.cap-leg-row .sw { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.cap-leg-row .nm { color: var(--fg-2); flex: 1; }
.cap-leg-row .pc { font-family: var(--font-display); font-weight: 700; color: var(--fg); font-variant-numeric: tabular-nums; }
.cap-leg-row .ct { color: var(--fg-4); font-size: 12px; width: 64px; text-align: right; }

.daily-card { padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surf-1); display: flex; flex-direction: column; }
.daily-stat { display: flex; align-items: baseline; gap: 10px; }
.daily-stat .num { font-family: var(--font-display); font-weight: 900; font-size: 46px; color: var(--orange); line-height: 1; }
.daily-stat .unit { font-family: var(--font-body); font-size: 13px; color: var(--fg-3); }

.icp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.icp-card { padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surf-1); }
.icp-card.dimmed { opacity: 0.55; }
.icp-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.icp-name { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: 0.01em; margin: 0 0 6px; }
.icp-desc { font-family: var(--font-body); font-size: 13px; color: var(--fg-3); margin: 0; line-height: 1.45; }
.icp-attrs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 20px; }
.attr { font-family: var(--font-body); font-size: 12px; color: var(--fg-2); background: var(--surf-3); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 4px 9px; }
.icp-weight-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.icp-weight-row .wl { font-family: var(--font-display); font-weight: 700; font-size: 9.5px; letter-spacing: 0.12em; color: var(--fg-4); text-transform: uppercase; }
.icp-weight-row .wv { font-family: var(--font-display); font-weight: 900; font-size: 18px; color: var(--orange); font-variant-numeric: tabular-nums; }
.icp-card.dimmed .wv { color: var(--fg-3); }
.slider {
  -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 3px;
  background: var(--surf-3); outline: none; cursor: pointer;
}
.slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--orange); border: 3px solid #000; box-shadow: 0 0 0 1px var(--orange); }
.slider::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--orange); border: 3px solid #000; }
.icp-foot { display: flex; align-items: center; gap: 16px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); font-family: var(--font-body); font-size: 12px; color: var(--fg-4); }
.icp-foot b { color: var(--fg-2); font-weight: 500; }

/* ===== ACCOUNTS ============================================= */
.acct-table { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surf-1); }
.acct-th, .acct-tr { display: grid; grid-template-columns: 2.2fr 1.3fr 1fr 1fr 0.9fr 30px; gap: 18px; align-items: center; padding: 15px 22px; }
.acct-th { border-bottom: 1px solid var(--line); }
.acct-th span { font-family: var(--font-display); font-weight: 700; font-size: 9.5px; letter-spacing: 0.12em; color: var(--fg-4); text-transform: uppercase; }
.acct-tr { border-bottom: 1px solid var(--line); width: 100%; text-align: left; background: transparent; border-left: 0; border-right: 0; border-top: 0; transition: background var(--fast); }
.acct-tr:last-child { border-bottom: 0; }
.acct-tr:hover { background: #101010; }
.acct-c-name { font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.acct-c-name .sub { display: block; font-family: var(--font-body); font-weight: 400; font-size: 12px; color: var(--fg-4); margin-top: 3px; letter-spacing: 0; text-transform: none; }
.acct-c { font-family: var(--font-body); font-size: 13.5px; color: var(--fg-2); }
.acct-c.muted { color: var(--fg-4); }
.stage { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-body); font-size: 13px; color: var(--fg-2); }
.stage .sd { width: 8px; height: 8px; border-radius: 50%; flex: none; }

/* account detail */
.back-link { display: inline-flex; align-items: center; gap: 8px; background: transparent; border: 0; color: var(--fg-4); font-family: var(--font-display); font-weight: 700; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 18px; padding: 0; }
.back-link svg { width: 14px; height: 14px; stroke-width: 2; }
.back-link:hover { color: var(--fg); }
.detail-grid { display: grid; grid-template-columns: 1fr 360px; gap: 16px; align-items: start; }
.diag-card { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surf-1); padding: 26px 28px; }
.diag-h { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--orange); margin-bottom: 16px; }
.diag-body { font-family: var(--font-body); font-size: 16px; line-height: 1.65; color: var(--fg-2); }
.diag-body b { color: var(--fg); font-weight: 500; }
.diag-body p { margin: 0 0 14px; }
.diag-body p:last-child { margin-bottom: 0; }
.diag-pull { border-left: 2px solid var(--orange); padding: 4px 0 4px 18px; margin: 18px 0; font-size: 17px; line-height: 1.5; color: var(--fg); }

.det-side-card { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surf-1); padding: 20px 22px; margin-bottom: 14px; }
.det-side-card h4 { font-family: var(--font-display); font-weight: 700; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-4); margin: 0 0 14px; }
.kv { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); font-family: var(--font-body); font-size: 13.5px; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--fg-4); }
.kv .v { color: var(--fg); text-align: right; }

/* timeline */
.timeline-card { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surf-1); padding: 26px 28px; margin-top: 16px; }
.tl-h { font-family: var(--font-display); font-weight: 700; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-4); margin: 0 0 22px; }
.tl { position: relative; padding-left: 30px; }
.tl::before { content: ""; position: absolute; left: 9px; top: 4px; bottom: 4px; width: 1px; background: var(--line-2); }
.tl-item { position: relative; padding-bottom: 24px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot { position: absolute; left: -30px; top: 2px; width: 19px; height: 19px; border-radius: 50%; background: var(--surf-3); border: 1px solid var(--line-3); display: grid; place-items: center; color: var(--fg-3); }
.tl-dot svg { width: 11px; height: 11px; stroke-width: 2; }
.tl-dot.hot { background: rgba(255,64,0,0.14); border-color: var(--orange); color: var(--orange); }
.tl-dot.pos { background: rgba(149,193,31,0.14); border-color: var(--green); color: var(--green); }
.tl-time { font-family: var(--font-body); font-size: 11.5px; color: var(--fg-5); margin-bottom: 4px; }
.tl-title { font-family: var(--font-body); font-weight: 500; font-size: 14.5px; color: var(--fg); }
.tl-desc { font-family: var(--font-body); font-size: 13px; color: var(--fg-3); margin-top: 4px; line-height: 1.5; }

/* ===== SEQUENCES ============================================ */
.seq-stages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.seq-col { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surf-1); padding: 18px; display: flex; flex-direction: column; }
.seq-col-h { margin-bottom: 4px; }
.seq-stage-name { font-family: var(--font-display); font-weight: 900; font-size: 18px; letter-spacing: 0.01em; }
.seq-stage-num { font-family: var(--font-display); font-weight: 700; font-size: 9px; letter-spacing: 0.14em; color: var(--orange); margin-bottom: 6px; }
.seq-stage-goal { font-family: var(--font-body); font-size: 12.5px; color: var(--fg-4); margin: 0 0 16px; line-height: 1.45; min-height: 36px; }
.touch { padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surf-2); margin-bottom: 9px; }
.touch-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.touch-ch { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-display); font-weight: 700; font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-3); }
.touch-ch svg { width: 13px; height: 13px; stroke-width: 1.8; }
.touch-day { font-family: var(--font-body); font-size: 11px; color: var(--fg-5); }
.touch-body { font-family: var(--font-body); font-size: 13px; color: var(--fg-2); line-height: 1.4; }
.touch-add { margin-top: auto; border: 1px dashed var(--line-2); border-radius: var(--r-md); background: transparent; color: var(--fg-4); padding: 11px; font-family: var(--font-display); font-weight: 700; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; transition: border-color var(--fast), color var(--fast); }
.touch-add:hover { border-color: var(--line-3); color: var(--fg-2); }

/* ===== DASHBOARD / charts =================================== */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-bottom: 14px; }
.kpi { background: var(--surf-1); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; position: relative; overflow: hidden; }
.kpi .lbl { font-family: var(--font-display); font-weight: 700; font-size: 9.5px; letter-spacing: 0.12em; color: var(--fg-4); text-transform: uppercase; }
.kpi .val { font-family: var(--font-display); font-weight: 900; font-size: 34px; letter-spacing: -0.01em; color: var(--fg); line-height: 1; margin-top: 14px; }
.kpi .val.orange { color: var(--orange); }
.kpi .delta { font-family: var(--font-body); font-size: 12px; margin-top: 9px; display: flex; gap: 6px; align-items: center; }
.kpi .delta.up { color: var(--green); }
.kpi .delta.dn { color: var(--orange); }
.kpi .spark { position: absolute; right: 14px; top: 18px; width: 78px; height: 28px; opacity: 0.9; }
.dash-grid { display: grid; grid-template-columns: 1.9fr 1fr; gap: 13px; }
.chart-card { background: var(--surf-1); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.chart-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.chart-head h3 { font-family: var(--font-display); font-weight: 900; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; margin: 0; }
.chart-head .sub { font-family: var(--font-body); font-size: 12px; color: var(--fg-4); margin-top: 3px; }
.chart-body { padding: 20px; }
.chart { width: 100%; height: 230px; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--fg-4); font-family: "PP Neue Montreal", sans-serif; font-size: 10px; }
.funnel-row { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.funnel-row:last-child { border-bottom: 0; }
.funnel-row .fn { font-family: var(--font-body); font-size: 13px; color: var(--fg-2); width: 120px; flex: none; }
.funnel-bar-track { flex: 1; height: 22px; background: var(--surf-3); border-radius: var(--r-sm); overflow: hidden; }
.funnel-bar { height: 100%; background: var(--orange); border-radius: var(--r-sm); display: flex; align-items: center; padding-left: 9px; }
.funnel-bar span { font-family: var(--font-display); font-weight: 700; font-size: 10px; color: #000; }
.funnel-row .fv { font-family: var(--font-display); font-weight: 700; font-size: 14px; width: 52px; text-align: right; font-variant-numeric: tabular-nums; }

/* ===== AUDIT ================================================ */
.audit-table { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surf-1); }
.audit-th, .audit-tr { display: grid; grid-template-columns: 110px 150px 1fr 130px 90px 80px; gap: 16px; align-items: center; padding: 13px 20px; }
.audit-th { border-bottom: 1px solid var(--line); }
.audit-th span { font-family: var(--font-display); font-weight: 700; font-size: 9px; letter-spacing: 0.12em; color: var(--fg-4); text-transform: uppercase; }
.audit-tr { border-bottom: 1px solid var(--line); font-family: var(--font-body); font-size: 13px; }
.audit-tr:last-child { border-bottom: 0; }
.audit-tr:hover { background: #101010; }
.audit-time { color: var(--fg-4); font-variant-numeric: tabular-nums; font-size: 12px; }
.audit-actor { display: inline-flex; align-items: center; gap: 8px; color: var(--fg-2); }
.audit-actor .ai { width: 20px; height: 20px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--surf-3); flex: none; }
.audit-actor .ai svg { width: 12px; height: 12px; stroke-width: 1.8; }
.audit-actor .ai.engine { background: rgba(255,64,0,0.14); color: var(--orange); }
.audit-action { color: var(--fg); }
.audit-action .at { color: var(--fg-4); }
.audit-cost { color: var(--fg-3); text-align: right; font-variant-numeric: tabular-nums; }
.audit-tok { color: var(--fg-4); text-align: right; font-variant-numeric: tabular-nums; font-size: 12px; }

/* utility */
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip {
  background: var(--surf-2); border: 1px solid var(--line); color: var(--fg-3); white-space: nowrap;
  padding: 8px 13px; border-radius: var(--r-pill);
  font-family: var(--font-body); font-size: 12.5px; transition: all var(--fast);
}
.chip:hover { border-color: var(--line-3); color: var(--fg); }
.chip.is-active { background: var(--orange); border-color: var(--orange); color: #000; }
.search-box { display: flex; align-items: center; gap: 9px; background: var(--surf-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 9px 13px; min-width: 240px; }
.search-box svg { width: 15px; height: 15px; stroke-width: 1.8; color: var(--fg-4); flex: none; }
.search-box input { background: transparent; border: 0; outline: none; color: var(--fg); font-family: var(--font-body); font-size: 13.5px; width: 100%; }
.search-box input::placeholder { color: var(--fg-5); }
.sec-label { font-family: var(--font-display); font-weight: 700; font-size: 10px; letter-spacing: 0.14em; color: var(--fg-4); text-transform: uppercase; margin: 6px 0 14px; }
.fade-in { animation: fade 260ms var(--ease); }
@keyframes fade { from { transform: translateY(7px); } to { transform: none; } }
