
body.auth-page {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 32px 20px;
    overflow-y: auto;
    -webkit-font-smoothing: antialiased;
    background: #0c0618;
}

body.auth-page::before {
    content: '';
    position: fixed; inset: 0; z-index: -2;
    background:
        radial-gradient(ellipse 90% 70% at 25% 50%, rgba(109,40,217,0.30) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 100% 100%, rgba(139,92,246,0.15) 0%, transparent 55%),
        radial-gradient(ellipse 50% 40% at 0% 0%, rgba(76,29,149,0.20) 0%, transparent 55%),
        #0c0618;
    pointer-events: none;
}

body.auth-page::after {
    content: '';
    position: fixed; inset: 0; z-index: -1;
    background-image:
        linear-gradient(rgba(139,92,246,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139,92,246,0.05) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}

.login-card {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 100%;
    max-width: 960px;
    min-height: 580px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow:
        0 32px 80px rgba(0,0,0,0.6),
        0 8px 24px rgba(0,0,0,0.4),
        0 0 0 1px rgba(139,92,246,0.15);
    animation: hi-fadeIn 0.7s var(--ease-out, cubic-bezier(0.22,1,0.36,1)) both;
}

.image-section {
    flex: 0 0 40%;
    background: linear-gradient(160deg, #0d052a 0%, #1a0850 30%, #2d1070 60%, #3d1a82 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 44px 40px;
    min-height: 480px;
}

.image-section::before {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    border-radius: 50%;
    border: 1px solid rgba(139,92,246,0.2);
    top: -120px; right: -120px;
    pointer-events: none;
}
.image-section::after {
    content: '';
    position: absolute;
    width: 260px; height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139,92,246,0.15) 0%, transparent 70%);
    bottom: -60px; left: -60px;
    pointer-events: none;
}

.image-section .ring-2 {
    position: absolute;
    width: 240px; height: 240px;
    border-radius: 50%;
    border: 1px solid rgba(139,92,246,0.12);
    top: -50px; right: -50px;
    pointer-events: none;
}

.brand-panel-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    filter: brightness(0) invert(1) drop-shadow(0 0 16px rgba(139,92,246,0.6));
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.brand-panel-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px 0;
    position: relative; z-index: 1;
}

.brand-panel-title {
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    letter-spacing: -0.6px;
    margin-bottom: 12px;
}

.brand-panel-subtitle {
    font-size: 13.5px;
    color: rgba(255,255,255,0.60);
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 240px;
}

.brand-panel-features {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.brand-panel-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
    color: rgba(255,255,255,0.72);
    font-weight: 500;
}

.brand-panel-feature-dot {
    width: 18px; height: 18px;
    border-radius: 50%;
    background: rgba(139,92,246,0.25);
    border: 1px solid rgba(139,92,246,0.45);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.brand-panel-feature-dot::after {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #a78bfa;
}

.brand-panel-footer {
    position: relative; z-index: 1;
}

.brand-panel-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 9999px;
    padding: 5px 12px;
    font-size: 11px;
    color: rgba(255,255,255,0.50);
    font-weight: 500;
    letter-spacing: 0.03em;
}
.brand-panel-badge::before {
    content: '';
    width: 5px; height: 5px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 6px rgba(52,211,153,0.8);
}
.brand-panel-badge.is-checking::before {
    background: #cbd5e1;
    box-shadow: none;
}
.brand-panel-badge.is-down::before {
    background: #f87171;
    box-shadow: 0 0 6px rgba(248,113,113,0.8);
}
.brand-panel-badge.is-down {
    color: rgba(248,113,113,0.85);
    border-color: rgba(248,113,113,0.35);
}

.form-section {
    flex: 1 1 60%;
    background: #ffffff;
    padding: 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

.form-section::after { display: none; }

.form-box {
    width: 100%;
    max-width: 380px;
}

.form-section .external-login {
    width: 100%;
    max-width: 380px;
    margin-top: 20px;
}

.login-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 32px;
}

