/* public/assets/css/auth.css */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root {
    --primary-glow: #4f46e5;
    --accent-glow: #8b5cf6;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #0f172a;
    /* Fondo con degradado animado */
    background-image: 
        radial-gradient(at 0% 0%, hsla(253,16%,7%,1) 0, transparent 50%), 
        radial-gradient(at 50% 0%, hsla(225,39%,30%,1) 0, transparent 50%), 
        radial-gradient(at 100% 0%, hsla(339,49%,30%,1) 0, transparent 50%);
    background-size: 200% 200%;
    animation: gradientBG 15s ease infinite;
    
    /* REGLAS DE CENTRADO FORZADO */
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    display: flex;             /* Activa Flexbox */
    justify-content: center;   /* Centra Horizontalmente */
    align-items: center;       /* Centra Verticalmente */
    overflow: hidden;          /* Evita barras de scroll */
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}


/* --- TARJETA --- */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 3rem;
    width: 100%;
    max-width: 400px;
    
    /* Sombra muy suave y pegada para que no parezca un estante */
    box-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.2); 
    
    position: relative;
    z-index: 10;
    
    /* ¡ESTA ES LA LÍNEA MÁGICA QUE FALTABA! */
    overflow: hidden; 
}


/* Efecto brillo diagonal */
.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.05), transparent);
    transform: skewX(-25deg);
    pointer-events: none;
}

/* --- ESTILOS DE TEXTO E INPUTS --- */
h1, h2, h3, p, label { color: white; }
.text-muted { color: #94a3b8 !important; }

.form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.8rem;
    border-radius: 12px;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-glow);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    color: white;
}

.form-control::placeholder { color: #64748b; }

.btn-glow {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.8rem;
    border-radius: 12px;
    width: 100%;
    transition: transform 0.2s;
}
.btn-glow:hover {
    transform: translateY(-2px);
    color: white;
}

a { color: #818cf8; text-decoration: none; }
a:hover { color: #a5b4fc; }

/* Orbes decorativos */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
    z-index: 1;
}
.orb-1 { top: 10%; left: 15%; width: 300px; height: 300px; background: var(--primary-glow); }
.orb-2 { bottom: 10%; right: 15%; width: 250px; height: 250px; background: var(--accent-glow); }


/* 1. Fondo completo sin cortes ni scroll */
html, body {
    height: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    overflow: hidden !important; /* Adiós a barras de desplazamiento extra */
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
}

/* 2. TRUCO CLAVE: Obligar al 'container' a ser pantalla completa y flexible */
body > .container {
    display: flex !important;
    justify-content: center !important; /* Centra horizontalmente */
    align-items: center !important;     /* Centra verticalmente */
    
    min-height: 100vh !important;       /* Ocupa toda la altura */
    width: 100% !important;             /* Ocupa todo el ancho */
    max-width: none !important;         /* ROMPE el límite de ancho de Bootstrap */
    
    padding: 0 !important;
    margin: 0 !important;
}

/* 3. Eliminar sombras o bordes raros del contenedor invisible */
body > .container {
    box-shadow: none !important;
    background: transparent !important;
    border: none !important;
}

/* Corrección para permitir scroll en formularios largos (Registro) */
body.scrollable {
    height: auto !important;
    min-height: 100vh;
    overflow-y: auto !important;
    padding-top: 40px;
    padding-bottom: 40px;
}

/* --- ADAPTACIÓN DARK MODE PARA INT-TEL-INPUT --- */
.iti { 
    width: 100%; 
    display: block; 
}

/* El input del teléfono */
.iti__tel-input {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    border-radius: 12px !important;
}

/* La lista desplegable de países */
.iti__country-list {
    background-color: #0f172a !important; /* Mismo fondo oscuro */
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    white-space: normal; /* Evita textos cortados en móvil */
}

/* Hover en los países */
.iti__country:hover, 
.iti__country.iti__highlight {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Línea separadora en la lista */
.iti__divider {
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

/* --- ARREGLO VISIBILIDAD CÓDIGO PAÍS --- */
.iti__selected-dial-code {
    color: #ffffff !important; /* Fuerza el color blanco para el +51 */
    font-weight: 600;          /* Lo hace un poco más gordito para que se lea mejor */
}

/* --- ESTILOS DE AUTENTICACIÓN (LOGIN / RECUPERAR) --- */

body.auth-body {
    background-color: #0f172a;
    background-image: 
        radial-gradient(at 0% 0%, hsla(253,16%,7%,1) 0, transparent 50%), 
        radial-gradient(at 50% 0%, hsla(225,39%,30%,1) 0, transparent 50%), 
        radial-gradient(at 100% 0%, hsla(339,49%,30%,1) 0, transparent 50%);
    background-size: cover;
    background-repeat: no-repeat;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    color: #fff;
    margin: 0;
}

.auth-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.auth-icon {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: white;
    opacity: 0.9;
}

.auth-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
    color: #fff;
}

.auth-subtitle {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

/* Inputs Oscuros */
.form-control-dark {
    background-color: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
}

.form-control-dark:focus {
    background-color: rgba(15, 23, 42, 0.8);
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    color: #fff;
}

.form-control-dark::placeholder {
    color: #64748b;
}

.input-group-text-dark {
    background-color: transparent;
    border-right: 0;
    border-color: rgba(255, 255, 255, 0.1);
    color: #64748b;
    border-radius: 12px 0 0 12px;
}

/* Botón Gradiente */
.btn-auth {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    border: none;
    color: white;
    padding: 0.8rem;
    border-radius: 12px;
    font-weight: 600;
    width: 100%;
    margin-top: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(168, 85, 247, 0.4);
    color: white;
}

/* Link Volver */
.auth-link {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    margin-top: 2rem;
    display: inline-block;
    transition: color 0.2s;
}

.auth-link:hover {
    color: #fff;
}