/* assets/css/login.css - Diseño Final Oscuro + Animaciones */

:root {
    /* Colores de Marca Himagen */
    --color-himagen: #D91F6C;       /* Fucsia Principal */
    --color-negro-azul: #2E3A4B;    /* Azul Oscuro (Acentos) */
    
    /* Variables Modo Oscuro */
    --color-fondo-oscuro: #121212;  /* Fondo principal */
    --color-fondo-panel: #1E1E1E;   /* Fondo del panel derecho */
    --color-texto-claro: #E0E0E0;   /* Texto principal */
    --color-texto-gris: #A0A0A0;    /* Texto secundario */
    --color-borde-oscuro: #333333;  /* Bordes de inputs */
    --color-alarma-rojo: #ff4d4f;   /* Rojo de error */
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden; /* Sin scroll */
    background-color: var(--color-fondo-oscuro);
    color: var(--color-texto-claro);
}

/* --- CONTENEDOR PRINCIPAL --- */
.login-wrapper {
    display: flex;
    width: 100%;
    height: 100vh;
}

/* --- LADO IZQUIERDO: VISUAL (IMAGEN) --- */
.visual-side {
    flex: 1.4; /* Ocupa el 60% aprox */
    position: relative;
    
    /* 🔥 TU IMAGEN DE FONDO */
    background-image: url('/assets/images/himagen_team_dark.jpg'); 
    background-size: cover;
    background-position: center;
    
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 80px;
    color: white;
    overflow: hidden;

    /* 🔥 ANIMACIÓN DE ENTRADA PARA LA IMAGEN */
    /* Empieza invisible y sube suavemente */
    opacity: 0; 
    animation: imageEntrance 1.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Capa de color oscura (Overlay) */
.visual-side::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    /* Degradado oscuro con toque fucsia */
    background: linear-gradient(135deg, rgba(18, 18, 18, 0.9), rgba(217, 31, 108, 0.45));
    z-index: 1;
}

.visual-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    /* Animación del texto (ligeramente retrasada respecto a la imagen) */
    animation: slideUp 0.8s ease-out 0.3s forwards;
    opacity: 0; /* Empieza invisible */
}

.visual-content h1 {
    font-size: 5rem; /* Texto Himagen grande */
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1;
    text-shadow: 0 4px 30px rgba(0,0,0,0.6);
    letter-spacing: -2px;
}

.visual-content p {
    font-size: 1.5rem;
    opacity: 0.9;
    font-weight: 300;
    line-height: 1.5;
    border-left: 4px solid var(--color-himagen);
    padding-left: 20px;
}

/* --- LADO DERECHO: FORMULARIO (MODO OSCURO) --- */
.form-side {
    flex: 1;
    background: var(--color-fondo-panel); /* Panel gris oscuro */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    position: relative;
    box-shadow: -20px 0 50px rgba(0,0,0,0.6); /* Sombra para profundidad */
    z-index: 10;
}

.login-box {
    width: 100%;
    max-width: 380px;
    text-align: center;
    animation: fadeIn 1s ease 0.5s forwards; /* Aparece medio segundo después */
    opacity: 0;
}

.logo-img {
    max-width: 150px;
    margin-bottom: 30px;
}

.login-header h2 {
    color: var(--color-texto-claro);
    font-size: 28px;
    margin-bottom: 8px;
    font-weight: 700;
}

.login-header p {
    color: var(--color-texto-gris);
    margin-bottom: 40px;
    margin-top: 0;
    font-size: 15px;
}

/* --- INPUTS OSCUROS --- */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--color-texto-gris);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    border: 2px solid var(--color-borde-oscuro);
    border-radius: 12px;
    transition: all 0.2s ease;
    box-sizing: border-box;
    background: #252525; /* Fondo input */
    color: var(--color-texto-claro);
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-himagen);
    background: #2A2A2A;
    box-shadow: 0 0 0 4px rgba(217, 31, 108, 0.15);
}

.form-group input::placeholder {
    color: #555;
}

/* --- BOTÓN PRINCIPAL --- */
.login-button {
    width: 100%;
    padding: 16px;
    background: var(--color-himagen);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    box-shadow: 0 10px 25px rgba(217, 31, 108, 0.25);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-button:hover {
    background: #b01a58;
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(217, 31, 108, 0.4);
}

/* --- MENSAJES DE ERROR --- */
.error-message {
    background: rgba(255, 77, 79, 0.1);
    border-left: 4px solid var(--color-alarma-rojo);
    color: var(--color-alarma-rojo);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    text-align: left;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.footer-copy {
    margin-top: 60px;
    color: #555; /* Gris oscuro sutil */
    font-size: 12px;
    letter-spacing: 0.5px;
}

/* --- KEYFRAMES DE ANIMACIÓN --- */

/* 1. Para la Imagen de Fondo (Sube y se aleja) */
@keyframes imageEntrance {
    0% {
        opacity: 0;
        transform: translateY(60px) scale(1.1); /* Empieza abajo y grande */
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1); /* Termina en su sitio normal */
    }
}

/* 2. Para el Texto (Sube normal) */
@keyframes slideUp { 
    from { opacity: 0; transform: translateY(40px); } 
    to { opacity: 1; transform: translateY(0); } 
}

/* 3. Para el Formulario (Aparece suave) */
@keyframes fadeIn { 
    from { opacity: 0; } 
    to { opacity: 1; } 
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    .login-wrapper { flex-direction: column; }
    .visual-side { display: none; }
    .form-side { flex: 1; padding: 20px; box-shadow: none; background: var(--color-fondo-oscuro); }
    body { overflow-y: auto; }
}