/* Acceso al sistema — Conteo Rápido APP Loreto */

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

.lg {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: #1d2733;
    background: #fff;
    min-height: 100vh;
}

.lg-wrap {
    display: flex;
    min-height: 100vh;
}

/* ── Marca ─────────────────────────────────────────────── */
.lg-marca {
    flex: 0 0 48%;
    background: #1c4f9c;
    color: #fff;
    padding: 3rem 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    border-right: 6px solid #c62828;
    position: relative;
    overflow: hidden;
}

.lg-logo {
    width: 84px;
    height: 84px;
    margin-bottom: 2rem;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* logo2.png trae mucho margen alrededor del simbolo: se amplia para
   que el circulo ocupe la caja en vez de verse como un punto */
.lg-logo img { width: 150%; height: auto; }

.lg-partido {
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: #c9d8ef;
    margin-bottom: .6rem;
}

.lg-marca-txt, .lg-logo { position: relative; z-index: 2; }
.lg-marca-txt { max-width: 290px; }

.lg-sistema {
    font-size: 2.6rem;
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -.5px;
    margin-bottom: 1.5rem;
}

.lg-eleccion {
    font-size: .9rem;
    line-height: 1.6;
    color: #c9d8ef;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, .25);
    max-width: 300px;
}
.lg-eleccion strong { color: #fff; font-weight: 600; }

.lg-datos {
    display: flex;
    margin-top: 2.25rem;
    max-width: 360px;
}
.lg-datos div { flex: 1; }
.lg-datos div + div { border-left: 1px solid rgba(255,255,255,.2); padding-left: 1rem; }
.lg-datos strong { display: block; font-size: 1.35rem; font-weight: 700; }
.lg-datos span { font-size: .75rem; color: #c9d8ef; }

/* ── Formulario ────────────────────────────────────────── */
.lg-panel {
    flex: 1;
    background: #f4f6f9;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem 2rem 1.5rem;
}

.lg-form {
    width: 100%;
    max-width: 380px;
    background: #fff;
    border: 1px solid #e1e6ed;
    border-radius: 10px;
    padding: 2.25rem 2rem 1.75rem;
}

.lg-titulo {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: .3rem;
}
.lg-sub {
    font-size: .88rem;
    color: #6b7684;
    margin-bottom: 1.6rem;
}

.lg-error {
    background: #fdecec;
    color: #a61d1d;
    border-left: 3px solid #c62828;
    padding: .75rem 1rem;
    font-size: .9rem;
    margin-bottom: 1.25rem;
}

.lg-campo {
    display: block;
    margin-bottom: 1.1rem;
}
.lg-campo > span {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    margin-bottom: .4rem;
    color: #3b4756;
}
.lg-campo input {
    width: 100%;
    font: inherit;
    font-size: 1.05rem;
    padding: .8rem .9rem;
    border: 1px solid #c3ccd7;
    border-radius: 6px;
    background: #fff;
    color: #1d2733;
}
.lg-campo input:focus {
    outline: none;
    border-color: #1c4f9c;
    box-shadow: 0 0 0 3px rgba(28, 79, 156, .15);
}
.lg-campo input[name="dni"] { letter-spacing: 2px; }

.lg-clave { position: relative; }
.lg-clave input { padding-right: 3rem; }
.lg-clave button {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: 0;
    padding: .5rem .7rem;
    color: #7a8696;
    font-size: 1.1rem;
    cursor: pointer;
}
.lg-clave button:hover { color: #1c4f9c; }

.lg-boton {
    width: 100%;
    margin-top: .6rem;
    padding: .9rem;
    font: inherit;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background: #1c4f9c;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
}
.lg-boton:hover { background: #163f7d; }
.lg-boton:focus-visible { outline: 3px solid rgba(28, 79, 156, .35); outline-offset: 2px; }

.lg-ayuda {
    margin-top: 1.1rem;
    padding-top: 1rem;
    border-top: 1px solid #edf0f4;
    font-size: .85rem;
    color: #6b7684;
    line-height: 1.5;
}

.lg-pie {
    margin-top: 1.25rem;
    font-size: .78rem;
    color: #98a2af;
}

/* ── Pantallas chicas ──────────────────────────────────── */
@media (max-width: 900px) {
    .lg-wrap { flex-direction: column; }
    .lg-marca {
        flex: none;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: 1.1rem;
        padding: 1.4rem 1.5rem;
        border-right: 0;
        border-bottom: 6px solid #c62828;
    }
    .lg-logo { width: 64px; height: 64px; border-radius: 12px; flex-shrink: 0; }
    /* margen explicito: 'gap' en flexbox no existe en navegadores
       Android antiguos, que son comunes entre los personeros */
    .lg-marca-txt { margin-left: 1rem; }
    .lg-partido { font-size: .8rem; margin-bottom: .2rem; }
    .lg-sistema { font-size: 1.9rem; letter-spacing: -.5px; margin-bottom: 0; }
    .lg-sistema br { display: none; }
    .lg-eleccion { display: none; }
    .lg-logo { margin-bottom: 0; }
    .lg-datos { display: none; }
    .lg-panel { padding: 1.5rem 1rem 1.25rem; justify-content: flex-start; }
    .lg-form { padding: 1.75rem 1.25rem 1.5rem; }
}

/* ── Candidato ─────────────────────────────────────────── */
/* Recorte con fondo transparente, de pie sobre el borde inferior */
.lg-foto {
    position: absolute;
    right: -2rem;
    bottom: 0;
    height: 86%;
    width: auto;
    max-width: 58%;
    object-fit: contain;
    object-position: right bottom;
    z-index: 1;
    pointer-events: none;
}
/* Rotulo inferior: ancla la foto al borde y separa el nombre del
   cuerpo del candidato, como un rotulo de television */
.lg-candidato {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    background: #102f5e;
    border-top: 3px solid #c62828;
    padding: .9rem 3.5rem 1rem;
}
.lg-candidato strong { display: block; font-size: 1rem; font-weight: 700; }
.lg-candidato span   { font-size: .8rem; color: #c9d8ef; }

@media (max-width: 900px) {
    .lg-foto, .lg-candidato { display: none; }
    .lg-marca-txt { max-width: none; }
}
