/* Applied last; photos, business logos and exported documents keep their colors. */
:root[data-theme="dark"]{color-scheme:dark;--ink:#e9eef8;--muted:#b0bdd0;--line:#3b4b63;--bg:#101724;--lime:#263954;--green:#a9c7ff!important;--brand-accent:#a9c7ff!important;--dashboard-cash:#72d8c0;--control-bg:#111c2c}
html[data-theme="dark"] body,html[data-theme="dark"] body.auth-screen{background:var(--bg);color:var(--ink)}
html[data-theme="dark"] :is(aside,.panel,.auth-card,dialog,.stat,.recipe,.compact-list,.signup,.compact-order-filters,.compact-order-tools,.setup-choice,.sector-option,.auth-account,.order-item,.customer-picker,.row-button,.half-agenda-scroll,.half-day-head,.week-scroll,.week-appointment,.share-preview,.record-tools,.dashboard-metric,.dashboard-shortcuts,.shop-front){background:#192435;color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] :is(input,select,textarea,.admin-environment select,.customer-picker input[readonly]){background:#111c2c;color:var(--ink);border-color:#536580;color-scheme:dark}
html[data-theme="dark"] option{background:#111c2c;color:var(--ink)}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#9fadc1;opacity:1}
html[data-theme="dark"] :is(input,select,textarea)[readonly],html[data-theme="dark"] :is(input,select,textarea)[disabled]{background:#223044;color:#bdc9db}
html[data-theme="dark"] :is(.cost-ingredient,.feature-options .checkline,.sector-tile,.brand-options figure,.time-choice,.support-image-preview img){background:#192435;border-color:var(--line);color:var(--ink)}
html[data-theme="dark"] :is(.hero,.tip,.notice,.badge,.avatar,.result,.filterbar,.setup-recommendation,.auth-message,.auth-switch,.portal-message,.plan-draft-stages>div,.dashboard-admin,.dashboard-metric.is-featured,.booking-status,.dialog-feedback,.visit-place,.shop-banner,#service-duration-field){background:#253650;color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] :is(.auth-intro p,.auth-note,.auth-eyebrow,.hero p,.tip p,nav button,footer,.aside-bottom,small,th,.sub,.note,.eyebrow){color:var(--muted)}
html[data-theme="dark"] :is(a,.link,.auth-link,.auth-account button,.close,.negative){color:#a9c7ff}
html[data-theme="dark"] :is(.btn:not(.secondary),.auth-submit,#toast){background:#a9c7ff;color:#101724}
html[data-theme="dark"] :is(.btn.secondary,.support-actions>.btn.secondary){background:#23334b;color:var(--ink);border-color:#536580}
html[data-theme="dark"] nav button{background:#192435;border-color:var(--line)}
html[data-theme="dark"] nav button.active,html[data-theme="dark"] .admin-navigation .btn.active,html[data-theme="dark"] .auth-switch button[aria-pressed="true"],html[data-theme="dark"] .booking-times button[aria-pressed="true"]{background:#304b73;color:#f5f8ff;border-color:#a9c7ff}
html[data-theme="dark"] :is(nav button:hover:not(.active),.compact-row:hover,.row-button:hover,.time-choice:hover,.time-choice:focus){background:#273a53;color:var(--ink)}
html[data-theme="dark"] .sector-option:has(input:checked),html[data-theme="dark"] .setup-choice:has(input:checked){background:#263f61;border-color:#a9c7ff}
html[data-theme="dark"] :is(.week-day.is-today,.week-day.is-today .week-day-head,.half-day.is-today .half-day-head){background:#253b59;color:var(--ink)}
html[data-theme="dark"] .half-cell.is-closed{background:#131c2b}
html[data-theme="dark"] :is(.half-event,.half-event.is-activity){background:#273e5b;color:#e9eef8;border-color:#8daedb}
html[data-theme="dark"] .half-event.is-activity{background:#3b334c;border-color:#c2a5df}
html[data-theme="dark"] .portal-internal{background:#3b334c;color:var(--ink)}
html[data-theme="dark"] .pill{background:#483b24;color:#ffe0a1}
html[data-theme="dark"] :is(.pill.paid,.feedback-success,.step-number.done){background:#213e35;color:#b0efcd}
html[data-theme="dark"] .cloud-label[data-state="saved"]{background:#253b59;color:#c7dbff}
html[data-theme="dark"] .cloud-label:is([data-state="error"],[data-state="conflict"],[data-state="remote"]){background:#483124;color:#ffdaad}
html[data-theme="dark"] .negative{color:#ffb6ad}
html[data-theme="dark"] :focus-visible{outline:3px solid #c6dcff;outline-offset:3px}
html[data-theme="dark"] dialog::backdrop{background:#0009}
html[data-theme="dark"] input:is([type="checkbox"],[type="radio"]){accent-color:#a9c7ff}
.appearance-control{display:grid;gap:7px;min-width:190px;max-width:100%;font-size:12px}.appearance-control select{margin:0;min-height:44px}.settings-list .appearance-control{margin:0}
@media(max-width:700px){.settings-list .appearance-control{width:100%;min-width:0}}
@media print{html[data-theme="dark"]{color-scheme:light;--ink:#20283c;--muted:#60677b;--line:#dde3f0;--bg:white}html[data-theme="dark"] body{background:white;color:#20283c}}

html[data-theme="dark"] :is(.brand .sector-logo,.auth-intro img){background:#f6f8ff;border-radius:8px;padding:8px;box-sizing:border-box}
