/* Tema claro — ativado por html[data-theme="light"] */

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f5fb;
  --bg-soft: #e9eef8;
  --surface: #ffffff;
  --surface-2: #f7f9fd;
  --surface-3: #eef2f9;
  --line: rgba(15, 23, 42, 0.09);
  --line-strong: rgba(15, 23, 42, 0.17);
  --text: #0f172a;
  --text-soft: #334155;
  --muted: #5f6f86;
  --muted-2: #74839a;
  --violet: #7c3aed;
  --violet-light: #6d28d9;
  --cyan: #0891b2;
  --green: #059669;
  --amber: #d97706;
  --danger: #e11d48;
  --shadow: 0 24px 55px -38px rgba(15, 23, 42, 0.32);
}

html[data-theme="light"] body {
  background:
    radial-gradient(900px 560px at 4% -8%, rgba(124, 58, 237, 0.09), transparent 60%),
    radial-gradient(800px 520px at 100% 0%, rgba(8, 145, 178, 0.07), transparent 58%),
    var(--bg);
}

html[data-theme="light"] ::selection {
  background: rgba(124, 58, 237, 0.2);
  color: #1e1b4b;
}

html[data-theme="light"] .bg-orbs {
  background:
    radial-gradient(950px 620px at 7% -6%, rgba(124, 58, 237, 0.11), transparent 62%),
    radial-gradient(820px 560px at 98% 8%, rgba(8, 145, 178, 0.07), transparent 58%),
    radial-gradient(900px 700px at 48% 108%, rgba(5, 150, 105, 0.05), transparent 62%);
}

html[data-theme="light"] .bg-orbs::after {
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
}

html[data-theme="light"] .topbar {
  background: rgba(244, 247, 252, 0.82);
  border-bottom-color: var(--line);
}

html[data-theme="light"] .main-nav a:hover {
  background: rgba(15, 23, 42, 0.055);
}

html[data-theme="light"] .hero {
  background:
    linear-gradient(128deg, rgba(124, 58, 237, 0.13) 0%, rgba(255, 255, 255, 0.82) 45%, rgba(8, 145, 178, 0.09) 100%);
  border-color: rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .hero::before {
  background: radial-gradient(circle, rgba(8, 145, 178, 0.12), transparent 65%);
}

html[data-theme="light"] .hero::after {
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.045) 1px, transparent 1px);
}

