/* Opt-in charcoal/burgundy palette from approved desktop v7; light rules stay untouched. */
.theme-toggle{min-height:44px;white-space:nowrap}.account-popover .theme-toggle{width:100%;margin:4px 0}.theme-toggle[hidden]{display:none}
html[data-theme=dark]{color-scheme:dark;--canvas:#151318;--paper:#201d24;--surface:#201d24;--ink:#f2eaf0;--muted:#baadba;--line:#3c3440;--border:#3c3440;--soft:#29252f;--brand-wine:#f5b3c6;--brand-accent:#f5b3c6;--brand-berry:#a13f62;--teal:#f5b3c6;--brand-gradient:linear-gradient(120deg,#852c4e,#a13f62);--warning:#f3cd87;--red:#ffb3bf;background:var(--canvas);color:var(--ink)}
html[data-theme=dark] :is(.button,.badge){background:#29252f;color:var(--ink);border-color:#67596b}
html[data-theme=dark] body{background:var(--canvas);color:var(--ink)}
html[data-theme=dark] :is(.panel,.appointment,.child-card,.history-row,.history-card,.stat-card,.stats-card,.settings-section,.account-popover,.bottom-nav,.appointment-actions-dialog,.auth-card,.auth-panel,.profile-facts,.timeline-header,.timeline-body,.timeline-grid,.calendar-view-switch,.schedule-options,.copy-item,.booking-create-actions,.time-picker-region){background:var(--paper);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] :is(.topbar,.footer){color:var(--ink);border-color:var(--line)}
html[data-theme=dark] :is(input,select,textarea,option){background:#29252f;color:var(--ink);border-color:#67596b;color-scheme:dark}
html[data-theme=dark] :is(input,textarea)::placeholder{color:#baadba;opacity:1}
html[data-theme=dark] :is(input,select,textarea):disabled{color:#a99eaa;background:#252128;opacity:.8}
html[data-theme=dark] :is(button,a,input,select,textarea,summary):focus-visible{outline:3px solid #efc486;outline-offset:3px}
html[data-theme=dark] :is(.muted,.small.muted,.lead,.form-intro,.activity-label,.time-range,.today-status-summary,.schedule-heading .muted,.card-person p,.profile-facts dt,.settings-contact dt){color:var(--muted)}
html[data-theme=dark] :is(.brand,.eyebrow,.text-link,.back,.screen-back){color:#f5b3c6}
html[data-theme=dark] :is(.button.subtle,.button.secondary,.chip,.date-strip a,.calendar-view-switch a,.employee-chips a,.children-filters a,.stats-periods a,.profile-edit-link,.dialog-close,.card-menu-button){background:#29252f;color:var(--ink);border-color:#67596b}
html[data-theme=dark] :is(.button.subtle,.button.secondary,.chip,.date-strip a,.calendar-view-switch a):hover{background:#322b37}
html[data-theme=dark] :is(.primary,.button.primary,.add-appointment,.date-strip [aria-current=date]){background:var(--brand-gradient);color:#fff;border-color:#b25678}
html[data-theme=dark] :is(.bottom-nav [aria-current=page],.chip[aria-pressed=true],.calendar-view-switch [aria-current=page],.children-filters [aria-current=page]){background:#3b2533;color:#f5b3c6;border-color:#b25678}
html[data-theme=dark] :is(.avatar,.user-avatar,.planned-person,.form-review,.realizer-summary,.next-appointment,.profile-next,.today-overview){background:#3b2533;color:var(--ink);border-color:var(--line)}
html[data-theme=dark] :is(.person-choice,.arrival-choice,.choice-card,.selection-toolbar,.copy-steps,.audit-entry){background:#29252f;color:var(--ink);border-color:var(--line)}
html[data-theme=dark] :is(.person-choice,.arrival-choice,.choice-card):has(input:checked){background:#3b2533;border-color:#f091ae}
html[data-theme=dark] :is(.notice.success,.badge.good,.badge.success,.status-realized,.stats-realized){background:#253a31;color:#a0d7b5;border-color:#547c65}
html[data-theme=dark] :is(.notice.warning,.badge.warning,.badge.no-show,.stats-no-show){background:#413320;color:#f3cd87;border-color:#967845}
html[data-theme=dark] :is(.notice.error,.validation-summary-errors,.badge.needs-attendance,.badge.danger,.badge.bad,.stats-review){background:#432832;color:#ffb3bf;border-color:#734251}
html[data-theme=dark] :is(.validation,.field-validation-error,.text-danger){color:#ffb3bf}
html[data-theme=dark] :is(.badge.neutral,.badge.pending,.badge.cancelled){background:#322b37;color:#ddd2df;border-color:#67596b}
html[data-theme=dark] :is(.button.danger,.sheet-discard>.discard-destructive){background:#432832;color:#ffb3bf;border-color:#b76778}
html[data-theme=dark] .today-status-control select{background:#29252f;color:#f5b3c6;border-color:#b25678}
html[data-theme=dark] .today-status-control select option{background:#29252f;color:var(--ink)}
html[data-theme=dark] .today-status-control select[data-status=realized]{background:#253a31;color:#a0d7b5;border-color:#547c65}
html[data-theme=dark] .today-status-control select[data-status=review]{background:#432832;color:#ffb3bf;border-color:#734251}
html[data-theme=dark] .today-status-control select[data-status=absent]{background:#413320;color:#f3cd87;border-color:#967845}
html[data-theme=dark] .today-status-control select[data-status=upcoming]{background:#322b37;color:#ddd2df;border-color:#67596b}
html[data-theme=dark] .status-select-chevron{color:#f5b3c6}
html[data-theme=dark] select[data-status=realized]+.status-select-chevron{color:#a0d7b5}html[data-theme=dark] select[data-status=review]+.status-select-chevron{color:#ffb3bf}html[data-theme=dark] select[data-status=absent]+.status-select-chevron{color:#f3cd87}html[data-theme=dark] select[data-status=upcoming]+.status-select-chevron{color:#ddd2df}
/* Keep each original employee hue; adapt contrast rather than reassign identities. */
html[data-theme=dark] :is([class*=employee-color-],.employee-unassigned,.employee-unknown){--employee-soft:color-mix(in srgb,var(--paper),var(--employee) 22%);--employee-text:color-mix(in srgb,var(--employee),white 57%)}
html[data-theme=dark] :is(.employee-name,.person-choice strong,.settings-employee-name){color:var(--employee-text,var(--ink))}
html[data-theme=dark] .employee-chips a[class*=employee-color]{background:var(--employee-soft);color:var(--employee-text);border-color:color-mix(in srgb,var(--line),var(--employee) 48%)}
html[data-theme=dark] .employee-chips a[class*=employee-color][aria-current=true]{background:color-mix(in srgb,var(--paper),var(--employee) 35%);color:var(--employee-text);outline:2px solid var(--employee-text);outline-offset:-2px}
html[data-theme=dark] :is(.schedule-compact-card,.schedule-compact-card.next-arrival){background:var(--paper);border-left-color:color-mix(in srgb,var(--employee,var(--line)),white 19%)}
html[data-theme=dark] .timeline-event{background:var(--employee-soft,#29252f);color:var(--ink);border-color:color-mix(in srgb,var(--line),var(--employee,#67596b) 48%)}
html[data-theme=dark] .person-choice[class*=employee-color] :is(.avatar,strong){color:var(--employee-text)}
html[data-theme=dark] .person-choice[class*=employee-color] .avatar{background:var(--employee-soft)}
html[data-theme=dark] .appointment-actions-dialog::backdrop{background:#080609a8}
html[data-theme=dark] :is(.booking-create-actions,.sheet-discard){background:var(--paper)}
html[data-theme=dark] :is(.time-picker-region,.date-label-display){background:#29252f;color:var(--ink)}
html[data-theme=dark] :is(.timeline-slot,.timeline-hour,.timeline-column,.timeline-row,.card-clock,.audit-changes div){border-color:var(--line)}
html[data-theme=dark] .timeline-header{color:var(--ink)}
html[data-theme=dark] :is(.profile-tabs a,.stats-summary>div,.calendar-unassigned-summary,.timeline-ruler,.timeline-tick){background:#29252f;color:var(--ink);border-color:var(--line)}
html[data-theme=dark] .profile-tabs a[aria-current=page]{background:#3b2533;color:#f5b3c6;border-color:#b25678}
html[data-theme=dark] .approved-children .children-search input[type=search]{background:#29252f;color:var(--ink)}
html[data-theme=dark] .approved-profile .profile-edit-link{color:#f5b3c6}
html[data-theme=dark] .stats-summary .stats-realized{background:#253a31;color:#a0d7b5}
html[data-theme=dark] .stats-summary :is(.stats-cancelled,.stats-review){background:#432832;color:#ffb3bf}
html[data-theme=dark] .stats-summary :is(.stats-pending,.stats-no-show){background:#413320;color:#f3cd87}
html[data-theme=dark] .stats-summary>div>span{color:inherit}
html[data-theme=dark] .calendar-unassigned-summary span{color:var(--muted)}
html[data-theme=dark] .calendar-view-switch [aria-current=true]{background:#3b2533;color:#f5b3c6;border-color:#b25678}
html[data-theme=dark] .employee-chips .employee-unassigned{background:var(--employee-soft);color:var(--employee-text);border-color:#67596b}
html[data-theme=dark] .employee-chips .employee-unassigned[aria-current=true]{background:#322b37;color:var(--employee-text);outline:2px solid var(--employee-text);outline-offset:-2px}
html[data-theme=dark] .approved-profile .profile-next{background:var(--employee-soft,#29252f)}

html[data-theme=dark] .settings-employee-mark{color:var(--employee-text,var(--ink));background:var(--employee-soft,#29252f)}

/* Calendar surfaces and event outcomes remain legible in the dark palette. */
html[data-theme=dark] .timeline-column.timeline-unassigned{background:#29252f}
html[data-theme=dark] .timeline-unassigned .timeline-header{background:#413320;color:#f3cd87}
html[data-theme=dark] .timeline-gridline{border-color:var(--line)}
html[data-theme=dark] .timeline-event-state{color:var(--muted)}
html[data-theme=dark] .timeline-event-state.good{background:#253a31;color:#a0d7b5;border-color:#547c65}
html[data-theme=dark] .timeline-event-state.needs-attendance{background:#432832;color:#ffb3bf;border-color:#734251}
html[data-theme=dark] .timeline-event-state.neutral{background:#322b37;color:#ddd2df;border-color:#67596b}
