/* BestSellers Authenticator PWA Stylesheet (Safer Naija Auth) */
:root, [data-theme="light"] {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-elevated: #f1f5f9;
    --border: #e2e8f0;
    --text: #0f172a;
    --muted: #64748b;
    --primary: #16a34a;
    --primary-hover: #15803d;
    --primary-soft: rgba(22, 163, 74, 0.12);
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.12);
    --warning: #d97706;
    --warning-soft: rgba(217, 119, 6, 0.12);
    --radius: 16px;
    --card-bg: #ffffff;
    --card-border: rgba(0, 0, 0, 0.08);
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --input-bg: #ffffff;
    --input-border: #cbd5e1;
    --subcard-bg: #f8fafc;
    --subcard-border: #e2e8f0;
    --splash-bg: #f8fafc;
    --splash-title: #0f172a;
    --splash-loader-track: rgba(0, 0, 0, 0.10);
    --topbar-logo-bg: rgba(0, 0, 0, 0.04);
    --topbar-logo-border: rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] {
    --bg: #0f172a;
    --surface: #1e293b;
    --surface-elevated: #0f172a;
    --border: #334155;
    --text: #f1f5f9;
    --muted: #94a3b8;
    --primary: #16a34a;
    --primary-hover: #15803d;
    --primary-soft: rgba(22, 163, 74, 0.14);
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.14);
    --warning: #eab308;
    --warning-soft: rgba(234, 179, 8, 0.14);
    --radius: 16px;
    --card-bg: #1e293b;
    --card-border: #334155;
    --card-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    --input-bg: #0f172a;
    --input-border: #334155;
    --subcard-bg: #0f172a;
    --subcard-border: #334155;
    --splash-bg: #0f172a;
    --splash-title: #f1f5f9;
    --splash-loader-track: rgba(255, 255, 255, 0.14);
    --topbar-logo-bg: rgba(255, 255, 255, 0.04);
    --topbar-logo-border: rgba(255, 255, 255, 0.12);
}

/* Authenticator Splash Screen */
#auth-splash {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 99999999;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 1;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    background: var(--splash-bg, var(--bg));
    pointer-events: all;
}

#auth-splash.show {
    display: flex;
}

@media (display-mode: standalone) {
    html:not(.auth-pwa-warm) #auth-splash {
        display: flex;
    }
}

.auth-splash-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
}

@keyframes authSplashLogoIn {
    from {
        opacity: 0;
        transform: translateY(22px) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes authSplashPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

@keyframes authSplashSpin {
    to { transform: rotate(360deg); }
}

.auth-splash-logo-wrap {
    width: 136px;
    height: 136px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: authSplashLogoIn 0.65s cubic-bezier(0.16, 1, 0.3, 1) both, authSplashPulse 2.2s ease-in-out 0.65s infinite;
    margin-bottom: 16px;
}

.auth-splash-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 24px rgba(22, 163, 74, 0.28));
}

.auth-splash-title {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--splash-title, var(--text));
    margin-top: 8px;
    animation: authSplashLogoIn 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-splash-sub {
    font-size: 0.92rem;
    font-weight: 600;
    color: #16a34a;
    letter-spacing: 0.03em;
    margin-top: 6px;
    animation: authSplashLogoIn 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-splash-loader {
    width: 28px;
    height: 28px;
    border: 3px solid var(--splash-loader-track, rgba(128, 128, 128, 0.2));
    border-top-color: #16a34a;
    border-radius: 50%;
    animation: authSplashSpin 0.75s linear infinite;
    margin-top: 24px;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100dvh;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    touch-action: pan-x pan-y;
    -webkit-text-size-adjust: 100%;
}

button, a, input, select, textarea, .nav-tab, .auth-btn, .auth-card {
    touch-action: manipulation;
}

.auth-shell {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding-top: calc(env(safe-area-inset-top, 24px) + 28px);
    padding-left: max(16px, env(safe-area-inset-left, 16px));
    padding-right: max(16px, env(safe-area-inset-right, 16px));
    padding-bottom: max(20px, env(safe-area-inset-bottom, 20px));
    box-sizing: border-box;
}

body.has-bottom-nav .auth-shell {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 16px));
}

.auth-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0 22px;
    gap: 8px;
    width: 100%;
    flex-shrink: 0;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.auth-brand > div:last-child {
    min-width: 0;
}

.auth-brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--topbar-logo-bg, rgba(255, 255, 255, 0.04));
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.28);
    border: 1px solid var(--topbar-logo-border, rgba(255, 255, 255, 0.12));
    flex-shrink: 0;
}

