/* Final theme layer: keep component surfaces and their text in the same palette. */
html[data-theme="dark"] { --night-surface:#1d1f22; --night-control:#292c31; --night-text:#f4f5f7; --night-muted:#bdc3cd; --night-border:#606773; }
html[data-theme="dark"] :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),select,textarea) { background-color:var(--night-control); color:var(--night-text); border-color:var(--night-border); color-scheme:dark; }
html[data-theme="dark"] :is(input,textarea)::placeholder { color:#b5bdc9; opacity:1; }
html[data-theme="dark"] option { background:#292c31; color:#f4f5f7; }
html[data-theme="dark"] .search-box input { background:transparent; }
html[data-theme="dark"] :is(.brand-template-card,.admin-loading,.permission-editor:not(:empty),.legal-content,.exhibition-card,.personnel-summary>div,.personnel-person,.personnel-new-toggle,.schedule-day,.rest-bank-backdate) { background:var(--night-surface); color:var(--night-text); border-color:#454b55; }
html[data-theme="dark"] :is(.brand-template-copy>small,.brand-template-help,.photo-paste-actions small,.photo-progress p,.photo-progress-steps span,.personnel-person small,.personnel-person em,.personnel-summary small,.personnel-note,.personnel-form .personnel-wide small,.personnel-movement small,.personnel-pay-action small,.schedule-day-title small,.schedule-totals span,.rest-bank-event small,.attendance-weekdays) { color:var(--night-muted); }
html[data-theme="dark"] :is(.eyebrow.dark,.photo-progress-steps span.active) { color:#ffad87; }
html[data-theme="dark"] .photo-progress-steps span.done { color:#91e5b1; }
html[data-theme="dark"] :is(.photo-item button,.paste-photo-action,.live-stock-button,.exhibition-undo button) { background:var(--night-control); color:var(--night-text); border-color:var(--night-border); }
html[data-theme="dark"] .photo-item .background-action { background:#111214; color:#f4f5f7; }
html[data-theme="dark"] .photo-item .danger-action { color:#ffb5ae; }
html[data-theme="dark"] .photo-item .danger-action.confirm-delete { background:#b42318; color:#fff; }
html[data-theme="dark"] :is(.personnel-proration,.schedule-totals) { background:#35271f; color:#f6e2d5; border-color:#d98054; }
html[data-theme="dark"] :is(.personnel-payment-total strong,.personnel-payment-total small,.personnel-payment-total p,.personnel-payment-total>span) { color:var(--night-text); }
html[data-theme="dark"] :is(.exhibition-undo,.rest-bank-balance) { background:#193b2b; color:#b1efc8; border-color:#579c71; }
html[data-theme="dark"] .exhibition-no { background:#422521; color:#ffc4b8; border-color:#bb7867; }
html[data-theme="dark"] .attendance-day.is-selected { outline-color:#fff; }
html[data-theme="dark"] .detail-thumbnails { background:#202226; border-color:#454b55; }
html[data-theme="dark"] .recommendation-card { background:#25282d; color:#f4f5f7; border-color:#555d69; }
html[data-theme="dark"] .recommendation-image { background:#292c31; }
html[data-theme="dark"] .cart-item-unavailable { background:#422521; color:#ffd1c6; }
html[data-theme="dark"] :is(.product-price small,.product-sizes,.product-sizes small,.product-audience,.detail-heading .detail-audience,.check-list small,.brand-tile span) { color:var(--night-muted); }
html[data-theme="dark"] .quantity-row>small { color:#85dda5; }
html[data-theme="dark"] :is(.orange-button,.add-button,.apply-mobile-filters,.result-count) { color:#17110d; }
html[data-theme="dark"] .check-list input:checked { color:#111; }
html[data-theme="dark"] .analytics-stats .stat-card.accent :is(span,small) { color:#3d1b0b; }
/* The editorial rail intentionally uses light cards in both themes. */
html[data-theme="dark"] .arrival-grid .arrival-card { --ink:#17191c; --muted:#565b65; }
html[data-theme="dark"] .arrival-grid :is(.product-audience,.product-sizes,.product-sizes small,.product-price small) { color:#565b65; }
html[data-theme="dark"] .arrival-admin-row .secondary-action { color:#f4f5f7; }
html[data-theme="dark"] :is(button,input,select,textarea,a):focus-visible { outline:3px solid #ffad87; outline-offset:3px; }
