/* ============================================================
   Candle Green AI — Blazor App Stylesheet
   Theme: Dark Precision Trading
   Fonts: Syne (headings) + DM Mono (numbers) + DM Sans (body)
   ============================================================ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --bg:        #080C14;
  --bg2:       #0D1420;
  --bg3:       #111927;
  --bg4:       #16202E;
  --surface:   #0D1420;
  --border:    rgba(255,255,255,0.07);
  --border2:   rgba(255,255,255,0.13);
  --text:      #ffffff;
  --text2:     #f4f6f9;
  --text3:     #ffff66;

  --gold:      #F0B429;
  --gold2:     #FCD34D;
  --golddim:   rgba(240,180,41,0.12);
  --goldbdr:   rgba(240,180,41,0.3);

  --bull:      #22C55E;
  --bulldim:   rgba(34,197,94,0.1);
  --bullbdr:   rgba(34,197,94,0.3);

  --bear:      #F43F5E;
  --beardim:   rgba(244,63,94,0.1);
  --bearbdr:   rgba(244,63,94,0.3);

  --blue:      #38BDF8;
  --bluedim:   rgba(56,189,248,0.1);
  --bluebdr:   rgba(56,189,248,0.25);

  --neut:      #94A3B8;
  --neutdim:   rgba(148,163,184,0.1);

  --r:         10px;
  --r2:        16px;

  --sans: 'DM Sans', sans-serif;
  --mono: 'DM Mono', monospace;
  --disp: 'Syne', sans-serif;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Animated background ────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(56,189,248,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56,189,248,0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ── App shell ─────────────────────────────────────────────── */
.app-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ── Sidebar ────────────────────────────────────────────────── */
.sidebar {
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.logo-area {
  padding: 26px 22px 18px;
  border-bottom: 1px solid var(--border);
}
.logo-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 3px;
}
.logo-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--gold), #F97316);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  box-shadow: 0 0 18px rgba(240,180,41,0.35);
}
.logo-name {
  font-family: var(--disp);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.4px;
  background: linear-gradient(135deg, var(--gold2), #F97316);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.logo-sub {
  font-size: 10px;
  color: var(--text3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-left: 44px;
}

/* ── Nav ────────────────────────────────────────────────────── */
.nav { padding: 14px 10px; flex: 1; }
.nav-section {
  font-size: 9px;
  color: var(--text3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0 12px;
  margin: 14px 0 5px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r);
  color: var(--text2);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 2px;
  border: 1px solid transparent;
  text-decoration: none;
}
.nav-item:hover    { background: var(--bg3); color: var(--text); }
.nav-item.active   {
  background: var(--golddim);
  color: var(--gold2);
  border-color: var(--goldbdr);
  font-weight: 500;
}
.nav-icon  { width: 16px; text-align: center; font-size: 14px; }
.nav-badge {
  margin-left: auto;
  background: var(--bear);
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 20px;
}

/* ── Market ticker ──────────────────────────────────────────── */
.market-ticker {
  margin: 10px;
  padding: 12px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r2);
}
.mt-label {
  font-size: 10px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.mt-val   { font-family: var(--mono); font-size: 14px; font-weight: 500; }
.mt-change { font-family: var(--mono); font-size: 12px; }

.dot-live {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--bull);
  display: inline-block;
  animation: pulse-dot 1.5s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity:1; transform:scale(1); }
  50%     { opacity:0.5; transform:scale(1.3); }
}

/* ── Main content ───────────────────────────────────────────── */
.main-content {
  padding: 28px 32px 60px;
  overflow-y: auto;
  min-height: 100vh;
}

