/* ============================================
   GeoAlertAR-ML — Estilos del Login
   Archivo: css/styles_login.css
   
   SECCIONES:
   1. Variables (colores, fondos, bordes)
   2. Fondo (foto, overlay, grilla, partículas)
   3. Logo
   4. Card de login (inputs, botón)
   5. Mensajes (error, éxito)
   6. Footer
   7. Animaciones
   8. Responsive (celular)
   ============================================ */


/* ============================================
   1. VARIABLES — Cambiá colores acá y cambian en toda la página
   ============================================ */
:root {
    --bg-deep: #0a0e17;
    --bg-card: #111827;
    --bg-input: #1a2332;
    --border: #1e2d3d;
    --border-focus: #f97316;
    --text-primary: #e2e8f0;
    --text-secondary: #8896a8;
    --text-muted: #4a5568;
    --accent: #f97316;                              /* ← COLOR PRINCIPAL naranja */
    --accent-dark: #ea580c;                         /* ← COLOR PRINCIPAL oscuro */
    --accent-glow: rgba(249, 115, 22, 0.15);
    --danger: #ef4444;
    --success: #10b981;
}

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

body {
    font-family: 'IBM Plex Sans', sans-serif;
    background: var(--bg-deep);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}


/* ============================================
   2. FONDO — Foto de incendio + overlay oscuro + partículas
   ============================================ */

/* Foto de fondo */
.bg-photo {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: url('../images/incendio forestal primero.jpg') center/cover no-repeat;
    filter: blur(6px) brightness(0.25) saturate(0.6);   /* ← OSCURIDAD del fondo: bajar brightness = más oscuro */
    transform: scale(1.1);
}

/* Degradado oscuro encima de la foto */
.bg-overlay {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse at 50% 40%, rgba(249, 115, 22, 0.08) 0%, transparent 60%),
        linear-gradient(180deg, rgba(10, 14, 23, 0.3) 0%, rgba(10, 14, 23, 0.6) 50%, rgba(10, 14, 23, 0.85) 100%);
}

/* Grilla animada: DESACTIVADA (si querés volver a activarla, descomentá)
.bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image:
        linear-gradient(rgba(249, 115, 22, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(249, 115, 22, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridDrift 20s linear infinite;
}
*/

/* Partículas flotantes (brasas) */
.particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(249, 115, 22, 0.4);
    border-radius: 50%;
    animation: float linear infinite;
}


/* ============================================
   3. LOGO
   
   Cambiar TAMAÑO: max-width (420px actual, subí a 500 para más grande)
   Cambiar BRILLO: brightness (1.4 actual, subí si se pierde)
   Cambiar GLOW: drop-shadow (más px = más resplandor)
   Cambiar IMAGEN: en el HTML buscá src="images/Geoar1.png"
   Mover ARRIBA/ABAJO: top (negativo=sube, positivo=baja)
   ============================================ */
.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 0 24px;
}

.brand {
    text-align: center;
    margin-bottom: 30px;
    margin-top: -50px;                             /* ← MOVER TODO (logo+texto): negativo=sube, positivo=baja */
}

.brand-logo {
    max-width: 420px;                              /* ← TAMAÑO del logo */
    width: 100%;
    height: auto;
    margin: 0 auto 8px;
    position: relative;
    top: 60px;                                     /* ← MOVER SOLO EL LOGO: negativo=sube, positivo=baja */
    display: block;
    filter:
        brightness(1.4)                            /* ← BRILLO: 1.0=normal, 1.4=actual, 1.8=muy brillante */
        contrast(1.05)
        drop-shadow(0 0 25px rgba(249, 115, 22, 0.5))   /* ← GLOW chico */
        drop-shadow(0 0 50px rgba(249, 115, 22, 0.25));  /* ← GLOW grande */
    animation: logoPulse 3s ease-in-out infinite;
    transition: transform 0.3s ease;
}

.brand-logo:hover {
    transform: scale(1.03);
}

/* Nube oscura detrás del logo */
.brand-logo-wrap {
    position: relative;
}

