html, body {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    max-height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden !important;
    box-sizing: border-box;
}
*, *::before, *::after {
    box-sizing: border-box;
}
body.page-auth, html.page-auth {
        width: 100vw;
        height: 100vh;
        min-height: 100vh;
        max-height: 100vh;
        margin: 0;
        padding: 0;
        overflow: hidden !important;
        box-sizing: border-box;
}
.auth-shell-login, .auth-login-layout {
        width: 100vw !important;
        height: 100vh !important;
        min-height: 100vh !important;
        max-height: 100vh !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: center;
}
.auth-panel-login {
        max-width: 370px;
        width: 100%;
        margin: 0 auto;
        box-sizing: border-box;
}
@media (max-width: 480px) {
    .auth-panel-login {
        max-width: 98vw;
        padding: 24px 4vw 24px 4vw;
    }
    .auth-shell-login, .auth-login-layout {
        width: 100vw !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}
html, body {
    height: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    box-sizing: border-box;
}
/* --- MFA Verification Page Polish --- */
.auth-shell-login {
    min-height: 100vh;
    width: 100vw;
    overflow-x: hidden;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-login-layout {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    overflow-x: hidden;
}
.auth-panel-login {
    background: rgba(24, 34, 44, 0.78);
    box-shadow: 0 8px 32px 0 rgba(0,0,0,0.18), 0 1.5px 8px 0 rgba(0,0,0,0.10);
    border: 1.5px solid rgba(255,255,255,0.13);
    border-radius: 0 !important;
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    padding: 38px 18px 32px 18px;
    margin: 0 auto;
    width: 100%;
    max-width: 370px;
    transition: box-shadow 0.2s;
    box-sizing: border-box;
}
@media (max-width: 480px) {
    .auth-panel-login {
        max-width: 98vw;
        padding: 24px 4vw 24px 4vw;
    }
    .auth-shell-login, .auth-login-layout {
        width: 100vw;
        min-width: 0;
        margin: 0;
        padding: 0;
    }
}
.auth-panel-login .auth-title {
    color: #fff;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.auth-panel-login .auth-subtitle {
    color: #b6c2d1;
    font-size: 13px;
    margin-bottom: 1.2rem;
}
.auth-panel-login .form-label {
    color: #e2e8f0;
    font-weight: 500;
    font-size: 14px;
}
.auth-panel-login .form-control {
    background: rgba(255,255,255,0.10);
    border: 1.5px solid rgba(255,255,255,0.18);
    color: #e2e8f0;
    border-radius: 0 !important;
    font-size: 15px;
    padding: 12px 14px;
    margin-bottom: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 1.5px 8px 0 rgba(0,0,0,0.07);
    text-align: center;
}
.auth-panel-login .form-control:focus {
    border-color: #1d9e75;
    box-shadow: 0 0 0 3px rgba(29, 158, 117, 0.13);
    background: rgba(255,255,255,0.16);
    color: #fff;
}
.auth-panel-login .auth-submit {
    background: linear-gradient(90deg, #1d9e75 0%, #159b8a 100%);
    color: #fff;
    border-radius: 0 !important;
    font-size: 1.13rem;
    font-weight: 600;
    min-height: 46px;
    box-shadow: 0 2px 12px 0 rgba(29, 158, 117, 0.13);
    transition: background 0.2s, box-shadow 0.2s;
    border: none;
    width: 100%;
    margin-top: 10px;
}
.auth-panel-login .auth-submit:hover,
.auth-panel-login .auth-submit:focus-visible {
    background: linear-gradient(90deg, #159b8a 0%, #1d9e75 100%);
    color: #fff;
    box-shadow: 0 6px 24px 0 rgba(29, 158, 117, 0.18);
}
.auth-panel-login .alert {
    border-radius: 0 !important;
    font-size: 14px;
}
.auth-panel-login .auth-note-card {
    background: rgba(255,255,255,0.07);
    border: 1.5px solid rgba(255,255,255,0.13);
    border-radius: 0 !important;
    color: #e2e8f0;
    font-size: 13px;
    margin-top: 24px;
    padding: 18px 16px;
    box-shadow: 0 1.5px 8px 0 rgba(0,0,0,0.07);
}
.auth-panel-login .badge.bg-info {
    background: #1d9e75 !important;
    color: #fff !important;
    font-weight: 600;
    font-size: 12px;
    border-radius: 0 !important;
    padding: 6px 12px;
}
/* Hide reCAPTCHA error by default, show only if it has content */
#recaptchaError.invalid-feedback {
    color: #e2e8f0 !important;
    font-weight: 500;
    font-size: 13px;
    text-align: center;
    display: none;
}
#recaptchaError.invalid-feedback:not(:empty) {
    display: block;
}

/* Match 'Remember me' and 'Forgot password' font and color */
.auth-meta-row .form-check-label,
.auth-meta-row .auth-forgot-link {
    font-size: 13px !important;
    color: #e2e8f0 !important;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}
.auth-meta-row .auth-forgot-link:hover {
    color: #1d9e75 !important;
}

/* Style and align the checkbox */
.auth-meta-row .form-check-input {
    width: 18px;
    height: 18px;
    border-radius: 3px !important;
    border: 2px solid #e2e8f0;
    background: transparent;
    margin-top: 0;
    margin-right: 7px;
    vertical-align: middle;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    display: inline-block;
    position: relative;
}
.auth-meta-row .form-check-input:checked {
    background: #1d9e75;
    border-color: #1d9e75;
}
.auth-meta-row .form-check-input:focus {
    box-shadow: 0 0 0 2px rgba(29, 158, 117, 0.18);
    border-color: #1d9e75;
}
.auth-meta-row .form-check {
    display: flex;
    align-items: center;
    margin-bottom: 0;
}
/* Override reCAPTCHA error color to remove red writing */
#recaptchaError.invalid-feedback {
    color: #e2e8f0 !important;
    font-weight: 500;
    font-size: 13px;
    text-align: center;
}
.auth-unified-left .auth-right-eyebrow,
.auth-unified-left .auth-right-title,
.auth-unified-left .auth-right-sub {
    text-align: right;
}
/* Unified login layout (login-unified) */

/* Unified login layout (login-unified) - single source of background image */
.login-unified {
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    background: transparent;
    position: relative;
    overflow: hidden;
}

.auth-unified-content {
    display: flex;
    flex: 1 1 0%;
    flex-direction: row;
    height: 100%;
    width: 100vw;
    position: relative;
    z-index: 1;
}

.auth-unified-left {
    flex: 1 1 0%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 48px 36px 64px;
    background: transparent;
    color: #e2e8f0;
    max-width: 700px;
    /* Add subtle text shadow for readability */
    text-shadow: 0 1px 8px rgba(0,0,0,0.18);
}

.auth-unified-right {
    width: 420px;
    min-width: 420px;
    max-width: 480px;
    background: transparent !important;
    box-shadow: none !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 36px;
    position: relative;
    height: 100%;
    color: #e2e8f0;
    text-shadow: 0 1px 8px rgba(0,0,0,0.18);
}

.auth-form-wrap {
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0;
}
.auth-form-content {
    background: rgba(24, 34, 44, 0.78);
    box-shadow: 0 8px 32px 0 rgba(0,0,0,0.18), 0 1.5px 8px 0 rgba(0,0,0,0.10);
    border: 1.5px solid rgba(255,255,255,0.13);
    border-radius: 0 !important;
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    padding: 38px 32px 32px 32px;
    margin: 0 auto;
    width: 100%;
    max-width: 370px;
    transition: box-shadow 0.2s;
}

.auth-form-content h1.auth-heading {
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
    margin-bottom: 0.5rem;
}

.auth-form-content .auth-system-sub {
    font-size: 13px;
    color: #b6c2d1;
    margin-bottom: 1.2rem;
}

.auth-form-content .form-control.auth-input {
    background: rgba(255,255,255,0.10);
    border: 1.5px solid rgba(255,255,255,0.18);
    color: #e2e8f0;
    border-radius: 0 !important;
    font-size: 15px;
    padding: 12px 14px;
    margin-bottom: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 1.5px 8px 0 rgba(0,0,0,0.07);
}

.auth-form-content .form-control.auth-input:focus {
    border-color: #1d9e75;
    box-shadow: 0 0 0 3px rgba(29, 158, 117, 0.13);
    background: rgba(255,255,255,0.16);
}

.auth-form-content .auth-password-wrap .auth-password-toggle {
    color: #b6c2d1;
    background: rgba(255,255,255,0.10);
    border-radius: 0 !important;
    transition: background 0.2s;
}
.auth-form-content .auth-password-wrap .auth-password-toggle:hover {
    background: rgba(255,255,255,0.18);
}

.auth-form-content .btn.auth-signin-btn {
    background: linear-gradient(90deg, #1d9e75 0%, #159b8a 100%);
    color: #fff;
    border-radius: 0 !important;
    font-size: 1.13rem;
    font-weight: 600;
    min-height: 46px;
    box-shadow: 0 2px 12px 0 rgba(29, 158, 117, 0.13);
    transition: background 0.2s, box-shadow 0.2s;
    border: none;
}
.auth-form-content .btn.auth-signin-btn:hover {
    background: linear-gradient(90deg, #159b8a 0%, #1d9e75 100%);
    color: #fff;
    box-shadow: 0 6px 24px 0 rgba(29, 158, 117, 0.18);
}

.auth-form-content .auth-meta-row {
    margin-bottom: 18px;
    gap: 8px;
}

.auth-form-content .auth-links-footer {
    margin-top: 24px;
    color: #b6c2d1;
    font-size: 12px;
    letter-spacing: 0.01em;
}

.auth-links-footer {
    margin-top: 32px;
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 10px;
    color: #64748b;
    justify-content: center;
}

@media (max-width: 1100px) {
    .auth-unified-left {
        padding: 36px 24px 24px 24px;
        max-width: 420px;
    }
    .auth-unified-right {
        min-width: 340px;
        max-width: 100vw;
        padding: 0 16px;
    }
}

@media (max-width: 900px) {
    .auth-unified-content {
        flex-direction: column;
        align-items: stretch;
        height: auto;
    }
    .auth-unified-left {
        max-width: 100vw;
        padding: 32px 16px 16px 16px;
        align-items: flex-start;
    }
    .auth-unified-right {
        width: 100vw;
        min-width: 0;
        max-width: 100vw;
        padding: 0 8vw 32px 8vw;
        box-shadow: none;
        margin-top: 0;
    }
}

@media (max-width: 600px) {
    .login-unified {
        padding: 0;
    }
    .auth-unified-content {
        flex-direction: column;
        padding: 0;
    }
    .auth-unified-left {
        padding: 18px 6vw 8px 6vw;
    }
    .auth-unified-right {
        padding: 0 4vw 24px 4vw;
    }
    .auth-form-content {
        max-width: 100vw;
    }
}
:root {
    --auth-navy: #1b2b3a;
    --auth-teal: #1d9e75;
    --auth-text: #0f172a;
    --auth-muted: #6b7280;
    --auth-border: #d1d5db;
    --auth-login-bg-image: url('/Resort-Reservation-System/public/assets/images/background%281%29.png');
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body.page-auth {
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    width: 100vw !important;
    max-width: 100vw !important;
}

body.page-auth .main-content,
body.page-auth .content-wrapper,
body.page-auth .page-wrapper,
body.page-auth #main,
body.page-auth #content {
    margin-left: 0 !important;
    padding-left: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
}

body.page-auth .sidebar,
body.page-auth #sidebar,
body.page-auth nav.sidebar {
    display: none !important;
}

body.page-auth .login-wrapper {
    display: flex;
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: transparent !important;
}

body.page-auth .login-left {
    width: 420px;
    min-width: 420px;
    flex-shrink: 0;
    height: 100vh;
    overflow: hidden;
    background: transparent !important;
    padding: 28px 30px;
    display: flex;
    flex-direction: column;
}

body.page-auth .login-right {
    flex: 1;
    height: 100vh;
    background: transparent !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 36px 40px;
    position: relative;
}

body.login-page,
body.forgot-password-page {
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--auth-text);
    background: #1b2b3a;
}





.auth-left-panel {
    background: transparent !important;
}

.auth-left-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px 20px 16px;
    justify-content: space-between;
    background: rgba(15, 23, 42, 0.3);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 4px !important;
}

.auth-logo-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: max(0px, env(safe-area-inset-top));
    justify-content: flex-end;
}

.auth-logo-mark {
    width: 30px;
    height: 30px;
    border-radius: 4px !important;
    background: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-logo-inner {
    width: 12px;
    height: 12px;
    border-radius: 2px !important;
    background: #1d9e75;
    display: block;
}

.auth-system-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    color: #e2e8f0;
}

.auth-system-sub {
    font-size: 10px;
    color: #94a3b8;
    line-height: 1.2;
}

.auth-form-wrap {
    flex: 1;
    display: flex;
    align-items: center;
}

.auth-form-content {
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
}

.auth-heading {
    font-size: 20px;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -0.02em;
}

.auth-sub {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.5;
}

.auth-alert {
    border-radius: 4px !important;
    font-size: 12px;
}

.auth-label {
    font-size: 12px;
    font-weight: 500;
    color: #cbd5e1;
    margin-bottom: 6px;
}

.auth-input {
    height: 38px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 4px !important;
    font-size: 13px;
    color: #e2e8f0;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.04);
}

.auth-input::placeholder {
    color: #94a3b8;
}

.auth-input:focus {
    border-color: #1d9e75;
    box-shadow: 0 0 0 3px rgba(29, 158, 117, 0.1);
}

.auth-password-wrap {
    position: relative;
}

.auth-password-wrap .auth-input {
    padding-right: 40px;
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border: 0;
    background: transparent;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus-visible {
    color: #e2e8f0;
    background: transparent;
    box-shadow: none !important;
}

.auth-recaptcha-wrap {
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 0 !important;
    background: rgba(255,255,255,0.10);
    border: 1.5px solid rgba(255,255,255,0.18);
    padding: 14px 12px 10px 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    box-shadow: 0 1.5px 8px 0 rgba(0,0,0,0.07);
}

.auth-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 12px 0 16px;
}

.auth-meta-row .form-check-label,
.auth-meta-row .form-check-input {
    font-size: 13px;
    color: #e2e8f0 !important;
    font-weight: 500;
}

.auth-forgot-link {
    font-size: 12px;
    color: #cbd5e1;
    text-decoration: none;
}

.auth-forgot-link:hover {
    color: #1d9e75;
}

.auth-signin-btn {
    width: 100%;
    height: 40px;
    border: 0;
    border-radius: 4px !important;
    background: #1d9e75;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-signin-btn:hover,
.auth-signin-btn:focus-visible {
    background: #157a5b;
    color: #ffffff;
}

.auth-access-box {
    margin-top: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 4px !important;
    padding: 11px 13px;
}

.auth-access-title {
    font-size: 11px;
    font-weight: 600;
    color: #e2e8f0;
}

.auth-access-text {
    margin-top: 2px;
    font-size: 10px;
    color: #94a3b8;
}

.auth-access-link {
    display: inline-block;
    margin-top: 4px;
    font-size: 11px;
    color: #1d9e75;
    font-weight: 600;
    text-decoration: none;
}

.auth-access-link:hover {
    color: #14785a;
}

.auth-links-footer {
    margin-top: auto;
    display: inline-flex;
    gap: 8px;
    align-items: center;
    font-size: 10px;
    color: #64748b;
}

.auth-links-footer a {
    color: #64748b;
    text-decoration: none;
}

.auth-links-footer a:hover {
    color: #94a3b8;
}

.auth-right-panel {
    background: transparent !important;
    color: #e2e8f0;
    overflow: hidden;
}

.auth-corner-accent {
    position: absolute;
    pointer-events: none;
}

.auth-corner-top {
    top: 0;
    right: 0;
    width: 160px;
    height: 160px;
    background: rgba(29, 158, 117, 0.07);
    border-radius: 0 0 0 100%;
}

.auth-corner-bottom {
    left: 0;
    bottom: 0;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0 100% 0 0;
}

.auth-right-content {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 0;
    max-width: 560px;
}

.auth-right-panel,
.auth-left-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px 20px 16px;
    justify-content: space-between;
    background: transparent !important;
    border: none !important;
    border-radius: 4px !important;
}

.auth-right-title {
    margin-top: 8px;
    margin-bottom: 10px;
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.auth-right-title span {
    color: #1d9e75;
}

.auth-right-sub {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.6;
    max-width: 320px;
    margin-bottom: 16px;
}

.auth-feature-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 520px;
    align-items: flex-end;
    margin-top: 0 !important;
}

.auth-feature-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 4px !important;
    padding: 12px 14px;
    display: flex;
    gap: 12px;
}

