/* =========================================
   Authentication Page
   Primary:   #3E4095
   Secondary: #65BC50
========================================= */

.auth-page {
    --auth-primary: #3E4095;
    --auth-primary-dark: #303276;
    --auth-secondary: #65BC50;
    --auth-bg: #F7F8FC;
    --auth-text: #24243A;
    --auth-muted: #77798F;
    --auth-border: #E6E7F0;
    --auth-white: #FFFFFF;

    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 680px;
    padding: 55px 20px;
    background:
        radial-gradient(
            circle at 8% 15%,
            rgba(101, 188, 80, 0.10),
            transparent 30%
        ),
        radial-gradient(
            circle at 90% 85%,
            rgba(62, 64, 149, 0.09),
            transparent 32%
        ),
        var(--auth-bg);
    color: var(--auth-text);
    font-family: inherit;
    box-sizing: border-box;
}

.auth-page *,
.auth-page *::before,
.auth-page *::after {
    box-sizing: border-box;
}

.auth-container {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
}

.auth-card {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding: 38px 36px 25px;
    background: var(--auth-white);
    border: 1px solid rgba(62, 64, 149, 0.07);
    border-radius: 22px;
    box-shadow:
        0 18px 55px rgba(42, 43, 96, 0.08),
        0 3px 12px rgba(42, 43, 96, 0.025);
}

.auth-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--auth-secondary),
        var(--auth-primary)
    );
}

/* Header */

.auth-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    margin-bottom: 25px;
    text-decoration: none;
}

.auth-logo img {
    display: block;
    width: auto;
    max-width: 190px;
    max-height: 75px;
    object-fit: contain;
}

.auth-logo-text {
    color: var(--auth-primary);
    font-size: 21px;
    font-weight: 800;
}

.auth-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 66px;
    height: 66px;
    margin-bottom: 17px;
    color: var(--auth-primary);
    background: rgba(62, 64, 149, 0.075);
    border: 1px solid rgba(62, 64, 149, 0.08);
    border-radius: 20px;
}

.auth-header-icon svg {
    width: 33px;
    height: 33px;
}

.auth-title {
    margin: 0;
    color: var(--auth-primary);
    font-size: 23px;
    font-weight: 800;
    line-height: 1.7;
}

.auth-subtitle {
    max-width: 300px;
    margin: 8px 0 0;
    color: var(--auth-muted);
    font-size: 13px;
    line-height: 2;
}

/* Messages */

.auth-messages {
    margin-top: 22px;
}

.auth-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 13px;
    margin-bottom: 12px;
    color: #6B5519;
    background: #FFF9E8;
    border: 1px solid #F3E7B8;
    border-radius: 11px;
    font-size: 12px;
    line-height: 1.9;
}

.auth-notice-icon {
    display: inline-flex;
    flex: 0 0 19px;
    align-items: center;
    justify-content: center;
    width: 19px;
    height: 19px;
    margin-top: 2px;
    color: #FFFFFF;
    background: #C69B2D;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
}

.auth-messages .alert {
    margin-bottom: 12px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.9;
}

/* Form */

.auth-form-wrapper {
    margin-top: 26px;
}

.auth-form {
    width: 100%;
    margin: 0;
}

.auth-field {
    margin-bottom: 23px;
}

.auth-label {
    display: block;
    margin-bottom: 10px;
    color: var(--auth-text);
    font-size: 13px;
    font-weight: 700;
}

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.auth-input-icon {
    position: absolute;
    right: 15px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 23px;
    height: 23px;
    color: var(--auth-primary);
    pointer-events: none;
}

.auth-input-icon svg {
    width: 22px;
    height: 22px;
}

