:root{
  --theme-body:#f5f9fd;
  --theme-surface:#ffffff;
  --theme-surface-soft:#f3f8fc;
  --theme-ink:#102033;
  --theme-muted:#607489;
  --theme-line:#d7e5f2;
  --theme-shadow:0 20px 50px rgba(15,39,70,.12);
}

html.theme-dark{
  --theme-body:#081321;
  --theme-surface:#102033;
  --theme-surface-soft:#13263b;
  --theme-ink:#e7f0fa;
  --theme-muted:#9fb3c8;
  --theme-line:#28425e;
  --theme-shadow:0 24px 60px rgba(0,0,0,.34);
  color-scheme:dark;
}

html.theme-light{
  color-scheme:light;
}

html,
body{
  background:var(--theme-body);
  color:var(--theme-ink);
}

.theme-toggle{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:40px;
  padding:0 12px;
  border:1px solid var(--theme-line);
  border-radius:14px;
  background:linear-gradient(180deg, color-mix(in srgb, var(--theme-surface) 92%, transparent), color-mix(in srgb, var(--theme-surface-soft) 92%, transparent));
  color:var(--theme-ink);
  font-weight:800;
  box-shadow:none;
  transition:background-color .18s ease,border-color .18s ease,transform .18s ease,color .18s ease,box-shadow .18s ease;
}

.theme-toggle i{
  font-size:16px;
}

.theme-toggle:hover{
  transform:translateY(-1px);
  background:var(--theme-surface);
  box-shadow:0 10px 22px rgba(15,39,70,.08);
}

.theme-toggle--compact{
  min-width:40px;
  justify-content:center;
  padding:0 9px;
}

html.theme-dark .sports-hero__content,
html.theme-dark .sports-hero__media,
html.theme-dark .sports-panel,
html.theme-dark .module-card,
html.theme-dark .dashboard-card,
html.theme-dark .scanner-shell,
html.theme-dark .app-card,
html.theme-dark .public-card,
html.theme-dark .public-feature,
html.theme-dark .public-panel,
html.theme-dark .public-step,
html.theme-dark .support-card,
html.theme-dark .support-mini-cta,
html.theme-dark .support-kb-item,
html.theme-dark .support-chat-panel,
html.theme-dark .admin-card,
html.theme-dark .team-kpi,
html.theme-dark .stat-chip,
html.theme-dark .athlete-card,
html.theme-dark .roster-card,
html.theme-dark .lineup-card,
html.theme-dark .profile-list div,
html.theme-dark .public-filter button,
html.theme-dark .public-form input,
html.theme-dark .public-form select,
html.theme-dark .public-form textarea,
html.theme-dark .sports-form input,
html.theme-dark .sports-form select,
html.theme-dark .sports-form textarea,
html.theme-dark .input,
html.theme-dark table,
html.theme-dark .provisional-card code,
html.theme-dark .module-prepared,
html.theme-dark .public-map{
  background:var(--theme-surface) !important;
  color:var(--theme-ink) !important;
  border-color:var(--theme-line) !important;
  box-shadow:var(--theme-shadow) !important;
}

html.theme-dark .public-doc-card__icon,
html.theme-dark .public-feature__icon,
html.theme-dark .support-card__icon,
html.theme-dark .support-mini-cta__icon,
html.theme-dark .team-kpi i,
html.theme-dark .stat-chip i{
  background:#173552 !important;
}

html.theme-dark .public-button--ghost,
html.theme-dark .sports-button.secondary{
  background:#13263b !important;
  color:#dfeaf6 !important;
  border-color:var(--theme-line) !important;
}

html.theme-dark .public-button,
html.theme-dark .sports-button{
  box-shadow:0 18px 38px rgba(0,0,0,.32);
}

