html[data-cn-theme="dark"] {
  color-scheme: dark;
}

html[data-cn-theme="dark"],
html[data-cn-theme="dark"] body {
  background: #020617 !important;
}

html[data-cn-theme="dark"] #root {
  background: #020617;
}

.cn-theme-slot {
  margin: 16px 0;
}

.cn-theme-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-radius: 20px;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.08);
}

.cn-theme-copy { min-width: 0; }
.cn-theme-title { font-size: 14px; font-weight: 900; color: #0f172a; }
.cn-theme-sub { margin-top: 4px; font-size: 12px; font-weight: 700; color: #64748b; }

.cn-theme-switch {
  position: relative;
  width: 58px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  flex: 0 0 auto;
}
.cn-theme-switch-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background .2s ease;
}
.cn-theme-switch-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(15,23,42,.18);
  transition: transform .2s ease;
}
.cn-theme-card.is-dark .cn-theme-switch-track { background: #2563eb; }
.cn-theme-card.is-dark .cn-theme-switch-thumb { transform: translateX(24px); }

html[data-cn-theme="dark"] .cn-theme-card {
  background: #0f172a;
  border-color: #1e293b;
  box-shadow: 0 14px 30px rgba(0,0,0,.28);
}
html[data-cn-theme="dark"] .cn-theme-title { color: #e2e8f0; }
html[data-cn-theme="dark"] .cn-theme-sub { color: #94a3b8; }

html[data-cn-theme="dark"] .cn-menu,
html[data-cn-theme="dark"] .cn-shell,
html[data-cn-theme="dark"] .cn-guides,
html[data-cn-theme="dark"] .cn-acc-body,
html[data-cn-theme="dark"] .cn-root-link,
html[data-cn-theme="dark"] .cn-cat-link,
html[data-cn-theme="dark"] .cn-muted,
html[data-cn-theme="dark"] .cn-social-title,
html[data-cn-theme="dark"] .cn-social-label,
html[data-cn-theme="dark"] .cn-acc-name,
html[data-cn-theme="dark"] .cn-section-title {
  color: #e2e8f0 !important;
}
html[data-cn-theme="dark"] .cn-social,
html[data-cn-theme="dark"] .cn-acc,
html[data-cn-theme="dark"] .cn-acc-body,
html[data-cn-theme="dark"] details.cn-acc,
html[data-cn-theme="dark"] .cn-guides {
  background: #0f172a !important;
  border-color: #1e293b !important;
}
html[data-cn-theme="dark"] .cn-acc-chip,
html[data-cn-theme="dark"] .cn-dot {
  background: #1d4ed8 !important;
  color: #dbeafe !important;
}

html[data-cn-theme="dark"] [class*="_page_"],
html[data-cn-theme="dark"] [class*="_drawer_"],
html[data-cn-theme="dark"] [class*="_cardJogo_"],
html[data-cn-theme="dark"] [class*="_matchCard_"],
html[data-cn-theme="dark"] [class*="_programCard_"],
html[data-cn-theme="dark"] [class*="_card_"] {
  background: #0f172a !important;
  color: #e2e8f0 !important;
  border-color: #1e293b !important;
}

html[data-cn-theme="dark"] [class*="_page_"] {
  background: #020617 !important;
}

html[data-cn-theme="dark"] [class*="_sectionTitle_"],
html[data-cn-theme="dark"] [class*="_matchTime_"],
html[data-cn-theme="dark"] [class*="_campeonato_"],
html[data-cn-theme="dark"] [class*="_teamName_"],
html[data-cn-theme="dark"] [class*="_label_"],
html[data-cn-theme="dark"] [class*="_pts_"],
html[data-cn-theme="dark"] [class*="_empty_"],
html[data-cn-theme="dark"] [class*="_programSub_"],
html[data-cn-theme="dark"] [class*="_updatedAtSolo_"],
html[data-cn-theme="dark"] [class*="_confronto_"],
html[data-cn-theme="dark"] [class*="_transmissao_"],
html[data-cn-theme="dark"] [class*="_teamTitle_"],
html[data-cn-theme="dark"] [class*="_title_"],
html[data-cn-theme="dark"] [class*="_scouts_"],
html[data-cn-theme="dark"] [class*="_score_"],
html[data-cn-theme="dark"] [class*="_leagueLabel_"] {
  color: #e2e8f0 !important;
}

html[data-cn-theme="dark"] [class*="_badge_"],
html[data-cn-theme="dark"] [class*="_programLeftIcon_"],
html[data-cn-theme="dark"] [class*="_programRightIcon_"],
html[data-cn-theme="dark"] [class*="_loading_"],
html[data-cn-theme="dark"] [class*="_row_"],
html[data-cn-theme="dark"] [class*="_tabsRow_"] [class*="_tab_"],
html[data-cn-theme="dark"] [class*="_select_"] {
  background: #111827 !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}

html[data-cn-theme="dark"] [class*="_tabActive_"] {
  background: #1d4ed8 !important;
  color: #ffffff !important;
}

html[data-cn-theme="dark"] iframe[src*="scouts.html"] {
  min-height: 82vh !important;
  height: 82vh !important;
}


/* CN v3: tema escuro no casco inteiro do PWA */
html[data-cn-theme="dark"],
html[data-cn-theme="dark"] body,
html[data-cn-theme="dark"] #root {
  background: #020617 !important;
  color: #e2e8f0 !important;
}

html[data-cn-theme="dark"] body {
  background-image: none !important;
}

html[data-cn-theme="dark"] .min-h-screen {
  background: #020617 !important;
  background-image: none !important;
}

html[data-cn-theme="dark"] .bg-gradient-to-b {
  background-image: none !important;
}

html[data-cn-theme="dark"] .bg-white {
  background-color: #0f172a !important;
}

html[data-cn-theme="dark"] .bg-white\/90 {
  background-color: rgba(15, 23, 42, 0.94) !important;
}

html[data-cn-theme="dark"] .border-b,
html[data-cn-theme="dark"] .border,
html[data-cn-theme="dark"] .border-slate-200,
html[data-cn-theme="dark"] .border-zinc-200 {
  border-color: #1e293b !important;
}

html[data-cn-theme="dark"] .text-slate-600,
html[data-cn-theme="dark"] .text-slate-500,
html[data-cn-theme="dark"] .text-slate-400,
html[data-cn-theme="dark"] .text-zinc-500,
html[data-cn-theme="dark"] .text-zinc-400,
html[data-cn-theme="dark"] .text-zinc-900 {
  color: #cbd5e1 !important;
}

html[data-cn-theme="dark"] .sticky.top-0.z-30 > div:first-child,
html[data-cn-theme="dark"] .bg-\[\#1E56A0\] {
  background: #0b1220 !important;
}

html[data-cn-theme="dark"] .sticky.top-0.z-30 > div:last-child {
  background: #0f172a !important;
  border-bottom-color: #1e293b !important;
}

html[data-cn-theme="dark"] .cn-marquee {
  color: #cbd5e1 !important;
}

html[data-cn-theme="dark"] .bg-\[\#0B3D91\] {
  background: #1d4ed8 !important;
}

html[data-cn-theme="dark"] .fixed.bottom-0.left-0.right-0.z-40 > div > div {
  background: rgba(15, 23, 42, 0.94) !important;
  border: 1px solid #1e293b !important;
  box-shadow: 0 -10px 30px rgba(0,0,0,.35) !important;
}

html[data-cn-theme="dark"] .fixed.bottom-0.left-0.right-0.z-40 button {
  color: #94a3b8 !important;
}

html[data-cn-theme="dark"] .bg-\[\#E7EFFF\] {
  background: #1d4ed8 !important;
}

html[data-cn-theme="dark"] .text-\[\#0f4aa2\] {
  color: #dbeafe !important;
}

html[data-cn-theme="dark"] .shadow,
html[data-cn-theme="dark"] .shadow-sm,
html[data-cn-theme="dark"] .shadow-\[0_-8px_30px_rgba\(0\,0\,0\,0\.08\)\] {
  box-shadow: 0 10px 28px rgba(0,0,0,.30) !important;
}

html[data-cn-theme="dark"] .cn-shell {
  --bg: #0f1624;
  --card: #141f33;
  --text: #eaf0ff;
  --muted: #a8b3c7;
  --stroke: rgba(234, 240, 255, 0.10);
  --shadow: 0 12px 28px rgba(0,0,0,0.35);
  --brand: #6aa0ff;
  --pill: #ff5a55;
  color-scheme: dark;
}

html[data-cn-theme="dark"] .cn-bottom {
  background: rgba(20,31,51,0.75) !important;
  border-top-color: #1e293b !important;
}


/* CN v4: cobre áreas restantes da guia Time e Menu */
html[data-cn-theme="dark"] .bg-slate-50,
html[data-cn-theme="dark"] .bg-slate-100,
html[data-cn-theme="dark"] .bg-slate-200,
html[data-cn-theme="dark"] .bg-zinc-50,
html[data-cn-theme="dark"] .bg-zinc-100 {
  background: #111827 !important;
}

html[data-cn-theme="dark"] .text-slate-900,
html[data-cn-theme="dark"] .text-slate-800,
html[data-cn-theme="dark"] .text-slate-700,
html[data-cn-theme="dark"] .text-zinc-900,
html[data-cn-theme="dark"] .text-zinc-800,
html[data-cn-theme="dark"] .text-zinc-700 {
  color: #e2e8f0 !important;
}

html[data-cn-theme="dark"] .text-slate-500,
html[data-cn-theme="dark"] .text-slate-400,
html[data-cn-theme="dark"] .text-zinc-500,
html[data-cn-theme="dark"] .text-zinc-400 {
  color: #94a3b8 !important;
}

html[data-cn-theme="dark"] .border-slate-50,
html[data-cn-theme="dark"] .border-slate-100,
html[data-cn-theme="dark"] .border-slate-200,
html[data-cn-theme="dark"] .border-zinc-100,
html[data-cn-theme="dark"] .border-zinc-200 {
  border-color: #233148 !important;
}

html[data-cn-theme="dark"] .bg-amber-50 {
  background: rgba(245, 158, 11, 0.14) !important;
}
html[data-cn-theme="dark"] .text-amber-600 {
  color: #fbbf24 !important;
}
html[data-cn-theme="dark"] .border-amber-200 {
  border-color: rgba(245, 158, 11, 0.28) !important;
}
html[data-cn-theme="dark"] .text-amber-900 {
  color: #fde68a !important;
}

html[data-cn-theme="dark"] .shadow-lg,
html[data-cn-theme="dark"] .shadow-sm,
html[data-cn-theme="dark"] .shadow-xl,
html[data-cn-theme="dark"] .shadow-\[0px_10px_25px_-5px_rgba\(0\,0\,0\,0\.10\)\] {
  box-shadow: 0 12px 30px rgba(0,0,0,.34) !important;
}

html[data-cn-theme="dark"] .hover\:bg-slate-200:hover,
html[data-cn-theme="dark"] .hover\:bg-amber-100:hover {
  background: #1f2937 !important;
}

html[data-cn-theme="dark"] .cn-os-card {
  border-color: #233148 !important;
  background: linear-gradient(180deg, rgba(15,23,42,.96), rgba(11,18,32,.98)) !important;
  box-shadow: 0 14px 34px rgba(0,0,0,.36) !important;
}
html[data-cn-theme="dark"] .cn-os-title,
html[data-cn-theme="dark"] .cn-os-row .lbl {
  color: #e2e8f0 !important;
}
html[data-cn-theme="dark"] .cn-os-sub,
html[data-cn-theme="dark"] .cn-os-row .desc,
html[data-cn-theme="dark"] .cn-os-foot,
html[data-cn-theme="dark"] .cn-os-note {
  color: #94a3b8 !important;
}
html[data-cn-theme="dark"] .cn-os-row {
  background: #111827 !important;
  border-color: #233148 !important;
}
html[data-cn-theme="dark"] .cn-os-pill {
  background: #0b1220 !important;
  border-color: #233148 !important;
  color: #cbd5e1 !important;
}
html[data-cn-theme="dark"] .cn-os-pill.ok {
  background: rgba(34,197,94,.14) !important;
  border-color: rgba(34,197,94,.24) !important;
  color: #86efac !important;
}
html[data-cn-theme="dark"] .cn-os-pill.off {
  background: rgba(239,68,68,.12) !important;
  border-color: rgba(239,68,68,.22) !important;
  color: #fca5a5 !important;
}
html[data-cn-theme="dark"] .cn-os-toggle {
  background: rgba(148,163,184,.15) !important;
  border-color: #334155 !important;
}
html[data-cn-theme="dark"] .cn-os-toggle.on {
  background: rgba(34,197,94,.22) !important;
  border-color: rgba(34,197,94,.30) !important;
}
html[data-cn-theme="dark"] .cn-os-knob {
  background: #e5e7eb !important;
}
html[data-cn-theme="dark"] .cn-os-btn.primary {
  background: #1d4ed8 !important;
}
html[data-cn-theme="dark"] .cn-os-btn.danger {
  background: rgba(239,68,68,.14) !important;
  color: #fecaca !important;
}

/* shell do time/favoritos/login */
html[data-cn-theme="dark"] .text-center .bg-white,
html[data-cn-theme="dark"] .space-y-2 > .bg-slate-50,
html[data-cn-theme="dark"] .rounded-3xl.bg-slate-50,
html[data-cn-theme="dark"] .rounded-3xl.bg-white,
html[data-cn-theme="dark"] .rounded-2xl.bg-slate-100,
html[data-cn-theme="dark"] .rounded-2xl.bg-slate-50 {
  background-color: #111827 !important;
}

html[data-cn-theme="dark"] .backdrop-blur {
  backdrop-filter: blur(12px);
}
