/* Shared UI palette. Card artwork and exported documents keep their own palette. */
:root{--surface:#fff;--soft:#edf3f7;--line:#cbd6e2;--field-text:#172033;--placeholder:#526479;--button-fill:#087e78}
html[data-theme=dark]{color-scheme:dark}
html[data-theme=light]{color-scheme:light}
html[data-theme=dark] body{--bg:#0c192b;--ink:#ecf2f8;--muted:#b3c2d2;--white:#15283f;--surface:#15283f;--soft:#1b2e46;--line:#435870;--ui-border:#435870;--contribution-border:#435870;--field-text:#ecf2f8;--placeholder:#b3c2d2;background:var(--bg);color:var(--ink)}
body :is(input,select,textarea){color:var(--field-text);background-color:var(--surface)}
body :is(input,textarea)::placeholder{color:var(--placeholder);opacity:1}
body .btn:not(.gold):not(.dark):not(.danger):not(.outline){background-color:var(--button-fill);color:#fff}
html[data-theme=dark] body :is(.card,.feature,table,.admin-navigation,.finance-export-menu,.more-menu,.customer-sheet,.responsive-records tbody>tr){background-color:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] body :is(input,select,textarea){background-color:var(--surface);color:var(--field-text);border-color:var(--line)}
html[data-theme=dark] body :is(.contribution-tabs,.sms-counter,.tablewrap:after,.section-controls,.additional-event-row,.contribution-edit,.invitation-action){background-color:var(--soft);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] body :is(.stat b,.overview-metric b,.sms-counter b,.empty-state b,.finance-kpi strong){color:var(--ink)}
html[data-theme=dark] body :is(.contributions-workspace .stat,.contribution-helper,.empty-state){color:var(--muted)}
html[data-theme=dark] body :is(.btn.outline,.admin-hub-tabs a:not([aria-current=page]),.finance-tabs a:not([aria-current=page]),.customer-section-tabs a:not([aria-current=page])){background:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] body :is(th,td,.tablewrap){border-color:var(--line)}
html[data-theme=dark] body :is(.badge,.customer-tab-nav,.wizard-tab){background:var(--soft);color:var(--ink)}
html[data-theme=dark] body :is(.alert,.badge.valid,.badge.delivered,.badge.paid,.badge.sent){background:#153f35;color:#b1edcf}
html[data-theme=dark] body :is(.errors,.badge.invalid,.badge.failed,.badge.opted_out){background:#4c252a;color:#ffd7d5}
/* Measured fallback for legacy inline surfaces and controls, in both themes. */
html body [data-ui-contrast=dark]{color:#10243e!important;-webkit-text-fill-color:#10243e!important}
html body [data-ui-contrast=light]{color:#fff!important;-webkit-text-fill-color:#fff!important}
html body [data-ui-contrast=black]{color:#000!important;-webkit-text-fill-color:#000!important}
html body [data-ui-placeholder=dark]::placeholder{color:#10243e!important;opacity:1}
html body [data-ui-placeholder=light]::placeholder{color:#fff!important;opacity:1}
html body [data-ui-placeholder=black]::placeholder{color:#000!important;opacity:1}
@media print{html body{color-scheme:light;--ink:#172033;--muted:#526479;--surface:#fff;--soft:#f4f7f9;--field-text:#172033;background:#fff;color:#172033}html body [data-ui-contrast]{-webkit-text-fill-color:currentColor!important}}