.auth-brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 2px;
    display: block;
}

.auth-theme-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface-elevated);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

.auth-theme-btn:hover {
    border-color: var(--primary);
    transform: scale(1.06);
}

.auth-theme-btn svg {
    display: block;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.auth-theme-icon-sun {
    display: flex !important;
    color: #f59e0b;
}

.auth-theme-icon-moon {
    display: none !important;
    color: #94a3b8;
}

[data-theme="dark"] .auth-theme-icon-sun {
    display: none !important;
}

[data-theme="dark"] .auth-theme-icon-moon {
    display: flex !important;
}

.auth-brand-title {
    font-weight: 800;
    font-size: 0.92rem;
    letter-spacing: -0.01em;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}

.auth-brand-sub {
    font-size: 0.72rem;
    color: var(--muted);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.auth-status-pill {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: #15803d;
    border: 1px solid rgba(22, 163, 74, 0.25);
    white-space: nowrap;
    flex-shrink: 0;
}

[data-theme="dark"] .auth-status-pill {
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.25);
}

.auth-status-pill.warn {
    background: var(--warning-soft);
    color: #a16207;
    border-color: rgba(202, 138, 4, 0.3);
}

[data-theme="dark"] .auth-status-pill.warn {
    color: #fde047;
    border-color: rgba(250, 204, 21, 0.3);
}

.auth-user-badge {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.auth-user-badge.signed-out {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1.5px solid rgba(239, 68, 68, 0.4);
}

.auth-user-badge.logged-in {
    background: rgba(34, 197, 94, 0.14);
    color: #15803d;
    border: 1.5px solid rgba(22, 163, 74, 0.4);
}

[data-theme="dark"] .auth-user-badge.logged-in {
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.4);
}

.auth-site-card {
    background: var(--subcard-bg);
    border: 1px solid var(--subcard-border);
    border-radius: 14px;
    padding: 13px 15px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 13px;
    cursor: pointer;
    transition: all 0.18s ease;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
}

.auth-site-card:hover, .auth-site-card:active {
    background: var(--primary-soft);
    border-color: rgba(34, 197, 94, 0.42);
    transform: translateY(-1px);
}

.auth-site-logo-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 3px;
    box-sizing: border-box;
}

[data-theme="dark"] .auth-site-logo-wrap {
    background: #0f172a;
    border-color: rgba(255, 255, 255, 0.1);
}

.auth-site-logo-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.auth-site-info {
    flex: 1;
    min-width: 0;
}

