/* ============================================
   FORGOT PASSWORD - WhatsApp 2FA Flow
   Consistente con el sistema (fondo claro, 1200px)
   ============================================ */

/* ============================================
   Layout Principal
   ============================================ */
.forgot-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.forgot-card {
    background: var(--glass-bg, rgba(255,255,255,0.95));
    border: 1px solid rgba(102,126,234,0.12);
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 480px;
    width: 100%;
    color: var(--text-primary, #1a1a2e);
    box-shadow: 0 10px 40px rgba(102,126,234,0.1), 0 2px 10px rgba(0,0,0,0.04);
}

/* ============================================
   Step Indicator
   ============================================ */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.step-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    position: relative;
}

.step-dot i {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
    color: #94a3b8;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-dot span {
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
}

.step-dot.active i {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: #fff;
    box-shadow: 0 4px 15px rgba(102,126,234,0.35);
}

.step-dot.active span {
    color: #667eea;
    font-weight: 600;
}

.step-dot.completed i {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #10b981;
    color: #fff;
    box-shadow: 0 4px 15px rgba(16,185,129,0.25);
}

.step-dot.completed span {
    color: #10b981;
}

.step-line {
    flex: 1;
    height: 2px;
    background: #e2e8f0;
    margin: 0 0.5rem;
    margin-bottom: 1.2rem;
    position: relative;
    border-radius: 2px;
    max-width: 60px;
}

/* ============================================
   Step Content
   ============================================ */
.step-content {
    display: none;
    animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

/* ============================================
   Icon Circle
   ============================================ */
.icon-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 1.5rem;
    color: #fff;
}

.icon-circle.whatsapp-icon {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    box-shadow: 0 8px 25px rgba(37,211,102,0.3);
}

.icon-circle.code-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 8px 25px rgba(102,126,234,0.3);
}

.icon-circle.lock-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 8px 25px rgba(245,158,11,0.3);
}

/* ============================================
   Typography
   ============================================ */
