/* ============================================================================
   EndlessMed — Pagine di accesso (stile «Editoriale», 2026-11-18)
   ----------------------------------------------------------------------------
   Usato da index.php (accesso), password_forgot.php (password dimenticata) e
   contatti_amministratore.php (recapiti).
   Pagine pubbliche e standalone: NON includono style_entrymed.css, quindi qui
   c'è tutto quello che serve (reset, carattere, colori).

   A sinistra il riquadro blu con le immagini dei moduli in dissolvenza
   (view/include/_login_visual.php + js/login_slides.js), a destra il modulo.
   Sotto i 900px il riquadro sparisce e il marchio passa sopra il modulo.
   ============================================================================ */

:root {
    --lg-ink:      #12223e;
    --lg-ink-2:    #3d4a5c;
    --lg-soft:     #5b6678;
    --lg-muted:    #6b7585;
    --lg-line:     #d3dae5;
    --lg-blue:     #2f6fed;
    --lg-navy:     #12223e;
    --lg-coral:    #c0564b;
    --lg-eyebrow:  #b4473d;
    --lg-filtro:   #2f6fed;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background: #ffffff;
}
body {
    font-family: 'Plus Jakarta Sans', 'Poppins', ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--lg-ink);
    -webkit-font-smoothing: antialiased;
    font-size: 16px;
}
*, *::before, *::after { box-sizing: border-box; }
a { color: var(--lg-ink); }
a:hover { color: var(--lg-blue); }

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

/* ── Riquadro blu con le immagini ───────────────────────────────────────── */
.lg-visual {
    position: relative;
    overflow: hidden;
    flex: 1 1 520px;
    min-width: 0;
    min-height: calc(100vh - 32px);
    margin: 16px;
    border-radius: 32px;
    background: var(--lg-navy);
    color: #ffffff;
    padding: 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
}

.lg-slides { position: absolute; inset: 0; filter: grayscale(1) contrast(1.08); }
.lg-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.06);
    transition: opacity 1.4s ease, transform 7s linear;
}
.lg-slide.is-on { opacity: 1; transform: scale(1); }
.lg-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 30%;
}
.lg-filtro { position: absolute; inset: 0; background: var(--lg-filtro); mix-blend-mode: multiply; }
.lg-velo   { position: absolute; inset: 0; background: rgba(11, 19, 34, 0.4); }

.lg-visual__brand,
.lg-visual__testo { position: relative; }

