/* ============================================
   LOGIN.CSS - Login & Forgot Password Pages
   Updated with Landing Page Aesthetic
   ============================================ */

/* ============ AUTH HEADER ============ */
.auth-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.auth-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 600;
    color: var(--color-ink);
    margin-bottom: var(--space-xs);
    letter-spacing: -0.02em;
}

.auth-subtitle {
    font-size: 1rem;
    color: var(--color-ink-muted);
}

.auth-subtitle a {
    color: var(--color-accent);
    font-weight: 500;
    text-decoration: none;
}

.auth-subtitle a:hover {
    text-decoration: underline;
}

/* ============ FORM FOOTER ============ */
.form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
}

.form-footer-center {
    justify-content: flex-end;
}

/* Remember Me Checkbox */
.form-check {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.form-check-input {
    width: 16px;
    height: 16px;
    border: 1.5px solid white;
    border-radius: var(--radius-sm);
    cursor: pointer;
    accent-color: var(--color-accent);
    transition: all var(--transition-fast);
}

.form-check-input:hover {
    border-color: var(--color-accent);
}

.form-check-input:checked {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
}

.form-check-label {
    font-size: 0.875rem;
    color: var(--color-ink-muted);
    cursor: pointer;
}

/* ============ DIVIDER ============ */
.auth-divider {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin: var(--space-xl) 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

.auth-divider span {
    font-size: 0.8125rem;
    color: var(--color-ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============ AUTH FOOTER LINKS ============ */
.auth-footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-border-light);
}

.auth-footer-links a {
    font-size: 0.875rem;
    color: var(--color-ink-muted);
    transition: color var(--transition-fast);
    text-decoration: none;
    position: relative;
}

.auth-footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-accent);
    transition: width var(--transition-base);
}

.auth-footer-links a:hover {
    color: var(--color-accent);
}

.auth-footer-links a:hover::after {
    width: 100%;
}

/* ============ REGISTER LINK ============ */
.auth-register-link {
    text-align: center;
    margin-top: var(--space-xl);
    font-size: 0.9375rem;
    color: var(--color-ink-muted);
}

/* ============ VERIFICATION CODE ============ */
.verification-code-wrapper {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin: var(--space-xl) 0;
    position: relative;
}

.verification-code-input {
    width: 52px;
    height: 60px;
    line-height: 56px;
    text-align: center;
    font-family: var(--font-body);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-ink);
    background: var(--color-paper);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    outline: none;
    transition: 
        border-color var(--transition-fast),
        background-color var(--transition-fast),
        box-shadow var(--transition-fast),
        transform var(--transition-fast),
        opacity var(--transition-fast);
}

.verification-code-input:hover {
    border-color: #cbd5e1;
}

.verification-code-input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-soft);
    transform: scale(1.05);
}

.verification-code-input:focus:not(.filled) {
    animation: pulse 2s ease-in-out infinite;
}

.verification-code-input.filled {
    border-color: var(--color-accent);
    background: var(--color-accent-soft);
    transform: scale(1.02);
    animation: fillPop 0.2s ease-out both;
}

/* Sequential fill animation delays */
.verification-code-input.filled:nth-child(1) { animation-delay: 0ms; }
.verification-code-input.filled:nth-child(2) { animation-delay: 30ms; }
.verification-code-input.filled:nth-child(3) { animation-delay: 60ms; }
.verification-code-input.filled:nth-child(4) { animation-delay: 90ms; }
.verification-code-input.filled:nth-child(5) { animation-delay: 120ms; }
.verification-code-input.filled:nth-child(6) { animation-delay: 150ms; }

/* ============ VERIFICATION INPUT STATES ============ */

/* Verifying - subtle pulse */
.verification-code-input.verifying {
    pointer-events: none;
    animation: verifyingPulse 1s ease-in-out infinite;
    border-color: var(--color-accent);
}

/* Success - green border with pop effect */
.verification-code-input.success {
    border-color: var(--color-success);
    background: var(--color-paper);
    color: var(--color-ink);
    animation: successPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Error - red border */
.verification-code-input.error {
    border-color: var(--color-danger);
    background: var(--color-danger-soft);
    animation: errorPulse 0.3s ease-out;
}

/* Wrapper states */
.verification-code-wrapper.verifying .verification-code-input {
    pointer-events: none;
}

.verification-code-wrapper.shake {
    animation: shakeInputs 0.5s ease-in-out;
}

.verification-instruction {
    text-align: center;
    font-size: 0.9375rem;
    color: var(--color-ink-muted);
    margin-bottom: var(--space-md);
}

.resend-code {
    text-align: center;
    margin-top: var(--space-lg);
    font-size: 0.875rem;
    color: var(--color-ink-muted);
}

.resend-code a {
    color: var(--color-accent);
    font-weight: 500;
    text-decoration: none;
}

.resend-code a:hover {
    text-decoration: underline;
}

/* ============ VERIFICATION ANIMATIONS ============ */
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 3px var(--color-accent-soft); }
    50% { box-shadow: 0 0 0 6px var(--color-accent-soft); }
}

@keyframes fillPop {
    0% { transform: scale(0.9); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1.02); }
}

@keyframes verifyingPulse {
    0%, 100% { 
        opacity: 0.6;
        box-shadow: 0 0 0 0 var(--color-accent-soft);
    }
    50% { 
        opacity: 1;
        box-shadow: 0 0 0 4px var(--color-accent-soft);
    }
}

@keyframes successPop {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0.2);
    }
    100% {
        transform: scale(1.05);
        box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1);
    }
}

@keyframes errorPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.95);
    }
}

@keyframes shakeInputs {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-6px); }
    20%, 40%, 60%, 80% { transform: translateX(6px); }
}

/* ============ BUTTON GROUP ============ */
.btn-group {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
}

.btn-group .btn {
    min-width: 140px;
}

/* ============ COMPLETED STATE ============ */
.completed-state {
    text-align: center;
    padding: var(--space-2xl) 0;
}

.completed-icon {
    width: 80px;
    height: 80px;
    background: var(--color-success-soft);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-xl);
    color: var(--color-success);
    font-size: 2rem;
    animation: scaleIn 0.5s ease-out both;
}

.completed-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--color-ink);
    margin-bottom: var(--space-sm);
}

.completed-text {
    font-size: 1rem;
    color: var(--color-ink-muted);
    max-width: 400px;
    margin: 0 auto var(--space-2xl);
}

/* ============ SOCIAL LOGIN BUTTONS ============ */
.social-login-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.875rem var(--space-lg);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-ink);
    background: var(--color-paper);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
}

.social-login-btn:hover {
    border-color: var(--color-ink-muted);
    background: var(--color-paper-cool);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.social-login-btn img {
    width: 20px;
    height: 20px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 480px) {
    .auth-title {
        font-size: 1.75rem;
    }
    
    .auth-footer-links {
        flex-wrap: wrap;
        gap: var(--space-md);
    }
    
    .verification-code-wrapper {
        gap: var(--space-xs);
    }
    
    .verification-code-input {
        width: 44px;
        height: 52px;
        line-height: 48px;
        font-size: 1.25rem;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        width: 100%;
    }
}

@media (max-width: 360px) {
    .auth-title {
        font-size: 1.5rem;
    }
    
    .form-footer {
        flex-direction: column;
        gap: var(--space-md);
        align-items: flex-start;
    }
}