/* EdgePickr styles — extracted from index.html in v10.5.0 */

/* ── THEME TOKENS ──────────────────────────────────────────────────────────── */
:root {
  --bg:         #f4f5f9;
  --surface:    #ffffff;
  --surface2:   #f0f1f7;
  --border:     #e4e6ef;
  --text:       #111827;
  --muted:      #6b7280;
  --accent:     #5b5bf6;
  --accent-bg:  #ede9fe;
  --green:      #047857;
  --green-bg:   #d1fae5;
  --red:        #b91c1c;
  --red-bg:     #fee2e2;
  --yellow:     #b45309;
  --yellow-bg:  #fef3c7;
  --shadow:     0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.09);
}
[data-theme="dark"] {
  --bg:         #0f1117;
  --surface:    #1a1d27;
  --surface2:   #22263a;
  --border:     #2e3249;
  --text:       #e8eaf0;
  --muted:      #8b90a7;
  --accent:     #7c74ff;
  --accent-bg:  #1e1b4b;
  --green:      #34d399;
  --green-bg:   #064e3b;
  --red:        #f87171;
  --red-bg:     #7f1d1d;
  --yellow:     #fbbf24;
  --yellow-bg:  #78350f;
  --shadow:     0 1px 3px rgba(0,0,0,0.28);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.40);
}

