/* assets/css/style.css */
/* --- REDISEÑO INSTITUCIONAL CON ADAPTABILIDAD MÓVIL --- */

:root {
    --color-guinda: #9F2241;
    --color-dorado: #BC955C;
    --color-gris-oscuro: #6F7271;
    --color-gris-claro: #98989A;
    --color-blanco: #FFFFFF;
    --color-negro: #333333;
    --color-error: #D32F2F;
    --color-success: #2E7D32; /* Añadido para consistencia con dashboard */
    --font-family-principal: 'Roboto', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family-principal);
    background-color: var(--color-blanco);
    color: var(--color-negro);
    line-height: 1.6;
    height: 100vh;
    overflow: hidden; /* Evita el scroll en vista de escritorio */
}

.login-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
}

.login-visual-panel {
    width: 50%;
    background-image: linear-gradient(rgba(159, 34, 65, 0.85), rgba(159, 34, 65, 0.85)), url('https://images.unsplash.com/photo-1541888946425-d81bb19240f5?q=80&w=2070');
    background-size: cover;
    background-position: center;
    color: var(--color-blanco);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    text-align: center;
}

.visual-content {
    max-width: 450px;
}

.visual-content .main-logo {
    width: 100%;
    max-width: 250px;
    height: auto;
    margin-bottom: 25px;
}

.visual-content h2 {
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 1px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.visual-content p {
    font-size: 1.1em;
    font-weight: 300;
    opacity: 0.9;
}

.login-form-panel {
    width: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    background-color: #f7f8fc;
    overflow-y: auto;
}

.form-container {
    width: 100%;
    max-width: 400px;
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.form-header h1 {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--color-negro);
}

.form-header p {
    font-size: 1.1em;
    color: var(--color-gris-oscuro);
}

.form-main {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group label {
    display: block;
    font-size: 0.9em;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--color-gris-oscuro);
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-gris-claro);
    width: 20px;
    height: 20px;
}

.form-group input {
    font-family: var(--font-family-principal);
    width: 100%;
    padding: 15px 15px 15px 50px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    background-color: var(--color-blanco);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-dorado);
    box-shadow: 0 0 0 4px rgba(188, 149, 92, 0.1);
}

.btn-submit {
    width: 100%;
    background: var(--color-guinda);
    color: var(--color-blanco);
    border: none;
    padding: 18px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 15px rgba(159, 34, 65, 0.2);
    margin-top: 10px;
}

.btn-submit:hover {
    background-color: #811b35;
    transform: translateY(-2px);
}

.btn-submit:disabled {
    background-color: #c7a1ab;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.form-footer {
    text-align: center;
    margin-top: 40px;
    font-size: 0.9em;
    color: var(--color-gris-claro);
}

#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: calc(100% - 40px);
    max-width: 350px;
}

.toast {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-radius: 5px;
    color: var(--color-blanco);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-icon {
    margin-right: 15px;
}

.toast.success { background-color: var(--color-success); }
.toast.error { background-color: var(--color-error); }


/* --- ESTILOS REFINADOS PARA ADAPTABILIDAD MÓVIL --- */
@media (max-width: 900px) {
    body {
        height: auto; /* Permite que el contenido determine la altura */
        overflow: auto; /* Permitir scroll en móvil */
    }

    .login-wrapper {
        flex-direction: column; /* Apilar los paneles verticalmente */
        height: auto;
    }

    .login-visual-panel,
    .login-form-panel {
        width: 100%;
    }

    .login-visual-panel {
        min-height: 250px; /* Altura mínima para el banner superior */
        height: auto;
        padding: 30px 20px;
    }

    .visual-content .main-logo {
        max-width: 180px; /* Logo más pequeño en móvil */
    }

    .visual-content h2 { font-size: 1.5em; }
    .visual-content p { font-size: 1em; }

    .login-form-panel {
        padding: 40px 20px; /* Más padding vertical en móvil */
    }

    .form-header h1 { font-size: 2em; }
    .form-header p { font-size: 1em; }
}