/* ── Page topbar ────────────────────────────────────────────── */
.page-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.page-title {
  font-family: var(--disp);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.page-sub { color: var(--text2); font-size: 13px; margin-top: 2px; }
.topbar-left  { }
.topbar-right { display: flex; gap: 10px; align-items: center; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: linear-gradient(135deg, var(--gold), #F97316);
  border: none;
  border-radius: var(--r);
  color: #000;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  box-shadow: 0 0 18px rgba(240,180,41,0.2);
}
.btn-primary:hover    { box-shadow: 0 0 26px rgba(240,180,41,0.4); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary.w-full   { width: 100%; justify-content: center; }

.btn-outline {
  padding: 8px 16px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  color: var(--text2);
  font-family: var(--sans);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-outline:hover    { background: var(--bg4); color: var(--text); }
.btn-outline:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Colour helpers ─────────────────────────────────────────── */
.bull-txt  { color: var(--bull) !important; }
.bear-txt  { color: var(--bear) !important; }
.gold-txt  { color: var(--gold2) !important; }
.blue-txt  { color: var(--blue) !important; }
.neut-txt  { color: var(--neut) !important; }
.mono      { font-family: var(--mono) !important; }
.text-muted { color: var(--text3); }

/* ── KPI row ────────────────────────────────────────────────── */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.kpi-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.kpi-card:hover { border-color: var(--border2); transform: translateY(-2px); }
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
}
.gold-kpi::before  { background: linear-gradient(90deg, var(--gold),  transparent); }
.bull-kpi::before  { background: linear-gradient(90deg, var(--bull),  transparent); }
.bear-kpi::before  { background: linear-gradient(90deg, var(--bear),  transparent); }
.blue-kpi::before  { background: linear-gradient(90deg, var(--blue),  transparent); }
.neut-kpi::before  { background: linear-gradient(90deg, var(--neut),  transparent); }

.kpi-label { font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 7px; }
.kpi-val   { font-family: var(--disp); font-size: 26px; font-weight: 700; line-height: 1.1; }
.kpi-sub   { font-size: 11px; color: var(--text3); margin-top: 4px; }
.gold-kpi .kpi-val { color: var(--gold2); }
.bull-kpi .kpi-val { color: var(--bull);  }
.bear-kpi .kpi-val { color: var(--bear);  }
.blue-kpi .kpi-val { color: var(--blue);  }

/* ── Card base ──────────────────────────────────────────────── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 20px;
  margin-bottom: 16px;
  transition: border-color 0.2s;
}
.card:hover { border-color: var(--border2); }
.card-title {
  font-family: var(--disp);
  font-size: 11px;
  font-weight: 600;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  padding: 2px 10px;
  border-radius: 20px;
  text-transform: none;
  letter-spacing: 0;
}
.bull-badge { background: var(--bulldim); color: var(--bull); border: 1px solid var(--bullbdr); }
.bear-badge { background: var(--beardim); color: var(--bear); border: 1px solid var(--bearbdr); }
.gold-badge { background: var(--golddim); color: var(--gold2); border: 1px solid var(--goldbdr); }
.blue-badge { background: var(--bluedim); color: var(--blue); border: 1px solid var(--bluebdr); }
.neut-badge { background: var(--neutdim); color: var(--neut); border: 1px solid rgba(148,163,184,0.25); }

/* ── Dashboard layout ───────────────────────────────────────── */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 18px;
}
.dash-left  { display: flex; flex-direction: column; gap: 16px; }
.dash-right { display: flex; flex-direction: column; gap: 16px; }

/* ── Prediction card internals ──────────────────────────────── */
.pred-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}
.pred-trend {
  font-family: var(--disp);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.1;
}
.pred-sub { font-size: 12px; color: var(--text3); margin-top: 4px; }

.bull-txt.pred-trend { text-shadow: 0 0 30px rgba(34,197,94,0.35); }
.bear-txt.pred-trend { text-shadow: 0 0 30px rgba(244,63,94,0.35); }

/* ── Confidence ring ────────────────────────────────────────── */
.conf-ring {
  width: 70px; height: 70px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.conf-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.conf-inner { text-align: center; }
.conf-pct   { font-family: var(--mono); font-size: 14px; font-weight: 500; color: var(--gold2); }
.conf-lbl   { font-size: 9px; color: var(--text3); }

/* ── Signal chips ───────────────────────────────────────────── */
.signal-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.signal-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 11px;
  color: var(--text2);
}
.signal-dot    { width: 7px; height: 7px; border-radius: 50%; }
.sd-red        { background: var(--bear); }
.sd-green      { background: var(--bull); }
.sd-gold       { background: var(--gold); }
.sd-neutral    { background: var(--neut); }

/* ── Price grid ─────────────────────────────────────────────── */
.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.price-box {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 12px;
  text-align: center;
}
.price-box-label { font-size: 9px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 4px; }
.price-box-val   { font-family: var(--mono); font-size: 17px; font-weight: 500; }
.price-box-diff  { font-family: var(--mono); font-size: 10px; margin-top: 2px; }
.bull-box .price-box-val, .bull-box .price-box-diff { color: var(--bull); }
.bear-box .price-box-val, .bear-box .price-box-diff { color: var(--bear); }
.blue-box .price-box-val, .blue-box .price-box-diff { color: var(--blue); }

/* ── Range bar ──────────────────────────────────────────────── */
.range-bar-wrap    { margin-bottom: 18px; }
.range-bar-labels  {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text3);
  margin-bottom: 6px;
}
.range-bar-track   { height: 6px; background: var(--bg4); border-radius: 3px; position: relative; overflow: visible; }
.range-bar-fill    {
  position: absolute;
  inset: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--bear), var(--gold), var(--bull));
}
.range-bar-open    {
  position: absolute;
  top: -4px;
  width: 3px;
  height: 14px;
  background: var(--gold2);
  border-radius: 2px;
  transform: translateX(-50%);
  box-shadow: 0 0 6px var(--gold);
}