.lg-brand { display: flex; align-items: center; gap: 12px; }
.lg-brand__mark {
    width: 44px; height: 44px;
    border-radius: 13px;
    background: #ffffff;
    color: var(--lg-coral);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.lg-brand__mark svg { width: 24px; height: 24px; }
.lg-brand__text { display: flex; flex-direction: column; }
.lg-brand__text strong { font-size: 18px; font-weight: 800; }
.lg-brand__text small  { font-size: 12px; color: #c9d6ea; }
/* Marchio come collegamento alla pagina di accesso (contatti, password dimenticata, 2026-11-26) */
a.lg-brand--link, a.lg-brand--link:hover { color: inherit; text-decoration: none; }
a.lg-brand--link { border-radius: 14px; }
a.lg-brand--link .lg-brand__mark { transition: transform .15s, box-shadow .18s; }
a.lg-brand--link:hover .lg-brand__mark { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22); }
a.lg-brand--link:focus-visible { outline: 2px solid var(--lg-blue); outline-offset: 6px; }
.lg-visual a.lg-brand--link:focus-visible { outline-color: #ffffff; }

.lg-visual__testo { display: flex; flex-direction: column; gap: 24px; }
.lg-visual__titolo {
    margin: 0;
    font-size: 52px;
    line-height: 1.04;
    font-weight: 800;
    letter-spacing: -0.03em;
    max-width: 600px;
}
.lg-didascalia {
    min-height: 64px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    transition: opacity .6s ease, transform .6s ease;
}
.lg-didascalia.is-off { opacity: 0; transform: translateY(8px); }
.lg-didascalia__area {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #9fb2d8;
}
.lg-didascalia__nome { font-size: 19px; font-weight: 800; }
.lg-didascalia__sub  { font-size: 14px; color: #c9d6ea; }

/* ── Colonna del modulo ─────────────────────────────────────────────────── */
.lg-main {
    flex: 1 1 560px;
    min-width: 0;
    padding: 56px 72px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;     /* modulo e piede al centro della parte bianca */
    gap: 48px;
}
.lg-main > .lg-footer { width: 100%; max-width: 420px; }
.lg-main__top {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.lg-main__top .lg-brand { visibility: hidden; }  /* serve solo sotto i 900px */
.lg-main__top .lg-brand__mark { background: var(--lg-navy); color: #ff8a7e; }
.lg-main__top .lg-brand__text strong { color: var(--lg-ink); }
.lg-main__top .lg-brand__text small  { color: var(--lg-soft); }
.lg-link-top {
    font-size: 14px;
    font-weight: 600;
    color: var(--lg-soft);
    text-decoration: none;
    min-height: 44px;
    display: flex;
    align-items: center;
    margin-left: auto;
    text-align: right;
    text-wrap: balance;   /* sulla demo il testo è lungo: due righe pari, non una parola sola a capo */
}

.lg-form {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 26px;
}
.lg-intro { display: flex; flex-direction: column; gap: 12px; }
.lg-eyebrow {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--lg-eyebrow);
}
.lg-titolo {
    margin: 0;
    font-size: 64px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.035em;
}
.lg-titolo--medio { font-size: 44px; line-height: 1.05; }
.lg-sub { margin: 0; font-size: 16px; line-height: 1.5; color: var(--lg-soft); }

.lg-campo {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--lg-soft);
}
.lg-campo__wrap { position: relative; display: block; }
.lg-input {
    width: 100%;
    height: 48px;
    border: 0;
    border-bottom: 2px solid var(--lg-line);
    border-radius: 0;
    background: transparent;
    padding: 0;
    font: inherit;
    font-size: 18px;
    font-weight: 600;
    color: var(--lg-ink);
    transition: border-color .2s;
}
.lg-input::placeholder { color: #a4b0c6; font-weight: 500; }
.lg-input:focus { outline: none; border-bottom-color: var(--lg-ink); }
.lg-input--pwd { padding-right: 48px; }
.lg-input--codice {
    font-size: 28px;
    letter-spacing: 0.4em;
    font-family: Consolas, Menlo, monospace;
}
/* L'autocompletamento del browser non deve colorare il campo di giallo/azzurro */
.lg-input:-webkit-autofill,
.lg-input:-webkit-autofill:hover,
.lg-input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--lg-ink);
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
    transition: background-color 9999s;
}

.lg-occhio {
    position: absolute;
    right: 0;
    top: 2px;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    color: var(--lg-soft);
    display: grid;
    place-items: center;
    cursor: pointer;
    border-radius: 10px;
}
.lg-occhio svg { width: 20px; height: 20px; }
.lg-occhio svg[hidden] { display: none; }
.lg-occhio:hover { color: var(--lg-ink); }
.lg-occhio:focus-visible { outline: 2px solid var(--lg-blue); outline-offset: -2px; }

.lg-opzioni {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 14px;
}
.lg-opzioni label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--lg-ink-2);
    min-height: 44px;
    cursor: pointer;
}
.lg-opzioni input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--lg-navy); margin: 0; }
.lg-opzioni a { font-weight: 600; }

