/* ═══════════════════════════════════════════════════════════════════════
   VSV Bot — інфо-панель · професійний «трейдинг-термінал»
   Токенізована палітра, dark (дефолт) + light. Семантика (long/short)
   окремо від акценту (біткоїн-золото).
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  /* neutrals — з легким синім зсувом (обрані, не дефолтні сірі) */
  --bg:        #0a0e17;
  --bg2:       #0d1220;
  --surface:   #131a26;
  --elev:      #1a2333;
  --line:      #26324a;
  --line-soft: #1c2536;
  --txt:       #e8eef7;
  --txt-dim:   #aab6c8;
  --muted:     #7d8ba1;

  /* accent — біткоїн-золото, лише для бренду/₿ */
  --accent:    #f5a623;
  --accent-2:  #ffc960;

  /* semantic (не акцент) */
  --long:   #2fd18b;
  --long-2: #6ee7b7;
  --short:  #ff5d6c;
  --short-2:#ff9aa4;
  --warn:   #f5b544;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.55);
  --ring: 0 0 0 3px rgba(245,166,35,.25);

  /* Same stack as the bot (static/css/style.css) so both sites read identically */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg:#eef1f6; --bg2:#e7ebf2; --surface:#ffffff; --elev:#f5f7fb;
    --line:#d3dae6; --line-soft:#e3e8f0;
    --txt:#141a24; --txt-dim:#3d4759; --muted:#697588;
    --accent:#c77d0a; --accent-2:#e0951f;
    --long:#0f9d63; --long-2:#0b7a4d; --short:#d63647; --short-2:#b02332; --warn:#c98a12;
    --shadow: 0 1px 2px rgba(20,30,50,.08), 0 10px 30px -16px rgba(20,30,50,.25);
  }
}
:root[data-theme="dark"] {
  --bg:#0a0e17; --bg2:#0d1220; --surface:#131a26; --elev:#1a2333;
  --line:#26324a; --line-soft:#1c2536;
  --txt:#e8eef7; --txt-dim:#aab6c8; --muted:#7d8ba1;
  --accent:#f5a623; --accent-2:#ffc960;
  --long:#2fd18b; --long-2:#6ee7b7; --short:#ff5d6c; --short-2:#ff9aa4; --warn:#f5b544;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.55);
}
:root[data-theme="light"] {
  --bg:#eef1f6; --bg2:#e7ebf2; --surface:#ffffff; --elev:#f5f7fb;
  --line:#d3dae6; --line-soft:#e3e8f0;
  --txt:#141a24; --txt-dim:#3d4759; --muted:#697588;
  --accent:#c77d0a; --accent-2:#e0951f;
  --long:#0f9d63; --long-2:#0b7a4d; --short:#d63647; --short-2:#b02332; --warn:#c98a12;
  --shadow: 0 1px 2px rgba(20,30,50,.08), 0 10px 30px -16px rgba(20,30,50,.25);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(245,166,35,.06), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(47,209,139,.05), transparent 55%),
    var(--bg);
  color: var(--txt);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

/* ── header ── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  /* full width of the window — brand far-left, account far-right */
  padding: 14px 24px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.brand { margin-right: auto; }
.top-actions { margin-left: auto; }
.brand { font-weight: 800; font-size: 16px; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
.brand .logo { width: 30px; height: 30px; border-radius: 8px; object-fit: cover;
  box-shadow: 0 0 0 1px var(--line), 0 2px 8px -3px rgba(0,0,0,.6); }
.brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 4px rgba(245,166,35,.18); }

.top-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.auth-links { display: flex; align-items: center; gap: 12px; font-size: 12.5px; }
.auth-links a { color: var(--accent); text-decoration: none; font-weight: 600; }
.auth-links a:hover { text-decoration: underline; }
.auth-links .who { color: var(--txt-dim); }