.auth-site-name {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.auth-site-sub {
    font-size: 0.78rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.auth-site-arrow {
    color: #16a34a;
    font-size: 1.2rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: transform 0.18s ease;
}

[data-theme="dark"] .auth-site-arrow {
    color: #4ade80;
}

.auth-site-card:hover .auth-site-arrow {
    transform: translateX(2px);
}

/* Verified Screen Site Logo Box */
.nin-verified-site-logo-wrap {
    width: 68px;
    height: 68px;
    margin: 0 auto 16px;
    border-radius: 18px;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    padding: 6px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

[data-theme="dark"] .nin-verified-site-logo-wrap {
    background: #182234;
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.nin-verified-site-logo-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Verified Account Identity Card */
.auth-verified-card {
    background: var(--subcard-bg);
    border: 1px solid var(--subcard-border);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 18px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 13px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .auth-verified-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.auth-verified-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.auth-verified-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.auth-verified-ref {
    font-size: 0.8rem;
    color: var(--muted) !important;
    font-variant-numeric: tabular-nums;
    margin-top: 2px;
}

.btn-toggle-eye {
    transition: color 0.15s ease, transform 0.15s ease;
}
.btn-toggle-eye:hover {
    color: var(--text);
}
.btn-toggle-eye:active {
    transform: translateY(-50%) scale(0.92);
}

/* Direction-Aware Smooth Slide Transitions (Step 1 to 4 and Sub-Steps) */
@keyframes authSlideInRight {
    0% {
        opacity: 0;
        transform: translate3d(38px, 0, 0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes authSlideInLeft {
    0% {
        opacity: 0;
        transform: translate3d(-38px, 0, 0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.anim-slide-in-right {
    animation: authSlideInRight 0.48s cubic-bezier(0.16, 1, 0.3, 1) both !important;
    will-change: transform, opacity;
}

.anim-slide-in-left {
    animation: authSlideInLeft 0.48s cubic-bezier(0.16, 1, 0.3, 1) both !important;
    will-change: transform, opacity;
}

@media (prefers-reduced-motion: reduce) {
    .anim-slide-in-right,
    .anim-slide-in-left {
        animation: none !important;
        transform: none !important;
    }
}

.auth-screen {
    display: none;
    animation: fadeUp 0.18s ease-out;
}

.auth-screen.active {
    display: flex;
    flex-direction: column;
    flex: 1;                      /* fill remaining shell height below topbar */
    justify-content: center;      /* vertically center the card */
    align-items: stretch;         /* card stretches to full column width */
    padding-bottom: 12vh;         /* bias center point upward slightly */
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-top: 0;                /* centering handles vertical position */
    margin-bottom: 0;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
    position: relative;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.screen-step-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: #15803d;
    margin-bottom: 8px;
}

[data-theme="dark"] .screen-step-badge {
    color: #4ade80;
}

.auth-h1 {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0 0 6px;
    color: var(--text);
}

.auth-lead {
    font-size: 0.87rem;
    color: var(--muted);
    margin: 0 0 16px;
}

.auth-alert {
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.45;
    margin-bottom: 14px;
    border: 1px solid transparent;
    position: relative;
    z-index: 100;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.16);
}

.auth-alert.error {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
    color: #b91c1c;
}

[data-theme="dark"] .auth-alert.error {
    background: rgba(239, 68, 68, 0.16);
    border-color: rgba(239, 68, 68, 0.35);
    color: #fca5a5;
}

.auth-alert.success {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.35);
    color: #15803d;
}

[data-theme="dark"] .auth-alert.success {
    background: rgba(34, 197, 94, 0.16);
    border-color: rgba(34, 197, 94, 0.35);
    color: #86efac;
}

.auth-alert.warn {
    background: rgba(234, 179, 8, 0.14);
    border-color: rgba(234, 179, 8, 0.4);
    color: #92400e;
}

[data-theme="dark"] .auth-alert.warn {
    background: rgba(234, 179, 8, 0.16);
    border-color: rgba(234, 179, 8, 0.35);
    color: #fde047;
}

.auth-security-box {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.22);
    border-radius: 12px;
    padding: 12px 14px;
    margin: 14px 0 16px;
    font-size: 0.84rem;
    line-height: 1.5;
}

.auth-security-box-header {
    color: #16a34a;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

[data-theme="dark"] .auth-security-box-header {
    color: #4ade80;
}

.auth-security-box-text {
    color: #334155;
    font-size: 0.83rem;
}

[data-theme="dark"] .auth-security-box-text {
    color: #cbd5e1;
}

.form-group {
    margin-bottom: 14px;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text);
    opacity: 0.9;
    margin-bottom: 6px;
}

.form-input, .form-select {
    width: 100%;
    padding: 11px 13px;
    border-radius: 11px;
    border: 1.5px solid var(--border);
    background: var(--input-bg, var(--surface-elevated));
    color: var(--text);
    font-size: 0.94rem;
    outline: none;
    transition: border-color 0.15s ease, background 0.2s ease;
}

.form-input:focus, .form-select:focus {
    border-color: var(--primary);
}

select.form-input, select.form-select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

[data-theme="dark"] select.form-input, [data-theme="dark"] select.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

select.form-input option, select.form-select option {
    background: var(--surface);
    color: var(--text);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    border-radius: 11px;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: opacity 0.15s ease, transform 0.08s ease;
}

.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: auth-spin 0.65s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
    flex-shrink: 0;
}
@keyframes auth-spin {
    to { transform: rotate(360deg); }
}
.btn.is-loading,
.nav-tab.is-loading,
.is-loading {
    pointer-events: none !important;
    opacity: 0.85 !important;
    cursor: wait !important;
}

.btn:active {
    transform: scale(0.99);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
}

.auth-field-hint {
    margin-top: 7px;
    font-size: 0.8rem;
    line-height: 1.48;
    padding: 8px 12px;
    border-radius: 9px;
    background: rgba(245, 158, 11, 0.09);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-left: 3.5px solid #f59e0b;
    color: #fde68a;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    box-sizing: border-box;
}

.auth-field-hint svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 1px;
    color: #f59e0b;
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text);
}

.btn-danger {
    background: var(--danger-soft);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 0.8rem;
    width: auto;
}

.btn-stack {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

/* Section 13 MY ACCOUNTS Card Styling */
.section-eyebrow {
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--muted);
    text-transform: uppercase;
    margin: 4px 0 10px;
}

/* Site Collapsible Accordion */
.auth-site-accordion {
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 14px;
    overflow: hidden;
    transition: all 0.2s ease;
}

[data-theme="light"] .auth-site-accordion {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.auth-site-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px;
    cursor: pointer;
    user-select: none;
    background: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid transparent;
    transition: background 0.15s ease;
}

[data-theme="dark"] .auth-site-accordion-header {
    background: rgba(255, 255, 255, 0.03);
}

.auth-site-accordion-header:hover {
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .auth-site-accordion-header:hover {
    background: rgba(255, 255, 255, 0.06);
}

.auth-site-accordion.is-open .auth-site-accordion-header {
    border-bottom-color: var(--border);
}

.auth-site-accordion-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-site-accordion-logo {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    object-fit: contain;
    background: #ffffff;
    padding: 1px;
}

.auth-site-accordion-logo-fallback {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.auth-site-accordion-heading {
    font-size: 0.94rem;
    font-weight: 700;
    color: var(--text);
}

[data-theme="light"] .auth-site-accordion-heading {
    color: #0f172a;
}

.auth-site-accordion-chevron {
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.auth-site-accordion.is-open .auth-site-accordion-chevron {
    transform: rotate(180deg);
}

.auth-site-accordion-body {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0 12px;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity    0.25s ease,
                padding    0.35s ease;
}

.auth-site-accordion.is-open .auth-site-accordion-body {
    max-height: 600px;  /* tall enough for any account list */
    opacity: 1;
    padding: 12px;
}

.account-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 15px;
    margin-bottom: 10px;
}

.account-item:last-child {
    margin-bottom: 0;
}

[data-theme="light"] .account-item {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.account-item-title {
    font-weight: 800;
    font-size: 0.96rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text);
}

[data-theme="light"] .account-item-title {
    color: #0f172a;
}

.account-item-meta {
    font-size: 0.84rem;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.account-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.meta-label {
    color: var(--muted);
    font-weight: 600;
    min-width: 95px;
}

[data-theme="light"] .meta-label {
    color: #475569;
}

.meta-val {
    color: var(--text);
    font-weight: 700;
}

[data-theme="light"] .meta-val {
    color: #0f172a;
}

.meta-val.font-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    letter-spacing: 0.04em;
}

.account-item-awaiting {
    border: 1px dashed rgba(148, 163, 184, 0.45) !important;
    background: transparent !important;
}

.awaiting-title {
    color: var(--muted);
    font-weight: 700;
}

.account-item-desc {
    font-size: 0.83rem;
    color: var(--muted);
    line-height: 1.5;
}

[data-theme="light"] .account-item-desc {
    color: #475569;
}

/* User Status Badges */
.user-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 9999px;
    text-transform: capitalize;
}

.user-status-badge .status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.user-status-badge.status-online {
    background: rgba(22, 163, 74, 0.12);
    color: #16a34a;
}
.user-status-badge.status-online .status-dot {
    background: #16a34a;
    box-shadow: 0 0 6px rgba(22, 163, 74, 0.6);
}

.user-status-badge.status-active {
    background: rgba(2, 132, 199, 0.12);
    color: #0284c7;
}
.user-status-badge.status-active .status-dot {
    background: #0284c7;
}

.user-status-badge.status-suspended {
    background: rgba(217, 119, 6, 0.12);
    color: #d97706;
}
.user-status-badge.status-suspended .status-dot {
    background: #d97706;
}

.user-status-badge.status-deleted {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}
.user-status-badge.status-deleted .status-dot {
    background: #ef4444;
}

[data-theme="dark"] .user-status-badge.status-online {
    color: #4ade80;
}
[data-theme="dark"] .user-status-badge.status-online .status-dot {
    background: #4ade80;
}
[data-theme="dark"] .user-status-badge.status-active {
    color: #38bdf8;
}
[data-theme="dark"] .user-status-badge.status-active .status-dot {
    background: #38bdf8;
}
[data-theme="dark"] .user-status-badge.status-suspended {
    color: #f59e0b;
}
[data-theme="dark"] .user-status-badge.status-suspended .status-dot {
    background: #f59e0b;
}
[data-theme="dark"] .user-status-badge.status-deleted {
    color: #f87171;
}
[data-theme="dark"] .user-status-badge.status-deleted .status-dot {
    background: #f87171;
}

/* Selectable Account Card for Primary Account Choice */
.account-select-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--surface-elevated);
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
    width: 100%;
}
.account-select-card:hover {
    border-color: rgba(34, 197, 94, 0.4);
}
.account-select-card.selected {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.08);
}
.account-select-card input[type="radio"] {
    margin-top: 3px;
    accent-color: #22c55e;
    transform: scale(1.2);
}
.account-select-icon {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
}
.account-select-body {
    flex: 1;
}
.account-select-title {
    font-weight: 800;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 2px;
}
.account-select-desc {
    font-size: 0.82rem;
    color: #94a3b8;
    line-height: 1.45;
}

/* Pending Challenges & OTP Display */
.challenge-item {
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 14px 15px;
    margin-bottom: 10px;
}

.otp-code-box {
    background: #090e1a;
    border: 2px solid rgba(22, 163, 74, 0.5);
    border-radius: 16px;
    padding: 22px 16px;
    text-align: center;
    margin: 14px 0;
}

.otp-digits {
    font-family: "SF Mono", "JetBrains Mono", Consolas, monospace;
    font-size: 2.55rem;
    font-weight: 900;
    letter-spacing: 0.32rem;
    color: #4ade80;
    margin-bottom: 10px;
    user-select: all;
}

.otp-progress-track {
    height: 6px;
    border-radius: 999px;
    background: #1e293b;
    overflow: hidden;
    margin: 10px auto 6px;
    max-width: 260px;
}

.otp-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #16a34a, #4ade80);
    transition: width 0.25s linear;
}

.otp-progress-bar.expiring {
    background: #ef4444;
}

/* Recovery Codes Grid */
.recovery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    background: #f1f5f9;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 12px;
    padding: 14px;
    margin: 12px 0 16px;
}

[data-theme="dark"] .recovery-grid {
    background: #090e1a;
    border: 1px solid var(--border);
}

.recovery-code-chip {
    font-family: "SF Mono", Consolas, monospace;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 8px 10px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    text-align: center;
    color: #0f172a;
    letter-spacing: 0.04em;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .recovery-code-chip {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    box-shadow: none;
}

.auth-checkbox-label {
    color: #334155;
    font-weight: 500;
    line-height: 1.45;
}

[data-theme="dark"] .auth-checkbox-label {
    color: #cbd5e1;
}

.auth-link-danger {
    font-size: 0.84rem;
    color: #dc2626;
    text-decoration: none;
    font-weight: 600;
}

.auth-link-danger:hover {
    text-decoration: underline;
}

[data-theme="dark"] .auth-link-danger {
    color: #f87171;
}

/* Device list */
.device-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    margin-bottom: 9px;
}

/* Bottom Tab Bar */
.auth-bottom-nav {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 100%;
    max-width: 480px;
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    display: none;
    grid-template-columns: repeat(4, 1fr);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 6px));
    z-index: 50;
}

