/* ============================================================
   SignalDesk — dark trading dashboard
   ============================================================ */
:root {
  --bg: #080c13;
  --bg-soft: #0b111a;
  --panel: rgba(17, 25, 38, 0.78);
  --panel-solid: #111926;
  --panel-2: #0d141f;
  --line: rgba(148, 163, 184, 0.13);
  --line-strong: rgba(148, 163, 184, 0.22);
  --text: #e7eef8;
  --muted: #8a9ab2;
  --dim: #5d6b80;
  --green: #2dd4bf;
  --green-deep: #10b981;
  --red: #f87171;
  --amber: #fbbf24;
  --blue: #60a5fa;
  --violet: #a78bfa;
  --radius: 16px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --font: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, "SF Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}
.bg-glow-a { width: 560px; height: 560px; top: -220px; left: -120px; background: rgba(45, 212, 191, 0.16); }
.bg-glow-b { width: 520px; height: 520px; top: 240px; right: -220px; background: rgba(96, 165, 250, 0.11); }

.icon { width: 16px; height: 16px; flex: none; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 28px;
  background: rgba(8, 12, 19, 0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }

.brand-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 11px;
  color: #052a27;
  background: linear-gradient(140deg, #5eead4, #2dd4bf 55%, #0ea5a0);
  box-shadow: 0 8px 22px rgba(45, 212, 191, 0.24);
}
.brand-mark svg { width: 21px; height: 21px; }

.brand-text h1 { margin: 0; font-size: 17px; letter-spacing: -0.01em; font-weight: 700; }
.brand-text p { margin: 1px 0 0; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.sep { margin: 0 4px; color: var(--dim); }

.topbar-actions { display: flex; align-items: center; gap: 14px; }

.status { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--dim);
  box-shadow: 0 0 0 3px rgba(93, 107, 128, 0.15);
  transition: background 0.25s, box-shadow 0.25s;
}
.status-dot.ok { background: var(--green); box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.16); }
.status-dot.busy { background: var(--amber); box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.16); animation: pulse 1.1s ease-in-out infinite; }
.status-dot.error { background: var(--red); box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.16); }
@keyframes pulse { 50% { opacity: 0.45; } }

