/* VerbHub – stile comune, allineato alla tavola di stile ISPAR di GeDocsPro (bearIT, 2026):
   Royal Blue #00309B e le sue tinte, colori di sistema, carattere Inter, icone Material Symbols outlined 400. */
@font-face { font-family: "Inter"; src: url("/font/Inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; src: url("/font/Inter-ext.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root {
  /* primario Royal Blue e tinte 75/50/25/15 % */
  --brand: #00309B; --accent: #00309B; --azzurro: #4064B4; --blu-50: #8098CD; --blu-25: #BFCBE6; --accent-soft: #D9E0F0;
  /* sistema: success, alert, warning; antrace e stone grey al posto di nero e grigio */
  --ok: #138A49; --ok-bg: #DDF3E7; --warn: #B86E00; --warn-bg: #FEEFD8; --err: #D3302D; --err-bg: #FDE5E4; --plan: #00838A; --plan-bg: #D5F1F2;
  --ambra: #F49910; --success: #19A75A; --alert: #F49910; --warning: #EE4746;
  --bg: #EEF0F5; --sunk: #E6E9F1; --card: #FFFFFF; --ink: #111111; --muted: #737E98; --line: #D8DDE8; --line-soft: #E6E9F0;
  --r: 12px; --ombra: 0 1px 2px rgba(0, 48, 155, .05), 0 2px 10px rgba(0, 48, 155, .05);
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 14px; line-height: 1.45; color: var(--ink); background: var(--bg); font-feature-settings: "cv11", "ss01"; }
a { color: var(--brand); } a:hover { color: var(--azzurro); }
h1 { font-size: 21px; font-weight: 700; color: var(--ink); margin: 0; letter-spacing: -.01em; }
h2 { font-size: 16px; font-weight: 700; color: var(--ink); margin: 0 0 12px; }
h3 { font-size: 14px; font-weight: 600; margin: 0 0 8px; }
.muted { color: var(--muted); } .piccolo { font-size: 12px; } .mono { font-family: var(--mono); font-size: 12.5px; }
[hidden] { display: none !important; }
.ms { width: 20px; height: 20px; flex: none; fill: currentColor; }

/* ---------- menu laterale (GeDocsPro: testata blu «Menu», gruppi espandibili, si riduce a sole icone) ---------- */
:root { --lato: 248px; --lato-ridotto: 64px; }
.laterale { position: fixed; inset: 0 auto 0 0; width: var(--lato); background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 30; transition: width .18s ease; }
.laterale .testa-menu { height: 56px; flex: none; background: var(--brand); color: #fff; display: flex; align-items: center; gap: 10px; padding: 0 16px; border: 0; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; text-align: left; }
.laterale .testa-menu .ms { width: 22px; height: 22px; }
.laterale nav { padding: 8px 10px 12px; flex: 1; overflow-y: auto; }
.laterale nav a, .laterale .voce-gruppo { display: flex; align-items: center; gap: 11px; width: 100%; padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font: inherit; font-weight: 500; font-size: 13.5px; background: none; border: 0; cursor: pointer; text-align: left; white-space: nowrap; }
.laterale nav .ms { color: #3C4660; }
.laterale nav a:hover, .laterale .voce-gruppo:hover { background: var(--bg); }
.laterale nav a[aria-current="page"] { background: var(--accent-soft); color: var(--brand); font-weight: 600; }
.laterale nav a[aria-current="page"] .ms { color: var(--brand); }
.laterale .voce-gruppo { border-bottom: 1px solid var(--line-soft); border-radius: 0; margin-top: 2px; }
.laterale .voce-gruppo .freccia { margin-left: auto; width: 18px; height: 18px; }
.laterale .gruppo.aperto > .voce-gruppo { color: var(--brand); font-weight: 600; } .laterale .gruppo.aperto > .voce-gruppo .ms { color: var(--brand); }
.laterale .sottovoci { padding: 4px 0 6px 14px; }
.laterale .sottovoci a { border-bottom: 1px solid var(--line-soft); border-radius: 6px; font-size: 13px; }
.laterale .gruppo:not(.aperto) .sottovoci { display: none; }
.laterale .esci { border-top: 1px solid var(--line); padding: 8px 10px; }
.laterale .esci a { color: var(--ink); }
.laterale nav a .badge, .laterale .voce-gruppo .badge { margin-left: auto; background: var(--alert); color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; min-width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }
.laterale .voce-gruppo .badge + .freccia { margin-left: 4px; }
/* menu ridotto a sole icone (come GeDocsPro) */
body.menu-ridotto .laterale { width: var(--lato-ridotto); }
body.menu-ridotto .laterale .testa-menu span, body.menu-ridotto .laterale nav a span, body.menu-ridotto .laterale .voce-gruppo span, body.menu-ridotto .laterale .freccia, body.menu-ridotto .laterale .badge { display: none; }
body.menu-ridotto .laterale .testa-menu { justify-content: center; padding: 0; }
body.menu-ridotto .laterale nav { padding: 8px 8px; }
body.menu-ridotto .laterale .sottovoci { display: block !important; padding-left: 0; }
body.menu-ridotto .laterale .voce-gruppo { display: none; }
body.menu-ridotto .laterale nav a { justify-content: center; padding: 9px 0; }

/* ---------- barra in alto: indietro, icona e titolo della pagina; a destra marchio, avvisi e utente ---------- */
.barra { position: sticky; top: 0; z-index: 20; height: 56px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 0 24px; }
body.con-menu .barra { margin-left: var(--lato); transition: margin-left .18s ease; }
body.con-menu.menu-ridotto .barra { margin-left: var(--lato-ridotto); }
.barra .indietro { display: inline-flex; border: 0; background: none; color: var(--muted); cursor: pointer; padding: 4px; border-radius: 6px; }
.barra .indietro:hover { color: var(--brand); background: var(--bg); }
.barra .titolo-pagina { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; color: var(--ink); min-width: 0; }
.barra .titolo-pagina .ms { color: var(--brand); }
.barra .titolo-pagina span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barra .apri-menu { display: none; }
.marchio { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.marchio img { height: 24px; }
.marchio .nome { font-size: 18px; letter-spacing: -.01em; white-space: nowrap; }
.marchio .nome b { font-weight: 800; color: var(--brand); } .marchio .nome span { font-weight: 500; color: var(--azzurro); }
.utente { margin-left: auto; display: flex; align-items: center; gap: 16px; font-size: 13.5px; }
.utente .campanella { position: relative; color: var(--ink); display: inline-flex; }
.utente .campanella i { position: absolute; top: 0; right: 1px; width: 7px; height: 7px; border-radius: 50%; background: var(--warning); }
.utente .nome-utente { text-decoration: none; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.utente .nome-utente small { display: block; color: var(--muted); font-size: 11.5px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: none; }
.velo { display: none; }
@media (max-width: 960px) {
  body.con-menu .barra, body.con-menu.menu-ridotto .barra { margin-left: 0; }
  body.menu-ridotto .laterale { width: var(--lato); }
  .laterale { transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 10px 40px rgba(0, 20, 70, .25); }
  body.menu-aperto .laterale { transform: none; }
  body.menu-aperto .velo { display: block; position: fixed; inset: 0; background: rgba(0, 20, 70, .35); z-index: 25; }
  .barra { padding: 0 12px; background: var(--brand); color: #fff; border: 0; }
  .barra .apri-menu { display: inline-flex; color: #fff; background: none; border: 0; padding: 4px; }
  .barra .indietro { display: none; }
  .barra .titolo-pagina, .barra .titolo-pagina .ms { color: #fff; font-size: 16px; }
  .utente .marchio, .utente .nome-utente > span:not(.avatar), .utente .campanella { display: none; }
}

/* ---------- piè di pagina ISPAR ---------- */
.piede-pagina { border-top: 1px solid var(--line); max-width: 1424px; margin: 12px 28px 0; padding: 14px 0 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 11.5px; color: var(--muted); }
.piede-pagina .ispar { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.piede-pagina .ispar b { color: var(--brand); font-size: 12px; }
.piede-pagina .ispar svg { height: 20px; width: 88px; margin-bottom: 2px; }
.piede-pagina .destra { text-align: right; align-self: flex-end; }
@media (min-width: 961px) {
  body.con-menu .piede-pagina { margin-left: calc(var(--lato) + 28px + max(0px, (100vw - var(--lato) - 1480px) / 2)); }
  body.con-menu.menu-ridotto .piede-pagina { margin-left: calc(var(--lato-ridotto) + 28px + max(0px, (100vw - var(--lato-ridotto) - 1480px) / 2)); }
}

/* pagina pubblica di firma: solo il marchio in alto */
.testata { background: #fff; border-bottom: 1px solid var(--line); }
.testata .riga { max-width: 1440px; margin: 0 auto; padding: 12px 24px; }
.testata .by { font-size: 11.5px; color: var(--muted); font-weight: 500; }

/* ---------- pagina ---------- */
main { max-width: 1480px; padding: 20px 28px 28px; }
@media (min-width: 961px) {
  body.con-menu main { margin-left: calc(var(--lato) + max(0px, (100vw - var(--lato) - 1480px) / 2)); }
  body.con-menu.menu-ridotto main { margin-left: calc(var(--lato-ridotto) + max(0px, (100vw - var(--lato-ridotto) - 1480px) / 2)); }
}
/* il titolo della pagina sta nella barra in alto (come GeDocsPro): nel contenuto resta la descrizione */
body.con-menu .titolo h1.in-barra { display: none; }
.titolo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.titolo p { margin: 4px 0 0; color: var(--muted); }
.card { background: var(--card); border: 0; border-radius: var(--r); padding: 20px; box-shadow: var(--ombra); }
.card + .card { margin-top: 16px; }
.griglia > .card + .card { margin-top: 0; }
.griglia { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-mappa { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
@media (max-width: 980px) { .g2, .g3, .g-mappa { grid-template-columns: 1fr; } }
.riga-flex { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.spazio { flex: 1; }

/* ---------- indicatori ---------- */
.kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi div { background: #fff; border-radius: var(--r); padding: 14px 18px; box-shadow: var(--ombra); }
.kpi b { display: block; font-size: 26px; font-weight: 700; color: var(--brand); line-height: 1.15; }
.kpi span { font-size: 12px; color: var(--muted); font-weight: 500; }
.kpi .err b { color: var(--err); } .kpi .warn b { color: var(--warn); } .kpi .ok b { color: var(--ok); }

/* ---------- tabelle (GeDocsPro: intestazioni blu, ordinamento, filtro per colonna, paginazione) ---------- */
.tabella { width: 100%; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th { font-size: 12.5px; font-weight: 600; color: var(--brand); text-align: left; padding: 12px 12px 8px; border-bottom: 1px solid var(--line); background: #fff; white-space: nowrap; vertical-align: bottom; }
th.ordinabile { cursor: pointer; user-select: none; }
th.ordinabile::after { content: "⇅"; font-size: 11px; margin-left: 4px; color: var(--blu-50); }
th.ordinabile[data-verso="su"]::after { content: "↑"; color: var(--brand); } th.ordinabile[data-verso="giu"]::after { content: "↓"; color: var(--brand); }
tr.filtri-colonna th { padding: 0 8px 10px; }
tr.filtri-colonna input { padding: 5px 26px 5px 8px; font-size: 12.5px; border-radius: 6px; min-width: 70px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath fill='%23737E98' d='M784-120 532-372q-30 24-69 38t-83 14q-109 0-184.5-75.5T120-580q0-109 75.5-184.5T380-840q109 0 184.5 75.5T640-580q0 44-14 83t-38 69l252 252-56 56ZM380-400q75 0 127.5-52.5T560-580q0-75-52.5-127.5T380-760q-75 0-127.5 52.5T200-580q0 75 52.5 127.5T380-400Z'/%3E%3C/svg%3E") no-repeat right 6px center / 15px; }
td { font-size: 13.5px; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tr.cliccabile { cursor: pointer; } tr.cliccabile:hover td { background: #F2F5FB; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.paginazione { display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding: 10px 14px; font-size: 12px; color: var(--ink); }
.paginazione select { width: auto; padding: 3px 6px; font-size: 12px; border-radius: 6px; }
.paginazione button { border: 0; background: none; color: var(--ink); cursor: pointer; padding: 2px 6px; font-size: 15px; border-radius: 6px; }
.paginazione button:disabled { color: var(--blu-25); cursor: default; }

/* ---------- etichette di stato (chip) ---------- */
.stato { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 6px; background: var(--sunk); color: var(--muted); white-space: nowrap; }
.stato.ok { background: var(--ok-bg); color: var(--ok); } .stato.warn { background: var(--warn-bg); color: var(--warn); }
.stato.err { background: var(--err-bg); color: var(--err); } .stato.info { background: var(--accent-soft); color: var(--brand); } .stato.plan { background: var(--plan-bg); color: var(--plan); }
.pallino { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; }
.pallino.verde { background: var(--success); } .pallino.giallo { background: var(--alert); } .pallino.rosso { background: var(--warning); }

/* ---------- campi e pulsanti (GeDocsPro: campi arrotondati, pulsante primario pieno, secondario azzurro, terziario testo) ---------- */
label { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 4px; }
input, select, textarea { font: inherit; color: var(--ink); background: #fff; border: 1px solid #C9CFDC; border-radius: 10px; padding: 9px 12px; width: 100%; }
input:hover, select:hover, textarea:hover { border-color: var(--blu-50); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--azzurro); outline-offset: 2px; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); }
input[type="search"] { border-radius: 999px; padding-left: 16px; }
textarea { resize: vertical; min-height: 90px; }
.campi { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.campo-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; color: var(--ink); }
.campo-check input { width: auto; }
.btn { font: inherit; font-weight: 600; font-size: 13.5px; border-radius: 8px; padding: 8px 16px; border: 0; background: var(--accent-soft); color: var(--brand); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; white-space: nowrap; transition: background .12s; }
.btn:hover { background: var(--blu-25); color: var(--brand); }
.btn.primario { background: var(--brand); color: #fff; } .btn.primario:hover { background: #00267C; color: #fff; }
.btn.terziario { background: none; padding-left: 6px; padding-right: 6px; } .btn.terziario:hover { text-decoration: underline; background: none; }
.btn.pericolo { color: var(--err); background: var(--err-bg); } .btn.piccolo { padding: 5px 10px; font-size: 12.5px; }
.btn:disabled { background: #BFC4D0; color: #fff; cursor: not-allowed; }
.filtri { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.filtri input, .filtri select { width: auto; min-width: 160px; }
.filtri input[type="search"] { min-width: 300px; }

/* ---------- finestre e avvisi ---------- */
dialog { border: 0; border-radius: 16px; padding: 0; box-shadow: 0 20px 60px rgba(20, 33, 61, .3); width: min(720px, 94vw); }
dialog::backdrop { background: rgba(20, 33, 61, .35); }
dialog .testa { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
dialog .corpo { padding: 18px 20px; max-height: 70vh; overflow: auto; }
dialog .piede { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; background: var(--bg); }
.avviso { border-radius: 8px; padding: 10px 12px; font-size: 13px; background: var(--accent-soft); color: var(--brand); }
.avviso.warn { background: var(--warn-bg); color: var(--warn); } .avviso.err { background: var(--err-bg); color: var(--err); } .avviso.ok { background: var(--ok-bg); color: var(--ok); }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 500; box-shadow: var(--ombra); z-index: 100; max-width: 90vw; }
#toast.err { background: var(--err); }
.vuoto { padding: 28px; text-align: center; color: var(--muted); }

/* ---------- mappa sala operativa ---------- */
.mappa { position: relative; width: 100%; max-width: 520px; margin: 0 auto; }
.mappa svg { width: 100%; height: auto; display: block; }
.mappa .terra { fill: var(--sunk); stroke: #C9D1E3; stroke-width: 1; }
.mappa circle.punto { cursor: pointer; stroke: #fff; stroke-width: 2; }
.mappa circle.sel { stroke: var(--brand); stroke-width: 3; }
.legenda { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 8px; }

/* ---------- editor verbale ---------- */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .editor { grid-template-columns: 1fr; } }
.lettore { position: sticky; top: 68px; z-index: 5; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; box-shadow: var(--ombra); margin-bottom: 12px; }
.lettore input[type=range] { flex: 1; min-width: 160px; padding: 0; border: 0; accent-color: var(--accent); }
.lettore .tempo { font-family: var(--mono); font-size: 13px; min-width: 104px; }
.segmento { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--line-soft); border-radius: 6px; }
.segmento.attivo { background: #F3F6FC; }
.segmento.rivedere { box-shadow: inset 3px 0 0 var(--ambra); }
.segmento .lato { font-size: 12px; }
.segmento .lato select { padding: 4px 6px; font-size: 12.5px; font-weight: 600; }
.segmento .lato .t { font-family: var(--mono); color: var(--muted); cursor: pointer; display: inline-block; margin-top: 6px; }
.segmento .testo { font-family: "Liberation Serif", "Times New Roman", serif; font-size: 16px; line-height: 1.6; outline: none; padding: 2px 4px; border-radius: 4px; white-space: pre-wrap; }
.segmento .testo:focus { background: #fff; box-shadow: 0 0 0 2px var(--accent-soft); }
.segmento .testo span.w { cursor: pointer; border-radius: 3px; }
.segmento .testo span.w:hover { background: var(--accent-soft); }
.segmento .testo span.w.ora { background: #FFE7B3; }
.segmento .testo span.w.bassa { text-decoration: underline dotted var(--ambra); text-underline-offset: 3px; }
.controlli li { list-style: none; padding: 6px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; display: flex; gap: 8px; }
.controlli { padding: 0; margin: 0; }

/* ---------- smartphone (il portale si usa anche dal telefono in aula) ---------- */
@media (max-width: 720px) {
  main { padding: 14px 12px 64px; }
  .utente .nome-utente { display: none; }
  table.adattiva thead { display: none; }
  table.adattiva tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  table.adattiva td { display: flex; justify-content: space-between; gap: 10px; border: 0; padding: 4px 6px; }
  table.adattiva td::before { content: attr(data-l); font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; }
  .segmento { grid-template-columns: 1fr; }
}
body.menu-ridotto .laterale .esci span { display: none; }
body.menu-ridotto .laterale .esci a { justify-content: center; }
td .mono { white-space: nowrap; }
