/* Login / Register — vibrant split layout */

.login-page {
    --lp-brand: #C62626;
    --lp-brand-light: #FF6B6B;
    --lp-black: #000000;
    --lp-brand-gradient: linear-gradient(135deg, #FF6B6B 0%, #E83535 38%, #C62626 68%, #8B1515 100%);
    --lp-brand-gradient-hover: linear-gradient(135deg, #FF8585 0%, #EF4545 38%, #D42B2B 68%, #6B1010 100%);
    --lp-brand-bg: linear-gradient(145deg, #000000 0%, #141010 30%, #5C0E0E 58%, #C62626 85%, #FF5757 100%);
    --lp-brand-glow: 0 8px 32px rgba(255, 87, 87, 0.28), 0 4px 16px rgba(198, 38, 38, 0.18);
    --lp-brand-gradient-soft: linear-gradient(135deg, #FF8A8A 0%, #C62626 100%);
    --lp-border: rgba(0, 0, 0, 0.08);
    --lp-muted: #737373;
    --lp-radius: 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #f8f9fc;
}

.login-page .auth-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    flex: 1;
    min-height: 0;
}

/* Brand panel */
.auth-brand {
    position: relative;
    overflow: hidden;
    padding: clamp(32px, 5vw, 56px);
    background: var(--lp-brand-bg);
    color: #fff;
    display: flex;
    align-items: center;
}

.auth-brand::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 25%, rgba(255, 255, 255, 0.07) 50%, transparent 75%);
    pointer-events: none;
}

.auth-brand__mesh {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
}

.auth-brand__mesh::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.18) 0%, transparent 42%),
        radial-gradient(circle at 85% 80%, rgba(0, 0, 0, 0.12) 0%, transparent 48%);
}

.auth-brand__inner {
    position: relative;
    z-index: 1;
    max-width: 520px;
    margin: 0 auto;
}

.auth-brand__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    margin-bottom: 20px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
}

.auth-brand__title {
    margin: 0 0 14px;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.auth-brand__title span {
    background: linear-gradient(90deg, #FFE0E0 0%, #FF8A8A 45%, #FF5252 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 0;
    border-radius: 0;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.25));
}

.auth-brand__lead {
    margin: 0 0 28px;
    font-size: 1rem;
    line-height: 1.65;
    opacity: 0.92;
    max-width: 480px;
}

.auth-brand__steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 28px;
}

.auth-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    backdrop-filter: blur(8px);
}

.auth-step__num {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.auth-step__icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    border-radius: 10px;
}

.auth-step__icon--blue { background: rgba(0, 0, 0, 0.35); }
.auth-step__icon--purple { background: linear-gradient(135deg, rgba(255, 107, 107, 0.5), rgba(198, 38, 38, 0.45)); }
.auth-step__icon--gold { background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 138, 138, 0.2)); }

.auth-step h3 {
    margin: 0 0 4px;
    font-size: 0.9375rem;
    font-weight: 700;
}

.auth-step p {
    margin: 0;
    font-size: 0.8125rem;
    opacity: 0.88;
    line-height: 1.45;
}

.auth-brand__trust {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.auth-trust-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    font-size: 0.8125rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
}

/* Auth main */
.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(24px, 4vw, 48px);
    background: linear-gradient(180deg, #fff 0%, #f8f9fc 100%);
    min-width: 0;
}

.auth-card-wrap {
    width: 100%;
    max-width: min(440px, 92%);
}

.auth-card {
    padding: clamp(24px, 4vw, 32px);
    background: #fff;
    border: 1px solid var(--lp-border);
    border-radius: var(--lp-radius);
    box-shadow: 0 16px 48px rgba(198, 38, 38, 0.08), 0 4px 16px rgba(0, 0, 0, 0.04);
}

/* Tabs */
.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 6px;
    margin-bottom: 24px;
    background: #f3f4f8;
    border-radius: 14px;
}

.auth-tab {
    padding: 11px 16px;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--lp-muted);
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.auth-tab:hover {
    color: #3d3d3d;
}

.auth-tab.is-active {
    color: #fff;
    background: var(--lp-brand-gradient);
    box-shadow: var(--lp-brand-glow);
}

/* Panels */
.auth-panel__head {
    margin-bottom: 22px;
}

.auth-panel__head h2 {
    margin: 0 0 6px;
    font-size: 1.375rem;
    font-weight: 800;
    color: #000;
    letter-spacing: -0.02em;
}

.auth-panel__head p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--lp-muted);
    line-height: 1.5;
}

.auth-card-wrap.sign-in .sign-up-panel,
.auth-card-wrap.sign-up .sign-in-panel {
    display: none;
}

.auth-card-wrap.forgot-mode .auth-tabs,
.auth-card-wrap.forgot-mode .sign-in-panel,
.auth-card-wrap.forgot-mode .sign-up-panel {
    display: none;
}

.auth-card-wrap:not(.forgot-mode) .forgot-panel {
    display: none;
}

