/* Shared foreground/background pairs. Load after legacy page styles. */
:root{--theme-bg:#f3f6fa;--theme-surface:#ffffff;--theme-raised:#edf3fa;--theme-ink:#14324c;--theme-muted:#43566d;--theme-line:#667b92;--theme-accent:#12549c;--theme-on-accent:#ffffff;--theme-link:#12549c;--theme-danger:#9f1c2c;--theme-focus:#754100;color-scheme:only light}
@media(prefers-color-scheme:dark){:root:not([data-theme=light]){--theme-bg:#0e192b;--theme-surface:#19283d;--theme-raised:#22364e;--theme-ink:#eef4fc;--theme-muted:#c0cede;--theme-line:#7890aa;--theme-accent:#9cc6ff;--theme-on-accent:#10243b;--theme-link:#9cc6ff;--theme-danger:#ffb8c3;--theme-focus:#ffd180;color-scheme:dark}}
:root[data-theme=dark]{--theme-bg:#0e192b;--theme-surface:#19283d;--theme-raised:#22364e;--theme-ink:#eef4fc;--theme-muted:#c0cede;--theme-line:#7890aa;--theme-accent:#9cc6ff;--theme-on-accent:#10243b;--theme-link:#9cc6ff;--theme-danger:#ffb8c3;--theme-focus:#ffd180;color-scheme:dark}
html:root body{background:var(--theme-bg)!important;color:var(--theme-ink)!important;--ink:var(--theme-ink);--navy:var(--theme-ink);--muted:var(--theme-muted);--blue:var(--theme-accent);--accent:var(--theme-accent);--brand:var(--theme-accent);--brand-dark:var(--theme-accent);--brand-soft:var(--theme-raised);--line:var(--theme-line);--border:var(--theme-line);--pale:var(--theme-raised)}
html:root body :is(h1,h2,h3,h4,h5,h6,p,span,strong,b,small,label,legend,summary,li,td,th,figcaption){color:inherit!important}
html:root body :is(.container,main,form,fieldset){color:var(--theme-ink)}
html:root body :is(.card,.panel,.metric,.stat-box,.auth-container,.booking-container,.modal-content,dialog,.app-header,.account-actions,.v2-appointment,.v2-calendar-day,.v2-rule-row,.v3-card,.header-card,.appointment-row,.calendar-day,.reminder-banner,.reminder-search-results,.reminder-search-result,.time-picker-panel,.feature-card,.preview-card,.how-section,.closing,.install-panel,.demo-card,.v3-banner,#adminCards article){background:var(--theme-surface)!important;color:var(--theme-ink)!important;border-color:var(--theme-line)!important;background-image:none!important}
html:root body :is(.schedule-timezone,.schedule-summary,.v2-month-event,.badge,.urgency-badge,[class^=status-],.workspace-navigation,.tab-button,.step-number,.preview,.schedule-preview,th){background:var(--theme-raised)!important;color:var(--theme-ink)!important;border-color:var(--theme-line)!important}
html:root body :is(.v2-muted,.schedule-note,.metric-note,.fine,.legend,.eyebrow,.footer-text,.measurement-notice,.keeplume-local-note){color:var(--theme-muted)!important}
html:root body :is(a,.text-link){color:var(--theme-link)!important}
html:root body :is(button,.button,.primary,.v3-primary,[type=submit]){background:var(--theme-accent)!important;color:var(--theme-on-accent)!important;border:1px solid var(--theme-accent)!important;background-image:none!important}
html:root body :is(.view-btn,.edit-btn,.schedule-cancel,.schedule-retry,.button-light,.account-actions button,.tab-button,.close-modal){background:var(--theme-surface)!important;color:var(--theme-ink)!important;border-color:var(--theme-line)!important}
html:root body :is(.appointment-danger,.delete-btn){background:var(--theme-surface)!important;color:var(--theme-danger)!important;border-color:var(--theme-danger)!important}
html:root body :is(input,select,textarea){background:var(--theme-surface)!important;color:var(--theme-ink)!important;border-color:var(--theme-line)!important;accent-color:var(--theme-accent);font-size:max(1rem,16px)}
html:root body :is(input,textarea)::placeholder{color:var(--theme-muted)!important;opacity:1}
html:root body input::-webkit-datetime-edit{color:var(--theme-ink)}
html:root body :is(.slot,.schedule-flow button.slot){background:var(--theme-surface)!important;color:var(--theme-ink)!important;border-color:var(--theme-line)!important}
html:root body :is(.slot[aria-pressed=true],.tab-button.active,.workspace-navigation a[aria-current=page]){background:var(--theme-accent)!important;color:var(--theme-on-accent)!important;border-color:var(--theme-accent)!important}
html:root body :is(th,td){background:var(--theme-surface)!important;color:var(--theme-ink)!important;border-color:var(--theme-line)!important}
html:root body :is([role=alert],.error,.error-message,#message.error){color:var(--theme-danger)!important;background:var(--theme-surface)!important}
html:root body :is(a,button,input,select,textarea,summary,[tabindex]):focus-visible{outline:3px solid var(--theme-focus)!important;outline-offset:3px!important}
html:root body :is(.rank-track,.bar-track){background:var(--theme-raised)!important}
html:root body :is(.rank-fill,.bar-fill){background:var(--theme-accent)!important}
html:root body :is(.metric-chart,.trend) svg text{fill:var(--theme-ink)!important}
html:root body :is(.metric-chart,.trend) svg :is(polyline,circle,rect){stroke:var(--theme-accent)!important}
html:root body :is(.metric-chart,.trend) svg :is(circle,rect){fill:var(--theme-accent)!important}
html:root body :is(.metric-chart,.trend) svg line{stroke:var(--theme-line)!important}
html:root body :is(.app-brand,.brand:has(img),.v3-header>a:has(img)){background:#fff!important;color:#14324c!important;border-radius:8px;padding:4px;max-width:100%}
html:root body .app-brand img{width:104px!important;height:auto!important;object-fit:contain} @media(max-width:900px){html:root body .app-brand img{width:88px!important}}
/* Preserve text resizing, browser zoom, native forced-colors and image artwork. */
html:root body :is(.dashboard-help,.booking-instructions,.business-details,.reset-container,.schedule-card,.schedule-row,.schedule-bottom,.booking-note,.install-section,.install-guide,.getting-started,.calendar-icon,.feature-icon,.help-topics,.help-input-row,.intro-strip){background:var(--theme-surface)!important;color:var(--theme-ink)!important;border-color:var(--theme-line)!important}
html:root body :is(.skip-link,.week .selected){background:var(--theme-accent)!important;color:var(--theme-on-accent)!important}
html:root body .schedule-row .status{background:var(--theme-raised)!important;color:var(--theme-ink)!important}
html:root body .link-icon{background:var(--theme-raised)!important;color:var(--theme-ink)!important}
html:root body{font-size:1rem!important}
html:root body :is(.app-brand,.brand:has(img),.v3-header>a:has(img)){background:transparent!important;color:var(--theme-ink)!important;padding:0}
html:root body :is(.app-brand img,.brand img,.v3-header>a>img){background:#fff;border-radius:8px;padding:4px}