.auth-feature-icon {
    width: 30px;
    min-width: 30px;
    height: 30px;
    background: rgba(29, 158, 117, 0.15);
    border-radius: 4px !important;
    color: #1d9e75;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    overflow: hidden;
}

.auth-feature-icon svg {
    display: block;
    width: 16px;
    height: 16px;
    min-width: 16px;
    max-width: none;
    flex: 0 0 auto;
}

.auth-feature-card h3 {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #f1f5f9;
}

.auth-feature-card p {
    margin: 3px 0 0;
    font-size: 11px;
    color: #64748b;
    line-height: 1.45;
}

.auth-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin-top: 10px;
}

.auth-stat-cell {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 4px !important;
    padding: 10px 12px;
}

.auth-stat-label {
    font-size: 9px;
    text-transform: uppercase;
    color: #475569;
    letter-spacing: 0.05em;
}

.auth-stat-value {
    margin-top: 2px;
    font-size: 12px;
    font-weight: 600;
    color: #e2e8f0;
}

.auth-right-footer {
    margin-top: 16px;
    font-size: 10px;
    color: #334155;
}

/* Keep forgot-password page usable with existing view structure */
.auth-card {
    border: 1px solid #e5e7eb;
    border-radius: 4px !important;
    background: #ffffff;
}