.auth-bottom-nav.visible {
    display: grid;
}

.nav-tab {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 0.71rem;
    font-weight: 600;
    padding: 6px 4px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.nav-tab.active {
    color: #4ade80;
    background: rgba(22, 163, 74, 0.1);
}

.nav-tab-icon {
    font-size: 1.08rem;
    line-height: 1;
}

.divider-or {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 0.76rem;
    margin: 14px 0;
}

.divider-or::before, .divider-or::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ── Authenticator PWA-Only Gate ─────────────────────────────────────────── */
#auth-pwa-gate {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #f4f6fb;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(1.5rem + env(safe-area-inset-top, 24px)) 1.25rem calc(1.5rem + env(safe-area-inset-bottom, 24px));
    box-sizing: border-box;
    overflow-y: auto;
    font-family: inherit;
    color: var(--text);
}
[data-theme="dark"] #auth-pwa-gate,
:root[data-theme="dark"] #auth-pwa-gate {
    background: #0f172a !important;
}
#auth-pwa-gate::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(45deg,transparent,transparent 12px,color-mix(in srgb,var(--auth-gate-brand,#22c55e) 3%,transparent) 12px,color-mix(in srgb,var(--auth-gate-brand,#22c55e) 3%,transparent) 24px),repeating-linear-gradient(-45deg,transparent,transparent 12px,color-mix(in srgb,var(--auth-gate-brand,#22c55e) 2%,transparent) 12px,color-mix(in srgb,var(--auth-gate-brand,#22c55e) 2%,transparent) 24px),radial-gradient(circle at 18% 42%,color-mix(in srgb,var(--auth-gate-brand,#22c55e) 11%,transparent),transparent 36%),radial-gradient(circle at 84% 76%,color-mix(in srgb,var(--auth-gate-brand,#22c55e) 8%,transparent),transparent 34%);
    z-index: 0;
}
#auth-pwa-gate::after {
    content: none;
}
.auth-gate-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-top: 3.5px solid #22c55e;
    border-radius: 20px;
    padding: 1.8rem 1.6rem 1.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.09);
    text-align: center;
    box-sizing: border-box;
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
[data-theme="dark"] .auth-gate-card,
:root[data-theme="dark"] .auth-gate-card {
    background: #1e293b !important;
    border: 1px solid #334155 !important;
    border-top: 3.5px solid #22c55e !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4) !important;
}
.auth-gate-theme-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #f59e0b;
    cursor: pointer;
    transition: background .2s, color .2s;
}
.auth-gate-theme-btn:hover {
    background: rgba(148, 163, 184, 0.18);
}
[data-theme="dark"] .auth-gate-theme-btn,
:root[data-theme="dark"] .auth-gate-theme-btn {
    color: #94a3b8;
}
.auth-gate-icon-badge {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(16, 185, 129, 0.08) 100%);
    border: 1.5px solid rgba(34, 197, 94, 0.35);
    color: #22c55e;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.85rem;
    box-shadow: 0 0 22px rgba(34, 197, 94, 0.2);
}
.auth-gate-icon-badge svg {
    width: 30px;
    height: 30px;
}
.auth-gate-eyebrow {
    font-size: 0.68rem;
    font-weight: 750;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #22c55e;
    margin-bottom: 0.35rem;
}
.auth-gate-title {
    font-size: 1.28rem;
    font-weight: 800;
    margin: 0 0 0.45rem;
    color: var(--text);
    letter-spacing: -0.015em;
}
[data-theme="dark"] .auth-gate-title,
:root[data-theme="dark"] .auth-gate-title {
    color: #f1f5f9 !important;
}
.auth-gate-sub {
    font-size: 0.84rem;
    color: var(--muted);
    line-height: 1.55;
    margin: 0 0 1.2rem;
}
[data-theme="dark"] .auth-gate-sub,
:root[data-theme="dark"] .auth-gate-sub {
    color: #94a3b8 !important;
}
.auth-gate-steps {
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 1rem 1.1rem;
    text-align: left;
    margin-bottom: 1.1rem;
}
[data-theme="dark"] .auth-gate-steps,
:root[data-theme="dark"] .auth-gate-steps {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #94a3b8 !important;
}
.auth-gate-desktop-h {
    color: #0f172a;
}
[data-theme="dark"] .auth-gate-desktop-h,
:root[data-theme="dark"] .auth-gate-desktop-h {
    color: #f1f5f9 !important;
}
.auth-gate-desktop-p {
    color: #475569;
}
[data-theme="dark"] .auth-gate-desktop-p,
:root[data-theme="dark"] .auth-gate-desktop-p {
    color: #94a3b8 !important;
}
.auth-gate-desktop-p strong,
[data-theme="dark"] .auth-gate-desktop-p strong,
:root[data-theme="dark"] .auth-gate-desktop-p strong {
    font-weight: 400 !important;
    color: inherit !important;
}
.auth-gate-step-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.65rem;
}
[data-theme="dark"] .auth-gate-step-header,
:root[data-theme="dark"] .auth-gate-step-header {
    color: #f1f5f9 !important;
}
.auth-gate-ol {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--muted);
}
[data-theme="dark"] .auth-gate-ol,
:root[data-theme="dark"] .auth-gate-ol {
    color: #94a3b8 !important;
}
.auth-gate-ol li {
    margin-bottom: 0.35rem;
}
.auth-gate-ol li:last-child {
    margin-bottom: 0;
}
.auth-gate-installed-box {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.24);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    text-align: center;
    margin-top: 0.5rem;
}

