/* =========================================
   1. FUENTES E ICONOS
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css');

/* =========================================
   2. VARIABLES DE DISEﾃ前
   ========================================= */
:root {
    /* Colores de Marca (Verde Mobiliarium) */
    --primary-color: #7CB342;       
    --primary-hover: #558B2F;
    --primary-glow: rgba(124, 179, 66, 0.2); 
    
    /* Tema Oscuro */
    --bg-dark: #121212;
    --card-bg: #1E1E1E;
    --input-bg: #2A2A2A;
    
    /* Textos */
    --text-white: #FFFFFF;
    --text-muted: #B0B0B0;
    
    /* Feedback */
    --error-color: #ef5350;
    --success-color: #66bb6a;
}

/* =========================================
   3. RESET Y ESTRUCTURA BASE
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
}

body {
    background-color: var(--bg-dark);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 20px;
}

/* Fondo con efecto de luz ambiental (Glow) */
body::before {
    content: '';
    position: absolute;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
}

/* =========================================
   4. TARJETA DE LOGIN
   ========================================= */
.container {
    background-color: var(--card-bg);
    width: 100%;
    max-width: 420px;
    padding: 3rem 2.5rem;
    border-radius: 24px; /* Bordes de la tarjeta */
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.05);
    text-align: center;
    position: relative;
    backdrop-filter: blur(10px);
}

/* Logo e Imagen */
.logo {
    max-width: 180px;
    height: auto;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 10px rgba(124, 179, 66, 0.2));
}

h2 {
    color: var(--text-white);
    font-weight: 500;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    letter-spacing: 0.5px;
}

/* =========================================
   5. INPUTS REDONDEADOS (Pﾃｭldora)
   ========================================= */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    margin-left: 15px; /* Alineado con la curva del input */
}

/* Contenedor Flex para el Input */
.input-box {
    position: relative;
    background-color: var(--input-bg);
    border-radius: 50px; /* Hace el input completamente redondo */
    height: 55px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

/* Efecto Focus al escribir */
.input-box:focus-within {
    border-color: var(--primary-color);
    background-color: #222;
    box-shadow: 0 0 15px var(--primary-glow);
}

/* Iconos dentro del input (Izquierda) */
.input-box i.input-icon {
    color: #666;
    font-size: 1.2rem;
    margin-right: 15px;
    transition: color 0.3s;
}

.input-box:focus-within i.input-icon {
    color: var(--primary-color);
}

/* El campo de texto real */
.input-box input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-white);
    font-size: 1rem;
    width: 100%;
    height: 100%;
}

.input-box input::placeholder {
    color: #555;
}

/* Icono Ojo (Derecha) */
.toggle-password {
    cursor: pointer;
    color: #666;
    padding: 10px;
    display: flex;
    align-items: center;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: var(--text-white);
}

/* =========================================
   6. ALERTAS Y BOTONES
   ========================================= */
.alert {
    padding: 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}

.alert.error {
    background: rgba(239, 83, 80, 0.1);
    color: #ff8a80;
    border-left: 3px solid var(--error-color);
}

.alert.success {
    background: rgba(102, 187, 106, 0.1);
    color: #81c784;
    border-left: 3px solid var(--success-color);
}

/* Botﾃｳn Principal */
.btn-login {
    width: 100%;
    height: 55px;
    border-radius: 50px;
    border: none;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 10px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(124, 179, 66, 0.3);
}

.btn-login:disabled {
    background: #444;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Enlaces */
.links {
    margin-top: 2rem;
}

.links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color 0.3s;
}

.links a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Responsive Mﾃｳvil */
@media (max-width: 480px) {
    .container {
        padding: 2rem 1.5rem;
        background-color: var(--card-bg);
    }
}

/* =========================================
   FIX: ARREGLO PARA AUTOCOMPLETAR (CHROME/EDGE)
   Esto quita el fondo blanco cuadrado feo al rellenar datos
   ========================================= */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    /* Forzamos el color de fondo al gris oscuro de tu diseño (#2A2A2A) */
    -webkit-box-shadow: 0 0 0 30px #2A2A2A inset !important;
    /* Forzamos el color del texto a blanco */
    -webkit-text-fill-color: white !important;
    caret-color: white;
    transition: background-color 5000s ease-in-out 0s;
}

/* Asegurar que el input real sea transparente */
.input-box input {
    background-color: transparent !important; 
}