/* ================================================================
   BetIQ PRO — Global Stylesheet (Corrected)
   ================================================================ */

:root {
  --bg: #080b12;
  --surface: #0d1120;
  --surface2: #121828;
  --surface3: #18213a;
  --border: #1c2540;
  --border2: #283660;
  --cyan: #00d4ff;
  --green: #00e5a0;
  --amber: #f5c842;
  --red: #ff4d6d;
  --purple: #a78bfa;
  --blue: #4f8ef7;
  --accent: var(--cyan);
  --accent2: var(--amber);
  --accent3: var(--red);
  --accent4: var(--blue);
  --text: #e8edf8;
  --muted: #5a6890;
  --muted2: #8e9bbf;
  --win: #00e5a0;
  --draw: #f5c842;
  --lose: #ff4d6d;
  --over: #4f8ef7;
  --under: #a78bfa;
  --gold: #f5c842;
  --silver: #9aa5c4;
  --bronze: #d97b4a;
  --sharp: #f97316;          /* moved from duplicate :root below */
  --radius: 8px;
  --radius-sm: 5px;
  --r: 8px;
  --r-sm: 5px;
}

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

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Ambient glow background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 10% 20%, rgba(0,212,255,0.04) 0%, transparent 70%),
    radial-gradient(ellipse 500px 500px at 85% 70%, rgba(0,229,160,0.04) 0%, transparent 70%),
    radial-gradient(ellipse 400px 300px at 50% 50%, rgba(79,142,247,0.03) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Subtle grid overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,212,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.app { display: flex; flex-direction: column; min-height: 100vh; position: relative; z-index: 1; }
.app-body { flex: 1; }

a { text-decoration: none; color: inherit; }

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ==================== HEADER ==================== */
#header { position: sticky; top: 0; z-index: 100; }

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  height: 60px;
  border-bottom: 1px solid var(--border);
  background: rgba(8,11,18,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  gap: 16px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #080b12;
  font-family: 'JetBrains Mono', monospace;
}

.logo-text {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text);
}

.logo-text span { color: var(--cyan); }

.logo-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--cyan);
  border: 1px solid rgba(0,212,255,0.3);
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(0,212,255,0.07);
}

/* Nav */
.navbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
}

.navbar a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.navbar a:hover {
  color: var(--text);
  background: var(--surface2);
}

.navbar a.active {
  color: var(--cyan);
  background: rgba(0,212,255,0.08);
}

/* Header right */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--cyan);
  border: 1px solid rgba(0,212,255,0.25);
  padding: 5px 10px;
  border-radius: 4px;
  background: rgba(0,212,255,0.06);
  white-space: nowrap;
}

.engine-tag {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--green);
  border: 1px solid rgba(0,229,160,0.2);
  padding: 4px 9px;
  border-radius: 4px;
  background: rgba(0,229,160,0.05);
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  animation: livePulse 1.6s ease-in-out infinite;
  flex-shrink: 0;
}

.pulse {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  animation: blink 1.8s ease-in-out infinite;
}

#clockDisplay {
  font-size: 11px;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
  min-width: 64px;
  text-align: right;
}

/* Hamburger toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted2);
  cursor: pointer;
  padding: 0;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  position: relative;
}
.nav-toggle:hover { border-color: var(--border2); color: var(--text); background: var(--surface2); }

.nav-toggle .ham-line {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  position: absolute;
}
.nav-toggle .ham-line:nth-child(1) { transform: translateY(-5px); }
.nav-toggle .ham-line:nth-child(2) { transform: translateY(0); }
.nav-toggle .ham-line:nth-child(3) { transform: translateY(5px); }

.nav-toggle.open .ham-line:nth-child(1) { transform: rotate(45deg); }
.nav-toggle.open .ham-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open .ham-line:nth-child(3) { transform: rotate(-45deg); }

/* ==================== ANIMATIONS ==================== */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(0,212,255,0.4); }
  50%       { opacity: 0.6; transform: scale(0.85); box-shadow: 0 0 0 4px rgba(0,212,255,0); }
}

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes countUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animated      { animation: countUp 0.4s ease both; }
.animated-fade { animation: fadeSlideIn 0.35s ease both; }
.anim          { animation: fadeUp 0.35s ease both; }

/* ==================== MAIN LAYOUT ==================== */
.main {
  max-width: 1020px;
  margin: 0 auto;
  padding: 40px 32px 32px;
}

.main-wide {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 32px 32px;
}

.stack   { display: flex; flex-direction: column; gap: 20px; }
.content { display: flex; flex-direction: column; gap: 24px; }

/* ==================== PANELS ==================== */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.panel-header,
.panel-hd {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface2);
  gap: 12px;
}

.panel-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel-title .icon { font-size: 13px; }

.panel-sub {
  font-size: 10px;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.panel-body,
.panel-bd { padding: 22px; }

/* ==================== SECTION LABELS ==================== */
.slabel {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 2.5px;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.slabel::before {
  content: '';
  width: 12px;
  height: 1px;
  background: var(--cyan);
  flex-shrink: 0;
}

/* ==================== FIELDS ==================== */
.field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted2);
  margin-bottom: 5px;
  letter-spacing: 0.3px;
}

.field input,
.field select {
  width: 100%;
  height: 40px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  padding: 0 12px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

/* Hide number spinners */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  appearance: none;
}
input[type=number] { -moz-appearance: textfield; }

.field input::placeholder { color: var(--muted); opacity: 0.5; }

.field input:focus,
.field select:focus,
input:focus,
select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.08);
  outline: none;
}

.field input.err,
input.err {
  border-color: var(--red) !important;
  box-shadow: 0 0 0 2px rgba(255,77,109,0.1);
}

.field input.ok,
.field input.valid { border-color: rgba(0,229,160,0.35); }