/* ── RESET ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif; min-height: 100vh; transition: background 0.2s, color 0.2s; font-size: 14px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }

/* ── HEADER ─────────────────────────────────────────────────────────────────── */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 58px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
  overflow: visible;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-icon { width: 32px; height: 32px; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.brand-icon img { width: 100%; height: 100%; object-fit: cover; }
.brand-name { font-size: 15px; font-weight: 700; }
.brand-sub  { font-size: 10.5px; color: var(--muted); }
nav { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
nav::-webkit-scrollbar { display: none; }
.tab-btn { padding: 7px 14px; border-radius: 7px; border: none; background: transparent; color: var(--muted); font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.tab-btn:hover { background: var(--surface2); color: var(--text); }
.tab-btn.active { background: var(--accent-bg); color: var(--accent); font-weight: 600; }
/* Bottom nav voor mobiel */
.bottom-nav { display: none; }
@media (max-width: 680px) {
  nav { display: none; }
  /* v12.2.1: iOS Safari hardening. Zonder GPU-layer (transform: translateZ(0))
     kan de fixed-bottom nav tijdens momentum-scroll / address-bar toggle
     kortstondig uit view verdwijnen. translate3d + will-change dwingen een
     eigen composite layer af, wat Safari's scroll-repaint stabiliseert.
     `env(safe-area-inset-bottom)` op `bottom` ipv padding zorgt ook dat de
     nav correct op iPhone met home-indicator positioneert. */
  .bottom-nav { display: flex; position: fixed;
    bottom: env(safe-area-inset-bottom, 0); left: 0; right: 0; width: 100%;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
    border-top: 0.5px solid var(--border); z-index: 200;
    padding: 6px 8px 10px; box-sizing: border-box;
    transform: translate3d(0, 0, 0);
    will-change: transform;
    -webkit-transform: translate3d(0, 0, 0); }
  /* Fallback: geen backdrop-filter support → opaque achtergrond zodat
     content er niet doorheen kan schemeren en rendering sneller is. */
  @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .bottom-nav { background: var(--surface); }
  }
  .bnav-btn { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 2px 0;
    border: none; background: none; color: var(--muted); font-size: 10px; font-weight: 500; cursor: pointer; min-width: 0;
    -webkit-tap-highlight-color: transparent; }
  .bnav-btn.active { color: var(--accent); font-weight: 700; }
  .bnav-btn .bnav-icon { font-size: 20px; line-height: 1; }
  .bnav-more { flex: 1; position: relative; display: flex; }
  .bnav-more > .bnav-btn { flex: 1; }
  .bnav-menu { display: none; position: absolute; bottom: 100%; right: 4px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
    border: 0.5px solid var(--border); border-radius: 14px; padding: 4px; min-width: 170px;
    box-shadow: 0 -8px 30px rgba(0,0,0,.12); margin-bottom: 8px; }
  .bnav-menu.open { display: block; }
  .bnav-menu-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 8px;
    font-size: 13px; font-weight: 500; color: var(--text); cursor: pointer; border: none; background: none; width: 100%; }
  .bnav-menu-item:hover { background: var(--surface2); }
  .bnav-menu-item.active { color: var(--accent); font-weight: 600; }
  main { padding-bottom: 70px; }
}
#darkBtn { width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface2); color: var(--text); cursor: pointer; font-size: 15px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: border-color 0.15s; }
#darkBtn:hover { border-color: var(--accent); }

/* ── LAYOUT ─────────────────────────────────────────────────────────────────── */
.page { display: none; max-width: 1380px; margin: 0 auto; padding: 24px 24px; }
.page.active { display: block; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.grid2 > *, .grid3 > *, .charts-grid > *, .home-grid > * { min-width: 0; }

/* ── CARD ───────────────────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; box-shadow: var(--shadow); }
.card-hd { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.card-title { font-size: 14.5px; font-weight: 600; }
.card-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ── BUTTONS ────────────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 18px; border-radius: 8px; border: none; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.15s; font-family: inherit; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary  { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { filter: brightness(1.1); }
.btn-red      { background: var(--red); color: #fff; }
.btn-red:hover:not(:disabled) { filter: brightness(1.1); }
.btn-ghost    { background: transparent; border: 1px solid var(--border); color: var(--muted); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost.active { background: var(--accent); border-color: var(--accent); color: #0b1220; font-weight: 600; }
.btn-ghost.active:hover { color: #0b1220; }
.btn-success  { background: var(--green-bg); color: var(--green); border: 1px solid transparent; }
.btn-success:hover { border-color: var(--green); }
.btn-sm       { padding: 6px 12px; font-size: 12px; }

/* ── SCANS PAGE ─────────────────────────────────────────────────────────────── */
.log-wrap { margin-top: 14px; display: none; }
.log-box { background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 13px 15px; font-family: 'SF Mono','Cascadia Code','Fira Code',monospace; font-size: 11.5px; min-height: 80px; max-height: 180px; overflow-y: auto; line-height: 1.9; color: var(--text); }
.log-ok  { color: var(--green); }
.log-err { color: var(--red); }
.spinner { width: 13px; height: 13px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.65s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── HERO BANNER ────────────────────────────────────────────────────────────── */
.hero { background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #4338ca 70%, #6d28d9 100%); border-radius: 16px; padding: 28px 32px; margin-bottom: 20px; position: relative; overflow: hidden; color: #fff; }
.hero::before { content: ''; position: absolute; top: -60px; right: -60px; width: 280px; height: 280px; background: rgba(255,255,255,0.04); border-radius: 50%; }
.hero::after  { content: ''; position: absolute; bottom: -80px; right: 120px; width: 200px; height: 200px; background: rgba(255,255,255,0.03); border-radius: 50%; }
.hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.hero-brand { font-size: 12px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; opacity: 0.6; margin-bottom: 8px; }
.hero-time { font-size: 42px; font-weight: 800; line-height: 1; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.hero-date { font-size: 13px; opacity: 0.65; margin-top: 5px; }
.hero-quote { max-width: 280px; text-align: right; }
.hero-quote-text { font-size: 13px; line-height: 1.6; opacity: 0.8; font-style: italic; }
.hero-quote-tag { font-size: 10px; opacity: 0.45; margin-top: 5px; text-transform: uppercase; letter-spacing: 0.8px; }
.hero-stats { display: flex; gap: 0; margin-top: 24px; background: rgba(255,255,255,0.08); border-radius: 12px; overflow: hidden; }
.hero-stat { flex: 1; padding: 14px 20px; border-right: 1px solid rgba(255,255,255,0.1); }
.hero-stat:last-child { border-right: none; }
.hero-stat-val { font-size: 22px; font-weight: 700; line-height: 1; }
.hero-stat-lbl { font-size: 10.5px; opacity: 0.55; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }

/* ── LOG BOX (donker, binnen scan panels) ───────────────────────────────────── */
.scan-panel .log-wrap { margin-top: 14px; display: none; }
.scan-panel .log-box { background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; padding: 12px 14px; font-family: 'SF Mono','Cascadia Code','Fira Code',monospace; font-size: 11px; min-height: 60px; max-height: 160px; overflow-y: auto; line-height: 1.9; color: rgba(255,255,255,0.65); }
.scan-panel .log-ok  { color: #34d399; }
.scan-panel .log-err { color: #f87171; }

/* ── SCAN PANELS ────────────────────────────────────────────────────────────── */
.scan-panels { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 20px; }
.scan-panel { border-radius: 14px; padding: 24px; position: relative; overflow: hidden; cursor: default; transition: transform 0.15s, box-shadow 0.15s; }
.scan-panel:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(0,0,0,0.15); }
.scan-panel-pm { background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%); color: #fff; }
.scan-panel-lv { background: linear-gradient(135deg, #1a0a0a 0%, #4c0519 100%); color: #fff; }
.scan-panel::before { content: ''; position: absolute; top: -40px; right: -40px; width: 160px; height: 160px; background: rgba(255,255,255,0.04); border-radius: 50%; pointer-events: none; }
/* Light-mode: scan-panel zelf adapt naar subtiele blauwe gradient zodat alles consistent is */
[data-theme="light"] .scan-panel-pm { background: linear-gradient(135deg, #eef2ff 0%, #dbeafe 100%); color: var(--text); }
[data-theme="light"] .scan-panel-lv { background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%); color: var(--text); }
[data-theme="light"] .scan-panel::before { background: rgba(99,102,241,0.06); }
[data-theme="light"] .scan-panel .sp-tag { background: rgba(15,23,42,0.06); color: var(--text); }
[data-theme="light"] .scan-panel .picks-hdr { color: var(--muted); }
[data-theme="light"] .scan-panel .prob-bar  { background: var(--surface2); }
[data-theme="light"] .scan-panel .prob-pct  { color: var(--muted); }
[data-theme="light"] .scan-panel .log-box { background: rgba(15,23,42,0.04); border-color: var(--border); color: var(--muted); }
/* Light-mode: alle hardcoded rgba(255,255,255,x) inline styles krijgen themed fallback via class-overrides */
[data-theme="light"] .scan-panel .sp-sub,
[data-theme="light"] .scan-panel div[style*="color:rgba(255,255,255"],
[data-theme="light"] .scan-panel span[style*="color:rgba(255,255,255"] { color: var(--muted) !important; }
[data-theme="light"] .scan-panel div[style*="background:rgba(255,255,255"],
[data-theme="light"] .scan-panel span[style*="background:rgba(255,255,255"] { background: rgba(15,23,42,0.04) !important; border-color: var(--border) !important; }
.sp-icon { font-size: 32px; margin-bottom: 12px; display: block; }
.sp-title { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.sp-sub { font-size: 12px; opacity: 0.55; margin-bottom: 16px; line-height: 1.5; }
.sp-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.sp-tag { background: rgba(255,255,255,0.12); border-radius: 20px; padding: 3px 10px; font-size: 11px; font-weight: 500; }
.sp-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 9px; border: none; font-size: 13px; font-weight: 700; cursor: pointer; transition: all 0.15s; font-family: inherit; }
.sp-btn-pm { background: #3b82f6; color: #fff; }
.sp-btn-pm:hover:not(:disabled) { background: #2563eb; }
.sp-btn-lv { background: #ef4444; color: #fff; }
.sp-btn-lv:hover:not(:disabled) { background: #dc2626; }
.sp-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── PICKS DISPLAY ──────────────────────────────────────────────────────────── */
.picks-wrap { margin-top: 16px; }
.picks-hdr { font-size: 11px; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 600; margin-bottom: 10px; }
.edge-badge { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 10px; vertical-align: middle; margin-left: 6px; }
.pick-card { background: var(--surface); border: 1px solid var(--border); color: var(--text); border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; transition: background 0.15s; }
.pick-card:hover { background: var(--surface2); }
.pick-card.top { border-left: 3px solid #60a5fa; }
.pick-name { font-weight: 600; font-size: 13px; color: var(--text); }
.pick-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.prob-row  { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.prob-bar  { width: 70px; height: 3px; background: rgba(255,255,255,0.15); border-radius: 2px; }
.prob-fill { height: 100%; border-radius: 2px; }
.prob-pct  { font-size: 10.5px; color: rgba(255,255,255,0.5); }
.pick-right { text-align: right; }
.pick-odds  { font-size: 20px; font-weight: 800; color: var(--text); line-height: 1.1; }
.pick-units { font-size: 10px; color: var(--muted); margin-top: 2px; }
.pick-log-btn { margin-top: 6px; }

/* ── RECENT BETS SIDEBAR ────────────────────────────────────────────────────── */
.home-grid { display: grid; grid-template-columns: 1fr 320px; gap: 16px; }
.recent-bets-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px; box-shadow: var(--shadow); }
.rb-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.rb-title { font-size: 13.5px; font-weight: 700; }
.rb-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 12.5px; }
.rb-row:last-child { border-bottom: none; }
.rb-teams { flex: 1; min-width: 0; }
.rb-match { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-market { font-size: 11px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-odds { font-size: 13px; font-weight: 700; color: var(--accent); flex-shrink: 0; min-width: 36px; text-align: right; }
.rb-empty { text-align: center; padding: 24px; color: var(--muted); font-size: 13px; }
.scan-desc { display: none; }

/* ── STATS ROW ──────────────────────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(106px, 1fr)); gap: 10px; margin-bottom: 18px; }
.stat-box { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 13px 10px; text-align: center; box-shadow: var(--shadow); }
.stat-val { font-size: 19px; font-weight: 700; line-height: 1.15; }
.stat-lbl { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; }
.green  { color: var(--green); }
.red    { color: var(--red); }
.yellow { color: var(--yellow); }

/* ── ADD FORM ───────────────────────────────────────────────────────────────── */
.collapse-hd { display: flex; align-items: center; justify-content: space-between; }
.collapse-body { overflow: hidden; max-height: 0; transition: max-height 0.25s ease; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 11px; padding-top: 4px; }
.field label { display: block; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 5px; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; background: var(--surface2); border: 1px solid var(--border); border-radius: 7px; color: var(--text); padding: 8px 10px; font-size: 13px; outline: none; transition: border-color 0.15s; font-family: inherit; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 34px; }
.form-actions { margin-top: 13px; display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.form-msg-txt { font-size: 12.5px; }

/* ── BET TABLE ──────────────────────────────────────────────────────────────── */
.tbl-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: auto; box-shadow: var(--shadow); }
.bets-table { width: 100%; border-collapse: collapse; font-size: 12.5px; white-space: nowrap; }
.bets-table th { text-align: left; padding: 10px 13px; color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border); font-weight: 600; background: var(--surface2); }
.bets-table td { padding: 10px 13px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.bets-table tr:last-child td { border-bottom: none; }
.bets-table tr:hover td { background: var(--surface2); }
.badge { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-w { background: var(--green-bg); color: var(--green); }
.badge-l { background: var(--red-bg); color: var(--red); }
.badge-o { background: var(--yellow-bg); color: var(--yellow); }
.sel-outcome { background: var(--surface2); border: 1px solid var(--border); border-radius: 5px; color: var(--text); padding: 3px 6px; font-size: 12px; cursor: pointer; font-family: inherit; }
.wl-pos { color: var(--green); font-weight: 600; }
.wl-neg { color: var(--red); font-weight: 600; }
.del-btn { background: none; border: none; color: var(--muted); cursor: pointer; padding: 3px 6px; border-radius: 4px; font-size: 13px; transition: all 0.15s; }
.del-btn:hover { background: var(--red-bg); color: var(--red); }
.empty-row td { text-align: center; color: var(--muted); padding: 32px; font-size: 13px; }

/* ── DATA/CHARTS ────────────────────────────────────────────────────────────── */
.charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; box-shadow: var(--shadow); }
.chart-title { font-size: 13.5px; font-weight: 600; margin-bottom: 14px; }
.chart-wrap { position: relative; height: 200px; }
.admin-split-grid { display: grid; grid-template-columns: minmax(280px, 1fr) 2fr; gap: 24px; padding: 8px 0; }
.admin-two-col-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 8px 0; }
#page-data table, #page-analyse table, #page-info table { min-width: 620px; }
#page-data .chart-card, #page-analyse .card, #page-info .card { overflow-x: auto; }

/* ── LIVE PAGE ──────────────────────────────────────────────────────────────── */
.live-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.toggle-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.sw { position: relative; display: inline-block; width: 38px; height: 22px; }
.sw input { opacity: 0; width: 0; height: 0; }
.sw-track { position: absolute; inset: 0; background: var(--border); border-radius: 11px; cursor: pointer; transition: 0.2s; }
.sw-track:before { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: 0.2s; }
.sw input:checked + .sw-track { background: var(--accent); }
.sw input:checked + .sw-track:before { transform: translateX(16px); }
.live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.live-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; box-shadow: var(--shadow); }
.live-card.my-bet { border-left: 3px solid var(--accent); }
.live-card.scheduled { opacity: 0.65; }
.live-sport { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 600; margin-bottom: 4px; }
.live-teams { font-size: 13.5px; font-weight: 600; margin-bottom: 8px; }
.live-score-row { display: flex; align-items: center; justify-content: space-between; }
.live-score { font-size: 20px; font-weight: 700; color: var(--accent); }
.live-time { font-size: 11px; color: var(--muted); }
.live-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--red); animation: blink 1.4s infinite; margin-right: 5px; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.25} }
.empty-state { text-align: center; padding: 56px 24px; color: var(--muted); }
.live-events-btn { background: none; border: 1px solid var(--border); border-radius: 6px; color: var(--muted); cursor: pointer; font-size: 12px; padding: 3px 8px; margin-top: 8px; transition: all 0.15s; font-family: inherit; }
.live-events-btn:hover { background: var(--surface2); color: var(--text); }
.live-events-btn.active { border-color: var(--accent); color: var(--accent); background: rgba(96,165,250,0.08); }
.live-events-panel { margin-top: 8px; border-top: 1px solid var(--border); padding-top: 8px; display: none; max-height: 260px; overflow-y: auto; }
.live-events-panel.open { display: block; }
.live-event-row { display: flex; align-items: center; gap: 7px; font-size: 12px; padding: 3px 0; }
.live-event-min { color: var(--muted); font-size: 11px; min-width: 30px; text-align: right; font-weight: 600; }
.live-event-ico { font-size: 14px; width: 18px; text-align: center; }
.live-event-txt { flex: 1; line-height: 1.4; }
.live-event-team { font-size: 10px; color: var(--muted); }
.empty-state .ico { font-size: 38px; margin-bottom: 12px; }

/* ── ANALYSE PAGE ───────────────────────────────────────────────────────────── */
.search-bar { display: flex; gap: 10px; margin-bottom: 18px; }
.search-bar .field { flex: 1; }
.analysis-query-row { display: flex; gap: 8px; }
.analysis-card { border-color: color-mix(in srgb, var(--accent) 22%, var(--border)); }
.pick-full { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.pick-full-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.pick-full-title { font-size: 13.5px; font-weight: 600; }
.pick-full-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.reason-box { font-size: 12px; color: var(--muted); line-height: 1.75; background: var(--surface2); border-radius: 6px; padding: 10px 13px; margin-top: 8px; }

/* ── MODAL ──────────────────────────────────────────────────────────────────── */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 200; display: none; align-items: center; justify-content: center; }
.overlay.open { display: flex; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px; width: min(480px, calc(100vw - 28px)); box-shadow: var(--shadow-md); }
.modal-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal-title { font-size: 15.5px; font-weight: 700; }
.modal-x { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 21px; line-height: 1; padding: 2px 6px; border-radius: 4px; }
.modal-x:hover { background: var(--surface2); }
.modal-actions { margin-top: 18px; display: flex; gap: 9px; align-items: center; }

/* ── NOTIFICATIONS ──────────────────────────────────────────────────────────── */
.notif-wrap { position: relative; flex-shrink: 0; }
#notifBtn { width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface2); color: var(--text); cursor: pointer; font-size: 15px; display: flex; align-items: center; justify-content: center; transition: border-color 0.15s; position: relative; }
#notifBtn:hover { border-color: var(--accent); }
.notif-badge { position: absolute; top: -5px; right: -5px; width: 17px; height: 17px; border-radius: 50%; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.notif-dropdown { position: absolute; top: calc(100% + 8px); right: 0; width: 320px; max-height: 70vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-md); z-index: 9999; display: none; }
.notif-dropdown.open { display: block; }
.notif-hd { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; }
.notif-item { padding: 11px 16px; border-bottom: 1px solid var(--border); font-size: 12.5px; line-height: 1.5; display: flex; gap: 10px; align-items: flex-start; }
.notif-item:last-child { border-bottom: none; }
.notif-item.error { border-left: 3px solid var(--red); }
.notif-item.warn  { border-left: 3px solid var(--yellow); }
.notif-item.success { border-left: 3px solid var(--green); }
.notif-item.info { border-left: 3px solid var(--accent); }
.notif-empty { padding: 20px 16px; text-align: center; color: var(--muted); font-size: 13px; }
.notif-link { color: var(--accent); font-weight: 600; text-decoration: none; font-size: 11.5px; display: inline-block; margin-top: 3px; }

/* ── CHECK RESULTS ──────────────────────────────────────────────────────────── */
.results-list { margin-top: 14px; }
.result-row { display: flex; align-items: center; gap: 10px; padding: 9px 14px; background: var(--surface2); border-radius: 8px; margin-bottom: 7px; font-size: 12.5px; }
.result-score { font-size: 15px; font-weight: 700; color: var(--accent); flex-shrink: 0; min-width: 42px; text-align: center; }
.result-note { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ── PERIOD BTN ACTIVE STATE ────────────────────────────────────────────────── */
.period-btn.active { background: var(--accent) !important; color: #fff !important; border-color: var(--accent) !important; }

/* ── DATE RANGE COMBINED INPUT ─────────────────────────────────────────────── */
.date-range-combined {
  display: inline-flex; align-items: center; gap: 0;
  background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
}
.date-range-combined input[type="date"] {
  background: transparent; border: none; padding: 5px 8px; font-size: 12px; color: var(--text);
  font-family: inherit; outline: none; width: auto; min-width: 0;
}
.date-range-combined .date-sep {
  font-size: 12px; color: var(--muted); padding: 0 2px; flex-shrink: 0;
}

/* ── NOTIFICATION DETAIL MODAL ─────────────────────────────────────────────── */
.notif-detail-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 10000; display: none; align-items: center; justify-content: center; }
.notif-detail-overlay.open { display: flex; }
.notif-detail-modal { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px; width: min(480px, calc(100vw - 28px)); max-height: 80vh; overflow-y: auto; box-shadow: var(--shadow-md); }
.notif-detail-modal .ndm-title { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.notif-detail-modal .ndm-body { font-size: 13px; line-height: 1.7; color: var(--muted); white-space: pre-wrap; word-break: break-word; margin-bottom: 16px; }
.notif-detail-modal .ndm-time { font-size: 11px; color: var(--muted); opacity: .7; }

/* ── SETTINGS PAGE ─────────────────────────────────────────────────────────── */
#page-settings .settings-section { margin-bottom: 28px; }
#page-settings .settings-section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 12px; }
#page-settings .settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
#page-settings .settings-input { width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface2); color: var(--text); font-size: 13px; font-family: inherit; outline: none; }
#page-settings .settings-input:focus { border-color: var(--accent); }
#page-settings .settings-label { font-size: 12px; color: var(--muted); display: block; margin-bottom: 4px; }
#page-settings .settings-check { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
#page-settings .settings-check input { width: 16px; height: 16px; accent-color: var(--accent); }
#page-settings .settings-btn { width: 100%; padding: 10px; border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer; border: none; font-family: inherit; transition: opacity .15s; }
#page-settings .settings-btn:hover { opacity: .88; }
#page-settings .settings-btn-primary { background: var(--accent); color: #fff; }
#page-settings .settings-btn-ghost { background: var(--surface2); border: 1px solid var(--border); color: var(--muted); }

/* ── RESPONSIVE ─────────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .home-grid { grid-template-columns: 1fr; }
  .recent-bets-card { order: -1; }
}
@media (max-width: 680px) {
  .grid2, .grid3, .charts-grid, .scan-panels, .admin-split-grid, .admin-two-col-grid { grid-template-columns: 1fr !important; }
  .grid2 > *, .charts-grid > *, #research-epoch-panel, #change-proposals-card, #deposits-costs-card { grid-column: 1 / -1 !important; }
  /* Data page: charts single column, canvas responsive */
  .charts-grid .chart-card { grid-column: span 1 !important; }
  .charts-grid canvas { max-width: 100%; height: auto !important; }
  .rep-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  /* Variance tracker grid: 4 cols -> 2 cols */
  .variance-stats-grid { grid-template-columns: repeat(2, 1fr) !important; }
  /* Analysis bars: compact on mobile */
  .analysis-bar-row { gap: 6px !important; font-size: 11px !important; }
  .analysis-bar-row > div:first-child { width: 50px !important; font-size: 11px !important; }
  .analysis-bar-row > div:last-child { min-width: 40px !important; font-size: 11px !important; }
  header { padding: 0 10px; gap: 8px; }
  .page { padding: 10px; }
  /* Notification dropdown: full-width overlay on mobile */
  .notif-dropdown {
    position: fixed !important; top: 58px !important; left: 0 !important; right: 0 !important;
    width: 100% !important; max-height: calc(100vh - 58px - 70px) !important;
    border-radius: 0 !important; border-left: none !important; border-right: none !important;
    z-index: 9999 !important; overflow-y: auto !important;
  }
  .hero { padding: 16px; }
  .hero-time { font-size: 26px; }
  .hero-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .hero-stat { min-width: 0; padding: 8px 10px; }
  .hero-stat-val { font-size: 16px; }
  .hero-quote { display: none; }
  .tab-btn { font-size: 12px; padding: 7px 10px; white-space: nowrap; }
  .brand-name { font-size: 16px; }
  .brand-sub { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .stat-box { padding: 8px 6px; }
  .stat-val { font-size: 15px; }
  .stat-lbl { font-size: 9px; }
  .live-bar { flex-wrap: wrap; gap: 8px; }
  .live-grid { grid-template-columns: 1fr; }
  .card { padding: 14px; }
  #userBtn span { display: none; }
  .scan-panel { padding: 20px 16px !important; }
  .analysis-query-row, .search-bar { flex-direction: column; }
  .analysis-query-row .btn, .search-bar .btn { width: 100%; justify-content: center; }
  #page-info ul { column-count: 1 !important; }
  #page-data table, #page-analyse table, #page-info table { min-width: 560px; }
  /* Settings page responsive */
  #page-settings .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 400px) {
  .tab-btn { font-size: 11px; padding: 6px 8px; }
  .hero-stat { min-width: 60px; padding: 6px 8px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
