/* ─── CosLink Design Tokens ─────────────────────────────────────────────── */
:root {
    --navy:     #254358;
    --steel:    #3E78A4;
    --slate:    #7C8488;
    --charcoal: #575755;
    --white:    #FFFFFF;

    --navy-dark:   #1a3042;
    --steel-light: #5b96c0;
    --bg-light:    #f5f7f9;
    --bg-mid:      #eef1f4;
    --border:      #d4dce4;

    --font: 'Montserrat', sans-serif;
    --transition: 0.25s ease;
}

/* ─── Dark mode token overrides ──────────────────────────────────────────── */
.ml-layout.dark {
    --navy:    #e7eef4;
    --steel:   #5ab4e8;
    --slate:   rgba(255,255,255,.52);
    --charcoal: #d0dde8;
    --bg-light: #112433;
    --bg-mid:   #152c3c;
    --border:   rgba(255,255,255,.10);
}

html, body {
    font-family: var(--font);
    background-color: var(--bg-light);
    color: var(--charcoal);
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: var(--steel);
    transition: color var(--transition);
}

a:hover, .btn-link:hover {
    color: var(--navy);
}

.btn-primary {
    color: var(--white);
    background-color: var(--steel);
    border-color: var(--navy);
    transition: background-color var(--transition), border-color var(--transition);
}

.btn-primary:hover {
    background-color: var(--navy);
    border-color: var(--navy-dark);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem var(--white), 0 0 0 0.25rem var(--steel-light);
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--steel);
}

.invalid {
    outline: 1px solid #b71c1c;
}

.validation-message {
    color: #b71c1c;
}