/* ── S/R grid ───────────────────────────────────────────────── */
.sr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sr-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 9px 12px;
}
.sr-label { font-size: 11px; color: var(--text2); }
.sr-val   { font-family: var(--mono); font-size: 13px; font-weight: 500; }

/* ── Strategy card ──────────────────────────────────────────── */
.strategy-card {
  background: linear-gradient(135deg, var(--bg3), var(--bg4));
  border-radius: var(--r2);
  padding: 18px;
  position: relative;
  overflow: hidden;
}
.strategy-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
}
.bull-border { border: 1px solid var(--bullbdr); }
.bull-border::before { background: linear-gradient(90deg, var(--bull), var(--gold), transparent); }
.bear-border { border: 1px solid var(--bearbdr); }
.bear-border::before { background: linear-gradient(90deg, var(--bear), var(--gold), transparent); }
.neut-border { border: 1px solid var(--border2); }
.neut-border::before { background: linear-gradient(90deg, var(--neut), transparent); }

.strategy-type-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold2);
  margin-bottom: 8px;
}
.strategy-name   { font-family: var(--disp); font-size: 15px; font-weight: 700; margin-bottom: 8px; line-height: 1.4; }
.strategy-detail { font-size: 12px; color: var(--text2); line-height: 1.7; margin-bottom: 12px; }
.strategy-tags   { display: flex; gap: 6px; flex-wrap: wrap; }
.stag {
  font-size: 10px;
  padding: 3px 9px;
  border-radius: 20px;
  background: var(--bg4);
  border: 1px solid var(--border);
  color: var(--text2);
}

/* ── Probability bars ───────────────────────────────────────── */
.prob-list { display: flex; flex-direction: column; gap: 8px; }
.prob-row  { display: flex; align-items: center; gap: 10px; }
.prob-label { font-size: 11px; color: var(--text2); min-width: 95px; }
.prob-track { flex: 1; height: 6px; background: var(--bg4); border-radius: 3px; overflow: hidden; }
.prob-fill  { height: 100%; border-radius: 3px; transition: width 0.8s ease; }
.fill-bull  { background: var(--bull); }
.fill-bear  { background: var(--bear); }
.fill-neut  { background: var(--neut); }
.prob-pct        { font-family: var(--mono); font-size: 11px; color: var(--text3); min-width: 38px; text-align: right; }
.prob-pct-active { color: var(--gold2); font-weight: 500; }

/* ── Input summary ──────────────────────────────────────────── */
.input-summary { display: flex; flex-direction: column; }
.input-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.input-summary-row:last-child { border-bottom: none; }
.isr-label { color: var(--text2); }
.isr-val   { font-family: var(--mono); font-size: 13px; font-weight: 500; }
.news-row  { padding: 8px 0; font-size: 11px; }
.news-label { color: var(--text3); display: block; margin-bottom: 3px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; }
.news-val   { color: var(--text2); }

