/* Appearance controls share the existing header and follow the saved preference. */
:root{color-scheme:light;--grid-column:#c7bad3;--grid-major:#b29ac7}
.theme-toggle{flex:none;border:1px solid #c7b4d8;background:#fff;color:#775196;overflow:hidden}
.theme-toggle .icon{width:17px;height:17px;animation:theme-icon-in .24s cubic-bezier(.2,.8,.25,1)}
.theme-toggle .theme-sun{display:none}
html:not(.motion-intro-active) .theme-toggle:hover{background:#f0e6fc;border-color:#af8ccd;color:#642bc1}
.login-card .brand{padding-right:80px;flex-wrap:wrap}
.login-card .motion-sound-actions{gap:7px}
@keyframes theme-icon-in{from{opacity:.2;transform:rotate(-35deg) scale(.7)}to{opacity:1;transform:rotate(0) scale(1)}}

html[data-theme="dark"]{
  color-scheme:dark;color:#eceef1;background:#141517;
  --purple:#b68af3;--line:#373a40;--muted:#a6abb4;
  --grid-edge:#555a63;--grid-hour:#42464e;--grid-half:#30343b;
  --grid-column:#3b3f46;--grid-major:#666c77;
  --dark-panel:#1e2024;--dark-raised:#282b30;--dark-input:#181a1e;
  --dark-text:#eceef1;--dark-secondary:#c7cbd2;--dark-muted:#9da3ad;
}
html[data-theme="dark"] .theme-toggle .theme-moon{display:none}
html[data-theme="dark"] .theme-toggle .theme-sun{display:block}
html[data-theme="dark"] :is(.topbar,.calendar-surface,.day-header,.login-card,.modal,.details-page,.dashboard-section,.dashboard-stats article,.timezone-panel){background:var(--dark-panel);color:var(--dark-text);border-color:var(--line)}
html[data-theme="dark"] .topbar{border-bottom-color:#33363d}
html[data-theme="dark"] :is(.brand,.dashboard-heading h1,.booking-instruction,.login-card h1){color:#eef0f3}
html[data-theme="dark"] :is(.brand-mark,.preloader-mark,.button.primary,.day-tab.selected,.day-header.today strong){background:#7839bd;color:#fff;border-color:#995ad9}
html[data-theme="dark"] .brand-slash{color:#666c76}
html[data-theme="dark"] :is(.brand-subtitle,.muted,.demo-note,.calendar-footer,.guest-subtitle,.no-availability,.login-card>p,.loading-shell,.login-shell,.scope-note,.timezone-note,.host-time-note){color:var(--dark-muted)}
html[data-theme="dark"] :is(.button.secondary,.icon-button.sound-toggle,.theme-toggle){background:var(--dark-raised);border-color:#515762;color:#d0d4db}
html[data-theme="dark"] .button.ghost{color:#bec3cc}
html[data-theme="dark"] .icon-button{color:#b9c0ca}
html[data-theme="dark"] .button.danger{background:#3d2033;color:#f7b0c5;border-color:#79445b}
html[data-theme="dark"] .sound-toggle[aria-pressed="true"]{color:#d5c3ef;background:#303238;border-color:#6d5c82}
html[data-theme="dark"]:not(.motion-intro-active) .button.primary:hover{background:#8b47ce}
html[data-theme="dark"]:not(.motion-intro-active) :is(.button.secondary,.button.ghost,.icon-button,.theme-toggle):hover{background:#33373e;color:#f1f3f6;border-color:#737b88}

/* Keep the free cells lighter than unavailable time, with the existing thin rules. */
html[data-theme="dark"] .calendar-surface{border-color:var(--grid-edge);box-shadow:0 3px 14px #0002}
html[data-theme="dark"] :is(.time-rail,.day-column){border-right-color:var(--grid-column)}
html[data-theme="dark"] :is(.day-header,.time-corner){border-bottom-color:var(--grid-edge)}
html[data-theme="dark"] :is(.time-corner,.day-header){color:#b1b7c1}
html[data-theme="dark"] .day-header strong{color:#e2e5eb}
html[data-theme="dark"] .time-label{color:#b1b7c2;border-bottom-color:var(--grid-half)}
html[data-theme="dark"] .time-label.half{color:#8d95a1;border-bottom-color:var(--grid-hour)}
html[data-theme="dark"] .time-label.major-time{color:#d5dae2}
html[data-theme="dark"] :is(.time-label.major-time,.calendar-row.major-time)::before{background:var(--grid-major)}
html[data-theme="dark"] .calendar-cell{background:#1e2024;color:#c4c9d2;border-bottom-color:var(--grid-half)}
html[data-theme="dark"] .calendar-cell.half{border-bottom-color:var(--grid-hour)}
html[data-theme="dark"] .calendar-cell.available{background:#2c3036;color:#e0e4eb;border-bottom-color:#444a54;--cell-accent:#bc87e9;box-shadow:none}
html[data-theme="dark"] .calendar-cell.available.half{border-bottom-color:#515965}
html[data-theme="dark"] :is(.cell-label,.cell-time){color:#c9d0db}
html[data-theme="dark"] .calendar-cell.unavailable{background:#1d1f23;color:#9ea5b0}
html[data-theme="dark"] .calendar-cell.guest-unavailable{background:#191b1f;color:transparent}
html[data-theme="dark"] .calendar-cell.off-hours{background:repeating-linear-gradient(135deg,#1d1f23 0,#1d1f23 7px,#25282d 7px,#25282d 8px);color:#a5acb6;--cell-accent:#79818e}
html[data-theme="dark"] .calendar-cell.closed-date{color:#9da4af}
html[data-theme="dark"] .calendar-cell.blocked{background:#272a2f;color:#bec5cf;border-bottom-color:#444950;box-shadow:inset 1px 0 #747d8a;--cell-accent:#8e98a7}
html[data-theme="dark"] .calendar-cell.blocked.half{border-bottom-color:#535b66}
html[data-theme="dark"] .calendar-cell.booked{background:#70409f;color:#fff;border-bottom-color:#70409f;box-shadow:inset 1px 0 #ac75dd;--cell-accent:#ba87e5}
html[data-theme="dark"] .calendar-cell.preparation{background:#35333e;color:#dcd5e8;border-bottom-color:#62596f;box-shadow:inset 1px 0 #8d71ac;--cell-accent:#b295d0}
html[data-theme="dark"] .calendar-cell.preparation.allowance{background:#2d2e35;color:#c2bdcc;box-shadow:inset 1px 0 #797184}
html[data-theme="dark"]:not(.motion-intro-active) .calendar-cell.available:hover{background:#3b414a}
html[data-theme="dark"]:not(.motion-intro-active) :is(.calendar-cell.off-hours,.calendar-cell.unavailable):hover{background:#2c3036}
html[data-theme="dark"]:not(.motion-intro-active) .calendar-cell.blocked:hover{background:#373c44}
html[data-theme="dark"]:not(.motion-intro-active) .calendar-cell.booked:hover{background:#814bb2}
html[data-theme="dark"]:not(.motion-intro-active) .calendar-cell.preparation:hover{background:#45404f}
html[data-theme="dark"] :is(.legend,.timezone,.toolbar-info){color:#a6adba}
html[data-theme="dark"] .legend-dot{background:#727c8b}
html[data-theme="dark"] .legend-dot.blocked{background:#656c77}
html[data-theme="dark"] .legend-dot.booked{background:#aa6be0}
html[data-theme="dark"] .legend-dot.preparation{background:#a47ac7;border-color:#cba4e9}
html[data-theme="dark"] .day-tab{background:var(--dark-panel);color:#b4bbc6;border-color:var(--line)}

/* Inputs, dialogs, status messages and customer booking details. */
html[data-theme="dark"] :is(.field label,.field-label,.guest-duration-control label,.timezone-switch,.check-row,.advanced,.advanced summary,.hours-hint){color:#c5cbd5}
html[data-theme="dark"] :is(.field input,.field select,.field textarea,.date-picker,.copy-row input,.guest-duration-control select){color:#e9ecf2;background:var(--dark-input);border-color:#505763}
html[data-theme="dark"] :is(.field input,.field textarea)::placeholder{color:#8b94a3}
html[data-theme="dark"] :is(.field input,.field select,.field textarea):focus{border-color:#b786e6;outline-color:#35333e}
html[data-theme="dark"] :is(.field-hint,.consent-copy,.manual-steps,.dialog-description,.generated-note,.link-metadata,.link-metadata-detail,.list-empty,.modal-header p){color:#adb6c3}
html[data-theme="dark"] :is(.modal-header,.form-actions,.padding-settings,.link-item){border-color:var(--line)}
html[data-theme="dark"] .modal{box-shadow:0 24px 100px #0009}
html[data-theme="dark"] .modal::backdrop{background:#050608b3}
html[data-theme="dark"] :is(.notice,.booking-time-summary,.preview-banner,.prep-option){background:#292d34;border-color:#535b68;color:#d8dde6}
html[data-theme="dark"] :is(.booking-time-summary small,.preview-banner span,.prep-option small){color:#aeb7c4}
html[data-theme="dark"] :is(.padding-settings h3,.prep-option strong,.padding-summary,.detail-row,.detail-row .icon){color:#d8dde6}
html[data-theme="dark"] .padding-settings .field-hint{color:#adb6c3}
html[data-theme="dark"] .error{color:#ffc0d0;background:#3a202f;border-color:#81425b}
html[data-theme="dark"] .badge{color:#ddc1f5;background:#3d2850}
html[data-theme="dark"] :is(.badge.active,.badge.confirmed){background:#203c32;color:#a8dfbb}
html[data-theme="dark"] :is(.badge.expired,.badge.revoked){background:#30343a;color:#bdc5d1}
html[data-theme="dark"] :is(.badge.pending,.badge.needs_attention){background:#48351e;color:#f1ce8c}
html[data-theme="dark"] .weekday span{background:var(--dark-input);color:#b6c0ce;border-color:#515966}
html[data-theme="dark"] .weekday input:checked+span{background:#4b2b67;border-color:#aa74d2;color:#f0dbff}
html[data-theme="dark"] .provider-tabs button{background:var(--dark-input);border-color:#505763;color:#b8c2d0}
html[data-theme="dark"] .provider-tabs button.active{background:#42275a;border-color:#a878ce;color:#f0d8ff}
html[data-theme="dark"] .link-metadata strong{color:#d8dde6}
html[data-theme="dark"] .toast{color:#eef1f6;background:#353b46;box-shadow:0 10px 35px #0006}

/* Private dashboard and the customer's timezone and request controls. */
html[data-theme="dark"] :is(.eyebrow,.login-eyebrow){color:#b2bccb}
html[data-theme="dark"] :is(.dashboard-heading p,.dashboard-stats article>span,.dashboard-stats small,.section-heading p,.legacy-link-note){color:#a8b2c0}
html[data-theme="dark"] :is(.dashboard-stats strong,.section-heading h2,.history-main h3,.request-card h3,.booking-history-item strong,.booking-notifications h3,.delivery-stats strong){color:#e1e6ee}
html[data-theme="dark"] .dashboard-stats .needs-review{background:#2e3038;border-color:#716080}
html[data-theme="dark"] .dashboard-empty{background:#1a1d22;border-color:#4b5360;color:#b2bdcc}
html[data-theme="dark"] .request-card{background:#24272d;border-color:#454d59}
html[data-theme="dark"] .request-card.request-pending{background:#2c2f36;border-color:#66606f}
html[data-theme="dark"] :is(.request-card p,.request-card small,.booking-history-item,.booking-history-item small,.delivery-row,.delivery-row small,.delivery-stats){color:#b2bdcc}
html[data-theme="dark"] .request-card .request-reason{background:#343841;color:#dce3ed}
html[data-theme="dark"] :is(.history-card,.booking-history-item,.delivery-row){border-color:#424a56}
html[data-theme="dark"] .booking-history-item .icon{color:#adbacc}
html[data-theme="dark"] .timezone-panel-heading>.icon{stroke:#a9b7cb}
html[data-theme="dark"] .timezone-panel-heading strong{color:#dce4ef}
html[data-theme="dark"] :is(.timezone-panel-heading span,.timezone-select-field label){color:#acb9cb}
html[data-theme="dark"] .switch-track{background:#414750;border-color:#697583;box-shadow:inset 0 1px 3px #0003}
html[data-theme="dark"] .timezone-switch input:checked+.switch-track{background:#8b4bcc;border-color:#b580e4}
html[data-theme="dark"] .timezone-select-field select:disabled{background:#24282f;color:#a4b1c3}
html[data-theme="dark"] .details-page .timezone-panel{background:#1b1f25;border-color:#46515f}
html[data-theme="dark"] .site-preloader{background:#141517}
html[data-theme="dark"] .preloader-lockup{color:#e5eaf2}
html[data-theme="dark"] .preloader-mark{box-shadow:0 8px 28px #8f45cf24}
html[data-theme="dark"] .preloader-cursor{color:#b7c4d8}
@media(max-width:700px){
  .topbar{height:auto;min-height:65px;padding:12px 16px;gap:10px;flex-wrap:wrap}
  .topbar .top-actions{flex-wrap:wrap;justify-content:flex-end;max-width:100%;margin-left:auto;min-width:0;flex:0 1 auto}
}
@media(prefers-reduced-motion:reduce){.theme-toggle .icon{animation:none}}

html[data-theme="dark"].calendar-drag-active .calendar-cell.drag-selected{background:#424b59!important;box-shadow:inset 0 0 0 1px #a899c2!important}
html[data-theme="dark"].calendar-drag-active .calendar-cell.drag-invalid{background:#4a303c!important;box-shadow:inset 0 0 0 1px #c98098!important}
html[data-theme="dark"] .calendar-drag-hint{background:#282c33;border-color:#656e7c;color:#e3e8f0;box-shadow:0 8px 30px #0005}
html[data-theme="dark"] .calendar-drag-hint.invalid{background:#3c2630;border-color:#a9667c;color:#f0c6d4}
html[data-theme="dark"] .drag-range-summary{background:#23272d;border-color:#4b5360}
html[data-theme="dark"] .drag-range-summary li{color:#c5ceda;border-color:#414852}

html[data-theme="dark"] .booking-invite-option{background:#292b33;border-color:#61536f;color:#e6d9f2}
html[data-theme="dark"] .same-day-option small{color:var(--dark-muted)}
html[data-theme="dark"] .plain-teams-link{color:#c9a5f5}
html[data-theme="dark"] .delete-meeting-warning{border-color:#895269;background:#38252e;color:#f0cad7}
html[data-theme="dark"] .badge.deleted{background:#30343a;color:#bdc5d1}
html[data-theme="dark"] :is(.link-kind,.overview-period){color:#c6c0d0}
html[data-theme="dark"] .overview-badge{background:#35313e;color:#d8c7ec}
html[data-theme="dark"] .overview-week-title{color:#dde3ed}