.auth-input {
    display: block;
    width: 100%;
    height: 56px;
    padding: 0 49px 0 15px;
    color: var(--auth-text);
    background: #FAFAFD;
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    outline: none;
    box-shadow: none;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.2px;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.auth-input::placeholder {
    color: #A4A5B5;
    opacity: 1;
    font-size: 13px;
}

.auth-input:hover {
    border-color: #C8C9E0;
}

.auth-input:focus {
    background: #FFFFFF;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px rgba(62, 64, 149, 0.09);
}

.auth-input:focus-visible {
    outline: none;
}

.auth-field-hint {
    display: block;
    margin-top: 10px;
    color: var(--auth-muted);
    font-size: 11px;
    line-height: 1.9;
}

/* Submit Button */

.auth-submit {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 54px;
    padding: 13px 18px;
    color: #FFFFFF;
    background: var(--auth-primary);
    border: 1px solid var(--auth-primary);
    border-radius: 12px;
    box-shadow: 0 7px 18px rgba(62, 64, 149, 0.19);
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.auth-submit svg {
    width: 20px;
    height: 20px;
    transition: transform 0.2s ease;
}

.auth-submit:hover {
    color: #FFFFFF;
    background: var(--auth-primary-dark);
    border-color: var(--auth-primary-dark);
    box-shadow: 0 9px 23px rgba(62, 64, 149, 0.25);
}

.auth-submit:hover svg {
    transform: translateX(-3px);
}

.auth-submit:active {
    transform: translateY(1px);
}

.auth-submit:focus-visible {
    outline: 3px solid rgba(101, 188, 80, 0.55);
    outline-offset: 3px;
}

/* Terms */

.auth-terms {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 9px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #F0F0F6;
}

.auth-terms > svg {
    flex: 0 0 19px;
    width: 19px;
    height: 19px;
    margin-top: 2px;
    color: var(--auth-secondary);
}

.auth-terms p {
    margin: 0;
    color: var(--auth-muted);
    font-size: 11px;
    line-height: 2.1;
    text-align: center;
}

.auth-terms a {
    color: var(--auth-primary);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-terms a:hover {
    color: var(--auth-secondary);
    text-decoration: underline;
}

/* Footer */

.auth-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 20px;
    color: #8C8DA0;
    font-size: 11px;
}

.auth-footer-dot {
    width: 7px;
    height: 7px;
    background: var(--auth-secondary);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(101, 188, 80, 0.10);
}

.auth-bottom-text {
    margin-top: 22px;
    color: #85869A;
    font-size: 12px;
    text-align: center;
}

/* Responsive */

@media (max-width: 575.98px) {
    .auth-page {
        min-height: auto;
        padding: 28px 15px;
    }

    .auth-container {
        max-width: 420px;
    }

    .auth-card {
        padding: 30px 22px 23px;
        border-radius: 18px;
    }

    .auth-logo {
        margin-bottom: 21px;
    }

    .auth-logo img {
        max-width: 165px;
        max-height: 65px;
    }

    .auth-header-icon {
        width: 58px;
        height: 58px;
        margin-bottom: 13px;
        border-radius: 17px;
    }

    .auth-header-icon svg {
        width: 29px;
        height: 29px;
    }

    .auth-title {
        font-size: 21px;
    }

    .auth-subtitle {
        font-size: 12px;
    }

    .auth-messages {
        margin-top: 19px;
    }

    .auth-form-wrapper {
        margin-top: 23px;
    }

    .auth-input {
        height: 54px;
        font-size: 14px;
    }

    .auth-submit {
        min-height: 52px;
    }

    .auth-terms {
        margin-top: 22px;
        padding-top: 17px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-page *,
    .auth-page *::before,
    .auth-page *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}
/* =========================================
   Password Login - Additional Styles
========================================= */

.auth-back {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 12px;
    padding: 7px 10px;
    color: #77798F;
    background: #F7F8FC;
    border: 1px solid #E9EAF2;
    border-radius: 9px;
    font-size: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.auth-back i {
    font-size: 18px;
}

.auth-back:hover {
    color: #3E4095;
    background: #F0F0FA;
    border-color: #DADBF0;
    text-decoration: none;
}

.auth-password-wrapper {
    position: relative;
}

.auth-password-wrapper .auth-input {
    padding-left: 48px;
}

.auth-password-toggle {
    position: absolute;
    left: 10px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    padding: 0;
    color: #898BA0;
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.auth-password-toggle svg {
    width: 21px;
    height: 21px;
}

.auth-password-toggle:hover {
    color: #3E4095;
    background: rgba(62, 64, 149, 0.07);
}

.auth-password-toggle:focus-visible {
    outline: 2px solid #65BC50;
    outline-offset: 2px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0;
    color: #999AAC;
    font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #ECECF3;
}

.auth-divider span {
    flex: 0 0 auto;
}

.auth-otp-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 52px;
    padding: 12px 16px;
    color: #438C34;
    background: #F3FAF0;
    border: 1px solid rgba(101, 188, 80, 0.45);
    border-radius: 12px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-otp-button svg {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
}

.auth-otp-button:hover {
    color: #FFFFFF;
    background: #65BC50;
    border-color: #65BC50;
    box-shadow: 0 6px 16px rgba(101, 188, 80, 0.18);
}

.auth-otp-button:focus-visible {
    outline: 3px solid rgba(101, 188, 80, 0.4);
    outline-offset: 3px;
}

.auth-submit:disabled {
    opacity: 0.75;
    cursor: wait;
    box-shadow: none;
}

.auth-submit.auth-is-loading {
    pointer-events: none;
}

@media (max-width: 575.98px) {
    .auth-back {
        margin-bottom: 8px;
    }

    .auth-divider {
        margin: 19px 0;
    }

    .auth-otp-button {
        min-height: 50px;
        font-size: 12px;
    }
}

/* =========================================
   OTP Verification Page
   Primary:   #3E4095
   Secondary: #65BC50
========================================= */

.auth-code-icon {
    background: rgba(101, 188, 80, 0.11);
    color: #4E9C3B;
    border-color: rgba(101, 188, 80, 0.18);
}

.auth-mobile-display {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 17px;
    padding: 9px 14px;
    color: #3E4095;
    background: #F5F5FC;
    border: 1px solid #E8E8F5;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.auth-mobile-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: #438C34;
    background: rgba(101, 188, 80, 0.13);
    border-radius: 50%;
}

.auth-mobile-check svg {
    width: 13px;
    height: 13px;
}

.auth-code-input {
    display: block;
    width: 100%;
    height: 68px;
    padding: 10px 16px;
    color: #3E4095;
    background: #FAFAFD;
    border: 1px solid #E2E3EF;
    border-radius: 13px;
    outline: none;
    box-shadow: none;
    font-family: inherit;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 13px;
    text-align: center;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.auth-code-input::placeholder {
    color: #C9C9DC;
    opacity: 1;
    letter-spacing: 13px;
}

.auth-code-input:hover {
    border-color: #C8C9E0;
}

.auth-code-input:focus {
    background: #FFFFFF;
    border-color: #3E4095;
    box-shadow: 0 0 0 4px rgba(62, 64, 149, 0.09);
}

.auth-code-input:focus-visible {
    outline: none;
}

/* Countdown */

.auth-resend-section {
    margin-top: 24px;
}

.auth-countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 12px;
    color: #6F7088;
    background: #F8F8FC;
    border: 1px solid #ECECF5;
    border-radius: 12px;
}

.auth-countdown-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: #3E4095;
    background: #ECECF9;
    border-radius: 10px;
}

.auth-countdown-icon svg {
    width: 21px;
    height: 21px;
}

.auth-countdown p {
    margin: 0;
    font-size: 12px;
    line-height: 1.9;
}

.auth-countdown strong {
    display: inline-block;
    min-width: 23px;
    color: #3E4095;
    font-size: 15px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

/* Resend options */

.auth-resend-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 13px;
}

.auth-resend-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 48px;
    padding: 11px 14px;
    color: #3E4095;
    background: #F5F5FC;
    border: 1px solid #E4E4F2;
    border-radius: 11px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-resend-button svg {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
}

.auth-resend-button:hover:not(:disabled) {
    color: #FFFFFF;
    background: #3E4095;
    border-color: #3E4095;
    box-shadow: 0 5px 15px rgba(62, 64, 149, 0.14);
}

.auth-resend-button:disabled {
    opacity: 0.6;
    cursor: wait;
}

.auth-resend-button:focus-visible {
    outline: 3px solid rgba(101, 188, 80, 0.45);
    outline-offset: 3px;
}

.auth-voice-button {
    color: #438C34;
    background: #F3FAF0;
    border-color: rgba(101, 188, 80, 0.35);
}

.auth-voice-button:hover:not(:disabled) {
    color: #FFFFFF;
    background: #65BC50;
    border-color: #65BC50;
    box-shadow: 0 5px 15px rgba(101, 188, 80, 0.16);
}

/* Static password */

.auth-static-password {
    color: #3E4095;
    background: #FFFFFF;
    border-color: #E1E2F0;
}

.auth-static-password:hover {
    color: #FFFFFF;
    background: #3E4095;
    border-color: #3E4095;
}

/* Loading */

.auth-submit:disabled {
    opacity: 0.72;
    cursor: wait;
    box-shadow: none;
}

.auth-submit.auth-is-loading {
    pointer-events: none;
}

/* Responsive */

@media (max-width: 575.98px) {
    .auth-mobile-display {
        margin-top: 14px;
        font-size: 13px;
    }

    .auth-code-input {
        height: 62px;
        font-size: 25px;
        letter-spacing: 11px;
    }

    .auth-code-input::placeholder {
        letter-spacing: 11px;
    }

    .auth-resend-section {
        margin-top: 20px;
    }

    .auth-countdown {
        padding: 12px 9px;
    }

    .auth-countdown p {
        font-size: 11px;
    }

    .auth-resend-button {
        min-height: 46px;
        font-size: 11px;
    }
}