/* === Breakpoints universales === */
@media (max-width: 768px) {
    .page-title { font-size: 1.6rem; }
    .container { padding: 1rem; }
    .form-card { max-width: 520px; margin: 0 auto; padding: 1rem; }
    .form-control { height: 40px; font-size: 0.95rem; }
    .btn { padding: 8px 14px; font-size: 0.9rem; }
}
@media (max-width: 520px) {
    .page-title { font-size: 1.35rem; }
    .form-card { max-width: 100%; padding: 0.85rem; border-radius: 12px; }
}
/* ========================================= */
/* === 1. VARIABLES Y BASE (Dark Theme) === */
/* ========================================= */
:root {
    --teal-main: #009688;
    --teal-bright: #00bcd4;
    --teal-gradient: linear-gradient(135deg, #009688 0%, #00bcd4 100%);
    --bg-dark: #121619;
    --card-bg: #1a1f24;
    --input-bg: #212529; /* Fondo oscuro para los inputs */
    --text-color: #ffffff;
    --text-muted: #adb5bd;
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body.recovery-body {
    background-image: url('../img/3.png'); /* Asegúrate que la ruta sea correcta */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    font-family: var(--font-family);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

/* Capa oscura superpuesta al fondo */
body.recovery-body::before {
    content: ''; position: absolute; inset: 0;
    background-color: rgba(15, 20, 25, 0.85);
    backdrop-filter: blur(4px);
    z-index: 0;
}

.container { position: relative; z-index: 1; }

/* ========================================= */
/* === 2. TARJETA (CARD) ESTILO GLASS === */
/* ========================================= */
.recovery-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
    color: var(--text-color);
    overflow: hidden;
}

.card-body { padding: 2.5rem 2rem !important; }

/* === ICONO CIRCULAR (LA LUPA O CANDADO DEL ENCABEZADO) === */
.icon-circle {
    width: 80px; 
    height: 80px;
    /* Fondo sutil con gradiente */
    background: linear-gradient(135deg, rgba(0, 150, 136, 0.1), rgba(0, 188, 212, 0.1));
    border: 1px solid rgba(0, 188, 212, 0.2);
    border-radius: 50%;
    display: flex; 
    align-items: center; 
    justify-content: center;
    color: var(--teal-bright);
    
    /* CENTRADO AUTOMÁTICO */
    margin: 0 auto 1.5rem auto; 
    
    /* EFECTO GLOW (Resplandor) como en tu imagen */
    box-shadow: 0 0 20px rgba(0, 188, 212, 0.25); 
}

.text-muted { color: var(--text-muted) !important; }

/* ========================================= */
/* === 3. INPUTS GENERALES (Password y Email) === */
/* ========================================= */

.form-label {
    font-size: 0.9rem; margin-bottom: 8px; color: #dee2e6; font-weight: 500; margin-left: 5px;
}

.password-input-wrapper {
    position: relative;
    width: 100%;
}

/* Estilos comunes para AMBOS inputs */
.password-input-custom, 
.email-input-custom {
    background-color: var(--input-bg) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    padding: 14px 15px !important;
    color: #fff !important;
    font-size: 1rem;
    height: 52px;
    width: 100%;
    transition: all 0.3s ease;
}

/* El input de contraseña necesita espacio a la derecha para los ojos */
.password-input-custom {
    padding-right: 90px !important; 
}

.password-input-custom:focus,
.email-input-custom:focus {
    background-color: #2b3035 !important;
    border-color: var(--teal-bright) !important;
    box-shadow: 0 0 0 4px rgba(0, 188, 212, 0.15) !important;
    outline: none;
}

.password-input-custom::placeholder,
.email-input-custom::placeholder {
    color: #6c757d;
}

/* ========================================= */
/* === 4. GRUPO DE ICONOS (SOLO PASSWORD) === */
/* ========================================= */
.input-icons {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 10px; /* Separación entre llave y ojo */
    z-index: 10;
}

.icon-key {
    color: #495057;
    font-size: 1rem;
    pointer-events: none; 
}

.btn-toggle-pass {
    background: transparent !important;
    border: none !important;
    color: #adb5bd;
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.btn-toggle-pass:hover {
    color: var(--teal-bright);
    background: rgba(255,255,255,0.05) !important;
}

/* Eliminar cosas nativas de Windows/Edge */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear { display: none !important; }

/* ========================================= */
/* === 5. BOTONES Y ALERTAS === */
/* ========================================= */
.btn-primary {
    background: var(--teal-gradient);
    border: none; border-radius: 10px;
    padding: 12px 20px; font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 188, 212, 0.3);
    background-image: linear-gradient(135deg, #00897b 0%, #00acc1 100%);
}

.btn-outline-secondary {
    border: 1px solid #495057;
    color: #ced4da; border-radius: 10px;
    padding: 12px 20px; font-weight: 600;
    text-decoration: none;
    display: inline-block; 
    text-align: center;
}
.btn-outline-secondary:hover {
    background: #343a40; border-color: #6c757d; color: #fff;
}

/* Alertas */
.alert { border-radius: 10px; border: none; font-size: 0.95rem; }
.alert-danger { background: rgba(220, 53, 69, 0.15); color: #ff6b6b; border: 1px solid rgba(220, 53, 69, 0.2); }
.alert-success { background: rgba(25, 135, 84, 0.15); color: #20c997; border: 1px solid rgba(25, 135, 84, 0.2); }

/* ========================================= */
/* === 6. AJUSTES ESPECÍFICOS PARA MÓVIL === */
/* ========================================= */
@media (max-width: 576px) {
    /* 1. Reducimos el relleno de la tarjeta para ganar espacio en pantalla chica */
    .card-body {
        padding: 2rem 1.2rem !important; 
    }

    /* 2. Ajustamos el tamaño del título para que no ocupe tanto */
    .h4 {
        font-size: 1.3rem;
    }
    
    /* 3. Aseguramos que los botones se vean grandes y fáciles de tocar */
    .btn-primary, .btn-outline-secondary {
        width: 100%;      /* Forzamos ancho completo por si acaso */
        display: block;   /* Asegura comportamiento de bloque */
        margin-bottom: 10px; /* Separación si se ponen uno encima de otro */
    }
    
    /* Opcional: Si quieres que los botones estén uno ARRIBA del otro en celular 
       en vez de lado a lado (para que sean más fáciles de picar), descomenta esto: */
    /*
    .d-flex.gap-3 {
        flex-direction: column;
    }
    */
}
/* ======================================================= */
/* ===  RECUPERAR: VERSIÓN COMPACTA (RESPETA ESTILOS)  === */
/* ======================================================= */

@media screen and (max-width: 576px) {

    /* 1. CONTENEDOR: Aseguramos que no pegue a los bordes */
    .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        /* Si el teclado sube, esto permite scroll */
        min-height: auto !important; 
        height: auto !important;
        padding-top: 40px !important;
        padding-bottom: 40px !important;
    }

    /* 2. TARJETA: Reducimos el aire interno (padding) para que sea compacta */
    .card-body {
        padding: 1.5rem 1.2rem !important; /* Antes era 2.5rem */
    }

    /* 3. ICONO: Un poco más pequeño para ahorrar espacio vertical */
    .icon-circle {
        width: 65px !important;
        height: 65px !important;
        margin-bottom: 1rem !important;
    }
    .icon-circle i {
        font-size: 1.5rem !important;
    }

    /* 4. TEXTOS: Ajuste de tamaño para móvil */
    .recovery-title {
        font-size: 1.4rem !important;
        margin-bottom: 5px !important;
    }
    
    .recovery-subtitle {
        font-size: 0.9rem !important;
        margin-bottom: 1.5rem !important;
        line-height: 1.4 !important;
    }

    /* 5. INPUTS: Altura cómoda pero no gigante */
    .form-control, .email-input-custom {
        height: 48px !important;
        font-size: 0.95rem !important;
        padding: 10px 15px !important;
        margin-bottom: 1.5rem !important;
    }
    
    .form-group {
        margin-bottom: 0.5rem !important;
    }

    /* 6. BOTONES: Lado a lado (Fila) y del mismo ancho */
    /* Usamos el contenedor d-flex que ya tienes en el HTML */
    form .d-flex.gap-3 {
        gap: 10px !important; /* Reducimos el espacio entre ellos */
    }

    .btn {
        flex: 1 !important; /* Obliga a ambos botones a tener el mismo ancho (50%) */
        width: auto !important;
        padding: 10px 5px !important; /* Menos relleno lateral */
        font-size: 0.9rem !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        height: 45px !important;
    }
    
    /* Ajuste para el botón cancelar (borde visible) */
    .btn-outline-secondary {
        background-color: transparent !important;
        border: 1px solid #495057 !important;
        color: #ced4da !important;
    }
}