.theme-toggle{display:inline-flex;align-items:center;justify-content:center;flex:0 0 36px;width:36px;height:36px;padding:0;border:1px solid var(--line);border-radius:50%;background:transparent;color:var(--ink);cursor:pointer}
.theme-toggle:hover{background:var(--lavender);color:var(--purple)}.theme-sun{display:none}
:root[data-theme=dark]{color-scheme:dark;--ink:#edecf6;--muted:#aaa9bd;--purple:#a58aff;--lavender:#302647;--bg:#14131e;--line:#383647;--border:#383647;--surface:#201e2c;--purple-soft:#282239;--red:#ff7b99;background:var(--bg);color:var(--ink)}
[data-theme=dark] .theme-moon{display:none}[data-theme=dark] .theme-sun{display:block}
[data-theme=dark] body{background:var(--bg);color:var(--ink)}
[data-theme=dark] :is(.sidebar,.topbar,.card,.auth-card,.bell-panel,.task-disclosure,.calendar-search,.cal-cell,.cal-day,.calendar-grid,.calendar-board,.calendar-shell,.idea-summary-item,.expense-receipt,.expense-history-totals>div,.admin-record-section,.employee-settings-card,.freelance-default-rates,.materials-file,.title-drive-picker){background:var(--surface);border-color:var(--line);color:var(--ink)}
[data-theme=dark] :is(input,select,textarea,.button,.wp-remove,.wp-platforms label,.promotion-options .choice){background:var(--surface);border-color:var(--line);color:var(--ink)}
[data-theme=dark] :is(input,textarea)::placeholder{color:#9794aa;opacity:1}
[data-theme=dark] :is(.button.primary,.assign-link,.calendar-apply,.calendar-view-tabs .selected){background:#754cff;border-color:#754cff;color:#fff}
[data-theme=dark] .button.primary:hover{background:#835fff}
[data-theme=dark] :is(.nav-link,.nav-heading,.nav-group>summary,.field>span,.calendar-search label>span,.breadcrumb,.language,footer){color:var(--muted)}
[data-theme=dark] :is(.nav-link:hover,.nav-group>summary:hover,.button:not(.primary):hover,.notice-task:hover,.notice-task:focus-visible,.idea-row:hover,.team-points-table tbody tr:hover,.freelance-member-row:hover,.work-type-link:hover,.admin-tool-links>a:hover){background:#2c283d;color:var(--ink)}
[data-theme=dark] :is(.nav-link.selected,.nav-group.is-current>summary,.nav-group:has(.selected)>summary,.country-tab.is-selected,.calendar-countries .country-tab:hover,.settings-tabs a[aria-current=page]){background:var(--lavender);color:var(--purple)}
[data-theme=dark] :is(.badge,.idea-status,.freelance-state,.work-type-state,.team-points-badge,.benefits-unit-label){background:#343143;color:#c5c0d9}
[data-theme=dark] :is(th,.cal-weekday,.cal-weekdays,.cal-cell.is-outside,.cal-day.is-outside,.cal-cell.weekend,.cal-day.weekend,.idea-board-tools,.wp-item-plan,.team-points-pagination,.freelance-members-caption){background:#252230;color:var(--muted)}
[data-theme=dark] :is(.notice,.wp-item-heading,.wp-save-default,.work-brief-intro,.work-default-review,.work-save-default,.client-work-inheritance,.client-work-mode-note,.work-type-default-pill,.task-review-level,.title-workshop,.promotion-selected details,.brand-offering-row,.promotion-picker,.team-points-weekbar,.team-points-capacity-note,.employee-settings,.benefits-inline-note,.benefits-save-bar,.freelance-board-note,.freelance-member-rates,.freelance-personal-rate-note,.freelance-capacity,.invoice-live-defaults,.invoice-template-note,.expense-dropzone,.expense-total,.materials-source.is-ready,.materials-preview summary,.materials-preview figure,.materials-empty,.admin-speed-result,.admin-metric,.admin-link-arrow,.holiday-reminder-explainer,.holiday-choice:has(input:checked)){background:#282239;border-color:#49405f;color:#c6b7ed}
[data-theme=dark] :is(.workspace .freelance-detail-quote.card,.workspace .idea-next-step.card,.team-points-summary-primary){background:#282239!important;border-color:#49405f!important}
[data-theme=dark] :is(.wp-add,.team-points-action .button){background:#282239!important;border-color:#49405f!important;color:var(--purple)}
[data-theme=dark] :is(.task-deadline.soon,.badge.high,.benefits-card-warning,.freelance-rate-warning,.freelance-capacity-blocked,.idea-status-changes,.freelance-state-revision,.expense-status-manual,.team-points-badge-amber){background:#42301d;border-color:#71512d;color:#ffd086}
[data-theme=dark] :is(.task-deadline.overdue,.notice.error,.task-revision-callout,.expense-message-error,.expense-status-error,.urgent-row td){background:#402432;border-color:#754151;color:#ffb0c2}
[data-theme=dark] .notice.success{background:#1d3b32;border-color:#3a6653;color:#a7e0c1}
[data-theme=dark] :is(.notice-tags b,.notice-task.high .notice-tags b){background:#49331d;color:#ffd086}
[data-theme=dark] .notice-task.urgent .notice-tags b{background:#bd2349;color:#fff}
[data-theme=dark] :is(.avatar,.team-points-avatar){background:#393148;color:#d8cde6}
[data-theme=dark] :is(.brand img,.auth-logo){background:#fff;border-radius:8px}
[data-theme=dark] .holiday-choice{background:var(--surface);border-color:var(--line)}
[data-theme=dark] .holiday-choice strong{color:var(--ink)}
[data-theme=dark] .workspace .nav-group[open]>summary{background:#282239;color:var(--ink)}
[data-theme=dark] .workspace .nav-group.has-current>summary{color:var(--purple)}
[data-theme=dark] .workspace .person .avatar{background:#393148;color:#d8cde6}
[data-theme=dark] .workspace .point-section{background:linear-gradient(110deg,#282239,var(--surface) 85%);border-color:#49405f}
[data-theme=dark] :is(.view-switch,.notice-bell summary){background:#252230;color:var(--ink)}
[data-theme=dark] .view-switch a.is-selected{background:#393148;color:var(--purple)}
[data-theme=dark] :is(.planner-sheet,.calendar-day){background:var(--surface)}
[data-theme=dark] :is(.milestone-filter,.period-count){color:var(--muted)}
[data-theme=dark] .milestone-filter:hover{background:var(--lavender)}
[data-theme=dark] .calendar-grid{background:var(--line)}
[data-theme=dark] .calendar-pad{background:#191722;color:var(--muted)}
[data-theme=dark] .calendar-day.weekend{background:#24202f}
[data-theme=dark] .calendar-day.is-today{background:#302647}
[data-theme=dark] :is(.kind-created,.cal-created){--dot:#93b1bf;--wash:#25343b}
[data-theme=dark] :is(.kind-draft_due,.cal-draft_due,.kind-leave,.cal-leave,.cal-festival){--dot:#b29ad9;--wash:#32283f}
[data-theme=dark] :is(.kind-deadline,.cal-deadline){--dot:#efa575;--wash:#3f2d23}
[data-theme=dark] :is(.kind-posting_date,.cal-posting_date){--dot:#75c79f;--wash:#1d3b32}
[data-theme=dark] .cal-event small{color:#c1bccf}
[data-theme=dark] .bell-panel .notice-task.urgent{background:#32212c}
[data-theme=dark] .bell-panel .notice-task.high{background:#322a20}
[data-theme=dark] .bell-panel .notice-task:hover{background:#383049}
[data-theme=dark] .notice-task small{color:var(--muted)}
[data-theme=dark] :is(.workspace,.auth-page) :is(input:not([type=checkbox]),select,textarea){background:var(--surface);border-color:var(--line);color:var(--ink)}
[data-theme=dark] :is(.wp-submit-bar,.wp-caption,.planning-crew-options>label,.planning-crew-row,.invoice-country-tabs a){background:var(--surface);border-color:var(--line);color:var(--ink)}
[data-theme=dark] :is(.task-highlight,.task-brief-highlight,.wp-context,.wp-default-review){background:#282239;border-color:#49405f;color:var(--ink)}
[data-theme=dark] :is(.weekday,.view-switch a,.platform-field .platform-choices label,.task-highlight small,.task-posting-summary span){color:var(--muted)}
[data-theme=dark] :is(.platform-choices label:has(:checked),.wp-platforms label:has(:checked),.milestone-filter.is-selected,.workspace .task-brief-highlight .field>span,.task-brief-highlight h2){color:var(--purple);background:var(--lavender)}
[data-theme=dark] :is(.calendar-search-actions button,.badge.urgent){background:#754cff;border-color:#754cff;color:#fff}
[data-theme=dark] .badge.urgent{background:#bd2349;border-color:#bd2349}
[data-theme=dark] .task-priority.high{background:#42301d;border-color:#71512d;color:#ffd086}
[data-theme=dark] .task-priority.urgent{background:#402432;border-color:#754151;color:#ffb0c2}
[data-theme=dark] .task-priority.urgent small{color:#ffb0c2}
@media(max-width:650px){
 .workspace .topbar{flex-wrap:wrap;gap:10px}
 .workspace .breadcrumb{flex:1 1 100%;max-width:none;min-width:0}
 .workspace .header-actions{width:100%;justify-content:flex-end;gap:8px}
 .header-actions>.button,.header-actions form{flex-shrink:0}
 .header-actions .button{white-space:nowrap}
 .theme-toggle{width:32px;height:32px;flex-basis:32px}
}
/* Documents, customer/social previews and actual media retain their original colors. */
@media print{[data-theme=dark]{--ink:#252638;--muted:#85899d;--purple:#754cff;--lavender:#f0eaff;--bg:#fff;--line:#e6e7ef;color-scheme:light}.theme-toggle{display:none}}