.auth-panel {
    padding: 24px;
}

.auth-brand {
    width: 42px;
    height: 42px;
    border-radius: 4px !important;
    background: #eef2f7;
    color: #1b2b3a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.auth-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.auth-subtitle {
    font-size: 13px;
    color: #6b7280;
}

.auth-form .form-control {
    height: 38px;
    border: 1px solid #d1d5db;
    border-radius: 4px !important;
    font-size: 13px;
}

.auth-form .form-control:focus {
    border-color: #1d9e75;
    box-shadow: 0 0 0 3px rgba(29, 158, 117, 0.1);
}

.auth-submit {
    min-height: 40px;
    border: 0;
    border-radius: 4px !important;
    background: #1b2b3a;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
}

.auth-back-link {
    color: #1d9e75;
    text-decoration: none;
    font-weight: 600;
}

.auth-back-link:hover {
    color: #14785a;
}

@media (max-width: 767.98px) {
    body.page-auth .login-right {
        display: none !important;
    }

    body.page-auth .login-left {
        width: 100vw !important;
        min-width: 0 !important;
        padding: 24px 20px !important;
    }

    .auth-left-inner {
        padding: 16px;
    }

    .auth-logo-row {
        padding-top: max(0px, env(safe-area-inset-top));
    }

    .auth-input,
    .auth-form .form-control,
    .auth-form .form-select {
        font-size: 16px;
    }

    .auth-signin-btn {
        min-height: 48px;
    }

    .auth-meta-row {
        flex-wrap: wrap;
    }
}

