.enhanced-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-hero-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: linear-gradient(135deg, #1a252f 0%, #0f171e 100%);
    overflow: hidden;
}

.login-hero-bg .blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.12;
}

.login-hero-bg .blob-1 {
    width: 600px; height: 600px;
    background: #18bc9c;
    top: -20%; right: -10%;
    animation: blobFloat 20s ease-in-out infinite;
}

.login-hero-bg .blob-2 {
    width: 450px; height: 450px;
    background: #3498db;
    bottom: -20%; left: -8%;
    animation: blobFloat 25s ease-in-out infinite reverse;
}

.login-hero-bg .grid-dots {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 32px 32px;
}

@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -40px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

.login-layout {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 3rem;
    align-items: center;
    max-width: 1100px;
    width: 100%;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.login-info {
    color: #fff;
    padding-right: 2rem;
}

.login-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.login-logo img {
    height: 36px;
}

.login-info h1 {
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.15;
    margin-bottom: 0.75rem;
}

.login-info > p {
    font-size: 1rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.6;
    max-width: 400px;
    margin-bottom: 2rem;
}

.login-screenshots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.screenshot-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.3s;
}

.screenshot-card:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

.screenshot-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255,255,255,0.5);
}

.screenshot-placeholder i {
    font-size: 2rem;
    color: #18bc9c;
}

.screenshot-placeholder span {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
}

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 25px 80px rgba(0,0,0,0.3);
}

.login-card h3 {
    font-size: 1.2rem;
    color: #2c3e50;
}

.login-layout.register-layout {
    grid-template-columns: 1fr 520px;
    max-width: 1200px;
}

@media (max-width: 1000px) {
    .login-layout.register-layout {
        grid-template-columns: 1fr;
        max-width: 520px;
    }
    .login-layout.register-layout .login-info {
        display: none;
    }
}

@media (max-width: 900px) {
    .login-layout {
        grid-template-columns: 1fr;
        max-width: 420px;
    }

    .login-info {
        display: none;
    }
}

@media (max-width: 1000px) and (min-width: 901px) {
    .login-layout.register-layout {
        grid-template-columns: 1fr;
        max-width: 520px;
    }
    .login-layout.register-layout .login-info {
        display: none;
    }
}

/* ─── Signup Layout (separate from login) ─── */
.signup-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.signup-card {
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 25px 80px rgba(0,0,0,0.3);
    width: min(90vw, 720px);
}

.signup-card .form-row {
    display: flex;
    gap: 0.75rem;
}

.signup-card .form-row .form-group {
    flex: 1;
}

.signup-card .plan-cards {
    flex-wrap: wrap;
}

.signup-card .plan-card {
    min-width: 160px;
    padding: 1rem;
}

@media (max-width: 600px) {
    .signup-card .form-row {
        flex-direction: column;
        gap: 0;
    }
    .signup-layout {
        padding: 1rem;
    }
    .signup-card {
        padding: 1.5rem;
    }
}

.hidden-form {
    display: none !important;
}

.register-form .form-footer {
    margin-top: 0.75rem;
}

/* Force light gray form fields inside the login card */
.login-card input[type="text"],
.login-card input[type="email"],
.login-card input[type="password"],
.login-card input[type="text"]:-webkit-autofill,
.login-card input[type="email"]:-webkit-autofill,
.login-card input[type="password"]:-webkit-autofill {
    background: #f5f6f8 !important;
    color: #2d3436 !important;
    border: 1px solid #e4e7ec !important;
}
.login-card input:focus {
    border-color: #18bc9c !important;
    box-shadow: 0 0 0 3px rgba(24, 188, 156, 0.15) !important;
}

/* Altcha widget styling via CSS custom properties */
.login-card altcha-widget {
    --altcha-background: #f5f6f8;
    --altcha-border-color: #e4e7ec;
    --altcha-color: #2d3436;
    --altcha-border-radius: 8px;
}

/* ─── Multi-step Signup ─── */
.step-indicator {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e4e7ec;
    transition: all 0.3s;
}
.step-dot.active {
    background: #18bc9c;
    box-shadow: 0 0 0 3px rgba(24,188,156,0.2);
}
.step-dot.done {
    background: #18bc9c;
}

.otp-input-group {
    margin-bottom: 1rem;
}
.otp-input-group input {
    width: 100%;
    padding: 0.85rem 0.5rem;
    border-radius: 10px;
    border: 2px solid #e4e7ec;
    background: #f5f6f8 !important;
    color: #2d3436 !important;
    font-size: 1.5rem;
    letter-spacing: 8px;
    font-weight: 700;
    text-align: center;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.otp-input-group input:focus {
    border-color: #18bc9c;
    outline: none;
    box-shadow: 0 0 0 3px rgba(24,188,156,0.15);
}

.signup-step h3 {
    margin-top: 0.75rem;
    font-weight: 700;
    color: #2c3e50;
    font-size: 1.2rem;
}

/* ─── Plan Selection ─── */
.plan-selection {
    margin-bottom: 0.75rem;
}
.plan-selection .form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.6rem;
}
.plan-cards {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}
.plan-card {
    flex: 1;
    min-width: 140px;
    background: #f8f9fb;
    border: 1.5px solid #e4e7ec;
    border-radius: 10px;
    padding: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}
.plan-card:hover {
    border-color: #18bc9c;
}
.plan-card.selected {
    border-color: #18bc9c;
    background: rgba(24, 188, 156, 0.06);
    box-shadow: 0 0 0 1px #18bc9c;
}
.plan-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.plan-card-header {
    text-align: center;
    margin-bottom: 0.5rem;
}
.plan-name {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.2rem;
}
.plan-price-monthly,
.plan-price-yearly {
    display: block;
    font-size: 1.15rem;
    font-weight: 800;
    color: #1a252f;
}
.plan-price-monthly small,
.plan-price-yearly small {
    font-size: 0.65rem;
    font-weight: 500;
    color: #7f8c9b;
}
.plan-price-free {
    display: block;
    font-size: 1.15rem;
    font-weight: 800;
    color: #18bc9c;
}
.plan-trial {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    color: #e67e22;
    margin-top: 0.15rem;
}
.plan-features {
    list-style: none;
    padding: 0;
    margin: 0;
}
.plan-features li {
    font-size: 0.7rem;
    color: #7f8c9b;
    padding: 0.15rem 0;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.plan-features li::before {
    content: '✓';
    color: #18bc9c;
    font-weight: 700;
    font-size: 0.65rem;
}

/* ─── Billing Toggle ─── */
.billing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 0.75rem;
}
.billing-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: #7f8c9b;
    cursor: pointer;
    user-select: none;
}
.billing-label.active {
    color: #2c3e50;
    font-weight: 600;
}
.save-badge {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    color: #18bc9c;
    background: rgba(24, 188, 156, 0.1);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    margin-left: 0.15rem;
    vertical-align: middle;
}
.billing-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}
.billing-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.billing-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #e4e7ec;
    border-radius: 11px;
    transition: 0.3s;
}
.billing-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.billing-switch input:checked + .billing-slider {
    background: #18bc9c;
}
.billing-switch input:checked + .billing-slider::before {
    transform: translateX(18px);
}
