/* Feedback uses neutral text; status is carried by its surface, border and icon. */
:is(.alert,.cxrb-alert,.auth-alert,.auth-alert-success,.auth-alert-error,.auth-alert-warning,.su-alert,.lp-notice) {
    --cxr-feedback-text:#17212b; --cxr-feedback-bg:#edf5ff; --cxr-feedback-border:#bfd8f8;
    --cxr-feedback-icon:#175ea8; --cxr-feedback-close-filter:none;
    --bs-alert-color:var(--cxr-feedback-text); --bs-alert-bg:var(--cxr-feedback-bg); --bs-alert-border-color:var(--cxr-feedback-border);
    color:var(--cxr-feedback-text) !important; background:var(--cxr-feedback-bg) !important; border-color:var(--cxr-feedback-border) !important;
}
:is(.alert,.auth-alert):is(.alert-success,.alert-light-success,.bg-success,.bg-light-success,.auth-alert-success),.cxrb-alert--ok,.auth-alert-success {
    --cxr-feedback-bg:#ecfdf3; --cxr-feedback-border:#b7e4cc; --cxr-feedback-icon:#166534;
}
:is(.alert,.auth-alert):is(.alert-warning,.alert-light-warning,.bg-warning,.bg-light-warning,.auth-alert-warning),.cxrb-alert--warn,.auth-alert-warning {
    --cxr-feedback-bg:#fff8e6; --cxr-feedback-border:#f1d493; --cxr-feedback-icon:#935900;
}
:is(.alert,.auth-alert):is(.alert-danger,.alert-error,.alert-light-danger,.bg-danger,.bg-light-danger,.auth-alert-error),.cxrb-alert--bad,.su-alert,.auth-alert-error {
    --cxr-feedback-bg:#fff0f1; --cxr-feedback-border:#f3b9c0; --cxr-feedback-icon:#b42336;
}
:is([data-bs-theme=dark],[data-theme=dark],.dark) :is(.alert,.cxrb-alert,.auth-alert,.auth-alert-success,.auth-alert-error,.auth-alert-warning,.su-alert,.lp-notice) {
    --cxr-feedback-text:#f4f7fb; --cxr-feedback-bg:#223246; --cxr-feedback-border:#4a6687; --cxr-feedback-icon:#a8d0ff; --cxr-feedback-close-filter:invert(1) grayscale(1) brightness(2);
}
:is([data-bs-theme=dark],[data-theme=dark],.dark) :is(.alert,.auth-alert):is(.alert-success,.alert-light-success,.bg-success,.bg-light-success,.auth-alert-success),
:is([data-bs-theme=dark],[data-theme=dark],.dark) :is(.cxrb-alert--ok,.auth-alert-success) { --cxr-feedback-bg:#20352d; --cxr-feedback-border:#4d7966; --cxr-feedback-icon:#9ce4b6; }
:is([data-bs-theme=dark],[data-theme=dark],.dark) :is(.alert,.auth-alert):is(.alert-warning,.alert-light-warning,.bg-warning,.bg-light-warning,.auth-alert-warning),
:is([data-bs-theme=dark],[data-theme=dark],.dark) :is(.cxrb-alert--warn,.auth-alert-warning) { --cxr-feedback-bg:#3a3022; --cxr-feedback-border:#8a7044; --cxr-feedback-icon:#f9d38c; }
:is([data-bs-theme=dark],[data-theme=dark],.dark) :is(.alert,.auth-alert):is(.alert-danger,.alert-error,.alert-light-danger,.bg-danger,.bg-light-danger,.auth-alert-error),
:is([data-bs-theme=dark],[data-theme=dark],.dark) :is(.cxrb-alert--bad,.su-alert,.auth-alert-error) { --cxr-feedback-bg:#3c262c; --cxr-feedback-border:#8b5864; --cxr-feedback-icon:#ffb6c1; }
:is(.alert,.cxrb-alert,.auth-alert,.auth-alert-success,.auth-alert-error,.auth-alert-warning,.su-alert,.lp-notice) :is(h1,h2,h3,h4,h5,h6,p,ul,ol,li,small,strong,label,.alert-heading,.alert-link,.text-success,.text-danger,.text-warning,.text-info,.text-primary,.text-white,.text-muted,[class*="text-gray-"]):not(.btn,.btn *,.cxrb-btn,.cxrb-btn *,button,button *) {
    color:var(--cxr-feedback-text) !important;
}
:is(.alert,.cxrb-alert,.auth-alert,.auth-alert-success,.auth-alert-error,.auth-alert-warning,.su-alert,.lp-notice) a:not(.btn):not(.btn *):not(.cxrb-btn):not(.cxrb-btn *):not([role=button]) { color:var(--cxr-feedback-text) !important; text-decoration:underline; text-underline-offset:2px; }
:is(.alert,.cxrb-alert,.auth-alert,.auth-alert-success,.auth-alert-error,.auth-alert-warning,.su-alert,.lp-notice) > :is(i,svg), .alert .alert-icon { color:var(--cxr-feedback-icon) !important; }
.alert .btn-close { filter:var(--cxr-feedback-close-filter) !important; opacity:.8; }
.alert .btn-close:hover { opacity:1; }
.alert button[data-bs-dismiss=alert]:not(.btn-primary):not(.btn-danger) { color:var(--cxr-feedback-text) !important; }
/* Toastr renders outside page containers; keep its status icons and controls readable. */
#toast-container > :is(.toast-success,.toast-info,.toast-warning,.toast-error) { color:#17212b !important; opacity:1; background-image:none !important; padding-left:18px; border:1px solid #bfd8f8; }
#toast-container > .toast-success { background-color:#ecfdf3 !important; border-color:#b7e4cc; }
#toast-container > .toast-info { background-color:#edf5ff !important; border-color:#bfd8f8; }
#toast-container > .toast-warning { background-color:#fff8e6 !important; border-color:#f1d493; }
#toast-container > .toast-error { background-color:#fff0f1 !important; border-color:#f3b9c0; }
#toast-container :is(.toast-title,.toast-message,.toast-message a,.toast-close-button) { color:inherit !important; }
#toast-container .toast-message a { text-decoration:underline; }
#toast-container .toast-close-button { opacity:.8; text-shadow:none; }
:is([data-bs-theme=dark],[data-theme=dark],.dark) #toast-container > :is(.toast-success,.toast-info,.toast-warning,.toast-error) { color:#f4f7fb !important; }
:is([data-bs-theme=dark],[data-theme=dark],.dark) #toast-container > .toast-success { background-color:#20352d !important; border-color:#4d7966; }
:is([data-bs-theme=dark],[data-theme=dark],.dark) #toast-container > .toast-info { background-color:#223246 !important; border-color:#4a6687; }
:is([data-bs-theme=dark],[data-theme=dark],.dark) #toast-container > .toast-warning { background-color:#3a3022 !important; border-color:#8a7044; }
:is([data-bs-theme=dark],[data-theme=dark],.dark) #toast-container > .toast-error { background-color:#3c262c !important; border-color:#8b5864; }

/* Toastr renders outside page containers; keep its status icons and controls readable. */
#toastr-container > :is(.toastr-success,.toastr-info,.toastr-warning,.toastr-error) { color:#17212b !important; opacity:1; background-image:none !important; padding-left:18px; border:1px solid #bfd8f8; }
#toastr-container > .toastr-success { background-color:#ecfdf3 !important; border-color:#b7e4cc; }
#toastr-container > .toastr-info { background-color:#edf5ff !important; border-color:#bfd8f8; }
#toastr-container > .toastr-warning { background-color:#fff8e6 !important; border-color:#f1d493; }
#toastr-container > .toastr-error { background-color:#fff0f1 !important; border-color:#f3b9c0; }
#toastr-container :is(.toastr-title,.toastr-message,.toastr-message a,.toastr-close-button) { color:inherit !important; }
#toastr-container .toastr-message a { text-decoration:underline; }
#toastr-container .toastr-close-button { opacity:.8; text-shadow:none; }
:is([data-bs-theme=dark],[data-theme=dark],.dark) #toastr-container > :is(.toastr-success,.toastr-info,.toastr-warning,.toastr-error) { color:#f4f7fb !important; }
:is([data-bs-theme=dark],[data-theme=dark],.dark) #toastr-container > .toastr-success { background-color:#20352d !important; border-color:#4d7966; }
:is([data-bs-theme=dark],[data-theme=dark],.dark) #toastr-container > .toastr-info { background-color:#223246 !important; border-color:#4a6687; }
:is([data-bs-theme=dark],[data-theme=dark],.dark) #toastr-container > .toastr-warning { background-color:#3a3022 !important; border-color:#8a7044; }
:is([data-bs-theme=dark],[data-theme=dark],.dark) #toastr-container > .toastr-error { background-color:#3c262c !important; border-color:#8b5864; }

/* Some dark panel accents are pale; alert action buttons need their own contrasting surface. */
:is([data-bs-theme=dark],[data-theme=dark],.dark) :is(.alert,.cxrb-alert,.auth-alert-success,.auth-alert-error,.auth-alert-warning,.su-alert,.lp-notice) .btn-primary {
    background:#17212b !important; border-color:#687d8f !important; color:#fff !important;
}

/* Customer forms use Tailwind utility colors as well as the panel's Bootstrap classes. */
.alert :is([class*="text-emerald-"],[class*="text-green-"],[class*="text-red-"],[class*="text-amber-"],[class*="text-yellow-"],[class*="text-white/"]):not(.btn,.btn *,.cxrb-btn,.cxrb-btn *,button,button *,svg,i,.iconify) { color:var(--cxr-feedback-text) !important; }
.alert :is([class*="bg-emerald-"],[class*="bg-green-"],[class*="bg-red-"],[class*="bg-amber-"],[class*="bg-yellow-"],[class*="bg-white"]):not(.btn,.btn *,.cxrb-btn,.cxrb-btn *,button,button *,svg,i,.iconify) { background:transparent !important; }
.alert :is(svg[class*="text-"],i[class*="text-"],.iconify):not(.btn,.btn *,.cxrb-btn,.cxrb-btn *,button *) { color:var(--cxr-feedback-icon) !important; }

/* Kit alert actions retain their own readable button foregrounds. */
:is([data-bs-theme=dark],[data-theme=dark],.dark) :is(.alert,.cxrb-alert) .cxrb-btn:not(.cxrb-btn--ghost):not(.cxrb-btn--danger) { background:#17212b !important; border-color:#687d8f !important; color:#fff !important; }
:is([data-bs-theme=dark],[data-theme=dark],.dark) :is(.alert,.cxrb-alert) .cxrb-btn--danger { background:transparent !important; color:#ffb6c1 !important; border-color:#8b5864 !important; }
