html[data-theme=dark]{color-scheme:dark;--ink:#f0f0f2;--muted:#b0b0b8;--line:#3a3a40;background:#141416;color:#eee}
html[data-theme=dark] body,html[data-theme=dark] .workspace{background:#141416;color:#eee}
html[data-theme=dark] :is(.panel,.event-card,.stats article,.catalog-card,.packing-template-card,.recipe-view,.team-profile,#editor,.notification-panel,.calendar,.calendar-grid,.user-row,.location-photos figure){background:#222225;color:#eee;border-color:#3a3a40;box-shadow:none}
html[data-theme=dark] :is(button,input:not([type=checkbox]),select,textarea){background-color:#29292e;color:#f0f0f2;border-color:#48484f}
html[data-theme=dark] button:hover{background-color:#38342d;border-color:#bda16b}
html[data-theme=dark] :is(input,textarea)::placeholder{color:#9999a3}
html[data-theme=dark] :is(label,.muted,small,dt,.heading p,.event-date,.recipe-help,.recipe-count,.location-open span,.location-open small,.time-entry small,.profile-identity p,.auth p,.auth small){color:#bcbcc4}
html[data-theme=dark] :is(h1,h2,h3,.info-list dd,.inventory-quantity,.recipe-row-main strong,.team-person strong,.location-open strong){color:#f0f0f2}
html[data-theme=dark] a{color:#d2b880}
html[data-theme=dark] :is(.primary,.primary:hover){background:#bda16b;color:#181613;border-color:#bda16b}
html[data-theme=dark] :is(.dialog-heading,.dialog-footer,#event-form .dialog-footer,#recipe-form .dialog-heading,.recipe-footer){background:#222225;border-color:#3a3a40}
html[data-theme=dark] :is(.repeat-row,.pack-category-fields,.quantity-ingredient,.shopping-rule,.shopping-item,.date-tile,.avatar,.tag,.role-tag,.team-lead-badge){background:#302c25;color:#ddc898;border-color:#514733}
html[data-theme=dark] :is(.event-card:hover,.recipe-row:hover,.team-person:hover,.location-open:hover){background:#2b2b30;border-color:#bda16b}
html[data-theme=dark] :is(.recipe-row,.team-person,.location-open,.driver-profile,.text-link){background:transparent;color:#f0f0f2}
html[data-theme=dark] :is(.person-row,.info-list>div,.location-info>div,.timeline-row,.packing-item,.deadline-task,.recipe-row,.user-row,.incident-entry,.time-entry,.quantity-drink,.form-section){border-color:#3a3a40}
html[data-theme=dark] :is(.badge.confirmed,.header-time-button,.time-status){background:#193c2a;color:#a0e4b8;border-color:#2b6341}
html[data-theme=dark] :is(.badge.offer,.badge.planned,.badge.completed,.badge.invoiced){background:#4b3216;color:#ffd294}
html[data-theme=dark] :is(.badge.inquiry,.recipe-alert-banner,.quantity-missing,.deadline-task.overdue){background:#492527;color:#ffb5b8}
html[data-theme=dark] :is(.danger,.form-error,.recipe-alert,.recipe-missing,.overdue-text){color:#ffb5b8}
html[data-theme=dark] :is(.calendar-cell,.calendar-day,.day,.weekday){background:#222225;border-color:#3a3a40;color:#eee}
html[data-theme=dark] :is(.outside,.calendar-cell.outside){background:#1a1a1d;color:#8c8c95}
html[data-theme=dark] :is(.recipe-filters button.active,.template-types button.active){background:#bda16b;color:#181613}
html[data-theme=dark] .expense-event-picker{background:#29292e;border-color:#48484f}
html[data-theme=dark] .expense-event-picker summary{color:#eee}
html[data-theme=dark] .expense-event-options{border-color:#48484f}
html[data-theme=dark] .expense-event-options button{background:transparent}
html[data-theme=dark] .expense-event-options button:is(:hover,[aria-pressed=true]){background:#40382b}
html[data-theme=dark] :is(.expense-event-picker small,.expense-event-options h3){color:#bcbcc4}
html[data-theme=dark] :is(.notification-item,.notification-items){background:#222225;color:#eee;border-color:#3a3a40}
html[data-theme=dark] .notification-item.unread{background:#342f25}
html[data-theme=dark] .profile-photo-editor input::file-selector-button{background:#333338;color:#eee;border-color:#55555c}
html[data-theme=dark] .event-area-picker select{background-color:#29292e;color:#eee}
html[data-theme=dark] .event-area-picker label{color:#bcbcc4}
html[data-theme=dark] .card-preview-toolbar{background:#222225;color:#eee;border-color:#3a3a40}
html[data-theme=dark] .card-preview-dialog{background:#222225;color:#eee}
html[data-theme=dark] .topbar{background:#111;color:#ddd;border-color:#333}
html[data-theme=dark] .nav-drawer{background:#19191c;color:#eee;border-color:#333}
html[data-theme=dark] .nav-drawer :is(.drawer-header,.drawer-bottom,.nav-group){border-color:#333}
html[data-theme=dark] .nav-drawer :is(button,summary){color:#ddd;background:transparent}
html[data-theme=dark] .nav-drawer .drawer-link.active{background:#3b3325;color:#e4ce9d}
html[data-theme=dark] .recipe-photo-editor{background:#222225;color:#eee;border-color:#3a3a40}

html[data-theme=dark] .event-card-refined>.event-card-open{background:transparent;color:var(--ink)}
html[data-theme=dark] .event-card-refined .event-card-date{background:#383125;color:#d7bf90}
html[data-theme=dark] .event-card-refined .event-card-times{background:#2b2b2f}
html[data-theme=dark] .event-card-times>div+div{border-color:#444044}
html[data-theme=dark] .event-card-refined .event-card-services .tag{background:transparent;border-color:#514735;color:#d7bf90}
html[data-theme=dark] .event-card-refined .event-card-actions{background:#262628}
html[data-theme=dark] .event-card-actions .route-button,html[data-theme=dark] .event-card-actions .event-duplicate{color:#d7bf90;background:transparent}
html[data-theme=dark] .event-card-tasks.has-overdue{color:#ffaaa2}
html[data-theme=dark] .event-card-refined.past-event{background:#242427;color:#a4a4ad;border-color:#39393f}
html[data-theme=dark] .past-event .event-card-date,html[data-theme=dark] .past-event .event-card-times,html[data-theme=dark] .past-event .event-card-actions{background:#2a2a2e;color:#a4a4ad}

html[data-theme=dark] .calendar .day button{background:#443b2d;color:#eddbb6}

html[data-theme=dark] .widget-choice{background:#222225;border-color:#3a3a40}html[data-theme=dark] .widget-choice.is-enabled{border-color:#8c774e}html[data-theme=dark] .widget-choice-main{background:transparent}html[data-theme=dark] .widget-choice-main:hover{background:#2c2924}html[data-theme=dark] .widget-choice-icon{background:#363025;color:#d2b880}html[data-theme=dark] .widget-choice-link{color:#d2b880}html[data-theme=dark] .widget-filter button[aria-pressed=true]{background:#bda16b;color:#171717}html[data-theme=dark] .widget-switch{background:#505057}html[data-theme=dark] .widget-switch[aria-checked=true]{background:#bda16b}

html[data-theme=dark] .recipe-delete-zone .recipe-delete-link{background:transparent;color:#f09696;border:0}

html[data-theme=dark] .widget-card-icon,html[data-theme=dark] .widget-countdown-tiles>span{background:#363025;color:#d2b880}html[data-theme=dark] .widget-countdown-tiles strong,html[data-theme=dark] .widget-open-label,html[data-theme=dark] .widget-more summary{color:#d2b880}html[data-theme=dark] .widget-item-count{background:#34343a;color:#c1c1ca}html[data-theme=dark] .widget-needs-attention .widget-item-count{background:#493920;color:#efc178}html[data-theme=dark] .widget-empty-state>span{background:#243b2d;color:#a5c8af}html[data-theme=dark] .widget-row-refined{background:transparent;border-color:var(--line)}html[data-theme=dark] .widget-mentioned>small{color:#efc178}
html[data-theme=dark] .dashboard-widget-refined{background:#252526;border-color:#ffffff19;box-shadow:inset 0 1px 0 #ffffff0b,0 6px 22px #0002}
@supports ((backdrop-filter:blur(12px)) or (-webkit-backdrop-filter:blur(12px))){html[data-theme=dark] .dashboard-widget-refined{background:rgba(36,36,39,.84)}}
@media(prefers-reduced-transparency:reduce){html[data-theme=dark] .dashboard-widget-refined{background:#252526;backdrop-filter:none;-webkit-backdrop-filter:none}}

html[data-theme=dark] .event-bento>.bento-event-location{background:linear-gradient(135deg,#302c25,#222225)}html[data-theme=dark] .bento-event-shortcuts>.bento-needs-attention strong{color:#efc178}html[data-theme=dark] .bento-event-shortcuts>button>span:last-child{color:#d2b880}
html[data-theme=dark] .topbar{background:#141416;border-bottom-color:#ffffff0a}
/* Team list: one continuous dark surface, separation through lines. */
html[data-theme=dark] .panel.team-list{background:#141416;border-color:#303034;box-shadow:none}
html[data-theme=dark] .team-list :is(.person-row,.team-person,.team-person:hover,.small-edit){background:transparent}
html[data-theme=dark] .team-list .small-edit{border-color:#45454b;color:#ddd}
html[data-theme=dark] .team-list .small-edit:hover{background:#ffffff08;border-color:#bda16b}
html[data-theme=dark] .team-person .team-access-badge{background:transparent;color:#c5ae80;border:1px solid #67583c}
html[data-theme=dark] #event-pane .route-actions .route-button{background:#bda16b;color:#171717;border-color:#bda16b}html[data-theme=dark] #event-pane .route-actions .route-button:hover{background:#cbb17e;border-color:#cbb17e;color:#171717}

html[data-theme=dark] .event-pane>.event-team-panel{background:#141416;border-color:#303034;box-shadow:none}html[data-theme=dark] .event-team-panel :is(.person-row,.team-person,.team-person:hover){background:transparent}
html[data-theme=dark] .template-types{background:#202023;border:1px solid #343438}html[data-theme=dark] .template-types button{background:transparent;border:0;color:#bcbcc4;box-shadow:none}html[data-theme=dark] .template-types button[aria-pressed=true]{background:#bda16b;color:#181613;box-shadow:none}html[data-theme=dark] .template-types button[aria-pressed=true] span{color:#403522}html[data-theme=dark] .template-types button:not([aria-pressed=true]):hover{background:#2c2c30}
html[data-theme=dark] .approval-label.pending{background:#49371d;color:#ffda91}html[data-theme=dark] .approval-label.approved{background:#243e2f;color:#b4ebc6}
html[data-theme=dark] .shopping-rule,html[data-theme=dark] .shopping-item{background:transparent;color:var(--ink);border-color:var(--line)}

html[data-theme=dark] .card-preview-actions>a,html[data-theme=dark] .card-preview-actions>button{background:#bda16b;color:#171717;border-color:#bda16b}
html[data-theme=dark] .time-page-actions>a.route-button{background:#bda16b;color:#171717;border-color:#bda16b}

html[data-theme=dark] .master-page-form .master-group{background:#222225;border-color:var(--line)}html[data-theme=dark] .master-page-form>.dialog-footer{background:transparent}html[data-theme=dark] button.back[data-return-team-profile],html[data-theme=dark] button.back[data-master-back]{background:transparent;color:#d2b880;border:0}html[data-theme=dark] button.back[data-return-team-profile]:hover,html[data-theme=dark] button.back[data-master-back]:hover{background:transparent;color:#ead5aa}
/* Neutral surfaces and consistent action contrast throughout the app. */
html[data-theme=dark]{--surface:#222225;--surface-soft:#29292e;--accent:#bda16b}
html[data-theme=dark] :is(.repeat-row,.pack-category-fields,.quantity-ingredient){background:var(--surface-soft);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] :is(.notice,.quantity-hint){background:#303034;color:#dedee4;border-color:var(--line)}
html[data-theme=dark] :is(.allergen-editor,.location-photo-viewer){background:var(--surface);color:var(--ink)}
html[data-theme=dark] .assignment-status{background:#49371d;color:#ffda91}
html[data-theme=dark] .assignment-status.accepted{background:#243e2f;color:#b4ebc6}
html[data-theme=dark] .assignment-status.declined{background:#492527;color:#ffb5b8}
html[data-theme=dark] button.back,html[data-theme=dark] button.back:hover{background:transparent;color:#d2b880;border:0}
html[data-theme=dark] :is(.certificate-preview-toolbar,.card-preview-toolbar) button[data-preview-close],html[data-theme=dark] .certificate-preview-toolbar button[data-doc-close]{background:transparent;color:#d2b880;border-color:transparent}
html[data-theme=dark] :is(.packing-item>strong,.packing-category small,.inventory-quantity,.comparison-row>span,.location-address,.location-open span,.team-person small,.quantity-drink small){color:var(--muted)}
html[data-theme=dark] .event-bento>.bento-event-location{background:var(--surface)}
html[data-theme=dark] .packing-progress progress::-webkit-progress-bar{background:#3a3a40}
html[data-theme=dark] .route-button{background:var(--surface-soft);color:var(--ink);border-color:#48484f}
html[data-theme=dark] .route-actions .route-button,html[data-theme=dark] .card-preview-actions>.route-button,html[data-theme=dark] .time-page-actions>.route-button{background:var(--accent);color:#171717;border-color:var(--accent)}
html[data-theme=dark] .csv-export-dialog{background:var(--surface);color:var(--ink)}
html[data-theme=dark] .my-shift{border-color:#655538}html[data-theme=dark] .my-shift-title{background:transparent;color:var(--ink)}html[data-theme=dark] .my-shift-progress>button{background:#2b2b30;color:var(--ink)}html[data-theme=dark] .shift-done{color:#b4ebc6}html[data-theme=dark] .mobile-bottom-nav{background:#141416;border-color:var(--line)}html[data-theme=dark] .mobile-bottom-nav>button{background:transparent;color:var(--muted)}html[data-theme=dark] .mobile-bottom-nav>button[aria-current=page]{background:#302c25;color:#e0c895}

html[data-theme=dark]{--status-positive-bg:#243e2f;--status-positive-ink:#b4ebc6;--status-pending-bg:#49371d;--status-pending-ink:#ffda91;--status-negative-bg:#492527;--status-negative-ink:#ffb5b8;--status-neutral-bg:#303034;--status-neutral-ink:#dedee4}
html[data-theme=dark] :is(button.primary,a.primary){background:#bda16b;color:#171717;border-color:#bda16b;box-shadow:none}
html[data-theme=dark] :is(button.primary,a.primary):hover{background:#cbb17e;border-color:#cbb17e;color:#171717}
html[data-theme=dark] :is(.actions,.dialog-footer,.recipe-footer,.section-heading,.time-page-actions,.my-shift-actions) button:not(.primary):not(.danger):not(.remove){background:transparent;color:var(--ink);border-color:var(--line);box-shadow:none}
html[data-theme=dark] button.secondary{background:transparent;color:var(--ink);border-color:var(--line);box-shadow:none}
html[data-theme=dark] :is(.actions,.dialog-footer,.recipe-footer) .danger{background:transparent;color:var(--status-negative-ink);border-color:transparent;box-shadow:none}
html[data-theme=dark] .time-page-actions>a.route-button,html[data-theme=dark] .my-shift-actions .route-button{background:transparent;color:var(--ink);border-color:var(--line)}
html[data-theme=dark] .time-page-actions>a.route-button:hover,html[data-theme=dark] button.secondary:hover{background:var(--surface-soft);border-color:#bda16b}
/* Outer cards separate sections; internal information uses spacing and dividers. */
html[data-theme=dark] .panel .panel{background:transparent;border:0;border-radius:0;box-shadow:none;padding:20px 0;margin:20px 0 0;border-top:1px solid var(--line)}
html[data-theme=dark] .panel .panel:first-child{margin-top:0;border-top:0}
html[data-theme=dark] :is(.recipe-glass,.recipe-equipment){background:transparent;box-shadow:none;border:0;border-radius:0;padding:16px 0;border-bottom:1px solid var(--line)}
html[data-theme=dark] .my-shift-progress>button{background:transparent;border:0;border-top:1px solid var(--line);border-radius:0;padding:16px 0;box-shadow:none}
html[data-theme=dark] .my-shift-progress{gap:20px}
html[data-theme=dark] .my-shift-progress>button:hover{background:var(--surface-soft)}
html[data-theme=dark] .event-card-times{background:transparent;border-radius:0;border:0;padding:16px 0;margin-top:16px;border-top:1px solid var(--line)}
html[data-theme=dark] .event-card-services .tag{background:transparent;border:0;padding:3px 0;margin-right:10px;color:var(--muted)}
html[data-theme=dark] .widget-countdown-tiles>div{background:transparent;box-shadow:none;border:0;border-radius:0}
/* Identical status shapes and semantic colours across events, shifts and approvals. */
html[data-theme=dark] :is(.badge,.event-card-status .badge,.event-title>.badge,.assignment-status,.approval-label,.time-status){display:inline-flex;align-items:center;gap:6px;width:fit-content;max-width:100%;padding:5px 9px;border:0;border-radius:7px;font-size:12px;font-weight:600;line-height:1.4;letter-spacing:normal;box-shadow:none}
html[data-theme=dark] :is(.badge,.assignment-status,.approval-label,.time-status){background:var(--status-neutral-bg);color:var(--status-neutral-ink)}
html[data-theme=dark] :is(.badge.confirmed,.assignment-status.accepted,.approval-label.approved,.time-status:not(.paused)){background:var(--status-positive-bg);color:var(--status-positive-ink)}
html[data-theme=dark] :is(.badge.offer,.badge.planned,.badge.completed,.badge.invoiced,.assignment-status.pending,.assignment-status.invited,.approval-label.pending,.time-status.paused){background:var(--status-pending-bg);color:var(--status-pending-ink)}
html[data-theme=dark] :is(.badge.inquiry,.assignment-status.declined){background:var(--status-negative-bg);color:var(--status-negative-ink)}
html[data-theme=dark] .assignment-status:not(.accepted):not(.declined){background:var(--status-pending-bg);color:var(--status-pending-ink)}
.event-card-status,.calendar-day-event-top,.my-shift>.section-heading{align-items:flex-start}
.event-card-status .badge,.calendar-day-event-top .badge,.my-shift>.section-heading>.badge{margin-left:auto;flex-shrink:0}
html[data-theme=dark] .approval-row>div{flex:1;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:8px 14px}
html[data-theme=dark] .approval-row>div>.approval-label{grid-column:2;grid-row:1;margin:0;justify-self:end}
html[data-theme=dark] .approval-row>div>small:not(.approval-label){grid-column:1/-1}

/* Match the card surface rather than painting an extra rectangle around times. */
html[data-theme=dark] .event-card-refined .event-card-times,html[data-theme=dark] .event-card-refined.past-event .event-card-times{background:transparent;border-radius:0;padding:16px 0;border-top:1px solid var(--line)}

/* Clickable widget rows keep the card surface, including sticky touch hover. */
html[data-theme=dark] #main .dashboard-widget :is(.widget-row,.widget-row:hover,.widget-row:active,.widget-row:focus){background:transparent;border-color:var(--line);box-shadow:none;color:var(--ink)}
html[data-theme=dark] #main .dashboard-widget .widget-countdown-tiles>span{background:transparent;border:0;box-shadow:none}
html[data-theme=dark] #main .dashboard-widget .my-shift-title,html[data-theme=dark] #main .dashboard-widget .my-shift-title:hover,html[data-theme=dark] #main .dashboard-widget .my-shift-progress>button,html[data-theme=dark] #main .dashboard-widget .my-shift-progress>button:hover{background:transparent;color:var(--ink)}
html[data-theme=dark] #main .dashboard-widget .widget-context-trigger,html[data-theme=dark] #main .dashboard-widget .widget-context-trigger:hover{background:transparent;color:var(--muted)}
/* Location cards use one continuous surface, including touch hover states. */
html[data-theme=dark] #main .location-list .location-open,
html[data-theme=dark] #main .location-list .location-open:is(:hover,:active,:focus){background:transparent;box-shadow:none;border-color:transparent}
