/* =============================================
   Estilos de Recuperar Contraseña - GESTIA
   Basado en login.css con mejoras adicionales
   ============================================= */

:root {
    --primary-color: #4CAF50;
    --primary-dark: #45a049;
    --success-color: #4CAF50;
    --error-color: #f44336;
    --warning-color: #ff9800;
    --text-primary: #1a1a1a;
    --text-secondary: #666;
    --border-color: #e1e1e1;
    --card-bg: rgba(255, 255, 255, 0.95);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('../img/fondo.jpg') center/cover no-repeat fixed;
    position: relative;
}

/* Overlay oscuro sobre la imagen de fondo */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 0;
}

/* Container principal */
.forgot-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 460px;
    padding: 20px;
    animation: fadeInUp 0.5s ease;
}

/* Card de recuperación */
.forgot-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

/* Header */
.forgot-header {
    text-align: center;
    margin-bottom: 30px;
}

.header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

.header-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

.forgot-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.forgot-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Progress Steps */
.progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 35px;
    position: relative;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    transition: var(--transition);
}

.step.active .step-number {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.step.completed .step-number {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.step-text {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.step.active .step-text {
    color: var(--primary-color);
}

.step-line {
    width: 100px;
    height: 2px;
    background: var(--border-color);
    margin: 0 15px;
    margin-bottom: 28px;
    position: relative;
}

.step-line::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: var(--primary-color);
    transition: width 0.5s ease;
}

.step-line.active::after {
    width: 100%;
}

/* Formulario */
.forgot-form {
    margin-bottom: 20px;
}

.form-step {
    animation: slideIn 0.4s ease;
}

.form-group {
    margin-bottom: 20px;
}

.input-group {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    z-index: 2;
    transition: color 0.3s ease;
}

.form-input {
    width: 100%;
    padding: 15px 45px 15px 45px;
    font-size: 15px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: white;
    transition: var(--transition);
    font-family: 'Poppins', sans-serif;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.1);
}

.form-input:focus ~ .input-icon {
    color: var(--primary-color);
}

/* Input Status Icons */
.input-status {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: none;
}

.input-status.success {
    display: block;
    color: var(--success-color);
}

.input-status.error {
    display: block;
    color: var(--error-color);
}

/* Field Errors */
.field-error {
    color: var(--error-color);
    font-size: 12px;
    margin-top: 6px;
    padding: 4px 8px;
    background: rgba(244, 67, 54, 0.08);
    border-radius: 4px;
    border-left: 3px solid var(--error-color);
    display: none;
    animation: slideDown 0.3s ease;
}

/* Toggle password */
.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
    z-index: 3;
}

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

/* Password Strength */
.password-strength {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: width 0.3s ease, background 0.3s ease;
}

.strength-bar.weak {
    width: 33%;
    background: var(--error-color);
}

.strength-bar.medium {
    width: 66%;
    background: var(--warning-color);
}

.strength-bar.strong {
    width: 100%;
    background: var(--success-color);
}

/* Verified User Info */
.verified-user {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(76, 175, 80, 0.05));
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.verified-icon {
    width: 40px;
    height: 40px;
    background: var(--success-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.verified-info {
    flex: 1;
}

.verified-label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.verified-name {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Buttons */
.btn-verify,
.btn-reset {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-verify:hover,
.btn-reset:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(76, 175, 80, 0.3);
}

.btn-verify:active,
.btn-reset:active {
    transform: translateY(0);
}

.btn-verify:disabled,
.btn-reset:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-back {
    padding: 12px 20px;
    background: white;
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-back:hover {
    background: #f5f5f5;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.form-actions .btn-reset {
    flex: 1;
}

/* Loader */
.btn-loader {
    display: flex;
    justify-content: center;
    align-items: center;
}

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

/* Message */
.message {
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 15px;
    animation: slideIn 0.4s ease;
}

.message.error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    color: var(--error-color);
}

.message.success {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: var(--success-color);
}

/* Footer */
.forgot-footer {
    text-align: center;
    margin-top: 20px;
}

.back-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--primary-dark);
    transform: translateX(-3px);
}

/* Success Card */
.success-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    animation: zoomIn 0.5s ease;
}

.success-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--success-color), #45a049);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    animation: successPulse 2s ease infinite;
}

.success-icon svg {
    width: 60px;
    height: 60px;
    color: white;
}

.success-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.success-message {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.success-submessage {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 25px;
}

#countdown {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 18px;
}

.btn-login-now {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-login-now:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(76, 175, 80, 0.3);
}

/* Copyright */
.copyright {
    text-align: center;
    margin-top: 30px;
    color: white;
    font-size: 12px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes successPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 20px rgba(76, 175, 80, 0);
    }
}

/* Responsive */
@media (max-width: 480px) {
    .forgot-container {
        padding: 10px;
    }
    
    .forgot-card,
    .success-card {
        padding: 30px 20px;
    }
    
    .forgot-title {
        font-size: 22px;
    }
    
    .step-line {
        width: 60px;
        margin: 0 10px;
    }
    
    .form-input {
        padding: 12px 40px 12px 40px;
        font-size: 14px;
    }
    
    .btn-verify,
    .btn-reset {
        padding: 12px;
        font-size: 14px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-back {
        width: 100%;
        justify-content: center;
    }
}

/* Focus visible para accesibilidad */
.form-input:focus-visible,
.btn-verify:focus-visible,
.btn-reset:focus-visible,
.btn-back:focus-visible,
.toggle-password:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Validación visual de campos */
.form-input.success {
    border-color: var(--success-color);
}

.form-input.error {
    border-color: var(--error-color);
}