@font-face { font-family: "Urbanist"; font-style: normal; font-weight: 500 700; font-display: swap; src: url("fonts/Urbanist.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/IBMPlexMono-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/IBMPlexMono-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans Condensed"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/IBMPlexSansCondensed-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans Condensed"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/IBMPlexSansCondensed-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/IBMPlexSansCondensed-600.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/IBMPlexSansCondensed-700.woff2") format("woff2"); }
/* Quadro: pannello come un centralino. Bianco e grafite, spie con forma e colore.
   Scala spazi: 4 / 8 / 12 / 16 / 24. Scala testo: 11 / 12 / 13 / 14 / 20 / 40. */
:root {
  --grafite: #245232;
  --grafite-2: #2f6741;
  --grafite-3: #4f7a5c;
  --testo: #252525;
  --muto: #545b56;
  --riga: #dfe5e0;
  --riga-forte: #245232;
  --fondo: #ffffff;
  --fondo-2: #f7f7f7;
  --fondo-3: #ddefdc;
  --verde: #037a01;
  --ruggine: #a8430f;
  --blu: #125aa8;
  --rosso: #bd1a2b;
  --ambra: #875800;
  --sans: "IBM Plex Sans Condensed", "Arial Narrow", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --cut: #fff;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font: 400 14px/20px var(--sans);
  color: var(--testo);
  background: var(--fondo);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-variant-numeric: tabular-nums;
}
a { color: inherit; }
button, select, input { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.n, time { font-family: var(--mono); font-size: 12.5px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.muto { color: var(--muto); }
.forte { font-weight: 600; }
main { flex: 1; display: flex; flex-direction: column; }

/* ---------- Spie ---------- */
.l {
  display: inline-block; flex: none; position: relative;
  width: 12px; height: 12px; vertical-align: -1px;
}
.l.disp, .l.ok { color: var(--verde); background: currentColor; border-radius: 50%; }
.l.ass { color: var(--ruggine); background: currentColor; }
.l.tras { color: var(--blu); background: currentColor; clip-path: polygon(6% 0, 100% 50%, 6% 100%); }
.l.dnd { color: var(--rosso); background: currentColor; border-radius: 50%; }
.l.dnd::after { content: ""; position: absolute; left: 2px; right: 2px; top: 5px; height: 2px; background: var(--cut); }
.l.pausa { color: var(--ambra); border: 2px solid currentColor; border-radius: 50%; background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.l.fuori { color: var(--grafite); border: 2px solid currentColor; transform: rotate(45deg) scale(.84); }
.l.spenta { color: #6b7178; background: linear-gradient(currentColor, currentColor) center / 10px 2px no-repeat; }
.l.err { width: 14px; height: 13px; color: var(--rosso); background: currentColor; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.l.err::after { content: ""; position: absolute; left: 6px; top: 4px; width: 2px; height: 5px; background: var(--cut); box-shadow: 0 6px 0 0 var(--cut); height: 4px; }
.l.cfg { color: var(--ambra); border: 2px solid currentColor; background: linear-gradient(135deg, transparent 42%, currentColor 42% 58%, transparent 58%); }
.l.prev { width: 13px; height: 13px; color: var(--muto); border: 2px dotted currentColor; border-radius: 50%; }
.l.prog { color: var(--ruggine); border: 2px solid currentColor; }
.l.fix { color: var(--ambra); background: currentColor; transform: rotate(45deg) scale(.8); }

/* ---------- Barra in alto: una sola riga, niente barra laterale ---------- */
.testa {
  display: flex; align-items: stretch; height: 40px; flex: none;
  background: var(--grafite); color: #fff;
  --verde: #39dfaa; --rosso: #ff8a7d; --ambra: #e8b04a; --muto: #cfe0d3; --cut: var(--grafite);
}
.marchio { display: flex; align-items: center; padding: 0 16px; font-weight: 700; font-size: 15px; letter-spacing: .1em; }
.testa nav { display: flex; }
.schede { display: flex; align-items: stretch; list-style: none; margin: 0; padding: 0; }
.schede li { display: flex; }
.schede a {
  display: flex; align-items: center; gap: 8px; padding: 0 16px;
  color: #e6f0e8; text-decoration: none; font-weight: 500;
  border-left: 1px solid var(--grafite-2);
}
.schede li:last-child a { border-right: 1px solid var(--grafite-2); }
.schede a[aria-current] { background: var(--fondo); color: var(--testo); font-weight: 600; box-shadow: inset 0 3px 0 0 #39dfaa; }
.testa-dx { margin-left: auto; display: flex; align-items: center; gap: 16px; padding-right: 16px; }
.testa-dx time { color: #fff; font-size: 13px; }
.chi { display: flex; align-items: baseline; gap: 8px; padding-left: 16px; border-left: 1px solid var(--grafite-3); }
.chi span { color: #cfe0d3; font-size: 13px; }
.testa-dx a { color: #e6f0e8; font-size: 13px; }

/* ---------- Avviso calmo ---------- */
.avviso {
  display: flex; align-items: center; gap: 12px; padding: 8px 16px; flex: none;
  background: #fbf3f1; border-bottom: 1px solid #e7cfc9; box-shadow: inset 4px 0 0 var(--rosso);
}
.avviso a { margin-left: auto; font-weight: 500; white-space: nowrap; }

/* ---------- Contatori ---------- */
.contatori { display: flex; flex: none; border-bottom: 2px solid var(--riga-forte); }
.contatori > div {
  flex: 1 1 0; display: flex; align-items: baseline; gap: 8px; padding: 8px 16px;
  border-left: 1px solid var(--riga); white-space: nowrap;
}
.contatori > div:first-child { border-left: 0; }
.contatori b { font: 500 20px/24px var(--mono); letter-spacing: -.02em; }
.contatori span { font-size: 13px; color: var(--muto); }
.contatori .largo { flex: 2.1 1 0; }
.contatori .l { align-self: center; }

/* ---------- Tabelle ---------- */
table { border-collapse: collapse; width: 100%; table-layout: fixed; }
th { font-weight: 500; text-align: left; }
.etich { font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
td, th { padding: 0 8px; vertical-align: middle; }
td:first-child, th:first-child { padding-left: 16px; }
tbody tr { border-bottom: 1px solid var(--riga); }
.piano { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cella { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.sep { border-left: 2px solid var(--riga-forte); }

/* Matrice di Oggi */
.matrice { flex: none; }
.matrice tbody tr { height: 30px; }
.matrice td { font-size: 13.5px; }
.matrice td.piano { line-height: 29px; }
.gruppi th { height: 26px; background: var(--grafite); color: #fff; --verde: #39dfaa; --rosso: #ff8a7d; --muto: #cfe0d3; --cut: var(--grafite); }
.gruppi th + th { border-left: 2px solid #fff; }
.gruppi small { font-size: 12px; font-weight: 400; color: #cfe0d3; letter-spacing: 0; text-transform: none; }
.colonne th { height: 24px; font-size: 12.5px; color: var(--muto); background: var(--fondo-2); border-bottom: 1px solid var(--riga-forte); white-space: nowrap; overflow: hidden; }
.via td { background: var(--fondo-2); }
.via td.nome { font-weight: 600; }
.nome { font-weight: 500; }
.tratteggio {
  background: repeating-linear-gradient(135deg, #eef0f2 0 4px, #fff 4px 8px);
  color: var(--muto); font-size: 12px; line-height: 16px; text-align: center; padding: 0 4px;
}
.piu {
  border-left: 1px dashed var(--grafite-3); padding: 0; text-align: center; color: var(--muto);
  font-size: 12px; writing-mode: vertical-rl; letter-spacing: .04em;
}
.gruppi th.piu-t { padding: 0; text-align: center; background: var(--fondo-2); color: var(--testo); border-left: 1px dashed var(--grafite-3); font: 500 16px/24px var(--mono); }
.colonne th.piu-t { padding: 0; border-left: 1px dashed var(--grafite-3); }
.piu a { text-decoration: none; }

.legenda {
  display: flex; align-items: center; gap: 16px; padding: 4px 16px; flex: none; font-size: 12.5px;
  border-bottom: 2px solid var(--riga-forte); color: var(--muto); white-space: nowrap;
}
.legenda span { display: inline-flex; align-items: center; gap: 4px; }
.legenda .dx { margin-left: auto; }

/* Pannelli sotto la matrice */
.pannelli { display: grid; grid-template-columns: 380px 540px 1fr; flex: 1; }
.pannello { border-left: 1px solid var(--riga); min-width: 0; }
.pannello:first-child { border-left: 0; }
.pannello > h2 { padding: 8px 16px 4px; font-size: 13px; line-height: 20px; font-weight: 600; display: flex; align-items: baseline; gap: 8px; }
.pannello > h2 b { font: 500 13px/20px var(--mono); }
.pannello > h2 small { font-size: 12.5px; font-weight: 400; color: var(--muto); margin-left: auto; }
.pannello table { font-size: 13.5px; }
.pannello tbody tr { height: 30px; }
.pannello td { white-space: nowrap; }
.pannello tbody tr:first-child { border-top: 1px solid var(--riga); }
.pannello tbody tr:last-child { border-bottom: 0; }
.sottotit td { font-size: 12px; color: var(--muto); height: 22px; background: var(--fondo-2); font-weight: 500; }
.dasist { padding: 8px 16px; border-top: 1px solid var(--riga); }
.dasist + .dasist { border-top: 1px solid var(--riga); }
.dasist .titolo { font-weight: 600; }
.dasist .riga-az { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.scelta {
  appearance: none; height: 28px; padding: 0 24px 0 8px; font-size: 13.5px; background-color: #fff; border: 1px solid var(--grafite-3); border-radius: 0;
  background-image: linear-gradient(45deg, transparent 50%, var(--grafite) 50%), linear-gradient(-45deg, transparent 50%, var(--grafite) 50%);
  background-size: 5px 5px; background-position: right 13px center, right 8px center; background-repeat: no-repeat;
}
.btn { height: 28px; padding: 0 12px; background: #fff; border: 1px solid var(--grafite); border-radius: 0; font-weight: 500; font-size: 13.5px; white-space: nowrap; }
.btn.pieno { background: var(--grafite); color: #fff; }
.btn.spento { color: var(--muto); border-color: #9aa0a6; background: var(--fondo-2); }

/* ---------- Striscia di stato in basso ---------- */
.piede {
  flex: none; margin-top: auto; display: flex; align-items: center; gap: 16px; height: 28px; padding: 0 16px;
  background: var(--fondo-2); border-top: 1px solid var(--riga-forte); font-size: 12.5px; color: var(--muto); white-space: nowrap;
}
.piede span { display: inline-flex; align-items: center; gap: 4px; }
.piede .dx { margin-left: auto; }

/* ---------- Interni ---------- */
.strumenti {
  display: flex; align-items: center; gap: 8px; padding: 8px 16px; flex: none;
  border-bottom: 1px solid var(--riga);
}
.cerca { width: 280px; height: 32px; padding: 0 8px; border: 1px solid var(--grafite-3); border-radius: 0; background: #fff; }
.cerca::placeholder { color: var(--muto); }
.filtri { display: flex; margin-left: 8px; }
.filtri a {
  display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; text-decoration: none; white-space: nowrap;
  border: 1px solid var(--riga); border-left-width: 0; font-size: 13.5px;
}
.filtri a:first-child { border-left-width: 1px; }
.filtri a b { font: 500 12.5px var(--mono); color: var(--muto); }
.filtri a[aria-current] { background: var(--grafite); border-color: var(--grafite); color: #fff; font-weight: 600; }
.filtri a[aria-current] b { color: #fff; }
.strumenti .dx { margin-left: auto; color: var(--muto); font-size: 13px; white-space: nowrap; }

.massa {
  display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 16px; flex: none;
  background: var(--grafite); color: #fff; white-space: nowrap;
  --verde: #39dfaa; --cut: var(--grafite);
}
.massa b { font-weight: 600; }
.massa .chi-sel { color: #e6f0e8; }
.massa .tasti { display: flex; margin-left: auto; align-items: center; gap: 0; }
.massa .tasti > span { margin-right: 8px; color: #e6f0e8; }
.massa .tasti button {
  display: flex; align-items: center; gap: 4px; height: 30px; padding: 0 12px; background: #fff; color: var(--testo); border: 0; border-left: 1px solid var(--riga); font-size: 13.5px; font-weight: 500; white-space: nowrap;
  --verde: #12793a; --cut: #fff;
}
.massa .tasti button .l.fuori { color: var(--grafite); }
.massa .annulla { background: none; border: 1px solid #8fb39a; color: #fff; height: 30px; padding: 0 12px; margin-left: 12px; font-size: 13.5px; }

.quadro th.stato-t { text-align: center; padding: 0 4px; border-left: 1px solid var(--riga); font-size: 12.5px; }
.quadro th.stato-t span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.quadro .gruppo-t th { height: 24px; background: var(--fondo-2); color: var(--muto); }
.quadro .colonne th { color: var(--testo); font-weight: 500; }
.quadro tbody tr { height: 36px; }
.quadro th.clic-t { text-align: center; border-left: 1px solid var(--riga); color: var(--testo); font-weight: 600; }
.quadro td { font-size: 14px; }
.quadro tr.sel td { background: #ddefdc; }
.quadro input[type=checkbox] { width: 16px; height: 16px; margin: 0; accent-color: var(--grafite); display: block; }
td.k { padding: 0; border-left: 1px solid var(--riga); height: 36px; }
.key {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 35px;
  border: 0; background: transparent; padding: 0; font-size: 13.5px; white-space: nowrap;
  cursor: pointer; position: relative;
}
.key:not(.on) .l { color: #8fb39a; --cut: #fff; }
.key.on { background: var(--kc); color: #fff; font-weight: 600; }
.key.on .l { color: #fff; --cut: var(--kc); }
.key.disp { --kc: var(--verde); }
.key.ass { --kc: var(--ruggine); }
.key.tras { --kc: var(--blu); }
.key.dnd { --kc: var(--rosso); }
.key.pausa { --kc: var(--ambra); }
.key.fuori { --kc: var(--grafite); }
.key.hov { background: #fff; box-shadow: inset 0 0 0 2px var(--kc); color: var(--kc); font-weight: 600; }
.key.hov .l { color: var(--kc); --cut: #fff; }
.key .puntatore { position: absolute; right: 14px; bottom: -6px; width: 14px; height: 18px; z-index: 2; }
tfoot td { height: 24px; font-size: 13px; }
tfoot tr { border-bottom: 1px solid var(--riga); }
tfoot .conta { text-align: center; border-left: 1px solid var(--riga); font-family: var(--mono); font-size: 12.5px; padding: 0; }
tfoot .capo td { background: var(--fondo-2); font-size: 12.5px; color: var(--muto); border-top: 2px solid var(--riga-forte); }
tfoot .tot td { font-weight: 600; background: var(--fondo-2); border-top: 1px solid var(--riga-forte); }
tfoot .tot .conta { font-weight: 600; }
.vuoto { color: #6b7178; }

/* ---------- Moduli ---------- */
.telaio { background: var(--grafite); padding: 12px 16px 16px; flex: none; color: #fff;
  --verde: #39dfaa; --rosso: #ff8a7d; --ambra: #e8b04a; --muto: #cfe0d3; --cut: var(--grafite-2); }
.telaio h2 { font-size: 13px; line-height: 20px; font-weight: 600; margin-bottom: 8px; display: flex; gap: 8px; }
.telaio h2 span { font-weight: 400; color: #cfe0d3; }
.slot-fila { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.slot { background: var(--grafite-2); padding: 8px 12px; min-height: 92px; display: flex; flex-direction: column; gap: 2px; min-width: 0; border-top: 3px solid var(--grafite-3); }
.slot.s-ok { border-top-color: #39dfaa; }
.slot.s-err { border-top-color: #ff8a7d; }
.slot.s-cfg { border-top-color: #e8b04a; }
.slot.s-prev { border-top-color: #cfe0d3; }
.slot .sopra { display: flex; align-items: center; justify-content: space-between; color: #cfe0d3; }
.slot .sopra .n { color: #cfe0d3; }
.slot b { font-weight: 600; font-size: 14px; line-height: 18px; }
.slot small { font-size: 12.5px; line-height: 16px; color: #e6f0e8; }
.slot.libero { background: transparent; border: 1px dashed #8fb39a; border-top: 3px dashed #8fb39a; color: #e6f0e8; }
.slot.libero b { font-weight: 500; }

.catalogo { flex: none; }
.catalogo thead th { height: 28px; background: var(--fondo-2); color: var(--muto); font-size: 12.5px; border-bottom: 1px solid var(--riga-forte); }
.catalogo tbody td { padding-top: 16px; padding-bottom: 16px; vertical-align: top; }
.catalogo .nome-mod { font-weight: 600; font-size: 15px; line-height: 20px; }
.catalogo .fonte { color: var(--muto); font-size: 13px; }
.catalogo .stato-m { display: flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; }
.etichetta { display: inline-block; margin-left: 4px; padding: 0 4px; border: 1px solid var(--ambra); color: var(--ambra); font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; vertical-align: 1px; }
.catalogo tr.errore td { background: #fbf3f1; }
.catalogo tr.errore .stato-m { color: var(--rosso); }
.catalogo tr.previsto td { background: var(--fondo-2); }
.catalogo tr.libero-r td { padding-top: 8px; padding-bottom: 8px; border-top: 1px dashed var(--grafite-3); }
.catalogo .az { text-align: right; padding-right: 16px; }
.collega { font-weight: 500; }
.aggiungi { display: grid; grid-template-columns: 288px repeat(3, 1fr); flex: none; border-top: 2px solid var(--riga-forte); }
.aggiungi > div { padding: 12px 16px; border-left: 1px solid var(--riga); }
.aggiungi > div:first-child { border-left: 0; }
.aggiungi h2 { font-size: 15px; line-height: 20px; font-weight: 600; }
.aggiungi .n { display: inline-block; width: 16px; color: var(--muto); }
.aggiungi p { font-size: 13.5px; margin-left: 16px; }
.aggiungi div:first-child p { margin-left: 0; }

/* ---------- Utenti ---------- */
.fascia {
  display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; flex: none; border-bottom: 2px solid var(--riga-forte);
}
.fascia h2 { font-size: 15px; line-height: 20px; font-weight: 600; }
.fascia .n-tit { font: 500 13px/20px var(--mono); color: var(--muto); }
.fascia .dx { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.fascia.dopo { margin-top: 16px; border-top: 1px solid var(--riga); }
.utenti thead th, .ruoli thead th { height: 28px; background: var(--fondo-2); color: var(--muto); font-size: 12.5px; border-bottom: 1px solid var(--riga); }
.utenti tbody tr { height: 36px; }
.ruoli tbody tr { height: 36px; }
.ruoli tbody td { padding-left: 8px; }
.ruoli tbody td.mod { padding-left: 16px; }
.ruoli thead th.ruolo { color: var(--testo); font-weight: 600; font-size: 14px; height: auto; padding-top: 8px; padding-bottom: 8px; line-height: 18px; border-left: 1px solid var(--riga); }
.ruoli thead th.ruolo small { display: block; font-weight: 400; color: var(--muto); font-size: 12.5px; line-height: 16px; }
.ruoli td.v { border-left: 1px solid var(--riga); }
.ruoli td.mod { font-weight: 600; border-right: 1px solid var(--riga); vertical-align: top; padding-top: 8px; }
.ruoli .mio { background: #ddefdc; }
.ruoli thead th.mio { background: #c9e6c8; }
.ruoli tbody tr.gruppo-fine { border-bottom: 1px solid var(--grafite-3); }
.ruoli tr.spenta td { background: repeating-linear-gradient(135deg, #e9ebee 0 4px, #f1f2f4 4px 8px); color: var(--muto); }
.ruoli tr.spenta td.mod { font-weight: 500; }
.val { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.p { display: inline-block; width: 12px; height: 12px; flex: none; position: relative; color: var(--grafite); }
.p.tutti { background: currentColor; border-radius: 50%; }
.p.rep { border: 2px solid currentColor; border-radius: 50%; background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.p.se { border: 2px solid currentColor; border-radius: 50%; }
.p.se::after { content: ""; position: absolute; left: 2px; top: 2px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.p.si::after { content: ""; position: absolute; left: 3px; top: 0; width: 5px; height: 10px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(40deg); }
.p.no { color: #6b7178; background: linear-gradient(currentColor, currentColor) center / 8px 2px no-repeat; }
.val.niente { color: var(--muto); }
.tuo { display: inline-block; font-size: 12px; font-weight: 500; color: var(--muto); }

/* ---------- Telefono ---------- */
body.tel { font-size: 15px; line-height: 22px; }
.tel .testa { height: 48px; }
.tel .marchio { padding: 0 16px; }
.tel .testa-dx { gap: 12px; }
.tel .testa-dx b { font-weight: 500; font-size: 14px; }
.tel .schede-t { display: grid; grid-template-columns: repeat(3, 1fr); list-style: none; margin: 0; padding: 0; flex: none; background: var(--grafite); border-bottom: 2px solid var(--grafite); }
.tel .schede-t a { display: flex; align-items: center; justify-content: center; height: 44px; text-decoration: none; font-weight: 500; color: #e6f0e8; border-left: 1px solid var(--grafite-2); }
.tel .schede-t li:first-child a { border-left: 0; }
.tel .schede-t a[aria-current] { background: var(--fondo); color: var(--testo); font-weight: 600; box-shadow: inset 0 3px 0 0 #39dfaa; }
.tel .quando { display: flex; justify-content: space-between; padding: 8px 16px; color: var(--muto); font-size: 13px; border-bottom: 1px solid var(--riga); }
.tel .quando time { font-size: 13px; }
.tel section { padding: 16px; }
.tel section + section { border-top: 2px solid var(--riga-forte); }
.tel .tit-sez { color: var(--muto); margin-bottom: 8px; }
.int-capo { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.int-capo .num { font: 500 40px/44px var(--mono); letter-spacing: -.03em; }
.int-capo .ch { font-size: 14px; line-height: 20px; }
.int-capo .ch b { display: block; font-size: 15px; font-weight: 600; }
.griglia-stati { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--riga); border: 1px solid var(--riga); }
.griglia-stati .key { height: 56px; justify-content: flex-start; padding: 0 12px; background: #fff; font-size: 15px; color: var(--testo); font-weight: 500; }
.griglia-stati .key:not(.on) .l { color: inherit; }
.griglia-stati .key.disp:not(.on) .l { color: var(--verde); }
.griglia-stati .key.ass:not(.on) .l { color: var(--ruggine); }
.griglia-stati .key.tras:not(.on) .l { color: var(--blu); }
.griglia-stati .key.dnd:not(.on) .l { color: var(--rosso); }
.griglia-stati .key.pausa:not(.on) .l { color: var(--ambra); }
.griglia-stati .key.fuori:not(.on) .l { color: var(--grafite); }
.griglia-stati .key.on { background: var(--kc); color: #fff; font-weight: 600; }
.griglia-stati .key .l { width: 14px; height: 14px; }
.griglia-stati .key.dnd .l::after { top: 6px; }
.tel .nota { margin-top: 8px; font-size: 13px; line-height: 18px; color: var(--muto); }
.tel .mail { font-size: 14px; color: var(--muto); margin-bottom: 8px; word-break: break-all; }
.riga-tel { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--riga); }
.riga-tel .testo { flex: 1; min-width: 0; }
.riga-tel .testo b { display: block; font-weight: 600; }
.riga-tel .testo span { display: block; font-size: 14px; line-height: 20px; color: var(--muto); }
.riga-tel:last-child { padding-bottom: 0; }
.interruttore { position: relative; display: inline-block; width: 56px; height: 32px; flex: none; }
.interruttore input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.interruttore .pista { position: absolute; inset: 0; background: #fff; border: 2px solid var(--grafite-3); }
.interruttore .pomo { position: absolute; top: 6px; left: 6px; width: 20px; height: 20px; background: var(--grafite-3); }
.interruttore input:checked ~ .pista { background: var(--verde); border-color: var(--verde); }
.interruttore input:checked ~ .pomo { left: 30px; background: #fff; }
.non-disp { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 500; color: var(--muto); white-space: nowrap; }
.riga-tel.a-capo { flex-wrap: wrap; }
.riga-tel.a-capo p { flex-basis: 100%; font-size: 14px; line-height: 20px; color: var(--muto); margin: 0; }

/* Spiegazione dei simboli sotto la tabella dei ruoli */
.spiega { display: grid; grid-template-columns: repeat(5, 1fr); flex: none; border-top: 2px solid var(--riga-forte); font-size: 13.5px; color: var(--muto); }
.spiega > div { padding: 8px 16px; border-left: 1px solid var(--riga); }
.spiega > div:first-child { border-left: 0; }
.spiega .val { color: var(--testo); margin-bottom: 0; }

/* ---------- Aggiunte per il pannello vero ---------- */
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #049901; outline-offset: 1px; }
.vista { flex: 1; display: flex; flex-direction: column; outline: none; min-width: 0; }
.scorre { overflow-x: auto; flex: none; }
.scorre table { table-layout: auto; }
.matrice .gruppi th, .matrice .colonne th, .matrice td { white-space: nowrap; }
.matrice td .sotto { color: var(--muto); margin-left: 4px; }
.matrice a.mod-link { color: inherit; text-decoration: none; }
.matrice td.piu-c { width: 34px; }
.matrice td.prev-c { width: 72px; white-space: normal; }
.matrice .col-persona { position: sticky; background: #fff; z-index: 1; }
.fascia.striscia { min-height: 40px; }
.banner { flex: none; padding: 6px 16px; font-size: 13px; border-bottom: 1px solid var(--riga); }
.banner.demo { background: #ddefdc; color: #245232; }
.banner.prova { background: #fff7e0; color: #6d4700; }
.banner a { font-weight: 600; margin-left: 8px; color: inherit; }
.avviso .testo { min-width: 0; }
.vuoto-riga { padding: 16px; color: var(--muto); }
.nota-box { margin: 12px 16px; padding: 8px 12px; background: var(--fondo-2); border-left: 4px solid var(--grafite-3); }
.nota-box.err { background: #fbf3f1; border-left-color: var(--rosso); }
.nota-box.warn { background: #fff7e0; border-left-color: var(--ambra); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 0 6px; border: 1px solid var(--riga); font-size: 12px; line-height: 18px; white-space: nowrap; color: var(--muto); background: #fff; }
.chip.err { color: var(--rosso); border-color: var(--rosso); }
.chip.warn { color: var(--ambra); border-color: var(--ambra); }
.chip.forte { color: var(--testo); border-color: var(--grafite-3); }
.collega-btn { background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; font-weight: 500; }
.btn { cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: var(--testo); }
.btn.pieno { color: #fff; }
.btn.pericolo { color: var(--rosso); border-color: var(--rosso); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.pannello .riga { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 8px 16px; border-top: 1px solid var(--riga); }
.pannello .riga .blocco { flex: 1 1 220px; min-width: 0; }
.pannello .riga .titolo { font-weight: 600; display: block; }
.pannello td.f { font-weight: 600; }
.contatori a { color: inherit; text-decoration: none; }
.contatori .attenzione b { color: var(--ambra); }
.contatori > * { flex: 1 1 0; display: flex; align-items: baseline; gap: 8px; padding: 8px 16px; border-left: 1px solid var(--riga); white-space: nowrap; min-width: 0; }
.contatori > *:first-child { border-left: 0; }
.contatori .largo span { white-space: normal; }
.contatori { flex-wrap: wrap; }
.tab-semplice { width: 100%; table-layout: auto; }
.tab-semplice thead th { height: 28px; background: var(--fondo-2); color: var(--muto); font-size: 12.5px; border-bottom: 1px solid var(--riga-forte); white-space: nowrap; }
.tab-semplice tbody tr { min-height: 36px; }
.tab-semplice td { padding-top: 7px; padding-bottom: 7px; }
.tab-semplice td:last-child, .tab-semplice th:last-child { padding-right: 16px; }
.dx-t { text-align: right; }
td .sub, .sub { display: block; color: var(--muto); font-size: 12.5px; line-height: 16px; }
.q-sel { display: none; }
.interruttore { background: none; border: 0; padding: 0; cursor: pointer; }
.interruttore .pista { position: absolute; inset: 0; background: #fff; border: 2px solid var(--grafite-3); }
.interruttore .pomo { position: absolute; top: 6px; left: 6px; width: 20px; height: 20px; background: var(--grafite-3); transition: left .1s; }
.interruttore[aria-checked="true"] .pista { background: var(--verde); border-color: var(--verde); }
.interruttore[aria-checked="true"] .pomo { left: 30px; background: #fff; }
.interruttore:disabled { cursor: not-allowed; opacity: .45; }
.interruttore.piccolo { width: 44px; height: 24px; }
.interruttore.piccolo .pomo { top: 5px; left: 5px; width: 14px; height: 14px; }
.interruttore.piccolo[aria-checked="true"] .pomo { left: 25px; }
.casella { display: flex; align-items: flex-start; gap: 10px; }
.casella .chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.griglia-stati .key:disabled { opacity: .6; }
.personale { max-width: 620px; width: 100%; }
.personale section { padding: 16px; }
.personale section + section { border-top: 2px solid var(--riga-forte); }
.personale .quando { display: flex; justify-content: space-between; padding: 8px 16px; color: var(--muto); font-size: 13px; border-bottom: 1px solid var(--riga); }
.personale .tit-sez { color: var(--muto); margin-bottom: 8px; }
.personale .nota { margin-top: 8px; font-size: 13px; line-height: 18px; color: var(--muto); }
.personale .mail { font-size: 14px; color: var(--muto); margin-bottom: 8px; word-break: break-all; }
.moduli-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 16px; padding: 12px 16px; background: var(--fondo-2); }
.campo { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.campo > span { font-weight: 600; font-size: 13px; }
.campo input, .campo select, .campo textarea { height: 32px; padding: 0 8px; border: 1px solid var(--grafite-3); border-radius: 0; background: #fff; width: 100%; }
.campo textarea { height: auto; min-height: 118px; padding: 6px 8px; line-height: 20px; resize: vertical; }
.campo small { color: var(--muto); font-size: 12px; line-height: 16px; }
.spunta { display: flex; align-items: center; gap: 8px; }
.spunta input { width: 16px; height: 16px; margin: 0; accent-color: var(--grafite); }
.verifiche { list-style: none; margin: 0; padding: 8px 16px; display: flex; flex-direction: column; gap: 4px; background: var(--fondo-2); }
.verifiche li { display: flex; gap: 8px; align-items: baseline; }
.anteprima { background: var(--fondo-2); border: 1px solid var(--riga); padding: 6px 8px; white-space: pre-wrap; overflow-wrap: anywhere; min-height: 118px; line-height: 20px; }
.griglia-due { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; padding: 12px 16px; border-bottom: 1px solid var(--riga); }
.griglia-due h2 { grid-column: 1 / -1; font-size: 14px; font-weight: 600; }
.griglia-due .aiuto { grid-column: 1 / -1; color: var(--muto); font-size: 13px; margin-top: -6px; }
dialog { border: 1px solid var(--grafite); border-radius: 0; padding: 0; width: min(560px, calc(100vw - 24px)); color: var(--testo); }
dialog::backdrop { background: rgba(28, 31, 35, .5); }
.dlg-testa { padding: 10px 16px; background: var(--grafite); color: #fff; font-weight: 600; font-size: 15px; }
.dlg-corpo { padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; max-height: 68vh; overflow-y: auto; }
.dlg-piede { padding: 8px 16px; border-top: 1px solid var(--riga); display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; background: var(--fondo-2); }
.griglia-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 16px; }
.errore-form { margin: 0; color: var(--rosso); font-weight: 500; }
.avviso-form { margin: 0; color: var(--ambra); }
.scelte-rapide { display: flex; flex-wrap: wrap; gap: 4px; }
.scelte-rapide .btn { height: 26px; padding: 0 8px; font-size: 12.5px; }
.messaggi { position: fixed; right: 16px; bottom: 40px; z-index: 60; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.messaggio { padding: 8px 12px; background: var(--grafite); color: #fff; border-left: 4px solid #39dfaa; }
.messaggio.err { border-left-color: #ff8a7d; }
.piede .demo-p { margin-left: auto; }
@media (max-width: 1180px) {
  .testa { height: auto; flex-wrap: wrap; }
  .testa nav { order: 3; width: 100%; overflow-x: auto; border-top: 1px solid var(--grafite-2); }
  .schede a { height: 40px; white-space: nowrap; }
  .testa-dx { min-height: 40px; }
  .q-tasto { display: none; }
  .q-sel { display: table-cell; }
  .strumenti, .massa { flex-wrap: wrap; height: auto; padding-top: 8px; padding-bottom: 8px; }
  .massa .tasti { margin-left: 0; flex-wrap: wrap; gap: 4px; }
  .filtri { flex-wrap: wrap; margin-left: 0; }
  .slot-fila { grid-template-columns: repeat(4, 1fr); }
  .aggiungi { grid-template-columns: 1fr 1fr; }
  .pannelli { grid-template-columns: minmax(0, 1fr) !important; }
  .pannello { border-left: 0; border-top: 1px solid var(--riga-forte); overflow-x: auto; }
}
@media (max-width: 640px) {
  .chi span, .testa-dx time { display: none; }
  .chi { border-left: 0; padding-left: 0; }
  .cerca { width: 100%; }
  .slot-fila { grid-template-columns: repeat(2, 1fr); }
  .aggiungi, .griglia-due { grid-template-columns: minmax(0, 1fr); }
  .col-stretta { display: none; }
  .griglia-stati .key { min-height: 56px; }
  .contatori > * { flex: 1 1 40%; border-bottom: 1px solid var(--riga); }
  .contatori .largo { flex-basis: 100%; }
  .piede { flex-wrap: wrap; height: auto; padding: 4px 16px; white-space: normal; }
  .legenda { flex-wrap: wrap; white-space: normal; }
  .tab-impilata thead { display: none; }
  .tab-impilata, .tab-impilata tbody, .tab-impilata tr, .tab-impilata td { display: block; width: 100%; }
  .tab-impilata tr { padding: 8px 0; }
  .tab-impilata td { padding: 4px 16px !important; }
  .tab-impilata td[data-etichetta]::before { content: attr(data-etichetta); display: block; font-size: 12px; color: var(--muto); margin-bottom: 2px; }
}

/* Rifiniture dopo il collaudo */
textarea { font: inherit; color: inherit; }
.pannelli { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.pannello { overflow-x: auto; }
.pannello table { table-layout: auto; }
.pannello td { white-space: normal; }
.pannello td:first-child { white-space: nowrap; }
.pannello td:nth-child(2), .pannello td:nth-child(3) { white-space: nowrap; }
.quadro .q-tasto { width: 10.5%; }
.catalogo .az { white-space: nowrap; }
.catalogo .az .collega-btn { margin-right: 12px; }
.moduli-form > p { grid-column: 1 / -1; margin: 0; }
.toolbar-mod { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; grid-column: 1 / -1; }
td.nessun-pad { padding: 0 !important; }
@media (max-width: 640px) {
  .spiega { grid-template-columns: minmax(0, 1fr); }
  .fascia { flex-wrap: wrap; }
  .fascia .dx { margin-left: 0; }
  .pannelli { grid-template-columns: minmax(0, 1fr); }
  .pannello td:nth-child(2), .pannello td:nth-child(3) { white-space: normal; }
}

/* Colori e pagina di accesso dal sito istituzionale */
.marchio { background: #fff; color: #049901; font-family: "Urbanist", var(--sans); font-weight: 700; font-size: 19px; letter-spacing: .06em; text-decoration: none; }
.marchio img { display: block; height: 26px; width: auto; }
.btn.pieno { background: var(--grafite); border-color: var(--grafite); }
.btn.pieno:hover { background: #049901; border-color: #049901; }
.etichetta { color: var(--grafite); border-color: var(--grafite); }
body.accesso { min-height: 100vh; display: flex; flex-direction: column; background: #f7f7f7; font-family: "Urbanist", var(--sans); font-size: 16px; line-height: 24px; color: #252525; }
.acc-testa { flex: none; display: flex; align-items: center; height: 76px; padding: 0 clamp(16px, 5vw, 64px); background: #fff; box-shadow: 0 1px 0 #e6e9e6; }
.acc-testa img { display: block; height: 38px; width: auto; }
.acc-testa .parola { color: #049901; font-weight: 700; font-size: 28px; letter-spacing: .06em; }
.acc-corpo { flex: 1; display: grid; place-items: center; padding: 32px 16px; background: linear-gradient(180deg, #245232 0 220px, #f7f7f7 220px); }
.accesso-box { width: min(440px, 100%); background: #fff; border-radius: 16px; box-shadow: 0 12px 36px rgba(36, 82, 50, .18); padding: 36px clamp(20px, 6vw, 40px); }
.accesso-box h1 { font-size: 30px; line-height: 36px; font-weight: 600; color: #245232; }
.accesso-box .sotto { margin: 4px 0 24px; color: #545b56; }
.accesso-box form { display: flex; flex-direction: column; gap: 16px; }
.accesso-box .campo > span { font-size: 15px; font-weight: 600; color: #252525; }
.accesso-box .campo input { height: 46px; padding: 0 14px; border: 1px solid #b9c7bd; border-radius: 8px; font-size: 16px; font-family: inherit; }
.accesso-box .campo input:focus { border-color: #049901; outline: 2px solid #ddefdc; outline-offset: 0; }
.accesso-box .campo small { font-size: 13px; }
.btn-accesso { height: 52px; margin-top: 8px; border: 0; border-radius: 50px; background: #049901; color: #fff; font: 700 19px/1 "Urbanist", var(--sans); cursor: pointer; transition: background .15s; }
.btn-accesso:hover { background: #245232; }
.btn-accesso:disabled { opacity: .6; cursor: not-allowed; }
.accesso-box .nota { margin: 16px 0 0; color: #545b56; font-size: 14px; }
.accesso-box a { color: #037a01; }
.acc-piede { flex: none; padding: 14px clamp(16px, 5vw, 64px); background: #245232; color: #e6f0e8; font-size: 14px; }