.forgot-card h2 {
    text-align: center;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
    color: var(--text-primary, #1a1a2e);
}

.forgot-card .subtitle {
    text-align: center;
    color: var(--text-secondary, #4a5568);
    font-size: 0.88rem;
    margin-bottom: 1.8rem;
    line-height: 1.6;
}

.forgot-card .subtitle strong {
    color: #667eea;
    font-weight: 600;
}

/* ============================================
   Form Elements
   ============================================ */
.forgot-card .form-label {
    color: var(--text-primary, #1a1a2e);
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 0.5rem;
}

.forgot-card .input-modern {
    position: relative;
}

.forgot-card .input-modern input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.8rem;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    color: var(--text-primary, #1a1a2e);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.forgot-card .input-modern input:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
}

.forgot-card .input-modern input::placeholder {
    color: #94a3b8;
}

.forgot-card .input-modern .icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.forgot-card .input-modern .toggle-pass {
    position: absolute;
    right: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.3rem;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.forgot-card .input-modern .toggle-pass:hover {
    color: #667eea;
}

/* ============================================
   Code Input (6 digit boxes)
   ============================================ */
.code-input-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 0.5rem 0;
}

.code-input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 0;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    color: var(--text-primary, #1a1a2e);
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
}

.code-input:focus {
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
    transform: translateY(-2px);
}

.code-input:not(:placeholder-shown) {
    border-color: rgba(102,126,234,0.4);
    background: #fff;
}

.code-separator {
    color: #cbd5e1;
    font-size: 1.2rem;
    font-weight: 300;
    margin: 0 2px;
}

/* ============================================
   Timer
   ============================================ */
.timer-container {
    margin: 1.2rem 0;
}

.timer-bar {
    width: 100%;
    height: 4px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.6rem;
}

.timer-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 1s linear, background 0.5s ease;
}

.timer-text {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted, #718096);
}

.timer-text i {
    font-size: 0.75rem;
}

/* ============================================
   Resend
   ============================================ */
.resend-container {
    text-align: center;
    margin-top: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

.resend-text {
    font-size: 0.82rem;
    color: var(--text-muted, #718096);
    margin-bottom: 0.5rem;
}

.btn-resend {
    background: none;
    border: 1px solid #e2e8f0;
    color: var(--text-secondary, #4a5568);
    font-size: 0.82rem;
    padding: 0.45rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-resend:hover:not(:disabled) {
    border-color: #25D366;
    color: #25D366;
    background: rgba(37,211,102,0.05);
}

.btn-resend:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.resend-timer {
    font-size: 0.78rem;
    color: var(--text-muted, #718096);
}

/* ============================================
   Password Strength
   ============================================ */
.password-strength {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0.6rem 0 0.3rem;
}

.strength-bars {
    display: flex;
    gap: 4px;
    flex: 1;
}

.strength-bar {
    height: 4px;
    flex: 1;
    background: #f1f5f9;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.strength-text {
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 50px;
    text-align: right;
}

/* ============================================
   Password Rules
   ============================================ */
.password-rules {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
    margin-bottom: 1.2rem;
    padding: 0.8rem;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
}

.password-rules .rule {
    font-size: 0.75rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s;
}

.password-rules .rule i {
    font-size: 0.55rem;
    transition: all 0.2s;
}

.password-rules .rule.passed {
    color: #10b981;
}

.password-rules .rule.passed i {
    font-size: 0.7rem;
}

/* ============================================
   Match Indicators
   ============================================ */
.match-indicator {
    font-size: 0.78rem;
    color: #10b981;
    margin-top: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.mismatch-indicator {
    font-size: 0.78rem;
    color: #ef4444;
    margin-top: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* ============================================
   Buttons
   ============================================ */
.forgot-card .btn-submit {
    width: 100%;
    padding: 0.85rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    transition: all 0.3s ease;
    margin-top: 1rem;
    text-decoration: none;
}

.forgot-card .btn-submit:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(102,126,234,0.3);
}

.forgot-card .btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-success-gradient {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.btn-success-gradient:hover {
    box-shadow: 0 8px 25px rgba(16,185,129,0.3) !important;
}

/* ============================================
   Error & Success Messages
   ============================================ */
.step-error {
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.2);
    color: #dc2626;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    margin: 0.8rem 0;
    display: flex;
    align-items: center;
    animation: shakeX 0.4s ease;
}

@keyframes shakeX {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.step-success-msg {
    background: rgba(16,185,129,0.08);
    border: 1px solid rgba(16,185,129,0.2);
    color: #059669;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    margin: 0.8rem 0;
    display: flex;
    align-items: center;
}

/* ============================================
   Success Animation
   ============================================ */
.success-animation {
    text-align: center;
    padding: 1rem 0;
}

.success-checkmark {
    margin: 0 auto 1.5rem;
}

.check-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 2rem;
    color: #fff;
    box-shadow: 0 10px 30px rgba(16,185,129,0.25);
    animation: scaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes scaleIn {
    from { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.15); }
    to { transform: scale(1); opacity: 1; }
}

/* ============================================
   Back Link
   ============================================ */
.back-link {
    text-align: center;
    margin-top: 1.5rem;
}

.back-link a {
    color: var(--text-muted, #718096);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.back-link a:hover {
    color: #667eea;
}

/* ============================================
   Responsive
   ============================================ */


@media (max-width: 480px) {
    .forgot-card {
        padding: 1.8rem 1.3rem;
        border-radius: 16px;
    }
    
    .code-input {
        width: 42px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .code-input-group {
        gap: 5px;
    }
    
    .step-dot i {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }
    
    .step-dot span {
        font-size: 0.65rem;
    }
    
    .password-rules {
        grid-template-columns: 1fr;
    }
    
    .icon-circle {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .forgot-card h2 {
        font-size: 1.2rem;
    }
}

/* ===== DESACTIVAR HOVER ANIMATIONS EN DISPOSITIVOS TÁCTILES ===== */
@media (hover: none) {
    .forgot-card .btn-submit:hover {
        transform: none !important;
    }
}
