/* --- FORGOT HERO --- */
.forgot-hero {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    padding: calc(var(--nav-height) + 40px) 20px 50px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.forgot-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 8s ease-in-out infinite;
    pointer-events: none;
}

.forgot-hero-content {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.forgot-hero .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(37, 99, 235, 0.15);
    border: 1px solid rgba(37, 99, 235, 0.3);
    border-radius: var(--radius-full);
    margin-bottom: 20px;
    font-size: 0.813rem;
    color: var(--text-light);
}

.forgot-hero .badge-dot {
    width: 6px;
    height: 6px;
    background: var(--secondary);
    border-radius: 50%;
    animation: blink 2s ease-in-out infinite;
}

.forgot-hero h1 {
    font-size: 2rem;
    color: var(--text-light);
    margin-bottom: 12px;
    line-height: 1.2;
}

.forgot-hero .gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.forgot-hero p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

/* --- FORGOT SECTION --- */
.forgot-section {
    padding: 40px 20px 80px;
    background: var(--bg-light);
    margin-top: -30px;
    position: relative;
    z-index: 3;
}

.forgot-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* --- FORGOT CARD --- */
.forgot-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}

/* --- RESET PROGRESS --- */
.reset-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
    gap: 8px;
}

.reset-progress .progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
}

.reset-progress .step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--border-light);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.813rem;
    font-weight: 700;
    transition: var(--transition-smooth);
}

.reset-progress .progress-step span {
    font-size: 0.688rem;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.reset-progress .progress-step.active .step-dot {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.reset-progress .progress-step.active span {
    color: var(--primary);
    font-weight: 600;
}

.reset-progress .progress-step.completed .step-dot {
    background: var(--secondary);
    color: white;
}

.reset-progress .progress-step.completed span {
    color: var(--secondary);
}

.reset-progress .progress-line {
    width: 40px;
    height: 2px;
    background: var(--border-light);
    margin: 0 4px;
    margin-bottom: 20px;
}

/* --- FORM STEPS --- */
.form-step {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.form-step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-header {
    text-align: center;
    margin-bottom: 28px;
}

.step-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary) 0%, #3B82F6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
}

.step-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.step-header h2 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.step-header p {
    color: var(--text-muted);
    font-size: 0.938rem;
}

.step-header p strong {
    color: var(--text-dark);
}

/* --- FORM GROUPS --- */
.forgot-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.required {
    color: #EF4444;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 1;
}

.form-group input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background: var(--bg-light);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-dark);
    font-size: 1rem;
    font-family: var(--font-body);
    transition: var(--transition-fast);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 6px;
}

/* --- PASSWORD TOGGLE --- */
.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition-fast);
}

.password-toggle:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.password-toggle svg {
    width: 18px;
    height: 18px;
}

/* --- PASSWORD STRENGTH --- */
.password-strength {
    margin-top: 12px;
}

.strength-bar {
    width: 100%;
    height: 6px;
    background: var(--border-light);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 6px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: var(--radius-full);
}

.strength-fill.weak {
    width: 33%;
    background: #EF4444;
}

.strength-fill.medium {
    width: 66%;
    background: #F59E0B;
}

.strength-fill.strong {
    width: 100%;
    background: var(--secondary);
}

.strength-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.password-requirements {
    background: var(--bg-light);
    padding: 16px;
    border-radius: var(--radius-md);
}

.password-requirements h4 {
    font-size: 0.875rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.password-requirements ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.password-requirements li {
    font-size: 0.813rem;
    color: var(--text-muted);
    padding-left: 20px;
    position: relative;
}

.password-requirements li::before {
    content: '○';
    position: absolute;
    left: 0;
    color: var(--text-muted);
}

.password-requirements li.met {
    color: var(--secondary);
}

.password-requirements li.met::before {
    content: '✓';
    color: var(--secondary);
    font-weight: 700;
}

/* --- OTP INPUTS --- */
.otp-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 24px 0;
}

.otp-input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    background: var(--bg-light);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    font-family: var(--font-body);
}

.otp-input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.otp-info {
    text-align: center;
    margin-bottom: 24px;
}

.otp-info p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 8px;
}

.resend-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.875rem;
    font-family: var(--font-body);
    padding: 0;
    transition: var(--transition-fast);
}

.resend-btn:hover:not(:disabled) {
    color: var(--primary-hover);
    text-decoration: underline;
}

.resend-btn:disabled {
    color: var(--text-muted);
    cursor: not-allowed;
}

.resend-timer {
    color: var(--text-muted);
    font-size: 0.813rem;
    margin-left: 8px;
}

/* --- BUTTONS --- */
.btn-primary {
    width: 100%;
    padding: 16px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-smooth);
    position: relative;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-primary svg {
    width: 18px;
    height: 18px;
}

.btn-secondary {
    padding: 14px 24px;
    background: transparent;
    color: var(--text-muted);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.938rem;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-fast);
}

.btn-secondary:hover {
    border-color: var(--text-muted);
    color: var(--text-dark);
}

.btn-secondary svg {
    width: 16px;
    height: 16px;
}

.step-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.step-actions .btn-secondary {
    flex: 0 0 auto;
}

.step-actions .btn-primary {
    flex: 1;
}

.btn-loader {
    display: flex;
    align-items: center;
    gap: 8px;
}

.spinner-small {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.back-to-login {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
    margin-top: 8px;
}

.back-to-login a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.938rem;
    transition: var(--transition-fast);
}

.back-to-login a:hover {
    color: var(--primary-hover);
}

.back-to-login a svg {
    width: 16px;
    height: 16px;
}

/* --- SECURITY TIPS --- */
.security-tips {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.tip-item {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: var(--transition-smooth);
}

.tip-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.tip-item svg {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.tip-item h4 {
    font-size: 0.938rem;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.tip-item p {
    font-size: 0.813rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* --- FIELD ERROR STATE --- */
.form-group.error input {
    border-color: #EF4444;
    background: rgba(239, 68, 68, 0.03);
}

.field-error {
    color: #EF4444;
    font-size: 0.75rem;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ============================================
   TABLET STYLES (min-width: 640px)
   ============================================ */
@media (min-width: 640px) {
    .forgot-hero {
        padding: calc(var(--nav-height) + 60px) 24px 70px;
    }

    .forgot-hero h1 {
        font-size: 2.5rem;
    }

    .forgot-section {
        padding: 60px 24px 100px;
    }

    .forgot-card {
        padding: 40px;
        max-width: 560px;
        margin: 0 auto;
    }

    .step-header h2 {
        font-size: 1.75rem;
    }

    .otp-input {
        width: 56px;
        height: 64px;
        font-size: 1.75rem;
    }

    .otp-container {
        gap: 12px;
    }

    .security-tips {
        grid-template-columns: repeat(3, 1fr);
    }

    .reset-progress .progress-step span {
        font-size: 0.813rem;
    }

    .reset-progress .progress-line {
        width: 60px;
    }
}

/* ============================================
   DESKTOP STYLES (min-width: 1024px)
   ============================================ */
@media (min-width: 1024px) {
    .forgot-hero {
        padding: calc(var(--nav-height) + 80px) 32px 90px;
    }

    .forgot-hero h1 {
        font-size: 3rem;
    }

    .forgot-section {
        padding: 80px 32px 120px;
    }

    .forgot-container {
        flex-direction: row;
        align-items: flex-start;
        gap: 48px;
    }

    .forgot-card {
        flex: 1;
        max-width: 560px;
    }

    .security-tips {
        flex: 1;
        grid-template-columns: 1fr;
    }
}