/* Kluzner Investment Club — dark private-desk theme
   Palette follows the supplied references: charcoal navy surfaces, gold, coral. */
:root {
  --bg: #11151b;
  --bg-2: #0d1116;
  --rail: #171c23;
  --card: #1f242d;
  --card-2: #252b35;
  --card-3: #2b323d;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --ink: #eef2f8;
  --muted: #9aa5b4;
  --faint: #6d7787;
  --gold: #ffda82;
  --gold-2: #ffc45e;
  --coral: #ff684d;
  --coral-2: #ff8a5f;
  --blue: #a8c7fa;
  --green: #3ddc97;
  --red: #ff6f5e;
  --violet: #b39ddb;
  --radius: 15px;
  --shadow: 0 12px 30px rgba(0, 0, 0, .22);
  --rail-w: 246px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
/* A display rule on a component beats the UA [hidden] rule; keep hidden meaning hidden. */
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(900px 520px at -8% -12%, rgba(255, 104, 77, .13), transparent 60%),
    radial-gradient(900px 600px at 108% 110%, rgba(255, 218, 130, .10), transparent 62%),
    var(--bg-2);
  color: var(--ink);
  font: 13px/1.45 "Segoe UI Variable Text", "Segoe UI", Inter, -apple-system, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--gold); }
svg { display: block; }
.ico { width: 16px; height: 16px; flex: none; }
.muted { color: var(--muted); }
.sm { font-size: 10.5px; }
.up { color: var(--green) !important; }
.down { color: var(--red) !important; }
.flat { color: var(--muted) !important; }
.pad { padding: 12px; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); border-radius: 6px; }
::-webkit-scrollbar-track { background: transparent; }

/* ------------------------------------------------------------------ shell */
.app {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
}
.rail {
  background: linear-gradient(180deg, rgba(27, 33, 42, .96), rgba(19, 24, 31, .98));
  border-right: 1px solid var(--line);
  padding: 16px 13px 14px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  gap: 2px;
  z-index: 40;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 14px; position: relative; }
.mark {
  width: 36px; height: 36px; border-radius: 11px; flex: none;
  background: linear-gradient(145deg, #ffe6a8, #ffb066 70%, #ff8659);
  color: #1d1407; display: grid; place-items: center;
  box-shadow: 0 6px 16px rgba(255, 145, 90, .22);
}
.mark svg { width: 26px; height: 26px; }
.brand-name { font-size: 15.5px; font-weight: 700; letter-spacing: -.2px; line-height: 1.1; }
.brand-sub { font-size: 9px; letter-spacing: .24em; text-transform: uppercase; color: var(--faint); margin-top: 2px; }
.rail-collapse {
  margin-left: auto; width: 24px; height: 24px; border-radius: 7px; border: 1px solid var(--line);
  background: transparent; color: var(--faint); display: grid; place-items: center;
}
.rail-collapse:hover { color: var(--ink); background: rgba(255, 255, 255, .05); }
.rail-collapse svg { width: 14px; height: 14px; }

.client {
  display: flex; align-items: center; gap: 9px; padding: 9px; border-radius: 12px;
  background: rgba(255, 255, 255, .035); border: 1px solid var(--line); margin-bottom: 10px;
}
.avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: linear-gradient(145deg, #ffda82, #ff9a63); color: #241a08; font-size: 11px; font-weight: 750;
}
.client-text { min-width: 0; }
.client-name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.client-tier { font-size: 9.5px; color: var(--faint); letter-spacing: .06em; text-transform: uppercase; }
.client-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); margin-left: auto; box-shadow: 0 0 0 3px rgba(61, 220, 151, .12); }

