:root{
  --bg:#f6f7fb;
  --panel:#ffffff;
  --panel-2:#ffffff;
  --line:#d7dde8;
  --line-soft:#e7ebf2;
  --text:#111827;
  --muted:#6b7280;
  --primary:#c9151e;
  --primary-dark:#971019;
  --success:#15803d;
  --error:#b91c1c;
  --warning:#b45309;
  --info:#2563eb;
}
html,body{background:linear-gradient(180deg,#f8fafc,#eef2f7)!important;color:var(--text)!important}
.sidebar{background:rgba(255,255,255,.96)!important;border-left:1px solid var(--line)!important;box-shadow:0 0 0 1px rgba(0,0,0,.02), 0 20px 40px rgba(15,23,42,.08)}
.brand{color:#101828!important}
.brand-subtitle{color:var(--muted);font-size:12px;margin-top:6px}
.brand-wrap{display:flex;align-items:center;gap:12px}
.brand-logo{width:54px;height:54px;border-radius:18px;background:#fff;display:flex;align-items:center;justify-content:center;border:1px solid var(--line);overflow:hidden}
.brand-logo-img{width:100%;height:100%;object-fit:contain}
.brand-logo-fallback{font-weight:800;color:var(--primary)}
.nav-link{background:#fff!important;color:#111827!important;border-color:var(--line)!important}
.nav-link:hover,.nav-link.active{background:rgba(201,21,30,.08)!important;border-color:rgba(201,21,30,.25)!important;color:#8f0f16!important}
.nav-link.danger{color:#991b1b!important}
.sidebar-user,.card,.mini-stat,.auth-card,.module-card,.match-card,.slot,.round-header,.flash,.empty,.check-card{background:var(--panel)!important;color:var(--text)!important;border-color:var(--line)!important}
.field span{color:#1f2937!important}
.field input,.field select,.field textarea,.public-filters select{background:#fff!important;color:#111827!important;border-color:var(--line)!important}
.field input:focus,.field select:focus,.field textarea:focus{border-color:rgba(201,21,30,.45)!important;box-shadow:0 0 0 3px rgba(201,21,30,.12)}
.table thead th{background:#f8fafc!important;color:#374151!important}
.badge,.chip{background:#f3f4f6!important;color:#374151!important;border-color:#d1d5db!important}
.chip.accent{background:rgba(21,128,61,.12)!important;border-color:rgba(21,128,61,.2)!important;color:#166534!important}
.btn-secondary{background:#fff!important;border:1px solid var(--line)!important;color:#111827!important}
.btn-primary{background:linear-gradient(180deg,var(--primary),var(--primary-dark))!important}
.page-title,.auth-title,.mini-stat-value,.live-name{color:#111827!important}
.page-subtitle,.auth-text,.muted,.sidebar-user-meta,.mini-stat-label,.live-meta,.live-side{color:var(--muted)!important}
.code-lite{background:#f8fafc!important;color:#111827!important;border-color:var(--line)!important}
.live-score-shell{background:linear-gradient(180deg,#ffffff,#f8fafc)!important}
.public-screen-body{background:linear-gradient(180deg,#f8fafc,#eef2f7)!important}
.public-shell .card,.public-shell .match-card,.public-shell .slot{background:#fff!important}
.topbar-tools{display:flex;gap:10px;align-items:flex-start;flex-wrap:wrap}
.theme-toggle-btn{white-space:nowrap}
html.theme-night{
  --bg:#0f172a;
  --panel:#111827;
  --panel-2:#1f2937;
  --line:#334155;
  --line-soft:#22304a;
  --text:#e5e7eb;
  --muted:#94a3b8;
  --primary:#c9151e;
  --primary-dark:#971019;
  --success:#166534;
  --error:#991b1b;
  --warning:#92400e;
  --info:#1d4ed8;
}
html.theme-night body{background:linear-gradient(180deg,#0b1220,#111827)!important;color:var(--text)!important}
html.theme-night .sidebar{background:rgba(15,23,42,.95)!important;box-shadow:none}
html.theme-night .brand{color:#fff!important}
html.theme-night .brand-subtitle{color:#cbd5e1!important}
html.theme-night .nav-link{background:#172033!important;color:#e5e7eb!important;border-color:transparent!important}
html.theme-night .nav-link:hover,html.theme-night .nav-link.active{border-color:#475569!important;background:#1b273d!important;color:#fff!important}
html.theme-night .sidebar-user,html.theme-night .card,html.theme-night .mini-stat,html.theme-night .auth-card,html.theme-night .module-card,html.theme-night .match-card,html.theme-night .slot,html.theme-night .round-header,html.theme-night .flash,html.theme-night .empty,html.theme-night .check-card{background:#111827!important;color:#e5e7eb!important;border-color:#334155!important}
html.theme-night .field span{color:#cbd5e1!important}
html.theme-night .field input,html.theme-night .field select,html.theme-night .field textarea,html.theme-night .public-filters select{background:#0f172a!important;color:#fff!important;border-color:#334155!important}
html.theme-night .table thead th{background:#0f172a!important;color:#cbd5e1!important}
html.theme-night .badge,html.theme-night .chip{background:#1e293b!important;color:#dbeafe!important;border-color:#334155!important}
html.theme-night .btn-secondary{background:#1e293b!important;color:#e2e8f0!important;border-color:#334155!important}
html.theme-night .page-title,html.theme-night .auth-title,html.theme-night .mini-stat-value,html.theme-night .live-name{color:#f8fafc!important}
html.theme-night .page-subtitle,html.theme-night .auth-text,html.theme-night .muted,html.theme-night .sidebar-user-meta,html.theme-night .mini-stat-label,html.theme-night .live-meta,html.theme-night .live-side{color:#94a3b8!important}
html.theme-night .code-lite{background:#0b1220!important;color:#f8fafc!important;border-color:#334155!important}
html.theme-night .live-score-shell{background:linear-gradient(180deg,#111827,#0f172a)!important}
html.theme-night .public-screen-body{background:linear-gradient(180deg,#020617,#0f172a)!important}