/* toggle */
.switch { display: flex; align-items: center; gap: 7px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track {
  width: 34px; height: 19px; padding: 2px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  border: 1px solid var(--line);
  transition: background 0.2s;
  display: flex; align-items: center;
}
.switch-thumb {
  width: 13px; height: 13px; border-radius: 50%;
  background: #cbd5e1;
  transform: translateX(0);
  transition: transform 0.2s, background 0.2s;
}
.switch input:checked + .switch-track { background: rgba(45, 212, 191, 0.28); border-color: rgba(45, 212, 191, 0.45); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(15px); background: #5eead4; }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--blue); outline-offset: 2px; }
.switch-label { font-size: 12px; color: var(--muted); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 8px 14px;
  font: inherit; font-size: 13px; font-weight: 600;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  transition: transform 0.12s, background 0.18s, border-color 0.18s, opacity 0.18s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(140deg, #2dd4bf, #14b8a6);
  color: #04211e;
  box-shadow: 0 8px 22px rgba(45, 212, 191, 0.2);
}
.btn-primary:hover { background: linear-gradient(140deg, #5eead4, #2dd4bf); }
.btn-primary:disabled { opacity: 0.55; cursor: progress; box-shadow: none; }
.btn-primary .icon { transition: transform 0.5s; }
.btn-primary.spinning .icon { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-ghost {
  background: rgba(148, 163, 184, 0.08);
  border-color: var(--line);
}
.btn-ghost:hover { background: rgba(148, 163, 184, 0.14); border-color: var(--line-strong); }

/* ---------- layout ---------- */
.wrap {
  position: relative;
  z-index: 1;
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: 24px 28px 60px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stat {
  position: relative;
  padding: 16px 18px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(23, 34, 52, 0.85), rgba(13, 20, 31, 0.85));
  overflow: hidden;
}
.stat::after {
  content: "";
  position: absolute; inset: 0 0 auto auto;
  width: 90px; height: 90px;
  border-radius: 50%;
  filter: blur(34px);
  opacity: 0.4;
}
.stat-strong::after { background: var(--green); }
.stat-buy::after { background: var(--green-deep); }
.stat-watch::after { background: var(--amber); }
.stat-avg::after { background: var(--blue); }
.stat-label { font-size: 11px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.stat-value { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 11.5px; color: var(--dim); }
.stat-strong .stat-value { color: var(--green); }
.stat-buy .stat-value { color: #4ade80; }
.stat-watch .stat-value { color: var(--amber); }

/* errors */
.errors {
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: rgba(127, 29, 29, 0.22);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 12.5px;
}
.errors-head { display: flex; align-items: center; gap: 8px; color: #fca5a5; font-weight: 600; }
.errors-head .icon { width: 15px; height: 15px; }
.errors ul { margin: 8px 0 2px; padding-left: 22px; color: #fecaca; }
.errors li { margin: 2px 0; }
.errors li b { color: #fff; font-weight: 600; }
.errors-close {
  margin-left: auto;
  background: none; border: 0; color: #fca5a5;
  font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px;
}
.errors[hidden] { display: none; }

.layout {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.panel {
  background: linear-gradient(180deg, var(--panel), rgba(12, 18, 28, 0.86));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2 { margin: 0; font-size: 14px; font-weight: 650; letter-spacing: 0.01em; }
.panel-head .sub { margin: 3px 0 0; font-size: 11.5px; color: var(--muted); }

.count {
  font-size: 11px; font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--green);
  background: rgba(45, 212, 191, 0.1);
  border: 1px solid rgba(45, 212, 191, 0.22);
  font-variant-numeric: tabular-nums;
}

/* ---------- watchlist ---------- */
.side { position: sticky; top: 84px; }

.add-row { display: flex; gap: 8px; padding: 14px 16px 6px; }
.add-row input {
  flex: 1; min-width: 0;
  padding: 8px 11px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: rgba(8, 12, 19, 0.7);
  color: var(--text);
  font: inherit; font-size: 13px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.add-row input::placeholder { color: var(--dim); }
.add-row input:focus { border-color: rgba(45, 212, 191, 0.5); box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.1); }
.add-hint { min-height: 16px; padding: 3px 16px 8px; font-size: 11.5px; color: var(--red); }
.add-hint.ok { color: var(--green); }

.watchlist {
  list-style: none;
  margin: 0;
  padding: 0 10px 6px;
  max-height: 46vh;
  overflow-y: auto;
}
.watchlist li {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 9px;
  transition: background 0.15s;
}
.watchlist li:hover { background: rgba(148, 163, 184, 0.07); }
.wl-sym { font-size: 13px; font-weight: 600; letter-spacing: 0.01em; }
.wl-sym span { color: var(--dim); font-weight: 500; }
.wl-score {
  margin-left: auto;
  font-size: 11px; font-variant-numeric: tabular-nums;
  color: var(--muted);
  min-width: 22px; text-align: right;
}
.wl-remove {
  width: 20px; height: 20px;
  display: grid; place-items: center;
  border: 0; border-radius: 6px;
  background: transparent; color: var(--dim);
  font-size: 15px; line-height: 1; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.wl-remove:hover { background: rgba(248, 113, 113, 0.14); color: var(--red); }

.side-note {
  margin: 4px 16px 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--dim);
  line-height: 1.5;
}
.side-note code { color: var(--muted); font-family: var(--mono); font-size: 10.5px; }
.side-note-link {
  display: inline-block;
  margin-top: 7px;
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
}
.side-note-link:hover { text-decoration: underline; }

/* ---------- results table ---------- */
.main-panel { min-width: 0; }
.main-panel .panel-head { flex-wrap: wrap; }

.filters { display: flex; gap: 8px; align-items: center; }
.search-wrap { position: relative; display: flex; align-items: center; }
.search-wrap .icon {
  position: absolute; left: 9px;
  width: 14px; height: 14px;
  color: var(--dim);
  pointer-events: none;
}
.search {
  width: 150px;
  padding: 7px 10px 7px 29px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(8, 12, 19, 0.65);
  color: var(--text);
  font: inherit; font-size: 12.5px;
  outline: none;
}
.search:focus { border-color: rgba(96, 165, 250, 0.5); }
select {
  padding: 7px 9px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(8, 12, 19, 0.65);
  color: var(--text);
  font: inherit; font-size: 12.5px;
  outline: none;
  cursor: pointer;
}
select:focus { border-color: rgba(96, 165, 250, 0.5); }

.table-wrap { overflow-x: auto; }
table.signals {
  width: 100%;
  min-width: 1080px;
  border-collapse: separate;
  border-spacing: 0;
}
table.signals th {
  position: sticky; top: 0;
  text-align: left;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--dim);
  padding: 9px 10px;
  background: rgba(13, 20, 31, 0.96);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.signals th:first-child, table.signals td:first-child { padding-left: 18px; }
table.signals th:last-child, table.signals td:last-child { padding-right: 14px; }
table.signals td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.signals tbody tr.coin-row { cursor: pointer; transition: background 0.14s; }
table.signals tbody tr.coin-row:hover { background: rgba(148, 163, 184, 0.055); }
table.signals tbody tr.coin-row.open { background: rgba(45, 212, 191, 0.045); }
.caret-col { width: 36px; }

.pair-main { font-size: 13.5px; font-weight: 650; letter-spacing: 0.01em; white-space: nowrap; }
.pair-main span { color: var(--dim); font-weight: 500; font-size: 11.5px; }
.pair-link { color: inherit; text-decoration: none; }
.pair-link:hover { color: var(--green); }
.pair-link:hover span { color: var(--green); }
.pair-sub { font-size: 10.5px; color: var(--dim); margin-top: 1px; font-variant-numeric: tabular-nums; }

.price-main { font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price-main.tick-up { animation: tick-up 0.7s ease-out; }
.price-main.tick-down { animation: tick-down 0.7s ease-out; }
@keyframes tick-up { from { color: #4ade80; } to { color: var(--text); } }
@keyframes tick-down { from { color: var(--red); } to { color: var(--text); } }

.live-pill {
  display: inline-flex; align-items: center; gap: 4px;
  margin-left: 6px; vertical-align: middle; white-space: nowrap;
  font-size: 8.5px; font-weight: 700; letter-spacing: 0.08em;
  color: #34d399; opacity: 0.9;
}
.live-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: #34d399; box-shadow: 0 0 6px rgba(52, 211, 153, 0.9);
  animation: live-pulse 2s ease-in-out infinite;
}
.live-pill.stale { color: var(--dim); opacity: 0.7; }
.live-pill.stale .live-dot { background: var(--dim); box-shadow: none; animation: none; }
@keyframes live-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.chg { font-size: 11px; font-variant-numeric: tabular-nums; }
.chg.up { color: #4ade80; }
.chg.down { color: var(--red); }
.chg.flat { color: var(--muted); }

.score-cell { min-width: 66px; }
.score-val { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.meter {
  height: 4px; margin-top: 5px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  overflow: hidden;
}
.meter-fill { height: 100%; border-radius: inherit; background: var(--muted); transition: width 0.4s ease; }
.meter-fill.strongbuy { background: linear-gradient(90deg, #2dd4bf, #5eead4); }
.meter-fill.buy { background: linear-gradient(90deg, #10b981, #4ade80); }
.meter-fill.watch { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.meter-fill.wait { background: linear-gradient(90deg, #64748b, #94a3b8); }
.meter-fill.avoid { background: linear-gradient(90deg, #ef4444, #f87171); }

.badge {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.badge.strongbuy { color: #053b35; background: linear-gradient(140deg, #5eead4, #2dd4bf); box-shadow: 0 0 14px rgba(45, 212, 191, 0.3); }
.badge.buy { color: #052e1b; background: #4ade80; }
.badge.watch { color: #3b2a05; background: #fbbf24; }
.badge.wait { color: #cbd5e1; background: rgba(148, 163, 184, 0.2); }
.badge.avoid { color: #fecaca; background: rgba(239, 68, 68, 0.2); border: 1px solid rgba(239, 68, 68, 0.35); }

.rsi-val { font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rsi-val .arrow { font-size: 10px; }
.rsi-val.hot { color: var(--red); }
.rsi-val.cool { color: var(--green); }
.tiny { font-size: 10px; color: var(--dim); white-space: nowrap; }

.trend { font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.trend.up { color: #4ade80; }
.trend.down { color: var(--red); }
.trend.mid { color: var(--amber); }

.volx { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--text); }
.volx.big { color: var(--green); }
.brk { font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em; margin-top: 2px; text-transform: uppercase; }
.brk.up { color: #4ade80; }
.brk.down { color: var(--red); }

.levels { font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.levels .lv { display: flex; align-items: center; gap: 4px; }
.levels .lv .tag { font-size: 9px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.05em; }
.lv-s { color: #4ade80; }
.lv-r { color: #fca5a5; }
.plan-stop { color: #fca5a5; }
.plan-target { color: #93c5fd; }
.rr { font-weight: 600; }
.rr.good { color: #4ade80; }
.rr.okay { color: var(--amber); }
.rr.poor { color: var(--red); }

.expand {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.2s;
}
.expand:hover { background: rgba(148, 163, 184, 0.12); color: var(--text); }
.open-link { text-decoration: none; }
.open-link:hover { color: var(--green); }
tr.coin-row { cursor: pointer; }

.loading {
  padding: 42px 10px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.loading::after {
  content: "";
  display: inline-block;
  width: 13px; height: 13px;
  margin-left: 9px;
  vertical-align: -2px;
  border: 2px solid rgba(148, 163, 184, 0.25);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.skeleton-row td { padding-top: 16px; padding-bottom: 16px; }
.sk {
  height: 10px;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.08), rgba(148, 163, 184, 0.16), rgba(148, 163, 184, 0.08));
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.empty { padding: 54px 20px; text-align: center; color: var(--muted); }
.empty-icon { font-size: 34px; color: var(--dim); line-height: 1; }
.empty h3 { margin: 10px 0 4px; font-size: 15px; color: var(--text); }
.empty p { margin: 0; font-size: 12.5px; }
.empty[hidden] { display: none; }

/* ---------- expanded detail ---------- */
.detail-row td { padding: 0 !important; background: #0a1019; border-bottom: 1px solid var(--line-strong) !important; }
.detail { padding: 18px 20px 22px; animation: slideIn 0.18s ease; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.detail-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.detail-title h3 { margin: 0; font-size: 15px; font-weight: 650; }
.detail-title .muted { font-size: 11.5px; color: var(--dim); }
.detail-title .spacer { flex: 1; }

.plan-strip {
  margin-left: auto;
  display: flex; flex-wrap: wrap; gap: 6px 16px;
  font-size: 11.5px; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.plan-strip b { color: var(--text); font-weight: 600; }

.chart-canvas {
  display: block;
  width: 100%;
  height: 210px;
  margin: 14px 0 18px;
  border-radius: 10px;
  background: rgba(5, 9, 15, 0.8);
  border: 1px solid var(--line);
}

.detail-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 26px;
}
.detail h4 {
  margin: 0 0 8px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--dim);
}
.detail h4.warn { margin-top: 16px; color: #fca5a5; }

.reason-list, .warn-list { list-style: none; margin: 0; padding: 0; }
.reason-list li, .warn-list li {
  display: flex; gap: 9px;
  padding: 4px 0;
  font-size: 12.5px;
  color: #c7d4e5;
}
.reason-list li .tick {
  flex: none;
  width: 15px; height: 15px;
  margin-top: 1px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 9px;
  color: #04211e;
  background: var(--green);
}
.warn-list li { color: #f3c4c4; }
.warn-list li .bang {
  flex: none;
  width: 15px; height: 15px;
  margin-top: 1px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
  color: #2b0d0d;
  background: var(--red);
}

.breakdown { display: flex; flex-direction: column; gap: 7px; }
.bd-row { display: grid; grid-template-columns: 76px 1fr 34px; align-items: center; gap: 9px; font-size: 11.5px; color: var(--muted); }
.bd-track { height: 5px; border-radius: 999px; background: rgba(148, 163, 184, 0.12); overflow: hidden; }
.bd-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0d9488, #2dd4bf); }
.bd-pts { text-align: right; font-variant-numeric: tabular-nums; color: var(--text); }

.metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.metric { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; }
.metric span:first-child { color: var(--dim); }
.metric span:last-child { font-variant-numeric: tabular-nums; color: #c7d4e5; }

/* ---------- explainer ---------- */
.how { padding-bottom: 18px; }
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 16px 18px 4px;
}
.how-item { display: flex; gap: 11px; padding: 11px 12px; border-radius: 11px; background: rgba(148, 163, 184, 0.04); border: 1px solid var(--line); }
.how-weight {
  flex: none;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 9px;
  font-size: 12px; font-weight: 700;
  color: var(--green);
  background: rgba(45, 212, 191, 0.1);
  border: 1px solid rgba(45, 212, 191, 0.22);
  font-variant-numeric: tabular-nums;
}
.how-item h3 { margin: 0 0 2px; font-size: 12.5px; font-weight: 600; }
.how-item p { margin: 0; font-size: 11.5px; color: var(--muted); line-height: 1.45; }

.plan-legend {
  display: flex; flex-wrap: wrap; gap: 6px 20px;
  padding: 14px 18px 0;
  font-size: 11.5px;
  color: var(--muted);
}
.plan-legend b { font-weight: 600; }
.lg-green { color: #4ade80; }
.lg-red { color: var(--red); }
.lg-blue { color: var(--blue); }
.lg-violet { color: var(--violet); }

.live-note {
  margin: 12px 18px 0;
  font-size: 11px;
  color: var(--muted);
}

.disclaimer {
  margin: 14px 18px 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--dim);
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 20px);
  max-width: min(440px, calc(100vw - 32px));
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 12.5px;
  background: #1a2436;
  border: 1px solid var(--line-strong);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 60;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { border-color: rgba(248, 113, 113, 0.5); color: #fecaca; }
.toast.ok { border-color: rgba(45, 212, 191, 0.45); color: #99f6e4; }

/* ---------- scrollbars ---------- */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.18); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.3); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; }
  .watchlist { max-height: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 2px; }
  .how-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  table.signals { min-width: 760px; }
  table.signals th:nth-child(5), table.signals td:nth-child(5),
  table.signals th:nth-child(6), table.signals td:nth-child(6),
  table.signals th:nth-child(7), table.signals td:nth-child(7),
  table.signals th:nth-child(8), table.signals td:nth-child(8) { display: none; }
}

@media (max-width: 860px) {
  .topbar { flex-wrap: wrap; padding: 12px 16px; }
  .topbar-actions { width: 100%; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
  .wrap { padding: 16px 16px 48px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-value { font-size: 24px; }
  .detail-cols { grid-template-columns: 1fr; }
  .filters { width: 100%; flex-wrap: wrap; }
  .search { flex: 1; width: auto; min-width: 120px; }
  .brand-text p { display: none; }
}

@media (max-width: 620px) {
  table.signals { min-width: 470px; }
  table.signals th:nth-child(9), table.signals td:nth-child(9),
  table.signals th:nth-child(10), table.signals td:nth-child(10) { display: none; }
  table.signals th:first-child, table.signals td:first-child { padding-left: 12px; }
  table.signals td { padding: 9px 8px; }
  .filters { gap: 6px; }
  select { flex: 1; min-width: 120px; }
  .panel-head { padding: 14px; }
  .stat { padding: 12px 14px 11px; }
  .stat-value { font-size: 22px; }
  .stat-sub { font-size: 10.5px; }
}

@media (max-width: 560px) {
  .how-grid { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr; }
  .plan-strip { margin-left: 0; }
  .status { display: none; }
  .wrap { padding: 12px 12px 42px; }
  .brand-text h1 { font-size: 15px; }
  .topbar-actions .btn { flex: 1; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
