/* Hub appearance, following the device unless the user chooses an override. */
.dh-theme-picker {
    display: inline-flex;
    flex: 0 0 auto;
    max-inline-size: 100%;
    margin: 0;
}
.dh-theme-picker[hidden] { display: none !important; }
.dh-theme-picker__select {
    min-width: 44px;
    min-height: 44px;
    max-inline-size: 100%;
    padding: .38rem .62rem;
    border: 1px solid #6a7380;
    border-radius: 999px;
    color: #15202b;
    background-color: #fff;
    font: inherit;
    font-size: .83rem;
    font-weight: 750;
    cursor: pointer;
}
.dh-theme-picker__select:focus-visible {
    outline: 3px solid #a36b00;
    outline-offset: 2px;
}

/* Keep the native labelled select (keyboard, screen readers and mobile popup).
   Its visual surface is a compact toolbar control, not a second interaction. */
.dh-theme-picker--compact {
    position: relative;
    box-sizing: border-box;
    inline-size: 48px;
    min-block-size: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid #b5c2cd;
    border-radius: 12px;
    background: #f8fafc;
    color: #26384c;
}
.dh-theme-picker--compact:hover { background: #e9eff6; }
.dh-theme-picker--compact:focus-within {
    outline: 3px solid #a36b00;
    outline-offset: 2px;
}
.dh-theme-picker--compact .dh-theme-picker__glyph[hidden] {
    display: inline-flex !important;
    align-items: center;
    gap: 2px;
    pointer-events: none;
}
.dh-theme-picker__caret { opacity: .72; }
.dh-theme-picker__glyph [data-theme-icon]:not([data-theme-icon="system"]) { display: none; }
.dh-theme-picker--compact:has(option:is([value="light"], [value="dark"]):checked) [data-theme-icon="system"] { display: none; }
.dh-theme-picker--compact:has(option[value="light"]:checked) [data-theme-icon="light"],
.dh-theme-picker--compact:has(option[value="dark"]:checked) [data-theme-icon="dark"] { display: inline; }
.dh-theme-picker--compact .dh-theme-picker__select {
    position: absolute;
    inset: 0;
    inline-size: 100%;
    block-size: 100%;
    min-width: 0;
    min-height: 0;
    padding: 0;
    opacity: 0;
}
@media (forced-colors: active) {
    .dh-theme-picker--compact {
        border-color: ButtonText;
        background: ButtonFace;
        color: ButtonText;
    }
    .dh-theme-picker--compact:focus-within { outline-color: Highlight; }
}

@media (max-width: 575.98px) {
    /* A second row on narrow screens keeps the language and menu reachable. */
    .dh-topbar:has(> .dh-theme-picker:not([hidden])) {
        flex-wrap: wrap;
        gap: .4rem .65rem !important;
    }
    .dh-topbar > .dh-theme-picker { margin-inline-start: auto; }
}

/* Kept for an already rendered page or a rolling update with legacy markup. */
.dh-theme-toggle {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-width: 44px;
    min-height: 44px;
    padding: .55rem .8rem;
    border: 1px solid #6a7380;
    border-radius: 999px;
    background: #fff;
    color: #15202b;
    font: inherit;
    font-size: .83rem;
    font-weight: 750;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
}

.dh-theme-toggle[hidden] { display: none !important; }
.dh-theme-toggle:hover { background: #f6f1e7; }
.dh-theme-toggle:focus-visible {
    outline: 3px solid #a36b00;
    outline-offset: 3px;
}

.dh-theme-utility {
    display: flex;
    justify-content: flex-end;
    padding: .75rem 1rem 0;
}

@media (max-width: 1499.98px) {
    .dh-topbar .dh-theme-toggle__label,
    .dh-public-navbar .dh-theme-toggle__label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
}

@media (max-width: 1199.98px) {
    .dh-public-theme-control .dh-theme-toggle { width: 100%; }
    .dh-public-navbar .dh-public-theme-control .dh-theme-toggle__label {
        position: static;
        width: auto;
        height: auto;
        margin: 0;
        overflow: visible;
        clip: auto;
    }
}

/* Upcoming appointments: keep the state visible even beside long titles. */
.dh-dashboard-page .dh-agenda-mini-card .dh-list-card-row { overflow: visible; }
.dh-dashboard-page .dh-agenda-mini-card .dh-list-card-row > .min-width-0 { min-inline-size: 0; }
.dh-dashboard-page .dh-agenda-mini-card .dh-list-card-row > .dh-badge {
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
    max-inline-size: min(9rem, 38%);
}
.dh-dashboard-page .dh-agenda-mini-card .dh-agenda-mini-title {
    white-space: normal;
    overflow: visible;
    overflow-wrap: anywhere;
}
.dh-dashboard-page .dh-agenda-mini-day { color: #7b5000; }
.dh-dashboard-page .dh-agenda-mini-card .dh-badge.success { color: #17623d; }
@media (max-width: 575.98px) {
    .dh-dashboard-page .dh-agenda-mini-card .dh-list-card-row {
        display: grid !important;
        grid-template-columns: max-content minmax(0, 1fr);
        gap: .45rem .65rem !important;
    }
    .dh-dashboard-page .dh-agenda-mini-card .dh-list-card-row > .dh-badge {
        grid-column: 2;
        justify-self: start;
        max-inline-size: 100%;
        text-align: start;
    }
}

/* Hospitality uses ordinary section links, not the sliding tab component. */
.dh-boarding-page > :is(.dh-page-section-nav, .dh-metric-strip) {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(10.5rem, 100%), 1fr));
    gap: .65rem;
}
.dh-boarding-page > .dh-page-section-nav {
    overflow: visible;
    touch-action: auto;
}
.dh-boarding-page > .dh-page-section-nav > .dh-page-section-link,
.dh-boarding-page .dh-metric-item {
    display: grid;
    align-content: start;
    gap: .2rem;
    min-inline-size: 0;
    padding: .85rem 1rem;
    border: 1px solid var(--dh-border);
    border-radius: 14px;
    background: var(--dh-surface);
    color: var(--dh-ink);
    overflow-wrap: anywhere;
}
.dh-boarding-page .dh-page-section-link {
    font-weight: 750;
    text-decoration: none;
}
.dh-boarding-page :is(.dh-page-section-link > small, .dh-metric-label, .dh-metric-note) {
    color: var(--dh-ink-soft);
    font-size: .84rem;
    font-weight: 500;
}
.dh-boarding-page .dh-metric-value { font-size: 1.35rem; font-weight: 780; }
.dh-boarding-page .dh-page-section-link:is(:hover, :focus-visible) {
    background: color-mix(in srgb, var(--dh-surface) 87%, #efb918);
    text-decoration: underline;
    text-underline-offset: .18em;
}
.dh-boarding-page .dh-page-section-link:focus-visible {
    outline: 2px solid #865900;
    outline-offset: 2px;
}
.dh-documents-page .dh-documents-context-metric strong {
    white-space: normal;
    overflow-wrap: anywhere;
}
.dh-wa-inbox .dh-wa-inbox-search input::placeholder,
.dh-wa-inbox .dh-wa-context-card dt { color: #556478; }

/* The signed-in workspace declares its own light tokens on body. Declare the
   palette there too, not just on html, so descendants inherit the dark ink. */
:root[data-dh-theme="dark"],
:root[data-dh-theme="dark"] .dh-app-body[data-dh-ui="2026"] {
    color-scheme: dark;
    --dh-ink: #edf3fa;
    --dh-ink-soft: #c3cfdd;
    --dh-ink-muted: #afc0d1;
    --dh-surface: #1b2a3a;
    --dh-surface-alt: #233448;
    --dh-surface-soft: #233448;
    --dh-background: #111b28;
    --dh-border: #607890;
    --dh-border-strong: #8198af;
    --dh-success: #86e3ae;
    --dh-warning: #f6d17b;
    --dh-danger: #ffad9c;
    --dh-text-main: #edf3fa;
    --dh-text-muted: #c3cfdd;
    --dh-shadow-sm: 0 16px 35px rgba(0, 0, 0, .2);
    --dh-shadow: 0 30px 70px rgba(0, 0, 0, .26);
    --bs-body-color: #edf3fa;
    --bs-body-color-rgb: 237, 243, 250;
    --bs-body-bg: #111b28;
    --bs-body-bg-rgb: 17, 27, 40;
    --bs-secondary-color: #c3cfdd;
    --bs-secondary-bg: #233448;
    --bs-emphasis-color: #edf3fa;
    --bs-border-color: #607890;
    --bs-link-color: #a7ceff;
    --bs-link-color-rgb: 167, 206, 255;
    --bs-link-hover-color: #d0e3ff;
    --bs-link-hover-color-rgb: 208, 227, 255;
    --dh-select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23c3cfdd' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m3 6 5 5 5-5'/%3E%3C/svg%3E");
}

:root[data-dh-theme="dark"] body,
:root[data-dh-theme="dark"] :is(input, select, textarea, button) {
    color-scheme: dark;
}

:root[data-dh-theme="dark"] body,
:root[data-dh-theme="dark"] body.dh-app-body,
:root[data-dh-theme="dark"] body.dh-public-body {
    color: var(--dh-ink);
    background: radial-gradient(circle at top left, rgba(241, 188, 22, .08), transparent 30%),
        linear-gradient(180deg, #111b28, #152232 62%, #111b28);
}

:root[data-dh-theme="dark"] .dh-topbar,
:root[data-dh-theme="dark"] .dh-public-navbar {
    background: rgba(23, 36, 51, .97) !important;
    border-color: var(--dh-border);
    color: var(--dh-ink);
}
/* Public links share the underline without the filled hover/active pill. */
.dh-public-navbar .dh-public-nav-list .nav-link:is(.active, :hover, :focus-visible) {
    background: transparent;
}
.dh-public-navbar .dh-public-nav-list .nav-link:is(.active, :hover, :focus-visible)::after {
    position: absolute;
    inset-inline: clamp(.5rem, .75vw, .9rem);
    bottom: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--dh-primary, #fbbf24);
    content: "";
}
.dh-public-navbar .dh-public-nav-list .nav-link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}
@media (max-width: 1199.98px) {
    .dh-public-navbar .dh-public-nav-list .nav-link:is(.active, :hover, :focus-visible)::after {
        inset-inline: .85rem auto;
        width: 2.25rem;
    }
}
:root[data-dh-theme="dark"] .dh-theme-picker__select {
    color: var(--dh-ink);
    background-color: var(--dh-surface-alt);
    border-color: var(--dh-border-strong);
}
:root[data-dh-theme="dark"] .dh-theme-picker__select:focus-visible { outline-color: #f6d17b; }
:root[data-dh-theme="dark"] .dh-theme-picker--compact {
    color: #edf3fa;
    background: #233448;
    border-color: #8198af;
}
:root[data-dh-theme="dark"] .dh-theme-picker--compact:hover { background: #31485f; }
:root[data-dh-theme="dark"] .dh-theme-picker--compact:focus-within { outline-color: #f6d17b; }

@media (max-width: 1199.98px) {
    :root[data-dh-theme="dark"] .dh-public-navbar .navbar-collapse {
        background: var(--dh-surface);
        border-color: var(--dh-border);
    }
}
:root[data-dh-theme="dark"] .dh-language-picker select {
    background-color: #172637;
    border-color: var(--dh-border-strong);
    color: var(--dh-ink);
}
/* Keep Bootstrap's icon and collapse behavior; swap the icon ink in dark mode. */
:root[data-dh-theme="dark"] .dh-public-navbar .dh-public-toggler {
    --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath fill='none' stroke='%23edf3fa' stroke-linecap='round' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
    background: var(--dh-surface);
    color: var(--dh-ink);
    border: 1px solid var(--dh-border-strong) !important; /* Competes with the mobile border and .border-0. */
    box-shadow: none;
}
:root[data-dh-theme="dark"] .dh-public-navbar .dh-public-toggler:is(:hover, [aria-expanded="true"]) {
    background: var(--dh-surface-alt);
}
:root[data-dh-theme="dark"] .dh-public-navbar .dh-public-toggler:focus-visible {
    outline: 3px solid var(--dh-warning);
    outline-offset: 2px;
}

:root[data-dh-theme="dark"] .dh-public-footer {
    background: #101927;
    border-color: #34485d;
}

:root[data-dh-theme="dark"] .dh-theme-toggle {
    background: #25384c;
    border-color: #8198af;
    color: #edf3fa;
}

:root[data-dh-theme="dark"] .dh-theme-toggle:hover { background: #31485f; }
:root[data-dh-theme="dark"] .dh-theme-toggle[aria-pressed="true"] {
    background: #f6d17b;
    border-color: #f6d17b;
    color: #17243b;
}
:root[data-dh-theme="dark"] .dh-theme-toggle:focus-visible {
    outline-color: #f6d17b;
}

/* Authentication cards have explicit white backgrounds in app.css. Keep the
   whole form surface dark so labels, muted copy and inputs remain readable. */
:root[data-dh-theme="dark"] :is(.dh-auth-card, .dh-auth-form-wrapper) {
    background: var(--dh-surface);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-auth-form-wrapper h2 { color: var(--dh-ink); }
:root[data-dh-theme="dark"] .dh-auth-form-wrapper > div > p,
:root[data-dh-theme="dark"] .dh-auth-form-wrapper .dh-link-muted {
    color: var(--dh-ink-soft);
}
:root[data-dh-theme="dark"] .dh-auth-form-wrapper .dh-brand-pill {
    background: var(--dh-surface-alt);
    border-color: var(--dh-border);
    color: var(--dh-ink-soft);
}
:root[data-dh-theme="dark"] .dh-auth-form-wrapper .dh-link-muted:hover {
    color: #f6d17b;
}

/* Shared application and public surfaces. Feature-specific art and tenant logos are preserved. */
:root[data-dh-theme="dark"] :is(
    .dh-card, .dh-card-muted, .card, .modal-content, .offcanvas,
    .dropdown-menu, .accordion-item, .list-group-item, .dh-empty, .dh-empty-state,
    .dh-public-flow-card, .dh-public-page-head, .dh-public-checkout-card,
    .dh-calendar-view-panel, .dh-calendar-google-panel, .dh-calendar-metrics article,
    .dh-calendar-view-settings, .dh-google-status-card, .dh-retention-summary > div
) {
    background: var(--dh-surface);
    border-color: var(--dh-border);
    color: var(--dh-ink);
}

:root[data-dh-theme="dark"] .dh-public-checkout-card,
:root[data-dh-theme="dark"] .dh-calendar-google-panel {
    background: radial-gradient(circle at top right, rgba(241, 188, 22, .1), transparent 32%), var(--dh-surface);
}

:root[data-dh-theme="dark"] :is(
    .dh-notification-alert, .dh-copilot-hero, .dh-copilot-safety,
    .dh-settings-google-step, .dh-retention-ack, .dh-retention-review
) {
    background: var(--dh-surface-alt);
    border-color: var(--dh-border);
    color: var(--dh-ink);
}

:root[data-dh-theme="dark"] :is(
    .dh-card, .card, .modal-content, .dh-public-flow-card,
    .dh-public-checkout-card, .dh-calendar-metrics article
) :is(h1, h2, h3, h4, h5, h6) {
    color: var(--dh-ink);
}

:root[data-dh-theme="dark"] :is(
    .dh-retention-summary strong, .dh-retention-card__head h2,
    .dh-calendar-metrics strong, .dh-calendar-metrics small,
    .dh-public-page-head__intro, .dh-notification-alert-title
) { color: var(--dh-ink); }

:root[data-dh-theme="dark"] :is(.text-muted, .text-secondary, .dh-retention-summary span, .dh-retention-history p) {
    color: var(--dh-ink-soft) !important;
}

:root[data-dh-theme="dark"] :is(.text-dark, .text-body) { color: var(--dh-ink) !important; }
:root[data-dh-theme="dark"] .text-danger { color: var(--dh-danger) !important; }
:root[data-dh-theme="dark"] .text-success { color: var(--dh-success) !important; }
:root[data-dh-theme="dark"] .text-warning { color: var(--dh-warning) !important; }
:root[data-dh-theme="dark"] :is(.bg-white, .bg-light, .bg-light-subtle, .bg-body, .bg-body-tertiary) {
    background-color: var(--dh-surface) !important;
}
:root[data-dh-theme="dark"] :is(hr, .border, .border-top, .border-bottom) { border-color: var(--dh-border) !important; }

:root[data-dh-theme="dark"] :is(.form-control, .form-select, .input-group-text, .form-control[type="file"]),
:root[data-dh-theme="dark"] :is(.dh-public-checkout-card, .dh-public-flow-card) :is(.form-control, .form-select) {
    background: #172637;
    border-color: var(--dh-border-strong);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] :is(.form-label, .dh-retention-form label:not(.dh-retention-ack)) { color: var(--dh-ink); }
:root[data-dh-theme="dark"] .form-text { color: var(--dh-ink-soft); }
:root[data-dh-theme="dark"] .invalid-feedback { color: var(--dh-danger); }

:root[data-dh-theme="dark"] :is(.form-control, .form-select)::placeholder { color: #b7c6d6; opacity: 1; }
:root[data-dh-theme="dark"] :is(.form-control, .form-select):disabled,
:root[data-dh-theme="dark"] :is(.form-control, .form-select)[readonly] {
    background: #26394c;
    color: var(--dh-ink-soft);
    opacity: 1;
}
:root[data-dh-theme="dark"] :is(.form-control, .form-select):focus {
    background: #172637;
    border-color: #f6d17b;
    color: var(--dh-ink);
    box-shadow: 0 0 0 .22rem rgba(246, 209, 123, .24);
}
/* Restore the native-looking disclosure icon lost to background shorthands.
   Keep Bootstrap's validation icon as a second layer. */
:root[data-dh-theme="dark"] .form-select:not([multiple]):where(:not([size]), [size="1"]) {
    background-image: var(--dh-select-chevron), var(--bs-form-select-bg-icon, none);
    background-position: right .75rem center, center right 2.25rem;
    background-size: 16px 12px, 16px 16px;
    background-repeat: no-repeat;
    padding-inline-end: max(2.25rem, var(--dh-select-padding-end, 0px));
}
:root[data-dh-theme="dark"] .form-select:is(.is-valid, .is-invalid):not([multiple]),
:root[data-dh-theme="dark"] .was-validated .form-select:is(:valid, :invalid):not([multiple]) {
    padding-inline-end: 3.5rem;
}
:root[data-dh-theme="dark"] .form-control[type="file"]::file-selector-button {
    background: #31485f;
    border-color: var(--dh-border-strong);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .form-check-input {
    background-color: #172637;
    border-color: #9badbf;
}
:root[data-dh-theme="dark"] .form-check-input:checked {
    background-color: #f6d17b;
    border-color: #f6d17b;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%2317243b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.1' d='M3.2 8.2 6.5 11.4 12.8 4.8'/%3E%3C/svg%3E");
}
:root[data-dh-theme="dark"] .form-check-input[type="radio"]:checked {
    background-image: radial-gradient(circle, #17243b 34%, transparent 38%);
}
:root[data-dh-theme="dark"] .form-switch .form-check-input:not(:checked) {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='%23c3cfdd'/%3E%3C/svg%3E");
}
:root[data-dh-theme="dark"] .form-switch .form-check-input:checked {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='%2317243b'/%3E%3C/svg%3E");
}
:root[data-dh-theme="dark"] .form-check-input:focus-visible,
:root[data-dh-theme="dark"] :is(.btn, .nav-link, a):focus-visible {
    outline: 3px solid #f6d17b;
    outline-offset: 2px;
}

:root[data-dh-theme="dark"] :is(.btn-outline-dark, .btn-outline-secondary, .dh-outline-btn) {
    background: transparent;
    border-color: var(--dh-border-strong);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] :is(.btn-outline-dark, .btn-outline-secondary, .dh-outline-btn):is(:hover, :focus-visible) {
    background: #31485f;
    border-color: #a6b8ca;
    color: #fff;
}
:root[data-dh-theme="dark"] .dh-topbar-avatar,
:root[data-dh-theme="dark"] .dh-primary-btn { color: #17243b; }
:root[data-dh-theme="dark"] .dh-topbar-avatar-wrap .dropdown-menu { background: var(--dh-surface); border-color: var(--dh-border); }
:root[data-dh-theme="dark"] .dh-topbar-avatar-wrap .dropdown-item { color: var(--dh-ink); }
:root[data-dh-theme="dark"] .dh-topbar-avatar-wrap .dropdown-item:is(:hover, :focus-visible) { background: #31485f; color: #fff; }
:root[data-dh-theme="dark"] .dh-topbar-avatar-wrap .dropdown-item.text-danger { color: var(--dh-danger) !important; }

:root[data-dh-theme="dark"] .table {
    --bs-table-color: var(--dh-ink);
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--dh-border);
    --bs-table-striped-color: var(--dh-ink);
    --bs-table-striped-bg: rgba(255, 255, 255, .045);
    --bs-table-hover-color: var(--dh-ink);
    --bs-table-hover-bg: rgba(246, 209, 123, .1);
}
:root[data-dh-theme="dark"] .dh-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, .045); }
:root[data-dh-theme="dark"] .dh-table tbody tr:hover,
:root[data-dh-theme="dark"] .dh-table tbody tr:hover td { background: rgba(246, 209, 123, .1) !important; }

:root[data-dh-theme="dark"] .fc {
    --fc-border-color: var(--dh-border);
    --fc-page-bg-color: var(--dh-surface);
    --fc-neutral-bg-color: var(--dh-surface-alt);
    --fc-today-bg-color: rgba(246, 209, 123, .13);
    --fc-list-event-hover-bg-color: #31485f;
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .fc .fc-scrollgrid { background: var(--dh-surface); }
:root[data-dh-theme="dark"] .fc :is(.fc-col-header-cell, .fc-popover-header) {
    background: var(--dh-surface-alt);
}
:root[data-dh-theme="dark"] .fc :is(.fc-timegrid-slot, .fc-daygrid-day-frame) { background: transparent; }
:root[data-dh-theme="dark"] .fc .fc-day-today { background: var(--fc-today-bg-color) !important; }
:root[data-dh-theme="dark"] .fc .fc-popover-close { opacity: 1; }
:root[data-dh-theme="dark"] .fc .fc-list-day-cushion a { color: var(--dh-ink); }
:root[data-dh-theme="dark"] .fc :is(.fc-button-primary, .fc-popover, .fc-list-day-cushion),
:root[data-dh-theme="dark"] .dh-calendar-google-panel .dh-google-status-card {
    background: var(--dh-surface-alt);
    border-color: var(--dh-border);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .fc .fc-button-primary:is(:hover, :focus-visible, .fc-button-active) {
    background: #31485f;
    border-color: #a6b8ca;
    color: #fff;
}
:root[data-dh-theme="dark"] .fc-theme-standard :is(th, td) { border-color: var(--dh-border); }
:root[data-dh-theme="dark"] .dh-calendar-view-settings { background: var(--dh-surface-alt); }

/* Workspace app.css uses scoped light gradients and higher specificity than
   the public/card defaults above. Keep these fixes within the signed-in shell. */
:root[data-dh-theme="dark"] .dh-app-body[data-dh-ui="2026"] .dh-shell-main {
    background: radial-gradient(circle at 92% 0%, rgba(var(--dh-workspace-accent-rgb), .085), transparent 24rem),
        var(--dh-background);
}
:root[data-dh-theme="dark"] .dh-app-body[data-dh-ui="2026"] .dh-topbar {
    border-color: var(--dh-border);
    box-shadow: 0 1px 0 rgba(0, 0, 0, .15);
}
:root[data-dh-theme="dark"] .dh-topbar :is(.dh-topbar-icon-action, .dh-topbar-avatar, .dh-workspace-tabs) {
    background: var(--dh-surface-alt);
    border-color: var(--dh-border-strong);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-topbar .dh-workspace-tab:not(.active) { color: var(--dh-ink-soft); }
:root[data-dh-theme="dark"] .dh-topbar .dh-workspace-tab:not(.active):is(:hover, :focus-visible) {
    background: #31485f;
    color: #fff;
}
:root[data-dh-theme="dark"] .dh-app-body[data-dh-ui="2026"] :is(
    .dh-card, .dh-highlight-card, .dh-highlight-item, .dh-context-hero, .dh-action-card
) {
    background: var(--dh-surface);
    border-color: var(--dh-border);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-app-body[data-dh-ui="2026"] .dh-list-card {
    background: var(--dh-surface-alt);
    border-color: var(--dh-border);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-app-body[data-dh-ui="2026"] .dh-context-hero {
    background: radial-gradient(circle at 88% 5%, rgba(var(--dh-workspace-accent-rgb), .15), transparent 19rem),
        var(--dh-surface);
}
:root[data-dh-theme="dark"] .dh-app-body[data-dh-ui="2026"] .dh-table thead th {
    background: var(--dh-surface-alt);
    border-color: var(--dh-border);
    color: var(--dh-ink-soft);
}
:root[data-dh-theme="dark"] .dh-app-body[data-dh-ui="2026"] .btn-outline-dark {
    background: var(--dh-surface-alt);
    border-color: var(--dh-border-strong);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-app-body[data-dh-ui="2026"] .btn-outline-dark:is(:hover, :focus) {
    background: #31485f;
    color: #fff;
}
:root[data-dh-theme="dark"] .dh-app-body[data-dh-ui="2026"] :is(.form-control, .form-select) {
    background-color: #172637;
    border-color: var(--dh-border-strong);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-app-body[data-dh-ui="2026"] :is(.form-control, .form-select):focus {
    border-color: var(--dh-warning);
}
:root[data-dh-theme="dark"] .dh-app-body[data-dh-ui="2026"] :is(.form-control, .form-select):is(:disabled, [readonly]) {
    background-color: var(--dh-surface-alt);
    color: var(--dh-ink-soft);
}
:root[data-dh-theme="dark"] .dh-app-body[data-dh-ui="2026"] :is(.form-control, .form-select):is(.is-invalid, [aria-invalid="true"]) {
    border-color: var(--dh-danger);
}
:root[data-dh-theme="dark"] .dh-app-body[data-dh-ui="2026"] :is(.form-control, .form-select).is-valid {
    border-color: var(--dh-success);
}
:root[data-dh-theme="dark"] .dh-calendar-workspace :is(.dh-calendar-main-card, .dh-calendar-side-card, .dh-calendar-view-switcher, .dh-bulk-toolbar) {
    background: var(--dh-surface);
    border-color: var(--dh-border);
}
:root[data-dh-theme="dark"] .dh-calendar-workspace .fc .fc-toolbar-title { color: var(--dh-ink); }
:root[data-dh-theme="dark"] .dh-calendar-view-switcher .btn-secondary {
    background: #f6d17b;
    color: #17243b;
}

/* The first screen in each signed-in area must remain readable. */
:root[data-dh-theme="dark"] :is(
    .dh-context-hero, .dh-highlight-card, .dh-highlight-item, .dh-ops-card,
    .dh-list-card, .dh-action-card, .dh-client-dashboard-hero,
    .dh-client-dashboard-stats article, .dh-client-dashboard-ai,
    .dh-staff-command-hero, .dh-staff-next, .dh-staff-command-metrics article
) {
    background: var(--dh-surface);
    border-color: var(--dh-border);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] :is(.dh-context-hero, .dh-client-dashboard-hero, .dh-staff-command-hero) {
    background: radial-gradient(circle at top right, rgba(241, 188, 22, .12), transparent 34%), var(--dh-surface);
}
:root[data-dh-theme="dark"] :is(.dh-highlight-item, .dh-list-card, .dh-client-dashboard-stats article, .dh-staff-command-metrics article) {
    background: var(--dh-surface-alt);
}
:root[data-dh-theme="dark"] .dh-center-metric__icon {
    background: #31485f;
    opacity: 1;
}
:root[data-dh-theme="dark"] .dh-center-metric.is-primary .dh-center-metric__icon { color: #f6d17b; }
:root[data-dh-theme="dark"] .dh-badge.info { color: #a7ceff; }
:root[data-dh-theme="dark"] .dh-client-dashboard-hero__eyebrow,
:root[data-dh-theme="dark"] .dh-client-dashboard-stat__icon,
:root[data-dh-theme="dark"] .dh-client-dashboard-ai__icon { color: #f6d17b; }
:root[data-dh-theme="dark"] .dh-client-dashboard-hero__visual > span {
    background: var(--dh-surface-alt);
    border-color: var(--dh-border);
    color: #f6d17b;
}
:root[data-dh-theme="dark"] .dh-staff-command {
    --dh-staff-ink: #edf3fa;
    --dh-staff-muted: #c3cfdd;
    --dh-staff-line: #607890;
    --dh-staff-green: #86e3ae;
}
:root[data-dh-theme="dark"] .dh-staff-command .dh-card,
:root[data-dh-theme="dark"] :is(.dh-staff-agenda-row, .dh-staff-action-list > a, .dh-staff-profile-list > div) {
    background: var(--dh-surface-alt);
    border-color: var(--dh-border);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] :is(.dh-staff-agenda-row, .dh-staff-action-list > a):is(:hover, :focus-visible) {
    background: #31485f;
    color: #fff;
}
:root[data-dh-theme="dark"] :is(.dh-staff-command-hero__eyebrow, .dh-staff-next__head) { color: var(--dh-ink-soft); }
:root[data-dh-theme="dark"] .dh-staff-next > time,
:root[data-dh-theme="dark"] .dh-staff-agenda-row > time { color: var(--dh-success); }
:root[data-dh-theme="dark"] .dh-staff-next__footer > a {
    background: var(--dh-surface-alt);
    border-color: var(--dh-border);
}

/* Booking and calendar controls keep selection and disabled states distinct. */
:root[data-dh-theme="dark"] :is(.dh-client-calendar, .dh-booking-calendar-shell, .dh-day-slot-panel, .dh-month-day, .dh-slot-option-label) {
    background: var(--dh-surface);
    border-color: var(--dh-border);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] :is(.dh-month-day.is-selected, .dh-slot-option-input:checked + .dh-slot-option-label) {
    background: #374333;
    border-color: #f6d17b;
    color: #fff;
}
:root[data-dh-theme="dark"] .dh-month-day.is-unavailable {
    background: #26394c;
    color: #b7c6d6;
}
:root[data-dh-theme="dark"] .dh-slot-option-input:focus-visible + .dh-slot-option-label {
    outline: 3px solid #f6d17b;
    outline-offset: 2px;
}

/* Staff availability uses a light gradient and hides the native weekday checkboxes. */
:root[data-dh-theme="dark"] #staffAvailabilityForm .dh-recurrence-card {
    background: var(--dh-surface-alt);
    border-color: var(--dh-border);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] #staffAvailabilityForm .dh-weekday-pill {
    position: relative;
}
:root[data-dh-theme="dark"] #staffAvailabilityForm .btn-check:checked + .dh-weekday-pill {
    background: var(--dh-warning);
    border-color: var(--dh-warning);
    color: var(--dh-background);
}
:root[data-dh-theme="dark"] #staffAvailabilityForm .btn-check:checked + .dh-weekday-pill::before {
    content: "";
    position: absolute;
    inset-inline-start: .45rem;
    top: 50%;
    width: .34rem;
    height: .57rem;
    border: solid currentColor;
    border-width: 0 2px 2px 0;
    transform: translateY(-65%) rotate(45deg);
}
:root[data-dh-theme="dark"] #staffAvailabilityForm .btn-check:focus-visible + .dh-weekday-pill {
    outline: 3px solid var(--dh-warning);
    outline-offset: 2px;
    box-shadow: none;
}

/* Client workspace: switch foreground and background together. Preserve
   dark ink on yellow CTAs when the surrounding copy switches to light ink. */
:root[data-dh-theme="dark"] .dh-client-copilot .dh-client-copilot__eyebrow,
:root[data-dh-theme="dark"] .dh-client-home-visit-followups .dh-badge.warning {
    background: #483a16;
    color: #ffdd80;
}
:root[data-dh-theme="dark"] .dh-client-copilot .dh-client-copilot__package-form {
    background: var(--dh-surface-alt);
    border-color: var(--dh-border);
}
:root[data-dh-theme="dark"] .dh-client-copilot .btn.dh-primary-btn.dh-client-copilot__cta {
    color: #17243b;
}
:root[data-dh-theme="dark"] :is(.dh-client-copilot, .dh-client-bookings) .btn-outline-primary {
    --bs-btn-color: #a7ceff;
    --bs-btn-border-color: #8198af;
    --bs-btn-hover-bg: #31485f;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-border-color: #a7ceff;
    --bs-btn-active-bg: #31485f;
    --bs-btn-active-color: #fff;
    --bs-btn-active-border-color: #a7ceff;
}
:root[data-dh-theme="dark"] :is(
    .dh-client-copilot, .dh-client-bookings, .dh-client-payments,
    .dh-booking-inbox, .dh-tenant-payments, .dh-payments-workspace
) .btn-outline-danger {
    --bs-btn-color: #ffad9c;
    --bs-btn-border-color: #ffad9c;
    --bs-btn-hover-bg: #40292c;
    --bs-btn-hover-color: #ffcdc2;
    --bs-btn-hover-border-color: #ffad9c;
    --bs-btn-active-bg: #40292c;
    --bs-btn-active-color: #ffcdc2;
    --bs-btn-active-border-color: #ffad9c;
}
:root[data-dh-theme="dark"] :is(
    .dh-client-bookings-stat, .dh-client-bookings-workspace, .dh-client-packages-panel,
    .dh-client-payments-stat, .dh-client-payments-history,
    .dh-client-profile-details, .dh-client-profile-status, .dh-client-profile-notifications,
    .dh-client-profile-contracts, .dh-client-profile-save
) {
    background: var(--dh-surface);
    border-color: var(--dh-border);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] :is(
    .dh-client-bookings-section--calendar, .dh-client-packages-panel__header,
    .dh-client-package-card, .dh-client-package-card.is-usable, .dh-client-package-card__balance,
    .dh-client-payments-history__header, .dh-client-payments-empty,
    .dh-client-payment-card, .dh-client-payment-card.needs-action,
    .dh-client-profile-section-header, .dh-client-profile-notification,
    .dh-client-dashboard-action-grid > a
) {
    background: var(--dh-surface-alt);
    border-color: var(--dh-border);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] :is(
    .dh-client-dashboard-action-grid > a, .dh-client-profile-notification
):is(:hover, :focus-within) {
    background: #31485f;
    border-color: var(--dh-border-strong);
}
:root[data-dh-theme="dark"] :is(
    .dh-client-bookings-stat strong, .dh-client-bookings-section__header h2,
    .dh-client-packages-panel h2, .dh-client-package-card h3,
    .dh-client-package-card__progress strong, .dh-client-package-card__facts dd,
    .dh-client-payments-stat strong, .dh-client-payments-history h2,
    .dh-client-payment-card h3, .dh-client-payment-card__facts dd,
    .dh-client-profile-section-header h2, .dh-client-profile-status h2,
    .dh-client-profile-notifications h2, .dh-client-profile-status dd, .dh-client-profile-contracts h2
) { color: var(--dh-ink); }
:root[data-dh-theme="dark"] :is(
    .dh-client-bookings-stat div > span, .dh-client-bookings-calendar__help,
    .dh-client-packages-panel__header p, .dh-client-package-card__progress > div,
    .dh-client-package-card__facts dt, .dh-client-payments-stat div > span,
    .dh-client-payments-history p, .dh-client-payment-card__facts dt, .dh-client-payments-empty p,
    .dh-client-profile-section-header p, .dh-client-profile-status dt,
    .dh-client-profile-notifications > p, .dh-client-profile-contracts p, .dh-client-profile-save p
) { color: var(--dh-ink-soft); }
:root[data-dh-theme="dark"] :is(
    .dh-client-bookings-section__header > span, .dh-client-packages-panel__eyebrow,
    .dh-client-payments-history__eyebrow, .dh-client-profile-section-header__eyebrow,
    .dh-client-profile-notifications__header > div > span, .dh-client-profile-status header > span
) { color: var(--dh-warning); }
:root[data-dh-theme="dark"] .dh-client-bookings-section + .dh-client-bookings-section {
    border-top-color: var(--dh-border);
}
:root[data-dh-theme="dark"] .dh-client-package-card.is-usable .dh-client-package-card__balance {
    background: #483a16;
    border-color: #b08b45;
    color: #ffdd80;
}
:root[data-dh-theme="dark"] .dh-client-package-card__ready { color: var(--dh-success); }
:root[data-dh-theme="dark"] .dh-client-package-card progress,
:root[data-dh-theme="dark"] .dh-client-package-card progress::-webkit-progress-bar {
    background: #111b28;
}

:root[data-dh-theme="dark"] :is(.dh-alert.success, .alert-success) { background: #17382e; color: #a6edc5; border-color: #326c55; }
:root[data-dh-theme="dark"] :is(.dh-alert.warning, .alert-warning) { background: #3b301b; color: #f6d17b; border-color: #80643a; }
:root[data-dh-theme="dark"] :is(.dh-alert.danger, .alert-danger) { background: #40292c; color: #ffb9ab; border-color: #915259; }
:root[data-dh-theme="dark"] :is(.alert-info, .dh-notification-alert) { background: #1c344b; color: #c1dcff; border-color: #496c8f; }

/* Consent UI keeps its configured light palette; theme state never changes consent. */
:root[data-dh-theme="dark"] .dh-cookie-banner {
    color-scheme: light;
    --dh-ink: #15202b;
    --dh-ink-soft: #5d6773;
    --dh-border: #d8e0e8;
}
:root[data-dh-theme="dark"] .dh-cookie-banner .form-check-input:not(:checked) { background-color: #fff; }

/* The grooming columns share the viewport, so field width must follow the
   actual panel width, not a Bootstrap viewport breakpoint. */
.dh-groom-workspace .dh-groom-record-filters.row,
.dh-groom-workspace .dh-groom-record-editor .row:has(> div > input[type="datetime-local"]) {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 14.25rem), 1fr));
    gap: .75rem;
    margin-inline: 0;
}
.dh-groom-workspace .dh-groom-record-filters.row > div,
.dh-groom-workspace .dh-groom-record-editor .row:has(> div > input[type="datetime-local"]) > div {
    width: auto;
    min-width: 0;
    padding-inline: 0;
    margin-top: 0;
}
.dh-groom-workspace .dh-groom-record-filters.row > div:last-child { grid-column: 1 / -1; }
.dh-public-body .dh-booking-account-confirmation {
    background: rgba(16, 185, 129, .09);
    border: 1px solid rgba(16, 185, 129, .22);
    color: #065f46;
}

/* The owner cockpit has many bespoke light panels. Keep it a bounded, readable
   light island until those panels can be migrated individually. */
:root[data-dh-theme="dark"] .dh-control-center {
    color-scheme: light;
    --dh-ink: #15202b;
    --dh-ink-soft: #475467;
    --dh-ink-muted: #5d6773;
    --dh-surface: #fff;
    --dh-surface-alt: #f6f1e7;
    --dh-surface-soft: #eef3f7;
    --dh-background: #f7f9fc;
    --dh-border: #d8e0e8;
    --dh-border-strong: #6a7380;
    --dh-text-main: #15202b;
    --dh-text-muted: #5d6773;
    --dh-success: #1f7a54;
    --dh-warning: #805600;
    --dh-danger: #bc4431;
    --bs-body-color: #15202b;
    --bs-body-bg: #fff;
    --bs-secondary-color: #475467;
    --bs-border-color: #d8e0e8;
    --bs-link-color: #165a9f;
    --bs-link-hover-color: #103e74;
    --dh-select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23475467' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m3 6 5 5 5-5'/%3E%3C/svg%3E");
    padding: clamp(1rem, 2vw, 1.5rem);
    border: 1px solid var(--dh-border);
    border-radius: var(--dh-radius);
    background: var(--dh-background);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-control-center :is(input, select, textarea, button) { color-scheme: light; }
:root[data-dh-theme="dark"] .dh-control-center :is(.form-control, .form-select, .input-group-text) {
    background-color: #fff;
    border-color: var(--dh-border-strong);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-control-center :is(.form-control, .form-select)::placeholder {
    color: var(--dh-ink-muted);
    opacity: 1;
}
:root[data-dh-theme="dark"] .dh-control-center :is(.form-control, .form-select):focus {
    background-color: #fff;
    border-color: #9a6700;
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-control-center :is(.form-control, .form-select):is(:disabled, [readonly]) {
    background-color: #eef2f6;
    color: var(--dh-ink-soft);
}
:root[data-dh-theme="dark"] .dh-control-center .form-check-input:not(:checked) {
    background-color: #fff;
    border-color: var(--dh-border-strong);
}

/* Tenant assistance: tickets, conversations and the adjacent roadmap share one page. */
:root[data-dh-theme="dark"] .dh-feedback-page :is(
    .dh-feedback-jump-nav, .dh-support-ticket, .dh-support-message,
    .dh-roadmap-card, .dh-changelog-card
) {
    background: var(--dh-surface-alt);
    border-color: var(--dh-border);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-feedback-page .dh-support-ticket:is(:hover, :focus-visible),
:root[data-dh-theme="dark"] .dh-feedback-page .dh-support-ticket.is-selected {
    background: #31485f;
    border-color: #a6b8ca;
    color: #fff;
}
:root[data-dh-theme="dark"] .dh-feedback-page .dh-support-message.is-centre { background: #26394c; }
:root[data-dh-theme="dark"] .dh-feedback-page .dh-roadmap-card__labels span {
    background: #31485f;
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-feedback-page .dh-roadmap-card__labels .is-status {
    background: #3b301b;
    color: var(--dh-warning);
}

/* Staff compensation: the hero was already dark, but its data cards were not. */
:root[data-dh-theme="dark"] .dh-staff-compensation {
    --dh-compensation-ink: var(--dh-ink);
    --dh-compensation-muted: var(--dh-ink-soft);
    --dh-compensation-line: var(--dh-border);
    --dh-compensation-green: var(--dh-success);
    --dh-compensation-green-soft: #17382e;
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-staff-compensation :is(
    .dh-staff-compensation-unavailable, .dh-staff-compensation-metrics article,
    .dh-staff-compensation-overview, .dh-staff-compensation-register,
    .dh-staff-compensation-overview__grid > article, .dh-staff-compensation-estimate,
    .dh-staff-compensation-search, .dh-staff-compensation-entry,
    .dh-staff-compensation-entry__amounts > div, .dh-staff-compensation-entry__progress,
    .dh-staff-compensation-empty.is-search
) {
    background: var(--dh-surface-alt);
    border-color: var(--dh-border);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-staff-compensation :is(
    .dh-staff-compensation-overview, .dh-staff-compensation-register,
    .dh-staff-compensation-unavailable
) { background: var(--dh-surface); }
:root[data-dh-theme="dark"] .dh-staff-compensation .dh-staff-compensation-entry:hover,
:root[data-dh-theme="dark"] .dh-staff-compensation .dh-staff-compensation-search:focus-within {
    background: #31485f;
}
:root[data-dh-theme="dark"] .dh-staff-compensation .dh-staff-compensation-overview__grid > article.is-net {
    background: #17382e;
}
:root[data-dh-theme="dark"] .dh-staff-compensation .dh-staff-compensation-entry__amounts > div.is-pending {
    background: #3b301b;
}
:root[data-dh-theme="dark"] .dh-staff-compensation :is(
    .dh-staff-compensation-metrics article > span,
    .dh-staff-compensation-entry__head > span,
    .dh-staff-compensation-estimate > span,
    .dh-staff-compensation-estimate > small,
    .dh-staff-compensation-register__head > span:last-child
) {
    background: #31485f;
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-staff-compensation :is(
    .dh-staff-compensation-overview__grid p,
    .dh-staff-compensation-search small,
    .dh-staff-compensation-entry__amounts dt,
    .dh-staff-compensation-entry__dates dt
) { color: var(--dh-ink-soft); }
:root[data-dh-theme="dark"] .dh-staff-compensation .dh-staff-compensation-entry__progress p {
    color: var(--dh-warning);
}

/* Client referral: every white card must switch together with its light text. */
:root[data-dh-theme="dark"] .dh-client-referral {
    background: radial-gradient(circle at 94% 4%, rgba(241, 188, 22, .1), transparent 15rem), var(--dh-surface);
    border-color: var(--dh-border);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-client-referral :is(
    .dh-client-referral__terms, .dh-client-referral__share,
    .dh-client-referral__metrics article, .dh-client-referral__rules,
    .dh-client-referral__examples, .dh-client-referral__vouchers article
) {
    background: var(--dh-surface-alt);
    border-color: var(--dh-border);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-client-referral :is(
    .dh-client-referral__eyebrow, .dh-client-referral__vouchers article > span
) { color: #f6d17b; }
:root[data-dh-theme="dark"] .dh-client-referral__icon { color: #17243b; }
:root[data-dh-theme="dark"] .dh-client-referral__accept input { accent-color: #f6d17b; }

/* Public shop, including the empty state and product modal. */
:root[data-dh-theme="dark"] .dh-public-shop-page { background: var(--dh-background); }
:root[data-dh-theme="dark"] .dh-public-shop-hero {
    background: radial-gradient(circle at 88% 10%, rgba(241, 188, 22, .1), transparent 25%), var(--dh-surface);
    border-color: var(--dh-border);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] :is(
    .dh-public-shop-hero__badge, .dh-public-shop-disclosure,
    .dh-public-shop-store, .dh-public-shop-product,
    .dh-public-shop-product__category, .dh-public-shop-store__count,
    .dh-public-shop-modal .modal-header, .dh-public-shop-modal__product
) {
    background: var(--dh-surface-alt);
    border-color: var(--dh-border);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-public-shop-product { background: var(--dh-surface); }
:root[data-dh-theme="dark"] :is(
    .dh-public-shop-product__media, .dh-public-shop-product__fallback,
    .dh-public-shop-modal__image-wrap
) { background: var(--dh-surface-alt); }
:root[data-dh-theme="dark"] :is(
    .dh-public-shop-hero__eyebrow, .dh-public-shop-product__price,
    .dh-public-shop-modal__product-price
) { color: #f6d17b; }
:root[data-dh-theme="dark"] :is(
    .dh-public-shop-hero__mark, .dh-public-shop-store__mark,
    .dh-public-shop-modal__store-mark
) {
    background: #31485f;
    color: #f6d17b;
}
:root[data-dh-theme="dark"] .dh-public-shop-disclosure__icon { color: #a7ceff; }
:root[data-dh-theme="dark"] .dh-public-shop-product__fallback { color: var(--dh-ink-muted); }
:root[data-dh-theme="dark"] .dh-public-shop-modal .btn-close { filter: invert(1) grayscale(100%); opacity: .85; }

/* Service detail tiles already inherit dark ink; replace their fixed light surface. */
:root[data-dh-theme="dark"] .dh-public-service-detail-section .dh-course-info-tile {
    background: var(--dh-surface-alt);
    border-color: var(--dh-border);
}

/* Public service chips use fixed light-mode inks in app.css. */
:root[data-dh-theme="dark"] .dh-service-chip.chip-duration {
    background: #483a16;
    color: #ffdd80;
}
:root[data-dh-theme="dark"] .dh-service-chip.chip-price {
    background: #31485f;
    color: #edf3fa;
}

/* Course chips and prices have fixed light-mode ink in app.css. */
:root[data-dh-theme="dark"] :is(.dh-course-chip, .dh-course-price-tag) {
    background: #483a16;
    border-color: #a88735;
    color: #ffdd80;
}
:root[data-dh-theme="dark"] .dh-course-chip.chip-online {
    background: #173d52;
    border-color: #478baa;
    color: #afe7ff;
}
:root[data-dh-theme="dark"] .dh-course-chip.chip-hybrid {
    background: #3b294f;
    border-color: #8d68af;
    color: #dfc3ff;
}
:root[data-dh-theme="dark"] .dh-course-chip.chip-loc {
    background: #31485f;
    border-color: var(--dh-border);
    color: var(--dh-ink-soft);
}

/* Booking uses Bootstrap's light alert and a few fixed light progress surfaces. */
:root[data-dh-theme="dark"] .alert.alert-light {
    background: var(--dh-surface-alt);
    border-color: var(--dh-border);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .alert.alert-light a { color: #a7ceff; }
:root[data-dh-theme="dark"] .dh-public-booking-page #homeVisitWrapper > .dh-card {
    background: var(--dh-surface-alt) !important; /* Override the view's inline light gradient. */
}
:root[data-dh-theme="dark"] .dh-public-booking-journey__step {
    background: var(--dh-surface-alt);
    border-color: var(--dh-border);
    color: var(--dh-ink-soft);
}
:root[data-dh-theme="dark"] .dh-public-booking-journey__step:is(:hover, :focus-visible, [aria-current="step"]) {
    background: #4d401c;
    border-color: #d9a638;
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-service-picker__meta {
    background: linear-gradient(90deg, rgba(23, 38, 55, 0), #172637 24%);
    border-color: var(--dh-border);
    color: var(--dh-ink-soft);
}
:root[data-dh-theme="dark"] .dh-public-booking-overview {
    background: linear-gradient(180deg, #1b2a3a, #233448);
}
:root[data-dh-theme="dark"] .dh-public-booking-overview__heading > span {
    color: #f6d17b;
}
:root[data-dh-theme="dark"] .dh-public-booking-overview__item {
    background: #233448;
    border: 1px solid var(--dh-border);
}
:root[data-dh-theme="dark"] .dh-public-booking-overview__item.is-complete {
    background: linear-gradient(145deg, #2a3c4f, #263748);
    box-shadow: inset 3px 0 0 #f6d17b;
}
:root[data-dh-theme="dark"] .dh-public-booking-consent-card {
    background: linear-gradient(145deg, #233448, #1b2a3a);
    border-color: var(--dh-border);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-public-booking-consent-preferences {
    border-color: var(--dh-border);
}
:root[data-dh-theme="dark"] .dh-public-booking-consent-preferences > summary::after {
    background: #4d401c;
    color: #f6d17b;
}

/* Gift offers ship with inline light gradients; keep actual cover artwork intact. */
:root[data-dh-theme="dark"] .dh-public-gift-section .dh-gift-steps { color: var(--dh-ink-soft); }
:root[data-dh-theme="dark"] .dh-public-gift-section .dh-gift-offer-card:not(.has-cover-image) {
    background-image: linear-gradient(150deg, #1b2a3a, #233448) !important;
}
:root[data-dh-theme="dark"] .dh-public-gift-section .dh-gift-offer-price { color: #f6d17b; }
:root[data-dh-theme="dark"] .dh-public-gift-section .dh-gift-offer-card .dh-badge.success {
    background: #1b4f42;
    color: #c5f7da;
}

/* Public tenant home: map fallback and the light CTA are deliberate exceptions. */
:root[data-dh-theme="dark"] .dh-location-map-fallback-empty {
    background: var(--dh-surface-alt);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-location-map-fallback-label {
    background: #25384c;
    border-color: var(--dh-border);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-cta-card-dark .btn-light.text-dark { color: #17243b !important; }

/* Residual Hub contrast: pair colors on the components that supply their own surfaces. */

/* Platform login has important declarations in its view; leave the branded CTA alone. */
:root[data-dh-theme="dark"] .dh-auth-form-wrapper:has(> form[action="/admin/login"]) {
    --dh-input-bg: #172637;
    background: var(--dh-surface) !important;
}
:root[data-dh-theme="dark"] .dh-auth-form-wrapper:has(> form[action="/admin/login"]) .dh-brand-pill {
    background-color: #40292c !important;
    border-color: #915259 !important;
    color: var(--dh-danger) !important;
}
:root[data-dh-theme="dark"] .dh-auth-form-wrapper:has(> form[action="/admin/login"]) .form-control:focus {
    background-color: var(--dh-input-bg) !important;
    border-color: var(--dh-warning) !important;
    box-shadow: 0 0 0 .22rem rgba(246, 209, 123, .24) !important;
}
:root[data-dh-theme="dark"] .dh-auth-form-wrapper:has(> form[action="/admin/login"]) .form-control.is-invalid {
    border-color: var(--dh-danger) !important;
}
:root[data-dh-theme="dark"] .dh-auth-form-wrapper:has(> form[action="/admin/login"]) .dh-link-muted:is(:hover, :focus-visible) {
    color: var(--dh-warning) !important;
}
:root[data-dh-theme="dark"] .dh-reset-card {
    background: var(--dh-surface);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-reset-card :is(.dh-reset-pill, .dh-reset-meta) {
    background: var(--dh-surface-alt);
    border-color: var(--dh-border);
}
:root[data-dh-theme="dark"] .dh-reset-card :is(.dh-reset-pill, .dh-reset-meta-label, .dh-reset-link) { color: var(--dh-ink-soft); }
:root[data-dh-theme="dark"] .dh-reset-card .dh-reset-meta-value { color: var(--dh-ink); }
:root[data-dh-theme="dark"] .dh-reset-card .dh-reset-link:is(:hover, :focus-visible) { color: var(--dh-warning); }

/* The owner cockpit remains a light island, including its keyboard focus. */
:root[data-dh-theme="dark"] .dh-control-center .dh-operations-pulse__summary small { color: var(--dh-ink-soft); }
:root[data-dh-theme="dark"] .dh-control-center .btn-outline-danger {
    --bs-btn-color: #9f3030;
    --bs-btn-border-color: #9f3030;
    --bs-btn-hover-bg: #9f3030;
    --bs-btn-hover-border-color: #9f3030;
    --bs-btn-active-bg: #9f3030;
    --bs-btn-active-border-color: #9f3030;
}
:root[data-dh-theme="dark"] .dh-control-center :is(a, .btn, .form-check-input, summary):focus-visible {
    outline: 3px solid #9a6700;
    outline-offset: 2px;
}
:root[data-dh-theme="dark"] .dh-control-center :is(.dh-bug-register__create, .dh-bug-register__item) > summary:focus-visible {
    outline-offset: -3px;
}
:root[data-dh-theme="dark"] .dh-control-center .dh-bug-register__create > summary:focus-visible { outline-color: #f6d17b; }

/* Admin/tenant tab component, not the sidebar or the public navigation. */
:root[data-dh-theme="dark"] .dh-app-body[data-dh-ui="2026"] :is(.dh-admin-tabs:not(.dh-groom-tabs), .dh-groom-tabs-wrap) {
    background: var(--dh-surface);
    border-color: var(--dh-border);
}
:root[data-dh-theme="dark"] .dh-app-body[data-dh-ui="2026"] .dh-admin-tabs .nav-link,
:root[data-dh-theme="dark"] .sales-partner-admin #partnerTabs .nav-link {
    /* Layout-level light text rules/tokens also reach these app nav links. */
    color: #c3cfdd !important;
}
:root[data-dh-theme="dark"] .dh-app-body[data-dh-ui="2026"] .dh-admin-tabs .nav-link:is(:hover, :focus-visible),
:root[data-dh-theme="dark"] .sales-partner-admin #partnerTabs .nav-link:is(:hover, :focus-visible) {
    background: #31485f;
    color: #edf3fa !important;
}
:root[data-dh-theme="dark"] .dh-app-body[data-dh-ui="2026"] .dh-admin-tabs .nav-link:is(.active, .is-current),
:root[data-dh-theme="dark"] .sales-partner-admin #partnerTabs .nav-link:is(.active, .is-current) {
    background: #4d401c;
    border-color: var(--dh-warning);
    color: #edf3fa !important;
    box-shadow: inset 0 -2px var(--dh-warning);
}
:root[data-dh-theme="dark"] .dh-app-body[data-dh-ui="2026"] .dh-admin-tabs .nav-link:focus-visible {
    outline-offset: -3px;
}
:root[data-dh-theme="dark"] .dh-app-body[data-dh-ui="2026"] .dh-horizontal-scroll-button {
    background: var(--dh-surface-alt);
    border-color: var(--dh-border-strong);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-app-body[data-dh-ui="2026"] .dh-horizontal-scroll-button:hover:not([aria-disabled="true"]) { background: #31485f; }
:root[data-dh-theme="dark"] .dh-app-body[data-dh-ui="2026"] .dh-horizontal-scroll-button:focus-visible { outline-color: var(--dh-warning); }
:root[data-dh-theme="dark"] #tab-cu .badge.bg-warning.text-dark {
    color: #17243b !important;
}
:root[data-dh-theme="dark"] #tab-cu .alert-warning code { color: inherit; }

/* The collaborator menus have their own light backgrounds in app.css. */
:root[data-dh-theme="dark"] :is(.dh-collab-jump-nav, .dh-compensation-filters) {
    background: #1b2a3a;
    border-color: #607890;
    box-shadow: none;
}
:root[data-dh-theme="dark"] .dh-collab-jump-nav a,
:root[data-dh-theme="dark"] .dh-compensation-filters button { color: #c3cfdd; }
:root[data-dh-theme="dark"] .dh-collab-jump-nav a:is(:hover, :focus-visible),
:root[data-dh-theme="dark"] .dh-compensation-filters button:not(.is-active):is(:hover, :focus-visible) {
    background: #31485f;
    color: #edf3fa;
}
:root[data-dh-theme="dark"] .dh-collab-jump-nav a:focus-visible,
:root[data-dh-theme="dark"] .dh-compensation-filters button:focus-visible {
    outline: 2px solid #f6d17b;
    outline-offset: 2px;
}
:root[data-dh-theme="dark"] .dh-compensation-filters button span {
    background: #354d63;
    color: #edf3fa;
}
:root[data-dh-theme="dark"] .dh-compensation-filters button.is-active {
    background: #4d401c;
    color: #fff3ce;
    box-shadow: inset 0 0 0 1px #c5a563;
}
:root[data-dh-theme="dark"] .dh-compensation-filters button.is-active span {
    background: #6c5728;
    color: #fff3ce;
}

/* Bootstrap's close SVG stays black without data-bs-theme. Recolor the icon, not
   the entire button, so the focus ring keeps its own contrast. */
:root[data-dh-theme="dark"] .dh-app-body[data-dh-ui="2026"] .modal-header > .btn-close[data-bs-dismiss="modal"] {
    --bs-btn-close-bg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3 3 10 10M13 3 3 13' fill='none' stroke='%23edf3fa' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    --bs-btn-close-opacity: .85;
    --bs-btn-close-hover-opacity: 1;
}
:root[data-dh-theme="dark"] .dh-app-body[data-dh-ui="2026"] .modal-header > .btn-close[data-bs-dismiss="modal"]:focus-visible {
    outline: 3px solid var(--dh-warning);
    outline-offset: 2px;
}
:root[data-dh-theme="dark"] .dh-dicom-modal :is(.modal-header, .dh-dicom-stage, .dh-empty-rich) {
    background: var(--dh-surface-alt);
    border-color: var(--dh-border);
}
:root[data-dh-theme="dark"] .dh-billing-lock__card {
    background: var(--dh-surface);
    border-color: var(--dh-border);
    color: var(--dh-ink);
}

/* Online booking inbox and the Calendar editor's available, forced, and unavailable days. */
:root[data-dh-theme="dark"] .dh-notification-tools > a {
    background: var(--dh-surface-alt);
    color: var(--dh-ink);
    border-color: var(--dh-border-strong);
}
:root[data-dh-theme="dark"] .dh-notification-tools > a:is(:hover, :focus-visible) {
    background: #31485f;
    border-color: var(--dh-warning);
}

:root[data-dh-theme="dark"] .dh-booking-inbox .dh-inbox-summary > div,
:root[data-dh-theme="dark"] .dh-booking-inbox :is(.dh-booking-request-note, .dh-waitlist-details) {
    background: var(--dh-surface);
    border-color: var(--dh-border);
}
:root[data-dh-theme="dark"] .dh-booking-inbox .dh-waitlist-details[open] { box-shadow: none; }
:root[data-dh-theme="dark"] .dh-booking-inbox .dh-booking-request-meta strong { color: var(--dh-ink); }
:root[data-dh-theme="dark"] .dh-booking-inbox .dh-context-hero__eyebrow { color: var(--dh-warning); }
:root[data-dh-theme="dark"] .dh-booking-inbox .dh-booking-request-note--attention {
    background: #3b301b;
    border-color: #80643a;
    color: var(--dh-warning);
}
:root[data-dh-theme="dark"] .dh-appointment-editor {
    --dh-appointment-ink: var(--dh-ink);
    --dh-appointment-muted: var(--dh-ink-soft);
    --dh-appointment-line: var(--dh-border);
}
:root[data-dh-theme="dark"] .dh-appointment-editor__hero .dh-context-hero__title { color: var(--dh-ink); }
:root[data-dh-theme="dark"] .dh-appointment-editor__hero .dh-context-hero__copy { color: var(--dh-ink-soft); }
:root[data-dh-theme="dark"] .dh-appointment-editor :is(
    .dh-appointment-slot-picker, .dh-appointment-capacity-override,
    .dh-appointment-meeting-card, .dh-appointment-meeting-card__google,
    .dh-appointment-save-head, .dh-appointment-customer-dropdown
) {
    background: var(--dh-surface-alt);
    border-color: var(--dh-border);
}
:root[data-dh-theme="dark"] .dh-appointment-editor .dh-appointment-meeting-card { box-shadow: none; }
:root[data-dh-theme="dark"] .dh-appointment-editor :is(.dh-cal-section-label, .dh-appointment-slot-picker__eyebrow, .dh-customer-search-item) {
    border-color: var(--dh-border);
    color: var(--dh-ink-soft);
}
:root[data-dh-theme="dark"] .dh-appointment-editor .dh-customer-search-item.is-clickable:is(:hover, :focus) {
    background: #31485f;
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-appointment-editor .dh-appointment-slot-selected {
    background: #17382e;
    border-color: #326c55;
    color: var(--dh-success);
}
:root[data-dh-theme="dark"] .dh-appointment-editor .dh-appointment-slot-error {
    background: #40292c;
    border-color: #915259;
    color: var(--dh-danger);
}
:root[data-dh-theme="dark"] .dh-appointment-editor .dh-appointment-day-grid .btn-light {
    --bs-btn-bg: #31485f;
    --bs-btn-border-color: var(--dh-border-strong);
    --bs-btn-hover-bg: #3b5470;
    --bs-btn-hover-border-color: #a7ceff;
    --bs-btn-active-bg: #3b5470;
    --bs-btn-active-border-color: #a7ceff;
    --bs-btn-disabled-bg: var(--dh-surface-alt);
    --bs-btn-disabled-border-color: transparent;
    --bs-btn-disabled-opacity: 1;
}
:root[data-dh-theme="dark"] .dh-appointment-editor .dh-appointment-day-grid .btn-light:disabled { color: var(--dh-ink-muted) !important; }
:root[data-dh-theme="dark"] .dh-appointment-editor .dh-appointment-day-grid .btn.is-today { box-shadow: inset 0 0 0 2px currentColor; }

/* Tenant payment history is scoped to its workspace, including the filter and
   the panels below the separate summary. */
:root[data-dh-theme="dark"] .dh-tenant-payments { --dh-payments-ink: var(--dh-ink); }
:root[data-dh-theme="dark"] :is(.dh-tenant-payments, .dh-payments-workspace) {
    --dh-payments-muted: var(--dh-ink-soft);
    --dh-payments-line: var(--dh-border);
    --dh-payments-soft: var(--dh-surface-alt);
}
:root[data-dh-theme="dark"] .dh-payments-workspace { --dh-payments-green: #117a63; }
:root[data-dh-theme="dark"] .dh-tenant-payments .dh-payment-metric,
:root[data-dh-theme="dark"] .dh-payments-workspace :is(.dh-payment-gateway, .dh-payment-create-card .dh-soft-panel, .dh-payment-record__action-panel) {
    background: var(--dh-surface-alt);
    border-color: var(--dh-border);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-tenant-payments .dh-payment-metric div > span { color: var(--dh-ink-soft); }
:root[data-dh-theme="dark"] .dh-payment-history :is(.dh-payment-record__identity, .dh-payment-record__amount) > .fw-semibold { color: var(--dh-ink); }
:root[data-dh-theme="dark"] .dh-payments-workspace .alert :is(.alert-link, a:not(.btn)) {
    color: inherit;
    text-decoration: underline;
}
:root[data-dh-theme="dark"] .dh-payment-history .dh-payment-record { border-left-color: var(--dh-success); }
:root[data-dh-theme="dark"] .dh-payment-history .dh-payment-record.is-quote { border-left-color: #a7ceff; }
:root[data-dh-theme="dark"] :is(.dh-booking-inbox, .dh-payments-workspace) .btn-outline-success {
    --bs-btn-color: var(--dh-success);
    --bs-btn-border-color: var(--dh-success);
    --bs-btn-hover-bg: #17382e;
    --bs-btn-hover-border-color: var(--dh-success);
    --bs-btn-hover-color: var(--dh-success);
    --bs-btn-active-bg: #17382e;
    --bs-btn-active-border-color: var(--dh-success);
    --bs-btn-active-color: var(--dh-success);
}

/* Customer payment attention and withdrawal: open form, notice, transaction result. */
:root[data-dh-theme="dark"] .dh-client-payments .dh-client-payment-card__attention { color: var(--dh-warning); }
:root[data-dh-theme="dark"] .dh-client-payments .dh-client-payment-card.needs-action { border-color: #b08b45; }
:root[data-dh-theme="dark"] .dh-client-payments :is(
    .dh-client-payment-withdrawal, .dh-client-payment-withdrawal__form, .dh-client-payment-withdrawal__ack
) {
    background: var(--dh-surface);
    border-color: var(--dh-border);
}
:root[data-dh-theme="dark"] .dh-client-payments :is(
    .dh-client-payment-withdrawal > summary, .dh-client-payment-withdrawal__fields .form-label,
    .dh-client-payment-withdrawal__ack .form-check-label, .dh-client-payment-withdrawal__heading h4
) { color: var(--dh-ink); }
:root[data-dh-theme="dark"] .dh-client-payments .dh-client-payment-withdrawal > summary small { color: var(--dh-ink-soft); }
:root[data-dh-theme="dark"] .dh-client-payments .dh-client-payment-withdrawal__use { color: var(--dh-ink-soft); }
:root[data-dh-theme="dark"] .dh-client-payments .dh-client-payment-withdrawal > summary:is(:hover, :focus-visible) { background: #31485f; }
:root[data-dh-theme="dark"] .dh-client-payments .dh-client-payment-withdrawal > summary:focus-visible {
    outline: 3px solid var(--dh-warning);
    outline-offset: -3px;
}
:root[data-dh-theme="dark"] .dh-client-payments .dh-client-payment-withdrawal__legal {
    background: #3b301b;
    border-color: #80643a;
    color: var(--dh-warning);
}
:root[data-dh-theme="dark"] .dh-client-payments .dh-client-payment-withdrawal-status {
    background: #17382e;
    border-color: #326c55;
    color: var(--dh-success);
}
:root[data-dh-theme="dark"] .dh-client-payments :is(.dh-client-payment-withdrawal__legal > *, .dh-client-payment-withdrawal-status p) { color: inherit; }

/* Tenant dashboard and Hospitality: distinct dark ink and surfaces. */
:root[data-dh-theme="dark"] .dh-dashboard-page .dh-agenda-mini-day { color: var(--dh-warning); }
:root[data-dh-theme="dark"] .dh-dashboard-page :is(.dh-agenda-mini-title, .dh-agenda-mini-time) { color: var(--dh-ink); }
:root[data-dh-theme="dark"] .dh-dashboard-page .dh-agenda-mini-divider { background: var(--dh-border); }
:root[data-dh-theme="dark"] .dh-dashboard-page .dh-agenda-mini-card .dh-badge.success { color: var(--dh-success); }
:root[data-dh-theme="dark"] .dh-boarding-page > .dh-page-section-nav {
    background: var(--dh-surface);
    border-color: var(--dh-border);
    box-shadow: none;
}
:root[data-dh-theme="dark"] .dh-boarding-page :is(.dh-page-section-link, .dh-metric-item) { background: var(--dh-surface-alt); }
:root[data-dh-theme="dark"] .dh-boarding-page .dh-page-section-link:is(:hover, :focus-visible) { background: #31485f; }
:root[data-dh-theme="dark"] .dh-boarding-page .dh-page-section-link:focus-visible { outline-color: var(--dh-warning); }

/* Center documents: pair the surface with the existing theme's ink. */
:root[data-dh-theme="dark"] .dh-documents-page :is(
    .dh-metric-card, .dh-documents-context, .dh-documents-template-card,
    .dh-documents-issue-card, .dh-documents-acceptance-card
) {
    background: var(--dh-surface-alt);
    border-color: var(--dh-border);
    color: var(--dh-ink);
    box-shadow: none;
}
:root[data-dh-theme="dark"] .dh-documents-page .dh-documents-template-card:hover { border-color: var(--dh-border-strong); }
:root[data-dh-theme="dark"] .dh-documents-page :is(
    .dh-documents-metric__icon, .dh-documents-context__icon,
    .dh-documents-template-card__icon, .dh-documents-acceptance-card__icon
) {
    background: #40351e;
    color: var(--dh-warning);
}
:root[data-dh-theme="dark"] .dh-documents-page :is(
    .dh-documents-template-card__slug, .dh-documents-acceptance-card__meta
) {
    background: var(--dh-surface);
    color: var(--dh-ink-soft);
}

/* WhatsApp Inbox: contrast for queue, filters, conversation and context. */
:root[data-dh-theme="dark"] .dh-wa-inbox {
    --wa-ink: var(--dh-ink);
    --wa-muted: var(--dh-ink-soft);
    --wa-line: var(--dh-border);
    --wa-green: var(--dh-success);
    --wa-green-soft: #17382e;
    --wa-warning-soft: #3b301b;
    --wa-danger-soft: #422829;
    --wa-private-ink: #d8caff;
    --wa-private-soft: #302843;
    color: var(--wa-ink);
    color-scheme: dark;
}

/* Match the shared signed-in hero's specificity; preserve the existing layout. */
:root[data-dh-theme="dark"] .dh-wa-inbox .dh-context-hero.dh-wa-inbox-hero {
    background: radial-gradient(circle at 78% 22%, rgba(48, 206, 151, .12), transparent 40%),
        var(--dh-surface);
    border-color: var(--wa-line);
}

:root[data-dh-theme="dark"] .dh-wa-inbox .dh-wa-inbox-hero .dh-context-hero__title {
    color: var(--wa-ink);
}

:root[data-dh-theme="dark"] .dh-wa-inbox .dh-wa-inbox-hero .dh-context-hero__eyebrow {
    color: var(--wa-green);
}

:root[data-dh-theme="dark"] .dh-wa-inbox .dh-wa-inbox-hero .dh-context-hero__copy {
    color: var(--wa-muted);
}

/* Replace the light fills, not just the ink inherited by their children. */
:root[data-dh-theme="dark"] .dh-wa-inbox :is(
    .dh-wa-inbox-metric, .dh-wa-inbox-filters, .dh-wa-inbox-workspace,
    .dh-wa-inbox-panel-head, .dh-wa-thread-head, .dh-wa-composer,
    .dh-wa-context-card, .dh-wa-draft-history, .dh-wa-owner-person
) {
    background: var(--dh-surface);
    border-color: var(--wa-line);
    color: var(--wa-ink);
}

:root[data-dh-theme="dark"] .dh-wa-inbox :is(
    .dh-wa-inbox-queue, .dh-wa-inbox-context, .dh-wa-thread-history,
    .dh-wa-template-send, .dh-wa-composer__empty, .dh-wa-owner-card, .dh-empty-rich
) {
    background: var(--dh-surface-alt);
    border-color: var(--wa-line);
    color: var(--wa-muted);
}

:root[data-dh-theme="dark"] .dh-wa-inbox .dh-wa-inbox-thread {
    background: radial-gradient(circle at 1px 1px, rgba(195, 207, 221, .1) 1px, transparent 1px)
        0 0 / 20px 20px var(--dh-background);
    color: var(--wa-ink);
}

/* Below this breakpoint the queue and thread are separate stacked cards. */
@media (max-width: 991.98px) {
    :root[data-dh-theme="dark"] .dh-wa-inbox .dh-wa-inbox-workspace {
        background: transparent;
    }
}

:root[data-dh-theme="dark"] .dh-wa-inbox :is(
    .dh-wa-inbox-metric strong, .dh-wa-thread-head h2,
    .dh-wa-context-card dd, .dh-wa-owner-person__status strong, .dh-empty-rich-title
) {
    color: var(--wa-ink);
}

:root[data-dh-theme="dark"] .dh-wa-inbox :is(
    .dh-wa-inbox-search__glyph, .dh-wa-conversation__topline time,
    .dh-wa-conversation__meta, .dh-wa-conversation__preview, .dh-wa-conversation__footer,
    .dh-wa-thread-head p, .dh-wa-message__meta, .dh-wa-message > small,
    .dh-wa-ai-draft-form label span, .dh-wa-draft-form > label,
    .dh-wa-send-confirm label, .dh-wa-template-send form label,
    .dh-wa-context-card dt, .dh-wa-context-card__notice,
    .dh-wa-draft-history article > div, .dh-wa-draft-history article p,
    .dh-wa-owner-pair-form > label:first-of-type > span, .dh-wa-owner-confirm, .dh-empty-rich-copy
) {
    color: var(--wa-muted);
}

/* These fields do not use Bootstrap's .form-control/.form-select. Keep native
   select and search affordances, and put visible focus on the search wrapper. */
:root[data-dh-theme="dark"] .dh-wa-inbox :is(
    .dh-wa-inbox-search, .dh-wa-inbox-filters select, .dh-wa-ai-draft-form input,
    .dh-wa-draft-form textarea, .dh-wa-owner-pair-form input[type="tel"]
) {
    background-color: var(--dh-background);
    border-color: var(--dh-border-strong);
    color: var(--wa-ink);
}

:root[data-dh-theme="dark"] .dh-wa-inbox .dh-wa-inbox-search input {
    color: var(--wa-ink);
}

:root[data-dh-theme="dark"] .dh-wa-inbox :is(
    .dh-wa-inbox-search input, .dh-wa-ai-draft-form input,
    .dh-wa-draft-form textarea, .dh-wa-owner-pair-form input[type="tel"]
)::placeholder {
    color: var(--wa-muted);
    opacity: 1;
}

:root[data-dh-theme="dark"] .dh-wa-inbox :is(
    .dh-wa-inbox-search:focus-within, .dh-wa-inbox-filters select:focus-visible,
    .dh-wa-ai-draft-form input:focus-visible, .dh-wa-draft-form textarea:focus-visible,
    .dh-wa-owner-pair-form input[type="tel"]:focus-visible, .dh-wa-jump-latest:focus-visible
) {
    border-color: var(--dh-warning);
    outline: 2px solid var(--dh-warning);
    outline-offset: 2px;
}

:root[data-dh-theme="dark"] .dh-wa-inbox input[type="checkbox"]:not(.form-check-input) {
    accent-color: var(--dh-warning);
}

/* Queue state, message direction and keyboard focus remain distinct. */
:root[data-dh-theme="dark"] .dh-wa-inbox .dh-wa-inbox-queue__scroll {
    scrollbar-color: var(--dh-border-strong) transparent;
}

:root[data-dh-theme="dark"] .dh-wa-inbox .dh-wa-conversation {
    border-color: var(--wa-line);
    color: var(--wa-ink);
}

:root[data-dh-theme="dark"] .dh-wa-inbox .dh-wa-conversation:is(:hover, :focus-visible) {
    background: #31485f;
}

:root[data-dh-theme="dark"] .dh-wa-inbox .dh-wa-conversation.is-active {
    background: var(--wa-green-soft);
}

:root[data-dh-theme="dark"] .dh-wa-inbox .dh-wa-conversation.is-active::before {
    background: var(--wa-green);
}

:root[data-dh-theme="dark"] .dh-wa-inbox .dh-wa-conversation:focus-visible {
    outline: 2px solid var(--dh-warning);
    outline-offset: -3px;
}

:root[data-dh-theme="dark"] .dh-wa-inbox :is(
    .dh-wa-message__bubble, .dh-wa-template-send__preview
) {
    background: var(--dh-surface-alt);
    border-color: var(--wa-line);
    color: var(--wa-ink);
}

:root[data-dh-theme="dark"] .dh-wa-inbox .dh-wa-message.is-outbound .dh-wa-message__bubble {
    background: var(--wa-green-soft);
}

:root[data-dh-theme="dark"] .dh-wa-inbox .dh-wa-message__meta strong {
    color: var(--wa-ink);
}

:root[data-dh-theme="dark"] .dh-wa-inbox :is(
    .dh-wa-conversation__footer b, .dh-wa-message__status.is-read,
    .dh-wa-thread-head__eyebrow, .dh-wa-draft-history article > div strong
) {
    color: var(--wa-green);
}

:root[data-dh-theme="dark"] .dh-wa-inbox .dh-wa-message__status.is-failed {
    color: var(--dh-danger);
}

/* Status and note surfaces keep paired semantic foregrounds and backgrounds. */
:root[data-dh-theme="dark"] .dh-wa-inbox :is(
    .dh-wa-pill, .dh-wa-conversation__avatar, .dh-wa-inbox-panel-head strong, .dh-empty-rich-icon
) {
    background: var(--dh-background);
    color: var(--wa-ink);
}

:root[data-dh-theme="dark"] .dh-wa-inbox :is(
    .dh-wa-pill.is-customer, .dh-wa-conversation__avatar.is-customer,
    .dh-wa-safety-banner.is-safe, .dh-wa-inbox-hero__trust, .dh-wa-inbox-metric > span,
    .dh-wa-thread-empty > span, .dh-wa-jump-latest,
    .dh-wa-context-card__head > span, .dh-wa-context-card__lock
) {
    background: var(--wa-green-soft);
    border-color: var(--wa-line);
    color: var(--wa-green);
}

:root[data-dh-theme="dark"] .dh-wa-inbox .dh-wa-jump-latest:is(:hover, :focus-visible) {
    background: var(--dh-surface-alt);
}

:root[data-dh-theme="dark"] .dh-wa-inbox :is(
    .dh-wa-pill.is-warning, .dh-wa-conversation__avatar.is-warning,
    .dh-wa-safety-banner.is-warning, .dh-wa-composer__head > div > span
) {
    background: var(--wa-warning-soft);
    border-color: var(--wa-line);
    color: var(--dh-warning);
}

:root[data-dh-theme="dark"] .dh-wa-inbox .dh-wa-inbox-metric.is-alert > span {
    background: var(--wa-danger-soft);
    color: var(--dh-danger);
}

:root[data-dh-theme="dark"] .dh-wa-inbox :is(
    .dh-wa-pill.is-staff, .dh-wa-conversation__avatar.is-staff, .dh-wa-safety-banner.is-private,
    .dh-wa-owner-card__head > span, .dh-wa-owner-card__security
) {
    background: var(--wa-private-soft);
    border-color: var(--wa-line);
    color: var(--wa-private-ink);
}

:root[data-dh-theme="dark"] .dh-wa-inbox :is(
    .dh-wa-context-card dl > div, .dh-wa-draft-history article
) {
    border-color: var(--wa-line);
}

:root[data-dh-theme="dark"] .dh-wa-inbox .dh-wa-owner-person.is-active {
    border-color: var(--wa-line);
    box-shadow: inset 0 3px 0 var(--wa-green);
}

:root[data-dh-theme="dark"] .dh-wa-inbox .btn-outline-danger {
    --bs-btn-color: var(--dh-danger);
    --bs-btn-border-color: var(--dh-danger);
    --bs-btn-hover-color: var(--dh-danger);
    --bs-btn-hover-bg: var(--wa-danger-soft);
    --bs-btn-hover-border-color: var(--dh-danger);
    --bs-btn-active-color: var(--dh-danger);
    --bs-btn-active-bg: var(--wa-danger-soft);
    --bs-btn-active-border-color: var(--dh-danger);
}

/* Public Hub pages: scope the palette so brand media, consent, provider
   widgets and checkout state are unaffected. */
:root[data-dh-theme="dark"] .dh-public-body :is(
    .dh-price-card, .dh-demo-panel, .dh-contact-channel, .dh-contact-help,
    .dh-public-service-switch, .dh-public-boarding-sidebar__card,
    .dh-booking-summary-item, .dh-public-offer-card, .dh-public-form-hero,
    .dh-public-form-detail__header, .dh-public-form-card, .dh-showcase, .dh-mini-card,
    .dh-info-card, .dh-governance-card, .dh-capability-card, .dh-vertical-card,
    .dh-value-card, .dh-flow-card, .dh-signup-shell .dh-form-card
) {
    background: var(--dh-surface);
    border-color: var(--dh-border);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-public-body .dh-public-offer-card {
    background: #1b2a3a !important; /* The tenant-home view makes this surface important. */
}
:root[data-dh-theme="dark"] .dh-public-body :is(.dh-price-card.recommended, .dh-contact-channel:hover) {
    border-color: var(--dh-warning);
}
:root[data-dh-theme="dark"] .dh-public-body :is(.dh-marketing-hero, .dh-marketing-section-soft) {
    background: radial-gradient(circle at 88% 10%, #342d21, transparent 35%), var(--dh-background);
}
:root[data-dh-theme="dark"] .dh-public-body :is(.dh-showcase-header, .dh-stat-grid) { border-color: var(--dh-border); }
:root[data-dh-theme="dark"] .dh-public-body .dh-marketing-hero .dh-stat-grid > .dh-public-stat {
    background: var(--dh-surface);
    border-color: var(--dh-border);
}
:root[data-dh-theme="dark"] .dh-public-body .dh-marketing-hero .dh-text-gradient {
    background: none;
    color: var(--dh-warning);
    -webkit-text-fill-color: currentColor;
}
:root[data-dh-theme="dark"] .dh-public-body :is(.dh-price-annual, .dh-signup-shell .dh-plan-card) {
    background: var(--dh-surface-alt);
    border-color: var(--dh-border);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-public-body .dh-signup-shell .dh-plan-card:is(:hover, :focus-within, :has(input:checked)) {
    background: #3b301b;
    border-color: var(--dh-warning);
}
:root[data-dh-theme="dark"] .dh-public-body .dh-signup-shell .dh-plan-card:has(input:focus-visible) {
    outline: 2px solid var(--dh-warning);
    outline-offset: 3px;
}
:root[data-dh-theme="dark"] .dh-public-body :is(.dh-price-card, .dh-signup-shell) .text-warning-emphasis {
    color: var(--dh-warning) !important;
}
:root[data-dh-theme="dark"] .dh-public-body :is(.dh-price-card, .dh-plan-content) .text-dark { color: var(--dh-ink) !important; }
:root[data-dh-theme="dark"] .dh-public-body .dh-marketing-hero .dh-mini-label,
:root[data-dh-theme="dark"] .dh-public-body .dh-price-card .dh-check-list li::before {
    color: var(--dh-warning);
}
:root[data-dh-theme="dark"] .dh-public-body :is(
    .dh-marketing-heading :is(h1,h2), .dh-price-card h2, .dh-contact-channel strong,
    .dh-demo-panel h3, .dh-public-offer-card__title
) { color: var(--dh-ink); }
:root[data-dh-theme="dark"] .dh-public-body :is(.dh-contact-channel small, .dh-booking-summary-label) {
    color: var(--dh-warning);
}
:root[data-dh-theme="dark"] .dh-public-body .dh-public-nav-list .nav-link:is(.active, :hover, :focus-visible) {
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-cookie-reopen[data-cookie-reopen-floating] {
    /* Preferences must be readable even when tenant colours are applied inline. */
    background: var(--dh-surface-alt) !important;
    color: var(--dh-ink) !important;
    border-color: var(--dh-border-strong) !important;
}
:root[data-dh-theme="dark"] .dh-cookie-reopen[data-cookie-reopen-floating]:is(:hover, :focus-visible) {
    background: #31485f !important;
}
:root[data-dh-theme="dark"] .dh-public-body :is(.dh-public-form-card__meta, .dh-public-footer .text-muted, .dh-service-picker__meta > span) {
    color: var(--dh-ink-soft) !important;
}
:root[data-dh-theme="dark"] .dh-public-body :is(.dh-brand-pill, .dh-section-eyebrow):not(.dh-auth-form-wrapper *) {
    background: #3b301b;
    border-color: #80643a;
    color: var(--dh-warning);
}
:root[data-dh-theme="dark"] .dh-public-body .dh-public-form-hero__trust {
    background: #17382e;
    color: #a6edc5;
    border-color: #4b9a78;
}
:root[data-dh-theme="dark"] .dh-public-body .dh-public-form-hero__trust-icon { color: inherit; }
:root[data-dh-theme="dark"] .dh-public-body .dh-grooming-hero-step p { color: #edf3fa; }
:root[data-dh-theme="dark"] .dh-public-body .dh-gift-offer-card:not(.has-cover-image, [style*="url("]) {
    background-image: linear-gradient(150deg, #1b2a3a, #233448) !important;
}

:root[data-dh-theme="dark"] .dh-public-body .dh-public-boarding-note {
    background: #3b301b;
    border-color: #80643a;
    color: var(--dh-ink-soft);
}
:root[data-dh-theme="dark"] .dh-public-body :is(.dh-public-booking-journey__number, .dh-public-boarding-note > span) {
    background: #f6d17b;
    color: #152033;
}
:root[data-dh-theme="dark"] .dh-public-body :is(.dh-month-day, .dh-slot-option-label) {
    background: var(--dh-surface-alt);
    border-color: var(--dh-border);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-public-body .dh-month-day:is(.is-empty, .is-unavailable) {
    background: var(--dh-surface);
    color: var(--dh-ink-soft);
}
:root[data-dh-theme="dark"] .dh-public-body :is(
    .dh-month-day.is-selected, .dh-month-day.is-available:is(:hover, :focus-visible),
    .dh-slot-option-label:hover, .dh-slot-option-input:checked + .dh-slot-option-label,
    .dh-slot-option-input:focus-visible + .dh-slot-option-label
) {
    background: #3b301b;
    border-color: var(--dh-warning);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-public-body :is(.dh-slot-option-title, .dh-month-day-number) { color: inherit; }

:root[data-dh-theme="dark"] .dh-auth-form-wrapper:has(> form[action="/login"]) {
    --dh-input-bg: #172637;
    background: var(--dh-surface) !important;
}
:root[data-dh-theme="dark"] .dh-auth-form-wrapper:has(> form:is([action="/login"], [action="/admin/login"])) .form-control::placeholder {
    color: var(--dh-ink-muted) !important;
    opacity: 1;
}
:root[data-dh-theme="dark"] .dh-auth-form-wrapper:has(> form[action="/login"]) .form-control:focus {
    background-color: var(--dh-input-bg) !important;
    border-color: var(--dh-warning) !important;
    box-shadow: 0 0 0 .22rem rgba(246, 209, 123, .24) !important;
}
:root[data-dh-theme="dark"] .dh-auth-form-wrapper:has(> form[action="/login"]) .form-control.is-invalid {
    border-color: var(--dh-danger) !important;
}
:root[data-dh-theme="dark"] .dh-cookie-banner .dh-cookie-primary-btn {
    --dh-cookie-button-bg: #25384c;
    --dh-cookie-button-text: #edf3fa;
    border-color: #25384c !important;
}

/* Center: compensation presets and the collaborator availability planner. */
:root[data-dh-theme="dark"] .dh-collab-page .dh-preset-summary-card {
    background: var(--dh-surface-alt);
    border-color: var(--dh-border);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-collab-page .dh-preset-summary-card:hover {
    border-color: var(--dh-border-strong);
}
:root[data-dh-theme="dark"] .dh-collab-page .dh-preset-summary-card .btn-outline-danger {
    --bs-btn-color: var(--dh-danger);
    --bs-btn-border-color: var(--dh-danger);
    --bs-btn-hover-color: var(--dh-danger);
    --bs-btn-hover-bg: #422829;
    --bs-btn-hover-border-color: var(--dh-danger);
}
:root[data-dh-theme="dark"] .dh-availability-planner {
    --dh-wp-green: var(--dh-success);
    --dh-wp-gold: var(--dh-warning);
    --dh-wp-red: var(--dh-danger);
    --dh-wp-available-surface: #17382e;
    --dh-wp-busy-surface: #3b301b;
    --dh-wp-away-surface: #422829;
}
:root[data-dh-theme="dark"] .dh-availability-planner :is(
    .dh-wp-topbar, .dh-wp-horizon, .dh-wp-day, .dh-wp-shared-panel, .dh-wp-rules
) {
    background: var(--dh-surface);
    border-color: var(--dh-border);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-availability-planner :is(
    .dh-wp-horizon__week, .dh-wp-metrics article, .dh-wp-staff-tab,
    .dh-wp-day__head, .dh-wp-shared-panel__head, .dh-wp-rule-card,
    .dh-wp-preset-btn, .dh-wp-type-btn, .dh-wp-repeat-label
) {
    background: var(--dh-surface-alt);
    border-color: var(--dh-border);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-availability-planner :is(
    .dh-wp-topbar__title h2, .dh-wp-horizon__heading h2, .dh-wp-horizon__week strong,
    .dh-wp-metrics strong, .dh-wp-metrics small, .dh-wp-day__head .day-num,
    .dh-wp-slot__time, .dh-wp-label
) { color: var(--dh-ink); }
:root[data-dh-theme="dark"] .dh-availability-planner :is(
    .dh-wp-topbar__title p, .dh-wp-horizon__heading p,
    .dh-wp-horizon__week > .dh-wp-horizon__label, .dh-wp-horizon__week > small, .dh-wp-metrics p,
    .dh-wp-day__head .day-name, .dh-wp-day__empty, .dh-wp-slot__staff, .dh-wp-slot__type, .dh-wp-add-btn
) { color: var(--dh-ink-soft); }
:root[data-dh-theme="dark"] .dh-availability-planner :is(
    .dh-wp-topbar__eyebrow, .dh-wp-horizon__week > span:not(.dh-wp-horizon__label)
) { color: var(--dh-wp-green); }
:root[data-dh-theme="dark"] .dh-availability-planner :is(
    .dh-wp-topbar__visual, .dh-wp-metrics .is-available > span, .dh-wp-horizon__week.is-selected,
    .dh-wp-slot--available, .dh-wp-type-btn.is-active[data-wp-type="available"]
) {
    background: var(--dh-wp-available-surface);
    border-color: var(--dh-wp-green);
    color: var(--dh-wp-green);
}
:root[data-dh-theme="dark"] .dh-availability-planner :is(
    .dh-wp-metrics .is-busy > span, .dh-wp-slot--busy, .dh-wp-day--today .dh-wp-day__head,
    .dh-wp-staff-tab.is-active, .dh-wp-add-btn.is-open, .dh-wp-preset-btn.is-picked,
    .dh-wp-type-btn.is-active[data-wp-type="busy"], .dh-wp-repeat-day:checked + .dh-wp-repeat-label
) {
    background: var(--dh-wp-busy-surface);
    border-color: var(--dh-wp-gold);
    color: var(--dh-wp-gold);
}
:root[data-dh-theme="dark"] .dh-availability-planner :is(
    .dh-wp-metrics .is-away > span, .dh-wp-slot--away, .dh-wp-type-btn.is-active[data-wp-type="away"]
) {
    background: var(--dh-wp-away-surface);
    border-color: var(--dh-wp-red);
    color: var(--dh-wp-red);
}
:root[data-dh-theme="dark"] .dh-availability-planner .dh-wp-metrics .is-ranges > span {
    background: #203a54;
    color: #a7ceff;
}
:root[data-dh-theme="dark"] .dh-availability-planner .dh-wp-day--today { border-color: var(--dh-wp-gold); }
:root[data-dh-theme="dark"] .dh-availability-planner .dh-wp-slot__actions { opacity: 1; }
:root[data-dh-theme="dark"] .dh-availability-planner :is(
    .dh-wp-slot__edit, .dh-wp-slot__del, .dh-wp-panel-close
) {
    background: var(--dh-background);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-availability-planner :is(
    .dh-wp-horizon__week, .dh-wp-staff-tab, .dh-wp-add-btn, .dh-wp-slot__edit, .dh-wp-slot__del,
    .dh-wp-panel-close, .dh-wp-preset-btn, .dh-wp-type-btn
):hover { box-shadow: inset 0 0 0 1px var(--dh-border-strong); }
:root[data-dh-theme="dark"] .dh-availability-planner :is(
    .dh-wp-horizon__week, .dh-wp-staff-tab, .dh-wp-add-btn, .dh-wp-slot__edit, .dh-wp-slot__del,
    .dh-wp-panel-close, .dh-wp-preset-btn, .dh-wp-type-btn
):focus-visible,
:root[data-dh-theme="dark"] .dh-availability-planner .dh-wp-repeat-day:focus-visible + .dh-wp-repeat-label {
    outline: 2px solid var(--dh-warning);
    outline-offset: 2px;
}

/* Grooming: shared templates, empty states, settings and the form footer. */
:root[data-dh-theme="dark"] .dh-groom-workspace :is(
    .dh-quick-bar, .dh-empty-rich, .dh-groom-customers-hero
) {
    background: var(--dh-surface-alt);
    border-color: var(--dh-border);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-groom-workspace :is(
    .dh-groom-customers-hero h2, .dh-empty-rich-title, .dh-groom-field > label
) { color: var(--dh-ink); }
:root[data-dh-theme="dark"] .dh-groom-workspace :is(
    .dh-groom-customers-hero p, .dh-empty-rich-copy, .dh-quick-bar-label,
    .dh-groom-field > small, .dh-groom-field > label span
) { color: var(--dh-ink-soft); }
:root[data-dh-theme="dark"] .dh-groom-workspace :is(
    .dh-groom-customers-hero__eyebrow, .dh-groom-customer-kicker, .dh-groom-settings-group__icon
) { color: var(--dh-warning); }
:root[data-dh-theme="dark"] .dh-groom-workspace .dh-groom-customer-kicker.is-green { color: var(--dh-success); }
:root[data-dh-theme="dark"] .dh-groom-workspace .dh-groom-customer-kicker.is-blue { color: #a7ceff; }
:root[data-dh-theme="dark"] .dh-groom-workspace .dh-quick-chip {
    background: var(--dh-surface);
    border-color: var(--dh-border-strong);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-groom-workspace .dh-quick-chip:is(:hover, :focus-visible, .is-active) {
    background: #3b3151;
    border-color: #d5b5f3;
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-groom-workspace .dh-quick-chip:focus-visible {
    outline-color: #d5b5f3;
}
:root[data-dh-theme="dark"] .dh-groom-workspace .dh-groom-record-editor .dh-form-sticky {
    background: var(--dh-surface);
    border-top: 1px solid var(--dh-border);
}

/* Portal: contract information, notification action and privacy requests. */
:root[data-dh-theme="dark"] .dh-app-body .dh-client-payments-rights {
    background: #17382e;
    border-color: #477a67;
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-app-body .dh-client-payments-rights__icon {
    background: #234e3e;
    border-color: #477a67;
    color: var(--dh-success);
}
:root[data-dh-theme="dark"] .dh-app-body .dh-client-payments-rights__eyebrow { color: var(--dh-success); }
:root[data-dh-theme="dark"] .dh-app-body .dh-client-payments-rights__body h2 { color: var(--dh-ink); }
:root[data-dh-theme="dark"] .dh-app-body .dh-client-payments-rights__body p { color: var(--dh-ink-soft); }
:root[data-dh-theme="dark"] .dh-notification-page .dh-notification-hero__action.btn {
    background: var(--dh-surface-alt);
    border-color: var(--dh-border-strong);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-notification-page .dh-notification-hero__action.btn:is(:hover, :focus-visible) {
    background: #3b301b;
    border-color: var(--dh-warning);
    color: var(--dh-warning);
}
:root[data-dh-theme="dark"] .dh-notification-page .dh-notification-hero__action.btn:focus-visible {
    outline: 2px solid var(--dh-warning);
    outline-offset: 2px;
}
:root[data-dh-theme="dark"] .dh-client-privacy :is(
    .dh-client-privacy-hero, .dh-client-privacy-form-card,
    .dh-client-privacy-history, .dh-client-privacy-assurances article
) {
    background: var(--dh-surface);
    border-color: var(--dh-border);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-client-privacy :is(
    .dh-client-privacy-ack, .dh-client-privacy-request, .dh-client-privacy-empty,
    .dh-client-privacy-assurances article > span
) {
    background: var(--dh-surface-alt);
    border-color: var(--dh-border);
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-client-privacy :is(h1, h2, h3, .form-label, .dh-client-privacy-request dd) {
    color: var(--dh-ink);
}
:root[data-dh-theme="dark"] .dh-client-privacy :is(p, .dh-client-privacy-request dt, .dh-client-privacy-request__head strong) {
    color: var(--dh-ink-soft);
}
:root[data-dh-theme="dark"] .dh-client-privacy :is(
    .dh-client-privacy-hero__eyebrow, .dh-client-privacy-form-card > header > span,
    .dh-client-privacy-history > header > span, .dh-client-privacy-request__head > div > span
) { color: var(--dh-warning); }
:root[data-dh-theme="dark"] .dh-client-privacy .dh-client-privacy-empty__glyph { color: #a7ceff; }

/* Public booking: keep the success message and search controls legible. */
:root[data-dh-theme="dark"] .dh-public-body .dh-booking-account-confirmation {
    background: #17382e;
    border-color: #477a67;
    color: var(--dh-success);
}
:root[data-dh-theme="dark"] .dh-public-body .dh-service-picker {
    background: var(--dh-surface-alt);
    border-color: var(--dh-border);
}
:root[data-dh-theme="dark"] .dh-public-body .dh-service-picker:focus-within {
    border-color: var(--dh-warning);
    outline: 2px solid var(--dh-warning);
    outline-offset: 2px;
}

:root[data-dh-theme="dark"] .dh-client-dashboard-ai .dh-client-dashboard-ai__legal-ack {
    background: var(--dh-surface-alt);
    border-color: var(--dh-border);
    color: var(--dh-ink-soft);
}
:root[data-dh-theme="dark"] .dh-client-dashboard-ai .dh-client-dashboard-ai__legal-ack:focus-within {
    border-color: var(--dh-warning);
}
:root[data-dh-theme="dark"] .dh-client-dashboard-ai .dh-client-dashboard-ai__legal-ack a {
    color: var(--dh-warning);
}
