/* Shared surfaces preserve the existing light palette. */
:root {
  color-scheme:light;
  --surface:#fff;
  --on-ink:#fff;
  --on-accent:#fff;
  --green-button:var(--td-color-4bb080ff,#4bb080);
  --header-bg:rgba(250,250,249,.86);
  --pomo-bg:#37352f;
  --pomo-break-bg:#e0f2fe;
  --pomo-break-ink:#1e3a8a;
  --pomo-break-clock:#0369a1;
  --danger-bg:#fbe9e7;
  --success-bg:#e8f5e9;
}
:root[data-theme="dark"] {
  color-scheme:dark;
  --bg:#181a1b;
  --surface:#222526;
  --ink:#eceeea;
  --ink-soft:#b2b6b2;
  --on-ink:#181a1b;
  --on-accent:#15231d;
  --pri-50:#2c3330;
  --pri-100:#343b37;
  --pri-500:#d6dfd8;
  --pri-600:#e8eee9;
  --gray-50:#272b2c;
  --gray-100:#303536;
  --gray-200:#3b4243;
  --gray-300:#50595a;
  --gray-400:#929c99;
  --gray-500:#a5adaa;
  --gray-600:#b9c0bc;
  --gray-700:#d4dad6;
  --green-500:#91bea0;
  --green-600:#a6d2b5;
  --red-500:#ef9a91;
  --amber-500:#d4b77e;
  --border:rgba(231,239,234,.14);
  --shadow-sm:0 1px 3px rgba(0,0,0,.18);
  --shadow-md:0 4px 18px rgba(0,0,0,.32);
  --link-blue:#9cd1ff;
  --header-bg:rgba(24,26,27,.9);
  --pomo-bg:#202725;
  --pomo-break-bg:#172d3b;
  --pomo-break-ink:#b9dfff;
  --pomo-break-clock:#a0d6ff;
  --danger-bg:#432b2c;
  --success-bg:#253b30;
}
.theme-select{min-width:120px;min-height:36px;padding:6px 10px;border:1px solid var(--gray-200);border-radius:7px;background:var(--surface);color:var(--ink);font:inherit;font-size:13px;}
input,select,textarea{accent-color:var(--green-button);}
:root[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([data-auth-otp]),:root[data-theme="dark"] select,:root[data-theme="dark"] textarea{background-color:var(--surface);color:var(--ink);}
:root[data-theme="dark"] input::placeholder,:root[data-theme="dark"] textarea::placeholder{color:var(--gray-400);opacity:1;}
:root[data-theme="dark"] .header{background:var(--header-bg);}
:root[data-theme="dark"] .modal-overlay,:root[data-theme="dark"] .td-launcher-overlay{background:rgba(0,0,0,.5);}
:root[data-theme="dark"] .yearly-overlay{background:var(--bg);}
:root[data-theme="dark"] .bottom-nav{background:linear-gradient(180deg,rgba(42,48,45,.9),rgba(27,32,30,.85));border-color:var(--border);box-shadow:0 8px 24px #0005,inset 0 1px 0 #ffffff14;}
:root[data-theme="dark"] .bottom-nav::before{background:rgba(179,203,187,.15);box-shadow:inset 0 1px 1px #ffffff18;}
:root[data-theme="dark"] .bottom-nav .nav-btn,:root[data-theme="dark"] .bottom-nav .nav-btn.active{color:var(--ink);}
:root[data-theme="dark"] .bottom-nav .nav-btn .indicator-covered{color:#8de1ae;}
:root[data-theme="dark"] .kanban-todo{--kanban-bg:#292f35;--kanban-border:#48535e;}
:root[data-theme="dark"] .kanban-inProgress{--kanban-bg:#383222;--kanban-border:#6d5d31;}
:root[data-theme="dark"] .kanban-review{--kanban-bg:#3b292c;--kanban-border:#704449;}
:root[data-theme="dark"] .kanban-done{--kanban-bg:#24382e;--kanban-border:#3f6952;}
:root[data-theme="dark"] .kanban-column,:root[data-theme="dark"] .kanban-column .kanban-task-list,:root[data-theme="dark"] .kanban-column .kanban-task-list .task-row,:root[data-theme="dark"] .kanban-column .kanban-divider-inserter .divider-inserter-btn{background:var(--kanban-bg);border-color:var(--kanban-border);}
:root[data-theme="dark"] .kanban-column .kanban-divider-inserter::before{background:var(--kanban-border);}
:root[data-theme="dark"] .kanban-property-tag,:root[data-theme="dark"] .kanban-menu-button,:root[data-theme="dark"] .kanban-add-task{background:rgba(255,255,255,.08);color:var(--ink);}
:root[data-theme="dark"] .launcher-trigger{background:var(--surface);}
:root[data-theme="dark"] .td-launcher{--surface:#1d1d1d;--bg:#1d1d1d;--ink:#f4f4f4;--ink-soft:#c0c0c0;--gray-400:#b0b0b0;--border:rgba(255,255,255,.19);background:linear-gradient(145deg,rgba(62,62,62,.76) 0%,rgba(24,24,24,.80) 48%,rgba(16,16,16,.84) 100%);border-color:rgba(255,255,255,.22);backdrop-filter:blur(34px) saturate(145%);-webkit-backdrop-filter:blur(34px) saturate(145%);box-shadow:0 24px 80px rgba(0,0,0,.55),inset 0 1px 0 rgba(255,255,255,.23),inset 0 -1px 0 rgba(255,255,255,.06);}
:root[data-theme="dark"] .td-launcher input.td-launcher-input:not([type="checkbox"]):not([type="radio"]):not([type="color"]){background-color:transparent;}
:root[data-theme="dark"] .td-launcher-eyebrow,:root[data-theme="dark"] .td-launcher-label,:root[data-theme="dark"] .td-launcher-option-meta,:root[data-theme="dark"] .td-launcher-empty,:root[data-theme="dark"] .td-launcher-option-enter{color:var(--ink-soft);}
:root[data-theme="dark"] .td-launcher-search svg{color:#d4d4d4;}
:root[data-theme="dark"] .td-launcher-option[aria-selected="true"]{background:rgba(255,255,255,.11);border-color:rgba(255,255,255,.18);box-shadow:inset 0 1px 0 rgba(255,255,255,.08);}
:root[data-theme="dark"] .td-launcher-option-icon{background:rgba(255,255,255,.10);color:#e2e2e2;}
:root[data-theme="dark"] .td-launcher-status{color:var(--red-500);}
:root[data-theme="dark"] .td-launcher-pull{background:rgba(28,28,28,.78);border-color:rgba(255,255,255,.2);color:#e2e2e2;box-shadow:0 8px 24px #0007,inset 0 1px 0 #ffffff22;}
:root[data-theme="dark"] .td-launcher .td-command-suggestions{background:rgba(20,20,20,.65);border-color:rgba(255,255,255,.16);}
:root[data-theme="dark"] .td-launcher .td-command-suggestions [aria-selected="true"]{background:rgba(255,255,255,.12);}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){:root[data-theme="dark"] .td-launcher{background:#202020;}:root[data-theme="dark"] .td-launcher-pull{background:#202020;}}
:root[data-theme="dark"] .timeline-block{background:color-mix(in srgb,var(--timeline-color) 24%,var(--surface));}
:root[data-theme="dark"] .timeline-reference.is-pomo{background:color-mix(in srgb,var(--timeline-color) 36%,var(--surface));}
:root[data-theme="dark"] .timeline-schedule{background:color-mix(in srgb,var(--timeline-color) 16%,var(--surface));}
:root[data-theme="dark"] .timeline-schedule:hover{background:color-mix(in srgb,var(--timeline-color) 30%,var(--surface));}
:root[data-theme="dark"] .timeline-schedule.is-invalid{border-color:var(--red-500);background:var(--danger-bg);}
:root[data-theme="dark"] .timeline-drop-preview{background:#263c58dd;color:#bed7ff;}
:root[data-theme="dark"] .timeline-context-menu button[data-timeline-action="delete"]{color:var(--red-500);}
:root[data-theme="dark"] .timeline-calendar-grid button.is-selected,:root[data-theme="dark"] .td-date-grid button.selected{color:var(--on-ink);}
:root[data-theme="dark"] .pomo-break-option{background:#ffffff12;color:var(--pomo-break-ink);border-color:#b9dfff55;}
:root[data-theme="dark"] .pomo-break-option:hover{background:#ffffff24;}
:root[data-theme="dark"] .pomo-break-option[aria-pressed="true"]{background:#b9dfff;color:#172d3b;border-color:#b9dfff;}
:root[data-theme="dark"] .pomo-play-btn{background:#eceeea;color:#202725;}
:root[data-theme="dark"] .pomo-length-row input{background:rgba(255,255,255,.08);color:#fff;}
:root[data-theme="dark"] .btn-primary,:root[data-theme="dark"] .repeat-day-option input:checked + .repeat-day-circle{color:var(--on-accent);}
:root[data-theme="dark"] .task-check.done svg,:root[data-theme="dark"] .edittask-subtask-check.done svg{stroke:#183322;}

/* Filled accents use dark ink; tinted badges keep their adjusted accent text. */
:root[data-theme="dark"] .btn-danger:hover,:root[data-theme="dark"] .pomo-floating[style*="background:"]{color:var(--on-accent);}
:root[data-theme="dark"] .weekly-now-line,:root[data-theme="dark"] .weekly-now-line::before{background:var(--green-button);}
:root[data-theme="dark"] .stats-grid .stat-label{opacity:1!important;}

/* The transparent OTP input must leave its six visual slots uncovered. */
:root[data-theme="dark"] .auth-otp-digit{border-color:var(--gray-400);background:var(--gray-50);}
:root[data-theme="dark"] .auth-otp-digit.is-current{border-color:var(--green-button);box-shadow:0 0 0 2px var(--green-button);}
:root[data-theme="dark"] .auth-otp-digit.is-range{background:var(--gray-200);}
