/* Shared appearance: distinct light surfaces, with a separately scoped dark palette. */
:root{color-scheme:light}
:root:not([data-theme="dark"]){
    --surface:#e5ebf2;
    --ink:#182f45;
    --muted:#465c71;
    --line:#afbdcb;
    --control-line:#71869a;
    --section-surface:#dce5ee;
}
:root:not([data-theme="dark"]) :is(.sidebar,.topbar){background:#fff}
:root:not([data-theme="dark"]) :is(.timer-panel,.empty,.settings-logo){border-color:var(--line)}
:root:not([data-theme="dark"]) :is(.day-heading,th){background:var(--section-surface);color:var(--ink)}
:root:not([data-theme="dark"]) :is(.timer-bottom,.manual-meta,.task-add,.settings-logo,.setup-link){background:#f0f4f8}
:root:not([data-theme="dark"]) :is(td,.entry-row,.task-row){border-color:#c4cfda}
:root:not([data-theme="dark"]) :is(.product-name,.nav a,.sidebar-footnote,.breadcrumb span,.sync,.timer-hint,.timer-bottom .chev,.week-day,.entry-time,.entry-path,.entry-actions button,.task-row .icon,.footer-note,.week-table th small){color:var(--muted)}
:root:not([data-theme="dark"]) :is(input,textarea)::placeholder{color:#586d80;opacity:1}
:root:not([data-theme="dark"]) :is(.field input,.field select,.field textarea,.filters input,.filters select,.manual-cell>input,.manual-work summary,.manual-meta select,.search-input){border-color:var(--control-line);background:#fff}
:root:not([data-theme="dark"]) :is(.field input,.field select,.field textarea,.manual-cell>input,.manual-work summary):focus{border-color:var(--brand)}
:root:not([data-theme="dark"]) :is(button,a,input,select,textarea,summary):focus-visible{outline:3px solid var(--brand);outline-offset:3px}
:root:not([data-theme="dark"]) .nav a.active{color:var(--brand);font-weight:600;box-shadow:inset 3px 0 var(--brand)}
:root:not([data-theme="dark"]) :is(.nav a:hover,tbody tr:hover,.entry-actions button:hover){background:#e6eef6}
:root:not([data-theme="dark"]) :is(.week-day.today,.entry-path .project,.entry-actions button.copy-entry){color:var(--brand)}
:root:not([data-theme="dark"]) .week-bar{background:#7197b8}
:root:not([data-theme="dark"]) .week-day.today .week-bar{background:var(--brand)}
:root:not([data-theme="dark"]) :is(.pill,.status){background:#e2eaf2;color:#3d556b}
:root:not([data-theme="dark"]) .status.approved{background:#def1e5;color:#195e44}
:root:not([data-theme="dark"]) :is(.status.pending,.status.planned){background:#fff0cd;color:#715015}
:root:not([data-theme="dark"]) .status.returned{background:#fbe3df;color:#a23728}
:root:not([data-theme="dark"]) .status.running{background:#daeafa;color:#164d7b}
:root:not([data-theme="dark"]) .note-suggestions button{background:#e1ecf5;color:#305777}
:root:not([data-theme="dark"]) .calendar-header{background:var(--section-surface);color:var(--ink);border-bottom-color:var(--control-line)}
:root:not([data-theme="dark"]) .calendar-hours{background:#edf2f7}
:root:not([data-theme="dark"]) .calendar-date.is-today{background:var(--brand-soft);color:var(--brand);box-shadow:inset 0 -3px var(--brand)}
:root:not([data-theme="dark"]) .calendar-day{--line:#afbdcb}
:root:not([data-theme="dark"]) .calendar-day.is-today{background-color:#f1f6fb}
:root:not([data-theme="dark"]) .calendar-slot.half-hour{border-top-color:#b9c6d3}
:root:not([data-theme="dark"]) .calendar-entry{background:#dceafa;border-color:#71869a;color:#182f45;box-shadow:0 1px 2px #182f451a}
:root:not([data-theme="dark"]) .calendar-entry>span{color:#234f75}
:root:not([data-theme="dark"]) .calendar-entry.planned{background:#fff0cd;border-color:#9a7937}
:root:not([data-theme="dark"]) .calendar-entry.planned>span{color:#715015}
:root:not([data-theme="dark"]) .calendar-entry:hover{background:#cbdff2;filter:none}
:root:not([data-theme="dark"]) .calendar-entry.planned:hover{background:#f7e3b3}
:root:not([data-theme="dark"]) .entry-mode-tabs button.selected{background:var(--company-brand);border-color:var(--company-brand);color:var(--brand-on)}
:root:not([data-theme="dark"]) .manual-cell>span{color:#27475f;font-weight:600}
:root:not([data-theme="dark"]) .ledger-day{border-color:#9badbf}
:root:not([data-theme="dark"]) .day-heading{background:#d4e0eb;color:#182f45}
/* The weekly total is the visual anchor of the light tracker. */
:root:not([data-theme="dark"]) .week-strip{background:#103a60;border-color:#103a60;color:#fff}
:root:not([data-theme="dark"]) .week-strip .week-title,
:root:not([data-theme="dark"]) .week-strip .muted,
:root:not([data-theme="dark"]) .week-strip .week-day{color:#c7d8e8}
:root:not([data-theme="dark"]) .week-strip .week-total,
:root:not([data-theme="dark"]) .week-strip .today-total strong{color:#fff;font-weight:600}
:root:not([data-theme="dark"]) .week-strip .week-day.today{color:#fff}
:root:not([data-theme="dark"]) .week-strip .week-bar{background:#98bad7}
:root:not([data-theme="dark"]) .week-strip .week-day.today .week-bar{background:#fff}
:root:not([data-theme="dark"]) .week-strip .today-total{border-left-color:#567791}
:root[data-theme="dark"]{
    color-scheme:dark;
    --surface:#131d27;
    --raised:#1c2936;
    --subtle:#233342;
    --hover:#2a3d4f;
    --ink:#e4edf5;
    --muted:#a6b8ca;
    --line:#3b5063;
    --rail:#162e44;
    --danger:#ffaaa3;
    --green:#83d9b6;
}
.account-section-title{font-size:14px;margin:24px 0 16px;font-weight:600}
.appearance-field{margin-top:24px}
.appearance-field select{max-width:100%}
:root[data-theme="dark"] :is(button,input,select,textarea){color:var(--ink)}
:root[data-theme="dark"] :is(button,.auth,.sidebar,.timer-panel,.week-strip,.ledger-day,.empty,.panel,.filters,.project-card,dialog,.manual-picker-content){
    background:var(--raised);border-color:var(--line);
}
:root[data-theme="dark"] .topbar{background:var(--raised)}
:root[data-theme="dark"] :is(.field input,.field select,.field textarea,.filters input,.filters select,.manual-cell>input,.manual-meta select,.search-input){
    background:var(--surface);border-color:var(--line);
}
:root[data-theme="dark"] :is(.timer-note,.timer-bottom select){background:transparent;color:var(--ink)}
:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder{color:var(--muted);opacity:1}
:root[data-theme="dark"] :is(.timer-bottom,.day-heading,th,.task-add,.settings-logo,.setup-link,.auth-art){background:var(--subtle);border-color:var(--line)}
:root[data-theme="dark"] :is(td,.entry-row,.panel-heading,.table-footer,.dialog-head){border-color:var(--line)}
:root[data-theme="dark"] :is(.category-item.active,.entry-mode-tabs button.selected){background:var(--raised);border-color:var(--line);color:var(--brand)}
:root[data-theme="dark"] :is(button:hover,.nav a:hover,tbody tr:hover){background:var(--hover)}
:root[data-theme="dark"] :is(.nav a.active,.week-table .today-col,.week-table button:hover,.project-icon,.empty-art){background:var(--brand-soft);color:var(--brand)}
:root[data-theme="dark"] :is(button.primary,.workspace-symbol){background:var(--company-brand);border-color:var(--company-brand);color:var(--brand-on)}
:root[data-theme="dark"] button.primary:hover{filter:brightness(1.15)}
:root[data-theme="dark"] .timer-start.running{background:#a93631;border-color:#a93631;color:#fff}
:root[data-theme="dark"] :is(button.ghost,.category-item,.week-table button,.row-link,.link-button,.entry-actions button,.entry-mode-tabs button){background:transparent}
:root[data-theme="dark"] :is(button.ghost:hover,.entry-actions button:hover,.entry-mode-tabs button:hover){background:var(--hover)}
:root[data-theme="dark"] :is(.row-link,.link-button,.task-add,.manual-work summary,.entry-actions button.copy-entry){color:var(--brand)}
:root[data-theme="dark"] :is(.product-name,.nav a,.sidebar-footnote,.breadcrumb span,.sync,.timer-hint,.timer-bottom .chev,.week-title,.week-day,.entry-time,.entry-path,th,.task-row .icon,.footer-note,.period-control,.note-suggestions .small,.auth-art p,.auth-art footer){color:var(--muted)}
:root[data-theme="dark"] :is(.week-day.today,.nav a.active){color:var(--brand)}
:root[data-theme="dark"] .avatar{background:var(--hover);color:var(--ink)}
:root[data-theme="dark"] .week-bar{background:#517491}
:root[data-theme="dark"] .week-day.today .week-bar{background:var(--brand)}
:root[data-theme="dark"] .info-box{background:#213c51;color:#c7e5fc}
:root[data-theme="dark"] .note-suggestions button{background:var(--subtle);color:#c7e5fc}
:root[data-theme="dark"] :is(.pill,.status){background:var(--subtle);color:#bed0e0}
:root[data-theme="dark"] .status.approved{background:#1d4439;color:#9ee4c3}
:root[data-theme="dark"] :is(.status.pending,.status.planned){background:#493d23;color:#f8d992}
:root[data-theme="dark"] .status.running{background:#23415b;color:#bddfff}
:root[data-theme="dark"] .status.returned{background:#522d30;color:#ffc4bb}
:root[data-theme="dark"] .error-box{background:#412a2e;border-color:#955851;color:#ffbfb6}
:root[data-theme="dark"] .pending-banner{background:#3e3522;border-color:#806d43;color:#f4d790}
:root[data-theme="dark"] button.danger{color:var(--danger)}
:root[data-theme="dark"] .manual-saved{color:var(--green)}
:root[data-theme="dark"] :is(.report-summary,#toast){background:#213f59;color:#edf7ff}
:root[data-theme="dark"] dialog::backdrop{background:#050b12b3}
:root[data-theme="dark"] :is(.brand-logo,.sidebar-brand>img,.settings-logo img,.boot img){background:#fff;padding:8px;border-radius:5px}
:root[data-theme="dark"] .construction div{background:#294258;border-color:#547895;box-shadow:0 6px 0 #1b3043}
:root[data-theme="dark"] :is(button,a,input,select,textarea):focus-visible{outline:3px solid #9bd3ff;outline-offset:3px}
@media(max-width:800px){:root[data-theme="dark"] .auth-form:before{background-color:#fff;border-radius:5px}}