/* Form fields */
.login-page .form-field {
    margin-bottom: 16px;
    text-align: left;
}

.login-page .form-field label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #3d3d3d;
}

.login-page .form-field label .required {
    color: var(--lp-brand-light);
}

.login-page .input-with-icon input {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px 12px 2.75rem;
    font-size: 0.9375rem;
    border: 1px solid var(--lp-border);
    border-radius: 12px;
    background: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.login-page .input-with-icon.has-toggle input {
    padding-right: 2.75rem;
}

.login-page .input-with-icon > i.bi {
    left: 14px;
    color: var(--lp-brand-light);
    opacity: 0.85;
}

.login-page .input-with-icon input:focus {
    outline: none;
    border-color: var(--lp-brand);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.14), 0 0 0 1px rgba(198, 38, 38, 0.25);
}

.login-page .password-toggle-btn {
    color: var(--lp-muted);
}

.login-page .password-toggle-btn:hover {
    color: var(--lp-brand-light);
}

.login-page .auth-submit {
    position: relative;
    overflow: hidden;
    width: 100%;
    min-height: 48px;
    margin-top: 8px;
    padding: 12px 20px;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #fff;
    background: var(--lp-brand-gradient);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: var(--lp-brand-glow);
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.login-page .auth-submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, transparent 48%);
    pointer-events: none;
}

.login-page .auth-submit:hover {
    background: var(--lp-brand-gradient-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 36px rgba(255, 87, 87, 0.34), 0 4px 16px rgba(198, 38, 38, 0.22);
}

.login-page .auth-submit--ghost {
    margin-top: 12px;
    color: var(--lp-brand);
    background: transparent;
    box-shadow: none;
    font-weight: 600;
}

.login-page .auth-submit--ghost::before {
    display: none;
}

.login-page .auth-submit--ghost:hover {
    background: rgba(255, 107, 107, 0.08);
    transform: none;
}

.login-page .auth-footer {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--lp-border);
    font-size: 0.8125rem;
    color: var(--lp-muted);
    text-align: center;
}

.login-page .auth-footer b.pointer {
    background: var(--lp-brand-gradient-soft);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    cursor: pointer;
}

.login-page .auth-footer b.pointer:hover {
    filter: brightness(1.1);
}

/* Signup steps */
.signup-progress {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.signup-progress__dot {
    flex: 1;
    height: 4px;
    border-radius: 999px;
    background: #e8e8ec;
    transition: background 0.3s;
}

.signup-progress__dot.is-active,
.signup-progress__dot.is-done {
    background: var(--lp-brand-gradient);
}

.login-page .step h3 {
    margin: 0 0 8px;
    font-size: 1.125rem;
    font-weight: 800;
    color: #000;
    text-align: left;
}

.login-page .step > p {
    margin: 0 0 20px;
    font-size: 0.875rem;
    color: var(--lp-muted);
    text-align: left;
}

.login-page .otp-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}

.login-page .otp-input {
    width: 56px !important;
    height: 56px;
    text-align: center;
    font-size: 1.375rem;
    font-weight: 700;
    border: 2px solid var(--lp-border);
    border-radius: 12px;
    background: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-page .otp-input:focus {
    outline: none;
    border-color: var(--lp-brand);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.14), 0 0 0 1px rgba(198, 38, 38, 0.25);
    background: #fff;
}

.login-page .form-alert-error {
    padding: 10px 12px;
    margin-bottom: 12px;
    font-size: 0.8125rem;
    color: #b71c1c;
    background: #ffebee;
    border: 1px solid rgba(198, 38, 38, 0.2);
    border-radius: 10px;
}

.login-page .auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    font-size: 0.875rem;
    font-weight: 600;
    background: var(--lp-brand-gradient-soft);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
}

.login-page .auth-back-link:hover {
    filter: brightness(1.1);
}

/* Mobile brand strip */
.auth-brand-mobile {
    display: none;
    padding: 20px 24px;
    background: var(--lp-brand-bg);
    color: #fff;
    text-align: center;
}

.auth-brand-mobile h2 {
    margin: 0 0 6px;
    font-size: 1.125rem;
    font-weight: 800;
}

.auth-brand-mobile p {
    margin: 0;
    font-size: 0.8125rem;
    opacity: 0.9;
}

/* Reveal */
.login-page .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.login-page .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 991px) {
    .login-page .auth-page {
        grid-template-columns: 1fr;
    }

    .auth-brand {
        display: none;
    }

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

    .auth-main {
        min-height: auto;
    }

    .auth-card-wrap {
        max-width: 440px;
    }
}

@media (max-width: 575px) {
    .auth-main {
        padding: 16px;
    }

    .auth-card {
        padding: 20px;
        border-radius: 16px;
    }

    .login-page .otp-input {
        width: 48px !important;
        height: 48px;
        font-size: 1.125rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-page .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .login-page .auth-submit:hover {
        transform: none;
    }
}