.conn { font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px; letter-spacing: .01em; }
.conn--ok   { color: var(--long);  background: color-mix(in srgb, var(--long) 14%, transparent); }
.conn--wait { color: var(--warn);  background: color-mix(in srgb, var(--warn) 14%, transparent); }
.conn--err  { color: var(--short); background: color-mix(in srgb, var(--short) 14%, transparent); }

/* ── layout ── */
.wrap { width: 100%; margin: 0; padding: 22px 24px 40px; display: grid; gap: 18px; }

.card {
  background: linear-gradient(180deg, var(--surface), var(--bg2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.card h2 {
  margin: 0 0 16px; font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: var(--txt-dim);
  display: flex; align-items: center; gap: 9px;
  padding-bottom: 12px; border-bottom: 1px solid var(--line-soft);
}
.card h2::before { content: ""; width: 3px; height: 14px; border-radius: 2px;
  background: linear-gradient(var(--accent), var(--accent-2)); }

.pill { font-size: 11px; font-weight: 700; background: var(--elev); color: var(--txt-dim);
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; letter-spacing: .02em; }

.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono  { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.accent{ color: var(--accent); }
.dir-long  { color: var(--long);  font-weight: 800; }
.dir-short { color: var(--short); font-weight: 800; }
.pnl-pos { color: var(--long);  font-weight: 800; }
.pnl-neg { color: var(--short); font-weight: 800; }

/* ═══ 🎯 Вікно потенціалу ═══ */
.pot-head { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 6px; }
.pot-verdict { font-size: 30px; font-weight: 900; letter-spacing: -.02em; }
.conf-wrap { flex: 1; min-width: 200px; }
.conf-bar { height: 10px; border-radius: 999px; background: var(--elev);
  border: 1px solid var(--line-soft); overflow: hidden; }
.conf-bar > i { display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--long), var(--long-2)); transition: width .5s cubic-bezier(.2,.7,.2,1); }
.conf-txt { display: block; color: var(--muted); font-size: 11px; margin-top: 6px;
  text-transform: uppercase; letter-spacing: .06em; }

.price-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  background: var(--elev); border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  padding: 13px 16px; margin: 14px 0; font-size: 13px; color: var(--txt-dim); flex-wrap: wrap; }
.price-row b { color: var(--txt); font-size: 22px; font-weight: 800; font-family: var(--mono); letter-spacing: -.01em; }

.reasons-list { display: grid; gap: 6px; margin: 12px 0 2px; }
.rsn { font-size: 13.5px; font-weight: 600; }

/* banner CTR line */
.banner-ctr { margin-top: 12px; padding: 9px 12px; border-radius: var(--radius-sm);
  background: var(--elev); border: 1px solid var(--line-soft); font-size: 13px; font-weight: 700; }

/* banner Decision block */
.banner-dec { margin-top: 12px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--elev); border: 1px solid var(--line-soft); }
.dec-head { font-size: 16px; font-weight: 900; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* 🧠 Значок «супер-мозок»: без явного розміру inline-SVG падав у дефолт 300×150
   (та величезна голова на банері). Фіксуємо компактно, як у боті. */
.ein-icon { width: 1.6em; height: 1.6em; vertical-align: -0.36em; flex: none; }
.dec-badge { font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 6px;
  background: color-mix(in srgb, currentColor 15%, transparent); }
.dec-rat { color: var(--txt-dim); font-size: 12.5px; margin: 7px 0; }
.dec-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--surface); border: 1px solid var(--line-soft); }
.dec-bar .dl { background: linear-gradient(90deg, var(--long), var(--long-2)); }
.dec-bar .ds { background: linear-gradient(90deg, var(--short-2), var(--short)); }
.dec-pct { display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 800; margin-top: 5px; }
.card-note { margin: 10px 2px 0; font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.fc-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.fc-line { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600;
  background: var(--elev); border: 1px solid var(--line-soft); border-radius: 999px; padding: 6px 12px; }
.fc-line.accent { background: color-mix(in srgb, var(--warn) 12%, transparent);
  border-color: color-mix(in srgb, var(--warn) 30%, transparent); color: var(--warn); }

.pot-sub { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.pot-sub-title { font-weight: 800; font-size: 14px; letter-spacing: -.01em; }
.verdict-badge { font-weight: 800; font-size: 12px; padding: 6px 13px; border-radius: 8px; letter-spacing: .01em; }
.pot-dir { background: var(--elev); border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  padding: 10px 14px; margin: 10px 0; font-weight: 700; font-size: 13.5px; }

.exh-good { color: var(--long); }  .exh-mid { color: var(--warn); }  .exh-bad { color: var(--short); }
.verdict-badge.exh-good { background: color-mix(in srgb, var(--long) 15%, transparent); }
.verdict-badge.exh-mid  { background: color-mix(in srgb, var(--warn) 15%, transparent); }
.verdict-badge.exh-bad  { background: color-mix(in srgb, var(--short) 15%, transparent); }

.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 12px; margin: 14px 0; }
.metric { background: var(--elev); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 12px 14px; }
.metric-lbl { color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; }
.metric-val { font-size: 18px; font-weight: 800; margin-top: 4px; font-family: var(--mono); }
.metric-val .muted { font-family: var(--font); font-size: 12px; }

.exh-row { display: flex; align-items: center; gap: 12px; margin: 12px 0 2px; }
.exh-lbl { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.exh-bar { flex: 1; height: 12px; border-radius: 999px; background: var(--elev);
  border: 1px solid var(--line-soft); overflow: hidden; }
.exh-bar > i { display: block; height: 100%; border-radius: 999px; transition: width .5s cubic-bezier(.2,.7,.2,1); }
.exh-bar > i.exh-good { background: linear-gradient(90deg, var(--long), var(--long-2)); }
.exh-bar > i.exh-mid  { background: linear-gradient(90deg, var(--warn), var(--accent-2)); }
.exh-bar > i.exh-bad  { background: linear-gradient(90deg, var(--short), var(--short-2)); }
.exh-val { font-weight: 900; min-width: 42px; text-align: right; font-family: var(--mono); font-size: 15px; }
.notes { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 5px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.notes li { color: var(--muted); font-size: 12px; padding-left: 15px; position: relative; }
.notes li::before { content: "•"; position: absolute; left: 2px; color: var(--accent); }

/* ═══ ₿ BTCUSDT бар + перекидний годинник (у гаммі теми) ═══ */
.btc-bar { display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: var(--elev); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; }
.btc-left { display: flex; align-items: center; gap: 12px; }
.btc-sym { font-weight: 900; font-size: 19px; color: var(--accent); letter-spacing: -.01em; }
.btc-bar .dir-long, .btc-bar .dir-short, .btc-bar .muted { font-size: 15px; }
.btc-strength { flex: 1; min-width: 150px; }
.sbar { height: 12px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--line); overflow: hidden; }
.sbar > i { display: block; height: 100%; border-radius: 999px; transition: width .5s ease; }
.band-strong { background: linear-gradient(90deg, var(--long), var(--long-2)); }
.band-mid    { background: linear-gradient(90deg,#65a30d,#84cc16); }
.band-weak   { background: linear-gradient(90deg, var(--warn), var(--accent-2)); }
.band-none   { background: var(--muted); }
.sbar-lbl { display: block; color: var(--muted); font-size: 10.5px; margin-top: 5px;
  text-transform: uppercase; letter-spacing: .06em; }

/* split-flap flip clock — theme-aware (light card in light, dark in dark) */
.flip { display: flex; gap: 4px; align-items: center; }
.flip-digit {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 48px; font-size: 30px; font-weight: 800;
  font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--txt);
  background: var(--surface); border: 1px solid var(--line); border-radius: 7px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 3px 8px -4px rgba(0,0,0,.35);
}
.flip-digit::after { content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 1px; background: var(--line); }
.flip-sep { font-size: 26px; font-weight: 900; color: var(--accent); padding: 0 1px; opacity: .85; }

.btc-status { font-size: 14px; font-weight: 800; padding: 9px 15px; border-radius: 8px;
  letter-spacing: .04em; white-space: nowrap; }
.st-start { color: var(--long);  background: color-mix(in srgb, var(--long) 16%, transparent); }
.st-stop  { color: var(--short); background: color-mix(in srgb, var(--short) 16%, transparent); }
.st-pause { color: #cbd5e1;       background: rgba(148,163,184,.16); }
.st-count { color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); }

/* ═══ tables ═══ */
.table-scroll { overflow-x: auto; margin: 0 -4px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
th { color: var(--muted); font-weight: 700; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }
tbody tr:last-child td { border-bottom: none; }
td.mono, td .mono { font-family: var(--mono); }

.fbar { width: 140px; height: 9px; border-radius: 999px; background: var(--elev);
  border: 1px solid var(--line-soft); overflow: hidden; }
.fbar > i { display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--long), var(--long-2)); }

/* ═══ KPI tiles ═══ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 12px; }
.tile { background: var(--elev); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 14px 16px; }
.tile-val { font-size: 21px; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; }
.tile-lbl { color: var(--muted); font-size: 11px; margin-top: 7px; text-transform: uppercase; letter-spacing: .04em; }

/* ═══ 🔐 гостьовий hero (вхід/реєстрація) — компактна картка як на боті ═══ */
.hero { text-align: center; max-width: 430px; margin: 6vh auto 0; padding: 28px 26px; }
.hero-inner { margin: 0 auto; padding: 0; display: grid; gap: 12px; justify-items: center; }
.hero-logo { width: 76px; height: 76px; border-radius: 18px; object-fit: cover;
  box-shadow: 0 0 0 1px var(--line), 0 10px 30px -12px rgba(0,0,0,.6); }
.hero-title { margin: 4px 0 0; font-size: 22px; font-weight: 900; letter-spacing: -.02em; text-wrap: balance; }
.hero-sub { margin: 0; color: var(--txt-dim); font-size: 14px; max-width: 46ch;
  text-wrap: balance; line-height: 1.6; }
.nowrap { white-space: nowrap; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 11px 22px; border-radius: 10px;
  font-weight: 700; font-size: 14px; text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform .12s, background .2s, border-color .2s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: #1a1204;
  box-shadow: 0 6px 18px -8px rgba(245,166,35,.6); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost { background: var(--elev); color: var(--txt); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); }
.hero-note { margin: 4px 0 0; color: var(--muted); font-size: 12px; }

/* ═══ 🔔 сповіщення (toggles) ═══ */
.ntf-warn { background: color-mix(in srgb, var(--warn) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); color: var(--warn);
  border-radius: var(--radius-sm); padding: 10px 13px; font-size: 12.5px; margin-bottom: 12px; }
.ntf-warn a { color: var(--accent); }
.ntf-row { display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.ntf-row:last-child { border-bottom: none; }
.ntf-lbl { font-size: 13.5px; font-weight: 600; }
.switch { position: relative; width: 46px; height: 26px; border-radius: 999px; flex: none;
  background: var(--elev); border: 1px solid var(--line); cursor: pointer; padding: 0;
  transition: background .2s; }
.switch .knob { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--muted); transition: transform .2s, background .2s; }
.switch.on { background: color-mix(in srgb, var(--long) 40%, var(--elev)); border-color: var(--long); }
.switch.on .knob { transform: translateX(20px); background: var(--long); }
.switch:disabled { opacity: .45; cursor: not-allowed; }
.switch:focus-visible { outline: none; box-shadow: var(--ring); }

/* ═══ footer ═══ */
.foot { width: 100%; margin: 4px 0 28px; padding: 0 24px;
  display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }

@media (max-width: 620px) {
  .brand { font-size: 14px; }
  .wrap { padding: 16px 12px 32px; gap: 14px; }
  .card { padding: 15px 14px; }
  th, td { padding: 9px 9px; }
  .pot-verdict { font-size: 24px; }
  .flip-digit { min-width: 27px; height: 40px; font-size: 24px; }
  .price-row b { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