html[data-theme="light"] .grad {
  background: linear-gradient(96deg, #6d28d9 0%, #0e7490 55%, #047857 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html[data-theme="light"] .streak-card {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(15, 23, 42, 0.09);
}

html[data-theme="light"] .streak-value strong {
  color: #b45309;
}

html[data-theme="light"] .hero-quote {
  border-left-color: rgba(124, 58, 237, 0.4);
  color: var(--muted);
}

html[data-theme="light"] .btn.ghost {
  background: rgba(15, 23, 42, 0.035);
  border-color: var(--line-strong);
  color: var(--text-soft);
}

html[data-theme="light"] .btn.ghost:hover {
  background: rgba(15, 23, 42, 0.065);
  color: var(--text);
}

html[data-theme="light"] .btn.soft {
  background: rgba(124, 58, 237, 0.09);
  border-color: rgba(124, 58, 237, 0.22);
  color: #5b21b6;
}

html[data-theme="light"] .btn.soft:hover {
  background: rgba(124, 58, 237, 0.15);
}

html[data-theme="light"] .icon-btn {
  background: rgba(15, 23, 42, 0.035);
  border-color: var(--line);
}

html[data-theme="light"] .icon-btn:hover {
  background: rgba(15, 23, 42, 0.07);
  border-color: var(--line-strong);
}

html[data-theme="light"] .input {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(15, 23, 42, 0.13);
}

html[data-theme="light"] .input:hover {
  border-color: rgba(15, 23, 42, 0.22);
}

html[data-theme="light"] .input:focus {
  background: #fff;
  border-color: rgba(124, 58, 237, 0.55);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

html[data-theme="light"] input[type="date"],
html[data-theme="light"] input[type="search"],
html[data-theme="light"] input[type="number"] {
  color-scheme: light;
}

html[data-theme="light"] .card {
  background: linear-gradient(180deg, #ffffff, rgba(255, 255, 255, 0.72));
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 18px 45px -36px rgba(15, 23, 42, 0.4);
}

html[data-theme="light"] .pill {
  background: rgba(15, 23, 42, 0.045);
  border-color: rgba(15, 23, 42, 0.08);
  color: var(--muted);
}

html[data-theme="light"] .pill.good {
  background: rgba(5, 150, 105, 0.09);
  border-color: rgba(5, 150, 105, 0.2);
  color: #047857;
}

html[data-theme="light"] .pill.warn {
  background: rgba(217, 119, 6, 0.09);
  border-color: rgba(217, 119, 6, 0.2);
  color: #b45309;
}

html[data-theme="light"] .pill.bad {
  background: rgba(225, 29, 72, 0.08);
  border-color: rgba(225, 29, 72, 0.2);
  color: #be123c;
}

html[data-theme="light"] .ring-track {
  stroke: rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .bar {
  background: rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .stat {
  background: linear-gradient(180deg, #ffffff, rgba(255, 255, 255, 0.65));
  border-color: rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .stat-icon {
  background: rgba(124, 58, 237, 0.1);
  color: #6d28d9;
}

html[data-theme="light"] .stat-icon.cyan {
  background: rgba(8, 145, 178, 0.1);
  color: #0e7490;
}

html[data-theme="light"] .stat-icon.amber {
  background: rgba(217, 119, 6, 0.1);
  color: #b45309;
}

html[data-theme="light"] .stat-icon.green {
  background: rgba(5, 150, 105, 0.1);
  color: #047857;
}

html[data-theme="light"] .chart-tip {
  background: #fff;
  border-color: var(--line-strong);
  box-shadow: 0 8px 18px -10px rgba(15, 23, 42, 0.4);
}

html[data-theme="light"] .chart-bar.empty {
  background: rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .chart-goal span {
  background: #fff;
  color: #b45309;
}

html[data-theme="light"] .chart-col.today .chart-bar {
  background: linear-gradient(180deg, #22d3ee, #0e7490);
}

html[data-theme="light"] .chart-col.today .chart-day,
html[data-theme="light"] .chart-col.today .chart-day b {
  color: #0e7490;
}

html[data-theme="light"] .chart-empty {
  color: var(--muted);
}

html[data-theme="light"] .demo-note {
  border-color: rgba(217, 119, 6, 0.22);
  background: rgba(251, 191, 36, 0.12);
  color: #92400e;
}

html[data-theme="light"] .demo-note .icon-btn {
  color: #92400e;
}

html[data-theme="light"] .playlist-card {
  background: linear-gradient(180deg, #ffffff, rgba(255, 255, 255, 0.7));
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 18px 40px -36px rgba(15, 23, 42, 0.4);
}

html[data-theme="light"] .playlist-card:hover {
  border-color: rgba(15, 23, 42, 0.16);
}

html[data-theme="light"] .pl-icon {
  background: color-mix(in srgb, var(--pc) 12%, #fff);
}

html[data-theme="light"] .pl-toggle {
  background: rgba(15, 23, 42, 0.035);
}

html[data-theme="light"] .pl-toggle:hover {
  background: rgba(15, 23, 42, 0.07);
}

html[data-theme="light"] .video-row:hover {
  background: rgba(15, 23, 42, 0.035);
}

html[data-theme="light"] .video-title {
  color: var(--text-soft);
}

html[data-theme="light"] .video-row.watched .video-title {
  color: var(--muted-2);
}

html[data-theme="light"] .video-row.partial .video-title {
  color: #5b21b6;
}

html[data-theme="light"] .check {
  border-color: rgba(15, 23, 42, 0.24);
}

html[data-theme="light"] .check.done {
  color: #fff;
}

html[data-theme="light"] .video-date:hover,
html[data-theme="light"] .video-date:focus {
  background: rgba(15, 23, 42, 0.04);
}

html[data-theme="light"] .step-btn {
  background: rgba(15, 23, 42, 0.035);
  border-color: rgba(15, 23, 42, 0.1);
}

html[data-theme="light"] .step-btn.plus {
  border-color: rgba(5, 150, 105, 0.24);
  background: rgba(5, 150, 105, 0.08);
  color: #047857;
}

html[data-theme="light"] .empty-playlists {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(15, 23, 42, 0.16);
}

html[data-theme="light"] .empty-playlists .empty-icon {
  background: rgba(124, 58, 237, 0.1);
  color: #6d28d9;
}

html[data-theme="light"] .badge {
  background: rgba(15, 23, 42, 0.025);
}

html[data-theme="light"] .badge.unlocked {
  border-color: rgba(124, 58, 237, 0.16);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(8, 145, 178, 0.04));
}

html[data-theme="light"] .badge-icon {
  background: rgba(15, 23, 42, 0.05);
}

html[data-theme="light"] .history-item:hover {
  background: rgba(15, 23, 42, 0.035);
}

html[data-theme="light"] .history-list::-webkit-scrollbar-thumb,
html[data-theme="light"] .quick-list::-webkit-scrollbar-thumb,
html[data-theme="light"] .yt-video-list::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.14);
}

html[data-theme="light"] .plan-item:hover {
  background: rgba(15, 23, 42, 0.035);
}

html[data-theme="light"] .plan-title {
  color: var(--text-soft);
}

html[data-theme="light"] .sim-control input[type="range"] {
  background: rgba(15, 23, 42, 0.1);
}

html[data-theme="light"] .sim-control input[type="range"]::-webkit-slider-thumb {
  border-color: #fff;
}

html[data-theme="light"] .sim-control input[type="range"]::-moz-range-thumb {
  border-color: #fff;
}

html[data-theme="light"] .sim-kpis div {
  background: rgba(15, 23, 42, 0.025);
  border-color: rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .sim-note.good {
  color: #047857;
}

html[data-theme="light"] .sim-note.warn {
  color: #b45309;
}

html[data-theme="light"] .cal-day {
  background: rgba(15, 23, 42, 0.025);
  border-color: rgba(15, 23, 42, 0.08);
  color: var(--muted);
}

html[data-theme="light"] .cal-day.blank {
  border-color: transparent;
  background: transparent;
}

html[data-theme="light"] .cal-day.lvl-1 {
  background: rgba(124, 58, 237, 0.11);
  border-color: rgba(124, 58, 237, 0.16);
  color: #5b21b6;
}

html[data-theme="light"] .cal-day.lvl-2 {
  background: rgba(124, 58, 237, 0.2);
  border-color: rgba(124, 58, 237, 0.24);
  color: #4c1d95;
}

html[data-theme="light"] .cal-day.lvl-3 {
  background: rgba(8, 145, 178, 0.16);
  border-color: rgba(8, 145, 178, 0.22);
  color: #155e75;
}

html[data-theme="light"] .cal-day.lvl-4 {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.72), rgba(8, 145, 178, 0.62));
  border-color: rgba(109, 40, 217, 0.45);
  color: #fff;
}

html[data-theme="light"] .cal-day.rest.lvl-0 {
  background: rgba(15, 23, 42, 0.012);
}

html[data-theme="light"] .cal-day.frozen {
  border-color: rgba(37, 99, 235, 0.3);
}

html[data-theme="light"] .cal-day.today {
  box-shadow: 0 0 0 1.5px #0891b2, 0 0 14px rgba(8, 145, 178, 0.16);
}

html[data-theme="light"] .cal-swatch {
  border-color: rgba(15, 23, 42, 0.1);
  background: rgba(15, 23, 42, 0.04);
}

html[data-theme="light"] .cal-swatch.lvl-1 { background: rgba(124, 58, 237, 0.18); }
html[data-theme="light"] .cal-swatch.lvl-2 { background: rgba(124, 58, 237, 0.34); }
html[data-theme="light"] .cal-swatch.lvl-3 { background: rgba(8, 145, 178, 0.3); }
html[data-theme="light"] .cal-swatch.lvl-4 { background: linear-gradient(135deg, #7c3aed, #0891b2); }
html[data-theme="light"] .cal-swatch.frozen { border-color: rgba(37, 99, 235, 0.45); }

html[data-theme="light"] .retro-bar.rest i {
  background: rgba(15, 23, 42, 0.09);
}

html[data-theme="light"] .delta.up {
  background: rgba(5, 150, 105, 0.09);
  color: #047857;
}

html[data-theme="light"] .delta.down {
  background: rgba(225, 29, 72, 0.08);
  color: #be123c;
}

html[data-theme="light"] .delta.flat {
  background: rgba(15, 23, 42, 0.04);
}

html[data-theme="light"] .freeze-btn {
  border-color: rgba(37, 99, 235, 0.22);
  background: rgba(37, 99, 235, 0.07);
  color: #1d4ed8;
}

html[data-theme="light"] .freeze-note svg {
  color: #2563eb;
}

html[data-theme="light"] .hero-progress-note {
  color: #6d28d9;
}

html[data-theme="light"] .modal::backdrop {
  background: rgba(15, 23, 42, 0.35);
}

html[data-theme="light"] .modal-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 40px 100px rgba(15, 23, 42, 0.24);
}

html[data-theme="light"] .modal-card::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.14);
}

html[data-theme="light"] .modal .hint {
  color: var(--muted-2);
}

html[data-theme="light"] .day-goal {
  background: rgba(15, 23, 42, 0.025);
  border-color: rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .swatch input:checked + span {
  outline-color: #0f172a;
}

html[data-theme="light"] .yt-status {
  border-color: rgba(8, 145, 178, 0.2);
  background: rgba(8, 145, 178, 0.06);
  color: #155e75;
}

html[data-theme="light"] .yt-status.error {
  border-color: rgba(225, 29, 72, 0.2);
  background: rgba(225, 29, 72, 0.06);
  color: #be123c;
}

html[data-theme="light"] .yt-status.loading {
  border-color: rgba(124, 58, 237, 0.2);
  background: rgba(124, 58, 237, 0.06);
  color: #5b21b6;
}

html[data-theme="light"] .yt-status code {
  background: rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .spinner {
  border-color: rgba(15, 23, 42, 0.15);
  border-top-color: #6d28d9;
}

html[data-theme="light"] .yt-preview-head {
  background: rgba(15, 23, 42, 0.025);
  border-color: rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .yt-video-item:hover {
  background: rgba(15, 23, 42, 0.035);
}

html[data-theme="light"] .player-status {
  background: rgba(15, 23, 42, 0.05);
}

html[data-theme="light"] .player-status.good {
  background: rgba(5, 150, 105, 0.09);
  color: #047857;
}

html[data-theme="light"] .player-status.warn {
  background: rgba(217, 119, 6, 0.09);
  color: #b45309;
}

html[data-theme="light"] .player-speed {
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(15, 23, 42, 0.045);
  color: #475569;
}

html[data-theme="light"] .player-speed select {
  color: #0f172a;
}

html[data-theme="light"] .quick-item:hover {
  background: rgba(15, 23, 42, 0.035);
}

html[data-theme="light"] .quick-empty {
  border-color: rgba(15, 23, 42, 0.16);
  color: var(--muted);
}

html[data-theme="light"] .toast {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.12);
  border-left-color: var(--green);
  color: var(--text-soft);
  box-shadow: 0 18px 40px -18px rgba(15, 23, 42, 0.28);
}

html[data-theme="light"] .confirm-icon {
  background: rgba(225, 29, 72, 0.08);
  border-color: rgba(225, 29, 72, 0.2);
  color: #be123c;
}

html[data-theme="light"] .site-footer {
  color: var(--muted-2);
}

html[data-theme="light"] .save-state {
  color: var(--muted-2);
}

html[data-theme="light"] .exam-card .big-number {
  background: linear-gradient(100deg, #0f172a, #5b21b6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html[data-theme="light"] .exam-card .big-number .unit {
  color: var(--muted);
  -webkit-text-fill-color: var(--muted);
}

html[data-theme="light"] .pl-done {
  color: #047857;
}

html[data-theme="light"] .progress-footnote svg {
  color: #059669;
}

html[data-theme="light"] .cal-freeze {
  color: #2563eb;
}

html[data-theme="light"] .badge-check {
  background: rgba(5, 150, 105, 0.12);
  color: #047857;
}

html[data-theme="light"] .yt-preview-icon {
  background: rgba(225, 29, 72, 0.08);
  color: #be123c;
}

/* ---------- Sincronização e player em segundo plano ---------- */

html[data-theme="light"] .sync-indicator {
  background: rgba(15, 23, 42, 0.035);
}

html[data-theme="light"] .sync-link code {
  background: rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .mini-audio {
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.97);
  color: #0f172a;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
}

html[data-theme="light"] .mini-audio-copy span {
  color: #64748b;
}

html[data-theme="light"] .mini-audio-icon {
  color: #6d28d9;
}

html[data-theme="light"] .mini-audio-btn {
  border-color: rgba(15, 23, 42, 0.1);
  background: rgba(15, 23, 42, 0.045);
  color: #334155;
}

html[data-theme="light"] .mini-audio-btn:hover {
  background: rgba(15, 23, 42, 0.09);
}

html[data-theme="light"] .mini-audio-btn.stop {
  color: #dc2626;
}

html[data-theme="light"] .mini-audio-speed {
  border-color: rgba(15, 23, 42, 0.1);
  background: rgba(15, 23, 42, 0.045);
}

html[data-theme="light"] .mini-audio-speed select {
  color: #334155;
}

html[data-theme="light"] .audio-speed {
  border-color: rgba(15, 23, 42, 0.14);
  background: rgba(15, 23, 42, 0.05);
  color: #334155;
}

html[data-theme="light"] .audio-speed select option {
  background: #ffffff;
  color: #334155;
}

html[data-theme="light"] .mini-audio-progress {
  background: rgba(15, 23, 42, 0.1);
}

/* ---------- Downloads offline ---------- */

html[data-theme="light"] .video-download {
  color: #0891b2;
}

html[data-theme="light"] .offline-chip.ready {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #047857;
}

html[data-theme="light"] .offline-chip.downloading {
  border-color: #ddd6fe;
  background: #f5f3ff;
  color: #6d28d9;
}

html[data-theme="light"] .offline-chip.error {
  border-color: #fde68a;
  background: #fffbeb;
  color: #b45309;
}

html[data-theme="light"] .offline-chip.unavailable {
  background: rgba(15, 23, 42, 0.04);
  color: #64748b;
}

/* ---------- Área de downloads offline ---------- */

html[data-theme="light"] .download-progress {
  background: rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .download-empty code {
  background: rgba(15, 23, 42, 0.06);
  color: #334155;
}