/* ── Anti-Tamper Security Shield ────────────────────────────────────────── */
body, .auth-shell, .auth-card, .auth-topbar, .auth-bottom-nav, .auth-gate-card, #auth-splash {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

input, textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    user-select: text;
}

/* ══════════════════════════════════════════════════════════════════════════
   Smooth Slide-Down / Slide-Up Accordion for "Try another way"
   ══════════════════════════════════════════════════════════════════════════ */
.nin-alt-accordion {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition: grid-template-rows 0.35s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.28s ease-out;
    will-change: grid-template-rows, opacity;
}

.nin-alt-accordion.is-open {
    grid-template-rows: 1fr;
    opacity: 1;
}

.nin-alt-accordion-inner {
    overflow: hidden;
    min-height: 0;
}

.nin-alt-auth-card {
    margin-top: 12px;
    text-align: left;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px;
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    transform: translateY(-8px);
}

.nin-alt-accordion.is-open .nin-alt-auth-card {
    transform: translateY(0);
}

#nin-try-another-icon {
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    transform-origin: center;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Modern Floating Confirmation / Alert Modal Dialog
   ═══════════════════════════════════════════════════════════════════════════ */
.auth-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-modal-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.auth-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

[data-theme="dark"] .auth-modal-backdrop {
    background: rgba(3, 7, 18, 0.72);
}

