:root {
    --ledger: #0D3577;
    --ledger-deep: #0A2A5E;
    --naranja: #1F5EFF;
    --naranja-oscuro: #1A4FDB;
    --crema: #EAF2FF;
    --texto: #0A2A5E;
    --texto-suave: #5B6B8C;
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: 'Montserrat', system-ui, sans-serif;
    background-color: #ffffff;
}

/* Contenedor general: dos paneles lado a lado en desktop */
#login-screen {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ---------- Panel izquierdo (marca) ---------- */
#login-brand-panel {
    position: relative;
    flex: 1;
    background: linear-gradient(165deg, var(--ledger) 0%, var(--ledger-deep) 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    box-sizing: border-box;
    min-height: 100vh;
}

/* Círculos decorativos */
.login-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.login-circle-1 {
    width: 320px;
    height: 320px;
    top: -120px;
    left: -120px;
}

.login-circle-2 {
    width: 260px;
    height: 260px;
    bottom: -100px;
    right: -80px;
}

.login-circle-3 {
    width: 140px;
    height: 140px;
    bottom: 60px;
    left: 40px;
    background: rgba(255, 255, 255, 0.06);
}

#login-brand-card {
    position: relative;
    z-index: 2;
    text-align: center;
    text-decoration: none;
    display: block;
}

#login-volver {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--texto-suave);
    text-decoration: none;
    margin-bottom: 26px;
    padding: 7px 14px 7px 12px;
    border: 1.5px solid #DCE5F5;
    border-radius: 999px;
    background: #F5F8FF;
    transition: border-color 0.15s, color 0.15s, transform 0.1s;
}

#login-volver:before {
    content: "\2190";
    font-size: 13px;
    transition: transform 0.15s;
}

#login-volver:hover {
    color: var(--naranja-oscuro);
    border-color: var(--naranja);
}

#login-volver:hover:before {
    transform: translateX(-2px);
}

.brand-logo-mark {
    width: 170px;
    height: auto;
    margin: 0 auto;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.18));
}

#login-brand-subtitle {
    font-family: 'Montserrat', sans-serif;
    color: #C9D6F0;
    font-size: 13px;
    font-weight: 600;
    margin-top: 10px;
    letter-spacing: 1.5px;
    opacity: 0.85;
}

/* ---------- Panel derecho (formulario) ---------- */
#login-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    box-sizing: border-box;
}

#login-box {
    width: 100%;
    max-width: 340px;
    text-align: left;
}

#login-box-logo {
    display: flex;
    justify-content: center;
    margin: 0 auto 20px;
}

#login-box-logo img {
    width: 150px;
    height: 150px;
    display: block;
}

#login-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--texto);
    text-align: center;
    margin: 0 0 6px;
}

#login-subtitle {
    text-align: center;
    color: var(--texto-suave);
    font-size: 14px;
    margin: 0 0 32px;
}

/* Franja de error (arriba del formulario) */
.login-error {
    background-color: #FDE8E8;
    color: #B42318;
    border: 1px solid #F3B4B0;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    margin-bottom: 18px;
    text-align: center;
}

.login-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--texto);
    margin-bottom: 6px;
    margin-top: 18px;
}

#login-box input.form-control {
    display: block;
    width: 100%;
    height: 46px;
    border: 1.5px solid #DCE5F5;
    border-radius: 10px;
    padding: 0 14px;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    outline: none;
    transition: border-color 0.15s;
    background: #F5F8FF;
    box-sizing: border-box;
}

#login-box input.form-control:focus {
    border-color: var(--naranja);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(31,94,255,.15);
}

#login-box input::placeholder {
    color: #9AA8C4;
}

/* Fix del autofill amarillo del navegador */
#login-box input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0px 1000px #F5F8FF inset !important;
    -webkit-text-fill-color: var(--texto) !important;
}

#login-forgot-wrap {
    text-align: right;
    margin-top: 10px;
}

#login-forgot {
    font-size: 13px;
    color: var(--naranja-oscuro);
    text-decoration: none;
    font-weight: 500;
}

#login-forgot:hover {
    text-decoration: underline;
}

#login-box .btn-lg {
    width: 100%;
    height: 48px;
    margin-top: 26px;
    background: var(--naranja);
    border-color: var(--naranja);
    color: #fff;
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 700;
    text-transform: none;
    transition: background 0.15s, transform 0.1s;
}

#login-box .btn-lg:hover,
#login-box .btn-lg:focus {
    background: var(--naranja-oscuro);
    border-color: var(--naranja-oscuro);
    color: #fff;
}

#login-box .btn-lg:active {
    transform: scale(0.98);
}

/* Clase de error solo para el borde (validación de campos) */
.input-error {
    border: 2px solid red !important;
    box-shadow: none;
}

/* ---------- Mobile: el panel de marca se oculta por completo ---------- */
@media (max-width: 760px) {
    #login-brand-panel {
        display: none;
    }

    #login-form-panel {
        flex: 1 1 100%;
    }
}
