/* Inicio de sesión (index.php): layout de dos paneles con la paleta del menú lateral y el encabezado (degradado #0f59cb → #001f86, acento #ffc900). */
:root {
    --lg-azul: #0f59cb;
    --lg-azul-oscuro: #001f86;
    --lg-azul-marca: #005594;
    --lg-texto: #001c38;
    --lg-acento: #ffc900;
    --lg-error: #b72433;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
    font-family: var(--nh-fuente, system-ui, "Segoe UI", Arial, sans-serif);
    color: var(--lg-texto);
    background: #f4f7fb;
}
.lg {
    position: relative; display: grid; grid-template-columns: minmax(360px, 520px) minmax(0, 1fr); min-height: 100vh; color: #fff; overflow: hidden;
    background: radial-gradient(circle at 12% 0%, rgba(15, 89, 203, .55), transparent 50%), linear-gradient(120deg, #021033 0%, #04206b 55%, #0a3a9e 100%);
}
/* Fondo continuo: la foto vive detrás de los dos paneles y se desvanece hacia la izquierda, sin corte entre ellos */
.lg::before {
    content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 72%; z-index: 0; pointer-events: none;
    background: url("../1.jpg") center / cover; opacity: .38; mix-blend-mode: luminosity;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 55%); mask-image: linear-gradient(90deg, transparent 0%, #000 55%);
}
.lg::after {
    content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background: radial-gradient(circle at 80% 105%, rgba(255, 201, 0, .14), transparent 40%), linear-gradient(0deg, rgba(2, 16, 51, .55), transparent 40%);
}
.lg-form, .lg-marca { position: relative; z-index: 1; }

/* Panel del formulario */
.lg-form {
    display: flex; flex-direction: column; justify-content: center; padding: 40px clamp(20px, 4vw, 48px) 64px;
}
.lg-card {
    position: relative; padding: 40px 36px 28px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); border-radius: 16px; overflow: hidden;
    backdrop-filter: blur(6px); box-shadow: 0 16px 40px rgba(0, 0, 0, .35);
}
.lg-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: linear-gradient(90deg, var(--lg-azul), var(--lg-azul-oscuro) 70%, var(--lg-acento)); }
.lg-chip { display: inline-block; margin-bottom: 10px; padding: 4px 12px; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--lg-acento); background: rgba(255, 201, 0, .12); border: 1px solid rgba(255, 201, 0, .35); border-radius: 999px; }
.lg-input.lg-con-icono input { padding-left: 46px; }
.lg-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: rgba(255, 255, 255, .55); pointer-events: none; transition: color .15s; }
.lg-form img.lg-logo { display: block; width: 190px; max-width: 100%; margin-bottom: 24px; padding: 8px 12px; background: #fff; border-radius: 10px; }
.lg-form h1 { font-size: 1.6rem; font-weight: 700; margin: 0 0 6px; }
.lg-form p.lg-sub { margin: 0 0 28px; color: rgba(255, 255, 255, .72); font-size: .95rem; }
.lg-campo { margin-bottom: 18px; }
.lg-campo label { display: block; color: rgba(255, 255, 255, .9); font-size: .8rem; font-weight: 600; margin-bottom: 6px; }
.lg-input { position: relative; }
.lg-input input {
    width: 100%; height: 46px; padding: 0 14px; font: inherit; font-size: 1rem; color: #fff;
    border: 1px solid rgba(255, 255, 255, .22); border-radius: 10px; background: rgba(255, 255, 255, .09); transition: border-color .15s, box-shadow .15s;
}
.lg-input input::placeholder { color: rgba(255, 255, 255, .5); }
/* Al enfocar, el campo pasa a blanco con texto oscuro para escribir con buen contraste */
.lg-input input:focus { outline: none; color: #0b1b3a; background: #fff; border-color: var(--lg-acento); box-shadow: 0 0 0 3px rgba(255, 201, 0, .35); }
.lg-input:focus-within .lg-ico, .lg-input:focus-within .lg-ojo { color: var(--lg-azul-oscuro); }
.lg-input:focus-within .lg-ojo:hover { background: #eef3fb; }
.lg-input input:-webkit-autofill { -webkit-text-fill-color: #fff; box-shadow: 0 0 0 100px #0b2a78 inset; }
.lg-input input:-webkit-autofill:focus { -webkit-text-fill-color: #0b1b3a; box-shadow: 0 0 0 100px #fff inset; }
.lg-input input.is-invalid { border-color: #ff7a8a; }
.lg-input input[type="password"], .lg-input input.lg-clave { padding-right: 48px; }
.lg-ojo {
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: transparent; color: rgba(255, 255, 255, .7); cursor: pointer;
}
.lg-ojo:hover, .lg-ojo:focus-visible { color: var(--lg-acento); background: rgba(255, 255, 255, .1); outline: none; }
.lg-ojo svg { width: 20px; height: 20px; }
.lg-error {
    margin: 0 0 18px; padding: 10px 12px; font-size: .88rem; color: #ffd5da; background: rgba(183, 36, 51, .28);
    border-left: 4px solid #ff7a8a; border-radius: 6px;
}
.lg-btn {
    width: 100%; height: 48px; border: 0; border-radius: 10px; font: inherit; font-weight: 700; font-size: 1rem; color: #1a1a1a;
    background: var(--lg-acento); cursor: pointer; transition: filter .15s, transform .1s;
}
.lg-btn:hover { filter: brightness(1.1); }
.lg-btn:active { transform: translateY(1px); }
.lg-btn:focus-visible { outline: 3px solid var(--lg-acento); outline-offset: 2px; }
.lg-copy { position: absolute; left: 0; right: 0; bottom: 14px; margin: 0; padding: 0 16px; text-align: center; font-size: .75rem; color: rgba(255, 255, 255, .7); }
.lg-pie { margin-top: 28px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .15); text-align: center; font-size: .75rem; color: rgba(255, 255, 255, .55); }

/* Panel de marca: arriba la identidad, al centro el título, abajo lo que ofrece y las normas */
.lg-marca { display: flex; flex-direction: column; justify-content: space-between; padding: 48px clamp(32px, 6vw, 96px); }
.lg-marca-top { display: flex; align-items: center; gap: 12px; font-size: .85rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .8); }
.lg-marca-top::before { content: ""; width: 36px; height: 3px; border-radius: 2px; background: var(--lg-acento); }
.lg-mascota { display: block; width: auto; height: clamp(110px, 24vh, 210px); margin: 0 0 14px; filter: drop-shadow(0 12px 18px rgba(0, 10, 50, .55)); }
/* Mascota junto al título: quitar la clase lg-hero--lado en index.php para apilarla encima */
.lg-hero--lado { display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); margin-bottom: 16px; }
.lg-hero--lado .lg-mascota { margin: 0; height: clamp(120px, 26vh, 220px); flex: none; }
.lg-hero--lado h2 { margin-bottom: 0; }
.lg-marca-centro h2 { font-family: 'Viga', var(--nh-fuente, system-ui, sans-serif); font-size: clamp(2.8rem, 6vw, 4rem); font-weight: 700; letter-spacing: 4px; line-height: 1.05; margin: 0 0 16px; }
.lg-marca-centro h2 span { display: block; margin-top: 10px; font-weight: 400; font-size: clamp(1.1rem, 2vw, 1.5rem); letter-spacing: 2px; color: var(--lg-acento); text-shadow: 0 0 28px rgba(255, 201, 0, .35); }
.lg-marca-centro p { max-width: 460px; margin: 0; font-size: 1.05rem; color: rgba(255, 255, 255, .82); }
.lg-datos { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 14px; }
.lg-datos li { display: flex; align-items: center; gap: 12px; font-size: .95rem; color: rgba(255, 255, 255, .88); }
.lg-datos svg { flex: none; width: 36px; height: 36px; padding: 8px; color: var(--lg-acento); border: 1px solid rgba(255, 255, 255, .22); border-radius: 10px; background: rgba(255, 255, 255, .07); }
.lg-sellos { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .18); }
.lg-sellos small { margin-right: 4px; font-size: .75rem; color: rgba(255, 255, 255, .6); }
.lg-sellos span { padding: 5px 13px; font-size: .78rem; font-weight: 600; border: 1px solid rgba(255, 255, 255, .4); border-radius: 999px; background: rgba(255, 255, 255, .08); }

.lg-form { animation: lg-entra .3s ease-out both; }
.lg-marca { animation: lg-entra .3s ease-out .1s both; }
@keyframes lg-entra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .lg-form, .lg-marca { animation: none; } }

@media (max-width: 800px) {
    .lg { grid-template-columns: 1fr; }
    .lg-marca { display: none; }
    .lg-form { padding: 20px 16px; }
    .lg-card { padding: 32px 22px 22px; }
}

/* Pantallas bajas (laptops con barra del navegador): tarjeta más compacta para que el copyright quede a la vista */
@media (max-height: 760px) {
    .lg-form { padding-top: 16px; padding-bottom: 44px; }
    .lg-card { padding: 22px 32px 16px; }
    .lg-form img.lg-logo { width: 150px; margin-bottom: 12px; padding: 6px 10px; }
    .lg-chip { margin-bottom: 6px; }
    .lg-form h1 { font-size: 1.4rem; }
    .lg-form p.lg-sub { margin-bottom: 14px; }
    .lg-campo { margin-bottom: 12px; }
    .lg-input input { height: 42px; }
    .lg-btn { height: 44px; }
    .lg-pie { margin-top: 14px; padding-top: 10px; }
    .lg-copy { bottom: 10px; }
}