/* Unified auth theme overrides */
body.page-auth.login-page {
    font-family: 'DM Sans', 'Segoe UI', sans-serif;
    background:
        linear-gradient(rgba(8, 47, 73, 0.42), rgba(14, 116, 144, 0.36)),
        var(--auth-login-bg-image),
        radial-gradient(circle at top left, rgba(20, 184, 166, 0.18), transparent 32%),
        linear-gradient(135deg, #082f49 0%, #0e7490 48%, #118ab2 100%);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}

body.page-auth .auth-form-content,
body.page-auth .auth-panel-login,
body.page-auth .auth-card {
    border-radius: 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 24px 60px rgba(8, 47, 73, 0.28), 0 8px 24px rgba(15, 23, 42, 0.14);
}

body.page-auth .auth-form-content,
body.page-auth .auth-panel-login {
    background: rgba(15, 23, 42, 0.72) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

body.page-auth .auth-stage,
body.page-auth .auth-stage-inner {
    min-height: 100vh;
}

body.page-auth .auth-glass-card {
    width: 100%;
    max-width: 370px;
    padding: 36px 32px;
    border-radius: 6px !important;
}

body.page-auth .auth-heading-lg {
    font-size: 1.6rem;
}

body.page-auth .auth-meta-row-spread {
    justify-content: space-between;
}

body.page-auth .auth-recaptcha-wrap {
    background: transparent;
    border: none;
    padding: 0;
}

body.page-auth .auth-title,
body.page-auth .auth-heading,
body.page-auth .auth-card h1,
body.page-auth .auth-card h2,
body.page-auth .auth-card h3 {
    font-family: 'Inter', 'DM Sans', sans-serif;
    color: #f8fafc !important;
    letter-spacing: -0.02em;
}

body.page-auth .auth-subtitle,
body.page-auth .auth-system-sub,
body.page-auth .auth-panel-login .auth-subtitle {
    color: #cbd5e1 !important;
}

body.page-auth .auth-label,
body.page-auth .form-label {
    color: #e2e8f0 !important;
    font-size: 13px;
    font-weight: 600;
}

body.page-auth .auth-input,
body.page-auth .auth-form .form-control,
body.page-auth .auth-form .form-select,
body.page-auth .auth-panel-login .form-control {
    min-height: 46px;
    border-radius: 12px !important;
    border: 1.5px solid rgba(226, 232, 240, 0.18);
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}

body.page-auth .auth-input::placeholder,
body.page-auth .auth-form .form-control::placeholder {
    color: #94a3b8;
}

body.page-auth .auth-input:focus,
body.page-auth .auth-form .form-control:focus,
body.page-auth .auth-panel-login .form-control:focus {
    border-color: #67e8f9;
    box-shadow: 0 0 0 4px rgba(103, 232, 249, 0.14);
    background: rgba(255, 255, 255, 0.14);
}

body.page-auth .auth-signin-btn,
body.page-auth .auth-submit {
    min-height: 46px;
    border-radius: 12px !important;
    border: none;
    background: linear-gradient(135deg, #f59e0b, #f97316) !important;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 14px 28px rgba(249, 115, 22, 0.18);
}

body.page-auth .auth-signin-btn:hover,
body.page-auth .auth-submit:hover,
body.page-auth .auth-signin-btn:focus-visible,
body.page-auth .auth-submit:focus-visible {
    background: linear-gradient(135deg, #ea580c, #f59e0b) !important;
    box-shadow: 0 18px 32px rgba(249, 115, 22, 0.22);
}

body.page-auth .auth-links-footer a,
body.page-auth .auth-forgot-link,
body.page-auth .auth-back-link {
    color: #67e8f9 !important;
}

body.page-auth .auth-links-footer a:hover,
body.page-auth .auth-forgot-link:hover,
body.page-auth .auth-back-link:hover {
    color: #ffffff !important;
}

body.page-auth .alert {
    border-radius: 14px !important;
}

body.page-auth .auth-password-toggle,
body.page-auth .auth-access-box,
body.page-auth .auth-left-inner,
body.page-auth .auth-logo-mark,
body.page-auth .auth-logo-inner,
body.page-auth .auth-alert,
body.page-auth .auth-note-card,
body.page-auth .auth-recaptcha-wrap,
body.page-auth .badge,
body.page-auth .btn,
body.page-auth .form-control,
body.page-auth .form-select {
    border-radius: 12px !important;
}

body.page-auth .auth-password-toggle {
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.page-auth .auth-glass-card-narrow {
    max-width: 420px;
}

body.page-auth .auth-verify-card {
    max-width: 480px;
    padding: 2.3rem 2rem 1.75rem;
}

body.page-auth .auth-glass-card-wide {
    max-width: 780px;
}

body.page-auth .auth-brand-strong {
    width: 52px;
    height: 52px;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.12);
    color: #f8fafc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

body.page-auth .auth-section-title {
    color: #f8fafc;
    font-family: 'Inter', 'DM Sans', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

body.page-auth .auth-note-card {
    padding: 1rem 1.05rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.page-auth .auth-setup-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

body.page-auth .auth-qr-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.95);
}

body.page-auth .auth-qr-image {
    width: 100%;
    max-width: 200px;
    height: auto;
}

body.page-auth .auth-code-block {
    padding: 0.95rem 1rem;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f8fafc;
    text-align: center;
    word-break: break-all;
}

body.page-auth .auth-backup-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem 0.75rem;
}

body.page-auth .auth-backup-grid code {
    display: inline-flex;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}

body.page-auth .auth-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

body.page-auth .auth-inline-actions .btn {
    flex: 1 1 220px;
}

body.page-auth .auth-verify-block {
    display: grid;
    gap: 0.7rem;
}

body.page-auth .auth-otp-shell {
    padding: 0.95rem 0.95rem 0.8rem;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

body.page-auth .auth-otp-row {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0 auto 0.5rem;
}

body.page-auth .auth-otp-inline {
    display: grid !important;
    grid-template-columns: repeat(6, 40px) !important;
    gap: 8px !important;
    width: max-content !important;
    max-width: none !important;
    margin: 0 auto !important;
}

body.page-auth .auth-token-input {
    letter-spacing: 0.3em;
}

body.page-auth #otp-fields.auth-otp-grid {
    display: grid !important;
    grid-template-columns: repeat(6, 40px) !important;
    gap: 8px !important;
    width: max-content !important;
    max-width: none !important;
    margin: 0 auto !important;
}

body.page-auth #otp-fields.auth-otp-grid .otp-input {
    display: block !important;
    width: 40px !important;
    max-width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0 !important;
    margin: 0 !important;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    line-height: 40px;
    border-radius: 14px !important;
    border-color: rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    color: #f8fafc;
    appearance: none;
    -webkit-appearance: none;
}

body.page-auth .auth-totp-timer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    min-height: 30px;
    padding: 0 0.8rem;
    border-radius: 999px !important;
    background: rgba(226, 232, 240, 0.06);
    border: 1px solid rgba(226, 232, 240, 0.14);
    color: #e2e8f0;
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.08em;
}

body.page-auth .auth-totp-timer-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}

body.page-auth .auth-totp-pulse {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #e2e8f0;
    box-shadow: 0 0 0 0 rgba(226, 232, 240, 0.42);
    animation: authTotpPulse 1.6s ease-out infinite;
}

@keyframes authTotpPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(226, 232, 240, 0.42);
        opacity: 1;
    }

    70% {
        box-shadow: 0 0 0 10px rgba(226, 232, 240, 0);
        opacity: 0.7;
    }

    100% {
        box-shadow: 0 0 0 0 rgba(226, 232, 240, 0);
        opacity: 1;
    }
}

