/* Estilos generales */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #f8fafc;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 20px;
    box-sizing: border-box;
}

/* Contenedor principal */
.recover-container {
    max-width: 450px;
    width: 90%;
    margin: 0 auto;
    padding: 35px 30px;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.recover-container:hover {
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

/* Logo */
.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.recover-logo {
    max-width: 120px;
    height: auto;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.recover-logo:hover {
    transform: scale(1.05);
}

/* Encabezado */
.recover-header {
    text-align: center;
    margin-bottom: 25px;
}

.recover-header h2 {
    margin: 0;
    font-size: clamp(24px, 5vw, 28px);
    color: #1f2937;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.2;
}

.recover-header p {
    font-size: clamp(14px, 3vw, 15px);
    color: #6b7280;
    margin-top: 0;
    line-height: 1.4;
}

/* Texto informativo */
.info-text {
    background-color: #e0f2fe;
    color: #0369a1;
    border-left: 4px solid #0ea5e9;
    padding: 15px 20px;
    margin-bottom: 25px;
    border-radius: 8px;
    font-size: clamp(13px, 3vw, 14px);
    line-height: 1.5;
    word-wrap: break-word;
    max-width: 450px;
    width: 90%;
}

/* Mensaje de estado */
.status-message {
    background-color: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: clamp(13px, 3vw, 14px);
    line-height: 1.4;
    word-wrap: break-word;
    max-width: 450px;
    width: 90%;
}

/* Formulario */
.recover-form {
    max-width: 450px;
    width: 90%;
    margin: 0 auto;
    padding: 35px 30px;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.recover-form:hover {
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

/* Grupos de formulario */
.form-group {
    margin-bottom: 25px;
}

/* Labels */
.x-input-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: clamp(13px, 3vw, 14px);
}

/* Inputs */
.x-text-input {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: clamp(14px, 4vw, 15px);
    transition: all 0.2s;
    box-sizing: border-box;
    -webkit-appearance: none;
    min-height: 48px;
    background-color: #ffffff;
}

.x-text-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79,70,229,0.15);
}

/* Errores */
.x-input-error {
    color: #dc2626;
    font-size: clamp(12px, 3vw, 13px);
    margin-top: 5px;
    display: block;
    line-height: 1.3;
}

.error-text {
    color: #dc2626;
    font-size: clamp(12px, 3vw, 13px);
    margin-top: 5px;
    display: block;
    line-height: 1.3;
}

/* Acciones del formulario */
.form-actions {
    display: flex;
    justify-content: center;
    margin-top: 25px;
}

/* Botón principal */
.btn-submit {
    background-color: #4f46e5;
    color: #fff;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: clamp(14px, 4vw, 15px);
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(79,70,229,0.2);
    min-height: 48px;
    min-width: 200px;
    text-align: center;
}

.btn-submit:hover {
    background-color: #4338ca;
    box-shadow: 0 4px 8px rgba(79,70,229,0.3);
    transform: translateY(-1px);
}

.btn-submit:active {
    transform: translateY(0);
}

/* Link de regreso */
.back-link {
    text-align: center;
    margin-top: 25px;
    font-size: clamp(14px, 3vw, 15px);
    color: #6b7280;
}

.back-link a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.back-link a:hover {
    color: #362fd9;
    text-decoration: underline;
}

/* ========================= */
/* RESPONSIVE BREAKPOINTS */
/* ========================= */

/* Tablets y pantallas medianas */
@media (max-width: 768px) {
    .recover-form,
    .info-text,
    .status-message {
        width: 85%;
        padding: 25px 20px;
    }
    
    .recover-logo {
        max-width: 100px;
    }
}

/* Móviles grandes */
@media (max-width: 480px) {
    body {
        padding: 15px;
    }
    
    .recover-form,
    .info-text,
    .status-message {
        width: 92%;
        padding: 20px 18px;
        border-radius: 12px;
    }
    
    .recover-logo {
        max-width: 90px;
        margin-bottom: 15px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .x-text-input {
        padding: 12px 14px;
        min-height: 44px;
    }
    
    .btn-submit {
        padding: 12px 24px;
        min-height: 44px;
        min-width: 180px;
    }
    
    .info-text,
    .status-message {
        padding: 12px 15px;
        margin-bottom: 20px;
    }
}

/* Móviles pequeños (iPhone SE, etc) */
@media (max-width: 375px) {
    body {
        padding: 10px;
    }
    
    .recover-form,
    .info-text,
    .status-message {
        width: 95%;
        padding: 18px 15px;
    }
    
    .recover-logo {
        max-width: 80px;
    }
    
    .x-text-input {
        padding: 10px 12px;
        font-size: 16px; /* Previene zoom en iOS */
    }
    
    .btn-submit {
        padding: 12px 20px;
        min-height: 44px;
        min-width: 160px;
    }
}

/* Pantallas muy pequeñas */
@media (max-width: 320px) {
    .recover-form,
    .info-text,
    .status-message {
        width: 98%;
        padding: 15px 12px;
    }
    
    .recover-logo {
        max-width: 70px;
    }
    
    .btn-submit {
        padding: 10px 18px;
        font-size: 14px;
        min-width: 140px;
    }
}

/* Orientación landscape en móviles */
@media (max-height: 500px) and (orientation: landscape) {
    body {
        padding: 10px;
    }
    
    .recover-form {
        max-height: 90vh;
        overflow-y: auto;
        padding: 20px;
    }
    
    .recover-logo {
        max-width: 60px;
        margin-bottom: 10px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .info-text,
    .status-message {
        margin-bottom: 15px;
        padding: 10px 15px;
    }
}

/* Pantallas grandes */
@media (min-width: 1200px) {
    .recover-form,
    .info-text,
    .status-message {
        max-width: 480px;
    }
    
    .recover-logo {
        max-width: 140px;
    }
}

/* Mejoras de accesibilidad para modo alto contraste */
@media (prefers-contrast: high) {
    .recover-form {
        border: 2px solid #000;
    }
    
    .x-text-input:focus {
        border-width: 2px;
    }
}

/* Soporte para modo oscuro */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #111827;
    }
    
    .recover-form {
        background-color: #1f2937;
        color: #f9fafb;
        box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    }
    
    .recover-header h2 {
        color: #f9fafb;
    }
    
    .recover-header p {
        color: #d1d5db;
    }
    
    .x-input-label {
        color: #e5e7eb;
    }
    
    .x-text-input {
        background-color: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .x-text-input:focus {
        border-color: #6366f1;
    }
    
    .info-text {
        background-color: #1e3a8a;
        color: #dbeafe;
        border-left-color: #3b82f6;
    }
    
    .status-message {
        background-color: #064e3b;
        color: #a7f3d0;
        border-left-color: #10b981;
    }
    
    .back-link a {
        color: #60a5fa;
    }
    
    .back-link a:hover {
        color: #3b82f6;
    }
}