.brand-logo-wrap::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 130%;                                   /* ← ANCHO de la nube oscura */
    height: 200%;                                  /* ← ALTO de la nube oscura */
    background: radial-gradient(ellipse, rgba(10, 14, 23, 0.8) 0%, rgba(10, 14, 23, 0.4) 45%, transparent 70%);
    z-index: -1;
    border-radius: 50%;
}

.brand p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 6px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 500;
}


/* ============================================
   4. CARD DE LOGIN (formulario, inputs, botón)
   ============================================ */
.login-card {
    background: rgba(17, 24, 39, 0.85);
    border: 1px solid rgba(249, 115, 22, 0.1);
    border-radius: 16px;
    padding: 36px 32px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(16px);
}

.login-card h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.login-card .subtitle {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 28px;
}

.field { margin-bottom: 20px; }

.field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

.input-wrap { position: relative; }

.input-wrap .icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    transition: opacity 0.2s;
    opacity: 0.4;
    display: flex;
    align-items: center;
}

.input-wrap .icon svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-secondary);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.input-wrap input {
    width: 100%;
    padding: 12px 14px 12px 44px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrap input::placeholder {
    color: var(--text-muted);
    font-family: 'IBM Plex Sans', sans-serif;
}

.input-wrap input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.input-wrap input:focus ~ .icon { opacity: 0.9; }
.input-wrap input:focus ~ .icon svg { stroke: var(--accent); }

/* Botón mostrar/ocultar contraseña */
.toggle-pw {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}
.toggle-pw svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-muted);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.2s;
}
.toggle-pw:hover svg { stroke: var(--text-secondary); }

/* Botón de login */
.btn-login {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border: none;
    border-radius: 10px;
    color: white;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.01em;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
    margin-top: 8px;
    position: relative;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(249, 115, 22, 0.35);
}

.btn-login:active { transform: translateY(0); }

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-login.loading {
    pointer-events: none;
    color: transparent;
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}


/* ============================================
   5. MENSAJES (error y éxito)
   ============================================ */
.error-msg {
    margin-top: 16px;
    padding: 10px 14px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 8px;
    color: #fca5a5;
    font-size: 0.82rem;
    text-align: center;
    display: none;
    animation: shakeIn 0.4s ease;
}

.error-msg.visible { display: block; }

.success-msg {
    margin-top: 16px;
    padding: 10px 14px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 8px;
    color: #6ee7b7;
    font-size: 0.82rem;
    text-align: center;
    display: none;
}

.success-msg.visible { display: block; }

.forgot-link {
    display: block;
    text-align: center;
    margin-top: 12px;
    color: #94a3b8;
    font-size: 0.8rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: #f97316;
}

.info-msg {
    margin-top: 16px;
    padding: 10px 14px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 8px;
    color: #93c5fd;
    font-size: 0.82rem;
    text-align: center;
    display: none;
}

.info-msg.visible { display: block; }


/* ============================================
   6. FOOTER
   ============================================ */
.login-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--text-muted);
    font-size: 0.75rem;
    line-height: 1.6;
}

.login-footer .version {
    font-family: 'IBM Plex Mono', monospace;
    color: var(--text-secondary);
}

.status-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    animation: dotBlink 2s ease-in-out infinite;
}


/* ============================================
   7. ANIMACIONES
   ============================================ */
@keyframes logoPulse {
    0%, 100% { filter: brightness(1.4) contrast(1.05) drop-shadow(0 0 25px rgba(249, 115, 22, 0.5)) drop-shadow(0 0 50px rgba(249, 115, 22, 0.25)); }
    50% { filter: brightness(1.5) contrast(1.05) drop-shadow(0 0 35px rgba(249, 115, 22, 0.65)) drop-shadow(0 0 60px rgba(249, 115, 22, 0.35)); }
}

@keyframes float {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

@keyframes gridDrift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

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

@keyframes dotBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

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


/* ============================================
   8. RESPONSIVE (celular)
   ============================================ */
@media (max-width: 480px) {
    .login-card { padding: 28px 20px; }
    .brand-logo { max-width: 300px; }              /* ← Tamaño del logo en celular */
}
