*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --AzulMarino: #54626B;
    --Cian: #54626B;
    --CianSuave: #54626B;
    --Blanco: #ffffff;
    --Texto: #133269;
    --TextoApagado: #6b7fa3;
    --Borde: #1333695e;
    --Radio: 0.375rem;
}

html, body {
    min-height: 100%;
    font-family: 'Open Sans', 'Segoe UI', system-ui, sans-serif;
    color: var(--Texto);
}

/* ── Layout dividido ── */
.PartLogin {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    min-height: 100vh;
}

/* ── Lado izquierdo: imagen + logo de la página ── */
.LadoImagen {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem 3rem;
    background: url('../Imagenes/Back.png') center/cover no-repeat;
    color: var(--Blanco);
    overflow: hidden;
}

.LadoImagen::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
}

.LadoImagen > * {
    position: relative;
    z-index: 1;
}

.LogoPagina img {
    height: 6rem;
    width: auto;
    object-fit: contain;
}

.TextoImagen h2 {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.15;
    text-shadow: 0 0.125rem 0.625rem rgba(0, 0, 0, .35);
}

.TextoImagen p {
    margin-top: 0.5rem;
    font-size: 1rem;
    opacity: .9;
}

/* ── Lado derecho: formulario ── */
.LadoFormulario {
    display: flex;
    align-items: center;
    justify-content: center;
padding: 2rem 2.5rem 3rem 2.5rem;
    background: var(--Blanco);
}

.TarjetaLogin {
    width: 100%;
    max-width: 26rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.LogoEmpresa {
    display: flex;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.LogoEmpresa img {
    height: 7rem;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.TituloLogin {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--AzulMarino);
    text-align: center;
}

.SubtituloLogin {
    text-align: center;
    font-size: .9rem;
    color: var(--TextoApagado);
    margin-top: -0.75rem;
}

.GrupoCampo {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.GrupoCampo label {
    font-size: .95rem;
    font-weight: 600;
    color: var(--AzulMarino);
}

.EntradaCampo {
    position: relative;
}

.EntradaCampo > i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--TextoApagado);
    font-size: .85rem;
}

.EntradaCampo input {
    width: 100%;
    height: 2.75rem;
    padding: 0 2.5rem 0 2.25rem;
    border: 0.0625rem solid var(--Borde);
    border-left: 3px solid var(--Cian);
    border-radius: var(--Radio);
    font-size: 1rem;
    color: #252525;
    font-family: inherit;
    background: #fff;
    outline: none;
    transition: border .15s, box-shadow .15s;
}

.EntradaCampo input:hover,
.EntradaCampo input:focus {
    border-color: var(--Cian);
    box-shadow: 0 0 0 0.1rem rgba(84, 98, 107, .25);
}

.EntradaCampo .BotonMostrarPsw {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--TextoApagado);
    font-size: .95rem;
    padding: 0.25rem 0.5rem;
}

.EntradaCampo .BotonMostrarPsw:hover {
    color: var(--AzulMarino);
}

.BotonIngresar {
    height: 2.875rem;
    border: none;
    border-radius: var(--Radio);
    background: var(--AzulMarino);
    color: var(--Blanco);
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: .02em;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: filter .15s, transform .1s;
    margin-top: 0.375rem;
}

.BotonIngresar:hover  { filter: brightness(1.12); }
.BotonIngresar:active { transform: scale(.98); }

.EnlaceOlvide {
    text-align: center;
    font-size: .95rem;
    color: var(--Cian);
    text-decoration: none;
}

.EnlaceOlvide:hover {
    text-decoration: underline;
}

.MensajeError {
    display: none;
    background: rgba(200, 40, 40, .08);
    border: 0.0625rem solid rgba(200, 40, 40, .25);
    color: #a02020;
    font-size: .85rem;
    padding: 0.5625rem 0.75rem;
    border-radius: var(--Radio);
}

.MensajeError.MostrarMensaje {
    display: block;
}

/* ── Responsivo ── */
@media (max-width: 56rem) {
    .PartLogin {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .LadoImagen {
        min-height: 12rem;
        padding: 1.25rem 1.5rem;
    }

    .LogoPagina img {
        height: 3.5rem;
    }

    .TextoImagen h2 {
        font-size: 1.3rem;
    }

    .TextoImagen p {
        display: none;
    }

    .LadoFormulario {
        align-items: flex-start;
        padding: 2rem 1.5rem;
    }
}