/* ============================================================ tokens */
:root {
  --side-bg: #0E1A2B;
  --side-bg-2: #15243A;
  --side-border: #1F3049;
  --side-text: #D5DEEA;
  --side-muted: #8A9BB3;
  --sec-mercado: #9B8CFF;
  --sec-analisis: #2CC9B5;
  --sec-algo: #F0619A;
  --sec-config: #F5B532;
  --sec-plataforma: #8B7CF6;
  --viz-1: #0A8A7A;
  --viz-2: #D9730D;

  --bg: #F3F5F8;
  --surface: #FFFFFF;
  --surface-2: #F7F9FB;
  --border: #E2E7EE;
  --border-strong: #CED6E0;
  --text: #16202E;
  --text-2: #4A5668;
  --muted: #7A8699;
  --accent: #0E7C6F;
  --accent-bg: #D7F2EE;
  --accent-border: #8ED6CB;
  --up: #089981;
  --down: #F23645;
  --warn: #C27C0E;
  --warn-bg: #FFF2D9;
  --err-bg: #FDE4E6;
  --ok-bg: #DDF5EE;
  --info-bg: #E6EEFF;
  --info: #3558C8;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .18);
  --radius: 12px;
  --radius-sm: 8px;
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --chart-bg: #FFFFFF;
  --chart-grid: #F0F3F7;
  --chart-text: #4A5668;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1320; --surface: #111C2C; --surface-2: #0F1928; --border: #1E2D42; --border-strong: #2A3C55;
    --text: #E4EAF2; --text-2: #B1BDCC; --muted: #7D8CA3; --accent: #3CC9B6; --accent-bg: #0F3A37;
    --accent-border: #1E6B62; --warn: #F5B532; --warn-bg: #3A2C0E; --err-bg: #3D1519; --ok-bg: #0E3A31;
    --info-bg: #17284D; --info: #8EA8FF; --shadow: none; --chart-bg: #111C2C; --chart-grid: #182537;
    --chart-text: #B1BDCC; --viz-1: #25A896; --viz-2: #CF742B;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1320; --surface: #111C2C; --surface-2: #0F1928; --border: #1E2D42; --border-strong: #2A3C55;
  --text: #E4EAF2; --text-2: #B1BDCC; --muted: #7D8CA3; --accent: #3CC9B6; --accent-bg: #0F3A37;
  --accent-border: #1E6B62; --warn: #F5B532; --warn-bg: #3A2C0E; --err-bg: #3D1519; --ok-bg: #0E3A31;
  --info-bg: #17284D; --info: #8EA8FF; --shadow: none; --chart-bg: #111C2C; --chart-grid: #182537;
  --chart-text: #B1BDCC; --viz-1: #25A896; --viz-2: #CF742B;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.up { color: var(--up); } .down { color: var(--down); }
.hidden { display: none !important; }

/* ============================================================ layout */
.layout { display: grid; grid-template-columns: 280px 1fr; height: 100vh; }
.layout.collapsed { grid-template-columns: 0 1fr; }
.layout.collapsed .sidebar { transform: translateX(-100%); }
.main { display: flex; flex-direction: column; min-width: 0; height: 100vh; }
.view { flex: 1; overflow: auto; padding: 22px 28px 40px; }
.view.full { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.view-root { display: contents; }                 /* contenedor propio de cada pantalla: no altera el diseño */

/* ============================================================ sidebar */
.sidebar { background: var(--side-bg); color: var(--side-text); display: flex; flex-direction: column; overflow: hidden; transition: transform .2s; z-index: 20; }
.brand { display: flex; gap: 12px; align-items: center; padding: 22px 22px 16px; }
.brand-logo { width: 42px; height: 42px; }
.brand-name { font-weight: 700; font-size: 19px; color: #fff; letter-spacing: -.2px; }
.brand-sub { color: var(--side-muted); font-size: 13px; }
.side-search { margin: 4px 16px 14px; display: flex; align-items: center; gap: 10px; background: var(--side-bg-2); border: 1px solid var(--side-border); border-radius: 10px; padding: 10px 14px; color: var(--side-muted); }
.side-search input { background: transparent; border: 0; outline: 0; color: var(--side-text); width: 100%; }
.side-search input::placeholder { color: var(--side-muted); }
.nav { flex: 1; overflow-y: auto; padding: 4px 0 12px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 24px; color: var(--side-text); text-decoration: none; font-size: 15px; cursor: pointer; border-radius: 10px; margin: 1px 14px; }
.nav-item:hover { background: var(--side-bg-2); }
.nav-sec { margin-top: 6px; }
.sec-head { display: flex; align-items: center; gap: 10px; padding: 9px 20px 9px 12px; cursor: pointer; user-select: none; font-size: 12.5px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; }
.sec-dot { width: 13px; height: 13px; border-radius: 50%; border: 3px solid var(--side-bg-2); box-shadow: 0 0 0 1px currentColor inset; background: currentColor; }
.sec-head .chev { margin-left: auto; color: var(--side-muted); transition: transform .15s; }
.nav-sec.open .chev { transform: rotate(90deg); }
.sec-items { position: relative; margin-left: 18px; padding-left: 0; display: none; }
.nav-sec.open .sec-items { display: block; }
.sec-items::before { content: ""; position: absolute; left: 0; top: 0; bottom: 8px; width: 2px; background: var(--line, #34465f); opacity: .55; }
.sub-item { position: relative; display: flex; white-space: nowrap; align-items: center; gap: 12px; padding: 10px 14px; margin: 3px 14px 3px 18px; border-radius: 10px; color: var(--side-text); text-decoration: none; font-size: 15px; }
.sub-item::before { content: ""; position: absolute; left: -23px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; border: 2px solid var(--line, #34465f); background: var(--side-bg); }
.sub-item:hover { background: var(--side-bg-2); }
.sub-item.active { background: #22324A; font-weight: 600; color: #fff; }
.sub-item.active::before { background: var(--line); border-color: var(--line); width: 10px; height: 10px; left: -24px; margin-top: -5px; }
.sub-item .ico { color: var(--line); }
.sub-item .soon { margin-left: auto; font-size: 10.5px; letter-spacing: .6px; color: var(--side-muted); border: 1px solid var(--side-border); border-radius: 6px; padding: 1px 6px; }
.side-footer { border-top: 1px solid var(--side-border); padding: 14px 16px 16px; }
.account { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #FFD36B, #F5A623); color: #3A2600; display: grid; place-items: center; font-weight: 700; }
.account-name { font-weight: 700; color: #fff; letter-spacing: .4px; }
.conn-list { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.conn-row { display: flex; align-items: center; gap: 8px; }
.conn-row .dot { width: 12px; height: 12px; border-radius: 50%; background: #64748b; box-shadow: 0 0 0 3px rgba(100,116,139,.18); }
.conn-row .dot.ok { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.2); }
.conn-row .dot.err { background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.2); }
.conn-row .name { color: var(--side-text); }
.conn-row .sub { color: var(--side-muted); font-family: var(--mono); font-size: 12px; }
.conn-row .state { margin-left: auto; color: var(--side-muted); font-size: 13px; }

/* ============================================================ topbar */
.topbar { height: 64px; flex: none; display: flex; align-items: center; gap: 18px; padding: 0 22px; background: var(--surface); border-bottom: 1px solid var(--border); }
.icon-btn { background: none; border: 0; padding: 8px; border-radius: 8px; cursor: pointer; color: var(--text); display: grid; place-items: center; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn .ico { width: 22px; height: 22px; }
.crumbs { font-size: 19px; color: var(--text-2); display: flex; gap: 10px; align-items: center; }
.crumbs b { color: var(--text); font-weight: 600; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.avatar-top { width: 42px; height: 42px; }
.pill-btn { border: 1px solid var(--border-strong); background: var(--surface); border-radius: 999px; padding: 8px 12px; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.pill-btn:hover { background: var(--surface-2); }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: #94a3b8; }
.live-dot.on { background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.18); }

/* ============================================================ components */
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; margin: 0; font-weight: 600; letter-spacing: -.2px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.page-head .actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }

.kpis { display: grid; grid-template-columns: repeat(6, 1fr); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 22px; overflow: hidden; }
.kpi { padding: 18px 22px; border-left: 1px solid var(--border); min-width: 0; }
.kpi:first-child { border-left: 0; }
.kpi .v { font-size: 30px; font-weight: 500; font-family: var(--mono); letter-spacing: -.5px; }
.kpi .l { color: var(--text-2); margin-top: 4px; font-size: 14.5px; }
.kpi .v.ok { color: var(--up); } .kpi .v.bad { color: var(--down); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; gap: 12px; padding: 18px 22px 6px; }
.card-h h2, .card-h h3 { margin: 0; font-size: 18px; font-weight: 600; }
.card-h .sub { color: var(--muted); font-size: 13.5px; }
.card-h .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-b { padding: 12px 22px 20px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); gap: 22px; align-items: start; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(430px, 1fr)); gap: 18px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

.btn { border: 1px solid var(--border-strong); background: var(--surface); padding: 9px 16px; border-radius: 10px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-weight: 500; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--down); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn .ico { width: 16px; height: 16px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--border-strong); background: var(--surface); border-radius: 999px; padding: 6px 14px; cursor: pointer; font-size: 14.5px; color: var(--text-2); display: inline-flex; gap: 6px; align-items: center; user-select: none; }
.chip:hover { border-color: var(--accent-border); }
.chip.on { background: var(--accent-bg); border-color: var(--accent); color: var(--text); font-weight: 500; }
.chip.sm { padding: 3px 10px; font-size: 13px; }
.chip.disabled { opacity: .45; cursor: not-allowed; }

.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; padding: 2px 9px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); font-family: var(--mono); }
.badge { font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; padding: 3px 9px; border-radius: 7px; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--up); }
.badge.err { background: var(--err-bg); color: var(--down); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.perp { background: #F3E8FF; color: #7C3AED; }
:root[data-theme="dark"] .badge.perp { background: #2A1C46; color: #C4A8FF; }

.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12.5px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-2); padding: 12px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 12px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover td { background: var(--surface-2); }
.sym { color: var(--accent); font-weight: 600; font-size: 15.5px; font-family: var(--mono); }
.sym-sub { color: var(--muted); font-size: 13px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: 12.5px; color: var(--muted); }
.input, select.input { border: 1px solid var(--border-strong); background: var(--surface); border-radius: 10px; padding: 10px 12px; outline: none; width: 100%; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.input.sm { padding: 5px 8px; border-radius: 8px; font-size: 13px; }
.search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 10px; padding: 0 12px; color: var(--muted); }
.search input { border: 0; outline: 0; background: transparent; padding: 10px 0; width: 100%; color: var(--text); }
.search.big input { padding: 14px 0; font-size: 16px; }

.switch { position: relative; width: 40px; height: 22px; flex: none; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--border-strong); border-radius: 999px; cursor: pointer; transition: .15s; }
.switch span::after { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(18px); }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty h3 { color: var(--text); margin: 8px 0 6px; font-weight: 600; }
.empty .btn { margin-top: 14px; }

/* pattern-like list cards (como la foto) */
.lcard { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--border-strong); border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow); }
.lcard.ok { border-left-color: var(--up); } .lcard.err { border-left-color: var(--down); } .lcard.off { opacity: .7; }
.lcard-h { display: flex; align-items: center; gap: 12px; }
.lcard-h h3 { margin: 0; font-size: 17px; font-weight: 600; }
.lcard-h .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.lcard p { color: var(--text-2); margin: 8px 0 10px; }
.ex-logo { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; color: #1d1300; background: #F3BA2F; flex: none; text-transform: uppercase; }
.market-rows { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.market-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.market-row .lbl { font-weight: 500; }
.market-row .desc { color: var(--muted); font-size: 12.5px; }
.market-row .q { margin-left: auto; width: 150px; }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tab { padding: 10px 16px; cursor: pointer; border-bottom: 2px solid transparent; color: var(--text-2); white-space: nowrap; font-weight: 500; }
.tab.on { border-color: var(--accent); color: var(--text); }
.tab .count { font-size: 12px; color: var(--muted); margin-left: 4px; }

/* moneda seguida */
.inst { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 14px 16px; }
.inst + .inst { margin-top: 12px; }
.inst-h { display: flex; align-items: center; gap: 10px; }
.inst-h .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.tf-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 6px; }
.tf-chip { border: 1px solid var(--border-strong); background: var(--surface); border-radius: 8px; padding: 4px 9px; font-family: var(--mono); font-size: 13px; cursor: pointer; color: var(--text-2); min-width: 40px; text-align: center; }
.tf-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.tf-chip:hover:not(.on) { border-color: var(--accent); }
.tf-table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-top: 6px; }
.tf-table th { text-align: left; font-weight: 600; font-size: 11.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); padding: 6px 8px; }
.tf-table td { padding: 5px 8px; border-top: 1px solid var(--border); }
.tf-table .days { width: 76px; }
.tf-table .badge { font-size: 10px; letter-spacing: .4px; padding: 2px 6px; }
.catalog { max-height: calc(100vh - 330px); overflow: auto; border-top: 1px solid var(--border); }
.catalog .tbl td { padding: 9px 10px; }
.catalog .tbl th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.check { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; }

.progress { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--border); }
.progress > div { height: 100%; background: var(--accent); }

/* ============================================================ chart view */
.chart-bar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.sym-btn { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border-strong); border-radius: 10px; padding: 7px 12px; background: var(--surface); cursor: pointer; }
.sym-btn .s { font-weight: 700; font-family: var(--mono); font-size: 15.5px; }
.tf-bar { display: flex; gap: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.tf-bar button { border: 0; background: transparent; padding: 5px 9px; border-radius: 7px; cursor: pointer; font-family: var(--mono); font-size: 13px; color: var(--text-2); }
.tf-bar button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); font-weight: 600; outline: 1px solid var(--border-strong); }
.tf-bar button:disabled { opacity: .35; cursor: not-allowed; }
.price-box { display: flex; align-items: baseline; gap: 10px; margin-left: 6px; }
.price-box .p { font-family: var(--mono); font-size: 20px; font-weight: 500; }
.ind-chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 16px; background: var(--surface); border-bottom: 1px solid var(--border); min-height: 42px; align-items: center; }
.ind-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface-2); border-radius: 8px; padding: 3px 4px 3px 10px; font-size: 13px; }
.ind-chip .sw { width: 10px; height: 10px; border-radius: 3px; }
.ind-chip button { border: 0; background: transparent; cursor: pointer; color: var(--muted); padding: 2px 4px; border-radius: 5px; display: grid; place-items: center; }
.ind-chip button:hover { background: var(--border); color: var(--text); }
.chart-wrap { position: relative; flex: 1; min-height: 300px; background: var(--chart-bg); }
#chart { position: absolute; inset: 0; }
.legend { position: absolute; left: 14px; top: 10px; z-index: 5; pointer-events: none; font-family: var(--mono); font-size: 12.5px; color: var(--chart-text); display: flex; flex-direction: column; gap: 3px; }
.legend .t { font-family: var(--font); font-weight: 600; color: var(--text); font-size: 14px; }
.legend .ohlc span { margin-right: 10px; }
.chart-status { position: absolute; right: 70px; top: 10px; z-index: 5; font-size: 12px; }
.loading-more { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); z-index: 6; }

