/* Stile «tradizione venatoria» (come l'app dei conduttori): loden, carta, ottone, rosso Schweiss */
@font-face { font-family: 'Barlow Semi Condensed'; font-weight: 600; font-display: swap; src: url(../fonts/barlow-semi-condensed-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow Semi Condensed'; font-weight: 700; font-display: swap; src: url(../fonts/barlow-semi-condensed-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 400; font-display: swap; src: url(../fonts/barlow-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 600; font-display: swap; src: url(../fonts/barlow-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 700; font-display: swap; src: url(../fonts/barlow-latin-700-normal.woff2) format('woff2'); }
:root { --loden:#33402D; --bosco:#1F2A1B; --bg:#F4EFE3; --surface:#FFFDF7; --line:#D8CDB4; --ink:#1C1C16; --soft:#4A473B;
  --ottone:#A8813A; --ottone2:#C9A55C; --sangue:#7E2419; --sangue-chiaro:#F6E6E1; --verde:#3D6B35; --verde-chiaro:#E5EBD9;
  --attesa:#B7791F; --grigio:#8A8473; --serif:'Barlow Semi Condensed', 'Barlow', system-ui, sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.5 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif; }
[hidden] { display: none !important; }
svg.i { width: 1.15em; height: 1.15em; fill: currentColor; vertical-align: -.2em; flex: none; }

/* intestazione */
.top { background: var(--loden); color: var(--bg); display: flex; align-items: center; gap: 14px; padding: 8px 20px; flex-wrap: wrap; border-bottom: 4px double var(--ottone); }
.logo { width: 48px; height: 48px; background: #fff; border-radius: 50%; padding: 2px; box-shadow: 0 0 0 2px var(--ottone2); }
.tit { display: flex; flex-direction: column; line-height: 1.1; }
.tit b { font-family: var(--serif); font-size: 28px; font-weight: 700; letter-spacing: .3px; }
.tit small { font-size: 14px; opacity: .95; margin-top: 2px; } #ver { color: var(--ottone2); margin-left: 6px; }
.ver-nuovo { display: inline-block; margin-left: 6px; background: var(--ottone2); color: var(--bosco); font-size: 11px; font-weight: 700; padding: 0 7px; border-radius: 3px; }
#ver.lampeggia { animation: lampeggio .8s ease-in-out 6; }
@keyframes lampeggio { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
#tabs { display: flex; gap: 26px; margin-left: 30px; }
#tabs button { background: none; border: 0; color: var(--bg); font: inherit; font-size: 15.5px; text-transform: uppercase; letter-spacing: .8px; padding: 8px 0 6px; opacity: .9; cursor: pointer; border-bottom: 3px solid transparent; display: flex; align-items: center; gap: 7px; }
#tabs button svg.i { width: 23px; height: 23px; color: var(--ottone2); }
#tabs button.on { opacity: 1; font-weight: 700; border-bottom-color: var(--ottone2); }
.top-az { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 15px; }
.top-az #utente { display: flex; align-items: center; gap: 5px; opacity: .9; }

main { padding: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 12px 16px; margin-bottom: 12px; }
.centro { max-width: 420px; margin: 44px auto; text-align: center; } .centro form, .centro .note { text-align: left; }
.logo-grande { width: 112px; background: #fff; border-radius: 50%; padding: 3px; box-shadow: 0 0 0 3px var(--ottone); margin: 4px 0 10px; }
h1 { margin: 0 0 4px; color: var(--bosco); font-family: var(--serif); font-size: 30px; font-weight: 700; }
h2 { font-family: var(--serif); font-size: 25px; font-weight: 700; color: var(--bosco); margin: 0 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
h2 small { font-family: 'Barlow', sans-serif; font-weight: 400; font-size: 15px; }
.piccolo { color: var(--soft); font-size: 15px; }
.lbl { display: block; margin: 10px 0; font-size: 14px; color: var(--soft); text-transform: uppercase; letter-spacing: .6px; }
.lbl input, .lbl select, .lbl textarea { display: block; width: 100%; margin-top: 4px; text-transform: none; letter-spacing: 0; }
input, select, textarea { font: inherit; font-size: 17px; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ottone2); outline-offset: 0; border-color: var(--ottone); }
input[type=checkbox] { width: auto; padding: 0; accent-color: var(--verde); }
.btn { font: inherit; font-size: 16px; font-weight: 600; padding: 8px 14px; border-radius: 6px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.btn svg.i { color: var(--loden); }
.btn:hover { border-color: var(--ottone); }
.btn.mini { padding: 6px 12px; font-size: 15px; }
.btn.chiaro { background: transparent; color: var(--bg); border-color: #ffffff55; } .btn.chiaro svg.i { color: var(--ottone2); }
.btn.primary { background: var(--verde); border-color: var(--verde); color: var(--bg); } .btn.primary svg.i { color: var(--bg); }
.btn.danger { color: var(--sangue); border-color: var(--sangue); }
.btn.larga { width: 100%; padding: 12px; font-size: 16px; }
.btn:disabled { opacity: .5; }
.note { background: var(--verde-chiaro); border-radius: 6px; padding: 9px 12px; font-size: 16px; } .note.err { background: var(--sangue-chiaro); color: var(--sangue); }
a { color: var(--loden); }
.crediti { text-align: center; font-size: 13px; color: var(--soft); margin: 18px 0 4px; }

/* richieste: colonna sx, mappa, colonna dx */
#vRichieste { display: grid; grid-template-columns: 300px 1fr 300px; gap: 12px; height: calc(100vh - 120px); min-height: 520px; }
.col-sx { display: flex; flex-direction: column; gap: 14px; } .col-sx .card { margin: 0; }
.col-sx, .col-dx { overflow: auto; }
.mappa-box { position: relative; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; isolation: isolate; z-index: 0; min-height: 400px; box-shadow: inset 0 0 0 3px var(--surface); }
#mappa { position: absolute; inset: 0; }
.legenda { position: absolute; left: 10px; bottom: 22px; z-index: 500; display: flex; flex-wrap: wrap; gap: 2px 18px; max-width: calc(100% - 20px); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 7px 12px; font-size: 14px; line-height: 1.7; }
.legenda .goccia { color: var(--sangue); }
.pal { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin: 0 4px 0 10px; vertical-align: -1px; box-shadow: 0 0 0 1.5px var(--ottone2); }
.pal.v { background: var(--verde); } .pal.at { background: var(--attesa); } .pal.r { background: var(--sangue); } .pal.g { background: #b9b2a0; }
.oggi .pal { margin-left: 0; }
.filtro { font-size: 15px; color: var(--soft); margin-bottom: 8px; }
.ric { border-left: 5px solid var(--grigio); padding: 8px 10px 8px 12px; border-radius: 4px; background: #fbf8f0; margin-bottom: 9px; font-size: 16px; line-height: 1.5; cursor: pointer; border-top: 1px solid #eee5d2; border-right: 1px solid #eee5d2; border-bottom: 1px solid #eee5d2; }
.ric:hover { background: #f5efe1; }
.ric b:first-of-type { font-family: var(--serif); font-size: 20px; }
.ric .s { float: right; font-size: 12.5px; font-weight: 700; letter-spacing: .6px; padding: 1px 7px; border-radius: 3px; color: var(--bg); background: var(--grigio); margin-left: 6px; }
.ric.nuova { border-left-color: var(--attesa); } .ric.nuova .s { background: var(--attesa); }
.ric.allarme { border-left-color: var(--sangue); background: var(--sangue-chiaro); } .ric.allarme .s { background: var(--sangue); }
.ric.accettata, .ric.sul_posto { border-left-color: var(--verde); } .ric.accettata .s, .ric.sul_posto .s { background: var(--verde); }
.sms { display: inline-block; border: 1px solid var(--ottone); color: #6b4f1a; border-radius: 3px; font-size: 12.5px; padding: 0 5px; text-transform: uppercase; letter-spacing: .4px; }
.vuoto { color: var(--soft); text-align: center; padding: 22px 6px; font-size: 16px; }
.vuoto svg.i { display: block; margin: 0 auto 8px; width: 34px; height: 34px; color: var(--ottone); }
.oggi { width: 100%; border-collapse: collapse; font-size: 15.5px; } .oggi td { padding: 6px 3px; border-bottom: 1px solid #eee5d2; vertical-align: top; }
/* segni sulla carta: grandi e con bordo bianco, visibili anche sulla foto aerea */
.pin-r { position: relative; width: 48px; height: 48px; cursor: pointer; }
.pin-r > span { position: absolute; inset: 4px; border-radius: 50%; background: var(--attesa); border: 3px solid #fff; box-shadow: 0 2px 6px #000a; display: grid; place-items: center; }
.pin-r svg { width: 22px; height: 22px; fill: #fff; display: block; }
.pin-r small { position: absolute; top: 44px; left: 50%; transform: translateX(-50%); background: #fff; color: var(--ink); font-size: 13px; font-weight: 700; padding: 0 5px; border-radius: 3px; box-shadow: 0 1px 3px #0007; white-space: nowrap; }
.pin-r.allarme > span { background: var(--sangue); } .pin-r.presa > span { background: var(--verde); } .pin-r.finita > span { background: var(--grigio); }
.pin-r.nuova::before, .pin-r.allarme::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--attesa); opacity: .55; animation: pin-pulsa 1.6s ease-out infinite; }
.pin-r.allarme::before { background: var(--sangue); }
@keyframes pin-pulsa { from { transform: scale(.7); opacity: .6; } to { transform: scale(1.7); opacity: 0; } }
.pin-c { display: inline-flex; align-items: center; gap: 5px; font-size: 16px; font-weight: 700; color: #fff; border-radius: 16px; padding: 4px 10px 4px 6px; box-shadow: 0 2px 5px #0009; white-space: nowrap; border: 2px solid #fff; line-height: 1.15; }
.pin-c i { width: 14px; height: 14px; border-radius: 50%; background: #fff; flex: none; }
.pin-c small { font-size: 12.5px; font-weight: 600; opacity: .9; }
.pin-c.v { background: var(--verde); font-size: 17px; box-shadow: 0 0 0 4px #3D6B3566, 0 2px 6px #0009; }
.pin-c.r { background: var(--sangue); opacity: .85; } .pin-c.r i { background: transparent; border: 2px solid #fff; }
.pin-c.g { background: #6f6a5c; opacity: .8; }
/* scelta dello sfondo */
.sfondi { display: flex; background: #fff; border-radius: 6px; box-shadow: 0 1px 5px #0006; overflow: hidden; }
.sfondi button { font: 600 15px 'Barlow', sans-serif; border: 0; background: #fff; color: var(--ink); padding: 7px 12px; cursor: pointer; border-left: 1px solid #ddd; }
.sfondi button:first-child { border-left: 0; }
.sfondi button.on { background: var(--loden, #33402D); color: #fff; }

/* tabelle */
.testa-card { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.testa-card h2 { margin: 0; padding: 0; border: 0; }
.testa-card .btn.primary { margin-left: auto; }
.tab-wrap { overflow: auto; }
.tab { width: 100%; border-collapse: collapse; font-size: 16px; }
.tab th { text-align: left; font-size: 13.5px; color: var(--soft); font-weight: 600; text-transform: uppercase; letter-spacing: .6px; padding: 6px 8px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.tab td { padding: 8px; border-bottom: 1px solid #eee5d2; vertical-align: top; }
.tab tr.riga { cursor: pointer; } .tab tr.riga:hover td { background: #f7f2e6; } .tab tr.off td { color: #8a846f; }
.sigla { font-weight: 700; font-family: var(--serif); font-size: 1.12em; letter-spacing: .3px; color: var(--bosco); }
.zz { display: inline-block; font-size: 13px; border: 1px solid var(--line); background: var(--bg); border-radius: 3px; padding: 0 6px; margin: 1px 2px 1px 0; white-space: nowrap; }
.app-ok { color: var(--verde); }

/* calendario */
.mese { display: flex; align-items: center; gap: 8px; } .mese b { min-width: 180px; text-align: center; font-family: var(--serif); font-size: 25px; }
.cal { border-collapse: collapse; font-size: 14px; }
.cal th { padding: 3px 2px; font-weight: 600; color: var(--soft); min-width: 54px; text-align: center; }
.cal th b { font-family: var(--serif); font-size: 19px; color: var(--ink); }
.cal th.zona { text-align: left; min-width: 160px; padding-right: 8px; position: sticky; left: 0; background: var(--surface); font-family: var(--serif); font-size: 18px; color: var(--bosco); font-weight: 700; }
.cal th.we, .cal td.we { background: #f1ebdc; }
.cal th.oggi b { background: var(--loden); color: var(--bg); border-radius: 3px; padding: 0 4px; box-shadow: 0 0 0 1.5px var(--ottone2); }
.cal td { border: 1px solid #e6dcc6; vertical-align: top; padding: 3px; height: 54px; cursor: pointer; text-align: center; }
.cal td:hover { outline: 2px solid var(--ottone); outline-offset: -2px; }
.cal td.passato { opacity: .6; }
.cal td span { display: block; font-family: var(--serif); font-weight: 700; font-size: 16px; line-height: 1.25; color: var(--bosco); }

/* finestre */
.dlg { position: fixed; inset: 0; background: rgba(31,42,27,.55); display: none; align-items: center; justify-content: center; z-index: 1000; padding: 14px; } .dlg.on { display: flex; }
.dlg-sheet { position: relative; background: var(--bg); border-radius: 8px; padding: 18px 18px 16px; max-width: 720px; width: 100%; max-height: 92vh; overflow: auto; border-top: 4px double var(--ottone); }
.dlg-x { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--loden); display: flex; align-items: center; justify-content: center; }
#dlgBody { padding-right: 34px; } #dlgBody h3 { margin: 0 0 8px; font-family: var(--serif); font-size: 28px; color: var(--bosco); }
.dlg-az { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; } .dlg-az .btn { flex: 1 1 120px; }
.griglia2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.scelte { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 10px; margin: 6px 0; font-size: 16px; }
.scelte label { display: flex; gap: 6px; align-items: center; padding: 3px 4px; border-radius: 4px; } .scelte label:hover { background: var(--surface); }
.det { width: 100%; border-collapse: collapse; font-size: 16px; } .det td { padding: 5px 6px; border-bottom: 1px solid #e6dcc6; vertical-align: top; } .det td:first-child { color: var(--soft); width: 150px; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--bosco); color: var(--bg); padding: 10px 16px; border-radius: 6px; z-index: 1100; font-size: 16px; max-width: 90vw; border: 1px solid var(--ottone); }
.sottotit { font-family: var(--serif); font-size: 21px; color: var(--bosco); margin: 14px 0 4px; font-weight: 700; }

@media (max-width: 900px) {
  #vRichieste { grid-template-columns: 1fr; height: auto; } .mappa-box { height: 65vh; order: -1; }
}
@media (max-width: 1100px) {
  #tabs { margin-left: 0; order: 5; width: 100%; gap: 18px; } .griglia2 { grid-template-columns: 1fr; }
}
@media (max-width: 520px) { #tabs button { font-size: 14px; letter-spacing: .2px; } .tit b { font-size: 21px; } }

/* Conduttori oggi: una riga per conduttore, facile da leggere */
.co { display: grid; grid-template-columns: auto 1fr auto; gap: 0 9px; align-items: center; padding: 8px 2px; border-bottom: 1px solid #eee5d2; }
.co:last-child { border-bottom: 0; }
.co .pal { margin: 0; width: 13px; height: 13px; }
.co b { font-size: 17px; } .co .ora { font-size: 15px; color: var(--soft); white-space: nowrap; } .co .ora svg.i { width: 15px; height: 15px; vertical-align: -2px; }
.co .sotto { grid-column: 2 / 4; font-size: 14.5px; color: var(--soft); }
.co.v .sotto .st { color: var(--verde); font-weight: 700; } .co.r .sotto .st { color: var(--sangue); font-weight: 600; }
.oggi-tit { font-size: 14px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--ottone); margin: 10px 0 2px; }
/* colonna di sinistra compatta: le due schede scorrono da sole, la carta resta ferma */
#vRichieste .col-sx, #vRichieste .col-dx { overflow: hidden; display: flex; flex-direction: column; }
#vRichieste .col-sx .card, #vRichieste .col-dx .card { display: flex; flex-direction: column; min-height: 0; padding-top: 10px; padding-bottom: 10px; }
#vRichieste .col-sx .card, #vRichieste .col-dx .card { flex: 0 1 auto; max-height: 100%; margin: 0; }
#vRichieste .col-sx h2, #vRichieste .col-dx h2 { font-size: 23px; margin-bottom: 6px; padding-bottom: 4px; }
#ricLista, #oggiLista { overflow: auto; min-height: 0; }
#vRichieste .filtro { margin-bottom: 6px; font-size: 14.5px; }
.ric { font-size: 15px; line-height: 1.4; padding: 6px 9px 6px 11px; margin-bottom: 7px; }
.ric b:first-of-type { font-size: 17px; }
.ric .s { font-size: 12px; }
@media (max-width: 1100px) { #vRichieste { grid-template-columns: 280px 1fr 260px; } }
@media (max-width: 900px) { #vRichieste { grid-template-columns: 1fr; } #vRichieste .col-sx, #vRichieste .col-dx { overflow: visible; } }

/* in recupero (incarico accettato, fino a «Recupero terminato») */
.pal.rec { background: #A8731A; }
.co.rec .sotto .st { color: #8a5f16; font-weight: 700; }
.pin-c.rec { background: #A8731A; font-size: 17px; box-shadow: 0 0 0 4px #A8731A55, 0 2px 6px #0009; }

/* sul posto: ben visibile */
.ric.sul_posto { border-color: #c9d6b8; border-left: 7px solid #2B5226; background: #E5EBD9; }
.ric.sul_posto .s { background: #2B5226; font-size: 13.5px; padding: 2px 9px; }
.ric .posto { margin-top: 5px; background: #2B5226; color: #fff; border-radius: 4px; padding: 4px 8px; font-size: 15px; display: block; }
.ric .posto svg.i { width: 17px; height: 17px; color: #fff; vertical-align: -3px; margin-right: 4px; }
.pin-r.posto > span { background: #2B5226; }
.pal.posto { background: #2B5226; }
.co .sotto .sp { color: #fff; background: #2B5226; border-radius: 3px; padding: 0 6px; }
.ric .vecchia { margin-top: 5px; background: var(--attesa); color: #fff; border-radius: 4px; padding: 4px 8px; font-size: 14.5px; }

/* 1.8: avvisi, notifiche, statistiche, calendario */
#btnAvvisi { position: relative; } #btnAvvisi.spento { opacity: .65; } #btnAvvisi s { position: absolute; left: 50%; top: 50%; width: 22px; height: 2px; background: currentColor; transform: translate(-50%, -50%) rotate(-45deg); }
.no-notif { color: var(--sangue); font-weight: 700; }
.stat-num { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 8px 0 14px; }
.stat-num > div { background: #fbf8f0; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; font-size: 15px; color: var(--soft); }
.stat-num b { display: block; font-family: var(--serif); font-size: 30px; color: var(--ink); }
.stat-g { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.cal-az { display: inline-flex; gap: 8px; margin-left: 10px; flex-wrap: wrap; }
.scelte.giorni { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 4px 10px; }
@media print {
  body.stampa-cal * { visibility: hidden; }
  body.stampa-cal #vCalendario, body.stampa-cal #vCalendario * { visibility: visible; }
  body.stampa-cal #vCalendario { position: absolute; left: 0; top: 0; width: 100%; }
  body.stampa-cal .cal-az, body.stampa-cal #calCaccia, body.stampa-cal .mese button { display: none; }
  body.stampa-cal .cal { font-size: 9px; } body.stampa-cal .tab-wrap { overflow: visible; }
}

/* statistiche in PDF (stampa) */
.solo-stampa { display: none; }
@media print {
  body.stampa-stat * { visibility: hidden; }
  body.stampa-stat #vStatistiche, body.stampa-stat #vStatistiche * { visibility: visible; }
  body.stampa-stat #vStatistiche { position: absolute; left: 0; top: 0; width: 100%; }
  body.stampa-stat .solo-stampa { display: block; } body.stampa-stat .solo-stampa h1 { font-family: var(--serif); font-size: 24px; margin: 0 0 2px; }
  body.stampa-stat .solo-stampa p { margin: 0 0 10px; font-size: 12px; color: #444; }
  body.stampa-stat .testa-card { display: none; }
  body.stampa-stat .card { border: 0; box-shadow: none; padding: 0; }
  body.stampa-stat .stat-num > div, body.stampa-stat .stat-b { break-inside: avoid; }
  body.stampa-stat .stat-num { grid-template-columns: repeat(3, 1fr); } body.stampa-stat .stat-num b { font-size: 22px; }
  body.stampa-stat .stat-g { grid-template-columns: repeat(2, 1fr); }
  body.stampa-stat { font-size: 12px; }
}
@media print { @page { size: A4; margin: 12mm; } }
@page orizz { size: A4 landscape; margin: 8mm; }
@media print { body.stampa-cal #vCalendario { page: orizz; } }
@media print { body.stampa-stat, body.stampa-cal { background: #fff !important; } body.stampa-stat main, body.stampa-cal main { background: #fff; } }
/* telefono: intestazione su più righe, menu a 4 colonne con l'icona sopra, niente scorrimento di lato */
@media (max-width: 640px) {
  html, body { overflow-x: hidden; }
  .top { padding: 8px 12px; gap: 8px; }
  .top-az { margin-left: 0; width: 100%; flex-wrap: wrap; }
  .top-az #utente { flex: 1 1 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
  #tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 0; width: 100%; order: 5; }
  #tabs button { flex-direction: column; gap: 3px; font-size: 14px; letter-spacing: 0; text-transform: none; padding: 6px 0 5px; text-align: center; justify-content: center; }
  #tabs .lungo { display: none; }
  .testa-card { gap: 8px; } .testa-card h2 { width: 100%; }
  .mese { width: 100%; justify-content: space-between; } .mese b { min-width: 0; flex: 1; }
  .cal-az { margin-left: 0; display: flex; margin-top: 6px; }
  .stat-num { grid-template-columns: repeat(2, 1fr); } .stat-num b { font-size: 24px; }
  #statBox .tab { font-size: 15px; }
}
.co[data-cid] { cursor: pointer; } .co[data-cid]:hover { background: #f5efe1; }
.pin-c { cursor: pointer; }
.st-v { color: var(--verde); } .st-r { color: var(--sangue); } .st-rec { color: #8a5f16; }

/* 1.10: statistiche con filtri */
.stat-filtri { border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; margin: 8px 0 14px; background: #fbf8f0; }
.stat-filtri summary { cursor: pointer; font-weight: 700; font-size: 16px; } .stat-filtri summary small { font-weight: 400; color: var(--soft); }
.sf-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 14px; margin: 10px 0; }
.sf-g .lbl { margin: 0; } .sf-g select, .sf-g input { width: 100%; }
.sf-sez { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 12px; font-size: 15.5px; }
.sf-az { margin-top: 8px; }
.stat-b td.num { white-space: nowrap; } .stat-b td.bc { width: 38%; }
.sbar { display: block; height: 10px; background: #ece4cf; border-radius: 5px; overflow: hidden; } .sbar i { display: block; height: 100%; background: var(--verde); }
@media print { body.stampa-stat .stat-filtri { display: none; } body.stampa-stat .sbar { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* 1.11: rapporto di ricerca a mano */
.rap-nuovo { margin: 0 0 8px; }
.rap { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px 18px; }
.rap fieldset { border: 1px solid var(--line); border-radius: 6px; padding: 4px 12px 8px; margin: 0; }
.rap legend { font-family: var(--serif); font-weight: 700; font-size: 18px; color: var(--bosco); padding: 0 6px; }
.rap .lbl { margin: 8px 0; } .rap input, .rap select, .rap textarea { width: 100%; box-sizing: border-box; }
.rap .mf { display: flex; gap: 16px; margin-top: 4px; text-transform: none; letter-spacing: 0; color: var(--ink); font-size: 16px; } .rap .mf input { width: auto; }
.rap .due { display: flex; align-items: center; gap: 6px; text-transform: none; color: var(--ink); } .rap .due input { width: 7em; }
.rap-larga { grid-column: 1 / -1; }
.err { color: var(--sangue); font-weight: 700; }
.dlg-sheet:has(.rap) { max-width: 1100px; }
.rap { grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); }
.rap fieldset { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; align-content: start; }
.rap fieldset legend { grid-column: 1 / -1; }
.rap .mf label, .rap .due { display: inline-flex; align-items: center; gap: 6px; }
.rap .mf input[type=radio] { display: inline-block; width: 18px; height: 18px; margin: 0; }
@media (max-width: 640px) { .rap { grid-template-columns: 1fr; } .rap fieldset { grid-template-columns: 1fr; } }
.rap fieldset, .rap fieldset > * { min-width: 0; }
.rap .due { display: flex; width: 100%; } .rap .due input { width: auto; flex: 1 1 0; min-width: 0; }
.rap input[type=datetime-local] { min-width: 0; font-size: 15px; }

/* 1.13: copertura di oggi, messaggi, accessi per più conduttori, PDF del rapporto, fasce più leggibili */
.copertura { border: 1.5px solid var(--verde); background: var(--verde-chiaro); border-radius: 6px; padding: 8px 10px; margin: 0 0 10px; cursor: pointer; }
.copertura.scoperta { border-color: var(--sangue); background: var(--sangue-chiaro); }
.cop-tit { font-weight: 700; display: flex; align-items: center; gap: 6px; margin-bottom: 4px; } .cop-tit svg.i { width: 20px; height: 20px; color: var(--verde); }
.copertura.scoperta .cop-tit { color: var(--sangue); } .copertura.scoperta .cop-tit svg.i { color: var(--sangue); }
.cop-z { display: flex; justify-content: space-between; gap: 8px; font-size: 15px; padding: 2px 0; border-top: 1px dashed #0000001a; }
.cop-z.no span { color: var(--sangue); font-weight: 700; } .cop-z.ok span { color: var(--verde); }
.copertura .piccolo { margin: 6px 0 0; font-size: 14px; }
.msg-rapidi { flex-direction: column; align-items: stretch; } .msg-rapidi .btn { justify-content: flex-start; text-align: left; font-weight: 500; }
.acc-l { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 12px; }
.stampa-rap-box { display: none; }
@media print {
  body.stampa-rap > *:not(#stampaRap) { display: none !important; }
  body.stampa-rap { background: #fff !important; font-size: 12px; }
  body.stampa-rap .stampa-rap-box { display: block; color: #000; }
}
.stampa-rap-box header { display: flex; align-items: center; gap: 14px; border-bottom: 3px double #A8813A; padding-bottom: 8px; margin-bottom: 10px; }
.stampa-rap-box header img { width: 64px; height: 64px; }
.stampa-rap-box h1 { font-family: var(--serif); font-size: 26px; margin: 0; color: #1F2A1B; } .stampa-rap-box header p { margin: 2px 0 0; }
.stampa-rap-box .rap-g { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.stampa-rap-box section { break-inside: avoid; }
.stampa-rap-box h2 { font-family: var(--serif); font-size: 15px; text-transform: uppercase; letter-spacing: .5px; color: #33402D; border-bottom: 1px solid #A8813A; margin: 6px 0 4px; padding-bottom: 2px; }
.stampa-rap-box table { width: 100%; border-collapse: collapse; } .stampa-rap-box td { padding: 3px 4px; border-bottom: 1px solid #ddd; vertical-align: top; }
.stampa-rap-box td:first-child { color: #444; width: 44%; }
.stampa-rap-box .oss { min-height: 60px; border: 1px solid #ccc; padding: 6px; white-space: pre-wrap; }
.stampa-rap-box footer { display: flex; justify-content: space-between; margin-top: 28px; font-size: 11px; color: #444; }
}
.spiega { margin: 6px 0 0; line-height: 1.45; }
.sez-testa { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .sez-az { display: inline-flex; gap: 6px; flex-wrap: wrap; font-family: 'Barlow', sans-serif; }
@media print { .sez-az { display: none; } }
/* 1.14: statistiche a gruppi, righe leggibili, colonne per giorni e ore */
.stat-gr { margin: 18px 0 6px; }
.stat-gt { font-family: var(--serif); font-size: 21px; font-weight: 700; color: var(--loden); text-transform: uppercase; letter-spacing: .8px; margin: 0 0 10px; padding-bottom: 5px; border-bottom: 3px double var(--ottone); }
.stat-gc.due { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 14px 22px; align-items: start; }
.stat-gc .stat-b { background: #fbf8f0; border: 1px solid var(--line); border-radius: 6px; padding: 10px 14px 12px; }
.stat-gc .stat-b .sottotit { margin-top: 0; }
.stat-gc.uno > .stat-num { margin-top: 0; }
.srighe { display: grid; gap: 2px; }
.srow { display: grid; grid-template-columns: minmax(150px, 1.3fr) 1fr 84px; align-items: center; gap: 12px; padding: 5px 0; border-bottom: 1px solid #0000000d; font-size: 16px; }
.srow:last-child { border-bottom: 0; }
.srow .sn { text-align: right; white-space: nowrap; } .srow .sn small { color: var(--soft); font-size: 14px; margin-left: 6px; }
.scols { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 6px; }
.scol { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; min-width: 0; }
.scol i { display: block; width: 100%; max-width: 42px; background: var(--verde); border-radius: 4px 4px 0 0; }
.scol b { font-size: 14px; margin-bottom: 3px; } .scol small { font-size: 14px; color: var(--soft); margin-top: 4px; border-top: 1px solid var(--line); width: 100%; text-align: center; padding-top: 3px; }
.stat-gc .det td:first-child { width: 34%; }
@media (max-width: 700px) { .stat-gc.due { grid-template-columns: 1fr; } .srow { grid-template-columns: minmax(110px, 1.2fr) 1fr 74px; gap: 8px; } .scols { height: 140px; gap: 3px; } }
@media print {
  body.stampa-stat .stat-gr { break-inside: auto; } body.stampa-stat .stat-gc .stat-b { break-inside: avoid; background: #fff; }
  body.stampa-stat .stat-gc.due { grid-template-columns: repeat(2, 1fr); gap: 10px 14px; }
  body.stampa-stat .stat-gt { font-size: 16px; } body.stampa-stat .srow { font-size: 12px; padding: 2px 0; } body.stampa-stat .scols { height: 110px; }
  body.stampa-stat .scol i { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.stat-gc.due { display: block; columns: 3 360px; column-gap: 22px; }
.stat-gc.due > .stat-b { break-inside: avoid; margin: 0 0 14px; display: inline-block; width: 100%; box-sizing: border-box; }
.stat-gc.tempi { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px 22px; align-items: start; }
@media (max-width: 900px) { .stat-gc.tempi { grid-template-columns: 1fr; } }
@media print { body.stampa-stat .stat-gc.due { columns: 2; column-gap: 14px; } body.stampa-stat .stat-gc.tempi { grid-template-columns: 1.4fr 1fr; } }
.stat-gc.due { columns: auto; display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 0 22px; align-items: start; }
.scolonna > .stat-b { margin: 0 0 14px; }
@media print { body.stampa-stat .stat-gc.due { columns: auto; display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 0 14px; } }
@media print { body.stampa-stat .stat-gt { break-after: avoid; page-break-after: avoid; } body.stampa-stat .stat-gc { break-before: avoid; } }
@media print { body.stampa-stat .tab-wrap { overflow: visible; } body.stampa-stat .tab { width: 100%; font-size: 11px; table-layout: auto; } body.stampa-stat .tab th, body.stampa-stat .tab td { white-space: normal; padding: 4px 5px; } }
/* 1.14.1: foglio fuori schermo per creare il PDF senza la finestra di stampa */
.pdf-foglio { position: absolute; left: -12000px; top: 0; background: #fff; color: #1C1C16; padding: 4px 6px; font-size: 15px; }
.pdf-foglio .solo-stampa { display: block; } .pdf-foglio .solo-stampa h1 { font-family: var(--serif); font-size: 26px; margin: 0 0 2px; } .pdf-foglio .solo-stampa p { margin: 0 0 10px; font-size: 14px; color: #444; }
.pdf-foglio .stampa-rap-box { display: block; color: #000; font-size: 14px; }
.pdf-foglio .tab-wrap { overflow: visible; } .pdf-foglio .tab { width: 100%; font-size: 13px; } .pdf-foglio .tab th, .pdf-foglio .tab td { white-space: normal; }
.pdf-foglio .stat-num { grid-template-columns: repeat(3, 1fr); }
/* 1.15: conferme dei turni, prova generale, importazione */
.cal td span.c-si, .c-si { color: #2f5a29; font-weight: 700; } .cal td span.c-no, .c-no { color: var(--sangue); text-decoration: line-through; }
.conf-si { color: var(--verde); font-weight: 700; }
.cf-g { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 26px; align-items: start; } .cf-1 { grid-column: 1 / -1; max-width: 760px; }
.cf-sub { font-weight: 700; font-size: 15px; color: var(--loden); margin: 4px 0 2px; }
@media (max-width: 1000px) { .cf-g { grid-template-columns: 1fr; } }
.cf-t th { font-size: 14px; color: var(--soft); font-weight: 600; text-align: left; padding: 3px 6px; } .cf-t th.num, .cf-t td.num { text-align: right; white-space: nowrap; }
.cf-t td:first-child { width: auto !important; }
.cf-su { color: #2f6b29; font-weight: 700; white-space: nowrap; } .cf-giu { color: var(--sangue); font-weight: 700; white-space: nowrap; } .cf-n, .cf-ug { color: var(--soft); white-space: nowrap; }
.stat-gc.uno > .stat-b.cf { margin-top: 14px; }
.riep-testa { display: flex; align-items: center; gap: 16px; border-bottom: 3px double var(--ottone); padding-bottom: 8px; margin-bottom: 6px; } .riep-testa img { width: 70px; height: 70px; }
.pdf-foglio .riep-testa h1 { font-size: 28px; }
.pdf-foglio .riep-testa { display: flex; }
.cop-fuori { color: #2f5a29; font-weight: 600; }

/* 1.15.2: copertura compatta e riducibile */
.copertura { cursor: default; padding: 5px 8px; }
.copertura .cop-tit { margin: 0; justify-content: space-between; }
.cop-apri { flex: 1; display: flex; align-items: center; gap: 6px; font: inherit; font-weight: 700; font-size: 15px; color: inherit; background: none; border: 0; padding: 2px 0; cursor: pointer; text-align: left; }
.cop-apri svg.i { width: 18px; height: 18px; flex: none; color: var(--verde); } .copertura.scoperta .cop-apri svg.i { color: var(--sangue); }
.cop-fr { margin-left: auto; font-size: 14px; }
.cop-dett { font: inherit; font-size: 14px; background: none; border: 1px solid #0000002a; border-radius: 5px; padding: 2px 8px; cursor: pointer; color: var(--ink); }
.copertura.aperta .cop-tit { margin-bottom: 3px; }
.copertura .cop-z { font-size: 14px; padding: 1px 0; line-height: 1.3; }
.cop-apri span { white-space: nowrap; } .cop-dett { white-space: nowrap; }
/* 1.16: risposte dei conduttori ai messaggi */
.risposte { border: 1.5px solid var(--ottone); background: #fbf3df; border-radius: 6px; padding: 6px 8px; margin: 0 0 8px; }
.risp-tit { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 6px; } .risp-tit svg.i { width: 18px; height: 18px; color: var(--ottone); }
.risp-r { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px dashed #0000001a; padding: 4px 0; font-size: 14px; line-height: 1.3; }
.risp-t { color: var(--loden); }
/* 1.16.1: pagina delle richieste ferma a tutto schermo (niente scorrimento per vedere i crediti) */
.crediti { font-size: 14px; } .cr-sep { display: none; }
@media screen and (min-width: 901px) {
  body.fisso { height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
  body.fisso > main { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-bottom: 4px; }
  body.fisso > main > :not(#vRichieste):not(.crediti) { flex: none; }
  body.fisso #vRichieste { flex: 1; height: auto; min-height: 0; }
  body.fisso .crediti { flex: none; margin: 6px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  body.fisso .crediti br { display: none; } body.fisso .cr-sep { display: inline; }
}
/* 1.17: scheda del conduttore riorganizzata: azioni in alto, dati a sinistra, conversazione a destra */
.dlg-sheet:has(.cs-cols) { max-width: 980px; }
.cs-testa { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; padding-right: 40px; margin-bottom: 8px; } .cs-testa h3 { margin: 0; }
.cs-stato { font-size: 16px; }
.cs-az { display: flex; gap: 8px; flex-wrap: wrap; padding: 6px 0 10px; border-bottom: 3px double var(--ottone); margin-bottom: 12px; position: sticky; top: -18px; background: var(--bg); z-index: 2; }
.cs-az .btn { flex: 0 1 auto; }
.cs-cols { display: grid; grid-template-columns: minmax(240px, 0.9fr) 1.3fr; gap: 18px; align-items: start; }
.cs-dati { display: grid; gap: 2px; }
.cs-d { display: grid; gap: 1px; padding: 6px 0; border-bottom: 1px solid #e6dcc6; }
.cs-d .cs-k { font-size: 14px; color: var(--soft); text-transform: uppercase; letter-spacing: .5px; } .cs-d b { font-weight: 500; font-size: 16px; } .cs-d small { color: var(--soft); font-size: 14px; }
.cs-chat-box { border: 1.5px solid var(--linea, #d8cdb4); border-radius: 8px; background: #fffdf7; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.cs-chat-tit { font-weight: 700; display: flex; align-items: center; gap: 6px; } .cs-chat-tit svg.i { width: 18px; height: 18px; color: var(--ottone); }
.cs-chat { height: clamp(150px, calc(92vh - 360px), 380px); overflow-y: auto; background: var(--bg); border-radius: 6px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.bolla { max-width: 82%; padding: 7px 10px; border-radius: 10px; font-size: 15.5px; line-height: 1.35; }
.bolla small { display: block; font-size: 14px; opacity: .8; margin-top: 2px; }
.bolla.io { align-self: flex-end; background: var(--loden); color: #f4efe3; border-bottom-right-radius: 3px; }
.bolla.lui { align-self: flex-start; background: #fff; border: 1.5px solid var(--ottone); border-bottom-left-radius: 3px; font-weight: 600; }
.bolla.lui small { font-weight: 400; color: var(--soft); opacity: 1; }
.cs-rapidi { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; } .cs-rapidi .btn { flex: none; white-space: nowrap; } .cs-rapidi .btn { font-size: 14px; }
.cs-scrivi { display: flex; gap: 8px; align-items: stretch; } .cs-scrivi textarea { flex: 1; font: inherit; font-size: 15.5px; padding: 7px 9px; border: 1.5px solid #cfc3a6; border-radius: 6px; resize: vertical; min-height: 44px; }
.toast.az { cursor: pointer; } .toast small { display: block; font-size: 14px; color: var(--ottone2, #C9A55C); margin-top: 2px; }
.risp-r { cursor: pointer; } .risp-r:hover { background: #f4e7c4; }
@media (max-width: 800px) { .cs-cols { grid-template-columns: 1fr; } .cs-chat { height: 240px; } }
.cs-cols > * { min-width: 0; } .dlg-sheet:has(.cs-cols) { overflow-x: hidden; }
/* 1.17: riga in fondo della pagina ferma centrata e allineata alle colonne; i crediti delle icone restano nelle altre schede */
@media screen and (min-width: 901px) {
  body.fisso .crediti { text-align: center; margin: 8px 0 0; padding: 0; line-height: 1.3; }
  body.fisso .crediti .cr3, body.fisso .crediti .cr-sep3, body.fisso .crediti .cr2b { display: none; }
}
.ric.chiusa { border-left-color: #3D6B35; background: #f3f6ee; } .ric.chiusa .s { background: #3D6B35; }
.ric.annullata { opacity: .85; }
.ric .s.nuovoesito { background: var(--ottone, #A8813A); color: #fff; }
.ric.davedere { box-shadow: 0 0 0 2px var(--ottone, #A8813A); }
/* 1.21 gestione delle schede */
.filtro { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; } .filtro #btnSel { margin-left: auto; }
.sel-bar { background: #f3ecda; border: 1px solid #d8c9a3; border-radius: 6px; padding: 7px 9px; margin: 6px 0 9px; font-size: 15px; }
.sel-r1 { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; } .sel-r2 { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.sel-bar .link { background: none; border: 0; padding: 0; color: var(--loden, #33402D); text-decoration: underline; cursor: pointer; font: inherit; font-size: 14px; }
.ric .selc { width: 18px; height: 18px; margin: 2px 8px 0 0; float: left; accent-color: #33402D; pointer-events: none; }
.ric .selc-no { display: inline-block; width: 18px; height: 18px; margin: 2px 8px 0 0; float: left; }
.ric.scelta { outline: 2px solid #33402D; outline-offset: -1px; }

/* 1.22: ordine della lista dei conduttori */
.ord-cond { display: inline-flex; align-items: center; gap: 6px; }
.ord-cond select { font: inherit; font-size: 15px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--carta, #fff); color: var(--ink); }
.ord-cond .btn.sm { padding: 3px 9px; min-height: 0; font-size: 13px; }
.th-ord { all: unset; cursor: pointer; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; }
.th-ord:hover, .th-ord.on { color: var(--ink); }

/* 1.23: incidenti stradali */
.ric-nuovi { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; } .ric-nuovi .btn { margin: 0; }
.inc-tag { display: inline-block; background: #1F4E79; color: #fff; font: 700 12.5px var(--serif); letter-spacing: .8px; padding: 1px 7px; border-radius: 4px; vertical-align: 1px; }
.dlg-sheet:has(.inc) { max-width: 1120px; }
.inc-drop { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; border: 2px dashed var(--ottone2); border-radius: 10px; padding: 12px 16px; background: #FBF6EA; cursor: pointer; margin: 6px 0 10px; }
.inc-drop.su { background: #F1E6C8; border-color: var(--ottone); } .inc-drop b { font-family: var(--serif); font-size: 18px; } .inc-drop span { color: var(--soft); font-size: 14.5px; }
.inc-ok { color: var(--verde); font-weight: 700; margin-left: 8px; font-family: 'Barlow', sans-serif; font-size: 15px; }
.inc-cols { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; } .inc-cols > * { min-width: 0; }
@media (max-width: 860px) { .inc-cols { grid-template-columns: 1fr; } }
.inc .griglia2 .w2 { grid-column: 1 / -1; }
.inc input.manca { background: #FFF4C2; border-color: #D9B65C; }
.inc-carta { height: 240px; border-radius: 8px; border: 1px solid var(--line); isolation: isolate; position: relative; z-index: 0; }
.inc-pin span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #1F4E79; color: #fff; border: 3px solid #fff; box-shadow: 0 2px 6px #0006; font: 700 16px var(--serif); box-sizing: border-box; }
.inc-cons { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; margin: 2px 0 6px; font-size: 15.5px; }
.btn.inc-manda { background: #1F4E79; border-color: #1F4E79; color: #fff; font-weight: 700; }

/* 1.24: scelta automatico / assegna a mano nella scheda dell'incidente */
.inc-modo { display: grid; gap: 6px; font-size: 15.5px; } .inc-modo label { display: block; } .inc-modo select { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; max-width: 100%; }
.inc-modo select:disabled { opacity: .55; }

/* 1.24.1: posizione vecchia in «Conduttori oggi» */
.co .ora.vecchia { color: #9a8f78; font-style: normal; } .co .ora.vecchia svg.i { opacity: .6; }

/* 1.25: impegnati oggi fuori turno in «Conduttori oggi» */
.oggi-imp > summary { cursor: pointer; list-style: none; } .oggi-imp > summary::-webkit-details-marker { display: none; }
.oggi-imp > summary::before { content: '▾ '; } .oggi-imp:not([open]) > summary::before { content: '▸ '; }
.oggi-imp .co { opacity: .8; }
/* 1.25.1: «sul posto» sulla carta con la P (verde come «presa», ma si riconosce subito) */
.pin-r .lett { color: #fff; font-family: var(--serif); font-weight: 700; font-size: 24px; line-height: 1; }
.pal.posto { width: 15px; height: 15px; vertical-align: -3px; position: relative; }
.pal.posto::after { content: "P"; position: absolute; inset: 0; color: #fff; font: 700 11px/15px var(--serif); text-align: center; }
/* 1.26: incidente stradale = cartello «selvaggina» con lo stato in un tondo; concluse piccole e grigie con ✓; legenda cliccabile */
.pin-r.inc > svg.cart { position: absolute; left: -3px; top: -2px; width: 54px; height: 50px; fill: none; filter: drop-shadow(0 2px 3px #000a); }
.pin-r.inc > .st { inset: auto; right: -10px; top: -6px; z-index: 2; width: 26px; height: 26px; border-width: 2px; display: grid; place-items: center; }
.pin-r.inc > .st svg { width: 15px; height: 15px; }
.pin-r.inc .lett { font-size: 17px; }
.pin-r.inc small { top: 50px; }
.pin-r.inc.nuova > .st { background: var(--attesa); } .pin-r.inc.allarme > .st { background: var(--sangue); } .pin-r.inc.presa > .st { background: var(--verde); }
.pin-r.inc.posto > .st { background: #2B5226; } .pin-r.inc.finita > .st { background: var(--grigio); }
.pin-r.finita { scale: .72; opacity: .85; }
.pin-r.finita small { font-weight: 600; }
.legenda button { font: inherit; color: inherit; background: none; border: 0; border-radius: 4px; padding: 0 6px 0 0; margin: 0 2px 0 0; cursor: pointer; line-height: 1.7; }
.legenda button:hover { background: var(--verde-chiaro); }
.legenda button.on { background: var(--verde-chiaro); box-shadow: 0 0 0 1.5px var(--verde); font-weight: 700; }
.legenda.filtrata button:not(.on):not(.lg-tit) { opacity: .45; }
.legenda .pal-inc { width: 17px; height: 16px; vertical-align: -3px; margin: 0 4px 0 10px; }
.pal.fin { background: var(--grigio); width: 15px; height: 15px; vertical-align: -3px; position: relative; }
.pal.fin::after { content: "✓"; position: absolute; inset: 0; color: #fff; font: 700 11px/15px var(--serif); text-align: center; }
.leg-nota { flex-basis: 100%; color: var(--verde); font-size: 14px; }
/* 1.26.1: legenda ordinata: nome del gruppo a sinistra, voci allineate a destra */
.legenda { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; padding-left: 10px; padding-right: 8px; row-gap: 3px; align-items: start; }
.legenda .lg-gr { display: contents; }
.legenda .lg-gr > b { line-height: 1.7; padding-top: 1px; }
.legenda .lg-voci { display: flex; flex-wrap: wrap; gap: 2px 14px; align-items: center; }
.legenda .lg-voci button { display: inline-flex; align-items: center; gap: 5px; padding: 0 3px; margin: 0; white-space: nowrap; }
.legenda .lg-voci .pal, .legenda .lg-voci .pal-inc { margin: 0; }
.legenda .lg-nota-c { color: var(--soft); font-size: 13px; white-space: nowrap; }
.legenda .leg-nota { grid-column: 1 / -1; }
.legenda .lg-voci { display: grid; grid-template-columns: repeat(auto-fill, 130px); gap: 2px 4px; }
.legenda .lg-nota-c { grid-column: 1 / -1; }
@media (min-width: 1500px) { .legenda .lg-nota-c { grid-column: auto / span 2; align-self: center; } }
.legenda { right: 10px; max-width: none; }
.legenda .lg-voci .pal-inc { flex: none; width: 19px; height: 18px; }
/* 1.26.2: legenda compatta e trasparente sulla carta (piena passandoci sopra) */
.mappa-box.leg-trasp .legenda { right: auto; max-width: calc(100% - 20px); bottom: 20px; padding: 3px 9px 4px; row-gap: 0; column-gap: 8px; line-height: 1.45;
  background: rgb(255 253 245 / .28); border-color: transparent; box-shadow: none; transition: background .2s, border-color .2s; }
.mappa-box.leg-trasp .legenda:hover { background: var(--surface); border-color: var(--line); }
.mappa-box.leg-trasp .legenda .lg-voci { grid-template-columns: repeat(3, auto); gap: 0 12px; }
.mappa-box.leg-trasp .legenda .lg-gr > b { line-height: 1.45; padding-top: 0; }
.mappa-box.leg-trasp .legenda button { line-height: 1.45; }
.mappa-box.leg-trasp .legenda button, .mappa-box.leg-trasp .legenda b { text-shadow: 0 0 2px #fff, 0 0 3px #fff, 0 0 5px #fff, 0 0 7px #fffc; font-weight: 600; }
.mappa-box.leg-trasp .legenda .pal, .mappa-box.leg-trasp .legenda .pal-inc { flex: none; }
.mappa-box.leg-trasp .legenda { grid-template-columns: auto repeat(3, auto); column-gap: 12px; }
.mappa-box.leg-trasp .legenda .lg-voci { display: contents; }
.mappa-box.leg-trasp .legenda .lg-gr > b { grid-column: 1; }
.mappa-box.leg-trasp .legenda .lg-gr:first-child > b { grid-row: span 2; }
.mappa-box.leg-trasp .legenda .pal::after { text-shadow: none; }
/* 1.26.3: concluse con la goccia e la ✓ nel pallino */
.pin-r.finita:not(.inc) > .st { inset: auto; right: -8px; top: -6px; width: 24px; height: 24px; border-width: 2px; background: #5d5849; z-index: 2; display: grid; place-items: center; }
.pin-r.finita:not(.inc) > .st svg { width: 14px; height: 14px; }
/* 1.26.5: sul telefono la legenda va sotto la carta (fuori), in due colonne ordinate; la carta resta libera */
@media (max-width: 899px) {
  .mappa-box.leg-trasp { display: flex; flex-direction: column; height: auto; }
  .mappa-box.leg-trasp #mappa { position: relative; inset: auto; height: 58vh; min-height: 300px; flex: none; }
  .mappa-box.leg-trasp .legenda { position: static; max-width: none; display: grid; grid-template-columns: 1fr 1fr; column-gap: 10px; row-gap: 0; padding: 8px 12px 10px;
    background: var(--surface); border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; }
  .mappa-box.leg-trasp .legenda .lg-gr, .mappa-box.leg-trasp .legenda .lg-voci { display: contents; }
  .mappa-box.leg-trasp .legenda .lg-gr > b { grid-column: 1 / -1; grid-row: auto; font-family: var(--serif); font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--ottone); margin-top: 4px; line-height: 1.6; }
  .mappa-box.leg-trasp .legenda button { padding: 0; text-shadow: none; font-weight: 500; justify-content: flex-start; line-height: 1.8; white-space: normal; text-align: left; }
}
/* 1.26.6: sul computer la legenda sta al centro in basso */
@media (min-width: 900px) { .mappa-box.leg-trasp .legenda { left: 50%; right: auto; transform: translateX(-50%); } }
/* 1.26.7: «di picchetto» ben visibile in «Conduttori oggi» */
.co .sotto .di-pic { color: #fff; background: var(--ottone); border-radius: 3px; padding: 0 6px; font-weight: 600; white-space: nowrap; }

/* 1.27 — chiamata al centralino */
.cen-cerca { display: flex; gap: 6px; margin: 0 0 6px; } .cen-cerca input { flex: 1; min-width: 0; font: inherit; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; }
.cen-gc { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; margin: 6px 0; font-size: 15.5px; font-weight: 600; }
.cen .inc-carta { height: 300px; }
.cen-pin svg { width: 30px; height: 30px; padding: 5px; box-sizing: border-box; border-radius: 50%; background: #7E2419; color: #fff; fill: #fff; border: 3px solid #fff; box-shadow: 0 2px 6px #0006; }
