/* Stili applicativi condivisi. */

/* Stili condivisi tra desktop e smartphone. */

.card.card-risultato .card-content{height:100%;display:flex;flex-direction:column;overflow:visible;padding:18px 20px 14px}

.card.card-risultato .titolo-parametro{font-weight:700;line-height:1.18;text-align:center;margin:0;overflow-wrap:anywhere}

.card.card-risultato .ultimo-valore{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:92px}

.card.card-risultato .ultimo-valore h4{font-weight:500;line-height:1.1;margin:0 0 5px}

.card.card-risultato .ultimo-valore h4 small{}

.card.card-risultato .data-misurazione{color:#757575}

.card.card-risultato .penultimo-valore{text-align:center;line-height:1.25;margin:0 0 7px}

.card.card-risultato .riferimento-parametro{text-align:right;font-weight:700;line-height:1.15;margin:auto 0 0}

.stato-azzurro{background-color:#d9edf7!important}

.legenda-stati{display:flex;flex-wrap:wrap;gap:14px;align-items:center;padding:10px 0}

.legenda-stato{display:inline-flex;align-items:center;gap:7px}

.legenda-colore{width:18px;height:18px;border:1px solid rgba(0,0,0,.16)}

.legenda-verde{background:#c8e6c9}

.legenda-rosso{background:#ffcdd2}

.legenda-azzurro{background:#d9edf7}

.btn .testo-pulsante,.btn-small .testo-pulsante{display:inline!important}

nav .nav-row{margin:0;height:64px}

nav .nav-item{height:64px;padding:0!important}

nav .nav-link{display:flex;height:64px;align-items:center;justify-content:center;width:100%}

nav .nav-link i.material-icons{height:auto;line-height:1;}

.modal:not(.datepicker-modal):not(.timepicker-modal){overflow-y:auto;max-height:90%}

.datepicker-modal,.timepicker-modal{overflow:visible!important;max-height:none!important}

.datepicker-container,.timepicker-container{max-height:none!important}

.azioni-riga{display:flex;justify-content:flex-end;align-items:center;gap:5px;white-space:nowrap}

.azioni-riga .btn,.azioni-riga .btn-small{padding-left:10px!important;padding-right:10px!important;min-width:36px}

.azioni-riga .testo-pulsante{display:none!important}

.azioni-riga i.material-icons{margin:0!important}

td.azioni-cella{text-align:right;white-space:nowrap}

/* V45: azioni Modifica/Elimina sempre compatte, icon-only e allineate a destra. */
.azioni-riga{display:flex!important;justify-content:flex-end!important;align-items:center!important;gap:5px!important;white-space:nowrap}

.azioni-riga .testo-pulsante,.azione-solo-icona .testo-pulsante{display:none!important}

.azioni-riga i.material-icons,.azione-solo-icona i.material-icons{margin:0!important}

.azioni-riga .btn,.azioni-riga .btn-small,.azione-solo-icona{min-width:36px;padding-left:10px!important;padding-right:10px!important}

td.azioni-cella,.azioni-cella{text-align:right!important;white-space:nowrap!important}

.file-icon-cell{text-align:center!important;vertical-align:middle!important;padding-left:14px!important;padding-right:14px!important}

.file-icon-cell .btn-small{margin:0 4px}

.navbar-fixed{display:block!important;position:relative!important;z-index:1000!important}

.navbar-fixed nav{display:block!important;position:fixed!important;top:0!important;left:0!important;right:0!important;z-index:1000!important}

body{padding-top:0}

.home-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}

.home-header h4{margin:0}

.home-grid{display:flex;flex-wrap:wrap}

.home-grid>.col{display:flex}

.home-link{display:flex;width:100%;color:#212121}

.home-card{width:100%;height:330px;margin:.75rem 0}

.home-card .card-content{height:100%;display:flex;flex-direction:column;justify-content:space-between;align-items:center;text-align:center;padding:26px 22px}

.home-title{display:flex;align-items:center;justify-content:center;gap:10px;font-weight:700;line-height:1.1}

.home-title i{}

.home-value{font-weight:400;line-height:1.08}

.home-caption{font-weight:600}

.home-goal{font-weight:700}

.home-details{display:flex;justify-content:center;align-items:center;gap:16px;flex-wrap:wrap;}

.home-details.single{max-width:90%}

.home-date{color:#616161}

#stop.modal{width:95%;max-width:520px;max-height:90%}

#stop .modal-content{padding:24px}

.stat{text-align:center}

.health{min-height:220px}

.period-card .row{margin-bottom:0}

.liquid-types{display:flex!important;width:100%;margin-left:0!important;margin-right:0!important}

.liquid-types .col{width:20%!important;flex:0 0 20%;padding:0 5px!important}

.modifica-contenitori{display:flex!important;width:100%;align-items:center;justify-content:center}

.liquid-type{cursor:pointer;border:3px solid transparent}

.liquid-type.selected{border-color:#000}

.liquid-type b{display:block}

.quick-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:9px}

.quick{height:76px;line-height:1.15;padding:5px!important}

.quick span,.quick strong{display:block!important}

.quick strong{}

.valore-fuori-range{background:transparent!important;color:#d32f2f!important;font-weight:700}

.riferimenti-pressione{margin-top:18px}

.range-value{font-weight:600;margin-top:5px}

.riferimenti-grid{margin-bottom:0}

body {  line-height: 1.12; }

h4 {  margin: .55rem 0; }

table {  }

table th, table td { padding: 3px 4px; vertical-align: middle; }

tr.nuovo-parametro td { border-top: 1.5px solid #000; }

tr.nuova-categoria td { border-top: 4px solid #000; }

td.colonna-stato { white-space: nowrap; font-weight: 600; }

table.analisi-stampa th:nth-child(1), table.analisi-stampa td:nth-child(1) { width: 18%; }

table.analisi-stampa th:nth-child(2), table.analisi-stampa td:nth-child(2) { width: 27%; }

table.analisi-stampa th:nth-child(3), table.analisi-stampa td:nth-child(3) { width: 14%; }

table.analisi-stampa th:nth-child(4), table.analisi-stampa td:nth-child(4) { width: 9%; white-space: nowrap; }

table.analisi-stampa th:nth-child(5), table.analisi-stampa td:nth-child(5) { width: 18%; }

table.analisi-stampa th:nth-child(6), table.analisi-stampa td:nth-child(6) { width: 14%; }

@media print {
            @page { size: A4 portrait; margin: 6mm; }
            body {  line-height: 1.06; }
            main.container { width: 100%; max-width: none; }
            h4 {  margin: 0 0 3mm; }
            table { width: 100%;  table-layout: fixed; }
            table th, table td { padding: .9mm 1mm; overflow-wrap: anywhere; }
            thead { display: table-header-group; }
            tr { break-inside: avoid; page-break-inside: avoid; }
            .non-stampare { display: none !important; }
            .pagina-pressione { break-before: page; page-break-before: always; }
        }

.btn .testo-pulsante{display:inline!important}

.salute-progress{width:100%;height:8px;border:0}

.salute-progress::-webkit-progress-bar{background:#e0e0e0}

.salute-progress::-webkit-progress-value{background:#2196f3}

.salute-progress::-moz-progress-bar{background:#2196f3}

.progress-green::-webkit-progress-value{background:#4caf50}

.progress-green::-moz-progress-bar{background:#4caf50}

.liquid-color-acqua{color:#42a5f5}

.liquid-color-coca_cola{color:#5d4037}

.liquid-color-birra{color:#f9a825}

.liquid-color-vino{color:#8e244d}

.liquid-color-cocktail{color:#7e57c2}

/* V10 scala unica */
.TITOLONE{font-size:36px!important;font-weight:700!important;line-height:1.15}

.TITOLO{font-size:28px!important;font-weight:700!important;line-height:1.2}

.TESTO_GRANDE{font-size:28px!important;font-weight:400!important;line-height:1.25}

.TESTO{font-size:20px!important;font-weight:400!important;line-height:1.4}

.TESTO_PICCOLO{font-size:16px!important;font-weight:400!important;line-height:1.4}

.TESTO_NANO{font-size:12px!important;font-weight:400!important;line-height:1.35}

.material-icons{font-size:24px}

.material-icons.medium{font-size:48px}

.azioni-riga{display:flex!important;flex-direction:row!important;justify-content:flex-end!important;align-items:center!important;gap:5px!important;white-space:nowrap!important}

.azioni-riga .btn,.azioni-riga .btn-small{display:inline-flex!important;align-items:center!important;justify-content:center!important;float:none!important;margin:0!important;min-width:36px!important;padding:0 10px!important}

.azioni-riga .testo-pulsante,.azione-solo-icona .testo-pulsante{display:none!important}

.azioni-riga i.material-icons{margin:0!important}

.azioni-cella{text-align:right!important;white-space:nowrap!important}

@media print{.TITOLONE{font-size:16pt!important}.TITOLO{font-size:12pt!important}.TESTO_GRANDE{font-size:11pt!important}.TESTO{font-size:9pt!important}.TESTO_PICCOLO{font-size:7.5pt!important}.TESTO_NANO{font-size:6.5pt!important}}

/* V11: pulsanti uniformi, navbar esclusa */
.TESTO_BOTTONE{font-size:18px!important;font-weight:400!important;line-height:1!important;text-transform:none!important}

.btn:not(.nav-link),.btn-small:not(.nav-link),button:not(.nav-link){display:inline-flex!important;align-items:center!important;justify-content:center!important;vertical-align:middle!important;gap:8px!important;text-transform:none!important;line-height:1!important}

.btn:not(.nav-link) i.material-icons,.btn-small:not(.nav-link) i.material-icons,button:not(.nav-link) i.material-icons{font-size:18px!important;line-height:1!important;height:18px!important;width:18px!important;margin:0!important;display:inline-flex!important;align-items:center!important;justify-content:center!important}

.btn:not(.nav-link) .testo-pulsante,.btn-small:not(.nav-link) .testo-pulsante,button:not(.nav-link) .testo-pulsante{font-size:18px!important;line-height:1!important;font-weight:400!important;text-transform:none!important;display:inline!important}

.azioni-riga .testo-pulsante,.azione-solo-icona .testo-pulsante{display:none!important}

.azioni-riga .btn,.azioni-riga .btn-small{gap:0!important}

/* Respiro uniforme fra blocchi funzionali differenti */
main>.card,main>.row,main>table,main>.tabella-scroll,main>canvas,main>.section,main>h5{margin-top:24px!important;margin-bottom:24px!important}

.card+table,.card+.responsive-table,canvas+.card,canvas+table,table+table,table+h5,.row+.card,.card+.row{margin-top:28px!important}

.card .card-content>canvas{margin-top:18px!important;margin-bottom:18px!important}

/* V12: grafici e storico misurazioni */
.tabella-misurazioni{display:block!important;width:100%!important;overflow-x:auto!important;margin-top:24px!important}

.tabella-misurazioni table{display:table!important;width:100%!important;visibility:visible!important}

#chart,#observationChart,#graficoLiquidi{display:block!important;width:100%!important;max-height:420px;margin:24px 0!important}

/* V13: ogni tabella in card, titoli e tabelle uniformi, pulsanti icon-only */
.card-tabella,.card:has(.tabella-uniforme){width:100%;margin-top:28px!important;margin-bottom:28px!important}

.card-tabella .card-content,.card:has(.tabella-uniforme) .card-content{padding:24px!important}

.titolo-tabella,.card-title.titolo-tabella{font-size:28px!important;font-weight:700!important;line-height:1.25!important;margin:0 0 20px!important;display:block!important}

.tabella-uniforme{width:100%!important;border-collapse:collapse!important;font-size:20px!important}

.tabella-uniforme th,.tabella-uniforme td{font-size:20px!important;line-height:1.35!important;padding:12px 10px!important;vertical-align:middle!important}

.tabella-uniforme th{font-weight:700!important}

.bottone-solo-icona:not(.quick){display:inline-flex!important;align-items:center!important;justify-content:center!important;width:42px!important;min-width:42px!important;height:42px!important;padding:0!important;line-height:1!important}

.bottone-solo-icona:not(.quick) i.material-icons{font-size:22px!important;width:22px!important;height:22px!important;line-height:22px!important;margin:0!important;display:block!important}

.bottone-solo-icona .testo-pulsante{display:none!important}

.azioni-riga .bottone-solo-icona{margin:0!important}

@media print{.card-tabella,.card:has(.tabella-uniforme){box-shadow:none!important;border:0!important;margin:0!important}.titolo-tabella,.card-title.titolo-tabella{font-size:12pt!important}.tabella-uniforme,.tabella-uniforme th,.tabella-uniforme td{font-size:6.5pt!important}}

/* V14: ogni blocco funzionale in card; tutti i titoli card sono TITOLO */
.card-elemento,.card-tabella{width:100%;margin-top:28px!important;margin-bottom:28px!important}

.card-elemento>.card-content,.card-tabella>.card-content{padding:24px!important}

.card .card-title,.card-title.titolo-tabella,.titolo-tabella{font-size:28px!important;font-weight:700!important;line-height:1.2!important;margin:0 0 20px!important;display:block!important}

.card canvas{display:block!important;width:100%!important;max-height:420px!important;margin:12px 0 0!important}

.card table{margin:8px 0 0!important}

.card>.card-content>.card,.card>.card-content>.card-elemento{box-shadow:none!important;margin-left:0!important;margin-right:0!important}

/* V15: titoli coerenti senza etichette generiche */
main>h4.TITOLONE{font-size:36px!important;font-weight:700!important;line-height:1.15!important}

.card .card-title,.card .home-title{font-size:28px!important;font-weight:700!important;line-height:1.2!important}

/* V17 modifiche puntuali richieste */
.card-categoria{margin:28px 0!important}

.card-categoria>.card-content>.row{margin-bottom:0!important}

.card-misurazioni-pressione canvas{margin-bottom:24px!important}

.azioni-assunzione{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}

.azioni-centrate{display:flex;justify-content:center;gap:10px;margin-top:18px}

.azioni-modal{display:flex!important;justify-content:space-between!important;align-items:center!important;width:100%!important;margin-top:24px!important}

.bottone-modal{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;width:auto!important;min-width:120px!important;height:42px!important;padding:0 16px!important;text-transform:none!important}

.bottone-modal i.material-icons{font-size:20px!important;line-height:1!important;margin:0!important}

.bottone-modal .testo-pulsante{display:inline!important;font-size:18px!important;line-height:1!important}

.card-assunzione .liquid-types{margin-top:12px!important}

.card-assunzione .quick-grid{margin-top:20px!important}

/* V18: correzioni richieste, HOME invariata */
.card-categoria>.card-content>.analysis-group{margin:0!important}

.card-categoria .analysis-group>.row:last-child{margin-bottom:0!important}

.card-categoria .card.card-risultato{margin-top:12px!important;margin-bottom:12px!important}

.bottone-add{display:inline-flex!important;align-items:center!important;justify-content:center!important;width:auto!important;min-width:42px!important;padding:0 16px!important;gap:8px!important}

.bottone-add .testo-pulsante{display:inline!important;font-size:18px!important;line-height:1!important;text-transform:none!important}

.bottone-add i.material-icons{display:inline-flex!important;align-items:center!important;justify-content:center!important;margin:0!important}

.azioni-sotto-assunzione{display:flex;justify-content:flex-start;margin-top:12px!important;margin-bottom:28px!important}

/* V19: categorie Analisi come card contenitore */
.card-categoria{margin:28px 0!important}

.card-categoria>.card-content>.analysis-group{margin:0!important}

.card-categoria .analysis-card .card{margin-top:12px!important;margin-bottom:12px!important}

/* V20: contenitori JSON non eseguibili */
.configurazione-json{display:none!important}

/* V24: allineamento tabelle mobile e griglie Liquidi definitive */
.liquid-color-te{color:#00897b}

/* Desktop: 6 liquidi in una riga, 12 scelte contenitore in due righe. */
.liquid-types{display:flex!important;flex-wrap:wrap!important}

.liquid-types .col{width:16.666666%!important;flex:0 0 16.666666%!important;max-width:16.666666%!important}

.quick-grid{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:9px!important;width:100%!important}

/* V29: testo dei pulsanti contenitore sempre su due righe. */
.quick-grid .quick,
.card-assunzione .quick-grid .quick {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: normal !important;
}

.quick-grid .quick > span,
.card-assunzione .quick-grid .quick > span {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    text-align: center !important;
    line-height: 1.1 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
}

.quick-grid .quick > strong,
.card-assunzione .quick-grid .quick > strong {
    display: block !important;
    width: 100% !important;
    margin: 5px 0 0 !important;
    text-align: center !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
}

/* V30: pagina Inserimento liquidi rapida */
.azioni-configurazione-rapida{display:flex;align-items:center;justify-content:center;gap:12px;margin:18px 0 24px;flex-wrap:nowrap}

.azioni-configurazione-rapida .bottone-modal{width:auto!important;min-width:210px!important}

.pagina-liquidi-rapida .liquid-types{justify-content:center!important}

.pagina-liquidi-rapida .liquid-types .col{float:none!important}

.pagina-liquidi-rapida .liquid-type{margin-left:auto!important;margin-right:auto!important}

.riga-configurazione-liquido input[type=color]{height:42px;padding:2px;border:0;background:transparent}

/* V31: centratura tipi bevanda in pagina rapida e comandi modifica in Assunzione */
.pagina-liquidi-rapida .liquid-type,
.pagina-liquidi-rapida .liquid-type .card-content{
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
}

.pagina-liquidi-rapida .liquid-type b,
.pagina-liquidi-rapida .liquid-type .material-icons{
    display:block!important;
    width:100%!important;
    margin-left:auto!important;
    margin-right:auto!important;
    text-align:center!important;
}

.azioni-modifica-assunzione{
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:center!important;
    gap:12px!important;
    width:100%!important;
    margin-top:20px!important;
    flex-wrap:nowrap!important;
}

.azioni-modifica-assunzione .bottone-modal{
    width:auto!important;
    min-width:210px!important;
    text-transform:none!important;
}

.riga-configurazione-liquido input[type=color]{height:42px;padding:2px;border:0;background:transparent}

/* V33: ordinamento e paginazione comune a tutte le tabelle. */
.colonna-ordinabile{
    cursor:pointer!important;
    user-select:none!important;
    position:relative!important;
    padding-right:20px!important;
}
.colonna-ordinabile:focus{
    outline:2px solid #424242!important;
    outline-offset:-2px!important;
}
.indicatore-ordinamento{
    display:inline-block!important;
    min-width:12px!important;
    margin-left:5px!important;
    font-size:.72em!important;
    line-height:1!important;
    vertical-align:middle!important;
}
.paginatore-tabella{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:12px;
    width:100%;
    margin-top:18px;
}
.paginatore-tabella[hidden]{display:none!important}
.paginatore-tabella .btn-small{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:36px!important;
    min-width:36px!important;
    height:36px!important;
    padding:0!important;
}
.paginatore-tabella .btn-small i.material-icons{
    margin:0!important;
    line-height:1!important;
}
.paginatore-tabella .btn-small:disabled{
    opacity:.35!important;
    cursor:default!important;
}
.stato-paginazione{min-width:110px;text-align:center}
@media print{
    .paginatore-tabella{display:none!important}
    table[data-tabella-interattiva] tbody tr{display:table-row!important}
}


/* V34: le righe escluse dalla pagina corrente restano realmente nascoste. */
table[data-tabella-interattiva] tbody tr[hidden],
table[data-tabella-interattiva] tbody tr.riga-paginazione-nascosta{
    display:none!important;
}

/* V35: gestione categorie e inserimento unificato valori. */
#gestioneCategorie{width:90%;max-width:820px}.card-categoria .card-content>.analysis-group>.row:first-child{margin-bottom:12px}


/* V36: intestazione pagina con selettore versione normale/rapida. */
.testata-pagina{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;margin-bottom:18px}
.testata-pagina h4{margin:0!important}
.testata-pagina>a{flex:0 0 auto}
.bottone-testo .testo-pulsante{display:inline!important}


/* V37: aggiunta rapida Analisi. */
.modal-aggiunta-rapida{width:95%!important;max-width:1200px!important;height:90%!important;max-height:90%!important}
.modal-aggiunta-rapida form{height:100%;display:flex;flex-direction:column}
.modal-aggiunta-rapida .modal-content{flex:1;overflow:auto}
.footer-aggiunta-rapida{display:flex!important;justify-content:space-between!important;align-items:center!important;padding:4px 18px!important}
.campo-valore-rapido{margin:0!important;height:32px!important}
.tabella-aggiunta-rapida td{vertical-align:middle!important}


/* V39: tutti i TITOLONE di pagina sono sempre maiuscoli. */
.TITOLONE{text-transform:uppercase!important}

.no-pagination tbody tr{display:table-row!important}
.tabella-aggiunta-rapida th:last-child{text-transform:uppercase!important}


/* V40: modal categorie con una sola area di scorrimento. */
#gestioneCategorie.modal-categorie{
    width:90%!important;
    max-width:820px!important;
    max-height:90vh!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
}
#gestioneCategorie.modal-categorie .modal-content{
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
    padding-bottom:24px!important;
}
#gestioneCategorie .azioni-chiusura-categorie{
    display:flex;
    justify-content:flex-end;
    margin-top:20px;
}


/* V41: colonna descrizione nella gestione categorie. */
#gestioneCategorie table th:nth-child(1),#gestioneCategorie table td:nth-child(1){width:24%}
#gestioneCategorie table th:nth-child(2),#gestioneCategorie table td:nth-child(2){width:auto}
#gestioneCategorie table th:nth-child(3),#gestioneCategorie table td:nth-child(3){width:90px}


/* Stili desktop specifici. */
/* Stili utilizzati esclusivamente da 601 px.
   La V31 non conteneva blocchi desktop dedicati: le regole desktop sono quelle condivise in common.css. */


/* Stili smartphone specifici. */
/* Stili utilizzati esclusivamente fino a 600 px. */

@media(max-width:600px){.card.card-risultato .titolo-parametro{}.card.card-risultato .ultimo-valore h4{}}

@media(max-width:600px){.btn .testo-pulsante,.btn-small .testo-pulsante{display:none!important}.btn i.material-icons,.btn-small i.material-icons{margin:0}.btn,.btn-small{padding-left:12px;padding-right:12px;min-width:40px}}

@media(max-width:600px){nav .nav-row,nav .nav-item,nav .nav-link{height:56px}}

@media(max-width:600px){.home-grid{display:block}.home-grid>.col{display:block}.home-card{height:310px}.home-title{}.home-value{}}

@media(max-width:600px){.stat h5{}.health{min-height:0}}

@media(max-width:600px){.liquid-types .col{padding:0 2px!important}.liquid-types .material-icons.medium{}.liquid-types b{}}

@media(max-width:600px){.quick-grid{gap:5px}.quick{height:80px;padding:3px!important}.quick strong{}.liquid-type .card-content{padding:9px 2px}}

@media(max-width:600px){.range-value{}}

@media screen and (max-width: 600px) {
            main.container { width: 97%; }
            .tabella-scroll { overflow-x: auto; }
            table { min-width: 650px; }
        }

@media screen and (max-width:600px){.btn .testo-pulsante{display:none!important}.btn i.material-icons{margin:0}.btn{padding-left:12px;padding-right:12px;min-width:40px}}

@media(max-width:600px){.TITOLONE{font-size:32px!important}.TITOLO{font-size:24px!important}.TESTO_GRANDE{font-size:24px!important}.TESTO{font-size:18px!important}.TESTO_PICCOLO{font-size:15px!important}.TESTO_NANO{font-size:11px!important}}

@media(max-width:600px){.TESTO_BOTTONE{font-size:16px!important}.btn:not(.nav-link) i.material-icons,.btn-small:not(.nav-link) i.material-icons,button:not(.nav-link) i.material-icons,.btn:not(.nav-link) .testo-pulsante,.btn-small:not(.nav-link) .testo-pulsante,button:not(.nav-link) .testo-pulsante{font-size:16px!important}.btn:not(.nav-link) i.material-icons,.btn-small:not(.nav-link) i.material-icons,button:not(.nav-link) i.material-icons{width:16px!important;height:16px!important}main>.card,main>.row,main>table,main>.section,main>h5{margin-top:18px!important;margin-bottom:18px!important}}

@media(max-width:600px){.titolo-tabella,.card-title.titolo-tabella{font-size:24px!important}.tabella-uniforme,.tabella-uniforme th,.tabella-uniforme td{font-size:18px!important}.tabella-uniforme th,.tabella-uniforme td{padding:10px 8px!important}.card-tabella .card-content,.card:has(.tabella-uniforme) .card-content{padding:18px!important}}

@media(max-width:600px){.card .card-title,.card-title.titolo-tabella,.titolo-tabella{font-size:24px!important}.card-elemento>.card-content,.card-tabella>.card-content{padding:18px!important}}

@media(max-width:600px){main>h4.TITOLONE{font-size:32px!important}.card .card-title,.card .home-title{font-size:24px!important}}

@media(max-width:600px){.bottone-modal{min-width:105px!important;padding:0 12px!important}.bottone-modal .testo-pulsante{font-size:16px!important}}

@media(max-width:600px){.bottone-add .testo-pulsante{font-size:16px!important}}

/* V21: tabelle mobile con la stessa struttura verticale del desktop */
@media screen and (max-width: 600px) {
    .card,
    .card-content,
    .tabella-misurazioni,
    .tabella-scroll {
        max-width: 100%;
        box-sizing: border-box;
    }

    .tabella-misurazioni,
    .tabella-scroll {
        overflow-x: auto !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch;
    }

    table,
    table.responsive-table,
    .tabella-uniforme {
        display: table !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        table-layout: fixed !important;
        border-collapse: collapse !important;
    }

    table.responsive-table thead,
    table.responsive-table tbody,
    .tabella-uniforme thead,
    .tabella-uniforme tbody {
        display: table-row-group !important;
        width: auto !important;
    }

    table.responsive-table thead,
    .tabella-uniforme thead {
        display: table-header-group !important;
    }

    table.responsive-table tr,
    .tabella-uniforme tr {
        display: table-row !important;
        width: auto !important;
        border: 0 !important;
    }

    table.responsive-table th,
    table.responsive-table td,
    .tabella-uniforme th,
    .tabella-uniforme td {
        display: table-cell !important;
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
        padding: 8px 5px !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        word-break: normal !important;
        hyphens: auto;
        vertical-align: middle !important;
    }

    table.responsive-table th,
    .tabella-uniforme th {
        overflow: visible !important;
        text-overflow: clip !important;
    }

    table.responsive-table td.azioni-cella,
    .tabella-uniforme td.azioni-cella {
        white-space: nowrap !important;
    }

    .azioni-riga {
        flex-wrap: nowrap !important;
    }

    body,
    main,
    .container,
    .card,
    .card-content,
    p,
    span,
    label,
    th,
    td,
    a,
    button,
    input,
    textarea,
    select,
    .TITOLONE,
    .TITOLO,
    .TESTO_GRANDE,
    .TESTO,
    .TESTO_PICCOLO,
    .TESTO_NANO {
        max-width: 100%;
        overflow-wrap: anywhere;
        word-break: normal;
        white-space: normal;
    }

    .TITOLONE,
    .TITOLO,
    .TESTO_GRANDE,
    .TESTO,
    .TESTO_PICCOLO,
    .TESTO_NANO,
    .card-title,
    .home-title,
    .home-caption,
    .home-details,
    .home-date {
        line-height: 1.3 !important;
    }
}

/* V22: riduzione tipografica esclusivamente da smartphone */
@media screen and (max-width: 600px) {
    .TITOLONE,
    main > h4.TITOLONE {
        font-size: 24px !important;
        line-height: 1.15 !important;
    }

    .TITOLO,
    .card .card-title,
    .card-title.titolo-tabella,
    .titolo-tabella,
    h5,
    h6 {
        font-size: 18px !important;
        line-height: 1.2 !important;
    }

    .TESTO_GRANDE,
    .home-value,
    .range-value,
    .pagina-fumo h3,
    .pagina-fumo .stat h5,
    .quick strong {
        font-size: 17px !important;
        line-height: 1.2 !important;
    }

    .TESTO,
    body,
    main,
    p,
    label,
    input,
    select,
    textarea,
    .select-dropdown,
    table,
    table.responsive-table,
    .tabella-uniforme,
    table th,
    table td,
    table.responsive-table th,
    table.responsive-table td,
    .tabella-uniforme th,
    .tabella-uniforme td {
        font-size: 13px !important;
        line-height: 1.25 !important;
    }

    .TESTO_PICCOLO,
    .home-details,
    .legenda-stato,
    .collection-item,
    .btn,
    .btn-small,
    button,
    .testo-pulsante,
    .bottone-add .testo-pulsante,
    .bottone-modal .testo-pulsante,
    .quick span {
        font-size: 12px !important;
        line-height: 1.15 !important;
    }

    .TESTO_NANO,
    small,
    .home-date,
    .data-misurazione,
    .grey-text {
        font-size: 10px !important;
        line-height: 1.2 !important;
    }

    table.responsive-table th,
    table.responsive-table td,
    .tabella-uniforme th,
    .tabella-uniforme td {
        padding: 6px 3px !important;
    }

    .card-content,
    .card-elemento > .card-content,
    .card-tabella > .card-content,
    .card:has(.tabella-uniforme) .card-content {
        padding: 12px !important;
    }

    .card .card-title,
    .card-title.titolo-tabella,
    .titolo-tabella {
        margin-bottom: 12px !important;
    }

    .bottone-solo-icona:not(.quick),
    .azioni-riga .btn,
    .azioni-riga .btn-small {
        width: 34px !important;
        min-width: 34px !important;
        height: 34px !important;
        padding: 0 !important;
    }

    .bottone-solo-icona:not(.quick) i.material-icons,
    .azioni-riga i.material-icons {
        width: 18px !important;
        height: 18px !important;
        font-size: 18px !important;
        line-height: 18px !important;
    }

    .bottone-add,
    .bottone-modal {
        min-height: 36px !important;
        height: 36px !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
        gap: 5px !important;
    }

    .bottone-add i.material-icons,
    .bottone-modal i.material-icons {
        width: 16px !important;
        height: 16px !important;
        font-size: 16px !important;
        line-height: 16px !important;
    }

    .quick {
        font-size: 10px !important;
        line-height: 1.1 !important;
    }
}

/* V23: ottimizzazione esclusivamente smartphone - tabelle e inserimento liquidi */
@media screen and (max-width: 600px) {
    /* Intestazioni tabella più piccole, leggibili e correttamente allineate. */
    table.responsive-table th,
    .tabella-uniforme th,
    table th {
        font-size: 10px !important;
        line-height: 1.1 !important;
        font-weight: 700 !important;
        padding: 6px 2px !important;
        text-align: left !important;
        vertical-align: bottom !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        word-break: normal !important;
        hyphens: auto !important;
    }

    table.responsive-table th.center-align,
    .tabella-uniforme th.center-align,
    table th.center-align {
        text-align: center !important;
    }

    table.responsive-table th.right-align,
    .tabella-uniforme th.right-align,
    table th.right-align {
        text-align: right !important;
    }

    table.responsive-table td,
    .tabella-uniforme td,
    table td {
        font-size: 11px !important;
        line-height: 1.15 !important;
        padding: 6px 2px !important;
        vertical-align: middle !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
    }

    /* Tipi di liquido: due elementi per riga. */
    .card-assunzione .liquid-types {
        display: flex !important;
        flex-wrap: wrap !important;
        margin-left: -4px !important;
        margin-right: -4px !important;
    }

    .card-assunzione .liquid-types .col {
        width: 50% !important;
        flex: 0 0 50% !important;
        max-width: 50% !important;
        padding: 0 4px !important;
        box-sizing: border-box !important;
    }

    .card-assunzione .liquid-type {
        min-height: 94px !important;
        margin: 5px 0 !important;
    }

    .card-assunzione .liquid-type .card-content {
        min-height: 88px !important;
        padding: 8px 4px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .card-assunzione .liquid-type .material-icons.medium {
        font-size: 30px !important;
        line-height: 1 !important;
        height: 32px !important;
        margin-bottom: 5px !important;
    }

    .card-assunzione .liquid-type b {
        font-size: 11px !important;
        line-height: 1.15 !important;
        text-align: center !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
    }

    /* Contenitori/quantità: due pulsanti per riga invece di cinque. */
    .card-assunzione .quick-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 7px !important;
        width: 100% !important;
    }

    .card-assunzione .quick {
        width: 100% !important;
        min-width: 0 !important;
        height: 66px !important;
        padding: 6px 4px !important;
        white-space: normal !important;
    }

    .card-assunzione .quick span {
        font-size: 10px !important;
        line-height: 1.1 !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
    }

    .card-assunzione .quick strong {
        font-size: 12px !important;
        line-height: 1.15 !important;
        margin-top: 4px !important;
        white-space: normal !important;
    }
}

@media screen and (max-width:600px){
    /* Una sola tabella reale: intestazioni e dati condividono esattamente le stesse colonne. */
    .tabella-misurazioni,.tabella-scroll,.card-content:has(> table){overflow-x:auto!important;-webkit-overflow-scrolling:touch}
    table,table.responsive-table,.tabella-uniforme{
        display:table!important;
        width:100%!important;
        min-width:640px!important;
        max-width:none!important;
        table-layout:auto!important;
        border-collapse:collapse!important;
    }
    table.responsive-table thead,.tabella-uniforme thead{display:table-header-group!important;width:auto!important}
    table.responsive-table tbody,.tabella-uniforme tbody{display:table-row-group!important;width:auto!important}
    table.responsive-table tr,.tabella-uniforme tr{display:table-row!important;width:auto!important}
    table.responsive-table th,table.responsive-table td,.tabella-uniforme th,.tabella-uniforme td{
        display:table-cell!important;
        width:auto!important;
        min-width:0!important;
        max-width:none!important;
        box-sizing:border-box!important;
        padding:6px 7px!important;
        text-align:left!important;
        vertical-align:middle!important;
        white-space:normal!important;
        overflow-wrap:normal!important;
        word-break:normal!important;
    }
    table.responsive-table th,.tabella-uniforme th{font-size:10px!important;line-height:1.1!important;font-weight:700!important;vertical-align:bottom!important}
    table.responsive-table td,.tabella-uniforme td{font-size:11px!important;line-height:1.15!important}
    table.responsive-table th.center-align,table.responsive-table td.center-align,.tabella-uniforme th.center-align,.tabella-uniforme td.center-align{text-align:center!important}
    table.responsive-table th.right-align,table.responsive-table td.right-align,.tabella-uniforme th.right-align,.tabella-uniforme td.right-align{text-align:right!important}
    table.responsive-table td.azioni-cella,.tabella-uniforme td.azioni-cella{white-space:nowrap!important;text-align:right!important}

    /* Smartphone: 6 liquidi in 2 righe, 3 per riga. */
    .liquid-types .col,.card-assunzione .liquid-types .col{
        width:33.333333%!important;
        flex:0 0 33.333333%!important;
        max-width:33.333333%!important;
        padding:0 3px!important;
    }
    .liquid-type,.card-assunzione .liquid-type{min-height:88px!important;margin:4px 0!important}
    .liquid-type .card-content,.card-assunzione .liquid-type .card-content{min-height:82px!important;padding:7px 3px!important}
    .liquid-type .material-icons.medium,.card-assunzione .liquid-type .material-icons.medium{font-size:28px!important;height:30px!important}
    .liquid-type b,.card-assunzione .liquid-type b{font-size:10px!important;line-height:1.1!important}

    /* Smartphone: 12 scelte in 4 righe, 3 per riga. */
    .quick-grid,.card-assunzione .quick-grid{
        grid-template-columns:repeat(3,minmax(0,1fr))!important;
        gap:6px!important;
    }
    .quick,.card-assunzione .quick{height:64px!important;padding:5px 3px!important}
    .quick span,.card-assunzione .quick span{font-size:9px!important;line-height:1.05!important}
    .quick strong,.card-assunzione .quick strong{font-size:11px!important;line-height:1.1!important;margin-top:3px!important}
}

/* V25: tabelle smartphone senza scorrimento orizzontale */
@media screen and (max-width:600px){
    html,body{max-width:100%;overflow-x:hidden!important}
    .tabella-misurazioni,.tabella-scroll,.card-content:has(> table){
        width:100%!important;
        max-width:100%!important;
        overflow-x:visible!important;
    }
    table,table.responsive-table,.tabella-uniforme{
        display:table!important;
        width:100%!important;
        min-width:0!important;
        max-width:100%!important;
        table-layout:fixed!important;
        border-collapse:collapse!important;
        overflow:visible!important;
    }
    table.responsive-table thead,.tabella-uniforme thead{display:table-header-group!important}
    table.responsive-table tbody,.tabella-uniforme tbody{display:table-row-group!important}
    table.responsive-table tr,.tabella-uniforme tr{display:table-row!important}
    table.responsive-table th,table.responsive-table td,.tabella-uniforme th,.tabella-uniforme td{
        display:table-cell!important;
        width:auto!important;
        min-width:0!important;
        max-width:none!important;
        padding:4px 2px!important;
        font-size:9px!important;
        line-height:1.1!important;
        box-sizing:border-box!important;
        white-space:normal!important;
        overflow-wrap:anywhere!important;
        word-break:break-word!important;
        vertical-align:middle!important;
        text-align:left!important;
    }
    table.responsive-table th,.tabella-uniforme th{font-size:8px!important;font-weight:700!important;vertical-align:bottom!important}
    table.responsive-table td.azioni-cella,.tabella-uniforme td.azioni-cella{width:62px!important;white-space:nowrap!important;text-align:right!important}
    table .azioni-riga{gap:2px!important;justify-content:flex-end!important}
    table .azioni-riga .btn,table .azioni-riga .btn-small{width:27px!important;min-width:27px!important;height:27px!important;padding:0!important}
    table .azioni-riga i.material-icons{font-size:15px!important;width:15px!important;height:15px!important;line-height:15px!important}
}

/* V26: intestazioni e righe condividono la stessa griglia nativa su smartphone. */
@media screen and (max-width:600px){
    .tabella-misurazioni,
    .tabella-scroll,
    .card-content:has(> table){
        width:100%!important;
        max-width:100%!important;
        overflow:visible!important;
    }

    table.tabella-mobile-allineata{
        display:table!important;
        width:100%!important;
        min-width:0!important;
        max-width:100%!important;
        table-layout:fixed!important;
        border-collapse:collapse!important;
        border-spacing:0!important;
        margin:0!important;
    }

    table.tabella-mobile-allineata colgroup{display:table-column-group!important}
    table.tabella-mobile-allineata col{display:table-column!important}
    table.tabella-mobile-allineata thead{display:table-header-group!important;width:auto!important;overflow:visible!important}
    table.tabella-mobile-allineata tbody{display:table-row-group!important;width:auto!important;overflow:visible!important}
    table.tabella-mobile-allineata tr{display:table-row!important;width:auto!important}

    table.tabella-mobile-allineata th,
    table.tabella-mobile-allineata td{
        display:table-cell!important;
        width:auto!important;
        min-width:0!important;
        max-width:none!important;
        box-sizing:border-box!important;
        padding:5px 2px!important;
        border-radius:0!important;
        white-space:normal!important;
        overflow-wrap:anywhere!important;
        word-break:break-word!important;
        text-align:left!important;
        vertical-align:middle!important;
    }

    table.tabella-mobile-allineata th{
        font-size:8px!important;
        line-height:1.05!important;
        font-weight:700!important;
        vertical-align:bottom!important;
    }

    table.tabella-mobile-allineata td{
        font-size:9px!important;
        line-height:1.1!important;
    }

    table.tabella-mobile-allineata th.center-align,
    table.tabella-mobile-allineata td.center-align{text-align:center!important}

    table.tabella-mobile-allineata th.right-align,
    table.tabella-mobile-allineata td.right-align,
    table.tabella-mobile-allineata td.azioni-cella{text-align:right!important}
}

/* V28: pulsanti Vedi e Scarica PDF uniformi alle azioni Modifica/Elimina su smartphone. */
@media screen and (max-width:600px){
    .file-icon-cell,
    .file-icon-cell + td,
    table.tabella-mobile-allineata td.file-icon-cell,
    table.tabella-mobile-allineata td.file-icon-cell + td{
        text-align:center!important;
        vertical-align:middle!important;
    }

    .file-icon-cell .azione-solo-icona,
    .file-icon-cell + td .azione-solo-icona,
    table.tabella-mobile-allineata .file-icon-cell .azione-solo-icona,
    table.tabella-mobile-allineata .file-icon-cell + td .azione-solo-icona{
        display:inline-flex!important;
        align-items:center!important;
        justify-content:center!important;
        width:27px!important;
        min-width:27px!important;
        max-width:27px!important;
        height:27px!important;
        min-height:27px!important;
        padding:0!important;
        margin:0 auto!important;
        line-height:1!important;
        float:none!important;
    }

    .file-icon-cell .azione-solo-icona i.material-icons,
    .file-icon-cell + td .azione-solo-icona i.material-icons,
    table.tabella-mobile-allineata .file-icon-cell .azione-solo-icona i.material-icons,
    table.tabella-mobile-allineata .file-icon-cell + td .azione-solo-icona i.material-icons{
        display:block!important;
        width:15px!important;
        height:15px!important;
        font-size:15px!important;
        line-height:15px!important;
        margin:0!important;
        padding:0!important;
        text-align:center!important;
    }
}

@media screen and (max-width:600px) {
    .quick-grid .quick > strong,
    .card-assunzione .quick-grid .quick > strong {
        margin-top: 3px !important;
    }
}

@media screen and (max-width:600px){
    .azioni-configurazione-rapida{gap:6px;margin:12px 0 18px}
    .azioni-configurazione-rapida .bottone-modal{min-width:0!important;width:50%!important;height:auto!important;min-height:42px!important;padding:6px!important}
    .azioni-configurazione-rapida .bottone-modal .testo-pulsante{font-size:11px!important;white-space:normal!important;text-align:center!important}
    .pagina-liquidi-rapida .liquid-types{justify-content:center!important}
}

@media screen and (max-width:600px){
    .pagina-liquidi-rapida .liquid-type,
    .pagina-liquidi-rapida .liquid-type .card-content{min-height:82px!important}
    .azioni-modifica-assunzione{gap:6px!important;margin-top:14px!important}
    .azioni-modifica-assunzione .bottone-modal{
        width:50%!important;
        min-width:0!important;
        height:auto!important;
        min-height:42px!important;
        padding:6px!important;
    }
    .azioni-modifica-assunzione .bottone-modal .testo-pulsante{
        display:inline!important;
        font-size:11px!important;
        line-height:1.1!important;
        white-space:normal!important;
        text-align:center!important;
    }
}

/* V33: paginatore e indicatori di ordinamento da smartphone. */
.colonna-ordinabile{padding-right:12px!important}
.indicatore-ordinamento{min-width:8px!important;margin-left:2px!important}
.paginatore-tabella{gap:8px;margin-top:12px}
.paginatore-tabella .btn-small{width:30px!important;min-width:30px!important;height:30px!important}
.paginatore-tabella .btn-small i.material-icons{font-size:18px!important;width:18px!important;height:18px!important;line-height:18px!important}
.stato-paginazione{min-width:88px!important;font-size:10px!important}


/* V34: le righe escluse dalla pagina corrente restano realmente nascoste. */
table[data-tabella-interattiva] tbody tr[hidden],
table[data-tabella-interattiva] tbody tr.riga-paginazione-nascosta{
    display:none!important;
}


/* V36: intestazioni delle pagine rapide. */
.testata-pagina{gap:8px;margin-bottom:14px}
.testata-pagina .bottone-solo-icona{width:34px!important;min-width:34px!important;height:34px!important}


/* V37: aggiunta rapida Analisi da smartphone. */
.modal-aggiunta-rapida{width:98%!important;height:96%!important;max-height:96%!important;top:2%!important}
.modal-aggiunta-rapida .modal-content{padding:12px!important}
.campi-aggiunta-rapida{margin-bottom:4px!important}
.campo-valore-rapido{font-size:11px!important;height:28px!important}


/* V40: modal categorie mobile con una sola barra di scorrimento. */
#gestioneCategorie.modal-categorie{
    width:96%!important;
    max-height:94vh!important;
    top:3%!important;
}
