/* =========================================================
   LOGIN / REGISTER PAGE
   ========================================================= */

.login-main {
    background: var(--background);
    color: var(--text);
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(460px, 0.9fr);
    align-items: start;

    width: 100%;
    min-height: calc(100vh - 72px);

    background: var(--surface);
}


/* =========================================================
   LEFT SIDE
   ========================================================= */

.auth-left {
    position: sticky;
    top: 72px;

    width: 100%;
    height: calc(100vh - 72px);
    min-width: 0;

    overflow: hidden;
}

.login-hero-panel {
    position: relative;

    width: 100%;
    height: 100%;

    overflow: hidden;

    background: var(--deep);
}

.login-hero-bg {
    position: absolute;
    inset: 0;

    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: 58% center;
}

.login-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;

    background:
        linear-gradient(
            180deg,
            rgba(0, 0, 0, 0.08) 0%,
            rgba(0, 0, 0, 0.62) 100%
        ),
        linear-gradient(
            135deg,
            color-mix(in srgb, var(--brand) 35%, transparent),
            transparent 55%
        );
}

.login-hero-content {
    position: absolute;
    left: 7%;
    right: 7%;
    bottom: 8%;
    z-index: 2;

    max-width: 600px;

    color: #fff;
}

.login-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    margin-bottom: 20px;
    padding: 8px 12px;

    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;

    backdrop-filter: blur(10px);

    font-size: 13px;
    font-weight: 700;
}

.login-hero-badge svg {
    width: 15px;
    height: 15px;
}

.login-hero-title {
    max-width: 580px;
    margin: 0 0 18px;

    font-family: var(--font-heading);
    font-size: clamp(40px, 4vw, 60px);
    font-weight: 700;
    line-height: 1.06;

    color: #fff;
}

.login-hero-subtitle {
    max-width: 560px;
    margin: 0;

    color: rgba(255, 255, 255, 0.88);

    font-size: 18px;
    line-height: 1.7;
}

.login-hero-promise {
    display: flex;
    align-items: center;
    gap: 9px;

    margin-top: 26px;

    color: rgba(255, 255, 255, 0.92);

    font-size: 14px;
    font-weight: 600;
}

.login-hero-promise svg {
    flex: none;
}


/* =========================================================
   RIGHT FORM PANEL
   ========================================================= */

.auth-right {
    display: flex;
    align-items: flex-start;
    justify-content: center;

    min-width: 0;

    padding: 58px 40px 72px;

    background: var(--surface);
}

.login-form-panel {
    width: 100%;
    max-width: 560px;
}

.login-form-wrap {
    width: 100%;
}


/* MOBILE BRAND */

.login-mobile-brand {
    display: none;

    margin-bottom: 26px;
}

.login-mobile-brand img {
    display: block;
    width: min(230px, 70vw);
    height: 64px;

    object-fit: contain;
    object-position: left center;
}


/* =========================================================
   FORM HEADER
   ========================================================= */

.login-form-header {
    margin-bottom: 28px;
}

.login-form-kicker {
    display: block;

    margin-bottom: 8px;

    color: var(--brand);

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.login-form-title {
    margin: 0;

    color: var(--text);

    font-family: var(--font-heading);
    font-size: 40px;
    line-height: 1.15;
}

.login-form-subtitle {
    margin: 10px 0 0;

    color: var(--text-soft);

    font-size: 15px;
}


/* =========================================================
   TABS
   ========================================================= */

.login-tab-switcher {
    position: relative;

    display: grid;
    grid-template-columns: 1fr 1fr;

    margin-bottom: 30px;
    padding: 4px;

    background: var(--surface-soft);

    border: 1px solid var(--border);
    border-radius: 10px;
}

.login-tab {
    position: relative;
    z-index: 2;

    min-height: 46px;

    padding: 10px 16px;

    background: transparent;
    color: var(--text-soft);

    border: 0;
    border-radius: 7px;

    font: inherit;
    font-weight: 700;

    cursor: pointer;

    transition:
        color .2s ease,
        background .2s ease;
}

.login-tab.active {
    color: var(--brand);

    background: var(--surface);

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.06);
}


