﻿/* Importar fuentes desde horeca.css */
@font-face {
    font-family: 'HEINEKENCore';
    src: url('fonts/HEINEKENCore.ttf') format('ttf'),url('fonts/HEINEKENCore.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'HEINEKENCurve';
    src: url('fonts/HEINEKENCurve.ttf') format('ttf'), url('fonts/HEINEKENCurve.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

/* Reset completo para evitar conflictos con Bootstrap */
* {
    box-sizing: border-box;
}

/* Body con imagen de fondo restaurada */
body.login-body {
    font-family: 'HEINEKENCore', 'Heineken Core', Arial, sans-serif;
    background: #fff;
    background-image: url(images/background.png);
    background-repeat: repeat;
    background-position: top left;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #205527;
    padding-top: 30px;
}

/* Layout principal */
.login-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Wrapper del formulario - DIMENSIONES EXACTAS: 373x560 */
.login-wrapper {
    width: 373px !important; /* FIJO: Ancho exacto */
    height: 560px !important; /* FIJO: Alto exacto */
    max-width: none !important; /* Eliminar max-width */
    background: white;
    padding: 20px; /* REDUCIDO para que quepa todo */
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(32, 85, 39, 0.15);
    border: 2px solid #EDFACC;
    overflow: hidden; /* Para evitar desbordamiento */
    display: flex;
    flex-direction: column;
}

/* Contenedor principal - SIN conflictos con Bootstrap */
.login-wrapper .container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center;
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Contenedor del formulario */
.form-container {
    width: 100%;
    margin: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ESPACIADO REDUCIDO - Logo */
.logo-container {
    margin-bottom: 8px; /* REDUCIDO más para el nuevo tamaño */
}

.logo {
    max-width: 180px; /* REDUCIDO para que quepa en 373px */
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Títulos - RESTAURADO */
.title {
    font-family: 'HEINEKENCurve', 'Heineken Core', Arial, sans-serif;
    font-size: 20px; /* REDUCIDO para que quepa */
    color: #205527;
    margin-bottom: 8px; /* REDUCIDO */
}

/* Formulario - ESPACIADO REDUCIDO */
#loginForm {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px !important; /* MÁS REDUCIDO para 560px de alto */
    flex: 1;
    justify-content: space-between;
}

/* Botón Azure AD - AJUSTADO al nuevo tamaño */
.btn-azure {
    background-color: #2A6EBB;
    color: #FFFFFF;
    font-size: 18px; /* REDUCIDO */
    font-weight: bold;
    border: none;
    border-radius: 10px;
    padding: 10px 15px; /* REDUCIDO */
    width: 100%;
    cursor: pointer;
    margin: 3px 0; /* REDUCIDO */
    transition: background-color 0.2s ease;
    font-family: 'HEINEKENCore', Arial, sans-serif;
}

.btn-azure:hover {
    background-color: #000000;
}

/* Separador - AJUSTADO */
.separator {
    margin: 4px 0; /* REDUCIDO */
    font-size: 16px; /* REDUCIDO */
    font-weight: bold;
    color: #205527;
    font-family: 'HEINEKENCore', Arial, sans-serif;
}

/* Contenedores de campos - SIN margen de Bootstrap y PRÁCTICAMENTE PEGADOS */
.w-100 {
    width: 100% !important;
    margin-bottom: 0px !important; /* ELIMINADO: Sin separación por defecto */
}

/* ESPECÍFICO: Contenedor del campo de usuario - PEGADO */
.w-100:nth-of-type(1) {
    margin-bottom: -2px !important; /* NEGATIVO: Para solapar ligeramente y eliminar cualquier espacio */
}

/* ESPECÍFICO: Contenedor del campo de contraseña - PEGADO */
.w-100:nth-of-type(2) {
    margin-bottom: 0px !important; /* Sin espacio después del campo contraseña */
    margin-top: -2px !important; /* NEGATIVO: Para solapar ligeramente hacia arriba */
}

/* Campos de entrada - AJUSTADOS al nuevo tamaño */
.input-field {
    background-color: #EDFACC;
    border: none;
    border-radius: 10px;
    padding: 10px 15px; /* REDUCIDO */
    width: 100%;
    font-size: 18px; /* REDUCIDO */
    color: #205527;
    margin: 0 !important;
    font-family: 'HEINEKENCore', Arial, sans-serif;
}

.input-field:focus {
    outline: 2px solid #7AB800;
    background-color: #E8F5BB;
}

.input-field::placeholder {
    color: #205527;
    opacity: 0.7;
}

/* Contenedor de contraseña - PEGADO AL CAMPO USUARIO */
.password-container {
    position: relative;
    width: 100%;
    margin: 0 !important; /* Sin margen */
    margin-top: -2px !important; /* NEGATIVO: Para solapar hacia arriba */
}

.password-container .input-field {
    padding-right: 45px; /* REDUCIDO */
}

/* Icono del ojo - AJUSTADO */
.toggle-password {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 20px; /* REDUCIDO */
    color: #205527;
    background: none;
    border: none;
    padding: 0;
    user-select: none;
    z-index: 2;
}

.toggle-password:hover {
    color: #7AB800;
}

/* Botón Acceder - AJUSTADO al nuevo tamaño */
.btn-submit {
    background-color: #205527;
    color: #FFFFFF;
    font-size: 24px; /* REDUCIDO */
    font-weight: bold;
    border: none;
    border-radius: 10px;
    width: 100%;
    padding: 12px 15px; /* REDUCIDO */
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin: 4px 0 !important; /* REDUCIDO */
    font-family: 'HEINEKENCore', Arial, sans-serif;
}

.btn-submit:hover {
    background-color: #7AB800;
}

/* Checkbox - ESPACIADO REDUCIDO */
.checkbox-container {
    display: flex;
    align-items: center;
    margin: 4px 0 !important; /* REDUCIDO */
    font-size: 14px; /* REDUCIDO */
    color: #205527;
    justify-content: flex-start;
    font-family: 'HEINEKENCore', Arial, sans-serif;
}

.checkbox-container input[type="checkbox"] {
    width: 20px; /* REDUCIDO */
    height: 20px; /* REDUCIDO */
    accent-color: #EDFACC;
    margin-right: 8px; /* REDUCIDO */
}

.checkbox-container label {
    margin: 0;
    cursor: pointer;
}

/* Enlace "Olvidé mi contraseña" - AJUSTADO */
.forgot-password {
    display: block;
    margin: 4px 0 !important; /* REDUCIDO */
    font-size: 14px; /* REDUCIDO */
    color: #205527;
    text-decoration: none;
    text-align: left;
    font-family: 'HEINEKENCore', Arial, sans-serif;
}

.forgot-password:hover {
    text-decoration: underline;
    color: #7AB800;
}

/* Mensajes de validación - MÁS COMPACTOS Y SIN SEPARACIÓN */
.text-danger {
    font-size: 12px !important; /* REDUCIDO */
    margin: 0px 0 0px 0 !important; /* SIN MARGEN para máxima compacidad */
    display: block;
    text-align: left;
    color: #dc3545 !important;
    font-family: 'HEINEKENCore', Arial, sans-serif;
    line-height: 1.1; /* MENOR altura de línea */
}

/* Footer - Solo con color, sin imagen */
.login-footer,
footer {
    background-color: #205527;
    color: #7AB800;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    padding: 20px;
    width: 100%;
    margin-top: auto;
    font-family: 'HEINEKENCore', Arial, sans-serif;
    /* Comentado para eliminar la imagen de fondo */
    /* background-image: url(images/background.png); */
}

/* Mensaje de error general */
.text-center.mt-3 {
    font-family: 'HEINEKENCore', Arial, sans-serif;
    font-size: 14px; /* REDUCIDO */
    margin-top: 8px !important; /* REDUCIDO */
}

/* IMPORTANTE: Desactivar media queries para mantener el tamaño fijo */
/* Comentamos las media queries para que el formulario mantenga 373x560 siempre */
/*
@media (max-width: 768px) {
    .login-wrapper {
        max-width: 95%;
        padding: 20px;
    }
    ...
}
*/

/* Responsivo SOLO para pantallas muy pequeñas donde no quepa el formulario */
@media (max-width: 400px) {
    .login-wrapper {
        width: 95% !important;
        height: auto !important;
        max-width: 373px;
        min-height: 560px;
    }
    
    .login-main {
        padding: 10px;
    }
}

/* Animaciones sutiles para mejorar la experiencia */
.btn-azure, .btn-submit {
    transition: all 0.3s ease;
}

.btn-azure:hover, .btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.input-field {
    transition: all 0.2s ease;
}

.login-wrapper {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}