body.page-auth .auth-verify-help {
    max-width: 25rem;
    margin: 0 auto;
    line-height: 1.55;
}

body.page-auth .auth-verify-alt {
    margin-top: 0.1rem;
}

body.page-auth .auth-verify-alt .auth-back-link {
    font-size: 0.98rem;
    font-weight: 700;
}

body.page-auth .auth-form-check .form-check-label {
    color: #e2e8f0 !important;
    font-weight: 600;
}

body.page-auth .auth-verify-trust {
    padding: 0.75rem 0.9rem;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

body.page-auth .auth-verify-trust .form-check-input {
    margin-top: 0.15rem;
    border-color: rgba(203, 213, 225, 0.42);
    background-color: rgba(255, 255, 255, 0.96);
}

body.page-auth .auth-verify-trust .form-check-input:checked {
    background-color: #14b8a6;
    border-color: #14b8a6;
}

body.page-auth .auth-links-footer {
    justify-content: center;
}

body.page-auth .auth-links-footer .auth-back-link {
    color: #94a3b8 !important;
    font-weight: 700;
}

body.page-auth .auth-links-footer .auth-back-link:hover {
    color: #f8fafc !important;
}

@media (max-width: 767.98px) {
    body.page-auth .auth-glass-card-wide {
        max-width: 100%;
    }

    body.page-auth .auth-verify-card {
        max-width: 100%;
        padding: 2rem 1.2rem 1.5rem;
    }

    body.page-auth .auth-otp-inline {
        gap: 0.42rem !important;
    }

    body.page-auth .auth-setup-grid,
    body.page-auth .auth-backup-grid {
        grid-template-columns: 1fr;
    }

    body.page-auth #otp-fields.auth-otp-grid .otp-input {
        width: 46px !important;
        max-width: 46px;
        min-width: 46px;
        height: 48px;
        font-size: 1.1rem;
        border-radius: 12px !important;
        margin: 0 0.16rem !important;
    }
}