/* =========================================================
   FORM
   ========================================================= */

.login-form {
    width: 100%;
}

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

.form-label {
    display: flex;
    align-items: center;
    gap: 7px;

    margin-bottom: 8px;

    color: var(--text);

    font-size: 13px;
    font-weight: 700;
}

.form-label svg,
.form-group > svg {
    color: var(--brand);
    stroke-width: 1.8;
}

.input-wrap {
    position: relative;

    display: flex;
    align-items: center;

    width: 100%;
}

.form-input {
    width: 100%;
    min-height: 50px;

    padding: 12px 14px;

    background: var(--surface);
    color: var(--text);

    border: 1px solid var(--border);
    border-radius: 8px;

    font: inherit;

    outline: none;

    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}

.form-input::placeholder {
    color:
        color-mix(
            in srgb,
            var(--muted) 68%,
            var(--surface)
        );
    opacity: 1;
}

.form-input:focus {
    border-color:
        color-mix(in srgb, var(--brand) 65%, var(--border));

    box-shadow:
        0 0 0 3px
        color-mix(in srgb, var(--brand) 11%, transparent);
}

.input-prefix {
    position: absolute;
    left: 14px;
    z-index: 1;

    color: var(--text-soft);

    font-size: 14px;
    font-weight: 700;

    pointer-events: none;
}

.input-prefix + .form-input {
    padding-left: 52px;
}

.input-toggle-pass {
    position: absolute;
    right: 10px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    padding: 0;

    background: transparent;
    color: var(--muted);

    border: 0;

    cursor: pointer;
}

.input-toggle-pass:hover {
    color: var(--brand);
}

.input-wrap:has(.input-toggle-pass) .form-input {
    padding-right: 48px;
}

.form-select {
    appearance: none;
    padding-right: 42px;
}

.select-icon {
    position: absolute;
    right: 14px;

    color: var(--muted);

    pointer-events: none;
}


/* =========================================================
   TWO COLUMN FIELDS
   ========================================================= */

.form-row-2col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}


/* =========================================================
   PROFILE FOR
   ========================================================= */

.profile-for-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 8px;
}

.profile-for-option {
    cursor: pointer;
}

.profile-for-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pfo-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    min-height: 44px;

    padding: 9px 10px;

    background: var(--surface);
    color: var(--text-soft);

    border: 1px solid var(--border);
    border-radius: 8px;

    font-size: 12px;
    font-weight: 700;

    transition:
        background .2s ease,
        color .2s ease,
        border-color .2s ease,
        box-shadow .2s ease;
}

.profile-for-option input:checked + .pfo-inner {
    background:
        color-mix(in srgb, var(--brand) 8%, var(--surface));

    color: var(--brand);

    border-color:
        color-mix(in srgb, var(--brand) 55%, var(--border));

    box-shadow:
        0 0 0 2px
        color-mix(in srgb, var(--brand) 8%, transparent);
}


/* =========================================================
   CAPTCHA
   ========================================================= */

.captcha-container {
    display: flex;
    align-items: center;
    gap: 10px;

    margin-bottom: 10px;
}

.captcha-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 44px;

    padding: 8px 16px;

    background:
        color-mix(in srgb, var(--brand) 6%, var(--surface-soft));

    color: var(--text);

    border: 1px dashed
        color-mix(in srgb, var(--brand) 35%, var(--border));

    border-radius: 8px;

    font-weight: 800;
    letter-spacing: 0.04em;
}


/* =========================================================
   CHECKBOX / FORGOT
   ========================================================= */

.login-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;

    margin-bottom: 22px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;

    color: var(--text-soft);

    font-size: 13px;

    cursor: pointer;
}