/* ── Cue gauge ──────────────────────────────────────────────── */
.cue-gauge-wrap { }
.cue-track {
  height: 8px;
  border-radius: 4px;
  overflow: visible;
  position: relative;
  margin-bottom: 8px;
}
.cue-fill { position: absolute; inset: 0; border-radius: 4px; }
.cue-needle {
  position: absolute;
  top: -5px;
  width: 3px;
  height: 18px;
  background: var(--gold2);
  border-radius: 2px;
  transform: translateX(-50%);
  box-shadow: 0 0 6px var(--gold);
  transition: left 0.5s ease;
}
.cue-labels {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--text3);
}

/* ── Form styles ────────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 20px;
}
.form-card-title {
  font-family: var(--disp);
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field-label {
  font-size: 10px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  display: flex;
  align-items: center;
  gap: 4px;
}
.req { color: var(--bear); }
.opt { color: var(--text3); font-size: 9px; text-transform: none; letter-spacing: 0; }

.f-input, .f-select {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  padding: 9px 11px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.f-input:focus, .f-select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(240,180,41,0.1);
}
.f-mono { font-family: var(--mono); }
.f-select { appearance: none; cursor: pointer; }

.form-check {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text2);
  cursor: pointer;
}
.form-check input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--gold);
  cursor: pointer;
}

/* ── Toggle pair ─────────────────────────────────────────────── */
.toggle-pair {
  display: flex;
  border: 1px solid var(--border2);
  border-radius: var(--r);
  overflow: hidden;
}
.tp-btn {
  flex: 1;
  padding: 9px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  border: none;
  background: var(--bg3);
  color: var(--text2);
  transition: all 0.12s;
  border-right: 1px solid var(--border2);
}
.tp-btn:last-child     { border-right: none; }
.tp-btn:hover          { background: var(--bg4); color: var(--text); }
.tp-btn.active-bear    { background: var(--bear); color: #fff; }
.tp-btn.active-bull    { background: var(--bull); color: #fff; }
.tp-btn.active-gold    { background: var(--gold); color: #000; }

/* ── Preview card ───────────────────────────────────────────── */
.preview-card { border-color: var(--goldbdr); background: linear-gradient(135deg, var(--bg2), var(--bg3)); }
.preview-trend {
  font-family: var(--disp);
  font-size: 32px;
  font-weight: 800;
  text-align: center;
  padding: 18px 0 4px;
  letter-spacing: -1px;
}
.preview-conf { text-align: center; font-size: 12px; color: var(--text3); margin-bottom: 14px; }
.preview-prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.pp-item { background: var(--bg4); border-radius: var(--r); padding: 10px; text-align: center; }
.pp-label { font-size: 9px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 4px; }
.pp-val   { font-family: var(--mono); font-size: 14px; font-weight: 500; }

.preview-empty { text-align: center; padding: 24px 16px; color: var(--text3); }
.preview-empty-icon { font-size: 28px; margin-bottom: 10px; }
.preview-empty p { font-size: 13px; margin-bottom: 6px; }
.preview-hint { font-size: 11px; line-height: 1.6; }

/* ── Error & loading states ─────────────────────────────────── */
.error-banner {
  background: var(--beardim);
  border: 1px solid var(--bearbdr);
  border-radius: var(--r);
  padding: 12px 16px;
  color: var(--bear);
  font-size: 13px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.error-close { background: none; border: none; color: var(--bear); cursor: pointer; font-size: 14px; }

.loading-state { text-align: center; padding: 60px 20px; color: var(--text2); }
.spinner-lg {
  width: 36px; height: 36px;
  border: 3px solid var(--border2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 14px;
}
.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(0,0,0,0.3);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Empty state ────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 80px 40px;
  max-width: 420px;
  margin: 0 auto;
}
.empty-icon { font-size: 40px; color: var(--text3); margin-bottom: 16px; }
.empty-state h2 { font-family: var(--disp); font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.empty-state p  { color: var(--text2); font-size: 14px; margin-bottom: 22px; }
.empty-hint     { font-size: 11px; color: var(--text3); margin-top: 16px; }

/* ── History table ──────────────────────────────────────────── */
.acc-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  overflow: hidden;
  margin-bottom: 16px;
}
.acc-box    { background: var(--bg2); padding: 14px 18px; text-align: center; }
.acc-label  { font-size: 9px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 4px; }
.acc-val    { font-family: var(--disp); font-size: 20px; font-weight: 700; }

.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th {
  background: var(--bg3);
  font-size: 9px;
  font-weight: 600;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.data-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); color: var(--text2); }
.data-table tr:hover td { background: var(--bg3); }
.data-table tr:last-child td { border-bottom: none; }
.row-correct td { background: rgba(34,197,94,0.03); }
.row-wrong   td { background: rgba(244,63,94,0.03); }
.result-tick { color: var(--bull); font-weight: 700; font-size: 14px; }
.result-cross{ color: var(--bear); font-size: 14px; }

.trend-pill { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 600; }
.tp-hd { background: var(--beardim); color: var(--bear); }
.tp-dn { background: rgba(252,165,165,0.1); color: #fca5a5; }
.tp-nt { background: var(--neutdim); color: var(--neut); }
.tp-up { background: rgba(134,239,172,0.1); color: #86efac; }
.tp-hu { background: var(--bulldim); color: var(--bull); }

.pagination { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 16px; }
.page-info  { font-size: 12px; color: var(--text2); }

/* ── Accuracy page ──────────────────────────────────────────── */
.cls-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.cls-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 12px 10px;
  text-align: center;
}
.cls-name { font-size: 9px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.cls-acc  { font-family: var(--disp); font-size: 20px; font-weight: 700; margin-bottom: 3px; }
.cls-n    { font-size: 10px; color: var(--text3); margin-bottom: 8px; }
.cls-bar  { height: 4px; background: var(--bg4); border-radius: 2px; overflow: hidden; }
.cls-bar-fill { height: 100%; border-radius: 2px; }
.cls-bar-fill.bull-txt { background: var(--bull); }
.cls-bar-fill.gold-txt { background: var(--gold); }
.cls-bar-fill.bear-txt { background: var(--bear); }

.reg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.reg-box  { background: var(--bg3); border-radius: var(--r); padding: 16px; text-align: center; }
.reg-label { font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.reg-val   { font-family: var(--disp); font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.reg-sub   { font-size: 11px; color: var(--text3); line-height: 1.5; }
.reg-note  { font-size: 11px; color: var(--text3); line-height: 1.6; }

/* ── Blazor loading screen ──────────────────────────────────── */
.blazor-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 20px;
}
.bl-logo { display: flex; align-items: center; gap: 12px; }
.bl-icon { font-size: 32px; }
.bl-name {
  font-family: var(--disp);
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold2), #F97316);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.bl-bar {
  width: 200px;
  height: 3px;
  background: var(--bg3);
  border-radius: 2px;
  overflow: hidden;
}
.bl-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), #F97316);
  border-radius: 2px;
  animation: load-bar 2s ease-in-out infinite;
}
@keyframes load-bar {
  0%   { width: 0%; margin-left: 0; }
  50%  { width: 70%; margin-left: 15%; }
  100% { width: 0%; margin-left: 100%; }
}
.bl-msg { font-size: 12px; color: var(--text3); }

/* ── Animations ─────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up  { animation: fadeUp 0.45s ease both; }
.delay-1  { animation-delay: 0.08s; }
.delay-2  { animation-delay: 0.16s; }
.delay-3  { animation-delay: 0.24s; }
.delay-4  { animation-delay: 0.32s; }

/* ── Disclaimer ─────────────────────────────────────────────── */
.disclaimer {
  font-size: 11px;
  color: var(--text3);
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 20px;
  line-height: 1.6;
}

/* ── Blazor error UI ────────────────────────────────────────── */
#blazor-error-ui {
  background: lightyellow;
  bottom: 0;
  box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
  display: none;
  left: 0;
  padding: 0.6rem 1.25rem 0.7rem 1.25rem;
  position: fixed;
  width: 100%;
  z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }

/* ── Not found ──────────────────────────────────────────────── */
.not-found { text-align: center; padding: 80px 20px; }
.not-found h2 { font-family: var(--disp); font-size: 24px; margin-bottom: 14px; }
.not-found a  { color: var(--gold2); text-decoration: none; }