@media (max-width: 575.98px) {
    body.page-auth .auth-verify-card {
        padding: 1.7rem 0.95rem 1.25rem;
    }

    body.page-auth .auth-otp-shell {
        padding: 0.85rem 0.7rem 0.75rem;
    }

    body.page-auth .auth-otp-inline {
        gap: 0.32rem !important;
    }
}

/* Final simplified verify 2FA form */
body.page-auth .auth-verify-card-simple {
    max-width: 430px;
    padding: 2.2rem 2rem 1.75rem;
}

body.page-auth .auth-verify-card-simple .auth-heading {
    max-width: none;
}

body.page-auth .auth-verify-panel {
    display: grid;
    gap: 0.85rem;
    padding: 1.1rem 1rem 0.95rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

body.page-auth .auth-verify-card-simple .auth-label {
    color: #dbe7f3;
    font-weight: 700;
}

body.page-auth .auth-verify-code-wrap {
    position: relative;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
}

body.page-auth .auth-verify-code-input {
    width: 100%;
    max-width: none;
    min-height: 58px;
    margin: 0;
    padding: 12px 80px 12px 20px;
    border-radius: 9px !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    background: rgba(255, 255, 255, 0.06) !important;
    color: #f8fafc !important;
    font-size: 26px;
    font-weight: 500;
    letter-spacing: 0.2em;
    font-variant-numeric: tabular-nums;
    text-indent: 0.2em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.page-auth .auth-verify-code-input::placeholder {
    color: rgba(226, 232, 240, 0.42);
    letter-spacing: 0.2em;
}

body.page-auth .auth-verify-code-input:focus {
    border-color: rgba(45, 212, 191, 0.55) !important;
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.12) !important;
}

body.page-auth .auth-totp-badge {
    position: absolute;
    top: 50%;
    right: 10px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 3px 9px 3px 6px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.25);
    transform: translateY(-50%);
    pointer-events: none;
}

body.page-auth .auth-totp-badge-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

body.page-auth .auth-totp-track,
body.page-auth .auth-totp-progress {
    fill: none;
    stroke-width: 2;
}

body.page-auth .auth-totp-track {
    stroke: rgba(255, 255, 255, 0.15);
}

body.page-auth .auth-totp-progress {
    stroke: #1D9E75;
    stroke-linecap: round;
    stroke-dasharray: 40.8;
    stroke-dashoffset: 0;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    transition: stroke-dashoffset 1s linear, stroke 1s linear;
}

body.page-auth .auth-totp-seconds {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.2rem;
    color: #1D9E75;
    font-size: 11px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    transition: color 1s linear;
}

body.page-auth .auth-backup-input {
    max-width: 240px;
    margin: 0 auto;
    text-align: center;
    letter-spacing: 0.14em;
}

body.page-auth .auth-verify-alt .auth-back-link {
    color: #2dd4bf !important;
    font-size: 0.98rem;
    font-weight: 700;
}

body.page-auth .auth-verify-alt .auth-back-link:hover {
    color: #7dd3fc !important;
}

body.page-auth .auth-verify-trust {
    max-width: 100%;
    padding: 0.8rem 0.95rem;
    border-radius: 16px !important;
    color: #dbe7f3 !important;
    opacity: 1 !important;
}

body.page-auth .auth-verify-trust .form-check-label,
body.page-auth .auth-verify-trust .form-check-input,
body.page-auth .auth-links-footer .auth-back-link {
    color: #dbe7f3 !important;
}

body.page-auth .auth-verify-trust-label {
    color: #dbe7f3 !important;
    opacity: 1 !important;
}

body.page-auth .auth-links-footer .auth-back-link {
    font-weight: 700;
}

body.page-auth .auth-links-footer .auth-back-link:hover {
    color: #ffffff !important;
}

@media (max-width: 575.98px) {
    body.page-auth .auth-verify-card-simple {
        padding: 1.8rem 1.1rem 1.4rem;
    }

    body.page-auth .auth-verify-panel {
        padding: 0.95rem 0.8rem 0.85rem;
    }

    body.page-auth .auth-verify-code-wrap {
        max-width: 100%;
    }

    body.page-auth .auth-verify-code-input {
        min-height: 54px;
        padding: 11px 74px 11px 16px;
        font-size: 22px;
        letter-spacing: 0.16em;
        text-indent: 0.16em;
    }
}