.login-header h2 {
    font-size: 24px;
    font-weight: 800;
    color: #14082a;
    margin: 0 0 4px;
    line-height: 1.2;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.login-header-sub {
    font-size: 13.5px;
    color: rgba(20,8,42,0.50);
    margin: 0;
}

.login-header-text { flex: 1; min-width: 0; }

.login-logo {
    display: block;
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
    background: linear-gradient(145deg, #ede9fe, #f5f3ff);
    border: 1px solid rgba(109,40,217,0.18);
    border-radius: 14px;
    padding: 8px;
    box-shadow: 0 2px 12px rgba(109,40,217,0.15), 0 1px 3px rgba(0,0,0,0.06);
    filter: drop-shadow(0 1px 4px rgba(109,40,217,0.20));
}

.form-label {
    font-size: 11.5px;
    font-weight: 700;
    color: rgba(20,8,42,0.50);
    margin-bottom: 6px;
    display: block;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.form-control {
    border: 1.5px solid rgba(109,40,217,0.15);
    border-radius: 10px;
    font-size: 14.5px;
    padding: 11px 14px;
    background: #faf9ff;
    color: #14082a;
    transition: all 180ms ease;
    width: 100%;
    font-family: inherit;
    caret-color: #7c3aed;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.form-control::placeholder { color: rgba(20,8,42,0.28); }
.form-control:hover {
    border-color: rgba(109,40,217,0.28);
    background: #ffffff;
}
.form-control:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124,58,237,0.12), 0 1px 3px rgba(0,0,0,0.05);
    background: #ffffff;
    outline: none;
    color: #14082a;
}

.form-check { display: flex; align-items: center; gap: 8px; }
.form-check-input {
    width: 16px; height: 16px;
    border: 1.5px solid rgba(109,40,217,0.28);
    border-radius: 4px; background: #ffffff;
    accent-color: #7c3aed; cursor: pointer; flex-shrink: 0;
}
.form-check-label {
    font-size: 13px; color: rgba(20,8,42,0.55);
    font-weight: 500; cursor: pointer;
}

.forgot-link {
    font-size: 13px; font-weight: 600;
    text-decoration: none; color: #7c3aed;
    transition: color 140ms ease;
}
.forgot-link:hover { color: #5b21b6; }

.btn-login {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 55%, #8b5cf6 100%);
    color: #ffffff !important; font-weight: 700; font-size: 14.5px;
    padding: 13px 20px; border-radius: 11px; width: 100%;
    border: none; cursor: pointer;
    box-shadow: 0 4px 20px rgba(109,40,217,0.42), 0 1px 4px rgba(0,0,0,0.12);
    transition: all 260ms var(--ease-out, cubic-bezier(0.22,1,0.36,1));
    text-decoration: none !important; font-family: inherit;
    position: relative; overflow: hidden; letter-spacing: -0.1px;
}
.btn-login::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.14), transparent 60%);
    pointer-events: none;
}
.btn-login:hover {
    background: linear-gradient(135deg, #4c1d95 0%, #6d28d9 55%, #7c3aed 100%);
    transform: translateY(-1px);
    box-shadow: 0 8px 28px rgba(109,40,217,0.52), 0 0 0 1px rgba(139,92,246,0.3);
    color: #ffffff !important;
}
.btn-login:active { transform: translateY(0); }

.btn-passkey {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    background: #f5f3ff; color: rgba(20,8,42,0.60); font-weight: 600;
    font-size: 13.5px; border: 1.5px solid rgba(109,40,217,0.25);
    border-radius: 11px; padding: 11px 20px; cursor: pointer;
    transition: all 200ms ease; width: 100%; font-family: inherit;
}
.btn-passkey i { font-size: 16px; color: #7c3aed; }
.btn-passkey:hover {
    background: #ede9fe;
    border-color: rgba(109,40,217,0.42); color: #14082a;
    box-shadow: 0 2px 12px rgba(109,40,217,0.10);
}

.btn-register {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    background: #ffffff; color: #6d28d9; font-weight: 600;
    font-size: 13.5px; border: 1.5px solid rgba(109,40,217,0.35);
    border-radius: 11px; padding: 11px 20px; cursor: pointer;
    transition: all 200ms ease; width: 100%; font-family: inherit;
    text-decoration: none !important;
}
.btn-register i { font-size: 15px; color: #7c3aed; }
.btn-register:hover {
    background: #f5f3ff; border-color: rgba(109,40,217,0.55);
    color: #4c1d95;
    box-shadow: 0 2px 12px rgba(109,40,217,0.12);
}

.external-login { text-align: center; margin-top: 22px; }
.external-title {
    display: flex; align-items: center; gap: 10px;
    font-weight: 700; margin: 0 0 14px;
    color: rgba(20,8,42,0.30); font-size: 10.5px;
    text-transform: uppercase; letter-spacing: 0.12em;
}
.external-title::before, .external-title::after {
    content: ""; flex: 1; height: 1px; background: rgba(109,40,217,0.10);
}
.external-login-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.icon-button {
    display: flex; align-items: center; justify-content: center;
    background: #ffffff; border: 1.5px solid rgba(109,40,217,0.14);
    border-radius: 12px; width: 52px; height: 52px; cursor: pointer;
    transition: all 180ms ease; padding: 0; outline: none;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    flex-shrink: 0;
}
.icon-button:hover {
    background: #f5f3ff; border-color: rgba(109,40,217,0.35);
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(109,40,217,0.14);
}
.provider-icon { width: 22px; height: 22px; object-fit: contain; }

.validation-alert {
    border-radius: 9px; border-left: 3px solid #e53e3e;
    background: rgba(229,62,62,0.06); color: #c53030;
    padding: 11px 14px; margin-bottom: 18px; font-size: 13px;
    border-top: 1px solid rgba(229,62,62,0.12);
    border-right: 1px solid rgba(229,62,62,0.12);
    border-bottom: 1px solid rgba(229,62,62,0.12);
    animation: hi-fadeInFast 0.3s ease both;
}
.validation-alert h5 { font-weight: 700; color: #e53e3e; margin-bottom: 2px; font-size: 12.5px; }
.text-danger, .field-validation-error { display: block; margin-top: 4px; font-size: 11.5px; font-weight: 500; color: #e53e3e; }
input.input-validation-error { border: 1.5px solid rgba(229,62,62,0.45) !important; background: rgba(229,62,62,0.03) !important; }
input.input-validation-error:focus { box-shadow: 0 0 0 3px rgba(229,62,62,0.12) !important; }

.forgot-password-container,
.reset-password-container,
.reset-confirm-container,
.confirmation-container {
    background: #ffffff;
    border: 1px solid rgba(109,40,217,0.12);
    border-radius: 20px;
    padding: 48px 52px;
    width: calc(100% - 40px); max-width: 440px;
    box-shadow: 0 20px 56px rgba(0,0,0,0.28), 0 4px 12px rgba(0,0,0,0.14);
    animation: hi-fadeIn 0.5s var(--ease-out) both;
    text-align: center; margin: 20px;
}

.forgot-password-header, .reset-password-header,
.reset-confirm-header, .confirmation-header {
    font-size: 22px; font-weight: 800; color: #14082a;
    margin-bottom: 10px; letter-spacing: -0.4px;
}

.forgot-password-subtitle, .reset-password-subtitle {
    font-size: 14px; color: rgba(20,8,42,0.50);
    margin-bottom: 28px; line-height: 1.65;
}

.confirmation-text, .reset-confirm-text { font-size: 14.5px; color: rgba(20,8,42,0.55); line-height: 1.7; }
.reset-confirm-text a { color: #7c3aed; font-weight: 600; text-decoration: none; }
.reset-confirm-text a:hover { color: #5b21b6; text-decoration: underline; }

.forgot-password-container .form-control,
.reset-password-container .form-control {
    width: 100%; border-radius: 10px; padding: 11px 14px; font-size: 14.5px;
    border: 1.5px solid rgba(109,40,217,0.15); background: #faf9ff;
    color: #14082a; transition: all 180ms ease; font-family: inherit;
}
.forgot-password-container .form-control:focus,
.reset-password-container .form-control:focus {
    border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124,58,237,0.12); background: #ffffff; outline: none;
}
.forgot-password-container .form-label,
.reset-password-container .form-label {
    font-size: 11.5px; font-weight: 700; color: rgba(20,8,42,0.50);
    display: block; margin-bottom: 6px; text-align: left;
    text-transform: uppercase; letter-spacing: 0.05em;
}

.btn-reset-password, .btn-reset-submit {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: linear-gradient(135deg, #5b21b6, #7c3aed);
    color: #ffffff; font-weight: 700; font-size: 14.5px;
    padding: 13px 20px; border-radius: 11px; width: 100%;
    border: none; cursor: pointer; transition: all 260ms ease;
    box-shadow: 0 4px 20px rgba(109,40,217,0.40); font-family: inherit; margin-top: 6px;
}
.btn-reset-password:hover, .btn-reset-submit:hover {
    background: linear-gradient(135deg, #4c1d95, #6d28d9); transform: translateY(-1px);
    box-shadow: 0 8px 28px rgba(109,40,217,0.52); color: #ffffff;
}

.logout-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.logout-card {
    background: #ffffff; border: 1px solid rgba(109,40,217,0.10);
    border-radius: 20px; padding: 44px 48px; max-width: 380px; width: 100%;
    box-shadow: 0 16px 48px rgba(0,0,0,0.24); text-align: center;
    animation: hi-scaleIn 0.4s var(--ease-out) both;
}
.logout-card-icon {
    width: 60px; height: 60px; background: rgba(229,62,62,0.08); border: 1px solid rgba(229,62,62,0.22);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    margin: 0 auto 18px; font-size: 24px;
}
.logout-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; color: #14082a; letter-spacing: -0.3px; }
.logout-description { font-size: 14px; color: rgba(20,8,42,0.50); margin-bottom: 24px; line-height: 1.65; }
.logout-description.success { color: #38a169; font-weight: 500; }
.logout-form { display: flex; justify-content: center; }
.logout-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: linear-gradient(135deg, #e53e3e, #c53030);
    border: none; color: #ffffff; padding: 10px 24px;
    border-radius: 9999px; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: all 200ms ease;
    box-shadow: 0 4px 16px rgba(229,62,62,0.32); font-family: inherit;
}
.logout-btn:hover {
    background: linear-gradient(135deg, #c53030, #9b2c2c);
    transform: translateY(-1px); box-shadow: 0 8px 24px rgba(229,62,62,0.42); color: #ffffff;
}

@keyframes hi-fadeIn  { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }
@keyframes hi-fadeInFast { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }
@keyframes hi-scaleIn { from { opacity:0; transform:scale(0.95); } to { opacity:1; transform:scale(1); } }

@media (max-width: 768px) {
    body.auth-page { padding: 0 !important; align-items: flex-start !important; }

    .login-card {
        width: 100%; margin: 0; min-height: 100vh; max-width: 100%;
        border-radius: 0 !important; box-shadow: none !important; border: none !important;
        flex-direction: column;
    }
    .image-section {
        flex: 0 0 auto; min-height: 200px; padding: 28px 28px 24px;
        align-items: flex-start; justify-content: flex-end;
    }
    .image-section::before, .image-section::after { display: none; }
    .brand-panel-body { padding: 0; justify-content: flex-end; }
    .brand-panel-title { font-size: 20px; margin-bottom: 0; }
    .brand-panel-subtitle, .brand-panel-features, .brand-panel-footer { display: none; }
    .form-section { flex: 1; padding: 32px 24px 48px; overflow-y: visible; }
    .form-box { max-width: 100%; }
    .image-section { display: none !important; }

    .login-header { gap: 12px; margin-bottom: 24px; }
    .login-logo { width: 42px; height: 42px; border-radius: 12px; padding: 7px; }
    .login-header h2 { font-size: 20px; white-space: normal; }
    .login-header-sub { font-size: 13px; }
    .form-control, .btn-login, .btn-passkey { font-size: 16px; }

    .forgot-password-container, .reset-password-container,
    .reset-confirm-container, .confirmation-container {
        width: 100%; max-width: 100%; min-height: 100vh;
        padding: 48px 24px; border-radius: 0; box-shadow: none; border: none; margin: 0;
        background: #ffffff !important;
    }
    .logout-card {
        max-width: 100%; min-height: 100vh; border-radius: 0; box-shadow: none;
        padding: 48px 24px; border: none;
    }
}