/* Custom select arrow */
.field select,
select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235a6890' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  height: 40px;
  padding: 0 32px 0 12px;
  outline: none;
  transition: border-color 0.15s;
}
.field select option,
select option { background: var(--surface2); color: var(--text); }

input[type=text] {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  padding: 0 10px;
  height: 38px;
  outline: none;
  transition: border-color 0.15s;
}
input[type=text]::placeholder { color: var(--muted); opacity: 0.5; }

/* ==================== GRIDS ==================== */
.grid3, .g3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid2, .g2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.g4          { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

.grid-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.grid-row .field-line { flex: 0 0 140px; }
.grid-row .field-grow { flex: 1; min-width: 90px; }

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 42px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--green));
  border-color: transparent;
  color: #080b12;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,212,255,0.25);
}
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled {
  background: var(--muted);
  border-color: var(--muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: var(--surface2);
  border-color: var(--border);
  color: var(--muted2);
}
.btn-secondary:hover {
  background: var(--surface3);
  color: var(--text);
  border-color: var(--border2);
}

.btn-outline { border-color: var(--border2); color: var(--muted2); }

.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.btn-group { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-group .btn { flex: 1; min-width: 140px; }

.btn-wide { width: 100%; max-width: 320px; }

/* ==================== LOADER ==================== */
.loader {
  display: none;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  margin-top: 16px;
}
.loader.show { display: flex; }

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0,229,160,0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

/* ==================== ERROR BOX ==================== */
.err-box {
  display: none;
  background: rgba(255,77,109,0.07);
  border: 1px solid rgba(255,77,109,0.3);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--red);
  margin-top: 12px;
}
.err-box.show { display: block; }

/* ==================== STATUS MESSAGES ==================== */
.status-msg {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.status-msg.info    { background: rgba(79,142,247,0.1);   border: 1px solid rgba(79,142,247,0.25);  color: var(--over); }
.status-msg.success { background: rgba(0,229,160,0.08);   border: 1px solid rgba(0,229,160,0.25);   color: var(--win); }
.status-msg.warning { background: rgba(245,200,66,0.08);  border: 1px solid rgba(245,200,66,0.25);  color: var(--draw); }

.status-ok {
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 5px;
  background: rgba(0,229,160,0.07);
  color: var(--win);
  border: 1px solid rgba(0,229,160,0.2);
}

/* ==================== TABS ==================== */
.tabs {
  display: flex;
  gap: 2px;
  background: var(--bg);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tab-btn {
  flex: 1;
  padding: 7px 10px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  cursor: pointer;
  border-radius: 5px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  transition: all 0.2s;
  white-space: nowrap;
  min-width: max-content;
  letter-spacing: 0.3px;
}
.tab-btn.active {
  background: var(--surface2);
  color: var(--cyan);
  border-color: var(--border);
}
.tab-btn:hover:not(.active) {
  color: var(--text);
  background: var(--surface3);
}

.tab-content        { display: none; }
.tab-content.active { display: block; }

/* ==================== CONFIDENCE METER ==================== */
.conf-dots { display: flex; gap: 4px; }
.conf-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.3s;
}
.conf-dot.filled            { background: var(--accent); }
.conf-dot.filled.yellow     { background: var(--draw); }
.conf-dot.filled.red        { background: var(--lose); }

.conf {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
}

/* ==================== PROBABILITY BARS ==================== */
.prob-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 5px;
  color: var(--muted);
  font-weight: 500;
}
.prob-bar-label .pct {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 12px;
}
.bar-track {
  height: 7px;
  background: var(--surface2);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid var(--border);
}
.bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.85s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0;
}
.bar-fill.home  { background: linear-gradient(90deg, var(--win), #00b87d); }
.bar-fill.draw  { background: linear-gradient(90deg, var(--draw), #d4a80a); }
.bar-fill.away  { background: linear-gradient(90deg, var(--lose), #b03c3c); }
.bar-fill.over  { background: linear-gradient(90deg, var(--over), #2563eb); }
.bar-fill.under { background: linear-gradient(90deg, var(--under), #7c3aed); }

/* ==================== VALUE BET CARDS ==================== */
.value-bet-list  { display: flex; flex-direction: column; gap: 10px; }

.value-bet-card {
  background: var(--surface2);
  border: 1px solid rgba(0,229,160,0.18);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color 0.2s, transform 0.2s;
}
.value-bet-card:hover { border-color: var(--accent2); transform: translateX(2px); }

.vb-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 5px 8px;
  border-radius: 4px;
  white-space: nowrap;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.5px;
}
.vb-badge.high   { background: rgba(0,229,160,0.12); color: var(--win);  border: 1px solid rgba(0,229,160,0.3); }
.vb-badge.medium { background: rgba(245,200,66,0.12); color: var(--draw); border: 1px solid rgba(245,200,66,0.3); }
.vb-badge.low    { background: rgba(79,142,247,0.12); color: var(--over); border: 1px solid rgba(79,142,247,0.3); }

.vb-info    { flex: 1; min-width: 0; }
.vb-market  { font-size: 13px; font-weight: 600; color: var(--text); }
.vb-detail  { font-size: 11px; color: var(--muted); font-family: 'JetBrains Mono', monospace; margin-top: 2px; }
.vb-edge    { text-align: right; flex-shrink: 0; }
.vb-edge-val   { font-size: 16px; font-weight: 700; color: var(--accent); font-family: 'JetBrains Mono', monospace; }
.vb-edge-label { font-size: 10px; color: var(--muted); }

/* ==================== METRIC GRID ==================== */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.metric {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 12px;
  text-align: center;
  transition: border-color 0.2s;
}
.metric:hover { border-color: var(--border2); }

.metric .mlabel,
.metric .ml {
  font-size: 9px;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
}

.metric .mval,
.metric .mv {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  line-height: 1;
}

.metric .msub,
.metric .ms  { font-size: 11px; color: var(--muted); margin-top: 5px; }
.metric .ms2 { font-size: 10px; color: var(--cyan); margin-top: 3px; }

.metric-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }

/* 4-card strength row: 4-col desktop → 2×2 tablet → 2-col mobile */
.metric-row-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }

/* ==================== STATS TABLES ==================== */
.stats-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.stats-table th {
  text-align: left;
  padding: 9px 12px;
  color: var(--muted);
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.stats-table td {
  padding: 9px 12px;
  border-bottom: 1px solid rgba(28,37,64,0.6);
  color: var(--text);
  font-size: 12px;
  vertical-align: middle;
}
.stats-table tr:last-child td { border-bottom: none; }
.stats-table tr:hover td     { background: rgba(0,229,160,0.025); }

/* Generic bare table */
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th {
  text-align: left;
  color: var(--muted);
  font-weight: 700;
  font-size: 10px;
  padding: 0 10px 8px 0;
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
}
td {
  padding: 7px 10px 7px 0;
  border-bottom: 1px solid rgba(28,37,64,0.5);
  color: var(--text);
  vertical-align: middle;
  font-size: 12px;
}
tr:last-child td                  { border-bottom: none; }
td:last-child, th:last-child      { text-align: right; padding-right: 0; }
tr:hover td                       { background: rgba(0,229,160,0.02); }

/* Markets / AH / Kelly tables */
.markets-table,
.ah-table,
.kelly-table { width: 100%; border-collapse: collapse; font-size: 12px; }

.markets-table th, .markets-table td,
.ah-table th, .ah-table td,
.kelly-table th, .kelly-table td {
  padding: 10px 8px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.markets-table th,
.ah-table th,
.kelly-table th {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: 'JetBrains Mono', monospace;
  background: var(--surface2);
}
.markets-table td,
.ah-table td  { color: var(--text); }
.kelly-table td { color: var(--text); font-family: 'JetBrains Mono', monospace; }
.markets-table tr:hover td,
.ah-table tr:hover td,
.kelly-table tr:hover td { background: var(--surface2); }

/* BetIQ-stats tbl */
.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.tbl th, .tbl td { padding: 9px 8px; text-align: center; border-bottom: 1px solid var(--border); }
.tbl th {
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: 'JetBrains Mono', monospace;
  background: var(--surface2);
}
.tbl tr:hover td { background: var(--surface2); }
.tbl td { font-family: 'JetBrains Mono', monospace; }

/* ==================== OVERROUND BAR ==================== */
.overround-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg);
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 12px;
}
.overround-label { color: var(--muted); flex: 1; }
.overround-val {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}
.overround-val.good { color: var(--win); }
.overround-val.fair { color: var(--draw); }
.overround-val.bad  { color: var(--lose); }

/* ==================== RECOMMENDATION CARDS ==================== */
.rec-card {
  background: var(--bg);
  border: 1px solid rgba(0,229,160,0.25);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.rec-card.safe { border-color: rgba(245,200,66,0.25); }

.rec-card-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
  font-family: 'JetBrains Mono', monospace;
}
.rec-card.safe .rec-card-title { color: var(--draw); }

.rec-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(28,37,64,0.7);
  gap: 12px;
}
.rec-item:last-child { border-bottom: none; }
.rec-label  { font-size: 13px; color: var(--text); font-weight: 500; }
.rec-detail { font-size: 11px; color: var(--muted); margin-top: 2px; font-family: 'JetBrains Mono', monospace; }
.rec-right  { text-align: right; flex-shrink: 0; }
.rec-prob   { font-size: 15px; font-weight: 700; color: var(--accent); font-family: 'JetBrains Mono', monospace; }
.rec-card.safe .rec-prob { color: var(--draw); }

/* ==================== BADGES ==================== */
.badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}
.badge.value, .badge-val { background: rgba(0,229,160,0.1);     color: var(--win);   border: 1px solid rgba(0,229,160,0.3); }
.badge.fair,  .badge-fair{ background: rgba(107,116,148,0.1);   color: var(--muted); border: 1px solid rgba(107,116,148,0.25); }
.badge.over,  .badge-over{ background: rgba(255,77,109,0.1);    color: var(--red);   border: 1px solid rgba(255,77,109,0.3); }

/* ==================== SIGNAL TAGS ==================== */
.signal {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.signal.over  { background: rgba(79,142,247,0.15);  color: var(--over); }
.signal.under { background: rgba(167,139,250,0.15); color: var(--under); }
.signal.even  { background: rgba(107,116,148,0.15); color: var(--muted); }
.signal.home  { background: rgba(0,229,160,0.15);   color: var(--win); }
.signal.away  { background: rgba(224,82,82,0.15);   color: var(--lose); }
.signal.fair  { background: rgba(107,116,148,0.15); color: var(--muted); }

.edge-signal {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-top: 4px;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}
.edge-signal.value     { background: rgba(0,229,160,0.12); color: var(--win);  border: 1px solid rgba(0,229,160,0.3); }
.edge-signal.fair      { background: rgba(107,116,148,0.1); color: var(--muted); border: 1px solid rgba(107,116,148,0.25); }
.edge-signal.overpriced{ background: rgba(224,82,82,0.1);   color: var(--lose); border: 1px solid rgba(224,82,82,0.25); }

/* betiq-stats sig variants */
.sig {
  display: inline-block;
  font-size: 8px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: 'JetBrains Mono', monospace;
}
.sig.val    { background: rgba(0,229,160,0.12);  color: var(--green); border: 1px solid rgba(0,229,160,0.3); }
.sig.fair   { background: rgba(107,116,148,0.1); color: var(--muted); border: 1px solid rgba(107,116,148,0.25); }
.sig.over   { background: rgba(79,142,247,0.12); color: var(--over);  border: 1px solid rgba(79,142,247,0.3); }
.sig.under  { background: rgba(167,139,250,0.12);color: var(--under); border: 1px solid rgba(167,139,250,0.3); }
.sig.home   { background: rgba(0,229,160,0.12);  color: var(--win); }
.sig.away   { background: rgba(255,77,109,0.12); color: var(--red); }
.sig.avoid  { background: rgba(255,77,109,0.1);  color: var(--red);   border: 1px solid rgba(255,77,109,0.25); }
.sig.slight { background: rgba(245,200,66,0.1);  color: var(--amber); border: 1px solid rgba(245,200,66,0.25); }

/* ==================== RESULT CARDS ==================== */
.rcard {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.rcard-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
  font-family: 'JetBrains Mono', monospace;
}

/* ==================== CORRECT SCORE GRID ==================== */
.cs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}
.cs-item {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 9px 7px;
  text-align: center;
  transition: border-color 0.2s;
}
.cs-item:hover { border-color: var(--border2); }
.cs-score     { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 4px; font-family: 'JetBrains Mono', monospace; }
.cs-prob      { font-size: 11px; color: var(--accent); font-weight: 700; font-family: 'JetBrains Mono', monospace; }
.cs-fair      { font-size: 10px; color: var(--muted); font-family: 'JetBrains Mono', monospace; margin-top: 3px; }
.cs-highlight {
  border-color: rgba(0,229,160,0.4);
  background: rgba(0,229,160,0.06);
  box-shadow: 0 0 8px rgba(0,229,160,0.06);
}

/* ==================== NOTE ==================== */
.note {
  font-size: 11px;
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.75;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
}
.note strong { color: var(--muted2); }

/* ==================== EMPTY STATE ==================== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 20px;
  text-align: center;
  gap: 12px;
}
.empty-state-icon  { font-size: 44px; }
.empty-state-title { font-size: 18px; letter-spacing: 2px; color: var(--muted); font-weight: 600; }
.empty-state-sub   { font-size: 13px; color: var(--muted); max-width: 300px; line-height: 1.65; }

/* ==================== FOOTER ==================== */
footer {
  text-align: center;
  padding: 32px;
  color: var(--muted);
  font-size: 11px;
  border-top: 1px solid var(--border);
  margin-top: 20px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.5px;
}

/* ==================== LINK GRID (other-links & index) ==================== */
.link-grid { display: grid; gap: 12px; }

.link-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--bg);
  border-radius: 10px;
  border: 1px solid var(--border);
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  cursor: pointer;
}
.link-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,229,160,0.08);
}
.link-item-label       { color: var(--accent); font-weight: 600; font-size: 14px; }
.link-item span:last-child { color: var(--muted); font-size: 16px; }

/* ==================== UTILITY CLASSES ==================== */
.mwin  { color: var(--win); }
.mdraw { color: var(--draw); }
.mlose { color: var(--lose); }

.btts-panel    { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px; text-align: center; }
.divider-short { height: 1px; background: var(--border); margin-bottom: 24px; }
.grid-mb       { margin-bottom: 20px; }
.predictor-desc{ font-size: 12px; color: var(--muted); margin-bottom: 20px; line-height: 1.65; }
.link-desc     { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.bar-track-mt  { margin-top: 12px; }
.msub-mt       { margin-top: 8px; }

/* ==================== HERO SECTION (index.html) ==================== */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
  min-height: 55vh;
  padding: 16px 0;
}
.hero-text h1 {
  font-size: 2.4rem;
  line-height: 1.12;
  margin-bottom: 18px;
  letter-spacing: 1.5px;
  font-weight: 700;
}
.hero-text h1 span { color: var(--accent); }
.hero-text p {
  color: var(--muted);
  margin-bottom: 32px;
  max-width: 420px;
  line-height: 1.7;
  font-size: 14px;
}
.buttons { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-card {
  background: var(--surface);
  padding: 28px;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.hero-card-title {
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 2px;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 20px;
}

/* ==================== MATCH PREDICTION PAGE ==================== */
.mp-row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.mp-row select          { width: 78px; flex-shrink: 0; height: 36px; font-size: 12px; padding: 0 8px 0 8px; }
.mp-row input[type=text]{ flex: 1; height: 36px; font-size: 13px; }

.panel-dot  { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.dot-home   { background: var(--accent); }
.dot-away   { background: var(--accent4); }

.info-list  { list-style: none; }
.info-item  {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 13px;
  gap: 8px;
}
.info-item:last-child { border-bottom: none; }
.info-key { color: var(--muted); }
.info-val { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.xg-row   { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 12px; }
.xg-team  { width: 50px; color: var(--muted); text-align: right; flex-shrink: 0; }
.xg-track { flex: 1; height: 6px; background: var(--surface2); border-radius: 99px; overflow: hidden; border: 1px solid var(--border); }
.xg-fill  { height: 100%; border-radius: 99px; transition: width 0.8s ease; }
.xg-num   { width: 40px; font-weight: 700; font-family: 'JetBrains Mono', monospace; font-size: 13px; }

.scores-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.score-chip {
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--muted);
  transition: border-color 0.2s;
}
.score-chip.top-1 { background: rgba(0,229,160,0.14); border-color: rgba(0,229,160,0.45); color: var(--accent); font-weight: 700; }
.score-chip.top-2 { background: rgba(0,229,160,0.07); border-color: rgba(0,229,160,0.22); color: var(--text); }
.ou-line { font-weight: 700; font-size: 14px; font-family: 'JetBrains Mono', monospace; }

/* ==================== BETIQ-ODDS SPECIFIC ==================== */
.grid3-odds { grid-template-columns: 1fr 1fr 1fr !important; gap: 7px !important; }
.grid3-odds .field input,
.grid3-odds .field select { font-size: 12px; padding: 0 7px 0 7px; }
.grid3-odds .field label  { font-size: 9px; }

.margin-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
}
.margin-label { color: var(--muted); flex-shrink: 0; }
.margin-value { font-weight: 700; font-size: 13px; }
.margin-value.good { color: var(--win); }
.margin-value.ok   { color: var(--draw); }
.margin-value.bad  { color: var(--lose); }
.margin-track { flex: 1; height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
.margin-fill  { height: 100%; border-radius: 3px; transition: width 0.4s ease; }
.margin-desc  { color: var(--muted); font-size: 10px; flex-shrink: 0; }

.expandable         { margin-bottom: 12px; }
.expandable-header  {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}
.expandable-header:hover { border-color: var(--border2); }
.expandable-header .slabel { margin-bottom: 0; }
.expandable-content { display: none; padding-top: 12px; }
.expandable.active .expandable-content { display: block; }

.kbd-hint { font-size: 10px; color: var(--muted); font-family: 'JetBrains Mono', monospace; display: flex; align-items: center; gap: 4px; }
.kbd      { background: var(--surface3); border: 1px solid var(--border2); border-radius: 3px; padding: 1px 5px; font-size: 10px; color: var(--muted2); }

.discrepancy-alert { padding: 10px 14px; border-radius: var(--radius-sm); font-size: 11px; font-family: 'JetBrains Mono', monospace; margin-bottom: 10px; }
.discrepancy-alert.warn { background: rgba(249,115,22,0.08); border: 1px solid rgba(249,115,22,0.3); color: var(--sharp); }
.discrepancy-alert.ok   { background: rgba(107,116,148,0.08); border: 1px solid rgba(107,116,148,0.25); color: var(--muted2); }

.top-scores-mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 4px; }
.top-scores-mini .cs-item { border-color: rgba(245,200,66,0.35); background: rgba(245,200,66,0.04); }

/* ==================== PRO PICKS (betiq-odds) ==================== */
.pro-pick {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}
.pro-pick::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.pro-pick.rank-1::before { background: linear-gradient(90deg, var(--gold), #f0a84e); }
.pro-pick.rank-2::before { background: linear-gradient(90deg, var(--silver), #c5cfe0); }
.pro-pick.rank-3::before { background: linear-gradient(90deg, var(--bronze), #e8a06a); }

.pro-pick-header  { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.pro-rank-badge   { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; font-family: 'JetBrains Mono', monospace; flex-shrink: 0; }
.pro-rank-badge.rank-1 { background: rgba(245,200,66,0.15); color: var(--gold);   border: 1px solid rgba(245,200,66,0.35); }
.pro-rank-badge.rank-2 { background: rgba(154,165,196,0.15); color: var(--silver); border: 1px solid rgba(154,165,196,0.35); }
.pro-rank-badge.rank-3 { background: rgba(217,123,74,0.15);  color: var(--bronze); border: 1px solid rgba(217,123,74,0.35); }

.pro-pick-title    { flex: 1; }
.pro-pick-market   { font-size: 15px; font-weight: 700; color: var(--text); }
.pro-pick-category { font-size: 10px; font-weight: 700; color: var(--muted); font-family: 'JetBrains Mono', monospace; letter-spacing: 1px; text-transform: uppercase; margin-top: 2px; }

.pro-pick-odds       { text-align: right; flex-shrink: 0; }
.pro-pick-odds-val   { font-size: 22px; font-weight: 800; font-family: 'JetBrains Mono', monospace; color: var(--accent); }
.pro-pick-odds-label { font-size: 10px; color: var(--muted); }

.pro-stats-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.pro-stat      { background: var(--surface2); border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; font-size: 11px; font-family: 'JetBrains Mono', monospace; color: var(--muted2); }
.pro-stat span { color: var(--text); font-weight: 700; }

.pro-reasoning       { font-size: 12px; color: var(--muted2); line-height: 1.7; border-top: 1px solid var(--border); padding-top: 10px; margin-top: 4px; }
.pro-confidence-bar  { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.pro-confidence-label{ font-size: 10px; font-weight: 700; color: var(--muted); font-family: 'JetBrains Mono', monospace; flex-shrink: 0; width: 70px; }
.pro-confidence-track{ flex: 1; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.pro-confidence-fill { height: 100%; border-radius: 3px; }
.pro-confidence-pct  { font-size: 11px; font-weight: 700; font-family: 'JetBrains Mono', monospace; flex-shrink: 0; width: 36px; text-align: right; }

.pro-summary-box { background: rgba(0,229,160,0.04); border: 1px solid rgba(0,229,160,0.18); border-radius: 10px; padding: 14px 18px; margin-bottom: 18px; font-size: 12px; color: var(--muted2); line-height: 1.7; }
.pro-summary-box strong { color: var(--accent); }

.pro-killer { background: rgba(224,82,82,0.06); border: 1px solid rgba(224,82,82,0.2); border-radius: 6px; padding: 7px 12px; margin-top: 8px; font-size: 11px; color: var(--lose); }
.pro-killer strong { color: var(--lose); }

.pro-loading         { text-align: center; padding: 40px 20px; }
.pro-loading-spinner { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 14px; }

.pro-error { background: rgba(224,82,82,0.07); border: 1px solid rgba(224,82,82,0.25); border-radius: 8px; padding: 16px 18px; font-size: 12px; color: var(--lose); margin: 12px 0; }

/* ==================== BETIQ-STATS SECTIONS ==================== */
.sec     { border-radius: 8px; padding: 14px 16px; margin-bottom: 14px; }
.sec-ctx { background: rgba(79,142,247,0.04); border: 1px solid rgba(79,142,247,0.14); }
.sec-title     { font-size: 9px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; font-family: 'JetBrains Mono', monospace; margin-bottom: 12px; }
.sec-ctx .sec-title { color: var(--blue); }

.card       { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; margin-bottom: 10px; }
.card-title { font-size: 9px; font-weight: 700; color: var(--muted); letter-spacing: 1.5px; text-transform: uppercase; font-family: 'JetBrains Mono', monospace; margin-bottom: 12px; }

.pbar-wrap  { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.pbar-track { flex: 1; height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; }
.pbar-fill  { height: 100%; border-radius: 2px; transition: width 0.7s cubic-bezier(.23,1,.32,1); }

.warn-box { background: rgba(255,77,109,0.06); border: 1px solid rgba(255,77,109,0.2); border-radius: 5px; padding: 8px 12px; font-size: 11px; color: var(--red); margin-bottom: 12px; display: flex; align-items: center; gap: 7px; font-family: 'JetBrains Mono', monospace; }

/* DQ ring */
.dq-ring-wrap  { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r); margin-bottom: 12px; }
.dq-ring       { position: relative; width: 54px; height: 54px; flex-shrink: 0; }
.dq-ring svg   { transform: rotate(-90deg); }
.dq-ring-bg    { fill: none; stroke: var(--border); stroke-width: 4; }
.dq-ring-fill  { fill: none; stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset 0.8s ease; }
.dq-center     { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; font-family: 'JetBrains Mono', monospace; }
.dq-info       { flex: 1; }
.dq-info-title { font-size: 11px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.dq-info-detail{ font-size: 10px; color: var(--muted); line-height: 1.5; }

/* Picks */
.pick { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; margin-bottom: 10px; position: relative; overflow: hidden; }
.pick::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; }
.pick.r1::before { background: linear-gradient(90deg, var(--gold), #f0a84e); }
.pick.r2::before { background: linear-gradient(90deg, var(--silver), #c5cfe0); }
.pick.r3::before { background: linear-gradient(90deg, var(--bronze), #e8a06a); }

.pick-hd   { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.pick-rank { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; font-family: 'JetBrains Mono', monospace; flex-shrink: 0; }
.pick-rank.r1 { background: rgba(245,200,66,0.12);  color: var(--gold);   border: 1px solid rgba(245,200,66,0.3); }
.pick-rank.r2 { background: rgba(154,165,196,0.12); color: var(--silver); border: 1px solid rgba(154,165,196,0.3); }
.pick-rank.r3 { background: rgba(217,123,74,0.12);  color: var(--bronze); border: 1px solid rgba(217,123,74,0.3); }

.pick-info     { flex: 1; }
.pick-market   { font-size: 14px; font-weight: 700; color: var(--text); }
.pick-cat      { font-size: 9px; font-weight: 700; color: var(--muted); font-family: 'JetBrains Mono', monospace; letter-spacing: 1px; text-transform: uppercase; margin-top: 2px; }
.pick-odds     { text-align: right; flex-shrink: 0; }
.pick-odds-val { font-size: 22px; font-weight: 800; font-family: 'JetBrains Mono', monospace; color: var(--cyan); }
.pick-odds-lbl { font-size: 9px; color: var(--muted); }

.pick-stats    { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 8px; }
.pick-stat     { background: var(--surface2); border: 1px solid var(--border); border-radius: 5px; padding: 5px 9px; font-size: 11px; font-family: 'JetBrains Mono', monospace; color: var(--muted2); }
.pick-stat span{ color: var(--text); font-weight: 700; }

.pick-bar      { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.pick-bar-lbl  { font-size: 9px; font-weight: 700; color: var(--muted); font-family: 'JetBrains Mono', monospace; flex-shrink: 0; width: 65px; }
.pick-bar-track{ flex: 1; height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
.pick-bar-fill { height: 100%; border-radius: 3px; transition: width 0.7s ease; }
.pick-bar-pct  { font-size: 10px; font-weight: 700; font-family: 'JetBrains Mono', monospace; flex-shrink: 0; width: 34px; text-align: right; }

/* Sim rows */
.sim-row   { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.sim-lbl   { font-size: 11px; color: var(--muted); width: 90px; text-align: right; flex-shrink: 0; font-family: 'JetBrains Mono', monospace; }
.sim-track { flex: 1; height: 22px; background: var(--border); border-radius: 4px; overflow: hidden; }
.sim-fill  { height: 100%; border-radius: 4px; display: flex; align-items: center; padding-left: 8px; transition: width 0.7s ease; }
.sim-val   { font-size: 9px; font-weight: 700; color: #fff; font-family: 'JetBrains Mono', monospace; }
.sim-model { width: 90px; font-size: 9px; font-family: 'JetBrains Mono', monospace; color: var(--muted); flex-shrink: 0; text-align: right; }

.fv-grid   { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 7px; margin-top: 8px; }
.fv-item   { background: rgba(0,229,160,0.04); border: 1px solid rgba(0,229,160,0.12); border-radius: 7px; padding: 9px 11px; text-align: center; }
.fv-market { font-size: 11px; font-weight: 700; color: var(--green); margin-bottom: 3px; }
.fv-cert   { font-size: 11px; font-weight: 600; color: var(--win); font-family: 'JetBrains Mono', monospace; }
.fv-prob   { font-size: 9px; color: var(--muted2); margin-top: 3px; font-family: 'JetBrains Mono', monospace; }

.summary-box { background: rgba(0,212,255,0.04); border: 1px solid rgba(0,212,255,0.15); border-radius: 9px; padding: 14px 18px; margin-bottom: 16px; font-size: 12px; color: var(--muted2); line-height: 1.75; }
.summary-box strong { color: var(--cyan); }

.ds-bar { background: rgba(0,212,255,0.05); border: 1px solid rgba(0,212,255,0.15); border-radius: var(--r-sm); padding: 8px 14px; font-size: 10px; font-family: 'JetBrains Mono', monospace; color: var(--cyan); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ==================== HISTORY TABLE ==================== */
.history-wrap { max-width: auto; margin: 28px auto 0; padding: 0 40px; }
.hist-panel   { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.hist-panel .panel-hd { padding: 14px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; background: var(--surface2); gap: 12px; }
.hist-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hist-table-wrap::-webkit-scrollbar       { height: 4px; }
.hist-table-wrap::-webkit-scrollbar-track { background: transparent; }
.hist-table-wrap::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

.htbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.htbl th { font-size: 10px; font-weight: 700; color: var(--muted2); text-transform: uppercase; letter-spacing: 0.6px; font-family: 'JetBrains Mono', monospace; background: var(--surface2); padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.htbl th:first-child { padding-left: 22px; }
.htbl th:last-child  { padding-right: 22px; }
.htbl td             { padding: 13px 14px; border-bottom: 1px solid rgba(28,37,64,0.5); vertical-align: middle; }
.htbl td:first-child { padding-left: 22px; }
.htbl td:last-child  { padding-right: 22px; }
.htbl tbody tr:last-child td { border-bottom: none; }
.htbl tbody tr:hover td      { background: var(--surface2); }

.h-date  { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted2); white-space: nowrap; }
.h-match { font-size: 14px; font-weight: 700; color: var(--text); white-space: nowrap; }
.h-match .vs { color: var(--muted); font-weight: 400; font-size: 11px; margin: 0 6px; }

.h-probs { display: flex; gap: 5px; flex-wrap: nowrap; }
.h-prob  { font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 4px; white-space: nowrap; }
.h-prob.h { background: rgba(0,229,160,0.1);  color: var(--win);  border: 1px solid rgba(0,229,160,0.2); }
.h-prob.d { background: rgba(245,200,66,0.1); color: var(--draw); border: 1px solid rgba(245,200,66,0.2); }
.h-prob.a { background: rgba(255,77,109,0.1); color: var(--red);  border: 1px solid rgba(255,77,109,0.2); }

.h-tips { display: flex; flex-wrap: wrap; gap: 4px; max-width: 360px; }
.h-tip  { font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 600; padding: 3px 7px; border-radius: 4px; background: var(--surface3); color: var(--muted2); border: 1px solid var(--border); white-space: nowrap; }

.h-actions { display: flex; gap: 5px; justify-content: center; }
.h-btn     { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface2); cursor: pointer; font-size: 14px; transition: all 0.15s; color: var(--muted2); }
.h-btn:hover                    { transform: translateY(-1px); }
.h-btn.reload:hover { background: rgba(0,212,255,0.08); border-color: var(--cyan); color: var(--cyan); }
.h-btn.delete:hover { background: rgba(255,77,109,0.08); border-color: var(--red); color: var(--red); }

.btn-outline   { border-color: var(--border2); color: var(--muted2); }
.h-btn-clear   { width: auto; padding: 0 14px; font-size: 11px; font-weight: 700; font-family: 'Inter', sans-serif; gap: 5px; letter-spacing: 0.3px; }
.btn-copy      { font-size: 11px; color: var(--muted2); background: var(--surface2); border: 1px solid var(--border); padding: 5px 11px; border-radius: 5px; cursor: pointer; font-family: 'Inter', sans-serif; font-weight: 600; }

.h-empty      { text-align: center; padding: 52px 20px; }
.h-empty-icon { font-size: 36px; margin-bottom: 12px; opacity: 0.35; }
.h-empty-txt  { font-size: 14px; font-weight: 600; color: var(--muted2); }
.h-empty-sub  { font-size: 12px; color: var(--muted); margin-top: 5px; }

/* ================================================================
   RESPONSIVE — consolidated into a single cascade
   ================================================================ */

/* ── 840px and below ── */
@media (max-width: 840px) {
  .main       { padding: 24px 20px; }
  .main-wide  { padding: 24px 20px; }
  .history-wrap { padding: 0 20px; }

  .panel-header { flex-wrap: wrap; gap: 8px; }
  .panel-sub    { font-size: 10px; }

  .g4 { grid-template-columns: repeat(2, 1fr); }

  .metric-grid   { grid-template-columns: repeat(3, 1fr); }
  .pro-stats-row { gap: 6px; }
  .pro-stat      { font-size: 10px; padding: 5px 8px; }

  .tabs   { gap: 3px; }
  .tab-btn{ font-size: 11px; padding: 7px 8px; }

  .markets-table th, .markets-table td,
  .ah-table th, .ah-table td,
  .kelly-table th, .kelly-table td { padding: 8px 6px; font-size: 11px; }

  .value-bet-card { flex-wrap: wrap; gap: 10px; }
  .vb-edge        { width: 100%; display: flex; align-items: center; gap: 8px; }
  .vb-edge-val    { font-size: 14px; }
}

/* ── 768px hamburger breakpoint ── */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  header {
    flex-wrap: wrap;
    padding: 0 16px;
    height: auto;
    min-height: 56px;
    row-gap: 0;
  }

  .logo        { order: 1; }
  .header-right{ order: 2; margin-left: auto; gap: 8px; }
  .nav-toggle  { order: 3; }

  .navbar {
    display: none;
    order: 4;
    width: calc(100% + 32px);
    flex-direction: column;
    gap: 2px;
    background: var(--surface2);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 8px 6px;
    margin: 0 -16px;
  }
  .navbar.open { display: flex; }
  .navbar a {
    font-size: 13px;
    padding: 10px 14px;
    border-radius: 6px;
    width: 100%;
  }
  .navbar a:hover { background: var(--surface3); }

  .live-badge  { font-size: 9px; padding: 4px 8px; }
  #clockDisplay{ font-size: 10px; min-width: auto; }

  /* Hero */
  .hero { grid-template-columns: 1fr; text-align: center; gap: 32px; }
  .hero-text p { margin: 0 auto 28px; }
  .buttons     { justify-content: center; }

  /* General */
  .content   { gap: 16px; }
  .panel-body{ padding: 14px 12px; }
  .field input, .field select { height: 40px; font-size: 13px; }
  .btn       { height: 40px; font-size: 13px; }
  .value-bet-card { flex-wrap: wrap; }
  .vb-info   { flex: 1 1 100%; }
  .vb-edge   { text-align: left; }
  .metric-grid { grid-template-columns: 1fr; }
}

/* ── 600px ── */
@media (max-width: 600px) {
  .main       { padding: 14px 12px; }
  .main-wide  { padding: 14px 12px; }
  .history-wrap { padding: 0 12px; }
  header      { padding: 0 12px; }
  .navbar     { margin: 0 -12px; width: calc(100% + 24px); }

  .logo-text  { font-size: 16px; }

  /* Collapse some 3-column grids to 2 */
  .grid3, .g3 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .grid2, .g2 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .g4         { grid-template-columns: repeat(2, 1fr); }
  .metric-grid{ grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .metric-row { grid-template-columns: repeat(2, 1fr); }
  .metric-row-4 { grid-template-columns: repeat(2, 1fr); }

  /* Keep odds grid at 3 columns for space efficiency */
  .grid3-odds { grid-template-columns: 1fr 1fr 1fr !important; gap: 7px !important; }
  .grid3-odds .field input,
  .grid3-odds .field select { font-size: 12px; padding: 0 7px 0 7px; }
  .grid3-odds .field label  { font-size: 9px; }

  .panel-header { padding: 12px 14px; }
  .panel-title  { font-size: 13px; }
  .panel-body   { padding: 14px 12px; }

  .field input, .field select { height: 40px; font-size: 13px; }
  .field label  { font-size: 10px; }
  .slabel       { font-size: 9px; }

  .btn          { height: 40px; font-size: 13px; padding: 0 14px; }
  .btn-group    { flex-direction: column; gap: 8px; }
  .btn-group .btn { width: 100%; }

  /* Horizontal-scroll tabs on small screens */
  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px;
    gap: 3px;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab-btn { flex-shrink: 0; font-size: 11px; padding: 7px 10px; white-space: nowrap; }

  .metric     { padding: 10px 8px; }
  .metric .mval { font-size: 20px; }
  .metric .mlabel { font-size: 9px; }
  .metric .msub, .metric .ms { font-size: 10px; }

  .rcard { padding: 10px; overflow-x: auto; }
  .markets-table, .ah-table { min-width: 480px; }
  .kelly-table { min-width: 520px; }

  .pro-pick        { padding: 14px 12px; }
  .pro-pick-market { font-size: 13px; }
  .pro-pick-odds-val{ font-size: 18px; }
  .pro-stats-row   { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .pro-stat        { font-size: 10px; }
  .pro-summary-box { font-size: 11px; padding: 10px 12px; }
  .pro-reasoning   { font-size: 11px; }
  .pro-killer      { font-size: 10px; }

  .value-bet-card  { padding: 10px 12px; }
  .vb-market       { font-size: 13px; }
  .vb-detail       { font-size: 10px; }

  .top-scores-mini { grid-template-columns: repeat(4, 1fr) !important; }
  .discrepancy-alert { font-size: 10px; padding: 8px 10px; }

  .margin-bar  { flex-wrap: wrap; gap: 6px; font-size: 10px; }
  .margin-desc { min-width: auto; }

  .note { font-size: 10px; padding: 10px 12px; line-height: 1.7; }
  .kbd-hint { display: none; }
  #clockDisplay { display: none; }
}

/* ── 480px (hero text only) ── */
@media (max-width: 480px) {
  .hero-text h1 { font-size: 1.9rem; }
}

/* ── 420px (very small) ── */
@media (max-width: 420px) {
  .main      { padding: 10px 8px; }
  .main-wide { padding: 10px 8px; }
  .history-wrap { padding: 0 8px; }
  header     { padding: 0 8px; }
  .navbar    { margin: 0 -8px; width: calc(100% + 16px); }

  .logo-text { font-size: 15px; }
  .logo-badge{ display: none; }

  /* Single column fallback for very narrow screens */
  .grid3, .g3,
  .grid2, .g2,
  .g4 { grid-template-columns: 1fr; gap: 8px; }

  /* Keep odds inputs at 3 col even at 420px — they're compact by design */
  .grid3-odds { grid-template-columns: 1fr 1fr 1fr !important; gap: 5px !important; }
  .grid3-odds .field input,
  .grid3-odds .field select { font-size: 11px; padding: 0 5px 0 5px; height: 38px; }
  .grid3-odds .field label  { font-size: 8px; }

  .metric-grid { grid-template-columns: repeat(2, 1fr); gap: 7px; }
  .metric-row-4 { grid-template-columns: repeat(2, 1fr); }
  .field input, .field select { height: 38px; font-size: 12px; }
  .metric .mval { font-size: 18px; }

  .panel-body   { padding: 10px 8px; }
  .panel-header { padding: 10px; }
  .panel-title  { font-size: 12px; gap: 5px; }
  .panel-sub    { display: none; }

  .btn     { height: 38px; font-size: 12px; }
  .tab-btn { font-size: 10px; padding: 6px 8px; }

  .pro-pick-header  { flex-wrap: wrap; }
  .pro-pick-odds    { width: 100%; display: flex; align-items: center; gap: 10px; justify-content: flex-start; margin-top: 4px; }
  .pro-pick-odds-val{ font-size: 16px; }

  .top-scores-mini { grid-template-columns: repeat(4, 1fr) !important; gap: 5px; }
  .cs-score { font-size: 14px; }
  .cs-prob  { font-size: 10px; }

  .live-badge   { display: none; }
  #clockDisplay { display: none; }
}