.auth-modal-container {
    position: relative;
    width: 100%;
    max-width: 340px;
    z-index: 10;
}

.auth-modal-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 26px 22px 22px;
    text-align: center;
    transform: scale(0.92) translateY(10px);
    transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.auth-modal-overlay.is-visible .auth-modal-card {
    transform: scale(1) translateY(0);
}

[data-theme="light"] .auth-modal-card {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 24px 50px -12px rgba(15, 23, 42, 0.22), 0 4px 16px rgba(15, 23, 42, 0.06);
}

[data-theme="dark"] .auth-modal-card {
    background: #111827;
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 28px 56px -12px rgba(0, 0, 0, 0.75);
}

.auth-modal-icon-badge {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 18px;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    border: 1px solid rgba(22, 163, 74, 0.2);
}

.auth-modal-icon-badge.danger {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.28);
    color: #ef4444;
}

[data-theme="dark"] .auth-modal-icon-badge.danger {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.36);
    color: #f87171;
}

.auth-modal-title {
    font-size: 1.16rem;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 8px;
    letter-spacing: -0.015em;
    line-height: 1.35;
}

[data-theme="light"] .auth-modal-title {
    color: #0f172a;
}

.auth-modal-message {
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.5;
    margin: 0 0 22px;
}

[data-theme="light"] .auth-modal-message {
    color: #475569;
}