.dropdown { position: absolute; z-index: 60; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: var(--shadow-lg); width: 460px; max-height: 70vh; display: flex; flex-direction: column; }
.dropdown .list { overflow: auto; padding: 6px; }
.dd-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.dd-item:hover, .dd-item.sel { background: var(--surface-2); }
.dd-item .s { font-family: var(--mono); font-weight: 600; }

/* ============================================================ modal + toast */
.modal-bg { position: fixed; inset: 0; background: rgba(8, 14, 24, .55); display: grid; place-items: center; z-index: 100; padding: 16px; }
.modal { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); width: min(620px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; border: 1px solid var(--border); }
.modal.wide { width: min(900px, 100%); }
.modal-h { display: flex; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-h h3 { margin: 0; font-size: 18px; }
.modal-b { padding: 18px 22px; overflow: auto; }
.modal-f { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 200; }
.toast { background: var(--side-bg); color: #fff; padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); max-width: 420px; border-left: 4px solid var(--accent); animation: tin .2s; }
.toast.err { border-left-color: var(--down); }
@keyframes tin { from { transform: translateY(10px); opacity: 0; } }

.ind-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.ind-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.ind-card h4 { margin: 0; font-size: 15.5px; }
.ind-card p { margin: 0; color: var(--text-2); font-size: 13.5px; }
.ind-card .outs { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); }
.ind-card .outs i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.ind-card .foot { margin-top: auto; display: flex; gap: 8px; align-items: center; }
.ind-pick { display: flex; flex-direction: column; gap: 4px; max-height: 50vh; overflow: auto; }
.ind-pick .dd-item small { color: var(--muted); margin-left: auto; }
pre.code { background: var(--side-bg); color: #D5DEEA; padding: 14px 16px; border-radius: 10px; overflow: auto; font-family: var(--mono); font-size: 13px; line-height: 1.55; }

.spark { width: 120px; height: 32px; }

@media (max-width: 1200px) { .kpis { grid-template-columns: repeat(3, 1fr); } .kpi:nth-child(4) { border-left: 0; } .kpi:nth-child(n+4) { border-top: 1px solid var(--border); } .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 280px; transform: translateX(-100%); }
  .layout.mobile-open .sidebar { transform: none; }
  .view { padding: 16px; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kpi { border-left: 0 !important; border-top: 1px solid var(--border); }
  .grid-cards { grid-template-columns: 1fr; }
  .dropdown { width: calc(100vw - 32px); }
}

/* ============================================================ estrategias */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 16px; }
.alert { border-radius: 10px; padding: 11px 14px; margin-bottom: 12px; border: 1px solid var(--border); font-size: 14px; }
.alert.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.alert.err { background: var(--err-bg); color: var(--down); border-color: transparent; }
.sec-title { font-size: 12.5px; font-weight: 600; letter-spacing: 1.1px; text-transform: uppercase; color: var(--text-2); margin: 4px 2px 8px; }
.tbl.compact th { padding: 9px 6px; font-size: 11px; letter-spacing: .8px; }
.tbl.compact td { padding: 7px 6px; font-size: 13.5px; }
.tbl.compact .btn.sm { padding: 3px 8px; }
.tbl tr.hl td { background: var(--accent-bg); }
.bar-row { display: grid; grid-template-columns: minmax(110px, 1.1fr) 2fr 52px; gap: 10px; align-items: center; padding: 5px 0; font-size: 13.5px; }
.bar-row .num { text-align: right; }
.bar { position: relative; height: 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.bar > div { height: 100%; border-radius: 999px; background: var(--accent); max-width: 100%; }
.bar > i { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--text); border-radius: 2px; }
.prob-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.prob { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 8px; }
.prob:hover { border-color: var(--accent-border); }
.steps { display: flex; gap: 4px; }
.steps i { width: 16px; height: 8px; border-radius: 3px; background: var(--border-strong); }
.steps i.on { background: var(--accent); }
.chip .live-dot { width: 8px; height: 8px; }
.tbl.compact td.num, .tbl.compact td b { white-space: nowrap; }
a.btn { text-decoration: none; color: var(--text); }
a.btn.primary { color: #fff; }

/* backtest: operaciones en el gráfico */
.tc-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 400px; border-top: 1px solid var(--border); }
.tc-chart { position: relative; height: 760px; background: var(--chart-bg); border-radius: 0 0 0 var(--radius); overflow: hidden; }
#tchart { position: absolute; inset: 0; }
.tc-side { border-left: 1px solid var(--border); padding: 16px 18px; overflow: auto; height: 760px; }
.tc-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tc-kpis > div { border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; display: flex; flex-direction: column; gap: 2px; }
.tc-kpis span { font-size: 12px; color: var(--muted); }
.tc-kpis b { font-family: var(--mono); font-weight: 500; font-size: 15px; }
.tc-ind { display: flex; gap: 10px; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.tc-ind .num { text-align: right; }
@media (max-width: 1100px) { .tc-wrap { grid-template-columns: 1fr; } .tc-side { border-left: 0; border-top: 1px solid var(--border); height: auto; } .tc-chart { height: 520px; } }
.tc-side .tbl tr.sub td { border-bottom: 1px solid var(--border); padding-top: 0; font-size: 12px; font-family: var(--mono); white-space: normal; }
.tc-side .tbl tr:has(+ tr.sub) td { border-bottom: 0; padding-bottom: 2px; }
.tc-ind .num div { white-space: nowrap; }

/* matriz de correlación */
.corr-m { border-collapse: separate; border-spacing: 3px; font-family: var(--mono); font-size: 12.5px; }
.corr-m th { font-weight: 500; color: var(--text-2); padding: 4px 6px; text-align: center; white-space: nowrap; }
.corr-m th.ref { color: var(--accent); font-weight: 700; }
.corr-m td { min-width: 50px; height: 34px; text-align: center; border-radius: 6px; border: 1px solid var(--border); }

/* indicadores con series de parámetros */
.ind-row { display: flex; align-items: flex-start; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.ind-row:last-child { border-bottom: 0; }
.ind-name { width: 92px; flex: none; }
.ind-sets { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rank-tag { display: inline-block; font-family: var(--mono); font-size: 12px; padding: 1px 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); margin: 1px 2px 1px 0; white-space: nowrap; }

/* pestañas verticales (configuración de estrategia) */
.vtabs { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 22px; align-items: start; }
.vtab-nav { padding: 8px; position: sticky; top: 0; display: flex; flex-direction: column; gap: 2px; }
.vtab { display: flex; gap: 12px; align-items: flex-start; padding: 11px 12px; border-radius: 10px; cursor: pointer; border-left: 3px solid transparent; color: var(--text-2); }
.vtab:hover { background: var(--surface-2); }
.vtab.on { background: var(--accent-bg); border-left-color: var(--accent); color: var(--text); }
.vtab .ico { margin-top: 2px; color: var(--accent); }
.vtab .t { font-weight: 600; color: var(--text); }
.vtab .s { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.vdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--down); margin-left: 4px; vertical-align: 1px; }
.vtab-body section { display: none; }
.vtab-body section.on { display: block; }
@media (max-width: 1000px) { .vtabs { grid-template-columns: 1fr; } .vtab-nav { position: static; flex-direction: row; overflow-x: auto; } .vtab { min-width: 190px; border-left: 0; border-bottom: 3px solid transparent; } .vtab.on { border-bottom-color: var(--accent); } }

/* backtest: gráfico en pantalla completa */
.tc-full { position: fixed; inset: 0; z-index: 90; margin: 0 !important; border-radius: 0; border: 0; display: flex; flex-direction: column; background: var(--surface); overflow: hidden; }
.tc-full .tc-wrap { flex: 1; min-height: 0; grid-template-columns: minmax(0, 1fr) 420px; }
.tc-full .tc-chart, .tc-full .tc-side { height: 100%; border-radius: 0; }
.bell-off { opacity: .45; }

/* ===================================================== asistente IA */
.ia { flex: 1; min-height: 0; display: grid; grid-template-columns: 250px minmax(0, 1fr) 330px; }
.ia-list { border-right: 1px solid var(--border); background: var(--surface); overflow-y: auto; }
.ia-chat { display: block; padding: 10px 14px; border-left: 3px solid transparent; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--border); }
.ia-chat:hover { background: var(--surface-2); }
.ia-chat.on { background: var(--accent-bg); border-left-color: var(--accent); }
.ia-chat .t { font-size: 14px; font-weight: 500; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ia-chat .s { font-size: 12px; color: var(--muted); margin-top: 3px; }
.ia-chat .live-dot { display: inline-block; width: 8px; height: 8px; }
.ia-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.ia-msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 22px max(22px, calc((100% - 820px) / 2)); }
.ia-input { border-top: 1px solid var(--border); background: var(--surface); padding: 12px max(22px, calc((100% - 820px) / 2)); }
.ia-input textarea { flex: 1; resize: none; min-height: 52px; max-height: 180px; font-family: var(--font); line-height: 1.45; }
.ia-side { border-left: 1px solid var(--border); background: var(--surface); overflow-y: auto; padding: 18px; font-size: 14px; }
.ia-side .btn { justify-content: center; }
.msg { display: flex; margin: 10px 0; }
.msg.user { justify-content: flex-end; }
.bubble { max-width: 100%; line-height: 1.55; font-size: 15px; min-width: 0; }
.msg.user .bubble { background: var(--accent-bg); border: 1px solid var(--accent-border); border-radius: 14px 14px 4px 14px; padding: 9px 14px; max-width: 82%; }
.bubble p { margin: 0 0 9px; } .bubble p:last-child { margin-bottom: 0; }
.bubble ul, .bubble ol { margin: 0 0 9px; padding-left: 22px; } .bubble li { margin: 3px 0; }
.bubble code { font-family: var(--mono); font-size: 13px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 0 5px; }
.bubble pre.code { margin: 0 0 9px; }
.bubble .tbl { margin-bottom: 9px; }
.bubble.thinking { color: var(--muted); display: inline-flex; align-items: center; gap: 9px; }
.md-h { font-weight: 600; margin: 14px 0 6px; } .md-h1, .md-h2 { font-size: 17px; } .md-h3, .md-h4 { font-size: 15.5px; }
details.tool { border: 1px solid var(--border); border-radius: 9px; background: var(--surface); margin: 6px 0; font-size: 13.5px; }
details.tool summary { cursor: pointer; padding: 7px 12px; display: flex; align-items: center; gap: 9px; color: var(--text-2); list-style: none; }
details.tool summary::-webkit-details-marker { display: none; }
details.tool summary .ico { width: 15px; height: 15px; color: var(--up); flex: none; }
details.tool.err summary .ico { color: var(--down); }
details.tool[open] summary { border-bottom: 1px solid var(--border); }
.tool-b { padding: 10px 12px; }
.tool-b pre.code { max-height: 260px; font-size: 12px; margin: 4px 0 10px; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border-strong); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.ia-empty { max-width: 620px; margin: 8vh auto 0; text-align: center; color: var(--text-2); }
.ia-empty > .ico { width: 40px; height: 40px; color: var(--accent); }
.ia-empty h3 { margin: 10px 0 6px; font-size: 20px; color: var(--text); }
.ia-sugs { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.ia-sugs .chip { border-radius: 10px; text-align: left; padding: 10px 14px; line-height: 1.4; font-family: var(--font); }
@media (max-width: 1200px) { .ia { grid-template-columns: 210px minmax(0, 1fr); } .ia-side { display: none; } }
@media (max-width: 760px) { .ia { grid-template-columns: 1fr; } .ia-list { display: none; } }

/* ============================================ ciclo de vida de la estrategia */
.lc-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 14px; }
.lc-steps { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.lc-steps span { padding: 3px 10px; border-radius: 7px; background: var(--surface-2); }
.lc-steps span.on { background: var(--accent); color: #fff; }
.lc-steps i { width: 14px; height: 1px; background: var(--border-strong); }
.is-locked .vtab-body section[data-sec] input, .is-locked .vtab-body section[data-sec] select { pointer-events: none; opacity: .75; }
.is-locked .vtab-body section[data-sec] .chip, .is-locked .vtab-body .ind-chip button { pointer-events: none; }

/* ------------------------------------------ operación en vivo sobre el gráfico */
.op-bar { display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; padding: 8px 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
.op-t { display: flex; align-items: center; gap: 8px; }
.op-c { display: flex; flex-direction: column; line-height: 1.25; }
.op-c span { font-size: 11.5px; color: var(--muted); }
.op-c b { font-family: var(--mono); font-weight: 500; font-size: 14.5px; }
.op-c small { font-size: 12px; color: var(--muted); font-weight: 400; }

/* selector de modo de ejecución */
.mode-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode-opt { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--border-strong); border-radius: 10px; padding: 11px 13px; cursor: pointer; }
.mode-opt.on { border-color: var(--accent); background: var(--accent-bg); }
.mode-opt.disabled { opacity: .6; cursor: not-allowed; }
.mode-opt input { margin-top: 3px; accent-color: var(--accent); }
.mode-opt b { font-size: 15px; }
.mode-opt div > span:last-child { display: block; font-size: 12.5px; color: var(--text-2); margin-top: 3px; line-height: 1.4; }
@media (max-width: 700px) { .mode-pick { grid-template-columns: 1fr; } }
.mode-opt div > span:last-child { font-weight: 400; }

/* ------------------------------------- asistente de IA dentro del editor */
.ai-drawer { position: fixed; top: 64px; right: 0; bottom: 0; width: 460px; max-width: 100vw; z-index: 40; background: var(--bg); border-left: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; }
.ai-h { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
.ai-h > .ico { color: var(--accent); width: 20px; height: 20px; flex: none; }
.ai-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ai-body .ia-msgs { padding: 16px; }
.ai-body .ia-input { padding: 10px 14px; }
.ai-body .bubble { font-size: 14.5px; }
.ai-body .ia-empty { margin-top: 3vh; }
.ai-body .ia-empty h3 { font-size: 17px; }
.view:has(> .ai-open) { padding-right: 488px; }
@media (max-width: 1300px) { .view:has(> .ai-open) { padding-right: 28px; } }

/* solapas horizontales con el mismo contenido que las verticales (icono, título y dato) */
.htabs { display: flex; gap: 4px; padding: 6px; margin-bottom: 18px; overflow-x: auto; }
.htabs .vtab { flex: 1 1 0; min-width: 200px; border-left: 0; border-bottom: 3px solid transparent; }
.htabs .vtab.on { border-bottom-color: var(--accent); }
.htabs .vtab .s { white-space: nowrap; }

/* ---------------------------------------- pools de liquidación: mapas por precio */
.lmap { max-height: 64vh; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; padding: 6px 10px; }
.lm-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) 78px; gap: 10px; align-items: center; padding: 1.5px 4px; border-radius: 5px; cursor: pointer; font-size: 12.5px; }
.lm-row:hover { background: var(--surface-2); }
.lm-row.on { background: var(--accent-bg); outline: 1px solid var(--accent-border); }
.lm-row .p, .pm-row .p { font-family: var(--mono); color: var(--text-2); }
.lm-row .v, .pm-row .v { font-family: var(--mono); text-align: right; }
.lm-row .b, .pm-row .b { height: 11px; display: flex; }
.lm-row .b > div, .pm-row .b > div { height: 100%; border-radius: 3px; min-width: 1px; }
.lm-row.long .b > div, .pm-row .b.l > div, .lm-key.long { background: var(--up); }
.lm-row.short .b > div, .pm-row .b.s > div, .lm-key.short { background: var(--down); }
.lm-key { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; }
.lm-price { position: relative; border-top: 2px dashed var(--text-2); margin: 7px 0; height: 0; }
.lm-price span { position: absolute; right: 8px; top: -11px; background: var(--text); color: var(--surface); font-family: var(--mono); font-size: 12px; padding: 1px 9px; border-radius: 6px; }
.pm-row, .pm-head { display: grid; grid-template-columns: 78px minmax(0, 1fr) 70px minmax(0, 1fr) 78px; gap: 10px; align-items: center; padding: 1.5px 4px; font-size: 12.5px; }
.pm-row .b.l { justify-content: flex-end; }
.pm-row .p { text-align: center; }
.pm-row .v:last-child { text-align: left; }
.pm-head { color: var(--muted); font-size: 11.5px; letter-spacing: .8px; text-transform: uppercase; padding: 0 14px 6px; }
.pm-head span:nth-child(1) { text-align: right; } .pm-head span:nth-child(3) { text-align: center; }

/* heatmap de pools sobre velas */
.heat-wrap { position: relative; height: calc(100vh - 430px); min-height: 440px; background: var(--chart-bg); }
#hchart { position: absolute; inset: 0; }
.heat-tip { position: absolute; z-index: 6; pointer-events: none; width: 250px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 9px 11px; font-size: 12.5px; }
.heat-tip .g { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; margin-top: 6px; }
.heat-tip .g span { color: var(--muted); } .heat-tip .g b { font-family: var(--mono); font-weight: 500; text-align: right; }
.heat-legend { position: absolute; left: 12px; top: 10px; z-index: 5; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--chart-text); background: color-mix(in srgb, var(--chart-bg) 82%, transparent); padding: 4px 9px; border-radius: 8px; pointer-events: none; }
.heat-legend i { display: block; width: 130px; height: 10px; border-radius: 3px; }
.heat-legend b { font-family: var(--mono); font-weight: 500; margin-left: 6px; }
.htabs .vtab > div { min-width: 0; }
.htabs .vtab .t, .htabs .vtab .s { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.htabs .vtab { min-width: 150px; }

/* barra de tiempo usado contra el plazo de la estrategia */
.tbar { height: 5px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; margin: 3px 0; max-width: 170px; }
.tbar > div { height: 100%; background: var(--info); }
.tbar.ok > div { background: var(--up); }
.tbar.late > div { background: var(--warn); }

/* Ejecución › Patrón y estrategia */
.tag.win { background: var(--accent-soft, rgba(79,140,255,.14)); border-color: var(--accent); color: var(--text); }
.tag.off { opacity: .55; }
.mx-row { display: grid; grid-template-columns: minmax(90px, 140px) 1fr; gap: 12px; align-items: start; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.mx-row:last-child { border-bottom: 0; }
@media (max-width: 900px) { [data-xsec="patron"] .tc-kpis { grid-template-columns: 1fr 1fr !important; } }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.lbl-sm { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }
.htabs .vtab .t, .htabs .vtab .s { white-space: normal; overflow: visible; text-overflow: clip; }

/* Plataforma › Errores */
.tbl th.sort { cursor: pointer; user-select: none; }
.tbl th.sort:hover, .tbl th.sort.on { color: var(--text); }
.tbl.errs td { vertical-align: top; }
.tbl.errs .emsg { min-width: 240px; max-width: 560px; }
.tbl.errs .emsg > div:first-child { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.tbl.errs .emsg .sym-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pager { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--border); font-size: 13.5px; }
.emsg-full { font-size: 15px; font-weight: 500; word-break: break-word; white-space: pre-wrap; }
pre.code.trace { max-height: 46vh; white-space: pre; font-size: 12.5px; margin: 0; }

/* Plataforma › Performance */
.pchart { position: relative; }
.pchart svg { display: block; max-width: 100%; }
.pchart .cg { stroke: var(--chart-grid); stroke-width: 1; }
.pchart .ct { fill: var(--muted); font-size: 11.5px; font-family: var(--mono); }
.pchart .cx { stroke: var(--border-strong); stroke-width: 1; pointer-events: none; }
.ctip { position: absolute; z-index: 2; pointer-events: none; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; box-shadow: var(--shadow-lg); padding: 7px 10px; font-size: 12.5px; white-space: nowrap; color: var(--text-2); }
.ctip .tt { color: var(--muted); margin-bottom: 3px; }
.ctip b { color: var(--text); font-family: var(--mono); font-weight: 500; margin-left: 4px; }
.ctip i, .clegend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; }
.clegend { display: flex; gap: 14px; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; }

/* Mercado › Funding: el signo de la tasa (no es ganancia ni pérdida) */
.fpos { color: var(--viz-1); } .fneg { color: var(--viz-2); }

/* Ejecución › Probabilidad ahora */
.prob.over { border-color: var(--accent-border); background: var(--accent-bg); }
.chip[data-pg] { cursor: pointer; }
.pdist { position: relative; display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; height: 150px; padding-top: 22px; }
.pd-col { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; height: 100%; }
.pd-col .num { font-size: 12px; color: var(--text-2); margin-bottom: 3px; }
.pd-col em { font-style: normal; font-size: 11.5px; color: var(--muted); font-family: var(--mono); margin-top: 5px; white-space: nowrap; }
.pd-bar { width: min(100%, 64px); border-radius: 4px 4px 0 0; background: var(--border-strong); }
.pd-bar.on { background: var(--viz-1); }
.pd-thr { position: absolute; top: 0; bottom: 20px; width: 0; border-left: 2px dashed var(--text); }
.pd-thr b { position: absolute; top: 0; left: 6px; font: 500 11.5px var(--font); color: var(--text); white-space: nowrap; }
.prob.busy { background: var(--surface-2); }