#blazor-error-ui {
    color-scheme: light only;
    background: var(--bg-mid);
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.splash {
    position: fixed;
    inset: 0;
    background: linear-gradient(150deg, #1a3042 0%, #254358 55%, #1e3d54 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', 'Helvetica Neue', sans-serif;
    z-index: 9999;
}

.splash-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

.splash-logo {
    width: 150px;
    height: auto;
    display: block;
    animation: splashPulse 2s ease-in-out infinite alternate;
}

@keyframes splashPulse {
    from { opacity: 0.65; transform: scale(0.96); }
    to   { opacity: 1;    transform: scale(1); }
}

.splash-tagline {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
}

.splash-bar-wrap {
    width: 160px;
    height: 2px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.splash-bar-fill {
    height: 100%;
    border-radius: 2px;
    background: #3E78A4;
    width: var(--blazor-load-percentage, 0%);
    transition: width 0.15s ease;
}

code {
    color: var(--navy);
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ─── Force Montserrat on ALL MudBlazor components ─────────────────────── */
/* MudTheme Typography generates the --mud-typography-*-family CSS variables,
   but this rule acts as a safety net for any component that inlines Roboto. */
.mud-typography,
.mud-button-root,
.mud-icon-button,
.mud-nav-link,
.mud-nav-group-title,
.mud-drawer-header,
.mud-appbar .mud-toolbar-root,
.mud-chip-content,
.mud-chip,
.mud-table-cell,
.mud-table-head-cell,
.mud-input,
.mud-input-root,
.mud-input-label,
.mud-select-input,
.mud-menu-item,
.mud-list-item-text,
.mud-dialog-title,
.mud-dialog-content,
.mud-snackbar,
.mud-paper p,
.mud-card-header-content,
.mud-tab-panel,
.mud-tabs-header,
.mud-breadcrumbs,
.mud-tooltip-root {
    font-family: var(--font) !important;
}

/* ── Admin: MudTable global polish ──────────────────────────────── */
.mud-table .mud-table-head .mud-table-cell {
    font-size: .7rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: .07em !important;
    color: #7C8488 !important;
    background: #fafbfc !important;
    border-bottom: 2px solid #e6edf3 !important;
    padding: 11px 16px !important;
}

.mud-table .mud-table-body .mud-table-cell {
    padding: 11px 16px !important;
    border-bottom: 1px solid #f3f6f9 !important;
    font-size: .88rem !important;
}

.mud-table .mud-table-body .mud-table-row:last-child > .mud-table-cell {
    border-bottom: none !important;
}

/* MudTable dark mode (admin) */
.al-root.dark .mud-table .mud-table-head .mud-table-cell {
    color: rgba(255,255,255,.40) !important;
    background: #1a3347 !important;
    border-bottom-color: rgba(255,255,255,.08) !important;
}
.al-root.dark .mud-table .mud-table-body .mud-table-cell {
    border-bottom-color: rgba(255,255,255,.05) !important;
    color: rgba(255,255,255,.82) !important;
}
.al-root.dark .mud-table-root { background: transparent !important; }
.al-root.dark .mud-table-body .mud-table-row:hover > td { background: rgba(255,255,255,.04) !important; }

/* ── Admin page utility classes ─────────────────────────────────── */
.ap-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.ap-eyebrow {
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #3E78A4;
    margin-bottom: 4px;
}

.ap-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #254358;
    line-height: 1.2;
    margin-bottom: 3px;
}

.ap-subtitle { font-size: .83rem; color: #7C8488; }

.ap-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 0 18px; height: 40px;
    border-radius: 999px;
    background: #3E78A4; color: white;
    font-size: .83rem; font-weight: 700;
    border: none; cursor: pointer;
    font-family: var(--font);
    transition: background .16s;
    white-space: nowrap;
}
.ap-btn:hover { background: #5b96c0; }

/* ── Admin stats grid ────────────────────────────────────────────── */
.ap-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
    max-width: 900px;
}

.ap-stat {
    background: #fff;
    border: 1px solid #e6edf3;
    border-radius: 14px;
    padding: 16px 18px;
    transition: box-shadow .22s, transform .22s;
    animation: ap-card-in .45s cubic-bezier(.22,1,.36,1) both;
}
.ap-stat:nth-child(1) { animation-delay: .04s; }
.ap-stat:nth-child(2) { animation-delay: .09s; }
.ap-stat:nth-child(3) { animation-delay: .14s; }
.ap-stat:nth-child(4) { animation-delay: .19s; }
.ap-stat:nth-child(5) { animation-delay: .24s; }
.ap-stat:nth-child(6) { animation-delay: .29s; }

.ap-stat:hover { box-shadow: 0 8px 28px rgba(37,67,88,.13); transform: translateY(-3px); }

.ap-stat-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 10px;
}

.ap-stat-num {
    font-size: 1.85rem; font-weight: 800;
    color: #254358; line-height: 1;
    margin-bottom: 4px;
}

.ap-stat-label {
    font-size: .7rem; font-weight: 700;
    color: #7C8488;
    text-transform: uppercase; letter-spacing: .07em;
}

/* ── Search bar ─────────────────────────────────────────────────── */
.ap-search {
    background: #fff;
    border: 1px solid #e6edf3;
    border-radius: 14px;
    padding: 10px 16px;
    margin-bottom: 18px;
    display: flex; align-items: center; gap: 12px;
    flex-wrap: wrap;
}

/* ── Table wrapper ──────────────────────────────────────────────── */
.ap-table {
    background: #fff;
    border: 1px solid #e6edf3;
    border-radius: 16px;
    overflow-x: auto;
}

/* ── Status badges ──────────────────────────────────────────────── */
.ap-badge {
    display: inline-flex; align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .7rem; font-weight: 700;
    white-space: nowrap;
}
.ap-badge-on      { background: #e8f5e9; color: #2e7d32; }
.ap-badge-off     { background: #f5f5f5; color: #9e9e9e; border: 1px solid #e0e0e0; }
.ap-badge-warning { background: #fff8e1; color: #e65100; }
.ap-badge-info    { background: #e3f2fd; color: #1565c0; }
.ap-badge-error   { background: #ffebee; color: #c62828; }
.ap-badge-purple  { background: #f3e5f5; color: #6a1b9a; }

/* ── Role tag (inline) ──────────────────────────────────────────── */
.ap-role {
    display: inline-flex; align-items: center;
    padding: 2px 8px; border-radius: 999px;
    font-size: .69rem; font-weight: 700;
    background: #eef4f9; color: #3E78A4;
    margin: 1px 2px;
}

/* ── Table action buttons ────────────────────────────────────────── */
.ap-actions { display: flex; gap: 4px; justify-content: flex-end; align-items: center; }

.ap-action {
    width: 36px; height: 36px;
    border-radius: 8px; border: 1px solid #e6edf3;
    background: transparent; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: #9e9e9e;
    transition: all .14s;
    font-family: var(--font);
}
.ap-action:hover          { background: #f5f7f9; color: #254358; border-color: #d4dce4; }
.ap-action.ap-edit:hover  { background: #e8f1f8; color: #3E78A4; border-color: #bcd0df; }
.ap-action.ap-warn:hover  { background: #fff8e1; color: #e65100; border-color: #ffe082; }
.ap-action.ap-ok:hover    { background: #e8f5e9; color: #2e7d32; border-color: #a5d6a7; }
.ap-action.ap-del:hover   { background: #ffebee; color: #c62828; border-color: #ffcdd2; }

/* ── Global animation keyframes ─────────────────────────────────── */
@keyframes ap-card-in {
    from { opacity: 0; transform: translateY(18px) scale(.98); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}
@keyframes ap-row-in {
    from { opacity: 0; transform: translateX(-10px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes ap-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes ap-pop-in {
    0%   { opacity: 0; transform: scale(.88); }
    70%  { transform: scale(1.04); }
    100% { opacity: 1; transform: scale(1); }
}

/* Page sections / panels slide in */
.ap-table, .ap-search { animation: ap-card-in .5s cubic-bezier(.22,1,.36,1) both; }
.ap-table { animation-delay: .08s; }
.ap-search { animation-delay: .03s; }

/* Table rows stagger in */
.mud-table-body .mud-table-row {
    animation: ap-row-in .32s cubic-bezier(.22,1,.36,1) both;
}
.mud-table-body .mud-table-row:nth-child(1)  { animation-delay: .04s; }
.mud-table-body .mud-table-row:nth-child(2)  { animation-delay: .07s; }
.mud-table-body .mud-table-row:nth-child(3)  { animation-delay: .10s; }
.mud-table-body .mud-table-row:nth-child(4)  { animation-delay: .13s; }
.mud-table-body .mud-table-row:nth-child(5)  { animation-delay: .16s; }
.mud-table-body .mud-table-row:nth-child(6)  { animation-delay: .19s; }
.mud-table-body .mud-table-row:nth-child(7)  { animation-delay: .22s; }
.mud-table-body .mud-table-row:nth-child(8)  { animation-delay: .25s; }
.mud-table-body .mud-table-row:nth-child(n+9){ animation-delay: .28s; }

/* Button micro-interactions */
.dlg-save-btn, .dlg-cancel-btn, .dlg-danger-btn {
    transition: background .14s, transform .12s, box-shadow .14s !important;
}
.dlg-save-btn:active:not(:disabled)   { transform: scale(.96); box-shadow: none !important; }
.dlg-cancel-btn:active:not(:disabled) { transform: scale(.96); }
.dlg-danger-btn:active:not(:disabled) { transform: scale(.96); }

.ap-action { transition: all .14s, transform .10s; }
.ap-action:active { transform: scale(.88); }
.ap-btn:active:not(:disabled) { transform: scale(.97); }

/* Dialog appear */
.mud-dialog { animation: ap-pop-in .28s cubic-bezier(.22,1,.36,1) both !important; }

/* icon color helpers */
.ic-blue   { background: #e8f1f8; color: #3E78A4; }
.ic-navy   { background: #e4eaf0; color: #254358; }
.ic-green  { background: #e8f5e9; color: #2e7d32; }
.ic-amber  { background: #fff8e1; color: #e65100; }
.ic-purple { background: #f3e5f5; color: #6a1b9a; }
.ic-slate  { background: #f0f4f7; color: #7C8488; }

/* ── Dialog shell overrides ──────────────────────────────────────── */
/* Structural only — no forced background colors (MudBlazor theme handles light/dark) */
.mud-dialog {
    border-radius: 18px !important;
    overflow: hidden !important;
    box-shadow: 0 20px 60px rgba(37,67,88,.18), 0 4px 16px rgba(37,67,88,.10) !important;
}
.mud-dialog .mud-dialog-title {
    border-bottom: 1px solid #e6edf3 !important;
    padding: 14px 20px 12px !important;
    font-family: 'Montserrat', sans-serif !important;
}
.mud-dialog .mud-dialog-content {
    padding: 20px !important;
}
.mud-dialog .mud-dialog-actions {
    border-top: 1px solid #e6edf3 !important;
    padding: 12px 20px !important;
    gap: 8px;
}

/* Dialog dark mode — html.al-dark / html.ml-dark covers both in-tree and portaled dialogs */
html.al-dark .mud-dialog,
html.ml-dark .mud-dialog,
.al-root.dark .mud-dialog,
.ml-layout.dark .mud-dialog {
    background: #152c3c !important;
    box-shadow: 0 20px 60px rgba(0,0,0,.45), 0 4px 16px rgba(0,0,0,.28) !important;
}
html.al-dark .mud-dialog .mud-dialog-title,
html.ml-dark .mud-dialog .mud-dialog-title,
.al-root.dark .mud-dialog .mud-dialog-title,
.ml-layout.dark .mud-dialog .mud-dialog-title {
    background: #1a3347 !important;
    border-bottom-color: rgba(255,255,255,.08) !important;
}
html.al-dark .mud-dialog .mud-dialog-content,
html.ml-dark .mud-dialog .mud-dialog-content,
.al-root.dark .mud-dialog .mud-dialog-content,
.ml-layout.dark .mud-dialog .mud-dialog-content {
    background: #152c3c !important;
    color: #e7eef4 !important;
}
html.al-dark .mud-dialog .mud-dialog-actions,
html.ml-dark .mud-dialog .mud-dialog-actions,
.al-root.dark .mud-dialog .mud-dialog-actions,
.ml-layout.dark .mud-dialog .mud-dialog-actions {
    background: #1a3347 !important;
    border-top-color: rgba(255,255,255,.08) !important;
}
html.al-dark .mud-dialog .mud-icon-button,
html.ml-dark .mud-dialog .mud-icon-button,
.al-root.dark .mud-dialog .mud-icon-button,
.ml-layout.dark .mud-dialog .mud-icon-button { color: rgba(255,255,255,.45) !important; }
html.al-dark .mud-dialog .mud-icon-button:hover,
html.ml-dark .mud-dialog .mud-icon-button:hover,
.al-root.dark .mud-dialog .mud-icon-button:hover,
.ml-layout.dark .mud-dialog .mud-icon-button:hover { color: rgba(255,255,255,.85) !important; background: rgba(255,255,255,.07) !important; }

/* Overlay backdrop dark */
html.al-dark .mud-overlay.mud-dialog-overlay,
html.ml-dark .mud-overlay.mud-dialog-overlay,
.al-root.dark .mud-overlay.mud-dialog-overlay,
.ml-layout.dark .mud-overlay.mud-dialog-overlay { background: rgba(5,15,25,.65) !important; }

/* Dialog inner wrappers dark — also via html class (portal-safe) */
html.al-dark .fstep-body .mud-input-label,
html.al-dark .mpd-body .mud-input-label,
html.al-dark .umrs-body .mud-input-label,
html.al-dark .mrd-body .mud-input-label { color:rgba(255,255,255,.75) !important; }
html.al-dark .fstep-body .mud-input-outlined-border,
html.al-dark .mpd-body .mud-input-outlined-border,
html.al-dark .umrs-body .mud-input-outlined-border,
html.al-dark .mrd-body .mud-input-outlined-border { border-color:rgba(255,255,255,.15) !important; }
html.al-dark .fstep-body .mud-input-slot,
html.al-dark .mpd-body .mud-input-slot,
html.al-dark .umrs-body .mud-input-slot,
html.al-dark .mrd-body .mud-input-slot { background:rgba(255,255,255,.05) !important; }
/* ── MarketplaceListingEditorDialog dark mode (portal-safe, app.css wins) ─── */
html.al-dark .mud-dialog .mle-preview,
.al-root.dark .mud-dialog .mle-preview {
    background: #152c3c !important;
    border-color: rgba(255,255,255,.08) !important;
}
html.al-dark .mud-dialog .mle-card-body,
.al-root.dark .mud-dialog .mle-card-body {
    background: #152c3c !important;
}
html.al-dark .mud-dialog .mle-card-body h3,
.al-root.dark .mud-dialog .mle-card-body h3 { color: #e7eef4 !important; }
html.al-dark .mud-dialog .mle-card-body p,
.al-root.dark .mud-dialog .mle-card-body p { color: rgba(255,255,255,.48) !important; }
html.al-dark .mud-dialog .mle-readiness.is-ready,
.al-root.dark .mud-dialog .mle-readiness.is-ready {
    background: rgba(46,125,50,.18) !important;
    border-color: rgba(46,125,50,.38) !important;
    color: #a5d6a7 !important;
}
html.al-dark .mud-dialog .mle-readiness.is-ready strong,
.al-root.dark .mud-dialog .mle-readiness.is-ready strong { color: #66bb8a !important; }
html.al-dark .mud-dialog .mle-readiness.is-pending,
.al-root.dark .mud-dialog .mle-readiness.is-pending {
    background: rgba(230,81,0,.15) !important;
    border-color: rgba(230,81,0,.38) !important;
    color: #ffcc80 !important;
}
html.al-dark .mud-dialog .mle-readiness.is-pending strong,
.al-root.dark .mud-dialog .mle-readiness.is-pending strong { color: #ffb74d !important; }
html.al-dark .mud-dialog .mle-cover,
.al-root.dark .mud-dialog .mle-cover { background: #1a3042 !important; }

/* ── Global admin input polish ─────────────────────────────────── */
/* Label overlap fix */
.al-root .mud-input-label-outlined { background: #fff !important; padding: 0 4px !important; }
:is(.al-root.dark, html.al-dark) .mud-input-label-outlined { background: #1e3a4f !important; padding: 0 4px !important; }

/* Rounded corners + branded border on ALL admin outlined inputs */
.al-root .mud-input-outlined-border {
    border-radius: 10px !important;
    border-color: #cddce8 !important;
    transition: border-color .18s, box-shadow .18s !important;
}
.al-root .mud-input-outlined:hover .mud-input-outlined-border {
    border-color: #3E78A4 !important;
}
.al-root .mud-input.mud-input-focused .mud-input-outlined-border,
.al-root .mud-input-outlined.mud-focused .mud-input-outlined-border {
    border-color: #3E78A4 !important;
    border-width: 2px !important;
    box-shadow: 0 0 0 3px rgba(62,120,164,.10) !important;
}
.al-root .mud-input-label { font-family: 'Montserrat', sans-serif !important; }
.al-root .mud-input > input,
.al-root .mud-input > textarea { font-family: 'Montserrat', sans-serif !important; font-weight: 500 !important; }
/* All input adornments (calendar, eye, clear, spinners) must stay visible */
.al-root .mud-input-adornment { overflow: visible !important; }
.al-root .mud-input-adornment .mud-icon-button,
.al-root .mud-input-adornment .mud-icon-button-root { position: relative; z-index: 1; }

/* Dark mode */
:is(.al-root.dark, html.al-dark) .mud-input-outlined-border { border-color: rgba(255,255,255,.14) !important; }
:is(.al-root.dark, html.al-dark) .mud-input-outlined:hover .mud-input-outlined-border { border-color: #5ab4e8 !important; }
:is(.al-root.dark, html.al-dark) .mud-input.mud-input-focused .mud-input-outlined-border { border-color: #5ab4e8 !important; box-shadow: 0 0 0 3px rgba(90,180,232,.12) !important; }

/* ── Global user-side input polish ─────────────────────────────── */
.ml-layout .mud-input-label-outlined { background: #fff !important; padding: 0 4px !important; }
:is(.ml-layout.dark, html.ml-dark) .mud-input-label-outlined { background: #0f2233 !important; padding: 0 4px !important; }
.ml-layout .mud-input-outlined-border {
    border-radius: 10px !important;
    border-color: #cddce8 !important;
    transition: border-color .18s, box-shadow .18s !important;
}
.ml-layout .mud-input-outlined:hover .mud-input-outlined-border {
    border-color: #3E78A4 !important;
}
.ml-layout .mud-input.mud-input-focused .mud-input-outlined-border,
.ml-layout .mud-input-outlined.mud-focused .mud-input-outlined-border {
    border-color: #3E78A4 !important;
    border-width: 2px !important;
    box-shadow: 0 0 0 3px rgba(62,120,164,.10) !important;
}
.ml-layout .mud-input > input,
.ml-layout .mud-input > textarea { font-family: 'Montserrat', sans-serif !important; font-weight: 500 !important; }
:is(.ml-layout.dark, html.ml-dark) .mud-input-outlined-border { border-color: rgba(255,255,255,.14) !important; }
:is(.ml-layout.dark, html.ml-dark) .mud-input-outlined:hover .mud-input-outlined-border { border-color: #5ab4e8 !important; }
:is(.ml-layout.dark, html.ml-dark) .mud-input.mud-input-focused .mud-input-outlined-border { border-color: #5ab4e8 !important; box-shadow: 0 0 0 3px rgba(90,180,232,.12) !important; }
.ml-layout .mud-input-adornment { overflow: visible !important; }
.ml-layout .mud-input-adornment .mud-icon-button,
.ml-layout .mud-input-adornment .mud-icon-button-root { position: relative; z-index: 1; }

html.al-dark .fstep-body .mud-input-label-outlined,
html.al-dark .mpd-body .mud-input-label-outlined,
html.al-dark .umrs-body .mud-input-label-outlined,
html.al-dark .mrd-body .mud-input-label-outlined { background:#1e3a4f !important; }
html.al-dark .fstep-body .mud-input > input,
html.al-dark .fstep-body .mud-input > textarea,
html.al-dark .mpd-body .mud-input > input,
html.al-dark .mpd-body .mud-input > textarea,
html.al-dark .umrs-body .mud-input > input,
html.al-dark .umrs-body .mud-input > textarea,
html.al-dark .mrd-body .mud-input > input,
html.al-dark .mrd-body .mud-input > textarea { color:#e7eef4 !important; }
html.al-dark .fstep-section { background:#152c3c;border-color:rgba(255,255,255,.08); }
html.al-dark .fstep-section-head { background:rgba(255,255,255,.04);border-bottom-color:rgba(255,255,255,.08); }
html.al-dark .fstep-section-label { color:#5ab4e8; }
html.al-dark .fstep-section-count { background:rgba(255,255,255,.08);color:rgba(255,255,255,.45); }
html.al-dark .fstep-preview-row { color:#e7eef4;border-bottom-color:rgba(255,255,255,.06); }
html.al-dark .fstep-preview-type { background:rgba(255,255,255,.07);color:rgba(255,255,255,.42); }
html.al-dark .fstep-required-tag { color:#f5a952;background:rgba(224,123,24,.15);border-color:rgba(224,123,24,.3); }
html.al-dark .fstep-groups-panel { background:#152c3c;border-color:rgba(255,255,255,.08); }
html.al-dark .fstep-groups-head { background:rgba(255,255,255,.04);border-bottom-color:rgba(255,255,255,.08); }
html.al-dark .fstep-groups-title { color:#e7eef4; }
html.al-dark .fstep-groups-sub { color:rgba(255,255,255,.42); }
html.al-dark .fstep-group-item { background:rgba(255,255,255,.03);border-color:rgba(255,255,255,.08); }
html.al-dark .fstep-group-item-label { color:#e7eef4; }
html.al-dark .fstep-required-row { background:rgba(255,255,255,.03);border-color:rgba(255,255,255,.08); }
html.al-dark .fstep-required-row .mud-switch-label { color:rgba(255,255,255,.75) !important; }
/* User dialogs dark via html.ml-dark */
html.ml-dark .csd-progress-bar { background:rgba(255,255,255,.08); }
html.ml-dark .csd-item { background:rgba(255,255,255,.04);border-color:rgba(255,255,255,.08); }
html.ml-dark .csd-item-title { color:#e7eef4; }
html.ml-dark .csd-item-desc { color:rgba(255,255,255,.42); }
html.ml-dark .csd-progress-label { color:rgba(255,255,255,.45); }
html.ml-dark .csd-hint { background:rgba(255,255,255,.04);border-color:rgba(255,255,255,.08);color:rgba(255,255,255,.45); }
html.ml-dark .dsd-prompt { background:rgba(255,255,255,.04);border-color:rgba(255,255,255,.08);color:rgba(255,255,255,.55); }
html.ml-dark .dsd-option { background:rgba(255,255,255,.03);border-color:rgba(255,255,255,.08); }
html.ml-dark .dsd-option:has(input:checked) { border-color:#5ab4e8;background:rgba(90,180,232,.08); }
html.ml-dark .dsd-option-label { color:#e7eef4; }
/* dlg buttons dark via html class */
html.al-dark .dlg-title,html.ml-dark .dlg-title { color:#e7eef4; }
html.al-dark .dlg-cancel-btn,html.ml-dark .dlg-cancel-btn { background:transparent;border-color:rgba(255,255,255,.14);color:rgba(255,255,255,.55); }
html.al-dark .dlg-cancel-btn:hover,html.ml-dark .dlg-cancel-btn:hover { background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.25);color:rgba(255,255,255,.85); }
html.al-dark .dlg-save-btn,html.ml-dark .dlg-save-btn { background:#3E78A4; }
html.al-dark .dlg-save-btn:hover,html.ml-dark .dlg-save-btn:hover { background:#5b96c0; }
html.al-dark .dlg-danger-btn,html.ml-dark .dlg-danger-btn { background:#c62828; }
/* Snackbar dark handled in main snackbar block below */

/* ── Global dialog utilities ─────────────────────────────────────── */
.dlg-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    color: #254358;
}
.dlg-title-icon {
    width: 34px; height: 34px;
    border-radius: 10px;
    background: #eef4f9;
    color: #3E78A4;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.dlg-cancel-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 0 18px; height: 38px;
    border-radius: 999px;
    border: 1.5px solid #ccd6df;
    background: #fff; color: #7C8488;
    font-family: 'Montserrat', sans-serif;
    font-size: .83rem; font-weight: 700;
    cursor: pointer;
    transition: background .14s, border-color .14s, color .14s;
}
.dlg-cancel-btn:hover { background: #f0f4f8; border-color: #3E78A4; color: #254358; }
.dlg-cancel-btn:disabled { opacity: .5; cursor: not-allowed; }

.dlg-save-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 0 20px; height: 38px;
    border-radius: 999px;
    background: #3E78A4; color: #fff;
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-size: .83rem; font-weight: 700;
    cursor: pointer;
    transition: background .14s;
}
.dlg-save-btn:hover { background: #5b96c0; }
.dlg-save-btn:disabled { opacity: .55; cursor: not-allowed; }

.dlg-danger-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 0 20px; height: 38px;
    border-radius: 999px;
    background: #c62828; color: #fff;
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-size: .83rem; font-weight: 700;
    cursor: pointer;
    transition: background .14s;
}
.dlg-danger-btn:hover { background: #d32f2f; }
.dlg-danger-btn:disabled { opacity: .55; cursor: not-allowed; }

/* ════════════════════════════════════════════════════════════════════
   DARK MODE — global ap- overrides
   ═══════════════════════════════════════════════════════════════════ */

/* Stats */
.ml-layout.dark .ap-stat {
    background: #152c3c;
    border-color: rgba(255,255,255,.08);
    box-shadow: 0 2px 12px rgba(0,0,0,.2);
}
.ml-layout.dark .ap-stat:hover {
    box-shadow: 0 6px 22px rgba(0,0,0,.32);
}
.ml-layout.dark .ap-stat-num  { color: #e7eef4; }
.ml-layout.dark .ap-stat-label { color: rgba(255,255,255,.42); }

/* Icon color helpers */
.ml-layout.dark .ic-blue   { background: rgba(62,120,164,.22); color: #8bbfe0; }
.ml-layout.dark .ic-navy   { background: rgba(37,67,88,.35);   color: #9dc5dc; }
.ml-layout.dark .ic-green  { background: rgba(46,125,50,.22);  color: #81c784; }
.ml-layout.dark .ic-amber  { background: rgba(230,81,0,.22);   color: #ffb74d; }
.ml-layout.dark .ic-purple { background: rgba(106,27,154,.22); color: #ce93d8; }
.ml-layout.dark .ic-slate  { background: rgba(255,255,255,.07);color: rgba(255,255,255,.5); }

/* Search bar */
.ml-layout.dark .ap-search {
    background: #152c3c;
    border-color: rgba(255,255,255,.08);
}

/* Table wrapper */
.ml-layout.dark .ap-table {
    background: #152c3c;
    border-color: rgba(255,255,255,.08);
}

/* Status badges */
.ml-layout.dark .ap-badge-on      { background: rgba(46,125,50,.22);  color: #81c784; }
.ml-layout.dark .ap-badge-off     { background: rgba(255,255,255,.06); color: rgba(255,255,255,.4); border-color: rgba(255,255,255,.1); }
.ml-layout.dark .ap-badge-warning { background: rgba(230,81,0,.22);   color: #ffb74d; }
.ml-layout.dark .ap-badge-info    { background: rgba(21,101,192,.22);  color: #90caf9; }
.ml-layout.dark .ap-badge-error   { background: rgba(198,40,40,.22);   color: #ef9a9a; }
.ml-layout.dark .ap-badge-purple  { background: rgba(106,27,154,.22);  color: #ce93d8; }

/* Role tag */
.ml-layout.dark .ap-role { background: rgba(62,120,164,.18); color: #8bbfe0; }

/* Action buttons */
.ml-layout.dark .ap-action {
    border-color: rgba(255,255,255,.08);
    color: rgba(255,255,255,.35);
}
.ml-layout.dark .ap-action:hover          { background: rgba(255,255,255,.07); color: #c8dae6; border-color: rgba(255,255,255,.15); }
.ml-layout.dark .ap-action.ap-edit:hover  { background: rgba(62,120,164,.18);  color: #8bbfe0; border-color: rgba(62,120,164,.35); }
.ml-layout.dark .ap-action.ap-warn:hover  { background: rgba(230,81,0,.18);    color: #ffb74d; border-color: rgba(230,81,0,.35); }
.ml-layout.dark .ap-action.ap-ok:hover    { background: rgba(46,125,50,.18);   color: #81c784; border-color: rgba(46,125,50,.35); }
.ml-layout.dark .ap-action.ap-del:hover   { background: rgba(198,40,40,.18);   color: #ef9a9a; border-color: rgba(198,40,40,.35); }

/* Dialog utilities */
.ml-layout.dark .dlg-title       { color: #e7eef4; }
.ml-layout.dark .dlg-title-icon  { background: rgba(62,120,164,.22); color: #8bbfe0; }
.ml-layout.dark .dlg-cancel-btn  { background: transparent; border-color: rgba(255,255,255,.14); color: rgba(255,255,255,.55); }
.ml-layout.dark .dlg-cancel-btn:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.25); color: rgba(255,255,255,.85); }
.ml-layout.dark .dlg-save-btn    { background: #3E78A4; }
.ml-layout.dark .dlg-save-btn:hover { background: #5b96c0; }
.ml-layout.dark .dlg-danger-btn  { background: #c62828; }
.ml-layout.dark .dlg-danger-btn:hover { background: #d32f2f; }

/* ════════════════════════════════════════════════════════════════════
   DARK MODE — al-root.dark (AdminLayout) equivalents
   ═══════════════════════════════════════════════════════════════════ */

.al-root.dark .ap-title    { color: #e7eef4; }
.al-root.dark .ap-subtitle { color: rgba(255,255,255,.45); }

.al-root.dark .ap-stat {
    background: #152c3c;
    border-color: rgba(255,255,255,.08);
}
.al-root.dark .ap-stat:hover { box-shadow: 0 6px 22px rgba(0,0,0,.32); }
.al-root.dark .ap-stat-num   { color: #e7eef4; }
.al-root.dark .ap-stat-label { color: rgba(255,255,255,.42); }

.al-root.dark .ic-blue   { background: rgba(62,120,164,.22); color: #8bbfe0; }
.al-root.dark .ic-navy   { background: rgba(37,67,88,.35);   color: #9dc5dc; }
.al-root.dark .ic-green  { background: rgba(46,125,50,.22);  color: #81c784; }
.al-root.dark .ic-amber  { background: rgba(230,81,0,.22);   color: #ffb74d; }
.al-root.dark .ic-purple { background: rgba(106,27,154,.22); color: #ce93d8; }
.al-root.dark .ic-slate  { background: rgba(255,255,255,.07); color: rgba(255,255,255,.5); }

.al-root.dark .ap-search {
    background: #152c3c;
    border-color: rgba(255,255,255,.08);
}

.al-root.dark .ap-table {
    background: #152c3c;
    border-color: rgba(255,255,255,.08);
}

.al-root.dark .ap-badge-on      { background: rgba(46,125,50,.22);  color: #81c784; }
.al-root.dark .ap-badge-off     { background: rgba(255,255,255,.06); color: rgba(255,255,255,.4); border-color: rgba(255,255,255,.1); }
.al-root.dark .ap-badge-warning { background: rgba(230,81,0,.22);   color: #ffb74d; }
.al-root.dark .ap-badge-info    { background: rgba(21,101,192,.22);  color: #90caf9; }
.al-root.dark .ap-badge-error   { background: rgba(198,40,40,.22);   color: #ef9a9a; }
.al-root.dark .ap-badge-purple  { background: rgba(106,27,154,.22);  color: #ce93d8; }

.al-root.dark .ap-role { background: rgba(62,120,164,.18); color: #8bbfe0; }

.al-root.dark .ap-action {
    border-color: rgba(255,255,255,.08);
    color: rgba(255,255,255,.35);
}
.al-root.dark .ap-action:hover          { background: rgba(255,255,255,.07); color: #c8dae6; border-color: rgba(255,255,255,.15); }
.al-root.dark .ap-action.ap-edit:hover  { background: rgba(62,120,164,.18);  color: #8bbfe0; border-color: rgba(62,120,164,.35); }
.al-root.dark .ap-action.ap-warn:hover  { background: rgba(230,81,0,.18);    color: #ffb74d; border-color: rgba(230,81,0,.35); }
.al-root.dark .ap-action.ap-ok:hover    { background: rgba(46,125,50,.18);   color: #81c784; border-color: rgba(46,125,50,.35); }
.al-root.dark .ap-action.ap-del:hover   { background: rgba(198,40,40,.18);   color: #ef9a9a; border-color: rgba(198,40,40,.35); }

.al-root.dark .dlg-title       { color: #e7eef4; }
.al-root.dark .dlg-title-icon  { background: rgba(62,120,164,.22); color: #8bbfe0; }
.al-root.dark .dlg-cancel-btn  { background: transparent; border-color: rgba(255,255,255,.14); color: rgba(255,255,255,.55); }
.al-root.dark .dlg-cancel-btn:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.25); color: rgba(255,255,255,.85); }
.al-root.dark .dlg-save-btn         { background: #3E78A4; }
.al-root.dark .dlg-save-btn:hover   { background: #5b96c0; }
.al-root.dark .dlg-danger-btn       { background: #c62828; }
.al-root.dark .dlg-danger-btn:hover { background: #d32f2f; }

/* ── Responsive global (admin pages) ────────────────────────────── */
@media (max-width: 640px) {
    .ap-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .ap-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .ap-stat-num { font-size: 1.5rem; }
    .ap-btn { width: 100%; justify-content: center; }
    .dlg-cancel-btn, .dlg-save-btn { padding: 0 14px; }
}

@media (max-width: 400px) {
    .ap-stats { grid-template-columns: 1fr; }
}
/* ════════════════════════════════════════════════════════════════════
   DARK MODE — per-page admin component classes (.al-root.dark)
   ═══════════════════════════════════════════════════════════════════ */

/* ── Forms (fm-) ─────────────────────────────────────────────────── */
.al-root.dark .fm-card { background: #152c3c; border-color: rgba(255,255,255,.08); }
.al-root.dark .fm-card-name { color: #e7eef4; }
.al-root.dark .fm-card-desc { color: rgba(255,255,255,.45); }
.al-root.dark .fm-card-icon { background: rgba(62,120,164,.22); }
.al-root.dark .fm-card-actions { border-top-color: rgba(255,255,255,.07); }

/* ── Flows (fl-) ─────────────────────────────────────────────────── */
.al-root.dark .fl-role-card { background: #152c3c; border-color: rgba(255,255,255,.08); }
.al-root.dark .fl-role-card:hover { border-color: rgba(255,255,255,.18); box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.al-root.dark .fl-role-card.fl-role-selected { background: rgba(62,120,164,.22); border-color: #3E78A4; }
.al-root.dark .fl-role-icon { background: rgba(62,120,164,.22); }
.al-root.dark .fl-role-name { color: #e7eef4; }
.al-root.dark .fl-role-count { color: rgba(255,255,255,.45); }
.al-root.dark .fl-flow-card { background: #152c3c; border-color: rgba(255,255,255,.08); box-shadow: none; }
.al-root.dark .fl-flow-header { border-bottom-color: rgba(255,255,255,.07); }
.al-root.dark .fl-flow-footer { border-top-color: rgba(255,255,255,.07); }
.al-root.dark .fl-flow-name { color: #e7eef4; }
.al-root.dark .fl-step-item { color: rgba(255,255,255,.72); border-bottom-color: rgba(255,255,255,.07); }
.al-root.dark .fl-section-title { color: #e7eef4; }
.al-root.dark .fl-section-panel { background: #152c3c; border-color: rgba(255,255,255,.08); }
.al-root.dark .fl-del-btn { border-color: rgba(255,255,255,.1); color: rgba(255,255,255,.4); }

/* ── FlowRuns (fr-) ──────────────────────────────────────────────── */
.al-root.dark .fr-alert-card { background: #152c3c; border-color: rgba(255,255,255,.08); }
.al-root.dark .fr-panel-title b { color: #e7eef4; }
.al-root.dark .fr-progress-pct { color: rgba(255,255,255,.45); }
.al-root.dark .fr-date-normal { color: rgba(255,255,255,.45); }
.al-root.dark .fr-step-btn { border-color: rgba(255,255,255,.1); color: rgba(255,255,255,.6); background: rgba(255,255,255,.04); }
.al-root.dark .fr-step-btn:hover { background: rgba(62,120,164,.2); color: #8bbfe0; border-color: rgba(62,120,164,.4); }

/* ── FlowEdit (fe-) ──────────────────────────────────────────────── */
.al-root.dark .fe-title { color: #e7eef4; }
.al-root.dark .fe-back-btn,
.al-root.dark .fe-settings-btn,
.al-root.dark .fe-add-btn { background: #1a3347; border-color: rgba(255,255,255,.14); color: rgba(255,255,255,.8); }
.al-root.dark .fe-back-btn:hover,
.al-root.dark .fe-settings-btn:hover,
.al-root.dark .fe-add-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.al-root.dark .fe-step-card { background: #152c3c; border-color: rgba(255,255,255,.08); }
.al-root.dark .fe-step-title { color: #e7eef4; }
.al-root.dark .fe-step-desc { color: rgba(255,255,255,.45); }
.al-root.dark .fe-step-ref { color: rgba(255,255,255,.35); }
.al-root.dark .fe-preview-row { border-bottom-color: rgba(255,255,255,.07); }
.al-root.dark .fe-preview-row span { color: rgba(255,255,255,.55); }
.al-root.dark .fe-icon-btn { border-color: rgba(255,255,255,.1); color: rgba(255,255,255,.4); }
.al-root.dark .fe-icon-btn:hover { background: rgba(255,255,255,.07); color: #c8dae6; }
.al-root.dark .fe-panel { background: #152c3c; border-color: rgba(255,255,255,.08); }
.al-root.dark .fe-panel-title { color: #e7eef4; }

/* ── ChecklistEdit (ce-) ─────────────────────────────────────────── */
.al-root.dark .ce-panel { background: #152c3c; border-color: rgba(255,255,255,.08); }
.al-root.dark .ce-panel-eyebrow { color: #5ab4e8; }
.al-root.dark .ce-back-btn,
.al-root.dark .ce-add-btn { background: #1a3347; border-color: rgba(255,255,255,.14); color: rgba(255,255,255,.8); }
.al-root.dark .ce-back-btn:hover,
.al-root.dark .ce-add-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.al-root.dark .ce-item-card { background: #1a3347; border-color: rgba(255,255,255,.07); }
.al-root.dark .ce-item-title { color: #e7eef4; }
.al-root.dark .ce-item-desc { color: rgba(255,255,255,.45); }
.al-root.dark .ce-item-num { color: #5ab4e8; }
.al-root.dark .ce-icon-btn { border-color: rgba(255,255,255,.1); color: rgba(255,255,255,.4); }
.al-root.dark .ce-icon-btn:hover { background: rgba(255,255,255,.07); }

/* ── MembershipPlans (mp-) ───────────────────────────────────────── */
.al-root.dark .mp-roles-card { background: #152c3c; border-color: rgba(255,255,255,.08); }
.al-root.dark .mp-role-card { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.1); }
.al-root.dark .mp-role-card:hover { border-color: rgba(255,255,255,.2); }
.al-root.dark .mp-role-card--selected { background: rgba(62,120,164,.22); border-color: #3E78A4; }
.al-root.dark .mp-role-name { color: #e7eef4; }
.al-root.dark .mp-role-count { color: rgba(255,255,255,.45); }
.al-root.dark .mp-plans-title { color: #e7eef4; }
.al-root.dark .mp-plan-card { background: #152c3c; border-color: rgba(255,255,255,.08); }
.al-root.dark .mp-plan-name { color: #e7eef4; }
.al-root.dark .mp-plan-desc { color: rgba(255,255,255,.45); }
.al-root.dark .mp-plan-features li { color: rgba(255,255,255,.65); }
.al-root.dark .mp-plan-price { color: #e7eef4; }
.al-root.dark .rv-section-title { color: rgba(255,255,255,.4); border-bottom-color: rgba(255,255,255,.08); }

/* ── Settings (st-) ──────────────────────────────────────────────── */
.al-root.dark .st-card { background: #152c3c; border-color: rgba(255,255,255,.08); }
.al-root.dark .st-section-title { color: #e7eef4; }
.al-root.dark .st-section-desc { color: rgba(255,255,255,.45); }
.al-root.dark .st-section-icon { background: rgba(62,120,164,.22); color: #8bbfe0; }
.al-root.dark .st-webhook-url { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.1); color: rgba(255,255,255,.75); }
.al-root.dark .st-webhook-caption { color: rgba(255,255,255,.38); }
.al-root.dark .st-link { color: #5ab4e8; }

/* ── MeetingRequests (mr-) ───────────────────────────────────────── */
.al-root.dark .mr-chip { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); color: rgba(255,255,255,.72); }
.al-root.dark .mr-chip:hover { background: rgba(255,255,255,.1); }
.al-root.dark .mr-chip.active { background: rgba(62,120,164,.28); border-color: #3E78A4; color: #5ab4e8; }
.al-root.dark .mr-card { background: #152c3c; border-color: rgba(255,255,255,.08); }
.al-root.dark .mr-party-name { color: #e7eef4; }
.al-root.dark .mr-party-email,
.al-root.dark .mr-party-company,
.al-root.dark .mr-party-label { color: rgba(255,255,255,.45); }
.al-root.dark .mr-message-text { color: rgba(255,255,255,.72); }
.al-root.dark .mr-message-label { color: rgba(255,255,255,.4); }
.al-root.dark .mr-date { color: rgba(255,255,255,.45); }
.al-root.dark .mr-footer { border-top-color: rgba(255,255,255,.07); }
.al-root.dark .mr-arrow { color: rgba(255,255,255,.3); }

/* ── RoleVisibility (rv-) ────────────────────────────────────────── */
.al-root.dark .rv-card { background: #152c3c; border-color: rgba(255,255,255,.08); }
.al-root.dark .rv-helper { color: rgba(255,255,255,.45); }
.al-root.dark .rv-matrix { border-color: rgba(255,255,255,.08); }
.al-root.dark .rv-th-label,
.al-root.dark .rv-th-col { background: #1a3347; border-color: rgba(255,255,255,.08); color: rgba(255,255,255,.55); }
.al-root.dark .rv-td-row,
.al-root.dark .rv-td-cell { border-color: rgba(255,255,255,.07); }
.al-root.dark .rv-axis-label { color: rgba(255,255,255,.55); }
.al-root.dark .rv-role-chip { background: rgba(62,120,164,.2); color: #8bbfe0; border-color: rgba(62,120,164,.35); }
.al-root.dark .rv-rule-row { border-bottom-color: rgba(255,255,255,.07); }
.al-root.dark .rv-del-btn { border-color: rgba(255,255,255,.1); color: rgba(255,255,255,.4); }

/* ── Roles page (rl-/rf-) — duplicate ml-layout.dark as al-root.dark ── */
.al-root.dark .rl-role-name { color: #c8dae6; }
.al-root.dark .rl-role-code { color: rgba(255,255,255,.42); }
.al-root.dark .roles-form-card { background: #152c3c; border-color: rgba(255,255,255,.08); }
.al-root.dark .rf-card-title { color: #e7eef4; }
.al-root.dark .rf-section { color: rgba(255,255,255,.42); }
.al-root.dark .rf-section::after { background: rgba(255,255,255,.08); }
.al-root.dark .rf-cap-row { border-color: rgba(255,255,255,.07); }
.al-root.dark .rf-cap-row:hover { background: rgba(255,255,255,.05); }
.al-root.dark .rf-btn-outline { background: transparent; border-color: rgba(255,255,255,.14); color: rgba(255,255,255,.55); }
.al-root.dark .rf-btn-outline:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.25); color: rgba(255,255,255,.85); }
.al-root.dark .ap-role.sys { background: rgba(62,120,164,.18); color: #8bbfe0; }

/* ── FormTemplateEdit ────────────────────────────────────────────── */
.al-root.dark .fte-panel,
.al-root.dark .field-card { background: #152c3c; border-color: rgba(255,255,255,.08); }
.al-root.dark .fte-title,
.al-root.dark .field-title { color: #e7eef4; }
.al-root.dark .fte-back-btn { background: #1a3347; border-color: rgba(255,255,255,.14); color: rgba(255,255,255,.8); }

/* ══════════════════════════════════════════════════════════
   AUTH PAGES DARK MODE  (Login · Register · ForgotPassword)
   ══════════════════════════════════════════════════════════ */

/* ── Login (lg-*) ── */
.ml-layout.dark .lg-form-panel               { background: #0e1c27; }
.ml-layout.dark .lg-card                     { background: #152c3c; border-color: rgba(255,255,255,.08); box-shadow: 0 8px 32px rgba(0,0,0,.4); }
.ml-layout.dark .lg-card-tag                 { color: #5ab4e8; border-left-color: #5ab4e8; }
.ml-layout.dark .lg-card-title               { color: #e7eef4; }
.ml-layout.dark .lg-card-sub                 { color: rgba(255,255,255,.55); }
.ml-layout.dark .lg-divider                  { border-color: rgba(255,255,255,.08) !important; }
.ml-layout.dark .lg-links a                  { color: #5ab4e8 !important; }
.ml-layout.dark .lg-links a:hover            { color: #7fcfff !important; }
.ml-layout.dark .lg-page .mud-input-control > label,
.ml-layout.dark .lg-page .mud-input-label    { color: rgba(255,255,255,.75) !important; }
.ml-layout.dark .lg-page .mud-input-outlined-border { border-color: rgba(255,255,255,.18) !important; }
.ml-layout.dark .lg-page .mud-input-slot     { background: #1a3347 !important; }
.ml-layout.dark .lg-page .mud-input-root:hover .mud-input-outlined-border,
.ml-layout.dark .lg-page .mud-input-root.mud-input-focused .mud-input-outlined-border { border-color: #5ab4e8 !important; }
.ml-layout.dark .lg-page .mud-input > input  { color: rgba(255,255,255,.88) !important; }

/* ── Register (rb-* right panel / rf-* form / role-*) ── */
.ml-layout.dark .rf-panel                    { background: #0e1c27; }
.ml-layout.dark .rf-card                     { background: #152c3c; border-color: rgba(255,255,255,.08); }
.ml-layout.dark .rf-tag                      { color: #5ab4e8; border-left-color: #5ab4e8; }
.ml-layout.dark .rf-title                    { color: #e7eef4; }
.ml-layout.dark .role-section-label          { color: rgba(255,255,255,.55); }
.ml-layout.dark .role-card                   { background: #1a3347; border-color: rgba(255,255,255,.10); }
.ml-layout.dark .role-card:hover             { border-color: #5ab4e8; background: #1e3d56; }
.ml-layout.dark .role-card.active            { background: rgba(90,180,232,.12); border-color: #5ab4e8; }
.ml-layout.dark .role-title                  { color: rgba(255,255,255,.88); }
.ml-layout.dark .role-desc                   { color: rgba(255,255,255,.50); }
.ml-layout.dark .rf-divider                  { border-color: rgba(255,255,255,.08) !important; }
.ml-layout.dark .rf-login-link               { color: rgba(255,255,255,.50); }
.ml-layout.dark .rf-login-link a             { color: #5ab4e8 !important; }
.ml-layout.dark .register-page .mud-input-control > label,
.ml-layout.dark .register-page .mud-input-label { color: rgba(255,255,255,.75) !important; }
.ml-layout.dark .register-page .mud-input-outlined-border { border-color: rgba(255,255,255,.18) !important; }
.ml-layout.dark .register-page .mud-input-slot { background: #1a3347 !important; }
.ml-layout.dark .register-page .mud-input-root:hover .mud-input-outlined-border,
.ml-layout.dark .register-page .mud-input-root.mud-input-focused .mud-input-outlined-border { border-color: #5ab4e8 !important; }
.ml-layout.dark .register-page .mud-input > input { color: rgba(255,255,255,.88) !important; }

/* ── ForgotPassword (fp-*) ── */
.ml-layout.dark .fp-form-panel               { background: #0e1c27; }
.ml-layout.dark .fp-card                     { background: #152c3c; border-color: rgba(255,255,255,.08); box-shadow: 0 8px 32px rgba(0,0,0,.4); }
.ml-layout.dark .fp-card-tag                 { color: #5ab4e8; border-left-color: #5ab4e8; }
.ml-layout.dark .fp-card-title               { color: #e7eef4; }
.ml-layout.dark .fp-card-sub                 { color: rgba(255,255,255,.55); }
.ml-layout.dark .fp-card-success-title       { color: #e7eef4; }
.ml-layout.dark .fp-card-success-sub         { color: rgba(255,255,255,.55); }
.ml-layout.dark .fp-page .mud-input-control > label,
.ml-layout.dark .fp-page .mud-input-label    { color: rgba(255,255,255,.75) !important; }
.ml-layout.dark .fp-page .mud-input-outlined-border { border-color: rgba(255,255,255,.18) !important; }
.ml-layout.dark .fp-page .mud-input-slot     { background: #1a3347 !important; }
.ml-layout.dark .fp-page .mud-input-root:hover .mud-input-outlined-border,
.ml-layout.dark .fp-page .mud-input-root.mud-input-focused .mud-input-outlined-border { border-color: #5ab4e8 !important; }
.ml-layout.dark .fp-page .mud-input > input  { color: rgba(255,255,255,.88) !important; }

/* ── MudBlazor Snackbar / Toast ─────────────────────────────────── */
.mud-snackbar-root {
    bottom: 24px !important;
    right: 24px !important;
    top: auto !important;
    left: auto !important;
    gap: 8px !important;
    z-index: 9999 !important;
}

@media (max-width: 600px) {
    .mud-snackbar-root {
        bottom: 14px !important;
        right: 12px !important;
        left: 12px !important;
        align-items: stretch !important;
    }
    .mud-snackbar {
        min-width: unset !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* Dark glass base — looks great on any background */
.mud-snackbar {
    border-radius: 16px !important;
    padding: 0 !important;
    min-width: 260px !important;
    max-width: 380px !important;
    font-family: 'Montserrat', sans-serif !important;
    background: rgba(14,24,34,.93) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    border: 1px solid rgba(255,255,255,.10) !important;
    box-shadow: 0 12px 36px rgba(0,0,0,.32), 0 2px 8px rgba(0,0,0,.18) !important;
    animation: snackbar-slide-in .26s cubic-bezier(.22,1,.36,1) both !important;
    overflow: hidden !important;
}

/* Inner MudAlert — transparent so our bg shows */
.mud-snackbar-root .mud-snackbar .mud-alert.mud-alert-filled,
.mud-snackbar-root .mud-snackbar .mud-alert.mud-alert-outlined,
.mud-snackbar-root .mud-snackbar .mud-alert {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 13px 12px 13px 16px !important;
    margin: 0 !important;
    align-items: center !important;
    gap: 10px !important;
    min-height: unset !important;
}

/* Colored top accent line per type */
.mud-snackbar-root .mud-snackbar.mud-theme-success { border-top: 3px solid #2e8b57 !important; }
.mud-snackbar-root .mud-snackbar.mud-theme-error   { border-top: 3px solid #c62828 !important; }
.mud-snackbar-root .mud-snackbar.mud-theme-warning { border-top: 3px solid #e07b18 !important; }
.mud-snackbar-root .mud-snackbar.mud-theme-info    { border-top: 3px solid #3E78A4 !important; }
.mud-snackbar-root .mud-snackbar.mud-theme-normal  { border-top: 3px solid #5ab4e8 !important; }

/* Colored icons per type */
.mud-snackbar-root .mud-snackbar.mud-theme-success .mud-alert-icon svg { color: #4ecb82 !important; fill: #4ecb82 !important; }
.mud-snackbar-root .mud-snackbar.mud-theme-error   .mud-alert-icon svg { color: #ef5350 !important; fill: #ef5350 !important; }
.mud-snackbar-root .mud-snackbar.mud-theme-warning .mud-alert-icon svg { color: #ffa040 !important; fill: #ffa040 !important; }
.mud-snackbar-root .mud-snackbar.mud-theme-info    .mud-alert-icon svg { color: #5ab4e8 !important; fill: #5ab4e8 !important; }
.mud-snackbar-root .mud-snackbar.mud-theme-normal  .mud-alert-icon svg { color: #90caf9 !important; fill: #90caf9 !important; }

/* Message text — always white on dark glass */
.mud-snackbar .mud-snackbar-message,
.mud-snackbar-root .mud-snackbar .mud-snackbar-message {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 600 !important;
    font-size: .83rem !important;
    line-height: 1.42 !important;
    color: rgba(255,255,255,.92) !important;
}

/* Close button — white on dark glass */
.mud-snackbar-root .mud-snackbar .mud-snackbar-close,
.mud-snackbar-root .mud-snackbar .mud-snackbar-close-button,
.mud-snackbar-root .mud-snackbar .mud-alert .mud-snackbar-close {
    color: rgba(255,255,255,.55) !important;
    opacity: 1 !important;
    min-width: 30px !important;
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
}
.mud-snackbar-root .mud-snackbar .mud-snackbar-close svg,
.mud-snackbar-root .mud-snackbar .mud-snackbar-close-button svg,
.mud-snackbar-root .mud-snackbar .mud-alert .mud-snackbar-close svg {
    color: rgba(255,255,255,.55) !important;
    fill: rgba(255,255,255,.55) !important;
    font-size: 18px !important;
    width: 18px !important;
    height: 18px !important;
}
.mud-snackbar-root .mud-snackbar .mud-snackbar-close:hover,
.mud-snackbar-root .mud-snackbar .mud-snackbar-close-button:hover {
    background: rgba(255,255,255,.12) !important;
    color: #fff !important;
}

/* Action button */
.mud-snackbar .mud-button-root {
    color: #5ab4e8 !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    border: 1px solid rgba(90,180,232,.35) !important;
    padding: 2px 12px !important;
    font-size: .78rem !important;
}
.mud-snackbar .mud-button-root:hover {
    background: rgba(90,180,232,.12) !important;
    border-color: #5ab4e8 !important;
}

/* ── Toast animation ── */
@keyframes snackbar-slide-in {
    from { opacity: 0; transform: translateY(12px) scale(.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1);   }
}

/* ── Admin snackbar — high-specificity overrides ── */
.al-root .mud-snackbar,
html.al-dark .mud-snackbar {
    border-radius: 16px !important;
    padding: 0 !important;
    min-width: 260px !important;
    max-width: 380px !important;
    font-family: 'Montserrat', sans-serif !important;
    background: rgba(14,24,34,.93) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    border: 1px solid rgba(255,255,255,.10) !important;
    box-shadow: 0 12px 36px rgba(0,0,0,.32), 0 2px 8px rgba(0,0,0,.18) !important;
    animation: snackbar-slide-in .26s cubic-bezier(.22,1,.36,1) both !important;
    overflow: hidden !important;
}
.al-root .mud-snackbar .mud-alert.mud-alert-filled,
.al-root .mud-snackbar .mud-alert.mud-alert-outlined,
.al-root .mud-snackbar .mud-alert {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 13px 12px 13px 16px !important;
    margin: 0 !important;
    align-items: center !important;
    gap: 10px !important;
    min-height: unset !important;
}
.al-root .mud-snackbar.mud-theme-success { border-top: 3px solid #2e8b57 !important; }
.al-root .mud-snackbar.mud-theme-error   { border-top: 3px solid #c62828 !important; }
.al-root .mud-snackbar.mud-theme-warning { border-top: 3px solid #e07b18 !important; }
.al-root .mud-snackbar.mud-theme-info    { border-top: 3px solid #3E78A4 !important; }
.al-root .mud-snackbar.mud-theme-normal  { border-top: 3px solid #5ab4e8 !important; }
.al-root .mud-snackbar.mud-theme-success .mud-alert-icon svg { color: #4ecb82 !important; fill: #4ecb82 !important; }
.al-root .mud-snackbar.mud-theme-error   .mud-alert-icon svg { color: #ef5350 !important; fill: #ef5350 !important; }
.al-root .mud-snackbar.mud-theme-warning .mud-alert-icon svg { color: #ffa040 !important; fill: #ffa040 !important; }
.al-root .mud-snackbar.mud-theme-info    .mud-alert-icon svg { color: #5ab4e8 !important; fill: #5ab4e8 !important; }
.al-root .mud-snackbar.mud-theme-normal  .mud-alert-icon svg { color: #90caf9 !important; fill: #90caf9 !important; }
.al-root .mud-snackbar .mud-snackbar-message {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 600 !important;
    font-size: .83rem !important;
    line-height: 1.42 !important;
    color: rgba(255,255,255,.92) !important;
}
.al-root .mud-snackbar .mud-snackbar-close,
.al-root .mud-snackbar .mud-snackbar-close-button,
.al-root .mud-snackbar .mud-alert .mud-snackbar-close {
    color: rgba(255,255,255,.55) !important;
    opacity: 1 !important;
    min-width: 30px !important;
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
}
.al-root .mud-snackbar .mud-snackbar-close svg,
.al-root .mud-snackbar .mud-snackbar-close-button svg {
    color: rgba(255,255,255,.55) !important;
    fill: rgba(255,255,255,.55) !important;
    font-size: 18px !important;
    width: 18px !important;
    height: 18px !important;
}
.al-root .mud-snackbar .mud-snackbar-close:hover,
.al-root .mud-snackbar .mud-snackbar-close-button:hover { background: rgba(255,255,255,.12) !important; }
.al-root .mud-snackbar .mud-button-root {
    color: #5ab4e8 !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    border: 1px solid rgba(90,180,232,.35) !important;
    padding: 2px 12px !important;
    font-size: .78rem !important;
}
.al-root .mud-snackbar .mud-button-root:hover { background: rgba(90,180,232,.12) !important; }

/* ── User layout snackbar — same dark glass, high specificity ── */
.ml-layout .mud-snackbar,
html.ml-dark .mud-snackbar {
    border-radius: 16px !important;
    padding: 0 !important;
    min-width: 260px !important;
    max-width: 380px !important;
    font-family: 'Montserrat', sans-serif !important;
    background: rgba(14,24,34,.93) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    border: 1px solid rgba(255,255,255,.10) !important;
    box-shadow: 0 12px 36px rgba(0,0,0,.32), 0 2px 8px rgba(0,0,0,.18) !important;
    animation: snackbar-slide-in .26s cubic-bezier(.22,1,.36,1) both !important;
    overflow: hidden !important;
}
.ml-layout .mud-snackbar .mud-alert.mud-alert-filled,
.ml-layout .mud-snackbar .mud-alert.mud-alert-outlined,
.ml-layout .mud-snackbar .mud-alert {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 13px 12px 13px 16px !important;
    margin: 0 !important;
    align-items: center !important;
    gap: 10px !important;
    min-height: unset !important;
}
.ml-layout .mud-snackbar.mud-theme-success { border-top: 3px solid #2e8b57 !important; }
.ml-layout .mud-snackbar.mud-theme-error   { border-top: 3px solid #c62828 !important; }
.ml-layout .mud-snackbar.mud-theme-warning { border-top: 3px solid #e07b18 !important; }
.ml-layout .mud-snackbar.mud-theme-info    { border-top: 3px solid #3E78A4 !important; }
.ml-layout .mud-snackbar.mud-theme-normal  { border-top: 3px solid #5ab4e8 !important; }
.ml-layout .mud-snackbar.mud-theme-success .mud-alert-icon svg { color: #4ecb82 !important; fill: #4ecb82 !important; }
.ml-layout .mud-snackbar.mud-theme-error   .mud-alert-icon svg { color: #ef5350 !important; fill: #ef5350 !important; }
.ml-layout .mud-snackbar.mud-theme-warning .mud-alert-icon svg { color: #ffa040 !important; fill: #ffa040 !important; }
.ml-layout .mud-snackbar.mud-theme-info    .mud-alert-icon svg { color: #5ab4e8 !important; fill: #5ab4e8 !important; }
.ml-layout .mud-snackbar.mud-theme-normal  .mud-alert-icon svg { color: #90caf9 !important; fill: #90caf9 !important; }
.ml-layout .mud-snackbar .mud-snackbar-message {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 600 !important;
    font-size: .83rem !important;
    line-height: 1.42 !important;
    color: rgba(255,255,255,.92) !important;
}
.ml-layout .mud-snackbar .mud-snackbar-close,
.ml-layout .mud-snackbar .mud-snackbar-close-button,
.ml-layout .mud-snackbar .mud-alert .mud-snackbar-close {
    color: rgba(255,255,255,.55) !important;
    opacity: 1 !important;
    min-width: 30px !important;
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
}
.ml-layout .mud-snackbar .mud-snackbar-close svg,
.ml-layout .mud-snackbar .mud-snackbar-close-button svg {
    color: rgba(255,255,255,.55) !important;
    fill: rgba(255,255,255,.55) !important;
    font-size: 18px !important;
    width: 18px !important;
    height: 18px !important;
}
.ml-layout .mud-snackbar .mud-snackbar-close:hover,
.ml-layout .mud-snackbar .mud-snackbar-close-button:hover { background: rgba(255,255,255,.12) !important; }
.ml-layout .mud-snackbar .mud-button-root {
    color: #5ab4e8 !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    border: 1px solid rgba(90,180,232,.35) !important;
    padding: 2px 12px !important;
    font-size: .78rem !important;
}
.ml-layout .mud-snackbar .mud-button-root:hover { background: rgba(90,180,232,.12) !important; }

/* ── Skeleton shimmer ────────────────────────────────────────────── */
@keyframes sk-shimmer {
    0%   { background-position: -600px 0; }
    100% { background-position:  600px 0; }
}
.sk-line, .sk-rect, .sk-circle {
    background: linear-gradient(90deg, #e6edf3 25%, #f5f7f9 50%, #e6edf3 75%);
    background-size: 1200px 100%;
    animation: sk-shimmer 1.5s infinite linear;
    border-radius: 6px;
}
.sk-circle { border-radius: 50%; }
.sk-line   { height: 14px; margin-bottom: 10px; }
.sk-line.sm  { height: 10px; width: 60%; }
.sk-line.lg  { height: 20px; }
.sk-rect   { border-radius: 12px; }

:is(.al-root.dark, html.al-dark) .sk-line,
:is(.al-root.dark, html.al-dark) .sk-rect,
:is(.al-root.dark, html.al-dark) .sk-circle,
:is(.ml-layout.dark, html.ml-dark) .sk-line,
:is(.ml-layout.dark, html.ml-dark) .sk-rect,
:is(.ml-layout.dark, html.ml-dark) .sk-circle {
    background: linear-gradient(90deg, #1a3347 25%, #1f3d54 50%, #1a3347 75%);
    background-size: 1200px 100%;
}

/* ── Empty states ────────────────────────────────────────────────── */
.ap-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 48px 24px;
    color: #7C8488;
    text-align: center;
    animation: ap-fade-in .4s ease both;
}
.ap-empty-icon {
    width: 56px; height: 56px;
    border-radius: 16px;
    background: #f0f4f7;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
    color: #b0bec5;
    margin-bottom: 4px;
}
.ap-empty-title {
    font-size: .9rem;
    font-weight: 700;
    color: #4a6070;
}
.ap-empty-sub {
    font-size: .78rem;
    color: #9eadb8;
    max-width: 280px;
}
:is(.al-root.dark, html.al-dark) .ap-empty-icon,
:is(.ml-layout.dark, html.ml-dark) .ap-empty-icon { background: rgba(255,255,255,.06); color: rgba(255,255,255,.3); }
:is(.al-root.dark, html.al-dark) .ap-empty-title,
:is(.ml-layout.dark, html.ml-dark) .ap-empty-title { color: rgba(255,255,255,.55); }
:is(.al-root.dark, html.al-dark) .ap-empty-sub,
:is(.ml-layout.dark, html.ml-dark) .ap-empty-sub   { color: rgba(255,255,255,.32); }

/* ── Progress bar entrance animation ────────────────────────────── */
@keyframes fr-progress-grow {
    from { width: 0 !important; }
}
.fr-progress-fill {
    animation: fr-progress-grow .55s cubic-bezier(.22,1,.36,1) both;
    animation-delay: .1s;
}

/* ── MudDatePicker calendar popup ────────────────────────────────── */
/* Container / popover */
.mud-picker-container {
    font-family: 'Montserrat', sans-serif !important;
    border-radius: 18px !important;
    box-shadow: 0 8px 32px rgba(37,67,88,.18) !important;
    border: 1px solid #e6edf3 !important;
    overflow: hidden;
}
/* Toolbar — selected date display banner */
.mud-picker-toolbar {
    background: #254358 !important;
    font-family: 'Montserrat', sans-serif !important;
    border-radius: 0 !important;
}
.mud-picker-toolbar-text,
.mud-picker-toolbar .mud-button-root {
    font-family: 'Montserrat', sans-serif !important;
    color: rgba(255,255,255,.9) !important;
}
.mud-picker-toolbar-text.mud-picker-toolbar-text-selected {
    color: #fff !important;
    font-weight: 700 !important;
}
/* Month/year header row */
.mud-picker-calendar-header,
.mud-picker-calendar-header-transition {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 700 !important;
    color: #254358 !important;
}
.mud-picker-calendar-header-switch .mud-button-root {
    color: #254358 !important;
}
.mud-picker-calendar-header-switch .mud-button-root:hover {
    background: rgba(62,120,164,.1) !important;
    color: #3E78A4 !important;
}
/* Day-of-week labels */
.mud-day-of-week span {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 700 !important;
    font-size: .72rem !important;
    color: #7C8488 !important;
}
/* Individual day buttons */
.mud-day .mud-button-root {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 600 !important;
    color: #254358 !important;
    border-radius: 50% !important;
    transition: background .15s, color .15s !important;
}
.mud-day .mud-button-root:hover {
    background: rgba(62,120,164,.12) !important;
    color: #3E78A4 !important;
}
/* Today's date */
.mud-current .mud-button-root {
    border: 1.5px solid #3E78A4 !important;
    color: #3E78A4 !important;
    font-weight: 700 !important;
}
/* Selected date */
.mud-selected .mud-button-root {
    background: #3E78A4 !important;
    color: #fff !important;
    font-weight: 700 !important;
}
.mud-selected .mud-button-root:hover {
    background: #254358 !important;
    color: #fff !important;
}
/* Outside-month days */
.mud-day.mud-day-outside .mud-button-root {
    color: #b0bec5 !important;
}
/* Action buttons (OK / Cancel inside picker) */
.mud-picker-actions .mud-button-root {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 700 !important;
    color: #3E78A4 !important;
    text-transform: uppercase !important;
    font-size: .74rem !important;
    letter-spacing: .04em !important;
}
/* Year/month picker items */
.mud-picker-year-btn,
.mud-month-btn {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 600 !important;
    color: #254358 !important;
    border-radius: 999px !important;
}
.mud-picker-year-selected,
.mud-month-selected {
    background: #3E78A4 !important;
    color: #fff !important;
}
/* ── Dark mode ── */
:is(.al-root.dark, html.al-dark) .mud-picker-container,
:is(.ml-layout.dark, html.ml-dark) .mud-picker-container {
    background: #162636 !important;
    border-color: rgba(255,255,255,.1) !important;
    box-shadow: 0 8px 32px rgba(0,0,0,.45) !important;
}
:is(.al-root.dark, html.al-dark) .mud-picker-toolbar,
:is(.ml-layout.dark, html.ml-dark) .mud-picker-toolbar {
    background: #0e1e2e !important;
}
:is(.al-root.dark, html.al-dark) .mud-picker-calendar-header,
:is(.al-root.dark, html.al-dark) .mud-picker-calendar-header-transition,
:is(.ml-layout.dark, html.ml-dark) .mud-picker-calendar-header,
:is(.ml-layout.dark, html.ml-dark) .mud-picker-calendar-header-transition {
    color: rgba(255,255,255,.85) !important;
}
:is(.al-root.dark, html.al-dark) .mud-picker-calendar-header-switch .mud-button-root,
:is(.ml-layout.dark, html.ml-dark) .mud-picker-calendar-header-switch .mud-button-root {
    color: rgba(255,255,255,.7) !important;
}
:is(.al-root.dark, html.al-dark) .mud-day-of-week span,
:is(.ml-layout.dark, html.ml-dark) .mud-day-of-week span { color: rgba(255,255,255,.35) !important; }
:is(.al-root.dark, html.al-dark) .mud-day .mud-button-root,
:is(.ml-layout.dark, html.ml-dark) .mud-day .mud-button-root { color: rgba(255,255,255,.75) !important; }
:is(.al-root.dark, html.al-dark) .mud-day .mud-button-root:hover,
:is(.ml-layout.dark, html.ml-dark) .mud-day .mud-button-root:hover {
    background: rgba(90,180,232,.15) !important;
    color: #5ab4e8 !important;
}
:is(.al-root.dark, html.al-dark) .mud-current .mud-button-root,
:is(.ml-layout.dark, html.ml-dark) .mud-current .mud-button-root {
    border-color: #5ab4e8 !important;
    color: #5ab4e8 !important;
}
:is(.al-root.dark, html.al-dark) .mud-selected .mud-button-root,
:is(.ml-layout.dark, html.ml-dark) .mud-selected .mud-button-root {
    background: #3E78A4 !important;
    color: #fff !important;
}
:is(.al-root.dark, html.al-dark) .mud-day.mud-day-outside .mud-button-root,
:is(.ml-layout.dark, html.ml-dark) .mud-day.mud-day-outside .mud-button-root {
    color: rgba(255,255,255,.2) !important;
}
:is(.al-root.dark, html.al-dark) .mud-picker-actions .mud-button-root,
:is(.ml-layout.dark, html.ml-dark) .mud-picker-actions .mud-button-root { color: #5ab4e8 !important; }
:is(.al-root.dark, html.al-dark) .mud-picker-year-btn,
:is(.al-root.dark, html.al-dark) .mud-month-btn,
:is(.ml-layout.dark, html.ml-dark) .mud-picker-year-btn,
:is(.ml-layout.dark, html.ml-dark) .mud-month-btn { color: rgba(255,255,255,.75) !important; }

/* ═══════════════════════════════════════════════════════════════════
   MudBlazor — override paleta primary (morado → steel blue #3E78A4)
   Afecta: CheckBox, Switch, Radio, ProgressCircular, Tabs, focus ring
   ═══════════════════════════════════════════════════════════════════ */
:root {
    --mud-palette-primary:              #3E78A4;
    --mud-palette-primary-rgb:          62, 120, 164;
    --mud-palette-primary-text:         #ffffff;
    --mud-palette-primary-darken:       #254358;
    --mud-palette-primary-lighten:      #5ab4e8;
    --mud-palette-primary-hover:        rgba(62,120,164,.06);
    --mud-palette-primary-hover-opacity: 0.06;
    --mud-palette-primary-contrasttext: #ffffff;
}

/* ── MudAlert ─────────────────────────────────────────────────────── */
.mud-alert {
    font-family: 'Montserrat', sans-serif !important;
    border-radius: 12px !important;
    font-size: .82rem !important;
    font-weight: 500 !important;
}
/* Text variant (default) */
.mud-alert-text-info    { background: rgba(62,120,164,.08)  !important; color: #1c4f72 !important; border-left: 3px solid #3E78A4 !important; }
.mud-alert-text-success { background: rgba(46,139,87,.08)   !important; color: #1b5e20 !important; border-left: 3px solid #2e8b57 !important; }
.mud-alert-text-warning { background: rgba(224,123,24,.09)  !important; color: #7a3800 !important; border-left: 3px solid #e07b18 !important; }
.mud-alert-text-error   { background: rgba(198,40,40,.08)   !important; color: #7f1010 !important; border-left: 3px solid #c62828 !important; }
.mud-alert-text-normal  { background: #f0f4f8               !important; color: #354a59 !important; border-left: 3px solid #7C8488 !important; }
/* Filled variant */
.mud-alert-filled-info    { background: #3E78A4 !important; color: #fff !important; }
.mud-alert-filled-success { background: #2e8b57 !important; color: #fff !important; }
.mud-alert-filled-warning { background: #e07b18 !important; color: #fff !important; }
.mud-alert-filled-error   { background: #c62828 !important; color: #fff !important; }
.mud-alert-filled-normal  { background: #7C8488 !important; color: #fff !important; }
/* Outlined variant */
.mud-alert-outlined-info    { border-color: #3E78A4 !important; color: #254358 !important; }
.mud-alert-outlined-success { border-color: #2e8b57 !important; color: #1b5e20 !important; }
.mud-alert-outlined-warning { border-color: #e07b18 !important; color: #7a3800 !important; }
.mud-alert-outlined-error   { border-color: #c62828 !important; color: #7f1010 !important; }
.mud-alert-outlined-normal  { border-color: #7C8488 !important; color: #354a59 !important; }
/* Icon color match */
.mud-alert-text-info    .mud-alert-icon { color: #3E78A4 !important; }
.mud-alert-text-success .mud-alert-icon { color: #2e8b57 !important; }
.mud-alert-text-warning .mud-alert-icon { color: #e07b18 !important; }
.mud-alert-text-error   .mud-alert-icon { color: #c62828 !important; }
.mud-alert-text-normal  .mud-alert-icon { color: #7C8488 !important; }
/* Dark mode */
:is(.al-root.dark, html.al-dark, .ml-layout.dark, html.ml-dark) .mud-alert-text-info    { background: rgba(62,120,164,.14)  !important; color: #8bbfe0 !important; }
:is(.al-root.dark, html.al-dark, .ml-layout.dark, html.ml-dark) .mud-alert-text-success { background: rgba(46,139,87,.12)   !important; color: #81c784 !important; }
:is(.al-root.dark, html.al-dark, .ml-layout.dark, html.ml-dark) .mud-alert-text-warning { background: rgba(224,123,24,.12)  !important; color: #ffb74d !important; }
:is(.al-root.dark, html.al-dark, .ml-layout.dark, html.ml-dark) .mud-alert-text-error   { background: rgba(198,40,40,.14)   !important; color: #ef9a9a !important; }
:is(.al-root.dark, html.al-dark, .ml-layout.dark, html.ml-dark) .mud-alert-text-normal  { background: rgba(255,255,255,.05) !important; color: rgba(255,255,255,.65) !important; }

/* ── MudChip ──────────────────────────────────────────────────────── */
.mud-chip {
    font-family: 'Montserrat', sans-serif !important;
    font-size: .75rem !important;
    font-weight: 600 !important;
    border-radius: 999px !important;
}
.mud-chip.mud-chip-color-default  { background: #eef4f9 !important; color: #254358 !important; }
.mud-chip.mud-chip-color-primary  { background: #3E78A4 !important; color: #fff !important; }
.mud-chip.mud-chip-color-secondary{ background: #5ab4e8 !important; color: #fff !important; }
.mud-chip.mud-chip-color-success  { background: rgba(46,139,87,.1)  !important; color: #1b5e20 !important; }
.mud-chip.mud-chip-color-warning  { background: rgba(224,123,24,.1) !important; color: #7a3800 !important; }
.mud-chip.mud-chip-color-error    { background: rgba(198,40,40,.08) !important; color: #7f1010 !important; }
.mud-chip.mud-chip-color-info     { background: rgba(62,120,164,.1) !important; color: #254358 !important; }
.mud-chip.mud-chip-color-dark     { background: #254358 !important; color: #fff !important; }
.mud-chip-delete-button           { color: inherit !important; opacity: .65; }
:is(.al-root.dark, html.al-dark, .ml-layout.dark, html.ml-dark) .mud-chip.mud-chip-color-default { background: rgba(255,255,255,.08) !important; color: rgba(255,255,255,.75) !important; }

/* ── MudTabs ──────────────────────────────────────────────────────── */
.mud-tabs .mud-tab {
    font-family: 'Montserrat', sans-serif !important;
    font-size: .8rem !important;
    font-weight: 600 !important;
    color: #7C8488 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}
.mud-tabs .mud-tab.mud-tab-active {
    color: #3E78A4 !important;
    font-weight: 700 !important;
}
.mud-tabs .mud-tab-slider {
    background: #3E78A4 !important;
    height: 2.5px !important;
    border-radius: 2px 2px 0 0 !important;
}
.mud-tabs-header { border-bottom: 1px solid #e6edf3 !important; }
:is(.al-root.dark, html.al-dark, .ml-layout.dark, html.ml-dark) .mud-tabs .mud-tab         { color: rgba(255,255,255,.4) !important; }
:is(.al-root.dark, html.al-dark, .ml-layout.dark, html.ml-dark) .mud-tabs .mud-tab.mud-tab-active { color: #5ab4e8 !important; }
:is(.al-root.dark, html.al-dark, .ml-layout.dark, html.ml-dark) .mud-tabs .mud-tab-slider  { background: #5ab4e8 !important; }
:is(.al-root.dark, html.al-dark, .ml-layout.dark, html.ml-dark) .mud-tabs-header           { border-bottom-color: rgba(255,255,255,.1) !important; }

/* ── MudSelect / MudAutocomplete — dropdown list ─────────────────── */
.mud-list {
    font-family: 'Montserrat', sans-serif !important;
    padding: 4px !important;
}
.mud-list-item {
    font-family: 'Montserrat', sans-serif !important;
    font-size: .84rem !important;
    font-weight: 500 !important;
    border-radius: 8px !important;
    color: #254358 !important;
}
.mud-list-item:hover,
.mud-list-item-clickable:hover { background: rgba(62,120,164,.07) !important; }
.mud-selected-item,
.mud-list-item.mud-selected     { background: rgba(62,120,164,.12) !important; color: #3E78A4 !important; font-weight: 700 !important; }
.mud-popover-paper {
    border-radius: 14px !important;
    box-shadow: 0 6px 24px rgba(37,67,88,.14) !important;
    border: 1px solid #e6edf3 !important;
}
:is(.al-root.dark, html.al-dark, .ml-layout.dark, html.ml-dark) .mud-list-item               { color: rgba(255,255,255,.75) !important; }
:is(.al-root.dark, html.al-dark, .ml-layout.dark, html.ml-dark) .mud-list-item:hover         { background: rgba(90,180,232,.1) !important; }
:is(.al-root.dark, html.al-dark, .ml-layout.dark, html.ml-dark) .mud-selected-item           { background: rgba(62,120,164,.22) !important; color: #5ab4e8 !important; }
:is(.al-root.dark, html.al-dark, .ml-layout.dark, html.ml-dark) .mud-popover-paper           { background: #162636 !important; border-color: rgba(255,255,255,.1) !important; box-shadow: 0 8px 28px rgba(0,0,0,.4) !important; }

/* ── MudAvatar ────────────────────────────────────────────────────── */
.mud-avatar {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 700 !important;
}
.mud-avatar.mud-avatar-color-default  { background: #dde9f3 !important; color: #254358 !important; }
.mud-avatar.mud-avatar-color-primary  { background: #3E78A4 !important; color: #fff !important; }
.mud-avatar.mud-avatar-color-secondary{ background: #5ab4e8 !important; color: #fff !important; }
.mud-avatar.mud-avatar-color-success  { background: #2e8b57 !important; color: #fff !important; }
.mud-avatar.mud-avatar-color-warning  { background: #e07b18 !important; color: #fff !important; }
.mud-avatar.mud-avatar-color-error    { background: #c62828 !important; color: #fff !important; }
.mud-avatar.mud-avatar-color-dark     { background: #254358 !important; color: #fff !important; }
:is(.al-root.dark, html.al-dark, .ml-layout.dark, html.ml-dark) .mud-avatar.mud-avatar-color-default { background: rgba(255,255,255,.1) !important; color: rgba(255,255,255,.8) !important; }
/* CosLink Ads carousel */
.ml-ad{position:relative;overflow:hidden;border-radius:18px;background:#172536;color:#fff;box-shadow:0 10px 30px rgba(20,36,52,.16);font-family:'Montserrat',sans-serif}
.ml-ad.hero{margin:18px auto 22px;max-width:1200px;aspect-ratio:3/1}
.ml-ad.inline{width:100%;min-height:360px;margin:0;aspect-ratio:auto;border-radius:18px;background:#fff;color:#254358;border:1px solid #e6edf3;box-shadow:none}
.ml-ad picture,.ml-ad img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center}
.ml-ad-overlay{position:absolute;inset:0;background:linear-gradient(to top,rgba(12,24,38,.22) 0%,transparent 28%)}
.ml-ad-hitbox{position:absolute;inset:0;z-index:2;width:100%;height:100%;padding:0;border:0;background:transparent;cursor:pointer}
.ml-ad-hitbox:focus-visible{outline:3px solid rgba(255,255,255,.85);outline-offset:-5px;border-radius:18px}
.ml-ad-sponsored{position:absolute;z-index:3;top:14px;left:16px;padding:3px 10px;border-radius:99px;background:rgba(0,0,0,.38);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);font-size:.62rem;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:rgba(255,255,255,.82)}
.ml-ad.inline picture,.ml-ad.inline img{height:200px;bottom:auto}
.ml-ad.inline .ml-ad-overlay{height:200px;bottom:auto;background:linear-gradient(to top,rgba(12,24,38,.46) 0%,rgba(12,24,38,.04) 58%,transparent 100%)}
.ml-ad-native-body{position:absolute;z-index:3;left:16px;right:16px;top:216px}
.ml-ad-native-title{font-size:.94rem;font-weight:800;line-height:1.25;color:#254358;margin-bottom:6px}
.ml-ad-native-desc{font-size:.8rem;font-weight:500;line-height:1.4;color:#7C8488;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ml-ad-cta{position:absolute;z-index:3;bottom:18px;right:20px}
.ml-ad-cta button{border:0;border-radius:999px;padding:10px 26px;background:rgba(255,255,255,.88);color:#254358;font-weight:800;cursor:pointer;font-size:.84rem;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);font-family:'Montserrat',sans-serif;transition:background .15s}
.ml-ad-cta button:hover{background:#fff}
.ml-ad.inline .ml-ad-cta{left:16px;right:16px;bottom:16px}
.ml-ad.inline .ml-ad-cta button{width:100%;background:#f0f4f8;border:1px solid #d4e0e9;color:#3E78A4;backdrop-filter:none;-webkit-backdrop-filter:none}
.ml-ad.inline .ml-ad-cta button:hover{background:#3E78A4;color:#fff;border-color:#3E78A4}
.ml-ad-nav{position:absolute;z-index:3;top:50%;transform:translateY(-50%);width:34px;height:34px;border:0;border-radius:50%;background:rgba(255,255,255,.82);color:#254358;font-size:1.5rem;cursor:pointer}
.ml-ad-nav.prev{left:10px}
.ml-ad-nav.next{right:10px}
.ml-ad-dots{position:absolute;z-index:3;left:50%;bottom:12px;transform:translateX(-50%);display:flex;gap:6px}
.ml-ad-dots button{width:7px;height:7px;padding:0;border:0;border-radius:50%;background:rgba(255,255,255,.5)}
.ml-ad-dots button.active{width:20px;border-radius:8px;background:#fff}
@media(max-width:640px){.ml-ad.hero{aspect-ratio:16/9;border-radius:12px}.ml-ad.inline{min-height:348px}.ml-ad-cta{bottom:12px;right:14px}.ml-ad-cta button{padding:8px 18px;font-size:.78rem}.ml-ad-sponsored{top:10px;left:12px}.ml-ad.inline .ml-ad-cta{left:14px;right:14px}.ml-ad-native-body{left:14px;right:14px}}
