/* =====================================================================
   tema/parco.css - grafica comune del parco strumenti
   (la stessa di Valutazione CFU)
   - testata (logo, nome strumento, titolo, ora, utente, Menu/Esci)
   - foglio bianco centrato con bordo
   - schermata iniziale con il logo che dice cosa fa lo strumento
   - login a due pannelli
   - riquadro di benvenuto bordeaux, card con la fascia, pulsanti,
     campi, tabelle, avvisi
   Questo file è IDENTICO in tutti gli strumenti: le cose di un solo
   strumento vanno nel suo foglio di stile.
   ===================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;600;700&display=swap");

:root {
    --bordeaux:       #9C1A3A;   /* il colore del logo */
    --bordeaux-scuro: #7A1430;
    --bordeaux-notte: #5E0F24;
    --bordeaux-velo:  #FBEFF2;
    --bordeaux-rosa:  #EBC9D2;
    --inchiostro:     #23262B;
    --grigio:         #626973;
    --grigio-chiaro:  #9AA1AA;
    --linea:          #DCE0E5;
    --bordo-campo:    #C6CBD2;
    --fondo-riga:     #F6F7F9;
    --fondo-pagina:   #EEF0F3;
    --verde:          #1E6B45;
    --verde-velo:     #E3F2E9;
    --rosso:          #B42318;
    --rosso-velo:     #FDECEA;
    --ambra:          #8A5300;
    --ambra-velo:     #FFF4E0;
    --larghezza:      1440px;
    --margine:        28px;
    --font: "Source Sans 3", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --fascia-bordeaux:
        radial-gradient(circle, rgba(255, 255, 255, .22) 1px, transparent 1.6px) 0 0 / 12px 12px,
        linear-gradient(120deg, #9C1A3A 0%, #7A1430 100%);
    --fascia-righe:
        repeating-linear-gradient(135deg, rgba(255, 255, 255, .14) 0 1px, transparent 1px 11px),
        linear-gradient(120deg, #8E1836 0%, #6E1229 100%);
    --pannello-bordeaux:
        radial-gradient(circle at 105% -20%, rgba(255, 255, 255, .16) 0, transparent 45%),
        radial-gradient(circle, rgba(255, 255, 255, .12) 1px, transparent 1.6px) 0 0 / 14px 14px,
        linear-gradient(140deg, #A51D40 0%, #7A1430 55%, #5E0F24 100%);
}

/* ---------------------------------------------------------------------
   Base
   --------------------------------------------------------------------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.cornice body {
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.45;
    color: var(--inchiostro);
    -webkit-font-smoothing: antialiased;
}
html.cornice body *:not(i):not(.fa):not([class*="fa-"]) { font-family: var(--font); }
html.cornice a { color: var(--bordeaux); text-decoration: none; }
html.cornice a:hover { color: var(--bordeaux-scuro); text-decoration: underline; }
html.cornice code {
    padding: 1px 5px; border-radius: 4px; background: var(--fondo-riga);
    font-family: ui-monospace, Consolas, monospace !important; font-size: .9em; color: var(--bordeaux-scuro);
}
td, th { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------------
   Il foglio: testata e contenuto hanno la stessa larghezza
   --------------------------------------------------------------------- */
html.cornice { background: var(--fondo-pagina); }
html.cornice body {
    box-sizing: border-box;
    max-width: var(--larghezza);
    margin: 24px auto 40px;
    padding: 0 var(--margine) 0;
    background: #fff;
    border: 1px solid var(--linea);
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(35, 38, 43, .04), 0 10px 30px rgba(35, 38, 43, .06);
}
html.cornice body.stretto { max-width: 1100px; }
html.cornice body.largo { max-width: none; margin-left: 16px; margin-right: 16px; }
html.cornice *, html.cornice *::before, html.cornice *::after { box-sizing: border-box; }

/* ---------------------------------------------------------------------
   Testata
   --------------------------------------------------------------------- */
html.cornice .testata {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 0 calc(-1 * var(--margine)) 22px;
    padding: 16px var(--margine) 14px;
    border-bottom: 3px solid var(--bordeaux);
    border-radius: 10px 10px 0 0;
    background: #fff;
    text-align: left;
}
.testata-logo { display: block; line-height: 0; }
.testata-logo:hover { text-decoration: none !important; }
.testata-logo img { display: block; height: 78px; width: auto; border: 0; }
.testata-info { text-align: right; min-width: 0; }
.testata-strumento {
    display: inline-flex; align-items: center; gap: 6px;
    margin-bottom: 2px;
    font-size: 13px; font-weight: 700; color: var(--grigio);
}
.testata-strumento i.fa { color: var(--bordeaux); font-size: 12px; }
.testata-titolo { font-size: 26px; font-weight: 600; color: var(--bordeaux); line-height: 1.1; }
.testata-titolo::first-letter { text-transform: uppercase; }

.testata-barra {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end;
    gap: 8px; margin-top: 10px;
}

/* orologio a "pillola" */
.testata-orologio {
    display: inline-flex; align-items: stretch; overflow: hidden;
    border: 1px solid var(--linea); border-radius: 18px; background: #fff;
    font-size: 13.5px; line-height: 1; font-variant-numeric: tabular-nums;
}
.testata-orologio > span { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; }
.testata-orologio i { font-size: 13px; }
.orologio-data { color: var(--grigio); background: var(--fondo-riga); }
.orologio-ora { border-left: 1px solid var(--linea); color: var(--bordeaux); font-weight: 700; font-size: 15px; min-width: 70px; }
.orologio-ora small { margin-left: 3px; font-size: 10.5px; font-weight: 600; color: #B98595; }
.orologio-due-punti { animation: due-punti 1s steps(1) infinite; }
@keyframes due-punti { 50% { opacity: .25; } }

/* utente collegato */
.testata-operatore {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 3px 12px 3px 3px; border-radius: 18px;
    background: var(--fondo-riga); border: 1px solid var(--linea);
    font-size: 13.5px; color: var(--inchiostro);
}
.operatore-bollino {
    display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
    background: var(--bordeaux); color: #fff; font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
}
.operatore-nome { font-weight: 600; white-space: nowrap; }

/* Menu / Esci */
html.cornice .testata-pulsante {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 12px; border-radius: 18px; border: 1px solid transparent;
    color: var(--bordeaux); font-size: 13.5px; font-weight: 600; text-decoration: none;
    transition: background-color .15s, border-color .15s, color .15s;
}
.testata-pulsante i { font-size: 12.5px; color: inherit; }
html.cornice .testata-pulsante:hover { background: var(--bordeaux-velo); border-color: var(--bordeaux-rosa); color: var(--bordeaux-scuro); text-decoration: none; }
html.cornice .testata-esci:hover { background: var(--bordeaux); border-color: var(--bordeaux); color: #fff; }

/* ---------------------------------------------------------------------
   Firma in fondo
   --------------------------------------------------------------------- */
.firma {
    clear: both;
    margin: 36px calc(-1 * var(--margine)) 0;
    padding: 12px var(--margine) 14px;
    border-top: 1px solid var(--linea);
    border-radius: 0 0 10px 10px;
    background: #FAFAFB;
    text-align: center;
    font-size: 12px;
    letter-spacing: .03em;
    color: var(--grigio-chiaro);
}

/* ---------------------------------------------------------------------
   Schermata iniziale: logo, nome dello strumento e cosa fa
   1. sfondo chiaro con puntini bordeaux che scorrono piano
   2. compare l'emblema, con due onde che si allargano
   3. la scritta del logo si "svela" da sinistra, con un riflesso di luce
   4. nome dello strumento, cosa fa, data e barra di caricamento
   5. uscita in dissolvenza
   --------------------------------------------------------------------- */
.splash { display: none; }
html.splash-on .splash {
    display: flex; position: fixed; inset: 0; z-index: 99999;
    align-items: center; justify-content: center;
    background: radial-gradient(ellipse at 50% 42%, #FFFFFF 0%, #FFFFFF 38%, #FBF1F4 100%);
    cursor: default;
}
html.splash-on body { overflow: hidden; }
html.splash-via .splash { opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility .5s ease; }
html.splash-via body { overflow: auto; }

.splash-puntini {
    position: absolute; inset: -40px;
    background: radial-gradient(circle, rgba(156, 26, 58, .10) 1.2px, transparent 1.8px) 0 0 / 22px 22px;
    -webkit-mask: radial-gradient(ellipse at 50% 45%, transparent 0 30%, #000 75%);
            mask: radial-gradient(ellipse at 50% 45%, transparent 0 30%, #000 75%);
    animation: splash-scorri 12s linear infinite;
}
@keyframes splash-scorri { to { transform: translate(22px, 22px); } }

.splash-contenuto { position: relative; padding: 0 20px; text-align: center; }

/* logo: un'unica immagine mostrata due volte, ritagliata sull'emblema e sulla scritta */
.splash-logo { position: relative; width: min(640px, 88vw); margin: 0 auto; }
.splash-logo img { display: block; width: 100%; height: auto; margin: 0; }
.splash-logo img.splash-emblema {
    position: relative; z-index: 1;
    clip-path: inset(0 66% 0 0);
    transform: translateX(-5%);
    animation: splash-emblema .55s cubic-bezier(.2, .8, .2, 1) both;
}
.splash-logo img.splash-scritta {
    position: absolute; z-index: 1; left: 0; top: 0;
    clip-path: inset(0 0 0 34%);
    animation: splash-scritta .8s .35s cubic-bezier(.6, 0, .2, 1) both;
}
@keyframes splash-emblema {
    from { opacity: 0; transform: translateX(-5%) scale(.82); }
    to   { opacity: 1; transform: translateX(-5%) scale(1); }
}
@keyframes splash-scritta {
    from { clip-path: inset(0 100% 0 34%); opacity: 0; }
    15%  { opacity: 1; }
    to   { clip-path: inset(0 0 0 34%); opacity: 1; }
}
.splash-onda {
    position: absolute; z-index: 0; left: 13.7%; top: 50%; width: 24%; aspect-ratio: 1;
    border-radius: 50%; border: 2px solid rgba(156, 26, 58, .35);
    transform: translate(-50%, -50%) scale(.7); opacity: 0;
    animation: splash-onda 1.6s .25s cubic-bezier(.2, .7, .3, 1) both;
}
.splash-onda-2 { animation-delay: .55s; border-color: rgba(156, 26, 58, .22); }
@keyframes splash-onda {
    0%   { transform: translate(-50%, -50%) scale(.7); opacity: 0; }
    20%  { opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.45); opacity: 0; }
}
.splash-luce {
    position: absolute; z-index: 2; inset: 0; pointer-events: none;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .75) 50%, transparent 65%) no-repeat;
    background-size: 250% 100%; background-position: 130% 0;
    -webkit-mask: url("img/logo1.png") center / 100% 100% no-repeat;
            mask: url("img/logo1.png") center / 100% 100% no-repeat;
    clip-path: inset(0 0 0 34%);
    animation: splash-luce 1s 1.05s ease-in-out both;
}
@keyframes splash-luce { from { background-position: 130% 0; } to { background-position: -30% 0; } }

/* nome dello strumento */
.splash-sottotitolo {
    margin-top: 22px;
    color: var(--bordeaux);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: .02em;
    animation: splash-lettere .9s .75s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes splash-lettere { from { opacity: 0; letter-spacing: .35em; } to { opacity: 1; letter-spacing: .02em; } }
/* cosa fa lo strumento */
.splash-descrizione {
    max-width: 520px; margin: 8px auto 0;
    color: var(--grigio); font-size: 16.5px; line-height: 1.45;
    animation: splash-entra .6s 1s ease-out both;
}
.splash-saluto {
    min-height: 20px; margin-top: 14px;
    font-size: 14px; font-weight: 600; letter-spacing: .02em; color: var(--grigio-chiaro);
    animation: splash-entra .6s 1.15s ease-out both;
}
.splash-saluto::first-letter { text-transform: uppercase; }
.splash-barra {
    width: 220px; height: 3px; margin: 20px auto 0; border-radius: 3px;
    background: var(--linea); overflow: hidden;
    animation: splash-entra .5s .9s ease-out both;
}
.splash-barra span {
    display: block; width: 50%; height: 100%; border-radius: 3px;
    background: linear-gradient(90deg, transparent, var(--bordeaux), transparent);
    animation: splash-carica 1.1s ease-in-out infinite;
}
.splash-firma {
    margin-top: 18px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--grigio-chiaro);
    animation: splash-entra .7s 1.25s ease-out both;
}
@keyframes splash-entra { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes splash-carica { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* ---------------------------------------------------------------------
   Pulsanti
   --------------------------------------------------------------------- */
html.cornice button, html.cornice input[type="submit"], html.cornice input[type="button"] { font: inherit; }

.btn-primario, .btn-chiaro, .btn-nuovo, .btn-pericolo,
html.cornice a.btn-primario, html.cornice a.btn-chiaro, html.cornice a.btn-nuovo, html.cornice a.btn-pericolo {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 38px; margin: 0; padding: 0 16px;
    border-radius: 6px; border: 1px solid transparent;
    font-size: 14px; font-weight: 600; line-height: 1.2; white-space: nowrap;
    text-decoration: none; cursor: pointer;
    transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn-primario, html.cornice a.btn-primario { background: var(--bordeaux); border-color: var(--bordeaux); color: #fff; }
.btn-primario:hover, html.cornice a.btn-primario:hover { background: var(--bordeaux-scuro); border-color: var(--bordeaux-scuro); color: #fff; text-decoration: none; }
.btn-primario:disabled { background: #C9CDD3; border-color: #C9CDD3; color: #fff; cursor: not-allowed; }
.btn-chiaro, html.cornice a.btn-chiaro { background: #fff; border-color: var(--bordo-campo); color: var(--inchiostro); }
.btn-chiaro:hover, html.cornice a.btn-chiaro:hover { border-color: var(--bordeaux); color: var(--bordeaux); text-decoration: none; }
.btn-nuovo, html.cornice a.btn-nuovo { background: var(--bordeaux-velo); border-color: var(--bordeaux-rosa); color: var(--bordeaux); }
.btn-nuovo:hover, html.cornice a.btn-nuovo:hover { background: var(--bordeaux); border-color: var(--bordeaux); color: #fff; text-decoration: none; }
.btn-pericolo, html.cornice a.btn-pericolo { background: #fff; border-color: #E6B8B3; color: var(--rosso); }
.btn-pericolo:hover, html.cornice a.btn-pericolo:hover { background: var(--rosso); border-color: var(--rosso); color: #fff; text-decoration: none; }
.btn-piccolo { min-height: 30px !important; padding: 0 11px !important; font-size: 13px !important; }
.btn-primario i.fa, .btn-chiaro i.fa, .btn-nuovo i.fa, .btn-pericolo i.fa { color: inherit; font-size: 13px; }
html.cornice :is(button, a, input, select, textarea, label):focus-visible { outline: 2px solid var(--bordeaux); outline-offset: 2px; }

/* ---------------------------------------------------------------------
   Campi dei moduli
   --------------------------------------------------------------------- */
html.cornice input[type="text"], html.cornice input[type="password"], html.cornice input[type="email"],
html.cornice input[type="number"], html.cornice input[type="search"], html.cornice input:not([type]),
html.cornice select, html.cornice textarea {
    min-height: 38px;
    padding: 6px 11px;
    border: 1px solid var(--bordo-campo);
    border-radius: 6px;
    background: #fff;
    color: var(--inchiostro);
    font-size: 14.5px;
}
html.cornice textarea { line-height: 1.5; padding: 9px 11px; }
html.cornice input[type="file"] {
    padding: 6px; border: 1px dashed var(--bordo-campo); border-radius: 6px; background: var(--fondo-riga); font-size: 14px; max-width: 100%;
}
html.cornice input[type="file"]::file-selector-button {
    margin-right: 10px; padding: 6px 12px; border: 1px solid var(--bordeaux-rosa); border-radius: 5px;
    background: var(--bordeaux-velo); color: var(--bordeaux); font-weight: 600; cursor: pointer;
}
html.cornice input[type="checkbox"] { accent-color: var(--bordeaux); }
html.cornice input:focus, html.cornice select:focus, html.cornice textarea:focus {
    outline: none; border-color: var(--bordeaux); box-shadow: 0 0 0 3px rgba(156, 26, 58, .15);
}

/* ---------------------------------------------------------------------
   Login a due pannelli
   --------------------------------------------------------------------- */
.accesso { display: grid; place-items: center; min-height: calc(100vh - 260px); padding: 10px 0 24px; }
.accesso-scheda {
    display: grid; grid-template-columns: 1fr 1fr; width: 100%; max-width: 920px; overflow: hidden;
    border-radius: 16px; background: #fff; box-shadow: 0 18px 44px rgba(122, 20, 48, .16);
}
.accesso-lato {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; justify-content: center;
    padding: 44px 40px 38px; color: #fff;
    background:
        radial-gradient(circle at 110% -10%, rgba(255, 255, 255, .16) 0, transparent 45%),
        radial-gradient(circle, rgba(255, 255, 255, .12) 1px, transparent 1.6px) 0 0 / 14px 14px,
        linear-gradient(140deg, #A51D40 0%, #7A1430 55%, #5E0F24 100%);
}
.accesso-lato-luce, .hero-luce {
    position: absolute; inset: -50%; pointer-events: none;
    background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, .10) 50%, transparent 58%);
    animation: accesso-luce 7s ease-in-out infinite;
}
@keyframes accesso-luce { 0%, 100% { transform: translateX(-30%); } 50% { transform: translateX(30%); } }
.accesso-lato > *:not(.accesso-lato-luce) { position: relative; }
.accesso-lato-logo { display: block; width: 100%; max-width: 360px; height: auto; }
.accesso-lato-linea { width: 100%; max-width: 360px; height: 3px; margin: 22px 0; border-radius: 2px; background: rgba(255, 255, 255, .85); }
.accesso-lato-testo strong { display: block; margin-bottom: 10px; font-size: 22px; font-weight: 700; line-height: 1.25; color: #fff; }
.accesso-lato-testo strong i.fa { margin-right: 4px; font-size: 18px; color: inherit; opacity: .85; }
.accesso-lato-testo span { font-size: 15px; line-height: 1.5; color: rgba(255, 255, 255, .85); }
.accesso-lato-piede {
    margin-top: 30px; display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
    padding: 6px 12px; border-radius: 16px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2);
    font-size: 12.5px; font-weight: 600; letter-spacing: .03em; color: #fff;
}
.accesso-lato-piede i.fa { color: inherit; }

.accesso-form { padding: 48px 44px 34px; text-align: left; }
.accesso-titolo { margin-bottom: 22px; }
.accesso-titolo h1 { margin: 0; font-size: 26px; font-weight: 700; color: var(--inchiostro); }
.accesso-titolo p { margin: 2px 0 0; font-size: 14.5px; color: var(--grigio); }
.accesso-form label { display: block; margin: 0 0 5px; font-size: 13.5px; font-weight: 600; color: var(--grigio); }
.accesso-campo { position: relative; margin-bottom: 16px; }
.accesso-campo > i.fa { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--grigio-chiaro); pointer-events: none; }
html.cornice .accesso-campo input { width: 100%; height: 44px; padding: 0 42px 0 38px; border-radius: 7px; font-size: 15.5px; }
.accesso-campo:focus-within > i.fa { color: var(--bordeaux); }
.accesso-campo input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px #fff inset; }
button.accesso-occhio {
    position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
    display: grid; place-items: center; width: 34px; height: 34px; margin: 0; padding: 0;
    border: 0; border-radius: 6px; background: transparent; color: var(--grigio-chiaro); cursor: pointer;
}
button.accesso-occhio:hover { background: var(--fondo-riga); color: var(--bordeaux); }
.accesso-avviso, .accesso-errore {
    margin: -4px 0 14px; padding: 8px 11px; border-radius: 6px;
    background: var(--ambra-velo); color: var(--ambra); font-size: 13.5px; font-weight: 600;
}
.accesso-errore { margin: 0 0 18px; background: var(--rosso-velo); color: var(--rosso); border-left: 3px solid var(--rosso); }
.accesso-avviso[hidden] { display: none; }
.accesso-avviso i.fa, .accesso-errore i.fa { margin-right: 5px; color: inherit; }
.accesso-pulsanti { display: flex; gap: 10px; margin-top: 6px; }
.accesso-pulsanti > * { height: 44px; font-size: 15px !important; }
.accesso-pulsanti .accesso-entra { flex: 1; }
.accesso-nota { margin: 22px 0 0; padding-top: 14px; border-top: 1px solid var(--linea); font-size: 13.5px; color: var(--grigio); }

/* ---------------------------------------------------------------------
   Riquadro di benvenuto bordeaux (in cima alle pagine principali)
   --------------------------------------------------------------------- */
.hero {
    position: relative; overflow: hidden;
    margin: 4px 0 24px; padding: 28px 34px;
    border-radius: 16px; color: #fff;
    background: var(--pannello-bordeaux);
    box-shadow: 0 16px 40px rgba(122, 20, 48, .18);
}
.hero-luce { animation-duration: 8s; }
.hero-emblema {
    position: absolute; right: 34px; top: 50%; height: 150%; width: auto;
    transform: translateY(-50%); opacity: .14; pointer-events: none;
}
.hero > *:not(.hero-luce):not(.hero-emblema) { position: relative; }
.hero-etichetta { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .82; }
.hero h1 { margin: 6px 0 0; font-size: 30px; font-weight: 700; line-height: 1.15; color: #fff; }
.hero-linea { width: 80px; height: 3px; margin: 14px 0 12px; border-radius: 2px; background: rgba(255, 255, 255, .9); }
.hero p { margin: 0; max-width: 760px; font-size: 15.5px; line-height: 1.5; opacity: .9; }
.hero p strong { color: #fff; }
.hero a { color: #fff !important; text-decoration: underline; }

/* ---------------------------------------------------------------------
   Card con la fascia bordeaux (puntini / righe alternate)
   L'icona è una piastrella bianca dentro la fascia
   --------------------------------------------------------------------- */
.scheda-gruppo {
    margin: 0 0 18px;
    padding: 0 18px 16px;
    border: 1px solid #E6E1E3;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(35, 38, 43, .04), 0 8px 24px rgba(122, 20, 48, .06);
    transition: box-shadow .2s ease, border-color .2s ease;
}
.scheda-gruppo:focus-within { border-color: #E3C3CC; box-shadow: 0 1px 2px rgba(35, 38, 43, .04), 0 10px 28px rgba(122, 20, 48, .12); }
.scheda-gruppo > :is(h2, h3):first-child {
    position: relative;
    display: flex; align-items: center; gap: 8px;
    margin: 0 -18px 16px;
    padding: 9px 18px 9px 62px;
    min-height: 44px;
    border: 0;
    border-radius: 11px 11px 0 0;
    background: var(--fascia-bordeaux);
    font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: #fff;
}
.scheda-gruppo:nth-of-type(even) > :is(h2, h3):first-child { background: var(--fascia-righe); }
.scheda-gruppo > :is(h2, h3):first-child > i.fa:first-child {
    position: absolute; left: 16px; top: 5px;
    display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
    background: #fff; box-shadow: 0 4px 12px rgba(35, 38, 43, .14);
    color: var(--bordeaux); font-size: 15px;
}
.scheda-gruppo .scheda-badge, .badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 9px; border-radius: 10px;
    background: var(--bordeaux-velo); color: var(--bordeaux);
    font-size: 12px; font-weight: 700; letter-spacing: .02em; text-transform: none; white-space: nowrap;
}
.scheda-gruppo > :is(h2, h3):first-child .scheda-badge { margin-left: auto; background: rgba(255, 255, 255, .92); }

/* card del menu (come "Nuove funzionalità" di Valutazione) */
.card-menu { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 16px; }
html.cornice .card-voce {
    position: relative; display: flex; flex-direction: column; gap: 4px; padding: 0 18px 16px; overflow: hidden;
    border: 1px solid #E6E1E3; border-radius: 12px; background: #fff; color: var(--inchiostro);
    box-shadow: 0 8px 24px rgba(122, 20, 48, .06); transition: transform .15s, box-shadow .15s;
}
html.cornice .card-voce:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(122, 20, 48, .14); text-decoration: none; color: var(--inchiostro); }
.card-voce-fascia { display: block; height: 64px; margin: 0 -18px; background: var(--fascia-bordeaux); }
.card-voce:nth-child(even) .card-voce-fascia { background: var(--fascia-righe); }
.card-voce-icona {
    display: grid; place-items: center; width: 52px; height: 52px; margin-top: -26px; margin-bottom: 8px;
    border-radius: 13px; background: #fff; box-shadow: 0 4px 14px rgba(35, 38, 43, .16); color: var(--bordeaux);
}
.card-voce-icona i.fa { font-size: 21px; color: inherit; }
.card-voce-titolo { font-size: 19px; font-weight: 700; }
.card-voce-descrizione { font-size: 14px; color: var(--grigio); line-height: 1.4; }
.card-voce-entra { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; font-weight: 700; color: var(--bordeaux); }
.card-voce-entra i.fa {
    display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
    background: var(--bordeaux); color: #fff; font-size: 12px; transition: transform .15s;
}
.card-voce:hover .card-voce-entra i.fa { transform: translateX(3px); }

/* ---------------------------------------------------------------------
   Tabelle
   --------------------------------------------------------------------- */
.tabella-contenitore { overflow-x: auto; border: 1px solid var(--linea); border-radius: 10px; }
table.tabella { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tabella th, table.tabella td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--linea); vertical-align: middle; }
table.tabella th {
    background: var(--fondo-riga); color: var(--grigio);
    font-size: 12.5px; font-weight: 700; white-space: nowrap;
    border-bottom: 2px solid var(--linea);
}
table.tabella tbody tr:nth-child(even) { background: #FBFBFC; }
table.tabella tbody tr:hover { background: var(--bordeaux-velo); }
table.tabella tbody tr:last-child td { border-bottom: 0; }

/* ---------------------------------------------------------------------
   Avvisi
   --------------------------------------------------------------------- */
.avviso {
    display: flex; align-items: flex-start; gap: 10px;
    margin: 0 0 18px; padding: 12px 14px; border-radius: 9px;
    background: var(--fondo-riga); color: var(--grigio); font-size: 14.5px; line-height: 1.45;
}
.avviso > i.fa { margin-top: 3px; color: inherit; font-size: 15px; }
.avviso-ok     { background: #EEF8F2; color: var(--verde); }
.avviso-errore { background: var(--rosso-velo); color: var(--rosso); }
.avviso-info   { background: var(--bordeaux-velo); color: var(--bordeaux-scuro); }
.avviso-attenzione { background: var(--ambra-velo); color: var(--ambra); }
.vuoto { display: flex; align-items: center; gap: 10px; padding: 18px; border-radius: 9px; background: var(--fondo-riga); color: var(--grigio); }
.vuoto i.fa { font-size: 18px; color: #B98595; }

/* ---------------------------------------------------------------------
   Pagina dentro un altro sito (iframe o ?logo=logoNo):
   niente foglio con bordo, niente logo, niente schermata iniziale
   --------------------------------------------------------------------- */
html.ospitata { background: transparent; }
html.ospitata body { margin: 0 auto; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
html.ospitata .testata-logo, html.ospitata .accesso-lato-logo, html.ospitata .accesso-lato-linea { display: none; }
html.ospitata .testata { justify-content: flex-end; }
html.ospitata .firma { display: none; }
html.ospitata .accesso { min-height: 0; }

/* ---------------------------------------------------------------------
   Tablet e telefoni
   --------------------------------------------------------------------- */
@media (max-width: 820px) {
    html.cornice { background: #fff; }
    html.cornice body { margin: 0; border: 0; border-radius: 0; box-shadow: none; padding: 0 12px; overflow-x: hidden; }
    html.cornice body.largo { margin: 0; }
    html.cornice .testata { flex-wrap: wrap; gap: 8px 12px; margin: 0 -12px 14px; padding: 10px 12px; border-radius: 0; }
    .testata-logo img { height: 52px; }
    .testata-titolo { font-size: 20px; }
    .operatore-nome, .orologio-data { display: none !important; }
    .testata-barra { margin-top: 6px; gap: 6px; }
    .firma { margin: 28px -12px 0; padding: 12px; border-radius: 0; }
    .accesso-scheda { grid-template-columns: 1fr; }
    .accesso-lato { padding: 26px 24px; }
    .accesso-lato-logo { max-width: 260px; }
    .accesso-lato-linea { margin: 14px 0; }
    .accesso-lato-testo span, .accesso-lato-piede { display: none; }
    .accesso-form { padding: 26px 22px 22px; }
    .accesso { min-height: 0; }
    .hero { padding: 22px 20px; }
    .hero h1 { font-size: 23px; }
    .hero-emblema { right: -30px; height: 120%; }
    .scheda-gruppo { padding: 0 14px 12px; }
    .scheda-gruppo > :is(h2, h3):first-child { margin: 0 -14px 12px; padding-left: 56px; }
    .scheda-gruppo > :is(h2, h3):first-child > i.fa:first-child { left: 12px; width: 32px; height: 32px; }
}
@media (max-width: 560px) {
    html.cornice .testata { position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 10px rgba(35, 38, 43, .06); }
    .testata-logo img { height: 40px; }
    .testata-info { flex: 1; min-width: 0; }
    .testata-strumento { display: none; }
    .testata-titolo { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .testata-barra { margin-top: 4px; }
    .testata-orologio > span { padding: 6px 9px; }
    .orologio-ora { font-size: 14px; min-width: 0; }
    .orologio-ora small, .orologio-ora i { display: none; }
    .testata-operatore { padding: 2px; }
    html.cornice .testata-pulsante {
        font-size: 0; width: 36px; height: 36px; padding: 0; justify-content: center; border-color: var(--linea);
    }
    .testata-pulsante i { font-size: 15px; }
    .splash-sottotitolo { font-size: 20px; }
    .splash-descrizione { font-size: 15px; }
}

/* ---------------------------------------------------------------------
   Movimento ridotto e stampa
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .orologio-due-punti, .accesso-lato-luce, .hero-luce, .splash-puntini, .splash-onda, .splash-luce,
    .splash-logo img, .splash-sottotitolo, .splash-descrizione, .splash-saluto, .splash-barra, .splash-firma { animation: none !important; }
    html.cornice * { transition: none !important; }
}
@media print {
    .splash, .testata-barra, .firma { display: none !important; }
    html.cornice { background: #fff; }
    html.cornice body { max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
    html.cornice .testata { margin: 0 0 12px; padding: 0 0 8px; }
    .hero { box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