.lg-azioni { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.lg-btn {
    height: 56px;
    padding: 0 36px;
    border: 0;
    border-radius: 999px;
    background: var(--lg-navy);
    color: #ffffff;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: transform .15s, box-shadow .18s, background .18s;
}
.lg-btn svg { width: 18px; height: 18px; }
.lg-btn:hover { background: #1c3558; box-shadow: 0 8px 22px rgba(18, 34, 62, 0.22); transform: translateY(-1px); }
.lg-btn:active { transform: translateY(0); }
.lg-btn:focus-visible { outline: 2px solid var(--lg-blue); outline-offset: 3px; }
.lg-btn[aria-busy="true"], .lg-btn:disabled { opacity: 0.6; cursor: default; transform: none; box-shadow: none; }

.lg-link {
    background: none;
    border: 0;
    padding: 4px 0;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--lg-soft);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
}
.lg-link:hover { color: var(--lg-blue); }
.lg-link svg { width: 16px; height: 16px; }
.lg-link:focus-visible { outline: 2px solid var(--lg-blue); outline-offset: 2px; border-radius: 4px; }

.lg-otp__azioni { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ── Avvisi ─────────────────────────────────────────────────────────────── */
.lg-avviso {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.5;
}
.lg-avviso svg { flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px; }
.lg-avviso--err  { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; font-weight: 500; }
.lg-avviso--info { background: #eef4ff; border: 1px solid #cfdcf8; color: #1f4fb4; }
.lg-avviso--ok   { background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857; }
.lg-avviso--warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.lg-avviso a { color: inherit; font-weight: 700; }

.lg-footer { margin: 0; font-size: 12px; color: var(--lg-muted); }

/* ── Recapiti (contatti_amministratore.php) ─────────────────────────────── */
.lg-contatti { display: flex; flex-direction: column; gap: 10px; }
.lg-contatti__org {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--lg-soft);
    margin-bottom: 4px;
}
.lg-contatto {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid #e1e7ef;
    border-radius: 18px;
    background: #f8fafc;
}
.lg-contatto__ico {
    width: 44px; height: 44px;
    border-radius: 13px;
    background: #e8f0ff;
    color: var(--lg-blue);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.lg-contatto__ico svg { width: 20px; height: 20px; }
.lg-contatto__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lg-contatto__label { font-size: 12px; font-weight: 600; color: var(--lg-soft); }
.lg-contatto__value {
    font-size: 16px;
    font-weight: 700;
    color: var(--lg-ink);
    text-decoration: none;
    overflow-wrap: anywhere;
}
a.lg-contatto__value:hover { color: var(--lg-blue); }

/* ── Richiesta di accesso alla demo (contatti_amministratore.php, 2026-11-26) ── */
.lg-form--lungo { gap: 20px; }
.lg-riga2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.lg-campo--err { color: #b91c1c; }
.lg-campo--err .lg-input { border-bottom-color: #dc2626; }
.lg-captcha { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.lg-captcha img { display: block; width: 200px; height: 64px; border: 1px solid var(--lg-line); border-radius: 12px; background: #f6f8fb; }
.lg-input--captcha { letter-spacing: 0.3em; text-transform: uppercase; }
.lg-info {
    border: 1px solid #e1e7ef;
    border-radius: 14px;
    background: #f8fafc;
    font-size: 13px;
    line-height: 1.55;
    color: var(--lg-ink-2);
}
.lg-info summary {
    cursor: pointer;
    padding: 12px 16px;
    min-height: 44px;
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--lg-ink);
}
.lg-info summary:focus-visible { outline: 2px solid var(--lg-blue); outline-offset: 2px; border-radius: 14px; }
.lg-info summary { list-style: none; justify-content: space-between; gap: 12px; }
.lg-info summary::-webkit-details-marker { display: none; }
.lg-info summary::after { content: "Leggi +"; font-size: 13px; font-weight: 600; color: var(--lg-soft); }
.lg-info[open] summary::after { content: "Chiudi \2212"; }
.lg-info__corpo { padding: 0 16px 14px; }
.lg-info__corpo p { margin: 0 0 8px; }
.lg-info__corpo p:last-child { margin-bottom: 0; }
.lg-consenso {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--lg-ink-2);
    cursor: pointer;
}
.lg-consenso input { width: 18px; height: 18px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--lg-navy); }
.lg-consenso em { font-style: normal; color: var(--lg-muted); }
.lg-consenso.lg-campo--err span { color: #b91c1c; }
.lg-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.lg-avviso ul { margin: 4px 0 0; padding-left: 18px; }
@media (max-width: 480px) {
    .lg-riga2 { grid-template-columns: 1fr; }
}

/* ── Toast «disconnesso per inattività» ─────────────────────────────────── */
.lg-toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 100000;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 360px;
    padding: 12px 14px 12px 16px;
    border-radius: 14px;
    background: #12223e;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(18, 34, 62, 0.28);
    transform: translateY(8px);
    opacity: 0;
    transition: transform .2s, opacity .2s;
}
.lg-toast.is-visible { transform: translateY(0); opacity: 1; }
.lg-toast__icon { width: 18px; height: 18px; flex-shrink: 0; color: #f2b366; }
.lg-toast__msg { flex: 1; }
.lg-toast__close {
    width: 32px; height: 32px;
    border: 0; border-radius: 8px;
    background: transparent; color: rgba(255,255,255,0.75);
    display: grid; place-items: center; cursor: pointer;
}
.lg-toast__close:hover { background: rgba(255,255,255,0.12); color: #fff; }
.lg-toast__close svg { width: 16px; height: 16px; }

/* ── Schermi stretti ────────────────────────────────────────────────────── */
/* Riquadro fermo, scorre solo la colonna del modulo (2026-11-26, richiesta del titolare per la
   richiesta di accesso della demo, la pagina più lunga). Solo con le due colonne AFFIANCATE: sotto
   ~1.115 px vanno a capo e il riquadro, se restasse fermo, coprirebbe il modulo; la soglia ha
   margine per la barra di scorrimento di Windows. La colonna del modulo tiene almeno l'altezza
   della finestra, così il piede resta in fondo come prima sulle pagine corte. */
@media (min-width: 1160px) {
    .lg-page { align-items: flex-start; }
    .lg-visual { position: sticky; top: 16px; height: calc(100vh - 32px); }
    .lg-main { min-height: 100vh; }
}

@media (max-width: 1180px) {
    .lg-main { padding: 48px 48px; }
    .lg-visual__titolo { font-size: 44px; }
}
@media (max-width: 900px) {
    .lg-visual { display: none; }
    .lg-main { min-height: 100vh; padding: 28px 20px 32px; }
    .lg-main__top .lg-brand { visibility: visible; }
    .lg-titolo { font-size: 48px; }
    .lg-titolo--medio { font-size: 36px; }
}
@media (prefers-reduced-motion: reduce) {
    .lg-slide, .lg-didascalia, .lg-btn, .lg-toast { transition: none; transform: none; }
}

/* ── Impostazione password (lib/oper_setpassword_core.php) ──────────────────
   Quelle pagine girano anche dietro al relay: questo foglio vi è copiato dentro
   (<style>) e l'immagine del riquadro è incorporata, nessun file esterno. */
.lg-slides--fissa .lg-slide { opacity: 1; transform: none; transition: none; }
.lg-reqs {
    border: 1px solid #e1e7ef;
    border-radius: 18px;
    background: #f8fafc;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.lg-reqs__titolo { font-size: 12px; font-weight: 700; color: var(--lg-soft); margin-bottom: 4px; }
.lg-req { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--lg-muted); transition: color .2s; }
.lg-req__punto { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; flex-shrink: 0; transition: background .2s; }
.lg-req.is-ok { color: #047857; font-weight: 600; }
.lg-req.is-ok .lg-req__punto { background: #10b981; }
.lg-esito {
    width: 64px; height: 64px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    color: #ffffff;
}
.lg-esito svg { width: 30px; height: 30px; }
.lg-esito--ok  { background: #0f8a6a; }
.lg-esito--err { background: #b4423a; }
a.lg-btn { text-decoration: none; }
a.lg-btn:hover { color: #ffffff; }