.checkbox-input {
    width: 16px;
    height: 16px;

    accent-color: var(--brand);
}

.checkbox-custom {
    display: none;
}

.checkbox-copy {
    line-height: 1.5;
}

.forgot-link,
.terms-link,
.switch-tab-btn {
    color: var(--brand);

    font-weight: 700;

    text-decoration: none;
}

.switch-tab-btn {
    padding: 0;

    background: transparent;
    border: 0;

    font: inherit;

    cursor: pointer;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.btn-login {
    width: 100%;
    min-height: 50px;
}

.btn-login + .btn-login {
    margin-top: 0;
}


/* =========================================================
   DIVIDER
   ========================================================= */

.login-divider {
    display: flex;
    align-items: center;
    gap: 14px;

    margin: 22px 0;

    color: var(--muted);

    font-size: 12px;
}

.login-divider::before,
.login-divider::after {
    content: "";

    flex: 1;

    height: 1px;

    background: var(--border);
}


/* =========================================================
   REGISTER PROMPT
   ========================================================= */

.login-register-prompt {
    margin: 22px 0 0;

    color: var(--text-soft);

    font-size: 13px;
    text-align: center;
}


/* =========================================================
   ERRORS
   ========================================================= */

.form-error {
    display: block;

    min-height: 16px;
    margin-top: 6px;

    color: #c0392b;

    font-size: 12px;
}

.login-form-message {
    margin: 0 0 18px;
    padding: 11px 14px;
    border: 1px solid color-mix(in srgb, var(--brand) 24%, transparent);
    border-left: 4px solid var(--brand);
    border-radius: 8px;
    background: color-mix(in srgb, var(--brand) 8%, var(--surface));
    color: var(--text);
    font-size: 13px;
    line-height: 1.45;
}


/* =========================================================
   PASSWORD STRENGTH
   ========================================================= */

.password-strength-wrap {
    margin-top: 8px;
}

.password-strength-bar {
    height: 4px;

    overflow: hidden;

    background: var(--border);

    border-radius: 999px;
}

.psb-fill {
    display: block;

    width: 0;
    height: 100%;

    background: var(--brand);

    transition: width .2s ease;
}

.password-strength-label {
    display: block;

    margin-top: 5px;

    color: var(--muted);

    font-size: 11px;
}


/* =========================================================
   OTP
   ========================================================= */

#resendLoginOtpBtn {
    padding: 0;

    background: transparent;
    color: var(--brand);

    border: 0;

    font: inherit;
    font-size: 12px;
    font-weight: 700;

    cursor: pointer;
}

#loginOtpTimer {
    color: var(--muted);
    font-size: 12px;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1050px) {

    .auth-layout {
        grid-template-columns: minmax(0, 1fr) minmax(430px, 1fr);
    }

    .auth-right {
        padding-left: 30px;
        padding-right: 30px;
    }

    .login-hero-title {
        font-size: clamp(38px, 4vw, 50px);
    }

    .login-hero-content {
        left: 6%;
        right: 6%;
        bottom: 7%;
    }

}


/* =========================================================
   MOBILE / SMALL TABLET
   ========================================================= */

@media (max-width: 900px) {

    .auth-layout {
        display: block;

        min-height: auto;
    }

    .auth-left {
        display: none !important;
    }

    .auth-right {
        display: block;

        padding: 42px var(--container-padding) 70px;
    }

    .login-form-panel {
        max-width: 620px;
        margin: 0 auto;
    }

    .login-mobile-brand {
        display: block;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .auth-right {
        padding-top: 30px;
        padding-bottom: 55px;
    }

    .login-mobile-brand {
        margin-bottom: 20px;
    }

    .login-mobile-brand img {
        width: 190px;
        height: 52px;
    }

    .login-form-title {
        font-size: 34px;
    }

    .profile-for-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .form-row-2col {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .login-form-row {
        align-items: flex-start;
    }

}