/* ==========================================================================
   Final auth viewport stabilization
   ========================================================================== */

html.page-auth,
body.page-auth {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    min-height: 100dvh !important;
    margin: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

body.page-auth .login-unified,
body.page-auth .auth-stage,
body.page-auth .auth-stage-inner,
body.page-auth .auth-unified-content,
body.page-auth .login-wrapper,
body.page-auth .auth-shell-login,
body.page-auth .auth-login-layout {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    min-height: 100dvh !important;
    margin: 0 !important;
    overflow-x: hidden !important;
}

body.page-auth.login-page {
    background-position: center center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
}

.auth-mobile-eyebrow {
    display: inline-block;
    margin-bottom: 0.55rem;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

@media (pointer: coarse) and (max-width: 1023.98px) {
    html.page-auth,
    body.page-auth,
    body.page-auth .login-unified,
    body.page-auth .auth-stage,
    body.page-auth .auth-stage-inner,
    body.page-auth .auth-unified-content,
    body.page-auth .login-wrapper,
    body.page-auth .auth-shell-login,
    body.page-auth .auth-login-layout {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        min-height: 100dvh !important;
    }

    body.page-auth .auth-stage,
    body.page-auth .auth-stage-inner,
    body.page-auth .auth-form-wrap {
        display: flex !important;
        align-items: flex-start !important;
        justify-content: center !important;
    }

    body.page-auth .auth-stage,
    body.page-auth .auth-stage-inner,
    body.page-auth .auth-form-wrap,
    body.page-auth .auth-unified-right,
    body.page-auth .login-left,
    body.page-auth .login-right {
        padding-left: max(16px, env(safe-area-inset-left)) !important;
        padding-right: max(16px, env(safe-area-inset-right)) !important;
    }

    body.page-auth .auth-stage,
    body.page-auth .auth-stage-inner {
        padding-top: max(16px, env(safe-area-inset-top)) !important;
        padding-bottom: max(16px, env(safe-area-inset-bottom)) !important;
    }

    body.page-auth .auth-unified-content {
        flex-direction: column !important;
        height: auto !important;
    }

    body.page-auth .auth-unified-left,
    body.page-auth .auth-unified-right,
    body.page-auth .login-left,
    body.page-auth .login-right {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        min-height: 0 !important;
    }

    body.page-auth .auth-form-wrap,
    body.page-auth .auth-form-content,
    body.page-auth .auth-panel-login,
    body.page-auth .auth-glass-card {
        width: 100% !important;
        max-width: min(100%, 420px) !important;
    }
}

@media (pointer: coarse) and (orientation: landscape) and (max-width: 1023.98px) {
    body.page-auth,
    body.page-auth .login-unified,
    body.page-auth .auth-stage,
    body.page-auth .auth-stage-inner {
        overflow-y: auto !important;
    }

    body.page-auth .auth-form-content,
    body.page-auth .auth-panel-login,
    body.page-auth .auth-glass-card {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        max-width: min(100%, 460px) !important;
    }
}

@media (pointer: coarse) and (max-width: 767.98px) {
    body.page-auth.login-page {
        background:
            linear-gradient(180deg, #f6fafc 0%, #eef4f8 100%) !important;
    }

    body.page-auth .auth-stage,
    body.page-auth .auth-stage-inner {
        justify-content: flex-start !important;
        background: transparent !important;
    }

    body.page-auth .auth-form-wrap {
        max-width: none !important;
        padding-left: max(16px, env(safe-area-inset-left)) !important;
        padding-right: max(16px, env(safe-area-inset-right)) !important;
        padding-top: max(28px, env(safe-area-inset-top)) !important;
    }

    body.page-auth .auth-form-content,
    body.page-auth .auth-panel-login,
    body.page-auth .auth-glass-card {
        max-width: 100% !important;
        width: 100% !important;
        padding: 1.4rem 0 1rem !important;
        border-radius: 0 !important;
        border: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    body.page-auth .text-center.mb-4 {
        margin-bottom: 1.35rem !important;
        text-align: left !important;
    }

    body.page-auth .auth-heading,
    body.page-auth .auth-heading-lg,
    body.page-auth .auth-title {
        font-size: 1.8rem !important;
        line-height: 1.12 !important;
        color: #0f172a !important;
        letter-spacing: -0.03em !important;
    }

    body.page-auth .auth-system-sub {
        font-size: 0.96rem !important;
        line-height: 1.42 !important;
        color: #61748d !important;
    }

    body.page-auth .auth-mobile-eyebrow {
        display: inline-block !important;
        margin-bottom: 0.7rem !important;
        color: #6b819d !important;
        font-size: 0.73rem !important;
        letter-spacing: 0.14em !important;
    }

    body.page-auth .mb-3 {
        margin-bottom: 1rem !important;
    }

    body.page-auth .auth-label,
    body.page-auth .form-label {
        margin-bottom: 0.45rem !important;
        font-size: 0.82rem !important;
        font-weight: 700 !important;
        color: #6a7e98 !important;
        letter-spacing: 0.01em !important;
    }

    body.page-auth .auth-input,
    body.page-auth .auth-form .form-control,
    body.page-auth .auth-panel-login .form-control {
        min-height: 48px !important;
        padding: 0.8rem 1rem !important;
        border-radius: 14px !important;
        font-size: 0.95rem !important;
        background: #ffffff !important;
        border: 1px solid rgba(148, 163, 184, 0.22) !important;
        color: #0f172a !important;
        box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06) !important;
    }

    body.page-auth .auth-input::placeholder,
    body.page-auth .auth-form .form-control::placeholder {
        color: #94a3b8 !important;
    }

    body.page-auth .auth-input:focus,
    body.page-auth .auth-form .form-control:focus,
    body.page-auth .auth-panel-login .form-control:focus {
        border-color: rgba(14, 116, 144, 0.32) !important;
        box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.12), 0 10px 20px rgba(15, 23, 42, 0.06) !important;
    }

    body.page-auth .auth-password-toggle {
        width: 40px !important;
        min-width: 40px !important;
        height: 40px !important;
        right: 0.35rem !important;
        color: #7b8da4 !important;
        background: transparent !important;
    }

    body.page-auth .auth-meta-row {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 0.7rem !important;
        align-items: start !important;
    }

    body.page-auth .auth-meta-row .form-check,
    body.page-auth .auth-meta-row .auth-forgot-link {
        justify-self: start !important;
    }

    body.page-auth .auth-meta-row .form-check-label,
    body.page-auth .auth-forgot-link,
    body.page-auth .auth-links-footer a,
    body.page-auth .auth-links-footer span,
    body.page-auth .small {
        color: #64748b !important;
    }

    body.page-auth .auth-forgot-link,
    body.page-auth .auth-links-footer a {
        font-weight: 600 !important;
    }

    body.page-auth .auth-signin-btn,
    body.page-auth .auth-submit {
        min-height: 48px !important;
        border-radius: 14px !important;
        font-size: 1rem !important;
        margin-top: 0.2rem !important;
        background: linear-gradient(180deg, #1f2b44 0%, #162238 100%) !important;
        border: 1px solid rgba(31, 43, 68, 0.22) !important;
        color: #ffffff !important;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12) !important;
    }

    body.page-auth .auth-signin-btn:hover,
    body.page-auth .auth-submit:hover,
    body.page-auth .auth-signin-btn:focus-visible,
    body.page-auth .auth-submit:focus-visible {
        background: linear-gradient(180deg, #213152 0%, #182844 100%) !important;
    }

    body.page-auth .auth-links-footer {
        margin-top: 1.2rem !important;
        font-size: 0.8rem !important;
        line-height: 1.5 !important;
        text-align: left !important;
    }

    body.page-auth .auth-links-footer span {
        margin: 0 0.3rem !important;
    }
}

@media (pointer: coarse) and (orientation: landscape) and (max-width: 767.98px) {
    body.page-auth .auth-stage,
    body.page-auth .auth-stage-inner {
        padding-top: max(10px, env(safe-area-inset-top)) !important;
        padding-bottom: max(10px, env(safe-area-inset-bottom)) !important;
    }

    body.page-auth .auth-form-wrap {
        padding-top: max(12px, env(safe-area-inset-top)) !important;
    }

    body.page-auth .auth-form-content,
    body.page-auth .auth-panel-login,
    body.page-auth .auth-glass-card {
        max-width: min(100%, 520px) !important;
        padding: 1rem 0 0.95rem !important;
    }

    body.page-auth .text-center.mb-4 {
        margin-bottom: 0.8rem !important;
    }

    body.page-auth .auth-heading,
    body.page-auth .auth-heading-lg,
    body.page-auth .auth-title {
        font-size: 1.32rem !important;
    }

    body.page-auth .auth-system-sub {
        font-size: 0.82rem !important;
    }

    body.page-auth .mb-3 {
        margin-bottom: 0.85rem !important;
    }
}
@media (max-width: 767.98px) {
    body.page-auth.login-page {
        background: #f8fafc !important;
        background-image: none !important;
    }

    body.page-auth .login-unified,
    body.page-auth .auth-stage,
    body.page-auth .auth-stage-inner {
        background: transparent !important;
        background-image: none !important;
    }

    body.page-auth .auth-form-content,
    body.page-auth .auth-glass-card,
    body.page-auth .auth-panel-login {
        background: transparent !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border: 0 !important;
        box-shadow: none !important;
    }
}
@media (max-width: 767.98px) {

    /* Fix top spacing — too much dead space */
    body.page-auth .auth-stage,
    body.page-auth .auth-stage-inner {
        align-items: flex-start !important;
        padding-top: max(48px, env(safe-area-inset-top)) !important;
    }

    /* Bring back the Sign In heading in dark color */
    body.page-auth .auth-heading,
    body.page-auth .auth-heading-lg {
        color: #0f172a !important;
        font-size: 1.75rem !important;
        display: block !important;
    }

    /* Fix eyebrow and subtitle colors */
    body.page-auth .auth-mobile-eyebrow {
        color: #94a3b8 !important;
    }

    body.page-auth .auth-system-sub {
        color: #64748b !important;
    }

    /* Fix broken username input — needs visible border */
    body.page-auth .auth-input,
    body.page-auth .form-control {
        background: #ffffff !important;
        border: 1.5px solid #dbe2ea !important;
        color: #0f172a !important;
        border-radius: 10px !important;
    }

    /* Make button consistent — drop orange, use dark */
    body.page-auth .auth-signin-btn {
        background: #0f172a !important;
        color: #ffffff !important;
        box-shadow: none !important;
    }

    body.page-auth .auth-signin-btn:hover {
        background: #1e293b !important;
    }

    /* Keep auth options accessible on mobile */
    body.page-auth .auth-meta-row .form-check {
        display: flex !important;
    }

    /* Keep forgot password aligned within the same row flow */
    body.page-auth .auth-meta-row {
        justify-content: flex-start !important;
    }
}