html.theme-dark .public-card__body h3,
html.theme-dark .public-feature h3,
html.theme-dark .public-panel h2,
html.theme-dark .public-panel h3,
html.theme-dark .support-card h3,
html.theme-dark .sports-hero__content h1,
html.theme-dark .sports-hero__content h2,
html.theme-dark .module-card h3,
html.theme-dark .dashboard-card strong,
html.theme-dark .team-kpi strong,
html.theme-dark .stat-chip strong,
html.theme-dark .athlete-card h3,
html.theme-dark .profile-card h2,
html.theme-dark .admin-card h2,
html.theme-dark .admin-card h3{
  color:#f3f7fc !important;
}

html.theme-dark .public-card__body p,
html.theme-dark .public-section__heading p,
html.theme-dark .public-feature p,
html.theme-dark .public-panel p,
html.theme-dark .public-panel li,
html.theme-dark .support-card p,
html.theme-dark .module-card p,
html.theme-dark .dashboard-card p,
html.theme-dark .team-kpi span,
html.theme-dark .stat-chip span,
html.theme-dark .muted,
html.theme-dark .profile-list span,
html.theme-dark .profile-card p{
  color:var(--theme-muted) !important;
}

html.theme-dark .sidebar,
html.theme-dark .topbar,
html.theme-dark .public-navbar-wrap,
html.theme-dark .public-topbar,
html.theme-dark .public-footer{
  background:#091728 !important;
  border-color:#1e3853 !important;
}

html.theme-dark .public-site-header{
  box-shadow:none;
}

html.theme-dark .public-brand__text strong{
  color:#edf5ff !important;
}

html.theme-dark .public-brand__text small{
  color:#87d6b2 !important;
}

html.theme-dark .public-brand__icon{
  background:#15314d !important;
}

html.theme-dark .brand-mark i,
html.theme-dark .public-menu__link i,
html.theme-dark .mega-menu__icon i,
html.theme-dark .submenu a i{
  color:#8ec5ff !important;
}

html.theme-dark .mobile-menu-button{
  background:#102033 !important;
  border-color:#29425e !important;
}

html.theme-dark .mobile-menu-button > span:not(.sr-only){
  background:#edf5ff !important;
}

html.theme-dark .public-menu__link{
  color:#dfeaf6 !important;
}

html.theme-dark .public-menu__link:hover,
html.theme-dark .public-menu__link.is-active,
html.theme-dark .public-menu__item.is-open > .public-menu__link-row > .public-menu__link{
  background:#16314d !important;
  color:#f3f8ff !important;
}

html.theme-dark .mega-menu,
html.theme-dark .submenu,
html.theme-dark .public-menu-shell.is-open{
  background:#102033 !important;
  border-color:#28425e !important;
}

html.theme-dark .mega-menu__item,
html.theme-dark .submenu a{
  background:#13263b !important;
  border-color:#28425e !important;
  color:#dfeaf6 !important;
}

html.theme-dark .mega-menu__item strong,
html.theme-dark .submenu a span{
  color:#edf5ff !important;
}

html.theme-dark .mega-menu__item small{
  color:#9fb3c8 !important;
}

html.theme-dark .topbar-info-item{
  color:rgba(233,243,252,.8) !important;
}

html.theme-dark .topbar-clock-pill,
html.theme-dark .topbar-support-link,
html.theme-dark .topbar-call-link,
html.theme-dark .topbar-theme{
  background:rgba(255,255,255,.08) !important;
  border-color:rgba(255,255,255,.12) !important;
  color:#edf5ff !important;
}

html.theme-dark .topbar-theme i,
html.theme-dark .topbar-call-link i,
html.theme-dark .topbar-support-link i,
html.theme-dark .topbar-clock-pill i{
  color:#edf5ff !important;
}

html.theme-dark .public-footer,
html.theme-dark .public-footer h3,
html.theme-dark .public-footer h4,
html.theme-dark .public-footer a,
html.theme-dark .public-footer p{
  color:#dbe8f6 !important;
}

html.theme-dark .dash,
html.theme-dark .section{
  background:transparent;
}

@media (max-width:780px){
  .theme-toggle .theme-toggle__label{
    display:none;
  }
}
