/* Bot Trading - Terminal v2 (SOLO presentacion). Reproduce la maqueta de referencia.
   Escala: --u = 1 a 1642x958 (tamano nativo de la maqueta); crece/decrece con el viewport. */
html.bts-on {
  --u: min(calc(100vw / 1642), calc(100vh / 958));
  --bts-bg: #000a15;
  --bts-side: #050e1a;
  --bts-box: #070f1c;
  --bts-box2: #08111e;
  --bts-line: #122033;
  --bts-line2: #1a2940;
  --bts-text: #e6edf5;
  --bts-text2: #c4cdd9;
  --bts-muted: #8ea2b8;
  --bts-dim: #6f8299;
  --bts-green: #22d37b;
  --bts-green-b: #00c44b;
  --bts-red: #ff4d5a;
  --bts-yellow: #feb901;
  --bts-brand: #ffe81a;
  --bts-blue: #2f8cff;
  --bts-blue-bg: #072546;
  --bts-blue-b: #1f64b0;
  --bts-purple: #b98cff;
  --bts-cyan: #38bdf8;
}
html.bts-on, html.bts-on body { overflow: hidden !important; background: var(--bts-bg) !important; }
html.bts-on body::before { display: none !important; }
/* FreqUI sigue montado debajo (funciones, modales, sockets), pero oculto */
html.bts-on #app { visibility: hidden !important; }
#bt-shell { display: none; }
html.bts-on #bt-shell {
  display: grid; position: fixed; inset: 0; z-index: 0;
  grid-template-columns: calc(208 * var(--u, 1px)) minmax(0, 1fr);
  grid-template-rows: calc(58 * var(--u, 1px)) minmax(0, 1fr) calc(41 * var(--u, 1px));
  grid-template-areas: "hdr hdr" "side main" "stat stat";
  background: var(--bts-bg); color: var(--bts-text);
  font-family: "Inter", "Segoe UI", -apple-system, Roboto, Helvetica, Arial, sans-serif;
  font-size: calc(13 * var(--u, 1px)); line-height: 1.25; -webkit-font-smoothing: antialiased;
  visibility: visible;
}
#bt-shell * { box-sizing: border-box; }
:where(#bt-shell svg) { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:where(#bt-shell button) { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; margin: 0; }
:where(#bt-shell button:disabled, #bt-shell .bts-inert) { cursor: default; }
#bt-shell .pos { color: var(--bts-green) !important; }
#bt-shell .neg { color: var(--bts-red) !important; }

/* ================= HEADER ================= */
.bts-hdr { grid-area: hdr; display: flex; align-items: center; background: #010b16; border-bottom: 1px solid #0d1a2a; padding: 0 calc(16 * var(--u, 1px)) 0 calc(18 * var(--u, 1px)); min-width: 0; }
.bts-brand { display: flex; align-items: center; gap: calc(12 * var(--u, 1px)); font-weight: 800; font-size: calc(20.5 * var(--u, 1px)); color: var(--bts-brand); letter-spacing: calc(-0.2 * var(--u, 1px)); white-space: nowrap; cursor: pointer; }
.bts-brand svg { font-size: calc(25 * var(--u, 1px)); color: var(--bts-cyan); stroke-width: 2.2; }
.bts-brand svg .l2 { stroke: #f59e0b; }
.bts-pill { margin-left: calc(36 * var(--u, 1px)); display: inline-flex; align-items: center; gap: calc(7 * var(--u, 1px)); height: calc(22 * var(--u, 1px)); padding: 0 calc(11 * var(--u, 1px)); border-radius: calc(11 * var(--u, 1px)); background: #003b27; border: 1px solid #0a7a45; color: #3ee985; font-size: calc(10.5 * var(--u, 1px)); font-weight: 800; letter-spacing: calc(0.3 * var(--u, 1px)); white-space: nowrap; }
.bts-pill i { width: calc(7 * var(--u, 1px)); height: calc(7 * var(--u, 1px)); border-radius: 50%; background: #22e36b; box-shadow: 0 0 calc(6 * var(--u, 1px)) #22e36b; }
.bts-pill.real { background: #3a0d12; border-color: #ff4d5e; color: #ffd2d6; box-shadow: 0 0 0 1px rgba(255,77,94,.35), 0 0 calc(10 * var(--u, 1px)) rgba(255,77,94,.35); }
.bts-pill.real i { background: #ffb020; box-shadow: 0 0 calc(7 * var(--u, 1px)) #ffb020; animation: bts-blink 1.2s ease-in-out infinite; }
.bts-pill.unk { background: #1b2433; border-color: #334155; color: #94a3b8; } .bts-pill.unk i { background: #64748b; box-shadow: none; }
@keyframes bts-blink { 50% { opacity: .35; } }
.bts-hdr-r { margin-left: auto; display: flex; align-items: center; gap: calc(14 * var(--u, 1px)); }
.bts-bot { display: inline-flex; align-items: center; gap: calc(8 * var(--u, 1px)); font-size: calc(13 * var(--u, 1px)); color: #e6edf5; height: calc(34 * var(--u, 1px)); padding: 0 calc(8 * var(--u, 1px)); border-radius: calc(6 * var(--u, 1px)); white-space: nowrap; }
.bts-bot i { width: calc(9 * var(--u, 1px)); height: calc(9 * var(--u, 1px)); border-radius: 50%; background: #22e36b; box-shadow: 0 0 calc(6 * var(--u, 1px)) rgba(34,227,107,.7); }
.bts-bot.off i { background: var(--bts-red); box-shadow: none; }
.bts-bot svg { font-size: calc(15 * var(--u, 1px)); color: #aab8c8; margin-left: calc(6 * var(--u, 1px)); }
.bts-ibtn { width: calc(34 * var(--u, 1px)); height: calc(34 * var(--u, 1px)); display: inline-flex; align-items: center; justify-content: center; border-radius: calc(7 * var(--u, 1px)); background: #0c1624; border: 1px solid #16243a; color: #e6edf5; }
.bts-ibtn svg { font-size: calc(17 * var(--u, 1px)); }
.bts-ibtn.flat { background: none; border-color: transparent; }
.bts-ibtn.flat svg { fill: #e6edf5; stroke: none; }
.bts-ft { display: inline-flex; align-items: center; gap: calc(4 * var(--u, 1px)); height: calc(34 * var(--u, 1px)); padding: 0 calc(6 * var(--u, 1px)); font-weight: 700; font-size: calc(13 * var(--u, 1px)); }
.bts-ft span { display: inline-flex; align-items: center; justify-content: center; }
.bts-ft svg { font-size: calc(12 * var(--u, 1px)); color: #aab8c8; }

/* ================= SIDEBAR ================= */
.bts-side { grid-area: side; background: var(--bts-side); border-right: 1px solid #0e1b2b; display: flex; flex-direction: column; padding: calc(14 * var(--u, 1px)) calc(8 * var(--u, 1px)) calc(10 * var(--u, 1px)) calc(10 * var(--u, 1px)); min-height: 0; overflow: hidden; }
.bts-stitle { font-size: calc(11.5 * var(--u, 1px)); font-weight: 700; color: #8fa6c0; letter-spacing: calc(0.4 * var(--u, 1px)); margin: calc(2 * var(--u, 1px)) calc(4 * var(--u, 1px)) calc(10 * var(--u, 1px)); text-transform: uppercase; }
.bts-search { display: flex; align-items: center; gap: calc(9 * var(--u, 1px)); height: calc(34 * var(--u, 1px)); border: 1px solid #1c2a3f; border-radius: calc(7 * var(--u, 1px)); background: #070f1c; padding: 0 calc(10 * var(--u, 1px)); margin: 0 calc(2 * var(--u, 1px)) calc(10 * var(--u, 1px)); color: #7890aa; }
.bts-search svg { font-size: calc(15 * var(--u, 1px)); }
.bts-search input { all: unset; flex: 1; min-width: 0; font-size: calc(13 * var(--u, 1px)); color: #dfe6ee; }
.bts-search input::placeholder { color: #71869e; }
.bts-pairs { display: flex; flex-direction: column; gap: calc(2 * var(--u, 1px)); overflow-y: auto; min-height: 0; flex: 0 1 auto; margin-bottom: calc(14 * var(--u, 1px)); }
.bts-pair { display: flex; align-items: center; gap: calc(10 * var(--u, 1px)); height: calc(40 * var(--u, 1px)); padding: 0 calc(8 * var(--u, 1px)) 0 calc(7 * var(--u, 1px)); border-radius: calc(7 * var(--u, 1px)); border: 1px solid transparent; font-size: calc(13.5 * var(--u, 1px)); color: #e3eaf1; cursor: pointer; position: relative; }
.bts-pair:hover { background: #0a1626; }
.bts-pair.on { background: var(--bts-blue-bg); border-color: #0f3d70; }
.bts-pair.on::before { content: ""; position: absolute; left: -1px; top: calc(6 * var(--u, 1px)); bottom: calc(6 * var(--u, 1px)); width: calc(3 * var(--u, 1px)); border-radius: calc(2 * var(--u, 1px)); background: var(--bts-blue); }
.bts-pair .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bts-pair .nm small { font-size: .82em; color: var(--bts-muted); margin-left: calc(1 * var(--u, 1px)); }
.bts-pair .ch { font-size: calc(12.5 * var(--u, 1px)); font-variant-numeric: tabular-nums; color: var(--bts-muted); }
.bts-coin { width: calc(24 * var(--u, 1px)); height: calc(24 * var(--u, 1px)); border-radius: calc(6 * var(--u, 1px)); display: inline-flex; align-items: center; justify-content: center; font-size: calc(13 * var(--u, 1px)); font-weight: 800; color: #fff; flex: none; background: #334155; }
.bts-coin.r { border-radius: 50%; }
.bts-coin.btc { background: #f7931a; } .bts-coin.eth { background: #c9cde8; color: #3c3c5c; border-radius: 50%; }
.bts-coin.sol { background: #0b0b14; border-radius: 50%; color: #19fb9b; } .bts-coin.xrp { background: #111; border-radius: 50%; }
.bts-coin.ada { background: #0d5bd7; border-radius: 50%; } .bts-coin.gen { background: #24324a; border-radius: 50%; }
.bts-menu { display: flex; flex-direction: column; gap: calc(2 * var(--u, 1px)); margin-bottom: calc(14 * var(--u, 1px)); }
.bts-mi { display: flex; align-items: center; gap: calc(12 * var(--u, 1px)); height: calc(38 * var(--u, 1px)); padding: 0 calc(8 * var(--u, 1px)); border-radius: calc(7 * var(--u, 1px)); color: #d4dce6; font-size: calc(13.5 * var(--u, 1px)); text-align: left; width: 100%; }
.bts-mi svg { font-size: calc(18 * var(--u, 1px)); color: #b9c6d4; stroke-width: 1.6; }
.bts-mi:not(.bts-inert):hover { background: #0a1626; color: #fff; }
.bts-mi.bts-inert { opacity: 0.92; }
.bts-bstate { margin-top: auto; border: 1px solid #0b4a86; background: #04152b; border-radius: calc(8 * var(--u, 1px)); padding: calc(11 * var(--u, 1px)) calc(12 * var(--u, 1px)) calc(10 * var(--u, 1px)); font-size: calc(11.5 * var(--u, 1px)); }
.bts-bc-h { display: flex; align-items: flex-start; gap: calc(10 * var(--u, 1px)); padding-bottom: calc(10 * var(--u, 1px)); border-bottom: 1px solid #10365f; margin-bottom: calc(8 * var(--u, 1px)); }
.bts-bc-h i { width: calc(17 * var(--u, 1px)); height: calc(17 * var(--u, 1px)); border-radius: 50%; background: #11a44a; flex: none; margin-top: calc(1 * var(--u, 1px)); display: inline-flex; align-items: center; justify-content: center; }
.bts-bc-h i::after { content: ""; width: calc(5 * var(--u, 1px)); height: calc(7 * var(--u, 1px)); border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: #d7ffe6; }
.bts-bc-h .t { color: #c4cdd9; font-size: calc(11.5 * var(--u, 1px)); }
.bts-bc-h .s { color: #22e36b; font-weight: 800; font-size: calc(13 * var(--u, 1px)); margin-top: calc(3 * var(--u, 1px)); }
.bts-bc-h .s.off { color: var(--bts-red); }
.bts-bc-r { display: flex; justify-content: space-between; gap: calc(6 * var(--u, 1px)); padding: calc(3.5 * var(--u, 1px)) 0; color: #c8d2de; white-space: nowrap; }
.bts-bc-r b { font-weight: 400; color: #eef3f8; overflow: hidden; text-overflow: ellipsis; }
.bts-bc-r b.blue { color: #3aa0ff; font-weight: 700; }

/* ================= MAIN ================= */
.bts-main { grid-area: main; display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: calc(3 * var(--u, 1px)) calc(6 * var(--u, 1px)) 0 calc(11 * var(--u, 1px)); gap: calc(6 * var(--u, 1px)); }
.bts-topbox { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; border: 1px solid #0c5a3a; border-radius: calc(8 * var(--u, 1px)); padding: 0 calc(5 * var(--u, 1px)) calc(5 * var(--u, 1px)) calc(5 * var(--u, 1px)); gap: calc(6 * var(--u, 1px)); }
.bts-ctrl { flex: 0 0 auto; display: flex; align-items: center; gap: calc(12 * var(--u, 1px)); height: calc(62 * var(--u, 1px)); padding: calc(10 * var(--u, 1px)) calc(4 * var(--u, 1px)) 0 calc(3 * var(--u, 1px)); min-width: 0; }
.bts-sel { position: relative; display: flex; align-items: center; justify-content: space-between; gap: calc(10 * var(--u, 1px)); width: calc(214 * var(--u, 1px)); height: calc(34 * var(--u, 1px)); padding: 0 calc(10 * var(--u, 1px)) 0 calc(12 * var(--u, 1px)); border: 1px solid #1f3a33; border-radius: calc(6 * var(--u, 1px)); background: #08111d; font-size: calc(13 * var(--u, 1px)); color: #fff; white-space: nowrap; }
.bts-sel label { position: absolute; left: calc(7 * var(--u, 1px)); top: calc(-8 * var(--u, 1px)); font-size: calc(8.5 * var(--u, 1px)); color: #8ea2b8; background: var(--bts-bg); padding: 0 calc(3 * var(--u, 1px)); line-height: 1.2; }
.bts-sel .v { overflow: hidden; text-overflow: ellipsis; }
.bts-sel svg { font-size: calc(15 * var(--u, 1px)); color: #c9d4df; }
.bts-pairsel { display: flex; align-items: center; justify-content: space-between; width: calc(190 * var(--u, 1px)); height: calc(34 * var(--u, 1px)); padding: 0 calc(12 * var(--u, 1px)); border-radius: calc(6 * var(--u, 1px)); background: var(--bts-yellow); color: #16110a; font-weight: 600; font-size: calc(13 * var(--u, 1px)); white-space: nowrap; margin-left: calc(6 * var(--u, 1px)); }
.bts-pairsel svg { font-size: calc(15 * var(--u, 1px)); color: #2a1d00; }
.bts-sq { width: calc(34 * var(--u, 1px)); height: calc(34 * var(--u, 1px)); display: inline-flex; align-items: center; justify-content: center; border-radius: calc(6 * var(--u, 1px)); border: 1px solid #1c2a3f; background: #0a1321; color: #e6edf5; flex: none; }
.bts-sq svg { font-size: calc(16 * var(--u, 1px)); }
.bts-mp { display: inline-flex; align-items: center; gap: calc(12 * var(--u, 1px)); font-weight: 700; font-size: calc(13 * var(--u, 1px)); color: #fff; margin-left: calc(8 * var(--u, 1px)); white-space: nowrap; }
.bts-mp i { width: calc(17 * var(--u, 1px)); height: calc(17 * var(--u, 1px)); border-radius: 50%; background: #f5f7fa; border: calc(2 * var(--u, 1px)) solid #f5f7fa; position: relative; }
.bts-mp.on i { background: var(--bts-blue); box-shadow: inset 0 0 0 calc(3 * var(--u, 1px)) #f5f7fa; }
.bts-seg { margin-left: auto; display: inline-flex; align-items: center; gap: calc(2 * var(--u, 1px)); height: calc(34 * var(--u, 1px)); padding: calc(2 * var(--u, 1px)); border-radius: calc(6 * var(--u, 1px)); background: #07101c; border: 1px solid #16243a; }
.bts-seg button { min-width: calc(40 * var(--u, 1px)); height: calc(28 * var(--u, 1px)); padding: 0 calc(8 * var(--u, 1px)); border-radius: calc(5 * var(--u, 1px)); color: #9fb0c3; font-size: calc(12.5 * var(--u, 1px)); border: 1px solid transparent; }
.bts-seg button:not(:disabled):hover { color: #fff; }
.bts-seg button.on { background: #082645; border-color: #1f64b0; color: #fff; font-weight: 600; }
.bts-seg button:disabled { color: #7d8da0; }
.bts-btn { display: inline-flex; align-items: center; gap: calc(8 * var(--u, 1px)); height: calc(34 * var(--u, 1px)); padding: 0 calc(14 * var(--u, 1px)); border-radius: calc(6 * var(--u, 1px)); border: 1px solid #1c2a3f; background: #0a1321; color: #e6edf5; font-size: calc(13 * var(--u, 1px)); white-space: nowrap; }
.bts-btn svg { font-size: calc(16 * var(--u, 1px)); }
.bts-btn.blue { background: #062442; border-color: #1f64b0; font-weight: 600; }
.bts-btn.blue svg { color: #4aa3ff; }
.bts-btn.blue svg .ck { fill: #2f8cff; stroke: none; }
.bts-btn.blue svg .tk { stroke: #fff; stroke-width: 2.4; }
.bts-dd { position: relative; }
.bts-ddm { display: none; position: absolute; right: 0; top: calc(100% + calc(4 * var(--u, 1px))); z-index: 20; min-width: calc(170 * var(--u, 1px)); background: #0a1321; border: 1px solid #1c2a3f; border-radius: calc(7 * var(--u, 1px)); padding: calc(5 * var(--u, 1px)); box-shadow: 0 calc(10 * var(--u, 1px)) calc(30 * var(--u, 1px)) rgba(0,0,0,.6); }
.bts-dd.open .bts-ddm { display: block; }
.bts-ddm button { display: flex; width: 100%; padding: calc(7 * var(--u, 1px)) calc(9 * var(--u, 1px)); border-radius: calc(5 * var(--u, 1px)); font-size: calc(12.5 * var(--u, 1px)); color: #d4dce6; text-align: left; }
.bts-ddm button:hover, .bts-ddm button.on { background: #082645; color: #fff; }
.bts-charts { flex: 1 1 0; min-height: 0; position: relative; }
.bts-charts #ft-4tf-frame { position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; min-height: 0 !important; max-height: none !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
.bts-charts #ft-4tf-iframe { width: 100% !important; height: 100% !important; background: transparent; }
.bts-wait { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--bts-muted); font-size: calc(13 * var(--u, 1px)); }

/* ================= BOTTOM ================= */
.bts-bottom { flex: 0 0 auto; height: calc(178 * var(--u, 1px)); display: grid; grid-template-columns: minmax(0, 1fr) calc(478 * var(--u, 1px)); gap: calc(8 * var(--u, 1px)); margin-bottom: calc(7 * var(--u, 1px)); }
.bts-box { border: 1px solid var(--bts-green-b); border-radius: calc(8 * var(--u, 1px)); background: #050e1a; display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; }
.bts-tabs { display: flex; align-items: stretch; height: calc(38 * var(--u, 1px)); border-bottom: 1px solid #0f1d2e; flex: none; }
.bts-tabs button { padding: 0 calc(18 * var(--u, 1px)); font-size: calc(13 * var(--u, 1px)); color: #9fb0c3; font-weight: 500; border-bottom: calc(2 * var(--u, 1px)) solid transparent; }
.bts-tabs button.on { background: #07253e; color: #fff; font-weight: 600; border-bottom-color: #1f7fd6; border-radius: calc(7 * var(--u, 1px)) 0 0 0; }
.bts-tabs .sp { flex: 1; }
.bts-tabs .bts-rf { width: calc(38 * var(--u, 1px)); display: inline-flex; align-items: center; justify-content: center; color: #b9c6d4; }
.bts-tabs .bts-rf svg { font-size: calc(15 * var(--u, 1px)); }
.bts-tbl { flex: 1; min-height: 0; overflow: auto; padding: 0 calc(8 * var(--u, 1px)); }
.bts-tbl table { width: 100%; border-collapse: collapse; font-size: calc(12 * var(--u, 1px)); font-variant-numeric: tabular-nums; }
.bts-tbl th { position: sticky; top: 0; background: #050e1a; color: #9db2c7; font-size: calc(10.5 * var(--u, 1px)); font-weight: 700; text-transform: uppercase; text-align: center; height: calc(34 * var(--u, 1px)); padding: 0 calc(6 * var(--u, 1px)); border-bottom: 1px solid #0f1d2e; white-space: nowrap; letter-spacing: calc(0.2 * var(--u, 1px)); }
.bts-tbl td { height: calc(44 * var(--u, 1px)); padding: 0 calc(6 * var(--u, 1px)); text-align: center; color: #e2e9f1; white-space: nowrap; border-bottom: 1px solid #0b1726; }
.bts-tbl td.l, .bts-tbl th.l { text-align: left; }
.bts-tbl .empty td { color: var(--bts-muted); height: calc(60 * var(--u, 1px)); }
.bts-side-pill { display: inline-flex; align-items: center; height: calc(24 * var(--u, 1px)); padding: 0 calc(10 * var(--u, 1px)); border-radius: calc(4 * var(--u, 1px)); font-size: calc(12 * var(--u, 1px)); font-weight: 600; }
.bts-side-pill.long { background: #022925; color: #25d980; border: 1px solid #0a5a3c; }
.bts-side-pill.short { background: #2c141d; color: #ff5a64; border: 1px solid #6a2330; }
.bts-acts { display: inline-flex; gap: calc(6 * var(--u, 1px)); align-items: center; }
.bts-tp, .bts-sl { width: calc(28 * var(--u, 1px)); height: calc(28 * var(--u, 1px)); border-radius: calc(4 * var(--u, 1px)); font-size: calc(11 * var(--u, 1px)); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.bts-tp { background: #02352e; border: 1px solid #13a86b !important; color: #2ee88f !important; }
.bts-sl { background: #2f1c26; border: 1px solid #b3363e !important; color: #ff5a5f !important; }
.bts-tp:disabled, .bts-sl:disabled { opacity: 0.95; cursor: not-allowed !important; }
.bts-close { height: calc(28 * var(--u, 1px)); padding: 0 calc(14 * var(--u, 1px)); border-radius: calc(5 * var(--u, 1px)); background: #1c2c40 !important; color: #fff; font-size: calc(12 * var(--u, 1px)); font-weight: 500; }
.bts-close:hover { background: #26405c !important; }
.bts-sum-h { display: flex; align-items: center; height: calc(38 * var(--u, 1px)); padding: 0 0 0 calc(14 * var(--u, 1px)); font-weight: 700; font-size: calc(13 * var(--u, 1px)); color: #fff; border-bottom: 1px solid #0f1d2e; flex: none; }
.bts-sum-h .sp { flex: 1; }
.bts-sum-h .bts-rf { width: calc(38 * var(--u, 1px)); height: 100%; display: inline-flex; align-items: center; justify-content: center; color: #b9c6d4; }
.bts-sum-h .bts-rf svg { font-size: calc(15 * var(--u, 1px)); }
.bts-sum { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; padding: calc(8 * var(--u, 1px)) 0; }
.bts-sum > div { padding: 0 calc(14 * var(--u, 1px)); display: flex; flex-direction: column; justify-content: space-around; }
.bts-sum > div + div { border-left: 1px solid #13243a; }
.bts-kv { display: flex; align-items: center; justify-content: space-between; gap: calc(8 * var(--u, 1px)); font-size: calc(12 * var(--u, 1px)); color: #c8d4e0; white-space: nowrap; }
.bts-kv span { display: inline-flex; align-items: center; gap: calc(5 * var(--u, 1px)); }
.bts-kv span svg { font-size: calc(11 * var(--u, 1px)); color: #7890aa; }
.bts-kv b { color: #fff; font-weight: 700; font-size: calc(12.5 * var(--u, 1px)); font-variant-numeric: tabular-nums; }
.bts-kv b.big { font-size: calc(13.5 * var(--u, 1px)); }

/* ================= STATUS BAR ================= */
.bts-stat { grid-area: stat; display: flex; align-items: center; gap: calc(20 * var(--u, 1px)); padding: 0 calc(12 * var(--u, 1px)) 0 calc(18 * var(--u, 1px)); background: #000a15; border-top: 1px solid #0d1a2a; font-size: calc(12 * var(--u, 1px)); color: #a9b8c7; white-space: nowrap; min-width: 0; overflow: hidden; }
.bts-stat .it { display: inline-flex; align-items: center; gap: calc(7 * var(--u, 1px)); }
.bts-stat .it svg { font-size: calc(15 * var(--u, 1px)); color: #c9d4df; }
.bts-stat .it b { font-weight: 400; color: #dfe7ef; }
.bts-stat .dot { width: calc(8 * var(--u, 1px)); height: calc(8 * var(--u, 1px)); border-radius: 50%; background: #01e05f; }
.bts-stat .dot.off { background: var(--bts-red); }
.bts-stat .mid { display: inline-flex; gap: calc(12 * var(--u, 1px)); margin-left: auto; }
.bts-stat .mid .sep { color: #33465e; }
.bts-stat .r { margin-left: auto; display: inline-flex; align-items: center; gap: calc(10 * var(--u, 1px)); }
.bts-lay { display: inline-flex; align-items: center; gap: calc(10 * var(--u, 1px)); height: calc(28 * var(--u, 1px)); padding: 0 calc(8 * var(--u, 1px)) 0 calc(10 * var(--u, 1px)); border-radius: calc(5 * var(--u, 1px)); border: 1px solid #1c2a3f; background: #07101c; color: #dfe7ef; font-size: calc(12 * var(--u, 1px)); margin-right: calc(12 * var(--u, 1px)); }
.bts-lay svg { font-size: calc(13 * var(--u, 1px)); color: #aab8c8; }
.bts-lbtn { width: calc(28 * var(--u, 1px)); height: calc(28 * var(--u, 1px)); display: inline-flex; align-items: center; justify-content: center; border-radius: calc(5 * var(--u, 1px)); color: #7f93ab; }
.bts-lbtn svg { font-size: calc(15 * var(--u, 1px)); }
.bts-lbtn.on { background: #02264c; color: #fff; }
.bts-lbtn.on svg rect { fill: #fff; stroke: #fff; }
.bts-lbtn.alt { color: #19c37d; }

/* Popovers / modales de FreqUI por encima del terminal */
html.bts-on [data-reka-popper-content-wrapper], html.bts-on [role="dialog"], html.bts-on [role="alertdialog"], html.bts-on [role="menu"], html.bts-on [role="listbox"] { z-index: 1000 !important; visibility: visible !important; }

/* ================= v3: interacciones ================= */
.bts-topbox { position: relative; }
.bts-pill { cursor: pointer; }
.bts-pill:hover { filter: brightness(1.15); }
.bts-sel { cursor: pointer; text-align: left; }
.bts-sel:hover, .bts-pairsel:hover, .bts-sq:hover, .bts-btn:hover { filter: brightness(1.18); }
.bts-stat button.it { cursor: pointer; border-radius: calc(4 * var(--u, 1px)); padding: calc(2 * var(--u, 1px)) calc(4 * var(--u, 1px)); margin: 0 calc(-4 * var(--u, 1px)); }
.bts-stat button.it:hover { background: #0b1a2b; }
.bts-mi { position: relative; }
.bts-mi.on, .bts-mi:hover { background: #0a1626; color: #fff; }
.bts-mi.on { box-shadow: inset calc(3 * var(--u, 1px)) 0 0 #2f81f7; }
.bts-badge { margin-left: auto; min-width: calc(18 * var(--u, 1px)); height: calc(18 * var(--u, 1px)); padding: 0 calc(5 * var(--u, 1px)); border-radius: calc(9 * var(--u, 1px)); background: #2563eb; color: #fff; font-style: normal; font-size: calc(10.5 * var(--u, 1px)); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.bts-bstate { cursor: pointer; transition: border-color .15s; }
.bts-bstate:hover, .bts-bstate.on { border-color: #2f81f7; }
.bts-empty { color: #7f93ab; font-size: calc(12 * var(--u, 1px)); padding: calc(8 * var(--u, 1px)) calc(6 * var(--u, 1px)); }
.bts-rf.spin svg, .bts-sq.spin svg { animation: bts-spin .8s linear infinite; }
@keyframes bts-spin { to { transform: rotate(360deg); } }
.bts-tbl tbody tr[data-pair] { cursor: pointer; }
.bts-tbl tbody tr.sel td { background: rgba(47,129,247,.07); }
.bts-tp.set, .bts-sl.set { box-shadow: 0 0 0 calc(2 * var(--u, 1px)) rgba(255,255,255,.18); }
.bts-tp:hover, .bts-sl:hover { filter: brightness(1.25); }

/* Menus flotantes */
.bts-float { position: fixed; z-index: 60; min-width: calc(200 * var(--u, 1px)); max-width: calc(360 * var(--u, 1px)); background: #0a1321; border: 1px solid #1c2a3f; border-radius: calc(8 * var(--u, 1px)); padding: calc(6 * var(--u, 1px)); box-shadow: 0 calc(14 * var(--u, 1px)) calc(36 * var(--u, 1px)) rgba(0,0,0,.65); font-size: calc(12.5 * var(--u, 1px)); color: #d4dce6; }
.bts-float.wide { width: calc(260 * var(--u, 1px)); }
.bts-mh { font-size: calc(10 * var(--u, 1px)); text-transform: uppercase; letter-spacing: .07em; color: #7f93ab; padding: calc(6 * var(--u, 1px)) calc(8 * var(--u, 1px)) calc(4 * var(--u, 1px)); font-weight: 700; }
.bts-mo { display: flex; align-items: center; gap: calc(9 * var(--u, 1px)); width: 100%; padding: calc(7 * var(--u, 1px)) calc(9 * var(--u, 1px)); border-radius: calc(5 * var(--u, 1px)); text-align: left; color: #d4dce6; cursor: pointer; }
.bts-mo svg { font-size: calc(15 * var(--u, 1px)); color: #9fb0c3; }
.bts-mo:hover:not(:disabled), .bts-mo.on { background: #082645; color: #fff; }
.bts-mo.on svg { color: #38bdf8; }
.bts-mo:disabled { opacity: .4; cursor: not-allowed; }
.bts-mo.chk input { accent-color: #2f81f7; width: calc(14 * var(--u, 1px)); height: calc(14 * var(--u, 1px)); margin: 0; }
.bts-mo.chk i { width: calc(12 * var(--u, 1px)); height: calc(3 * var(--u, 1px)); border-radius: calc(2 * var(--u, 1px)); display: inline-block; }
.bts-mo.pr em { margin-left: auto; font-style: normal; color: #9fb0c3; font-size: calc(11.5 * var(--u, 1px)); }
.bts-mo.pr span { font-weight: 600; }
.bts-msep { height: 1px; background: #1a2a3f; margin: calc(5 * var(--u, 1px)) calc(4 * var(--u, 1px)); }
.bts-mnote { font-size: calc(11 * var(--u, 1px)); color: #7f93ab; padding: calc(5 * var(--u, 1px)) calc(9 * var(--u, 1px)); }
.bts-fq { width: 100%; height: calc(32 * var(--u, 1px)); margin-bottom: calc(5 * var(--u, 1px)); background: #061020; border: 1px solid #1c2e45; border-radius: calc(6 * var(--u, 1px)); color: #fff; padding: 0 calc(10 * var(--u, 1px)); font: inherit; outline: none; }
.bts-fq:focus { border-color: #2f81f7; }
.bts-mlist { max-height: calc(330 * var(--u, 1px)); overflow: auto; }

/* Panel lateral (sobre las graficas) */
.bts-panel { position: absolute; top: 0; right: 0; bottom: 0; width: calc(380 * var(--u, 1px)); z-index: 30; background: #07111f; border-left: 1px solid #1c2e45; border-radius: 0 calc(8 * var(--u, 1px)) calc(8 * var(--u, 1px)) 0; box-shadow: calc(-18 * var(--u, 1px)) 0 calc(40 * var(--u, 1px)) rgba(0,0,0,.5); display: none; flex-direction: column; }
.bts-panel.open { display: flex; }
.bts-panel-h { display: flex; align-items: center; justify-content: space-between; height: calc(44 * var(--u, 1px)); padding: 0 calc(12 * var(--u, 1px)) 0 calc(16 * var(--u, 1px)); border-bottom: 1px solid #13233a; font-size: calc(14.5 * var(--u, 1px)); font-weight: 700; color: #fff; flex: none; }
.bts-panel-b { flex: 1; overflow: auto; padding: calc(10 * var(--u, 1px)) calc(16 * var(--u, 1px)) calc(16 * var(--u, 1px)); font-size: calc(12.5 * var(--u, 1px)); }
.bts-x { width: calc(28 * var(--u, 1px)); height: calc(28 * var(--u, 1px)); display: inline-flex; align-items: center; justify-content: center; border-radius: calc(6 * var(--u, 1px)); color: #9fb0c3; }
.bts-x:hover { background: #13213a; color: #fff; }
.bts-x svg { font-size: calc(16 * var(--u, 1px)); }
.bts-pkv { display: flex; justify-content: space-between; gap: calc(12 * var(--u, 1px)); padding: calc(6 * var(--u, 1px)) 0; border-bottom: 1px solid #0f1d30; }
.bts-pkv span { color: #8ea2b8; flex: none; max-width: 55%; overflow-wrap: anywhere; }
.bts-pkv b { font-weight: 500; color: #e6edf5; text-align: right; overflow-wrap: anywhere; }
.bts-psub { margin: calc(14 * var(--u, 1px)) 0 calc(4 * var(--u, 1px)); font-size: calc(10.5 * var(--u, 1px)); font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #6f8aa8; }
.bts-pnote { font-size: calc(11.5 * var(--u, 1px)); color: #7f93ab; margin: calc(8 * var(--u, 1px)) 0; line-height: 1.45; }
.bts-pnote.warn { color: #f5c518; }
.bts-pnote, .bts-mnote { white-space: normal; overflow-wrap: anywhere; }
.bts-pacts { display: flex; flex-wrap: wrap; gap: calc(8 * var(--u, 1px)); margin-top: calc(12 * var(--u, 1px)); }
.bts-pacts.col { flex-direction: column; }
.bts-code { margin-top: calc(10 * var(--u, 1px)); }
.bts-code summary { cursor: pointer; color: #93c5fd; }
.bts-code pre { max-height: calc(300 * var(--u, 1px)); overflow: auto; background: #030a14; border: 1px solid #13233a; border-radius: calc(6 * var(--u, 1px)); padding: calc(8 * var(--u, 1px)); font-size: calc(10.5 * var(--u, 1px)); color: #cbd5e1; white-space: pre; }
.bts-toggle { display: flex; align-items: center; gap: calc(9 * var(--u, 1px)); cursor: pointer; padding: calc(6 * var(--u, 1px)) 0; }
.bts-toggle input { accent-color: #2f81f7; width: calc(15 * var(--u, 1px)); height: calc(15 * var(--u, 1px)); }
.bts-ev { display: flex; flex-direction: column; gap: calc(2 * var(--u, 1px)); margin-top: calc(8 * var(--u, 1px)); }
.bts-evr { display: grid; grid-template-columns: calc(112 * var(--u, 1px)) 1fr; gap: calc(8 * var(--u, 1px)); padding: calc(6 * var(--u, 1px)) calc(6 * var(--u, 1px)); border-left: calc(3 * var(--u, 1px)) solid #334155; background: #081424; border-radius: calc(3 * var(--u, 1px)); font-size: calc(11.5 * var(--u, 1px)); }
.bts-evr span { color: #7f93ab; }
.bts-evr p { margin: 0; color: #dbe5f0; overflow-wrap: anywhere; }
.bts-evr.in { border-color: #2f81f7; } .bts-evr.win { border-color: #0ecb81; } .bts-evr.loss { border-color: #f6465d; }
.bts-evr.warn { border-color: #f5c518; } .bts-evr.err { border-color: #ff3b4f; } .bts-evr.live { border-color: #a78bfa; }

/* Botones de modal/panel */
.bts-mbtn { display: inline-flex; align-items: center; justify-content: center; gap: calc(8 * var(--u, 1px)); height: calc(32 * var(--u, 1px)); padding: 0 calc(14 * var(--u, 1px)); border-radius: calc(6 * var(--u, 1px)); background: #13233a; border: 1px solid #1f3552; color: #e6edf5; font-size: calc(12.5 * var(--u, 1px)); font-weight: 500; cursor: pointer; }
.bts-mbtn svg { font-size: calc(14 * var(--u, 1px)); }
.bts-mbtn:hover:not(:disabled) { filter: brightness(1.25); }
.bts-mbtn:disabled { opacity: .45; cursor: not-allowed; }
.bts-mbtn.blue { background: #1f6feb; border-color: #1f6feb; color: #fff; }
.bts-mbtn.red { background: #3a1620; border-color: #b3363e; color: #ff6b73; }
.bts-mbtn.green { background: #04352a; border-color: #13a86b; color: #2ee88f; }
.bts-pacts.col .bts-mbtn { justify-content: flex-start; }

/* Modal */
.bts-modal-bg { position: fixed; inset: 0; z-index: 80; background: rgba(0,4,10,.62); display: flex; align-items: center; justify-content: center; }
.bts-modal { width: calc(440 * var(--u, 1px)); max-width: calc(100vw - 40px); max-height: calc(100vh - 60px); display: flex; flex-direction: column; background: #0a1422; border: 1px solid #1f3552; border-radius: calc(10 * var(--u, 1px)); box-shadow: 0 calc(24 * var(--u, 1px)) calc(60 * var(--u, 1px)) rgba(0,0,0,.7); font-size: calc(13 * var(--u, 1px)); }
.bts-modal.wide { width: calc(560 * var(--u, 1px)); }
.bts-modal-h { display: flex; align-items: center; justify-content: space-between; padding: calc(12 * var(--u, 1px)) calc(12 * var(--u, 1px)) calc(10 * var(--u, 1px)) calc(18 * var(--u, 1px)); border-bottom: 1px solid #13233a; font-weight: 700; font-size: calc(15 * var(--u, 1px)); color: #fff; }
.bts-modal-b { padding: calc(14 * var(--u, 1px)) calc(18 * var(--u, 1px)); overflow: auto; }
.bts-modal-f { display: flex; justify-content: flex-end; gap: calc(8 * var(--u, 1px)); padding: calc(12 * var(--u, 1px)) calc(18 * var(--u, 1px)) calc(14 * var(--u, 1px)); border-top: 1px solid #13233a; }
.bts-mtext { line-height: 1.55; color: #cbd5e1; }
.bts-mtext code { font-size: calc(11 * var(--u, 1px)); color: #93c5fd; }
.bts-tpform { display: grid; grid-template-columns: 1fr 1fr; gap: calc(10 * var(--u, 1px)) calc(14 * var(--u, 1px)); margin-top: calc(6 * var(--u, 1px)); }
.bts-tpform label { display: flex; flex-direction: column; gap: calc(4 * var(--u, 1px)); font-size: calc(11.5 * var(--u, 1px)); color: #8ea2b8; }
.bts-tpform input { height: calc(32 * var(--u, 1px)); background: #061020; border: 1px solid #1c2e45; border-radius: calc(6 * var(--u, 1px)); color: #fff; padding: 0 calc(10 * var(--u, 1px)); font: inherit; outline: none; }
.bts-tpform input:focus { border-color: #2f81f7; }
.bts-tpform input:disabled { opacity: .5; cursor: not-allowed; }
.bts-err { color: #ff6b73; font-size: calc(12 * var(--u, 1px)); min-height: calc(16 * var(--u, 1px)); margin-top: calc(6 * var(--u, 1px)); }

/* Toast */
.bts-toast { position: fixed; right: calc(20 * var(--u, 1px)); bottom: calc(56 * var(--u, 1px)); z-index: 90; background: #0b2a1f; border: 1px solid #13a86b; color: #d1fae5; padding: calc(10 * var(--u, 1px)) calc(16 * var(--u, 1px)); border-radius: calc(8 * var(--u, 1px)); font-size: calc(13 * var(--u, 1px)); box-shadow: 0 calc(10 * var(--u, 1px)) calc(30 * var(--u, 1px)) rgba(0,0,0,.6); transition: opacity .5s; }
.bts-toast.bad { background: #2f1219; border-color: #b3363e; color: #ffd4d7; }
.bts-toast.out { opacity: 0; }

/* Tema claro (toggle de FreqUI): inversion de luminancia conservando tonos */
html.bts-on.bts-light #bt-shell { filter: invert(0.92) hue-rotate(180deg); background: #000; }

/* ---- v3.1: navegación en la barra lateral + espaciado compacto ---- */
.bts-side { padding: calc(10 * var(--u, 1px)) calc(8 * var(--u, 1px)) calc(8 * var(--u, 1px)) calc(10 * var(--u, 1px)); }
.bts-stitle { font-size: calc(10.5 * var(--u, 1px)); margin: 0 calc(4 * var(--u, 1px)) calc(5 * var(--u, 1px)); letter-spacing: calc(0.5 * var(--u, 1px)); }
.bts-search { height: calc(30 * var(--u, 1px)); margin: 0 calc(2 * var(--u, 1px)) calc(6 * var(--u, 1px)); }
.bts-pairs { margin-bottom: calc(8 * var(--u, 1px)); min-height: calc(68 * var(--u, 1px)); flex: 0 1 auto; }
.bts-pair { height: calc(32 * var(--u, 1px)); font-size: calc(13 * var(--u, 1px)); flex: none; }
.bts-menu { margin-bottom: calc(8 * var(--u, 1px)); gap: calc(1 * var(--u, 1px)); flex: none; }
.bts-mi { height: calc(30 * var(--u, 1px)); font-size: calc(13 * var(--u, 1px)); gap: calc(11 * var(--u, 1px)); }
.bts-mi svg { font-size: calc(16 * var(--u, 1px)); }
.bts-tab.on { background: #0b1b2c; color: #fff; font-weight: 600; box-shadow: inset calc(3 * var(--u, 1px)) 0 0 #2f81f7; }
.bts-tab.on svg { color: #fff; }
.bts-bstate { padding: calc(8 * var(--u, 1px)) calc(11 * var(--u, 1px)) calc(7 * var(--u, 1px)); flex: none; }
.bts-bc-h { padding-bottom: calc(7 * var(--u, 1px)); margin-bottom: calc(5 * var(--u, 1px)); }
.bts-bc-r { padding: calc(2.5 * var(--u, 1px)) 0; }
.bts-hdr .bts-pill { margin-left: calc(22 * var(--u, 1px)); }

/* ---- Fase 2: modo Principiante/Pro, frase del bot, semáforos, ayuda ---- */
.bts-modesw { display: inline-flex; height: calc(28 * var(--u, 1px)); border: 1px solid #1c2a3f; border-radius: calc(7 * var(--u, 1px)); overflow: hidden; background: #070f1c; }
.bts-modesw button { padding: 0 calc(11 * var(--u, 1px)); font-size: calc(11.5 * var(--u, 1px)); font-weight: 600; color: #9fb0c3; }
.bts-modesw button.on { background: #1f6feb; color: #fff; }
.bts-modesw button:not(.on):hover { background: #0e1b2c; color: #fff; }
.bts-what { flex: none; display: flex; align-items: center; gap: calc(8 * var(--u, 1px)); height: calc(40 * var(--u, 1px)); padding: 0 calc(6 * var(--u, 1px)) 0 calc(10 * var(--u, 1px)); margin: 0 calc(3 * var(--u, 1px)); border: 1px solid #143556; background: linear-gradient(90deg, #06182c, #050e1a); border-radius: calc(6 * var(--u, 1px));
  font-size: calc(11.5 * var(--u, 1px)); line-height: calc(16 * var(--u, 1px)); color: #d6e2ee; white-space: nowrap; overflow: hidden; }
.bts-what b { color: #7cc4ff; font-weight: 700; flex: none; font-size: calc(12 * var(--u, 1px)); line-height: calc(14 * var(--u, 1px)); white-space: normal; width: calc(104 * var(--u, 1px)); }
.bts-what-l { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.bts-what-l span { display: block; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bts-what-l #bts-what-e { color: #b8c7d9; }
.bts-what.tight .bts-what-l { font-size: calc(10.5 * var(--u, 1px)); line-height: calc(15 * var(--u, 1px)); }
.bts-what-l #bts-what-e:empty { display: none; }
.bts-what-more { flex: none; height: calc(24 * var(--u, 1px)); padding: 0 calc(9 * var(--u, 1px)); border-radius: calc(5 * var(--u, 1px)); border: 1px solid #1f4a78; background: #0b2440; color: #9fd0ff; font-size: calc(11.5 * var(--u, 1px)); font-weight: 600; cursor: pointer; }
.bts-what-more:hover { background: #12345a; color: #fff; }
.bts-float.bts-whatpop { width: calc(580 * var(--u, 1px)); max-width: calc(580 * var(--u, 1px)); padding: calc(8 * var(--u, 1px)) calc(10 * var(--u, 1px)); max-height: calc(100vh - calc(150 * var(--u, 1px))); overflow-y: auto; overscroll-behavior: contain; }
.bts-what-l #bts-what-e a.bts-what-c { color: inherit; text-decoration: none; cursor: pointer; border-bottom: 1px dotted rgba(159,208,255,.35); }
.bts-what-l #bts-what-e a.bts-what-c:hover { color: #fff; border-bottom-color: #9fd0ff; }
.bts-what-sep { font-style: normal; color: #4b6480; }
.bts-what-up { font-style: normal; color: #7f93ab; }
.bts-wp-tabs { display: flex; gap: calc(6 * var(--u, 1px)); padding: calc(2 * var(--u, 1px)) calc(4 * var(--u, 1px)) calc(8 * var(--u, 1px)); border-bottom: 1px solid #1c2a3f; margin-bottom: calc(6 * var(--u, 1px)); }
.bts-wp-tab { display: inline-flex; align-items: center; gap: calc(6 * var(--u, 1px)); height: calc(26 * var(--u, 1px)); padding: 0 calc(12 * var(--u, 1px)); border-radius: calc(13 * var(--u, 1px)); border: 1px solid #1f3552; background: #0b1729; color: #b8c7d9; font-size: calc(12 * var(--u, 1px)); font-weight: 700; cursor: pointer; }
.bts-wp-tab:hover { background: #10223a; color: #fff; }
.bts-wp-tab.on { background: #12345a; border-color: #2f6fb5; color: #fff; }
.bts-wp-tab .d { width: calc(8 * var(--u, 1px)); height: calc(8 * var(--u, 1px)); border-radius: 50%; background: #475569; }
.bts-wp-tab .d.g { background: #25d980; } .bts-wp-tab .d.y { background: #f5c518; } .bts-wp-tab .d.r { background: #ff7b86; } .bts-wp-tab .d.open { background: #29a3ef; }
.bts-wp-now { display: flex; flex-direction: column; gap: calc(3 * var(--u, 1px)); margin: calc(2 * var(--u, 1px)) calc(4 * var(--u, 1px)) calc(6 * var(--u, 1px)); padding: calc(7 * var(--u, 1px)) calc(9 * var(--u, 1px)); border-radius: calc(6 * var(--u, 1px)); background: #0b2440; border: 1px solid #1f4a78; font-size: calc(12.5 * var(--u, 1px)); line-height: 1.45; color: #e3eefa; white-space: normal; }
.bts-wp-now b { color: #9fd0ff; font-size: calc(11 * var(--u, 1px)); text-transform: uppercase; letter-spacing: .4u; }
.bts-wp-ev { display: flex; gap: calc(8 * var(--u, 1px)); align-items: flex-start; padding: calc(3 * var(--u, 1px)) calc(4 * var(--u, 1px)); font-size: calc(12 * var(--u, 1px)); line-height: 1.4; white-space: normal; color: #d6e2ee; }
.bts-wp-ev time { flex: none; width: calc(38 * var(--u, 1px)); color: #7f93ab; font-variant-numeric: tabular-nums; }
.bts-wp-ev.open span { color: #9fd0ff; } .bts-wp-ev.close span { color: #ffd98a; } .bts-wp-ev.sig span { color: #8ff0bd; }
.bts-whatpop .bts-mnote { white-space: normal; }
.bts-wp-t { font-size: calc(12.5 * var(--u, 1px)); line-height: 1.45; color: #d6e2ee; padding: calc(2 * var(--u, 1px)) calc(4 * var(--u, 1px)) calc(8 * var(--u, 1px)); white-space: normal; }
.bts-wp-c { display: flex; gap: calc(7 * var(--u, 1px)); align-items: flex-start; padding: calc(3 * var(--u, 1px)) calc(4 * var(--u, 1px)); font-size: calc(12 * var(--u, 1px)); line-height: 1.4; white-space: normal; }
.bts-wp-c i { flex: none; width: calc(16 * var(--u, 1px)); text-align: center; font-style: normal; font-weight: 800; }
.bts-wp-c.ok i { color: #25d980; } .bts-wp-c.no i { color: #ff7b86; }
.bts-wp-c em { color: #ffb4bb; font-style: normal; }

.bts-ctrl { height: calc(54 * var(--u, 1px)); }
.bts-today { flex: none; padding: calc(6 * var(--u, 1px)) calc(14 * var(--u, 1px)) 0; font-size: calc(12 * var(--u, 1px)); font-weight: 600; color: #d6e2ee; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bts-today.pos { color: #25d980; } .bts-today.neg { color: #ff7b86; }
.bts-sum { padding: calc(4 * var(--u, 1px)) 0 calc(6 * var(--u, 1px)); }
.bts-light { width: calc(9 * var(--u, 1px)); height: calc(9 * var(--u, 1px)); border-radius: 50%; flex: none; margin-left: auto; margin-right: calc(2 * var(--u, 1px)); background: #334155; box-shadow: 0 0 0 calc(2 * var(--u, 1px)) rgba(51,65,85,.25); }
.bts-light.g { background: #22e36b; box-shadow: 0 0 calc(6 * var(--u, 1px)) rgba(34,227,107,.7); }
.bts-light.y { background: #f5c518; box-shadow: 0 0 calc(6 * var(--u, 1px)) rgba(245,197,24,.6); }
.bts-light.r { background: #ff4d5a; box-shadow: 0 0 calc(6 * var(--u, 1px)) rgba(255,77,90,.6); }
.bts-pair .nm { flex: 1 1 auto; }
.bts-help { display: inline-flex; align-items: center; color: #7890aa; cursor: help; font-style: normal; }
.bts-help svg { font-size: calc(11 * var(--u, 1px)); }
.bts-bc-r span { display: inline-flex; align-items: center; gap: calc(4 * var(--u, 1px)); }
.bts-pkv span { display: inline-flex; align-items: center; gap: calc(4 * var(--u, 1px)); }
.bts-side { padding-top: calc(8 * var(--u, 1px)); }
.bts-stitle { margin-bottom: calc(4 * var(--u, 1px)); }
.bts-mi { height: calc(27 * var(--u, 1px)); }
.bts-pair { height: calc(30 * var(--u, 1px)); gap: calc(7 * var(--u, 1px)); font-size: calc(12.5 * var(--u, 1px)); }
.bts-today { font-size: calc(11.5 * var(--u, 1px)); }
.bts-menu { margin-bottom: calc(6 * var(--u, 1px)); }
.bts-search { height: calc(28 * var(--u, 1px)); margin-bottom: calc(5 * var(--u, 1px)); }
.bts-pairs { margin-bottom: calc(6 * var(--u, 1px)); }
.bts-bc-r { padding: calc(1.5 * var(--u, 1px)) 0; }

/* ---- Consumo de IA (Gemini/Groq) en la tarjeta «Estado del bot» ---- */
.bts-bc-ai b.warn { color: #ffb020; }
.bts-bc-ais { font-size: calc(10.5 * var(--u, 1px)); line-height: calc(14 * var(--u, 1px)); color: #9fb0c3; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 0 calc(1 * var(--u, 1px)); }
.bts-bc-ais .ok { color: #25d980; } .bts-bc-ais .warn { color: #ffb020; } .bts-bc-ais .bad { color: #ff7b86; }

/* ---------- Notificaciones (campana) y «Resultados por día» (v5) ---------- */
.bts-bell { position: relative; }
.bts-bell.imp { border-color: #b8860b; box-shadow: 0 0 0 1px rgba(245,197,24,.35), 0 0 calc(10 * var(--u, 1px)) rgba(245,197,24,.25); }
.bts-bell.imp svg { color: #f5c518; }
.bts-bbadge { position: absolute; top: calc(-6 * var(--u, 1px)); right: calc(-6 * var(--u, 1px)); min-width: calc(18 * var(--u, 1px)); height: calc(18 * var(--u, 1px)); padding: 0 calc(4 * var(--u, 1px)); border-radius: calc(9 * var(--u, 1px)); background: #f6465d; color: #fff; font-style: normal; font-size: calc(10.5 * var(--u, 1px)); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; border: calc(2 * var(--u, 1px)) solid #010b16; line-height: 1; }
.bts-float.bts-ntf { width: calc(430 * var(--u, 1px)); max-width: calc(430 * var(--u, 1px)); padding: 0; display: flex; flex-direction: column; max-height: calc(100vh - 90px); }
.bts-nth { display: flex; align-items: center; gap: calc(6 * var(--u, 1px)); padding: calc(10 * var(--u, 1px)) calc(12 * var(--u, 1px)) calc(8 * var(--u, 1px)); border-bottom: 1px solid #16243a; }
.bts-nth b { font-size: calc(14 * var(--u, 1px)); color: #fff; }
.bts-nth .sp { flex: 1; }
.bts-nth button, .bts-ntfl button { font-size: calc(11.5 * var(--u, 1px)); color: #9fb0c3; padding: calc(3 * var(--u, 1px)) calc(8 * var(--u, 1px)); border-radius: calc(5 * var(--u, 1px)); border: 1px solid #1c2a3f; background: #0c1624; }
.bts-nth button:hover, .bts-ntfl button:hover { color: #fff; border-color: #2f81f7; }
.bts-ntfl { display: flex; gap: calc(6 * var(--u, 1px)); padding: calc(7 * var(--u, 1px)) calc(12 * var(--u, 1px)); }
.bts-ntfl button.on { background: #07253e; color: #fff; border-color: #1f7fd6; }
.bts-ntl { overflow: auto; min-height: 0; flex: 1 1 auto; max-height: calc(560 * var(--u, 1px)); padding: calc(2 * var(--u, 1px)) calc(8 * var(--u, 1px)) calc(6 * var(--u, 1px)); display: flex; flex-direction: column; gap: calc(5 * var(--u, 1px)); }
.bts-ntl.inpanel { max-height: none; overflow: visible; padding: calc(6 * var(--u, 1px)) 0; }
.bts-nti { display: grid; grid-template-columns: calc(26 * var(--u, 1px)) 1fr; gap: calc(8 * var(--u, 1px)); padding: calc(8 * var(--u, 1px)) calc(9 * var(--u, 1px)); border-radius: calc(6 * var(--u, 1px)); background: #081424; border: 1px solid #10203a; border-left: calc(3 * var(--u, 1px)) solid #2f81f7; }
.bts-nti .ic { font-size: calc(17 * var(--u, 1px)); line-height: 1.2; text-align: center; }
.bts-nti .h { display: flex; align-items: center; gap: calc(6 * var(--u, 1px)); font-size: calc(10.5 * var(--u, 1px)); margin-bottom: calc(2 * var(--u, 1px)); }
.bts-nti .tag { font-style: normal; font-weight: 800; letter-spacing: .04em; padding: calc(1 * var(--u, 1px)) calc(5 * var(--u, 1px)); border-radius: calc(3 * var(--u, 1px)); background: rgba(47,129,247,.15); color: #7db4ff; }
.bts-nti .coin { color: #fff; font-size: calc(11 * var(--u, 1px)); padding: calc(1 * var(--u, 1px)) calc(6 * var(--u, 1px)); border-radius: calc(3 * var(--u, 1px)); background: #13243b; }
.bts-nti .tm { margin-left: auto; color: #7f93ab; white-space: nowrap; }
.bts-nti .t { font-size: calc(12.5 * var(--u, 1px)); font-weight: 700; color: #f1f5f9; }
.bts-nti p { margin: calc(2 * var(--u, 1px)) 0 0; font-size: calc(11.8 * var(--u, 1px)); line-height: 1.4; color: #c3cfdc; }
.bts-nti.imp { border-left-color: #f5c518; background: linear-gradient(90deg, rgba(245,197,24,.10), #081424 60%); border-color: rgba(245,197,24,.35); }
.bts-nti.imp .tag { background: rgba(245,197,24,.18); color: #f5c518; }
.bts-nti.bad { border-left-color: #f6465d; background: linear-gradient(90deg, rgba(246,70,93,.10), #081424 60%); border-color: rgba(246,70,93,.35); }
.bts-nti.bad .tag { background: rgba(246,70,93,.18); color: #ff6b7e; }
.bts-nti.warn { border-left-color: #f59e0b; }
.bts-nti.warn .tag { background: rgba(245,158,11,.16); color: #fbbf24; }
.bts-nti.unread { box-shadow: inset 0 0 0 1px rgba(125,180,255,.35); }
.bts-nti.unread .t::after { content: ''; display: inline-block; width: calc(7 * var(--u, 1px)); height: calc(7 * var(--u, 1px)); border-radius: 50%; background: #2f81f7; margin-left: calc(6 * var(--u, 1px)); vertical-align: middle; }
.bts-ntempty { color: #8ea2b8; font-size: calc(12 * var(--u, 1px)); padding: calc(14 * var(--u, 1px)) calc(10 * var(--u, 1px)); text-align: center; line-height: 1.45; }
.bts-ntfoot { border-top: 1px solid #16243a; padding: calc(8 * var(--u, 1px)) calc(12 * var(--u, 1px)) calc(10 * var(--u, 1px)); }
.bts-ntdesk { display: flex; align-items: center; gap: calc(7 * var(--u, 1px)); width: 100%; font-size: calc(11.8 * var(--u, 1px)); color: #c9d5e2; padding: calc(6 * var(--u, 1px)) calc(9 * var(--u, 1px)); border-radius: calc(6 * var(--u, 1px)); border: 1px dashed #2a3c55; background: #0a1628; text-align: left; }
.bts-ntdesk svg { font-size: calc(14 * var(--u, 1px)); flex: none; }
.bts-ntdesk:hover { border-color: #f5c518; color: #fff; }
.bts-ntdesk.on { border-style: solid; border-color: rgba(14,203,129,.5); color: #7ee2b5; }
.bts-ntdesk[disabled] { opacity: .55; cursor: default; }
/* Resultados por día: pestaña del cuadro inferior */
.bts-tbl.days { padding: 0; overflow: hidden; }
.bts-days { display: grid; grid-template-columns: calc(400 * var(--u, 1px)) minmax(0, 1fr); height: 100%; min-height: 0; }
.bts-days-l { display: flex; flex-direction: column; gap: calc(5 * var(--u, 1px)); padding: calc(6 * var(--u, 1px)) calc(10 * var(--u, 1px)) calc(4 * var(--u, 1px)); border-right: 1px solid #0f1d2e; min-height: 0; }
.bts-dsts { display: grid; grid-template-columns: repeat(3, 1fr); gap: calc(6 * var(--u, 1px)); }
.bts-dsts.full { grid-template-columns: repeat(4, 1fr); margin-bottom: calc(4 * var(--u, 1px)); }
.bts-dst { background: #081424; border: 1px solid #10203a; border-radius: calc(6 * var(--u, 1px)); padding: calc(4 * var(--u, 1px)) calc(8 * var(--u, 1px)); min-width: 0; }
.bts-dst span { display: flex; align-items: center; gap: calc(4 * var(--u, 1px)); font-size: calc(10.5 * var(--u, 1px)); color: #9db2c7; font-weight: 600; }
.bts-dst b { display: block; font-size: calc(14 * var(--u, 1px)); font-variant-numeric: tabular-nums; color: #e2e9f1; white-space: nowrap; }
.bts-dst em { display: block; font-style: normal; font-size: calc(10.5 * var(--u, 1px)); color: #7f93ab; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bts-dsts.full .bts-dst { padding: calc(7 * var(--u, 1px)) calc(10 * var(--u, 1px)); } .bts-dsts.full .bts-dst b { font-size: calc(16 * var(--u, 1px)); }
.bts-bars { flex: 1; min-height: calc(34 * var(--u, 1px)); display: flex; gap: calc(3 * var(--u, 1px)); align-items: stretch; }
.bts-bars .b { flex: 1; display: grid; grid-template-rows: 1fr 1fr auto; min-width: 0; border-radius: calc(3 * var(--u, 1px)); }
.bts-bars .u, .bts-bars .d { position: relative; }
.bts-bars .u { border-bottom: 1px solid #22344d; display: flex; align-items: flex-end; }
.bts-bars .d { display: flex; align-items: flex-start; }
.bts-bars i { display: block; width: 100%; border-radius: calc(2 * var(--u, 1px)); }
.bts-bars i.pos { background: #0ecb81; } .bts-bars i.neg { background: #f6465d; }
.bts-bars span { font-size: calc(9 * var(--u, 1px)); color: #6f849c; text-align: center; line-height: calc(12 * var(--u, 1px)); }
.bts-bars .b.today { background: rgba(47,129,247,.10); outline: 1px solid rgba(47,129,247,.45); }
.bts-bars .b.today span { color: #7db4ff; font-weight: 700; }
.bts-panel-b .bts-bars { height: calc(110 * var(--u, 1px)); flex: none; margin: calc(6 * var(--u, 1px)) 0 calc(4 * var(--u, 1px)); }
.bts-days-t { overflow: auto; min-height: 0; padding: 0 calc(8 * var(--u, 1px)); }
.bts-dtbl { width: 100%; border-collapse: collapse; font-size: calc(11.5 * var(--u, 1px)); font-variant-numeric: tabular-nums; }
.bts-dtbl th { position: sticky; top: 0; z-index: 1; background: #050e1a; color: #9db2c7; font-size: calc(10 * var(--u, 1px)); font-weight: 700; text-transform: uppercase; text-align: right; height: calc(26 * var(--u, 1px)); padding: 0 calc(6 * var(--u, 1px)); border-bottom: 1px solid #0f1d2e; white-space: nowrap; }
.bts-dtbl th .bts-help { vertical-align: calc(-2 * var(--u, 1px)); }
.bts-dtbl td { height: calc(25 * var(--u, 1px)); padding: 0 calc(6 * var(--u, 1px)); text-align: right; color: #e2e9f1; white-space: nowrap; border-bottom: 1px solid #0b1726; }
.bts-dtbl .l { text-align: left; }
.bts-dtbl tr.today td { background: rgba(47,129,247,.08); }
.bts-panel-b .bts-dtbl th { background: #07111f; }
.bts-panel.wide { width: calc(640 * var(--u, 1px)); }
.bts-dtbl.c th { font-size: calc(9.5 * var(--u, 1px)); padding: 0 calc(4 * var(--u, 1px)); letter-spacing: 0; }
.bts-dtbl.c td { padding: 0 calc(4 * var(--u, 1px)); font-size: calc(11 * var(--u, 1px)); }
.bts-days-t { padding: 0 calc(4 * var(--u, 1px)); }
.bts-dst em span { display: inline; font-size: inherit; font-weight: 600; }
