/* =========================================================================
   LOGIN MODERN - layout split (logo izquierda, form derecha)
   Color primario: rgb(32, 31, 73) (azul indigo Creditia).
   Aislado del resto: si querés volver al login viejo, basta con quitar
   este archivo del JSP y restaurar la clase body.bg-login.
   ========================================================================= */

:root {
    --color-primary: rgb(32, 31, 73);
    --color-primary-hover: rgb(48, 47, 100);
    --color-primary-dark: rgb(20, 19, 50);
    --color-accent: rgb(255, 130, 60);   /* naranja del logo como acento */
    --color-bg-light: #f8f9fa;
    --color-text-muted: #6c757d;
    --color-input-border: #e0e0e8;
    --color-input-focus: rgb(32, 31, 73);
    --radius-lg: 14px;
    --radius-md: 8px;
    --shadow-card: 0 12px 40px rgba(20, 19, 50, 0.18);
}

/* Reset solo de body para esta pantalla */
body.login-modern {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    background: var(--color-bg-light);
    color: #222;
    overflow-x: hidden;
}

/* Contenedor split */
.login-split {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
    width: 100%;
}

/* --- Panel izquierdo: logo --- */
.login-brand {
    flex: 1 1 55%;
    /* Fondo claro con un degradado sutil. El logo a color contrasta bien
       sobre este tono sin necesidad de tarjeta. */
    background: linear-gradient(135deg, #f4f6fb 0%, #e6eaf3 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

/* Detalle decorativo: circulos suaves del azul de marca */
.login-brand::before,
.login-brand::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.login-brand::before {
    width: 480px;
    height: 480px;
    top: -200px;
    left: -200px;
    background: rgba(32, 31, 73, 0.05);
}
.login-brand::after {
    width: 320px;
    height: 320px;
    bottom: -120px;
    right: -120px;
    background: rgba(255, 130, 60, 0.07);
}

.login-brand__logo {
    max-width: 380px;
    width: 80%;
    height: auto;
    z-index: 1;
    /* Logo a color, sin filtros ni fondo extra. Se ve nitido sobre el
       fondo claro del panel. */
    filter: drop-shadow(0 4px 12px rgba(32, 31, 73, 0.12));
}

.login-brand__tagline {
    color: var(--color-primary);
    font-size: 0.95rem;
    margin-top: 1.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    z-index: 1;
    text-align: center;
    font-weight: 600;
    opacity: 0.75;
}

/* --- Panel derecho: formulario --- */
.login-form-wrap {
    flex: 1 1 45%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    /* Patron de fibra de carbono CLARITO. Construido con 4 gradientes
       lineales cruzados sobre fondo blanco, todo en CSS puro (sin imagenes).
       Los gradientes simulan el tejido entrecruzado a 45deg/-45deg. */
    background-color: #ffffff;
    background-image:
        linear-gradient(135deg, rgba(32, 31, 73, 0.05) 25%, transparent 25%),
        linear-gradient(225deg, rgba(32, 31, 73, 0.05) 25%, transparent 25%),
        linear-gradient(45deg,  rgba(32, 31, 73, 0.05) 25%, transparent 25%),
        linear-gradient(315deg, rgba(32, 31, 73, 0.05) 25%, transparent 25%);
    background-position:  6px 0, 6px 0, 0 0, 0 0;
    background-size: 12px 12px;
    background-repeat: repeat;
}

.login-form {
    width: 100%;
    max-width: 380px;
}

/* Logo sobre el form */
.login-form__logo {
    display: block !important;
    /* width: 160px !important; */
    max-width: 93% !important;
    height: auto !important;
    margin: 0 auto -2.75rem !important;
    object-fit: contain;
}

.login-form__title {
    color: var(--color-primary);
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.login-form__subtitle {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin: 0 0 2rem;
}

.login-form__group {
    margin-bottom: 1.25rem;
}

.login-form__label {
    display: block;
    font-size: 0.85rem;
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 0.4rem;
    letter-spacing: 0.02em;
}

.login-form__input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    font-size: 1rem;
    border: 1.5px solid var(--color-input-border);
    border-radius: var(--radius-md);
    background: #fafbfd;
    color: #222;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}

.login-form__input:focus {
    outline: none;
    border-color: var(--color-input-focus);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(32, 31, 73, 0.12);
}

.login-form__input::placeholder {
    color: #b0b0bd;
}

/* Input password con icono de ojo */
.login-form__password {
    position: relative;
}
.login-form__password .login-form__input {
    padding-right: 44px;
}
.login-form__toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: 0;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 4px 8px;
    font-size: 1rem;
}
.login-form__toggle:hover { color: var(--color-primary); }

/* Checkbox de recordar */
.login-form__check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin: 0 0 1.5rem;
    cursor: pointer;
    user-select: none;
}
.login-form__check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--color-primary);
    cursor: pointer;
    margin: 0;
}

/* Botón submit */
.login-form__submit {
    display: block;
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: var(--radius-md);
    background: var(--color-primary);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
    box-shadow: 0 4px 12px rgba(32, 31, 73, 0.25);
}
.login-form__submit:hover {
    background: var(--color-primary-hover);
    box-shadow: 0 6px 18px rgba(32, 31, 73, 0.35);
}
.login-form__submit:active {
    transform: translateY(1px);
}

/* Mensaje de error */
.login-form__error {
    background: #fff0f0;
    border: 1px solid #ffc7c7;
    color: #c62828;
    padding: 0.7rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

/* Marca pequeña en footer del form */
.login-footer-mark {
    position: fixed;
    right: 18px;
    bottom: 14px;
    opacity: 0.6;
    z-index: 2;
}

/* --- Responsive: en pantallas chicas apilamos vertical --- */
@media (max-width: 900px) {
    .login-split { flex-direction: column; }
    .login-brand {
        flex: 0 0 auto;
        min-height: 240px;
        padding: 2rem 1rem;
    }
    .login-brand__logo { max-width: 260px; }
    .login-form-wrap {
        flex: 1 1 auto;
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .login-brand { min-height: 180px; }
    .login-brand__logo { max-width: 200px; }
    .login-form__title { font-size: 1.4rem; }
}