.nav { display: flex; flex-direction: column; gap: 1px; }
.nav-sec {
  font-size: 8.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--faint);
  padding: 14px 10px 5px; display: flex; align-items: center; gap: 8px;
}
.nav-sec::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 8px 10px; border: 0; border-radius: 9px; background: transparent; color: var(--muted);
  font-size: 12.5px; font-weight: 500; transition: background .14s, color .14s;
}
.nav-item:hover { background: rgba(255, 255, 255, .045); color: var(--ink); }
.nav-item.on {
  background: linear-gradient(96deg, #ffdc93, #ffb26b 62%, #ff8a5f);
  color: #241806; font-weight: 650; box-shadow: 0 7px 18px rgba(255, 128, 84, .18);
}
.ni-ico { display: grid; place-items: center; color: currentColor; opacity: .9; }
.ni-label { flex: 1; }
.ni-badge {
  font-size: 8px; letter-spacing: .1em; font-weight: 700; padding: 2.5px 5px; border-radius: 5px;
  background: rgba(255, 218, 130, .14); color: var(--gold); border: 1px solid rgba(255, 218, 130, .3);
}
.nav-item.on .ni-badge { background: rgba(36, 24, 6, .22); color: #2a1c07; border-color: rgba(42, 28, 7, .2); }
.ni-badge.off { background: rgba(255, 255, 255, .06); color: var(--muted); border-color: var(--line); }
.ni-count {
  min-width: 17px; height: 17px; padding: 0 5px; border-radius: 6px; font-size: 9.5px; font-weight: 700;
  display: grid; place-items: center; background: rgba(255, 255, 255, .07); color: var(--muted);
}
.nav-item.on .ni-count { background: rgba(36, 24, 6, .18); color: #2a1c07; }

.rail-foot { margin-top: auto; padding-top: 16px; }
.watch-mini {
  display: flex; gap: 9px; align-items: flex-start; padding: 10px; border-radius: 11px;
  background: rgba(61, 220, 151, .06); border: 1px solid rgba(61, 220, 151, .16);
}
.pulse {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex: none; margin-top: 4px;
  box-shadow: 0 0 0 0 rgba(61, 220, 151, .5); animation: pulse 2.4s infinite;
}
.pulse.off { background: var(--faint); animation: none; box-shadow: none; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(61, 220, 151, .5); }
  70% { box-shadow: 0 0 0 8px rgba(61, 220, 151, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0); }
}
.wm-title { font-size: 10.5px; font-weight: 600; color: #cfe9dd; }
.wm-sub { font-size: 9.5px; color: var(--faint); margin-top: 2px; }
.rail-links { display: flex; gap: 12px; padding: 12px 8px 2px; }
.rail-links button { background: none; border: 0; color: var(--faint); font-size: 9.5px; padding: 0; }
.rail-links button:hover { color: var(--muted); }

.main { display: flex; flex-direction: column; min-width: 0; height: 100%; }

/* ----------------------------------------------------------------- topbar */
.topbar {
  height: 62px; flex: none; display: flex; align-items: center; gap: 14px;
  padding: 0 22px; border-bottom: 1px solid var(--line);
  background: rgba(17, 21, 27, .92); z-index: 30;
}
.tabs { display: flex; gap: 2px; padding: 3px; background: rgba(255, 255, 255, .035); border: 1px solid var(--line); border-radius: 10px; }
.tab {
  border: 0; background: transparent; color: var(--muted); padding: 7px 12px; border-radius: 7px;
  font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600;
}
.tab:hover { color: var(--ink); }
.tab.on { background: #2a313c; color: var(--ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
.top-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.search {
  display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; width: 226px;
  border: 1px solid var(--line); border-radius: 9px; background: rgba(255, 255, 255, .035); color: var(--faint);
}
.search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: 0; font-size: 12px; color: var(--ink); }
.search input::placeholder { color: var(--faint); }
.search:focus-within { border-color: rgba(255, 218, 130, .45); }
.search.wide { width: auto; flex: 1; }
.mkt-chip {
  display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--muted);
  padding: 0 8px; height: 30px; border-radius: 8px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line);
  white-space: nowrap;
}
.mkt-chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.mkt-chip.closed .dot { background: var(--gold); }
.bot-chip {
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 11px; border-radius: 9px;
  background: rgba(255, 218, 130, .07); border: 1px solid rgba(255, 218, 130, .22); text-align: left;
}
.bot-chip .pulse { margin: 0; }
.bot-chip-txt b { display: block; font-size: 8.5px; letter-spacing: .14em; color: var(--gold); }
.bot-chip-txt small { display: block; font-size: 9.5px; color: var(--muted); margin-top: 1px; text-transform: capitalize; }
.bot-chip.paused { background: rgba(255, 255, 255, .03); border-color: var(--line); }
.bot-chip.paused .pulse { background: var(--faint); animation: none; }
.bot-chip.paused b { color: var(--muted); }
.icon-btn {
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03); color: var(--muted); display: grid; place-items: center; position: relative;
}
.icon-btn:hover { color: var(--ink); background: rgba(255, 255, 255, .07); }
.badge {
  position: absolute; top: -5px; right: -5px; min-width: 15px; height: 15px; padding: 0 4px;
  border-radius: 8px; background: var(--coral); color: #22120c; font-size: 9px; font-weight: 800;
  display: grid; place-items: center; border: 2px solid #14181f;
}
.avatar-btn {
  width: 32px; height: 32px; border-radius: 50%; border: 0; color: #241a08; font-size: 11px;
  font-weight: 750; background: linear-gradient(145deg, #ffda82, #ff9a63);
}
.hamburger { display: none; }

/* ---------------------------------------------------------------- content */
.content { flex: 1; overflow-y: auto; padding: 22px 24px 26px; scroll-behavior: smooth; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.eyebrow { font-size: 9px; letter-spacing: .18em; text-transform: uppercase; color: rgba(255, 218, 130, .78); font-weight: 600; }
.page-head h1 { margin: 5px 0 5px; font-size: 26px; letter-spacing: -.6px; font-weight: 650; }
.page-head p { margin: 0; color: var(--muted); font-size: 12px; max-width: 720px; }
.ph-actions { display: flex; gap: 8px; flex: none; padding-top: 6px; }
.ph-actions .btn { height: 36px; }

.btn {
  height: 35px; padding: 0 14px; border-radius: 9px; border: 1px solid transparent;
  display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600;
  transition: filter .14s, background .14s, border-color .14s; white-space: nowrap;
}
.btn .ico { width: 15px; height: 15px; }
.btn.gold { background: linear-gradient(180deg, #ffe1a1, #ffc46b); color: #241a08; border-color: rgba(0, 0, 0, .08); }
.btn.gold:hover { filter: brightness(1.05); }
.btn.ghost { background: rgba(255, 255, 255, .04); border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { background: rgba(255, 255, 255, .08); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 11px; border-radius: 8px; }
.btn.ok { background: rgba(61, 220, 151, .13); border-color: rgba(61, 220, 151, .3); color: var(--green); }
.btn.danger { color: #ff9a8c; border-color: rgba(255, 111, 94, .26); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.busy .ico { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.span-12 { grid-column: span 12; }
.span-8 { grid-column: span 8; }
.span-7 { grid-column: span 7; }
.span-6 { grid-column: span 6; }
.span-5 { grid-column: span 5; }
.span-4 { grid-column: span 4; }

.card {
  background: linear-gradient(180deg, #212731, #1d222b);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px;
  box-shadow: var(--shadow); min-width: 0; position: relative;
}
.card-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-h h3 { margin: 3px 0 0; font-size: 14.5px; font-weight: 600; letter-spacing: -.1px; }
.card-h .eyebrow { display: block; }
.h-tools { display: flex; align-items: center; gap: 8px; }
.sq {
  width: 25px; height: 25px; border-radius: 6px; border: 1.5px solid rgba(255, 218, 130, .5);
  background: transparent; color: var(--gold); display: grid; place-items: center;
}
.sq .ico { width: 13px; height: 13px; }
.sq:hover { background: rgba(255, 218, 130, .12); }

/* ------------------------------------------------------------------- hero */
.hero { grid-column: span 8; display: flex; flex-direction: column; }
.live-tag {
  display: inline-flex; align-items: center; gap: 5px; font-size: 8.5px; letter-spacing: .14em;
  color: var(--green); border: 1px solid rgba(61, 220, 151, .28); background: rgba(61, 220, 151, .08);
  padding: 3px 7px; border-radius: 5px; font-weight: 700;
}
.live-tag i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); animation: pulse 2.4s infinite; }
.hero-num { font-size: 46px; font-weight: 650; letter-spacing: -1.8px; line-height: 1.02; margin-top: 4px; font-variant-numeric: tabular-nums; }
.hero-num .cents { font-size: 22px; color: var(--muted); letter-spacing: -.4px; }
.hero-meta { display: flex; align-items: center; gap: 9px; margin: 9px 0 18px; font-size: 12px; flex-wrap: wrap; }
.chg { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chg i { font-style: normal; font-size: 9px; }
.chg.tiny { font-size: 10.5px; font-weight: 600; }
.hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hero-stats span { display: block; font-size: 8.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.hero-stats b { display: block; font-size: 15.5px; font-weight: 600; margin-top: 3px; font-variant-numeric: tabular-nums; }
.hero-stats small { font-size: 10px; color: var(--faint); font-weight: 500; }
.hero-actions { display: flex; gap: 8px; margin-top: 15px; flex-wrap: wrap; }

/* --------------------------------------------------------------- bot card */
.bot-card {
  grid-column: span 4; overflow: hidden; border: 0; color: #241806;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, .48), transparent 55%),
    linear-gradient(152deg, #ffe0a0 0%, #ffc072 42%, #ff9868 74%, #ff7a58 100%);
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 16px 34px rgba(255, 120, 75, .18);
}
.bot-card.paused { filter: saturate(.35) brightness(.85); }
.bc-shine { position: absolute; inset: -40% -10% auto auto; width: 60%; height: 110%; background: radial-gradient(closest-side, rgba(255, 255, 255, .5), transparent); transform: rotate(18deg); pointer-events: none; }
.bc-top { display: flex; align-items: center; justify-content: space-between; position: relative; }
.eyebrow.dark { color: rgba(36, 24, 6, .62); }
.bc-state { display: inline-flex; align-items: center; gap: 5px; font-size: 8px; letter-spacing: .12em; font-weight: 800; background: rgba(36, 24, 6, .16); padding: 3px 6px; border-radius: 5px; }
.bc-state i { width: 5px; height: 5px; border-radius: 50%; background: #1d3d2b; }
.bc-title { font-size: 11.5px; font-weight: 600; color: rgba(36, 24, 6, .72); margin-top: 12px; }
.bc-big { font-size: 42px; font-weight: 750; letter-spacing: -1.5px; line-height: 1; margin: 2px 0 10px; }
.bc-big span { display: block; font-size: 8.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: rgba(36, 24, 6, .55); margin-top: 3px; }
.bc-rows { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; position: relative; }
.bc-rows span { display: block; font-size: 8px; letter-spacing: .1em; text-transform: uppercase; color: rgba(36, 24, 6, .55); }
.bc-rows b { display: block; font-size: 12px; font-weight: 700; margin-top: 1px; }
.bc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; position: relative; }
.paper-pill { font-size: 8px; font-weight: 800; letter-spacing: .14em; background: rgba(36, 24, 6, .5); color: #ffe6b8; padding: 3px 7px; border-radius: 5px; }
.bc-foot button { display: inline-flex; align-items: center; gap: 5px; background: rgba(36, 24, 6, .14); border: 0; color: #241806; font-size: 10.5px; font-weight: 700; padding: 6px 9px; border-radius: 7px; }
.bc-foot button .ico { width: 13px; height: 13px; }
.bc-foot button:hover { background: rgba(36, 24, 6, .22); }

/* ------------------------------------------------------------ service row */
.svc-row-card { grid-column: span 12; }
.svc-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 10px; }
.svc-card {
  text-align: left; border-radius: 12px; border: 1px solid var(--line); padding: 11px 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015));
  display: flex; flex-direction: column; gap: 3px; min-width: 0; transition: border-color .15s, transform .15s;
}
.svc-card:hover { border-color: rgba(255, 218, 130, .38); transform: translateY(-1px); }
.svc-h { display: flex; align-items: center; gap: 8px; min-width: 0; }
.svc-logo {
  width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; flex: none;
  font-size: 9px; font-weight: 800; letter-spacing: .02em;
  color: var(--svc, #ffda82);
  background: color-mix(in srgb, var(--svc, #ffda82) 18%, #1b2029);
  border: 1px solid color-mix(in srgb, var(--svc, #ffda82) 42%, transparent);
}
.svc-logo.big { width: 44px; height: 44px; border-radius: 11px; font-size: 12px; }
.svc-name { font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svc-more { margin-left: auto; color: var(--faint); }
.svc-more .ico { width: 14px; height: 14px; }
.svc-val { font-size: 19px; font-weight: 650; letter-spacing: -.4px; margin-top: 3px; font-variant-numeric: tabular-nums; }
.svc-sub { display: flex; justify-content: space-between; gap: 6px; font-size: 10px; color: var(--faint); }
.svc-spark { height: 30px; margin-top: 3px; display: flex; align-items: flex-end; }
.svc-spark .spark { width: 100%; height: 30px; }
.svc-empty { font-size: 9.5px; color: var(--faint); }
.svc-card.add {
  border-style: dashed; border-color: rgba(255, 218, 130, .28); background: rgba(255, 218, 130, .03);
  align-items: center; justify-content: center; text-align: center; gap: 4px; padding: 14px 10px;
}
.add-plus { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--gold); border: 1px dashed rgba(255, 218, 130, .45); }
.add-t { font-size: 11.5px; font-weight: 600; color: #f0e2c4; }
.add-s { font-size: 9px; color: var(--faint); }

/* ----------------------------------------------------------------- charts */
.perf { grid-column: span 8; }
.alloc { grid-column: span 4; display: flex; flex-direction: column; }
.seg { display: flex; gap: 2px; padding: 2px; background: rgba(255, 255, 255, .035); border: 1px solid var(--line); border-radius: 8px; }
.seg button { border: 0; background: transparent; color: var(--muted); font-size: 9.5px; letter-spacing: .08em; padding: 5px 8px; border-radius: 6px; font-weight: 600; }
.seg button.on { background: #2b323d; color: var(--ink); }
.seg.sm button { font-size: 9px; padding: 4px 7px; }
.legend { display: flex; align-items: center; gap: 14px; font-size: 10.5px; color: var(--muted); margin-bottom: 6px; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 7px; height: 7px; border-radius: 2px; display: inline-block; }
.dot.gold { background: var(--gold); }
.dot.coral { background: var(--coral); }
.legend-live { margin-left: auto; color: var(--faint); font-size: 9px; letter-spacing: .04em; }
.chart-wrap { position: relative; height: 246px; cursor: crosshair; }
.area-chart { width: 100%; height: 100%; }
.chart-empty { height: 100%; display: grid; place-items: center; color: var(--faint); font-size: 11.5px; }
.hover-line { position: absolute; top: 6%; bottom: 9%; width: 1px; background: rgba(255, 255, 255, .28); border-left: 1px dashed rgba(255, 255, 255, .28); pointer-events: none; }
.hover-dot { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); border: 2px solid #1c212a; transform: translate(-50%, -50%); pointer-events: none; box-shadow: 0 0 0 4px rgba(255, 218, 130, .16); }
.chart-tip {
  position: absolute; top: 6px; background: #141920; border: 1px solid var(--line-2); border-radius: 8px;
  padding: 5px 9px; pointer-events: none; box-shadow: 0 8px 18px rgba(0, 0, 0, .4);
}
.chart-tip b { display: block; font-size: 12px; color: var(--gold); font-variant-numeric: tabular-nums; }
.chart-tip span { font-size: 9.5px; color: var(--faint); }
.chart-foot { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; border-top: 1px solid var(--line); margin-top: 10px; padding-top: 10px; }
.chart-foot span { display: block; font-size: 8.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.chart-foot b { display: block; font-size: 12.5px; font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; }

.donut { position: relative; display: grid; place-items: center; margin: 2px auto; }
.donut svg { transform: rotate(0deg); }
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.donut-center b { font-size: 19px; font-weight: 650; letter-spacing: -.4px; }
.donut-center span { display: block; font-size: 8.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-top: 2px; }
.donut-center .dc-num { font-size: 19px; font-weight: 650; letter-spacing: -.4px; }
.alloc-legend { margin-top: 10px; }
.al-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.al-row:last-child { border-bottom: 0; }
.al-l { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.al-l i { width: 8px; height: 8px; border-radius: 2px; }
.al-r { text-align: right; }
.al-r b { font-size: 11.5px; font-weight: 600; }
.al-r small { display: block; font-size: 9.5px; color: var(--faint); }
.alloc-foot { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 9px; margin-top: auto; }
.alloc-foot b { color: var(--ink); font-weight: 600; }

/* ------------------------------------------------------------------ brief */
.brief { grid-column: span 8; }
.engine-tag {
  font-size: 8px; letter-spacing: .1em; font-weight: 700; padding: 3px 6px; border-radius: 5px;
  background: rgba(255, 255, 255, .06); color: var(--muted); border: 1px solid var(--line); white-space: nowrap;
}
.engine-tag.ai { background: rgba(168, 199, 250, .12); color: var(--blue); border-color: rgba(168, 199, 250, .28); }
.brief-text { font-size: 13px; line-height: 1.65; color: #dfe5ef; margin: 2px 0 12px; }
.brief-meta { display: flex; align-items: center; gap: 8px; font-size: 10px; color: var(--faint); }
.sep { color: rgba(255, 255, 255, .18); }
.bot-log { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; display: flex; flex-direction: column; gap: 5px; }
.bl-row { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; font-size: 10.5px; }
.bl-kind { font-size: 8px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.bl-kind.error { color: var(--red); }
.bl-kind.trade { color: var(--green); }
.bl-kind.decision { color: var(--blue); }
.bl-text { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-time { color: var(--faint); font-size: 9.5px; }

/* ---------------------------------------------------------------- alerts */
.alert-card { grid-column: span 4; display: flex; flex-direction: column; }
.al-item { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; gap: 9px; padding: 9px 0; border-bottom: 1px solid var(--line); align-items: start; }
.al-item:last-of-type { border-bottom: 0; }
.al-dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 5px; background: var(--muted); }
.al-item.warning .al-dot { background: var(--gold); }
.al-item.critical .al-dot { background: var(--red); box-shadow: 0 0 0 3px rgba(255, 111, 94, .14); }
.al-item.opportunity .al-dot { background: var(--green); }
.al-item.info .al-dot { background: var(--blue); }
.al-item.read { opacity: .62; }
.al-title { font-size: 11.5px; font-weight: 600; line-height: 1.35; }
.al-sub { font-size: 10px; color: var(--faint); margin-top: 2px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.al-time { font-size: 9px; color: var(--faint); white-space: nowrap; }
.no-alerts { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); padding: 10px 0 6px; }
.decision-cta {
  margin-top: auto; width: 100%; border: 1px solid rgba(255, 218, 130, .25); background: rgba(255, 218, 130, .07);
  color: var(--gold); font-size: 11px; font-weight: 600; border-radius: 9px; padding: 9px 10px;
  display: flex; align-items: center; gap: 7px;
}
.decision-cta .ico { width: 14px; height: 14px; }
.decision-cta .ico:last-child { margin-left: auto; }

/* ----------------------------------------------------------------- tables */
.holdings-card { grid-column: span 12; }
.table-wrap { overflow-x: auto; margin: 0 -6px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.tbl th {
  text-align: left; font-size: 8.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--faint); font-weight: 600; padding: 0 10px 8px; white-space: nowrap;
}
.tbl th.r, .tbl td.r { text-align: right; }
.tbl td { padding: 9px 10px; border-top: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: rgba(255, 255, 255, .03); }
.hrow { cursor: pointer; }
.num { font-variant-numeric: tabular-nums; }
.strong { color: #fff; font-weight: 600; }
.asset { display: flex; align-items: center; gap: 9px; min-width: 160px; }
.asset-ico {
  width: 30px; height: 30px; border-radius: 8px; flex: none; display: grid; place-items: center;
  background: rgba(255, 255, 255, .06); color: var(--muted); font-size: 8.5px; font-weight: 750; letter-spacing: .03em;
}
.asset-ico.crypto { background: rgba(255, 218, 130, .11); color: var(--gold); }
.asset-t b { display: block; font-size: 12px; font-weight: 600; }
.asset-t small { display: block; font-size: 9.5px; color: var(--faint); max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.acct-pill i { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.acct-pill small { display: block; font-size: 8.5px; color: var(--faint); letter-spacing: .02em; }
small.blk { display: block; font-size: 9px; color: var(--faint); margin-top: 2px; }
.wbar { width: 46px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .08); margin-left: auto; overflow: hidden; }
.wbar span { display: block; height: 4px; border-radius: 2px; background: linear-gradient(90deg, #ffda82, #ff9c63); }
.row-go { color: var(--faint); display: inline-grid; place-items: center; }
.row-go .ico { width: 14px; height: 14px; }

.kpi-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi { background: linear-gradient(180deg, #212731, #1d222b); border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px; }
.kpi-top { display: flex; justify-content: space-between; align-items: center; font-size: 8.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.kpi-ico { color: var(--gold); }
.kpi-ico .ico { width: 15px; height: 15px; }
.kpi-val { font-size: 22px; font-weight: 650; letter-spacing: -.5px; margin-top: 7px; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 10px; color: var(--faint); margin-top: 3px; }

/* ----------------------------------------------------------------- broker */
.bot-hero {
  grid-column: span 8; display: flex; gap: 20px; align-items: center; justify-content: space-between;
  background:
    radial-gradient(80% 130% at 100% 0%, rgba(255, 218, 130, .10), transparent 60%),
    linear-gradient(180deg, #232a34, #1d222b);
}
.bh-left { min-width: 0; }
.bh-state { display: flex; align-items: center; gap: 8px; font-size: 9px; letter-spacing: .14em; font-weight: 700; color: var(--green); text-transform: uppercase; flex-wrap: wrap; }
.bh-state .divider { width: 1px; height: 10px; background: var(--line-2); }
.bh-state .muted { letter-spacing: .06em; font-weight: 500; text-transform: none; font-size: 10px; color: var(--faint); }
.bot-hero h2 { font-size: 22px; letter-spacing: -.5px; margin: 8px 0 5px; font-weight: 650; }
.bot-hero p { color: var(--muted); font-size: 11.5px; margin: 0; }
.bh-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line); }
.bh-stats span { display: block; font-size: 8.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.bh-stats b { display: block; font-size: 15px; font-weight: 650; margin-top: 2px; font-variant-numeric: tabular-nums; }
.bh-actions { display: flex; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.bh-ring { text-align: center; flex: none; }
.ring-g { position: relative; display: grid; place-items: center; }
.ring-g svg { overflow: visible; }
.ring-cap { font-size: 8px; letter-spacing: .12em; color: var(--faint); margin-top: 6px; text-transform: uppercase; }

.policy-card { grid-column: span 4; }
.pol-row { display: flex; justify-content: space-between; gap: 10px; padding: 6.5px 0; border-bottom: 1px solid var(--line); font-size: 11.5px; }
.pol-row span { color: var(--muted); }
.pol-row b { font-weight: 600; text-transform: capitalize; }
.auto-toggle {
  width: 100%; margin-top: 12px; display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: var(--muted); font-size: 11px;
}
.at-knob { width: 30px; height: 17px; border-radius: 9px; background: rgba(255, 255, 255, .12); position: relative; flex: none; transition: background .18s; }
.at-knob::after { content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #8b94a3; transition: transform .18s, background .18s; }
.auto-toggle.on { border-color: rgba(61, 220, 151, .3); background: rgba(61, 220, 151, .07); color: var(--ink); }
.auto-toggle.on .at-knob { background: rgba(61, 220, 151, .35); }
.auto-toggle.on .at-knob::after { transform: translateX(13px); background: var(--green); }
.at-txt b { margin-left: 3px; }
.pol-note { font-size: 10px; color: var(--faint); line-height: 1.5; margin: 9px 0 0; }

.chat-card { grid-column: span 7; display: flex; flex-direction: column; }
.chat-scroll { height: 200px; overflow-y: auto; padding-right: 4px; display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 86%; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .045); border: 1px solid var(--line); font-size: 12.5px; line-height: 1.55; color: #e4e9f2; }
.bubble.bot { border-left: 2px solid rgba(255, 218, 130, .6); border-top-left-radius: 4px; }
.bubble.user { margin-left: auto; background: rgba(255, 218, 130, .10); border-color: rgba(255, 218, 130, .22); border-top-right-radius: 4px; }
.bubble-f { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 9px; color: var(--faint); }
.bubble.user .bubble-f { justify-content: flex-end; }
.eng { font-size: 7.5px; letter-spacing: .12em; font-weight: 800; padding: 2px 4px; border-radius: 4px; background: rgba(255, 255, 255, .08); color: var(--muted); }
.eng.ai { background: rgba(168, 199, 250, .15); color: var(--blue); }
.bubble.typing { display: flex; align-items: center; gap: 4px; color: var(--faint); }
.tdot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); animation: blink 1.2s infinite; }
.tdot:nth-child(2) { animation-delay: .2s; } .tdot:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.bubble.typing small { margin-left: 6px; font-size: 10px; }
.chat-suggest { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.chat-suggest button { font-size: 10px; padding: 5px 9px; border-radius: 20px; border: 1px solid var(--line); background: transparent; color: var(--muted); }
.chat-suggest button:hover { border-color: rgba(255, 218, 130, .4); color: var(--gold); }
.chat-form { display: flex; gap: 8px; margin-top: auto; }
.chat-form input { flex: 1; height: 38px; border-radius: 9px; border: 1px solid var(--line); background: rgba(0, 0, 0, .22); padding: 0 12px; font-size: 12.5px; outline: 0; }
.chat-form input:focus { border-color: rgba(255, 218, 130, .45); }
.chat-form .btn { height: 38px; width: 42px; padding: 0; display: grid; place-items: center; }

.decisions-card { grid-column: span 5; }
.dec-list { display: flex; flex-direction: column; gap: 8px; max-height: 430px; overflow-y: auto; }
.dec { border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; background: rgba(255, 255, 255, .022); }
.dec.executed { border-color: rgba(61, 220, 151, .2); }
.dec.rejected { opacity: .6; }
.dec-top { display: flex; align-items: center; gap: 7px; font-size: 11px; }
.dec-qty { color: var(--faint); font-size: 10px; }
.dec-top .pill { margin-left: auto; }
.pill { font-size: 8px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; padding: 2.5px 5px; border-radius: 4px; background: rgba(255, 255, 255, .07); color: var(--muted); }
.pill.ok { background: rgba(61, 220, 151, .13); color: var(--green); }
.pill.bad { background: rgba(255, 111, 94, .13); color: var(--red); }
.pill.wait { background: rgba(255, 218, 130, .13); color: var(--gold); }
.side { font-size: 8.5px; font-weight: 800; letter-spacing: .08em; padding: 2.5px 5px; border-radius: 4px; }
.side.buy { background: rgba(61, 220, 151, .14); color: var(--green); }
.side.sell { background: rgba(255, 111, 94, .14); color: var(--red); }
.dec-reason { font-size: 10px; color: var(--faint); margin-top: 5px; line-height: 1.45; }
.dec-act { display: flex; gap: 6px; margin-top: 8px; }
.dec-err { font-size: 9.5px; color: var(--red); margin-top: 5px; }
.log-list { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }

/* ---------------------------------------------------------------- markets */
.mkt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: 10px; }
.mkt-tile {
  border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .012));
  text-align: left; color: inherit; display: flex; flex-direction: column; gap: 2px;
}
button.mkt-tile { width: 100%; }
.mkt-tile:hover { border-color: rgba(255, 218, 130, .32); }
.mt-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.mt-sym { font-size: 12.5px; font-weight: 650; }
.mt-sym small { display: block; font-size: 8px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); font-weight: 500; margin-top: 1px; }
.mt-price { font-size: 20px; font-weight: 650; letter-spacing: -.5px; margin-top: 3px; font-variant-numeric: tabular-nums; }
.mt-spark { height: 34px; margin: 3px 0; }
.mt-spark .spark { width: 100%; height: 34px; }
.mt-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 9.5px; color: var(--faint); }
.mini { border: 1px solid var(--line); background: transparent; color: var(--gold); font-size: 9.5px; padding: 4px 8px; border-radius: 6px; font-weight: 600; }
.mini.ghost { color: var(--faint); }
.mini:hover { background: rgba(255, 218, 130, .08); }
.inline-add { display: flex; gap: 6px; }
.inline-add input { width: 210px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: rgba(0, 0, 0, .22); padding: 0 10px; font-size: 11.5px; outline: 0; }

/* --------------------------------------------------------------- accounts */
.note-card { display: flex; gap: 12px; align-items: flex-start; font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.note-card > .ico { width: 20px; height: 20px; color: var(--gold); flex: none; margin-top: 2px; }
.note-card b { color: var(--ink); }
.conn-card { display: flex; flex-direction: column; }
.conn-h { display: flex; align-items: center; gap: 11px; }
.conn-id h3 { margin: 0 0 2px; font-size: 15px; font-weight: 600; }
.conn-val { margin-left: auto; text-align: right; }
.conn-val b { display: block; font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; }
.conn-val small { font-size: 10px; }
.conn-accounts { margin-top: 12px; border-top: 1px solid var(--line); }
.ca-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.ca-row .mask { color: var(--faint); letter-spacing: 1px; }
.ca-row b { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.conn-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.conn-act { display: flex; gap: 6px; }
.add-conn { border-style: dashed; border-color: rgba(255, 218, 130, .26); background: rgba(255, 218, 130, .025); display: grid; place-items: center; cursor: pointer; }
.ac-inner { text-align: center; max-width: 340px; padding: 8px; }
.ac-inner > .ico { width: 26px; height: 26px; color: var(--gold); margin: 0 auto 8px; }
.ac-inner h3 { margin: 0 0 5px; font-size: 15px; }
.ac-inner p { margin: 0 0 12px; font-size: 11px; color: var(--faint); line-height: 1.55; }

/* --------------------------------------------------------------- activity */
.act-list, .ord-list { display: flex; flex-direction: column; }
.act { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 11.5px; align-items: baseline; }
.act-kind { font-size: 8px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--gold); }
.act-kind.trade { color: var(--green); }
.act-kind.chat { color: var(--blue); }
.act-text { color: var(--muted); }
.act-time { font-size: 9.5px; color: var(--faint); }
.ord { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.ord-q, .ord-n { color: var(--faint); font-size: 10px; }
.ord-n { margin-left: auto; }
.ord-t { color: var(--faint); font-size: 9.5px; width: 52px; text-align: right; }
.card-h.sub { margin-top: 14px; }
.al-strip { display: flex; flex-direction: column; }

/* --------------------------------------------------------------- settings */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fld { display: flex; flex-direction: column; gap: 5px; }
.fld > span { font-size: 8.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.fld input, .fld select {
  height: 34px; border-radius: 8px; border: 1px solid var(--line); background: rgba(0, 0, 0, .22);
  padding: 0 10px; font-size: 12px; outline: 0; width: 100%;
}
.fld input:focus, .fld select:focus { border-color: rgba(255, 218, 130, .45); }
.fld small { font-size: 9.5px; color: var(--faint); }
.switch-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span { width: 32px; height: 18px; border-radius: 9px; background: rgba(255, 255, 255, .12); position: relative; transition: background .18s; flex: none; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #8b94a3; transition: .18s; }
.switch input:checked + span { background: rgba(255, 218, 130, .35); }
.switch input:checked + span::after { transform: translateX(14px); background: var(--gold); }
.danger-zone { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.danger-zone b { font-size: 12px; }
.danger-zone p { font-size: 10.5px; color: var(--faint); line-height: 1.55; margin: 5px 0 10px; }
code { font-family: "Cascadia Mono", Consolas, monospace; font-size: 10.5px; background: rgba(255, 255, 255, .06); padding: 1px 4px; border-radius: 4px; }

/* ----------------------------------------------------------------- modal */
.modal-wrap {
  position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center;
  padding: 18px; background: rgba(7, 9, 13, .82);
}
.modal {
  width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; background: #1c212a;
  border: 1px solid var(--line-2); border-radius: 18px; padding: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55); animation: pop .18s ease-out;
}
@keyframes pop { from { transform: translateY(8px) scale(.99); opacity: 0; } }
.modal-lg { max-width: 780px; }
.modal-md { max-width: 600px; }
.modal-sm { max-width: 430px; }
.m-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 6px; }
.m-head h2 { margin: 4px 0 5px; font-size: 20px; letter-spacing: -.4px; font-weight: 650; }
.m-head p { margin: 0; font-size: 11.5px; color: var(--muted); line-height: 1.55; max-width: 520px; }
.m-title-row { display: flex; align-items: center; gap: 12px; }
.m-search { display: flex; align-items: center; gap: 12px; margin: 14px 0; flex-wrap: wrap; }
.steps-mini { display: flex; gap: 10px; font-size: 8.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.steps-mini .on { color: var(--gold); }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; max-height: 352px; overflow-y: auto; padding-right: 4px; }
.svc-opt {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .02); text-align: left;
}
.svc-opt:hover { border-color: rgba(255, 218, 130, .35); background: rgba(255, 218, 130, .04); }
.svc-opt.linked { opacity: .5; cursor: default; }
.so-t b { display: block; font-size: 12px; font-weight: 600; }
.so-t small { font-size: 9px; color: var(--faint); }
.so-go { margin-left: auto; color: var(--faint); }
.so-go .ico { width: 14px; height: 14px; }
.m-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.m-actions { display: flex; gap: 8px; }
.lock-note { display: inline-flex; align-items: center; gap: 6px; font-size: 9.5px; color: var(--faint); }
.lock-note .ico { width: 13px; height: 13px; }
.auth-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; margin-top: 14px; }
.auth-form { display: flex; flex-direction: column; gap: 10px; }
.check { display: flex; gap: 8px; font-size: 10.5px; color: var(--muted); line-height: 1.45; align-items: flex-start; }
.check input { margin-top: 2px; accent-color: var(--gold); }
.auth-note { display: flex; gap: 8px; font-size: 9.5px; color: var(--faint); line-height: 1.5; background: rgba(255, 218, 130, .05); border: 1px solid rgba(255, 218, 130, .16); border-radius: 8px; padding: 8px; }
.auth-note .ico { width: 14px; height: 14px; color: var(--gold); flex: none; }
.auth-side { background: rgba(255, 255, 255, .03); border: 1px solid var(--line); border-radius: 12px; padding: 16px; text-align: center; }
.auth-side h3 { margin: 10px 0 4px; font-size: 15px; }
.auth-side p { font-size: 10.5px; color: var(--faint); margin: 0 0 10px; line-height: 1.5; }
.auth-side ul { list-style: none; margin: 0; padding: 0; text-align: left; }
.auth-side li { display: flex; align-items: center; gap: 7px; font-size: 10.5px; color: var(--muted); padding: 3px 0; }
.auth-side li .ico { width: 13px; height: 13px; color: var(--green); }
.sync-stage { text-align: center; padding: 8px 0 4px; }
.sync-orb { position: relative; width: 74px; height: 74px; margin: 6px auto 14px; display: grid; place-items: center; }
.sync-orb .svc-logo.big { width: 62px; height: 62px; border-radius: 16px; font-size: 15px; }
.sync-orb i { position: absolute; inset: -6px; border-radius: 22px; border: 1px solid rgba(255, 218, 130, .35); animation: orb 1.6s infinite; }
@keyframes orb { 0% { transform: scale(.94); opacity: .9; } 100% { transform: scale(1.16); opacity: 0; } }
.sync-steps { display: flex; flex-direction: column; gap: 5px; font-size: 11.5px; color: var(--faint); }
.ss.on { color: var(--gold); }
.ss.done { color: var(--green); }
.sync-bar { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .08); margin-top: 14px; overflow: hidden; }
.sync-bar span { display: block; height: 4px; width: 8%; background: linear-gradient(90deg, #ffda82, #ff8a5f); transition: width .5s ease; }
.linked-sum { margin-top: 14px; border-top: 1px solid var(--line); }
.ls-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 11.5px; }
.ls-row b { color: var(--faint); letter-spacing: 1px; font-weight: 500; }
.ls-row small { margin-left: auto; color: var(--muted); }
.trade-form { display: flex; flex-direction: column; gap: 11px; margin-top: 12px; }
.side-toggle { display: flex; gap: 2px; padding: 3px; background: rgba(255, 255, 255, .04); border-radius: 9px; border: 1px solid var(--line); }
.side-toggle button { flex: 1; border: 0; background: transparent; color: var(--muted); font-size: 11.5px; font-weight: 600; padding: 7px; border-radius: 7px; }
.side-toggle button.on[data-side="buy"] { background: rgba(61, 220, 151, .16); color: var(--green); }
.side-toggle button.on[data-side="sell"] { background: rgba(255, 111, 94, .16); color: var(--red); }
.est { display: flex; align-items: baseline; gap: 8px; padding: 9px 11px; border-radius: 9px; background: rgba(255, 218, 130, .06); border: 1px solid rgba(255, 218, 130, .16); font-size: 11px; color: var(--muted); }
.est b { margin-left: auto; font-size: 14px; color: var(--gold); font-variant-numeric: tabular-nums; }
.est small { font-size: 9px; color: var(--faint); }
.svc-detail-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 14px 0 10px; }
.svc-detail-stats span { display: block; font-size: 8.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.svc-detail-stats b { display: block; font-size: 14px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.masked-line { display: flex; flex-wrap: wrap; gap: 10px; font-size: 10px; color: var(--faint); padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.modal-tbl { margin-top: 8px; }
.mt-row { display: grid; grid-template-columns: 64px 1fr auto 58px; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 11px; align-items: baseline; }
.mt-s { font-weight: 600; }
.mt-q { color: var(--faint); font-size: 10px; }
.mt-v { font-variant-numeric: tabular-nums; }
.mt-p { text-align: right; font-variant-numeric: tabular-nums; }
.legal h3 { font-size: 12px; margin: 14px 0 4px; color: var(--gold); letter-spacing: .02em; }
.legal p { font-size: 11px; color: var(--muted); line-height: 1.65; margin: 0; }

/* ---------------------------------------------------------------- alerts */
.scrim { position: fixed; inset: 0; background: rgba(5, 7, 10, .55); z-index: 94; }
.alerts-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: 390px; max-width: 92vw; z-index: 95;
  background: #191e26; border-left: 1px solid var(--line-2); transform: translateX(102%);
  transition: transform .22s ease; display: flex; flex-direction: column; box-shadow: -20px 0 60px rgba(0, 0, 0, .4);
}
.alerts-panel.open { transform: translateX(0); }
.ap-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 18px 18px 10px; }
.ap-head h3 { margin: 3px 0 0; font-size: 17px; }
.ap-actions { display: flex; gap: 6px; padding: 0 18px 10px; }
.ap-list { flex: 1; overflow-y: auto; padding: 0 18px 18px; }
.ap-item { padding: 11px 0; border-bottom: 1px solid var(--line); }
.ap-t { display: flex; align-items: center; gap: 8px; font-size: 11.5px; }
.ap-t b { font-weight: 600; }
.ap-when { margin-left: auto; font-size: 9px; color: var(--faint); }
.ap-item p { font-size: 10.5px; color: var(--muted); line-height: 1.55; margin: 5px 0; }
.ap-item small { font-size: 9px; color: var(--faint); }
.ap-item.read { opacity: .6; }
.ap-item .al-dot { margin: 0; }
.empty { text-align: center; padding: 26px 8px; }
.empty-ico { width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 218, 130, .1); color: var(--gold); display: grid; place-items: center; margin: 0 auto 10px; }
.empty h4 { margin: 0 0 5px; font-size: 14px; }
.empty p { margin: 0 0 12px; font-size: 11px; color: var(--faint); line-height: 1.5; }
.empty.small { padding: 16px 4px; }
.loading { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 40px; font-size: 12px; }
.loading.error { flex-direction: column; align-items: flex-start; color: var(--red); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 218, 130, .25); border-top-color: var(--gold); animation: spin 1s linear infinite; }

/* ---------------------------------------------------------------- toasts */
.toasts { position: fixed; right: 22px; bottom: 46px; z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast {
  display: flex; align-items: center; gap: 8px; background: #232a34; border: 1px solid var(--line-2);
  border-radius: 10px; padding: 9px 13px; font-size: 11.5px; color: var(--ink);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .35); animation: slidein .22s ease-out; max-width: 360px;
}
.toast.bad { border-color: rgba(255, 111, 94, .4); }
.t-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); flex: none; }
.toast.bad .t-dot { background: var(--red); }
.toast.out { opacity: 0; transform: translateY(6px); transition: .3s; }
@keyframes slidein { from { opacity: 0; transform: translateY(8px); } }

/* -------------------------------------------------------------- statusbar */
.statusbar {
  height: 34px; flex: none; border-top: 1px solid var(--line); display: flex; align-items: center;
  justify-content: space-between; padding: 0 22px; font-size: 9.5px; color: var(--faint);
  background: rgba(13, 17, 22, .7);
}
.sb-left { display: flex; align-items: center; gap: 9px; min-width: 0; }
.tag { font-size: 8px; letter-spacing: .12em; font-weight: 800; padding: 2.5px 5px; border-radius: 4px; }
.tag.paper { background: rgba(255, 218, 130, .12); color: var(--gold); border: 1px solid rgba(255, 218, 130, .24); }
.sb-txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-right { display: flex; align-items: center; gap: 7px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------- collapsed */
html.rail-collapsed { --rail-w: 74px; }
html.rail-collapsed .brand-text,
html.rail-collapsed .client-text,
html.rail-collapsed .nav-sec span,
html.rail-collapsed .ni-label,
html.rail-collapsed .ni-badge,
html.rail-collapsed .ni-count,
html.rail-collapsed .rail-foot,
html.rail-collapsed .client-dot { display: none; }
html.rail-collapsed .rail { padding: 16px 10px; }
html.rail-collapsed .brand { justify-content: center; padding: 2px 0 14px; }
html.rail-collapsed .rail-collapse { display: none; }
html.rail-collapsed .client { justify-content: center; padding: 6px; }
html.rail-collapsed .nav-sec { height: 12px; padding: 0; margin: 4px 0; }
html.rail-collapsed .nav-item { justify-content: center; padding: 10px; }
html.rail-collapsed .nav-item.on { box-shadow: none; }

.notice {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: rgba(255, 218, 130, .08); border: 1px solid rgba(255, 218, 130, .26);
  color: #f4e2bb; border-radius: 10px; padding: 9px 12px; font-size: 11.5px; margin-bottom: 14px;
}
.notice span { display: inline-flex; align-items: center; gap: 8px; }
.notice .ico { width: 14px; height: 14px; color: var(--gold); }
.notice button { background: rgba(0, 0, 0, .22); border: 1px solid rgba(255, 218, 130, .3); color: var(--gold); border-radius: 7px; padding: 5px 10px; font-size: 10.5px; font-weight: 600; }

/* ------------------------------------------------------------- member gate */
.gate {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; overflow: auto;
  background:
    radial-gradient(900px 600px at 12% -5%, rgba(255, 104, 77, .17), transparent 60%),
    radial-gradient(800px 620px at 105% 105%, rgba(255, 218, 130, .12), transparent 62%),
    #0d1116;
}
.gate-card {
  width: 100%; max-width: 430px; background: linear-gradient(180deg, #212731, #1a1f27);
  border: 1px solid var(--line-2); border-radius: 20px; padding: 26px;
  box-shadow: 0 34px 90px rgba(0, 0, 0, .6);
}
.gate-brand { display: flex; gap: 11px; align-items: center; margin-bottom: 18px; }
.gate-brand b { display: block; font-size: 13px; font-weight: 650; }
.gate-brand span { font-size: 8.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--faint); }
.gate h1 { font-size: 23px; margin: 0 0 6px; letter-spacing: -.5px; }
.gate > .gate-card > p { font-size: 11.5px; color: var(--muted); line-height: 1.65; margin: 0 0 16px; }
.gate form { display: flex; flex-direction: column; gap: 10px; }
.gate .fld input { height: 38px; }
.gate .btn { height: 40px; justify-content: center; margin-top: 2px; }
.gate-msg { font-size: 11px; color: var(--red); min-height: 15px; }
.gate-msg.ok { color: var(--green); }
.gate-alt { margin-top: 12px; text-align: center; font-size: 10.5px; color: var(--faint); }
.gate-alt button { background: none; border: 0; color: var(--gold); font-size: 10.5px; padding: 0 0 0 4px; }
.gate-foot { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 9.5px; color: var(--faint); line-height: 1.6; }
html.auth-pending .app { visibility: hidden; }

/* -------------------------------------------------------------- responsive */
@media (max-width: 1320px) {
  .hero-num { font-size: 40px; }
  .search { width: 180px; }
  .mkt-chip { display: none; }
}
@media (max-width: 1180px) {
  .hero { grid-column: span 12; }
  .bot-card { grid-column: span 12; min-height: 210px; }
  .bc-big { font-size: 34px; }
  .bc-rows { grid-template-columns: repeat(3, 1fr); max-width: 420px; }
  .perf { grid-column: span 12; }
  .alloc { grid-column: span 6; }
  .brief { grid-column: span 12; }
  .alert-card { grid-column: span 6; }
  .bot-hero { grid-column: span 12; }
  .policy-card { grid-column: span 6; }
  .chat-card { grid-column: span 12; }
  .decisions-card { grid-column: span 6; }
  .conn-card, .add-conn { grid-column: span 12; }
  .span-7, .span-5, .span-8, .span-4 { grid-column: span 12; }
}
@media (max-width: 900px) {
  :root { --rail-w: 0px; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .rail {
    position: fixed; top: 0; left: 0; bottom: 0; width: 250px; transform: translateX(-102%);
    transition: transform .22s ease; z-index: 96; box-shadow: 20px 0 60px rgba(0, 0, 0, .5);
  }
  body.rail-open .rail { transform: translateX(0); }
  html.rail-collapsed .brand-text, html.rail-collapsed .client-text, html.rail-collapsed .nav-sec span,
  html.rail-collapsed .ni-label, html.rail-collapsed .ni-badge, html.rail-collapsed .ni-count,
  html.rail-collapsed .rail-foot, html.rail-collapsed .client-dot { display: revert; }
  html.rail-collapsed .nav-item { justify-content: flex-start; padding: 8px 10px; }
  html.rail-collapsed .rail-collapse { display: grid; }
  .hamburger { display: grid; }
  .topbar { padding: 0 14px; gap: 10px; }
  .tabs { display: none; }
  .search { width: 150px; }
  .content { padding: 16px 14px 22px; }
  .page-head { flex-direction: column; gap: 10px; }
  .ph-actions { padding-top: 0; width: 100%; }
  .ph-actions .btn { flex: 1; justify-content: center; }
  .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-column: span 12; }
  .bot-card, .perf, .alloc, .brief, .alert-card, .policy-card, .chat-card, .decisions-card { grid-column: span 12; }
  .hero-num { font-size: 34px; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .hero-stats b { font-size: 13px; }
  .chart-wrap { height: 200px; }
  .chart-foot { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .auth-grid { grid-template-columns: 1fr; }
  .svc-detail-stats { grid-template-columns: repeat(2, 1fr); }
  .statusbar .sb-right { display: none; }
  .bot-hero { flex-direction: column; align-items: flex-start; }
  .bh-ring { align-self: center; }
  .svc-grid { grid-template-columns: 1fr 1fr; }
  .modal { padding: 16px; }
  .top-tools .bot-chip-txt small { display: none; }
  .bot-chip { height: 34px; }
}
@media (max-width: 560px) {
  .search { display: none; }
  .hero-num { font-size: 30px; }
  .hero-num .cents { font-size: 16px; }
  .svc-row { grid-template-columns: 1fr 1fr; }
  .svc-row .svc-card.add { grid-column: span 2; }
  .svc-grid { grid-template-columns: 1fr; }
  .mkt-grid { grid-template-columns: 1fr 1fr; }
  .bh-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
  .alerts-panel { width: 100%; }
  .bh-actions .engine-tag { display: none; }
  .chart-foot { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
