@font-face {
    font-family: 'Liber Grotesque';
    src: local('Liber Grotesque'), local('Liber-Grotesque'), sans-serif;
}

@font-face {
    font-family: 'EB Corp';
    src: local('EB Corp'), local('EB-Corp'), sans-serif;
}

:root {
    --colorprincipal: #e31937;
    --coloroscuro: #060913;
    --colorclarito: #f8fafc;
    --colorborde: #e2e8f0;
    --colorplaceholder: #94a3b8;
    --colorlabel: #64748b;
    --colorinput-bg: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'EB Corp', 'Montserrat', 'Segoe UI', sans-serif;
}

body.principal-login {
    background-color: var(--colorclarito);
    overflow: hidden;
    height: 100vh;
}

.contenedor-form {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* --- PANEL IZQUIERDO (DISEÑO CORPORATIVO OSCURO) --- */
.left-panel-container {
    position: relative;
    width: 50% !important;
    height: 100vh;
    background-color: var(--coloroscuro);
    /* Patrón de puntos sutil en CSS */
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1.2px, transparent 1.2px);
    background-size: 20px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 60px 80px;
    overflow: hidden;
    color: #ffffff;
    z-index: 1;
}

/* Logo arriba a la izquierda */
.brand-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.brand-name {
    font-family: 'Liber Grotesque', sans-serif !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    color: #ffffff !important;
    margin-bottom: 6px !important;
}

.brand-line {
    width: 35px !important;
    height: 2px !important;
    background-color: var(--colorprincipal) !important;
}

/* Contenido del centro del panel izquierdo */
.left-center-content {
    max-width: 520px !important;
    margin-top: auto !important;
    margin-bottom: auto !important;
}

.left-title {
    font-family: 'Liber Grotesque', 'Calibri', sans-serif !important;
    font-size: 40px !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    color: #ffffff !important;
    margin-bottom: 24px !important;
    letter-spacing: -0.5px !important;
}

.left-description {
    font-family: 'EB Corp', 'Calibri', sans-serif !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    line-height: 1.65 !important;
    color: #94a3b8 !important; /* Slate-400 */
}

/* Aliados estratégicos abajo en panel izquierdo */
.allies-footer {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
}

.allies-title {
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 2px !important;
    color: #64748b !important; /* Slate-500 */
    text-transform: uppercase !important;
}

.allies-list {
    display: flex !important;
    align-items: center !important;
    gap: 30px !important;
    margin-top: 4px !important;
}

.ally-item {
    display: flex !important;
    align-items: center !important;
    color: #ffffff !important;
    opacity: 0.8 !important;
    transition: opacity 0.2s ease !important;
    cursor: pointer !important;
}

.ally-item:hover {
    opacity: 1 !important;
}

.ally-icon {
    width: 16px !important;
    height: 16px !important;
    margin-right: 8px !important;
    color: #ffffff !important;
    flex-shrink: 0 !important;
}

.ally-name {
    font-family: 'Liber Grotesque', 'Calibri', sans-serif !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    color: #ffffff !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
}

/* --- PANEL DERECHO (FORMULARIO LIMPIO Y CLARO) --- */
.formulario {
    width: 50% !important;
    height: 100vh;
    background-color: var(--colorclarito) !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 60px 40px;
    overflow-y: auto;
}

.formulario--form {
    width: 100%;
    max-width: 400px;
    margin-top: auto;
    margin-bottom: auto;
    display: flex;
    flex-direction: column;
}

.form-header {
    margin-bottom: 32px;
}

.form-title {
    font-size: 32px;
    font-weight: 700;
    color: #0f172a; /* Slate-900 */
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.form-subtitle {
    font-size: 15px;
    color: #475569; /* Slate-600 */
}

/* Inputs y contenedores de formularios */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-left {
    position: absolute;
    left: 16px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    pointer-events: none;
}

.input-icon-right-btn {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    width: 20px;
    height: 20px;
}

.input-icon-right-btn:hover {
    color: #475569;
}

.mb-3 {
    margin-bottom: 20px !important;
}

.form-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.cabecera-input {
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin: 0;
}

.forgot-password-link {
    font-size: 12px;
    font-weight: 500;
    color: var(--colorprincipal);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.forgot-password-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.form-control-custom {
    width: 100%;
    height: 48px;
    background-color: var(--colorinput-bg);
    border: 1px solid var(--colorborde);
    border-radius: 6px !important;
    padding: 10px 16px 10px 48px; /* Ajuste para el icono de la izquierda */
    font-size: 15px;
    color: #0f172a;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.form-control-custom-pass {
    padding-right: 48px; /* Ajuste para el icono del ojo de la derecha */
}

.form-control-custom::placeholder {
    color: var(--colorplaceholder);
    opacity: 1;
}

.form-control-custom:focus {
    border-color: #0f172a;
    box-shadow: 0 0 0 1px #0f172a;
}

/* Checkbox personalizado */
.checkbox-container {
    display: flex;
    align-items: center;
    margin-top: 16px;
    margin-bottom: 24px;
    cursor: pointer;
    font-size: 14px;
    color: #475569;
    user-select: none;
}

.checkbox-container input {
    margin-right: 10px;
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: #0f172a;
}

/* Botón de envío */
.btn-black {
    background-color: #000000;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    height: 48px;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    width: 100%;
    margin-top: 16px;
}

.btn-black:hover {
    background-color: #1e293b;
}

.btn-black svg {
    transition: transform 0.2s ease;
}

.btn-black:hover svg {
    transform: translateX(4px);
}

/* Pie de página derecho */
.footer-right {
    width: 100%;
    max-width: 400px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #94a3b8;
    margin-top: auto;
}

.footer-links {
    display: flex;
    gap: 16px;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #475569;
}

/* --- RESPONSIVIDAD (MÓVIL) --- */
@media only screen and (max-width: 992px) {
    .left-panel-container {
        display: none !important;
    }

    .formulario {
        width: 100% !important;
        padding: 40px 24px;
    }

    .formulario--form {
        margin-top: auto;
        margin-bottom: auto;
    }
}

/* --- ALERTAS DE ERROR PERSONALIZADAS --- */
.alert-error-custom {
    background-color: #fef2f2;
    border: 1px solid #fee2e2;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
}

.alert-icon-error {
    color: #ef4444;
    flex-shrink: 0;
}