/* Pixel-preserving light/dark artwork. No CSS color filters on either logo. */
.myafs-glass-logo {
    display: inline-flex; align-items: center; justify-content: center;
    width: 184px; max-width: 100%; padding: 12px;
    border: 1px solid rgba(43, 164, 203, .25);
    border-radius: 15px; background: rgba(229, 240, 249, .68);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    box-shadow: 0 4px 18px rgba(0, 137, 178, .035), inset 0 1px 0 rgba(255, 255, 255, .3);
}
html[data-bs-theme=dark] .myafs-glass-logo {
    background: rgba(17, 36, 57, .64);
    border-color: rgba(54, 182, 221, .28);
    box-shadow: 0 0 20px rgba(0, 196, 232, .055), inset 0 1px 0 rgba(147, 215, 239, .045);
}
html body :is(.sidebar-header,.mobile-topbar) img.myafs-theme-logo {
    background: transparent !important; filter: none !important;
    mix-blend-mode: normal; border-radius: 0 !important;
    object-fit: contain !important; width: 156px !important; height: auto !important;
    max-height: 90px !important; max-width: 100% !important;
}
img.myafs-theme-logo--dark { display: none !important; }
.auth-card .myafs-glass-logo.auth-theme-brand { width:200px; max-width:100%; margin-inline:auto; }
html body .auth-theme-brand img.myafs-theme-logo {
    width:100%!important; height:auto!important; max-width:100%!important;
    max-height:none!important; padding:0!important; border-radius:0!important;
    object-fit:contain!important; background:transparent!important; filter:none!important;
    mix-blend-mode:normal;
}
.register-nav .register-wordmark.auth-theme-brand { width:184px; flex-shrink:0; }
@media(max-width:575.98px) {
    .register-nav .register-wordmark.auth-theme-brand { width:132px; padding:8px; }
}
html[data-bs-theme=dark] img.myafs-theme-logo--light { display: none !important; }
html[data-bs-theme=dark] img.myafs-theme-logo--dark { display: block !important; }
.afs-theme-row .afs-theme-toggle {
    width: 42px; min-width: 42px; min-height: 42px; padding: 8px;
}
.afs-theme-toggle span { display: none !important; }
.app-language-flags img { display: block; width: 27px; height: 18px; object-fit: contain; }
.sidebar-dismiss { color: var(--afs-text, #17243b) !important; }
/* Ice white, not a pure-white canvas. Components keep the existing theme tokens. */
html[data-bs-theme=light] {
    --afs-bg: #edf3f8; --afs-surface: #f5f8fc; --afs-surface-2: #e9f0f7;
    --afs-surface-muted: #e9f0f7; --afs-bg-gradient: linear-gradient(#edf3f8,#e8f0f7);
    --afs-text: #172b43; --afs-text-muted: #5e7289; --afs-border: #d0deeb;
    --bs-body-bg: #edf3f8; --bs-body-color: #172b43; --bs-border-color: #d0deeb;
}
html[data-bs-theme=light] :is(body,.app-container,.main-content) { background: #edf3f8 !important; }
html[data-bs-theme=light] :is(.afs-card,.afs-stat,.glass-card,.modal-content,.dropdown-menu) {
    background-color: #f5f8fc !important; border-color: #d0deeb !important;
}
html[data-bs-theme=light] :is(.sidebar,.mobile-topbar) { background: #e8f0f7 !important; }
html[data-bs-theme=light] :is(.form-control,.form-select) { background-color: #f1f6fb !important; }
html[data-bs-theme=light] .table { --bs-table-bg: #f5f8fc; --bs-table-striped-bg: #eaf1f8; }
/* Covers Instructions as well as Support/review dialogs; do not submit any form. */
html[data-bs-theme=dark] .modal .modal-footer button[data-bs-dismiss=modal] {
    background: #263a54 !important; color: #e7eef9 !important;
    border: 1px solid #8095ae !important; border-radius: 10px;
    min-height: 44px; padding: 9px 16px;
}
html[data-bs-theme=dark] .modal .modal-footer button[data-bs-dismiss=modal]:hover {
    background: #324c6c !important; border-color: #b5d6f5 !important;
}
html[data-bs-theme=dark] .modal .btn-close {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3 3 10 10M13 3 3 13' stroke='%23e7eef9' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    filter: none !important; opacity: 1;
}
.modal button[data-bs-dismiss=modal]:focus-visible { outline: 3px solid #61c4f0; outline-offset: 3px; }
@media (max-width: 767.98px) {
    .myafs-glass-logo--mobile { width: 106px; padding: 5px 8px; border-radius: 10px; }
    body .mobile-topbar .myafs-glass-logo--mobile img.myafs-theme-logo {
        width: 90px !important; max-height: 50px !important;
    }
}
@media (max-width: 359.98px) {
    .myafs-glass-logo--mobile { width: 86px; padding: 5px 7px; }
    body .mobile-topbar .myafs-glass-logo--mobile img.myafs-theme-logo { width: 70px !important; }
}
