/* General Styles */
html, body {
    height: 100vh;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    font-family: 'Arial', sans-serif;
}

/* Header Styles */
header {
    margin: 0;
    padding: 0;
}

.header-container {
    position: relative;
    text-align: center;
    color: white;
    height: 120px;
}

.background-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
}
.background-image-m {
    display: none;
}

.overlay {
    background: rgba(0, 0, 0, 0.5);
    height: 100%;
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-content {
    padding-top: 20px;
    padding-bottom: 20px;
    max-width: 800px;
    margin: 0 auto;
}

h1 {
    font-size: 2.5em;
    margin: 0;
    padding: 10px 0;
}

/* Login Styles */
.login-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 20px;
    background-color: rgba(233, 216, 190, 0.9);
    box-sizing: border-box;
    flex: 1;
    margin: 0;
}

.login-box {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px; /* Espacio superior */
    margin-bottom: auto; /* Ajuste automático del espacio inferior */
}

.logo-container {
    margin-bottom: 20px;
    text-align: center;
}

.logo {
    max-width: 150px;
    height: auto;
}

.form-group {
    margin-bottom: 15px;
    width: 100%; /* Asegura que los inputs ocupen todo el ancho de la caja */
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

input[type="text"], input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
    box-sizing: border-box;
}

.btn-submit {
    background-color: #a6864b;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    font-weight: bold;
    font-size: 1em;
    margin-top: 10px;
}

.btn-submit:hover {
    background-color: #8e5d29;
}

.back-link {
    display: block;
    text-align: center;
    margin-top: 10px;
    color: #312816;
    text-decoration: none;
    font-size: 1em;
}

.back-link:hover {
    text-decoration: underline;
}

/* Error Message */
.error-message {
    color: red;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
    width: 100%;
}

/* Password Toggle */
.password-group {
    position: relative;
    width: 100%;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 33px;
    background: none;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.toggle-password:focus {
    outline: none;
}



/* Responsive Adjustments */
@media (max-width: 768px) {
    h1 {
        font-size: 2em;
    }

    .login-box {
        width: 90%;
        max-width: 300px;
    }

    .btn-submit {
        font-size: 0.9em;
        padding: 8px 16px;
    }

    input[type="text"], input[type="password"] {
        font-size: 0.9em;
        padding: 8px;
    }

    .logo {
        max-width: 120px; /* Reduce el tamaño del logo en pantallas más pequeñas */
    }


}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5em;
    }

    .login-box {
        width: 100%;
        max-width: 280px;
    }

    .btn-submit {
        font-size: 0.8em;
        padding: 8px 12px;
    }

    input[type="text"], input[type="password"] {
        font-size: 0.8em;
        padding: 8px;
    }

    .back-link {
        font-size: 0.9em;
    }

    .logo {
        max-width: 100px; /* Ajuste adicional para pantallas más pequeñas */
    }
}

@media (max-width: 360px) {
    .login-box {
        padding: 15px;
    }

    h1 {
        font-size: 1.3em;
    }

    .btn-submit {
        font-size: 0.7em;
        padding: 6px 10px;
    }

    input[type="text"], input[type="password"] {
        font-size: 0.7em;
        padding: 6px;
    }

    .back-link {
        font-size: 0.8em;
    }

    .logo {
        max-width: 80px; /* Para dispositivos muy pequeños */
    }
}


/* OVERLAY */
/* Ocultar overlay por defecto */
#loading-overlay {
    display: none; /* se muestra con JS */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;


}

/* Spinner animado */
.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #ccc;
    border-top: 6px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* OVERLAY */