.auth-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.auth-modal-btn-confirm {
    width: 100%;
    padding: 13px 16px;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 13px;
}

.auth-modal-btn-confirm.danger {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.28);
}

.auth-modal-btn-confirm.danger:hover {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
}

.auth-modal-btn-cancel {
    width: 100%;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 0.92rem;
    border-radius: 13px;
    color: var(--text);
    border: 1.5px solid var(--border);
}

[data-theme="light"] .auth-modal-btn-cancel {
    color: #334155;
    border-color: #cbd5e1;
    background: #f8fafc;
}

[data-theme="light"] .auth-modal-btn-cancel:hover {
    background: #f1f5f9;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Custom Searchable Connected Site / Platform Dropdown & Progressive Groups
   ═══════════════════════════════════════════════════════════════════════════ */
.auth-custom-select-wrap {
    position: relative;
    width: 100%;
}

.auth-custom-select-trigger {
    width: 100%;
    min-height: 48px;
    padding: 9px 13px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    text-align: left;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
    font-family: inherit;
    font-size: .92rem;
    color: var(--text);
    box-sizing: border-box;
}

.auth-custom-select-trigger:focus,
.auth-custom-select-trigger.is-active {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

.auth-select-trigger-content {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    flex: 1;
}

.auth-select-placeholder {
    color: var(--text-muted);
    font-size: .88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.auth-select-chevron {
    font-size: .82rem;
    color: var(--text-muted);
    margin-left: 8px;
    transition: transform .2s cubic-bezier(0.16, 1, 0.3, 1), color .18s ease;
}

.auth-custom-select-trigger.is-active .auth-select-chevron {
    transform: rotate(180deg);
    color: var(--primary);
}

.auth-custom-select-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.18), 0 4px 12px rgba(15, 23, 42, 0.08);
    z-index: 100;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: authDropdownFadeIn .16s ease-out;
}

@keyframes authDropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-dropdown-search-wrap {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.02);
    gap: 8px;
}

[data-theme="dark"] .auth-dropdown-search-wrap {
    background: rgba(255, 255, 255, 0.03);
}

.auth-dropdown-search-icon {
    font-size: .82rem;
    opacity: 0.65;
    flex-shrink: 0;
}

.auth-dropdown-search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: .84rem;
    color: var(--text);
    outline: none;
    padding: 4px 0;
    min-width: 0;
}

.auth-dropdown-search-input::placeholder {
    color: var(--text-muted);
    font-size: .8rem;
}

.auth-search-clear-btn {
    border: none;
    background: rgba(148, 163, 184, 0.2);
    color: var(--text-muted);
    font-size: .72rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background .15s ease;
}

.auth-search-clear-btn:hover {
    background: rgba(148, 163, 184, 0.35);
    color: var(--text);
}

.auth-custom-select-list {
    overflow-y: auto;
    max-height: 220px;
    padding: 6px;
    overscroll-behavior: contain;
}

