/* Inicio de sesión de la app de colaboradores (index.php). Página independiente, prefijo lg-. */

:root {
    --lg-primary: #0070c0;
    --lg-primary-hover: #004080;
    --lg-primary-soft: #eaf7fd;
    --lg-ring: rgba(0, 112, 192, 0.22);
    --lg-bg: #f3f8fc;
    --lg-surface: #ffffff;
    --lg-border: #d7eaf3;
    --lg-text: #263445;
    --lg-muted: #6b7785;
    --lg-danger: #c62f3e;
    --lg-danger-soft: #fdecee;
    --lg-amber: #9a6512;
    --lg-hero: linear-gradient(140deg, #00254d 0%, #0070c0 65%, #2fa6de 100%);
}

html.lg-dark {
    --lg-primary: #75cdf2;
    --lg-primary-hover: #a3def7;
    --lg-primary-soft: #15384a;
    --lg-ring: rgba(117, 205, 242, 0.3);
    --lg-bg: #101820;
    --lg-surface: #17212b;
    --lg-border: #2b3d4b;
    --lg-text: #edf6fa;
    --lg-muted: #91a6b2;
    --lg-danger: #ff8a95;
    --lg-danger-soft: #45202a;
    --lg-amber: #f4c06a;
}

* {
    box-sizing: border-box;
}

body.lg-page {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: var(--lg-text);
    background: var(--lg-bg);
}

.lg-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Parte azul con el logo */
.lg-hero {
    padding: calc(2.5rem + env(safe-area-inset-top, 0)) 1.5rem 4.5rem;
    color: #ffffff;
    text-align: center;
    background: var(--lg-hero);
}

.lg-logo {
    width: 96px;
    height: 96px;
    object-fit: contain;
    padding: 0.6rem;
    background: #ffffff;
    border-radius: 28px;
    box-shadow: 0 10px 28px rgba(0, 20, 50, 0.35);
}

.lg-hello {
    margin: 1rem 0 0.25rem;
    font-size: 1.6rem;
    font-weight: 700;
}

.lg-tagline {
    max-width: 320px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Tarjeta del formulario */
.lg-card {
    width: min(100% - 2rem, 420px);
    margin: -3rem auto 2rem;
    padding: 1.75rem 1.5rem 1.25rem;
    background: var(--lg-surface);
    border: 1px solid var(--lg-border);
    border-radius: 24px;
    box-shadow: 0 14px 40px rgba(17, 40, 60, 0.12);
}

.lg-card h1 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
}

.lg-sub {
    margin: 0.25rem 0 1.25rem;
    color: var(--lg-muted);
}

.lg-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.75rem 0.9rem;
    font-size: 0.92rem;
    color: var(--lg-danger);
    background: var(--lg-danger-soft);
    border-radius: 12px;
}

.lg-label {
    display: block;
    margin: 0.9rem 0 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.lg-field {
    position: relative;
    display: flex;
    align-items: center;
}

.lg-field > i {
    position: absolute;
    left: 0.95rem;
    font-size: 1.1rem;
    color: var(--lg-primary);
    pointer-events: none;
}

.lg-field input {
    width: 100%;
    height: 52px;
    padding: 0 3rem 0 2.75rem;
    font: inherit;
    font-size: 1.05rem;
    color: var(--lg-text);
    background: var(--lg-bg);
    border: 1px solid var(--lg-border);
    border-radius: 14px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.lg-field input:focus {
    border-color: var(--lg-primary);
    box-shadow: 0 0 0 4px var(--lg-ring);
}

.lg-field input.is-invalid {
    border-color: var(--lg-danger);
}

.lg-eye {
    position: absolute;
    right: 0.4rem;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    font-size: 1.15rem;
    color: var(--lg-muted);
    background: none;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
}

.lg-eye:hover,
.lg-eye[aria-pressed="true"] {
    color: var(--lg-primary);
}

.lg-hint {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.78rem;
    color: var(--lg-muted);
}

.lg-caps {
    color: var(--lg-amber);
    font-weight: 600;
}

.lg-hint[hidden] {
    display: none;
}

.lg-submit {
    width: 100%;
    height: 52px;
    margin-top: 1.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    background: var(--lg-primary);
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.1s ease;
}

html.lg-dark .lg-submit {
    color: #00254d;
}

.lg-submit:hover {
    background: var(--lg-primary-hover);
}

.lg-submit:active {
    transform: scale(0.98);
}

.lg-submit:disabled {
    opacity: 0.75;
    cursor: progress;
}

.lg-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: lg-giro 0.7s linear infinite;
}

@keyframes lg-giro {
    to { transform: rotate(360deg); }
}

.lg-help {
    display: flex;
    gap: 0.45rem;
    margin: 1.25rem 0 0;
    padding: 0.75rem 0.9rem;
    font-size: 0.85rem;
    color: var(--lg-muted);
    background: var(--lg-bg);
    border-radius: 12px;
}

.lg-help i {
    color: var(--lg-primary);
}

.lg-foot {
    margin: 1rem 0 0;
    font-size: 0.75rem;
    text-align: center;
    color: var(--lg-muted);
}

/* Computadora: marca a la izquierda, formulario a la derecha */
@media (min-width: 900px) {
    .lg-shell {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .lg-hero {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 3rem;
    }

    .lg-logo {
        width: 128px;
        height: 128px;
    }

    .lg-hello {
        font-size: 2.2rem;
    }

    .lg-tagline {
        max-width: 380px;
        font-size: 1.1rem;
    }

    .lg-card {
        align-self: center;
        margin: 2rem auto;
    }
}
