:root {
  --bg: #0b1016;
  --panel: #121a23;
  --panel-2: #17212c;
  --line: #243140;
  --text: #e6edf3;
  --muted: #8b9bab;
  --faint: #5b6b7b;
  --accent: #10b981;
  --over: #22c55e;
  --under: #38bdf8;
  --push: #f59e0b;
  --none: #64748b;
  --live: #ef4444;
  --warn: #f59e0b;
  --high: #22c55e;
  --mod: #a3e635;
  --low: #f59e0b;
  --radius: 12px;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}
:root[data-theme="light"] {
  --bg: #f4f6f8; --panel: #ffffff; --panel-2: #f0f3f6; --line: #dde3ea; --text: #0f1720; --muted: #566575; --faint: #8796a5;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 Inter, system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
.layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: var(--panel); border-right: 1px solid var(--line); padding: 18px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px; }
.brand { display: flex; gap: 10px; align-items: center; padding: 4px 6px; }
.logo { width: 36px; height: 36px; border-radius: 9px; background: var(--accent); color: #04130d; display: grid; place-items: center; font-weight: 800; }
.brand-name { font-weight: 800; font-size: 12.5px; letter-spacing: .06em; }
.brand-sub { color: var(--muted); font-size: 11.5px; }
nav { display: flex; flex-direction: column; gap: 2px; }
nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--muted); font-weight: 500; }
nav a span { width: 18px; text-align: center; opacity: .8; }
nav a:hover { background: var(--panel-2); color: var(--text); }
nav a.active { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--text); }
nav a.active span { color: var(--accent); }
.badge-count { margin-left: auto; background: var(--live); color: #fff; font-size: 11px; border-radius: 10px; padding: 0 7px; }
.badge-count:empty { display: none; }
.disclaimer { margin-top: auto; color: var(--faint); font-size: 11.5px; padding: 8px; border-top: 1px solid var(--line); }
main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding: 10px 24px; display: flex; gap: 12px; align-items: center; }
.menu-btn { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 4px 10px; font-size: 16px; }
.status-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); white-space: nowrap; }
.pill b { color: var(--text); font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--none); }
.dot.ok { background: var(--over); box-shadow: 0 0 0 3px color-mix(in srgb, var(--over) 25%, transparent); }
.dot.bad { background: var(--live); }
.dot.warn { background: var(--warn); }
.pill.err { border-color: color-mix(in srgb, var(--live) 50%, var(--line)); color: #fca5a5; }
.errbox { position: relative; cursor: pointer; }
.errbox summary { list-style: none; }
.errbox summary::-webkit-details-marker { display: none; }
.errlist { position: absolute; top: 28px; right: 0; z-index: 30; width: min(360px, 80vw); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px; color: var(--muted); white-space: normal; display: grid; gap: 8px; box-shadow: 0 10px 30px #0006; }
.view { padding: 22px 24px 60px; max-width: 1400px; }
h1 { font-size: 22px; margin: 0 0 4px; letter-spacing: -.01em; }
h2 { font-size: 15px; margin: 0 0 12px; }
h3 { font-size: 13px; margin: 0 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.sub { color: var(--muted); margin: 0 0 18px; }
.grid { display: grid; gap: 14px; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.two { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; }
.kpi .label { color: var(--muted); font-size: 12px; }
.kpi .value { font-size: 26px; font-weight: 800; font-family: var(--mono); margin-top: 2px; }
.kpi .value.over { color: var(--over); } .kpi .value.under { color: var(--under); } .kpi .value.live { color: var(--live); }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; align-items: center; }
input, select, button.btn { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font: inherit; }
button.btn { cursor: pointer; font-weight: 600; }
button.btn.primary { background: var(--accent); color: #04130d; border-color: var(--accent); }
button.btn:hover { border-color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { background: var(--panel); color: var(--muted); border: 0; padding: 7px 12px; font: inherit; cursor: pointer; font-weight: 600; }
.seg button.on { background: var(--accent); color: #04130d; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
td.num, th.num { text-align: right; font-family: var(--mono); }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--panel-2); }
.table-wrap { overflow-x: auto; }
.team { display: inline-flex; align-items: center; gap: 8px; }
.team img, .lg img { width: 20px; height: 20px; object-fit: contain; }
.lg { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; border: 1px solid transparent; }
.tag.OVER { background: color-mix(in srgb, var(--over) 16%, transparent); color: var(--over); border-color: color-mix(in srgb, var(--over) 40%, transparent); }
.tag.UNDER { background: color-mix(in srgb, var(--under) 16%, transparent); color: var(--under); border-color: color-mix(in srgb, var(--under) 40%, transparent); }
.tag.PUSH { background: color-mix(in srgb, var(--push) 16%, transparent); color: var(--push); }
.tag.NO_SIGNAL, .tag.NONE { background: var(--panel-2); color: var(--muted); border-color: var(--line); }
.tag.LIVE { background: var(--live); color: #fff; }
.tag.WIN { background: color-mix(in srgb, var(--over) 18%, transparent); color: var(--over); }
.tag.LOSS { background: color-mix(in srgb, var(--live) 18%, transparent); color: #f87171; }
.tag.VOID { background: var(--panel-2); color: var(--muted); }
.conf { font-size: 11px; font-weight: 700; }
.conf.HIGH { color: var(--high); } .conf.MODERATE { color: var(--mod); } .conf.LOW { color: var(--low); } .conf.NO, .conf.SETTLED { color: var(--muted); }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.live-min { color: var(--live); font-weight: 700; font-family: var(--mono); }
.score { font-family: var(--mono); font-weight: 800; font-size: 15px; }
.empty { padding: 30px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }
.alert { border: 1px solid color-mix(in srgb, var(--warn) 50%, var(--line)); background: color-mix(in srgb, var(--warn) 10%, var(--panel)); padding: 12px 14px; border-radius: 10px; margin-bottom: 14px; }
.alert.err { border-color: color-mix(in srgb, var(--live) 50%, var(--line)); background: color-mix(in srgb, var(--live) 10%, var(--panel)); }
.match-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; text-align: center; }
.match-head .t { display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 700; font-size: 16px; }
.match-head img { width: 54px; height: 54px; object-fit: contain; }
.big-score { font-size: 34px; font-weight: 800; font-family: var(--mono); }
.rec-card { border-left: 4px solid var(--none); }
.rec-card.OVER { border-left-color: var(--over); } .rec-card.UNDER { border-left-color: var(--under); }
.rec-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.rec-pick { font-size: 22px; font-weight: 800; }
.rec-pick.OVER { color: var(--over); } .rec-pick.UNDER { color: var(--under); } .rec-pick.NO_SIGNAL { color: var(--muted); font-size: 18px; }
ul.reasons { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 12.5px; }
ul.reasons li { margin: 3px 0; }
.seq { display: flex; gap: 3px; flex-wrap: wrap; }
.seq i { width: 16px; height: 16px; border-radius: 4px; display: inline-block; font-style: normal; font-size: 9px; text-align: center; line-height: 16px; font-weight: 700; }
.seq i.OVER { background: var(--over); color: #04130d; } .seq i.UNDER { background: var(--under); color: #04130d; } .seq i.PUSH { background: var(--push); color: #04130d; }
.cmp td:first-child { color: var(--muted); }
.basis { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: var(--panel-2); color: var(--muted); margin-right: 6px; }
.basis.STATISTIK { color: var(--over); } .basis.PROXY { color: var(--warn); }
.chart-box { position: relative; height: 240px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tabs button { background: none; border: 0; color: var(--muted); padding: 10px 14px; font: inherit; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.stat-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-family: var(--mono); }
.stat-row span:nth-child(2) { font-family: Inter; color: var(--muted); font-size: 12px; text-align: center; }
.stat-row span:first-child { text-align: right; }
.loading { color: var(--muted); padding: 30px; text-align: center; }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: s 0.8s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes s { to { transform: rotate(360deg); } }
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 20; width: 250px; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: 0 0 40px #0008; }
  .menu-btn { display: block; }
  .view { padding: 16px 16px 60px; }
  .topbar { padding: 10px 16px; }
  .two { grid-template-columns: 1fr; }
  .match-head img { width: 40px; height: 40px; }
  .big-score { font-size: 26px; }
}