.auth-site-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 11px;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color .15s ease;
    gap: 8px;
}

.auth-site-option:hover,
.auth-site-option.is-highlighted {
    background: rgba(34, 197, 94, 0.08);
}

.auth-site-option.is-selected {
    background: rgba(34, 197, 94, 0.12);
}

.auth-site-opt-left {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    flex: 1;
}

.auth-site-opt-logo {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    object-fit: contain;
    background: #ffffff;
    padding: 2px;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.auth-site-opt-badge {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .75rem;
    background: var(--primary-light, #e8f5e9);
    color: var(--primary, #15803d);
    flex-shrink: 0;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.auth-site-opt-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    text-align: left;
}

.auth-site-opt-name {
    font-size: .86rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.auth-site-opt-domain {
    font-size: .74rem;
    color: var(--text-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.auth-site-opt-check {
    color: var(--primary);
    font-weight: 700;
    font-size: .88rem;
    flex-shrink: 0;
}

.auth-site-empty-results {
    padding: 18px 12px;
    text-align: center;
    color: var(--text-muted);
    font-size: .82rem;
    line-height: 1.4;
}

.cred-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    opacity: 0.6;
    padding: 4px;
    border-radius: 6px;
    transition: opacity .15s ease;
}

.cred-toggle-btn:hover {
    opacity: 1;
}

.pwrec-row-side-by-side {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-bottom: 12px;
}

.pwrec-choice-btn {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    padding: 10px 4px !important;
    font-size: clamp(0.70rem, 2.7vw, 0.82rem) !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 5px !important;
    box-sizing: border-box !important;
    letter-spacing: -0.01em;
}

.auth-gate-logo{display:block;width:auto;height:84px;max-width:70%;object-fit:contain;margin:0 auto .85rem}

#auth-pwa-gate .auth-gate-card{position:relative;z-index:1;max-height:none;overflow:visible}

.auth-ios-acc{border-top:1px solid rgba(148,163,184,.25);text-align:left}
.auth-ios-acc:first-of-type{border-top:0}
.auth-ios-head{display:flex;align-items:center;justify-content:space-between;width:100%;background:none;border:0;padding:.55rem 0;color:inherit;font:inherit;font-size:.74rem;font-weight:800;text-transform:uppercase;letter-spacing:.05em;opacity:.85;cursor:pointer;-webkit-tap-highlight-color:transparent}
.auth-ios-chev{transition:transform .32s cubic-bezier(.32,.72,0,1)}
.auth-ios-acc.open .auth-ios-chev{transform:rotate(180deg)}
.auth-ios-body{display:grid;grid-template-rows:0fr;opacity:0;transition:grid-template-rows .32s cubic-bezier(.32,.72,0,1),opacity .22s ease}
.auth-ios-acc.open .auth-ios-body{grid-template-rows:1fr;opacity:1}
.auth-ios-inner{min-height:0;overflow:hidden}
@media (prefers-reduced-motion:reduce){.auth-ios-body,.auth-ios-chev{transition:none}}

#auth-pwa-gate .auth-gate-card{position:relative;z-index:1}
.auth-gate-bg-art{position:fixed;inset:0;z-index:0;pointer-events:none;overflow:hidden;color:#22c55e}
.auth-gate-bg-art span{position:absolute;display:grid;place-items:center;width:78px;height:78px;opacity:.12;animation:auth-gate-float 10s ease-in-out infinite}
.auth-gate-bg-art svg{display:block;width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.25;stroke-linecap:round;stroke-linejoin:round}
.auth-gate-bg-art span:nth-child(1){top:8%;left:9%;width:66px;height:66px;animation-delay:0s}.auth-gate-bg-art span:nth-child(2){top:13%;right:9%;width:92px;height:92px;animation-delay:-2s}.auth-gate-bg-art span:nth-child(3){bottom:10%;left:8%;width:88px;height:88px;animation-delay:-4s}.auth-gate-bg-art span:nth-child(4){top:52%;right:12%;width:62px;height:62px;animation-delay:-1s}.auth-gate-bg-art span:nth-child(5){bottom:14%;right:22%;width:74px;height:74px;animation-delay:-3s}.auth-gate-bg-art span:nth-child(6){top:65%;left:23%;width:58px;height:58px;animation-delay:-5s}
@keyframes auth-gate-float{0%,100%{transform:translateY(0) rotate(0);opacity:.1}50%{transform:translateY(-24px) rotate(9deg);opacity:.18}}
@media (prefers-reduced-motion:reduce){.auth-gate-bg-art span{animation:none}}
