/* Mont3 Operations · aggiunte dell'app a mont3.css (che è generato dal kit: non si tocca a mano).
   Solo token di mont3.css: nessun colore nuovo. */

/* desktop / telefono: due varianti dello stesso contenuto dove le tavole divergono */
@media (max-width: 720px) { .only-desk { display: none !important; } }
@media (min-width: 721px) { .only-mob { display: none !important; } }

/* aggiornamento fallito (tavola S-Errore): il pallino e le parole della topbar in rosso */
.live.failed .dot { background: var(--crit); box-shadow: 0 0 0 3px var(--critBg); }
.live.failed span:last-child { color: var(--crit); }

/* barra laterale ridotta a icone (tavola S-MenuRidotto) */
.brand .collapse:hover { background: var(--surface2); color: var(--text); }
.shell.narrow .sidebar { padding: 12px 8px; }
.shell.narrow .brand { justify-content: center; padding: 8px 0 16px; }
.shell.narrow .brand > div, .shell.narrow .nav-item > span, .shell.narrow .me > div, .shell.narrow .me form { display: none; }
.shell.narrow .brand .collapse { display: inline-flex; margin: 0; position: absolute; left: 44px; top: 18px; width: 20px; height: 20px; background: var(--surface); border: 1px solid var(--border); }
.shell.narrow .brand { position: relative; }
.shell.narrow .nav-item { justify-content: center; padding: 0; }
.shell.narrow .nav-item .count { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; font-size: 11px; display: inline-flex; }
.shell.narrow .me { justify-content: center; padding: 8px 0; }
.sidebar form { margin: 0; }
.sidebar .nav-item { width: 100%; }

/* moduli veri dentro .input */
.input select.bare { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 20px;
  background: transparent url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238F8A80' stroke-width='2.2' stroke-linecap='round'><path d='M6 9l6 6 6-6'/></svg>") no-repeat right center; }
.input select.bare option { background: var(--surface); color: var(--text); }
.input:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px var(--workBg); }
.input.err:focus-within { border-color: var(--crit); box-shadow: 0 0 0 3px var(--critBg); }   /* l'errore resta rosso anche col fuoco (tavola S-Accesso-Errore) */
.input.area textarea.bare { min-height: 68px; line-height: 20px; }
.input input[type="date"].bare { color-scheme: inherit; }
.input input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--ink); }
.check input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
.frow.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.frow.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.frow.inline { grid-auto-flow: column; grid-auto-columns: max-content; align-items: end; }
form.inline { display: inline; margin: 0; }
.form-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.help code, .p code { font-family: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12px; }

/* ricerca (tavola Ricerca) */
.palette .in input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font: inherit; color: var(--text); height: 100%; }
.palette .in input::placeholder { color: var(--text3); }
.palette .in input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.palette [data-results] { max-height: min(60vh, 520px); overflow: auto; padding-bottom: 6px; }
.palette .res .t, .palette .res .s { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette .res > div { min-width: 0; }

/* menu del telefono (tavola M-Menu) */
#drawer { padding: 0; align-items: stretch; justify-content: flex-start; }
.drawer .close { position: absolute; top: 8px; right: -52px; width: 44px; height: 44px; padding: 0; background: transparent; color: var(--text); }
.drawer .nav-item { width: 100%; }
#drawer[hidden] { display: none; }

/* fogli e dialoghi */
.overlay.center { align-items: center; padding-top: 0; }
.overlay.bottom { align-items: flex-end; padding: 0; }
.sheet .chips { display: flex; gap: 8px; padding: 4px 8px 8px; flex-wrap: wrap; }
.sheet form { margin: 0; }
.dialog .choices { display: flex; gap: 8px; flex-wrap: wrap; }
.menu form { margin: 0; }
.menu .mi { color: var(--text); }

/* modalità modifica di una sezione */
.editing .edit-hide { display: none; }

/* testo grezzo che si apre */
.raw-wrap { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }

/* tabelle */
.tbl td .i { vertical-align: -2px; }
.tbl .nowrap { white-space: nowrap; }

/* piè di pagina */
.footer a { color: var(--text2); }

/* codice e comandi copiabili nei paragrafi */
.p { color: var(--text2); margin: 0; }

/* i link di testo in pagina */
.lnk { color: var(--link); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--link) 40%, transparent); }
.lnk:hover { text-decoration-color: currentColor; }

/* layout a due colonne del dettaglio progetto */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.two-col > aside { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 72px; }
@media (max-width: 1100px) { .two-col { grid-template-columns: minmax(0, 1fr); } .two-col > aside { position: static; } }

/* griglie di card */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.kpis.seven { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.kpis.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpis.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .kpis.seven { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .kpis.seven, .kpis.four, .kpis.five { grid-template-columns: 1fr 1fr; }
  .frow.two, .frow.three { grid-template-columns: 1fr; }
  .frow.inline { grid-auto-flow: row; grid-auto-columns: auto; }
  .page-head { flex-direction: column; }
  .sect-head { flex-wrap: wrap; }
  .card-head { flex-wrap: wrap; }
  .mlist { display: flex; flex-direction: column; gap: 8px; }
  .auth .side { display: none; }
  .auth .brand .mark { width: 42px; height: 28px; }       /* il marchio del modulo è quello della testata (tavola M-Accesso) */
}

/* il blocco ad altezza fissa della banda non deve crescere con testi lunghi */
.band .title, .band .sub { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; }
.band .title { -webkit-line-clamp: 2; }
.band .sub { -webkit-line-clamp: 2; }

/* i sette numeri di un server aperto (le tavole li definiscono solo per il telefono) */
.facts { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.fact { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fact .k { font-size: 11px; color: var(--text3); font-weight: 500; text-transform: uppercase; letter-spacing: .05em; }
.fact .v { font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; font-family: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-body .facts + .hint { margin-top: 2px; }
@media (max-width: 1100px) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 720px) { .facts { grid-template-columns: 1fr 1fr; } }

/* riga allarme: variante telefono dentro la stessa testa */
.m-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.m-main .ttl { font-weight: 600; font-size: 15px; line-height: 20px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.row .extras { display: contents; }
.row.pause { border-left: 3px solid var(--pause); }     /* un server in pausa (le righe allarme tengono il colore della gravità) */
@media (max-width: 720px) { .mrow.pause { border-left: 3px solid var(--pause); } }
.last-deploy { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.one-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }          /* una riga, il resto nel dettaglio (tavola M-Progetti) */

/* telefono: il prossimo passo a tutta larghezza, "Altro" bordato, niente titolo doppio (tavole M-*) */
@media (max-width: 720px) {
  .row-head .acts form { flex: 1; display: flex; }
  .row-head .acts form .btn { flex: 1; }
  .row-head .acts .btn.icon { border-color: var(--border2); background: var(--surface); }
  /* in lavorazione / in pausa (tavola M-Allarmi): chi o fino a quando su una riga intera, sotto le azioni */
  .row-head .acts.m-stack { flex-wrap: wrap; }
  .row-head .acts.m-stack > .badge { flex: 1 1 100%; height: 28px; font-size: 13px; padding: 0 10px 0 8px; }
  .row-head .acts.m-stack > .badge .i { width: 16px; height: 16px; }
  .page-head.m-hide { display: none; }
  /* testo in linea: da flex, i link alti 44 px sfalsavano le righe */
  .meta.m-inline { display: block; }
  .meta.m-inline > * { margin-right: 6px; }
  /* dettaglio progetto (tavola M-Progetto): le due colonne diventano una lista, la scheda subito dopo lo stato */
  .pgrid2.m-flow { display: flex; flex-direction: column; align-items: stretch; gap: 16px; }
  .pgrid2.m-flow > .sect, .pgrid2.m-flow > aside { display: contents; }
  .m-order-2 { order: 2; } .m-order-3 { order: 3; } .m-order-4 { order: 4; } .m-order-5 { order: 5; }
  .m-order-6 { order: 6; } .m-order-7 { order: 7; } .m-order-8 { order: 8; } .m-order-9 { order: 9; } .m-order-10 { order: 10; } .m-order-11 { order: 11; }
  .acts-row .btn.block { flex: 1; }
  /* errori (tavola M-Errori): il contatore in colonna, l'andamento a tutta larghezza, due pulsanti pari */
  .rh-main.nobadge.err-head { grid-template-columns: 44px minmax(0, 1fr); }
  .m-spark .spark { width: 100%; height: 24px; }
  .m-spark .spark circle { display: none; }
  .err-acts > .btn { flex: 1 1 0; }
  .err-acts > .btn.ghost { border-color: var(--border2); background: var(--surface); }
  .err-acts > .cmd { flex: 1 1 100%; }
}

/* mini andamenti (history.sparkline) */
.spark { display: block; overflow: visible; }
.spark polyline { fill: none; stroke: currentColor; stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.spark circle { fill: currentColor; }
.spark line { stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; opacity: .7; }
.spark .g-warn { stroke: var(--warn); } .spark .g-crit { stroke: var(--crit); }
.spark-ok { color: var(--work); } .spark-warn { color: var(--warn); } .spark-crit { color: var(--crit); }
.err-spark .spark { color: inherit; }        /* errori: grigio, rosso se caldi (tavola Errori), non il blu dei grafici */
.row-head .acts .spark { width: 110px; height: 26px; }

/* il feed: tre colonne fisse, niente sovrapposizioni (tavola Cambiamenti) */
.ev .what { min-width: 0; overflow-wrap: anywhere; }
.ev .what .srv a { color: var(--text2); }
.ev .badge { max-width: 100%; }

/* pannelli dei dettagli: schede su desktop, accordion sul telefono */
.tabpanel { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.tabpanel > .acc-body { border-top: 0; }
@media (min-width: 721px) {
  .tabpanel > .acc-head { display: none; }
  .tabpanel > .acc-body[hidden] { display: block !important; }
}
@media (max-width: 720px) {
  .tabpanel[hidden] { display: block !important; }
  .tabpanel > .acc-body { border-top: 1px solid var(--border); }
  .tabpanels { display: flex; flex-direction: column; gap: 8px; }
  .acc-head { min-height: 48px; }
}
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.checklist li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--border); font-size: 13.5px; line-height: 18px; }
.checklist li:last-child { border-bottom: 0; }
.checklist .fixline { color: var(--text2); font-size: 12.5px; margin-top: 2px; }
.agentbox { display: flex; flex-direction: column; gap: 10px; }
.head-actions { display: flex; gap: 8px; align-items: flex-start; }
.meta .copy-inline { display: inline-flex; align-items: center; gap: 6px; }

/* il riepilogo del mattino, in anteprima nelle impostazioni */
.digest-preview { margin: 8px 0 12px; }
.digest-preview summary { cursor: pointer; color: var(--text2); font-size: 13px; min-height: 32px; display: flex; align-items: center; }
.digest-preview pre { white-space: pre-wrap; overflow-wrap: anywhere; font-family: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12.5px; line-height: 18px; color: var(--text); background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 12px; margin: 6px 0 0; max-height: 360px; overflow: auto; }

/* la freccia della riga gira quando la riga è aperta (ui.js cambia solo la classe) */
.row-head .chev, .acc-head .chev { transition: transform .15s ease; }
.row.open > .row-head .chev, .acc.open > .acc-head .chev { transform: rotate(90deg); }
.m-howto { align-self: flex-start; padding-left: 0; }
.row.open .m-howto .chev { transform: rotate(180deg); }
@media (min-width: 721px) { .band.lead-wide { grid-template-columns: minmax(0, 1.6fr) 1fr 1fr; } }

/* dettagli del server: la riga di un controllo (tavola ServerDettaglio) */
.ev.checkline { grid-template-columns: 20px 150px 110px minmax(0, 1fr); align-items: center; }
.stack { display: flex; flex-direction: column; gap: 12px; max-width: 560px; }
.acts-row { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 720px) {
  .ev.checkline { grid-template-columns: 20px minmax(0, 1fr) auto; gap: 4px 10px; }
  .ev.checkline .t2 { grid-column: 2 / -1; }
  .tabpanel.linked > .acc-body { display: none !important; }
  .acts-row .btn { height: 44px; }
}
@media (max-width: 720px) { .story { row-gap: 6px; column-gap: 16px; } .acc-head .right { text-align: right; } }
.group-head .ttl { white-space: nowrap; }

/* grafici: due colonne larghe, così le etichette dentro l'SVG restano leggibili */
.charts { grid-template-columns: repeat(auto-fill, minmax(min(460px, 100%), 1fr)); }
.chart .chart-head .k { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart .chart-head .win button { white-space: nowrap; }
.row-head.card-head { display: flex; flex-direction: column; align-items: stretch; }
.row-head.card-head .facts:empty { display: none; }
.m-evhead { display: block; margin-bottom: 4px; }        /* in linea: il link alto 44 px non allunga la riga */
.m-evhead > .badge { margin-right: 6px; vertical-align: middle; }
.m-evhead .u { color: var(--text2); font-size: 12px; }
.feed-filters .input { height: 36px; }
.feed-filters .seg { flex-wrap: wrap; max-width: 100%; }      /* eleven kinds with their counts: to the next line, not off the page */
.feed-filters .input.sel { padding-right: 4px; }
@media (max-width: 720px) {
  .feed-filters { align-items: stretch; }
  .feed-filters .input { flex: 1 1 calc(50% - 4px); min-width: 0; height: 44px; }   /* server e progetto affiancati */
  .feed-filters .seg { flex: 1 1 auto; }
  .feed-filters .seg a { height: 36px; flex: 1; justify-content: center; }
  .feed-filters .btn { height: 44px; }
  .feed-filters .right { flex-basis: 100%; margin-left: 0; }
}
.kpis.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
a.kpi:hover { background: var(--surface2); }
.kpi.on { box-shadow: inset 0 0 0 1px var(--text2); }
.inv-filters .input.grow { flex: 1 1 260px; }
@media (max-width: 1100px) { .kpis.six { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .kpis.six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .inv-filters .input.grow { flex: 1 1 100%; height: 44px; order: 2; }
  .inv-filters .seg { order: 1; }
}

/* pagina progetto (tavola Progetto) */
.pgrid2 { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.dl.dl4 { grid-template-columns: 90px minmax(0, 1fr) 90px minmax(0, 1fr); }
.dl .dd-wide { grid-column: span 3; }
.dl.dl-sep { border-top: 1px solid var(--border); padding-top: 12px; }
.dl dd .btn.sm { height: 24px; padding: 0 6px; vertical-align: middle; }
.linkgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.linkwrap { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.linkcard .b { min-width: 0; flex: 1; }
.linkcard .t { font-weight: 600; }
.linkcard .s { color: var(--text2); font-size: 12.5px; line-height: 17px; overflow: hidden; text-overflow: ellipsis; }
.linkcard .ext { color: var(--text3); flex: none; }
a.linkcard:hover { background: var(--surface2); }
.linkcard.static { background: var(--surface2); }
.linkcard.is-missing { border-style: dashed; border-color: var(--warn); }
.linktools { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.linkform, .linkadd { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.linkform .input { flex: 1 1 180px; height: 32px; }
.linkadd .input { flex: 1 1 200px; }
.editing .view-only { display: none; }
.gaplist { margin: 0; padding-left: 18px; color: var(--text2); font-size: 13px; line-height: 19px; }
.spark-inline { display: inline-flex; margin-left: auto; }
.spark-inline .spark { width: 120px; height: 28px; }
.checks > div > .i { flex: none; }
.band > a.cell { display: flex; flex-direction: column; align-items: stretch; white-space: normal; }   /* .cell dei chip non vale per la banda */
.dl dd { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 1100px) { .pgrid2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) {
  .dl.dl4 { grid-template-columns: 90px minmax(0, 1fr); }
  .dl .dd-wide { grid-column: auto; }
  .linkgrid { grid-template-columns: 1fr; }
  .linkcard { min-height: 56px; }
  .spark-inline { display: none; }
}

/* tabelle larghe: su desktop scorrono dentro il loro riquadro, mai la pagina */
.tbl-wrap { overflow-x: auto; border-radius: 10px; position: relative; }   /* relative: anche le etichette .sr restano dentro */
.tbl.dense td, .tbl.dense th { padding-left: 8px; padding-right: 8px; }
.tbl.dense .sub { max-width: 180px; }
.tbl.fleet .cell { white-space: normal; }                         /* "57% liberi, swap al 47%": two lines, not a cut column */
.tbl.fleet td .cell > span { display: inline; }
/* What a row repeats elsewhere (.xl) shows only where the table has room for it, judged by the table's own width and
   not the window's, which counted the sidebar as room (2026-10-26): the server table needs about 1120 px with it. */
.tbl-wrap { container-type: inline-size; }
@container (max-width: 1160px) { .tbl .xl { display: none; } }
.tbl.dense th { letter-spacing: .03em; }
.tbl .nowrap, .tbl .cell { white-space: nowrap; }
/* A manifest may name an environment with a whole sentence: a chip keeps to one line, cut, and its title has it all
   (2026-10-26). In a table a length, not a percentage: in a cell sized by its content a percentage holds nothing, and
   that sentence made Ambienti 747 px wide and pushed Progetti sideways. */
.env { display: inline-block; line-height: 20px; max-width: min(100%, 24ch); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.tbl .env { max-width: 24ch; }
/* A record opens its detail from anywhere in it (ui.js, rowClick): the pointer and the hover say so, and a row whose
   name link holds the keyboard's focus is lit like a hovered one, so Enter's target is visible. The chevron at the
   end is a cue, not a second link: one tab stop per row. */
.tbl tr.link { cursor: pointer; }
.tbl tr.link:focus-within td { background: var(--surface2); }
.tbl tr.link a[data-row-link]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.tbl th.go, .tbl td.go { width: 36px; padding-left: 0; text-align: right; }
.tbl .go, .tbl .go-i { color: var(--text3); }
.tbl .go-i { display: inline-flex; width: 28px; justify-content: center; align-items: center; align-self: center; }
.tbl .go .i, .tbl .go-i .i { vertical-align: -3px; transition: transform .12s ease; }
.tbl tr.link:hover .go, .tbl tr.link:hover .go-i, .tbl tr.link:focus-within .go, .tbl tr.link:focus-within .go-i { color: var(--text); }
.tbl tr.link:hover .go .i, .tbl tr.link:hover .go-i .i { transform: translateX(2px); }
.tbl tr.link + tr.sub-row { cursor: pointer; }                    /* the note under a row is part of its record */
.tbl tr.link:has(+ tr.sub-row:hover) td { background: var(--surface2); }
.tbl tr.link:has(+ tr.sub-row:hover) .go { color: var(--text); }
.row-head:has(> [data-toggle], a[data-row-link]) { cursor: pointer; }
.tl-row:has(a[data-row-link]) .tl-name, .tl-row:has(a[data-row-link]) .tl-stat { cursor: pointer; }
.tl-row:has(a[data-row-link]):hover .tl-name a { text-decoration: underline; text-underline-offset: 3px; }

/* impostazioni (tavola Impostazioni) */
.settings-top { display: grid; grid-template-columns: 1fr 1.3fr; gap: 16px; align-items: start; }
.ev.channel-line { grid-template-columns: 110px minmax(0, 1fr); align-items: center; }
.invite { flex-direction: row !important; align-items: center; gap: 16px !important; }
/* minmax(0, …): a select with a long option must shrink with its column, not push the form off the page at 1280 px */
.frow.store-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr) auto; align-items: end; }
.frow.pause-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 120px minmax(0, 1.4fr) auto; align-items: end; }
.frow .input.sel select { min-width: 0; width: 100%; text-overflow: ellipsis; }
.field.end { justify-content: flex-end; }
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--surface3); color: var(--text); font-size: 11px; font-weight: 600; flex: none; }
.check input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--ink); margin: 0; }
.check { font-size: 13px; color: var(--text2); cursor: pointer; }
/* righe senza freccia (pause in Impostazioni): la regola va sulla forma, non sullo stato, o prende anche i server in pausa */
@media (min-width: 721px) { .rh-main.nochev { grid-template-columns: 128px minmax(0, 1fr); } }
@media (max-width: 1100px) { .frow.store-row, .frow.pause-row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) {
  .settings-top { grid-template-columns: minmax(0, 1fr); }
  .frow.store-row, .frow.pause-row { grid-template-columns: minmax(0, 1fr); }
  .frow .input { height: 44px; }
  .ev.channel-line { grid-template-columns: 90px minmax(0, 1fr); align-items: start; }   /* due colonne anche qui (tavola M-Impostazioni) */
  .ev.channel-line .what > b { display: block; }
  #profilo .acts-row { flex-direction: column; align-items: stretch; }
  #profilo .acts-row .btn, #canali form.acts-row .btn { justify-content: center; width: 100%; }
  .m-fold:not(.m-open) { display: none; }                  /* i moduli di aggiunta si aprono dal loro pulsante */
  .mrow.urow { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .mrow.urow form { margin: 0; }
  .invite { flex-wrap: wrap; }
  .settings-nav { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
  .settings-nav .chip { flex: none; }
}
.auth { min-height: 100vh; height: auto; }
.acts-row { align-items: center; }
@media (max-width: 720px) {
  .rh-main.nobadge { grid-template-columns: minmax(0, 1fr); }        /* la regola desktop vinceva: testo in 24 px */
  .inv-filters .seg { overflow-x: auto; max-width: 100%; }
  .inv-filters .seg a { white-space: nowrap; }
}
.cmd { min-width: 0; max-width: 100%; }
.cmd > span { min-width: 0; overflow-wrap: anywhere; }
/* a line to paste somewhere else (the browser beacon): all of it readable, not an ellipsis */
.cmd.wrap { align-items: flex-start; }
.cmd.wrap > span { white-space: normal; overflow: visible; text-overflow: clip; line-height: 20px; padding: 4px 0; }

/* fase 5: sul telefono ogni bersaglio è alto almeno 44 px */
@media (max-width: 720px) {
  .btn.sm, .dl dd .btn.sm { height: 44px; min-height: 44px; }
  .chip, .filters .chip { height: 44px; }
  .seg a, .seg button { min-height: 44px; }
  .input, .input.sel { height: 44px; }
  .input textarea.bare { min-height: 88px; }
  .digest-preview summary { min-height: 44px; }
  .check { min-height: 44px; }
  .check input[type=checkbox] { width: 22px; height: 22px; }
  .mtop > a { min-width: 44px; min-height: 44px; }
  .signals { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
  .signals a { min-height: 44px; }
  a.u { padding-top: 13px; padding-bottom: 13px; }              /* inline: l'area si allarga, le righe no */
  .footer { display: block; text-align: center; line-height: 22px; }   /* testo in linea: da flex, i link alti 44 px sfalsavano le righe */
  .footer > * { margin: 0 3px; }
  .dialog .btn, .sheet .btn { height: 44px; }
  .dialog { width: auto; margin: 0 16px; }
}

/* SLA */
.proj-tabs { align-self: flex-start; }
.sla-item { display: flex; flex-direction: column; gap: 6px; }
.sla-item + .sla-item { border-top: 1px solid var(--border); padding-top: 12px; }
.sla-item .top-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kpi .acts-row .btn.sm { height: 28px; }
/* AA: dentro i banner colorati il testo terziario non basta (3,9:1 sul giallo scuro) */
.banner .t3 { color: var(--text2); }

/* dopo un deploy, fuori dal server: una riga di stato sotto il feed e nelle schede ambiente */
.ev .sig.after { display: inline-flex; margin-left: 4px; }
.dd-wide .sig { margin-top: 4px; }
/* a status line with a long sentence wraps instead of widening the page (kit .sig is nowrap) */
.dd-wide .sig, .sec-block .sig, #librerie .sig, .ev .what .sig { white-space: normal; align-items: flex-start; max-width: 100%; }
.dd-wide .sig > span, .ev .what .sig > span { min-width: 0; overflow-wrap: anywhere; }
.dd-wide .sig .i, .ev .what .sig .i { flex: none; margin-top: 2px; }
.dd-wide.outside { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.dd-wide.outside .sig { margin-top: 0; }

/* Impostazioni: due passaggi, Telegram, registro (due colonne: ora e testo) */
.ev.audit-line { grid-template-columns: 96px minmax(0, 1fr); }
@media (max-width: 720px) { .ev.audit-line { grid-template-columns: 84px minmax(0, 1fr); } }
.twofa-line { display: flex; flex-direction: row; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.twofa-line .btn { margin-left: auto; }
.tg-state { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.tg-scope { border: 0; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.tg-scope legend { padding: 0; margin-bottom: 4px; }
.check input[type=radio] { width: 18px; height: 18px; accent-color: var(--ink); margin: 0; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 6px 24px; font-size: 15px; }
.otp-secret { font-size: 16px; letter-spacing: .06em; word-break: break-all; }
@media (max-width: 720px) {
  .twofa-line .btn { margin-left: 0; width: 100%; justify-content: center; }
  .check input[type=radio] { width: 22px; height: 22px; }
  .codes { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 12px; }
}

/* server: sicurezza, traffico, job (agente 3.2) */
.vuln-fold { margin-top: 2px; }
.vuln-fold summary { cursor: pointer; color: var(--text2); font-size: 13px; min-height: 32px; display: flex; align-items: center; gap: 6px; list-style: none; }
.vuln-fold summary::-webkit-details-marker { display: none; }
.vuln-fold summary::before { content: "▸"; color: var(--text3); }
.vuln-fold[open] summary::before { content: "▾"; }
.vuln-fold ul { margin: 4px 0 6px; padding-left: 18px; display: grid; gap: 6px; font-size: 13px; line-height: 18px; }
.vuln-fold li { overflow-wrap: anywhere; }
@media (max-width: 720px) { .vuln-fold summary { min-height: 44px; } }
.sec-block { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.sec-block h4 { margin: 0; font-size: 13.5px; }
.sec-dl { grid-template-columns: 140px minmax(0, 1fr); }
.sec-dl dd div + div { margin-top: 2px; }
.port-list { display: flex; flex-wrap: wrap; gap: 8px; }
.port { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; }
.port.warn { border-color: var(--warn); }
.port.crit { border-color: var(--crit); }
.ev.job-line { grid-template-columns: 116px minmax(0, 1fr); }
@media (max-width: 720px) {
  .sec-dl { grid-template-columns: minmax(0, 1fr); }
  .ev.job-line { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* annotazioni sui grafici e intervallo condiviso */
.chart .ann .a line { stroke: var(--work); stroke-width: 1; stroke-dasharray: 3 3; opacity: .8; }
.chart .ann .a path { fill: var(--work); }
.chart .ann .k-restart line, .chart .ann .k-reboot line { stroke: var(--warn); }
.chart .ann .k-restart path, .chart .ann .k-reboot path { fill: var(--warn); }
.chart .ann .k-upgrade line, .chart .ann .k-config line { stroke: var(--text3); }
.chart .ann .k-upgrade path, .chart .ann .k-config path { fill: var(--text3); }
.chart-range { margin-bottom: 10px; }
.chart-range button { font: inherit; }

/* Storico: una riga per sito o server, una casella per ora, sei ore, giorno o settimana */
.tl-bar { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; }
.tl-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text2); }
.tl-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tl-legend .c { display: inline-block; width: 12px; height: 12px; border-radius: 2px; }
.tl { padding: 4px 0; }
.tl-row { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr) 128px; gap: 14px; align-items: center; padding: 8px 14px; }
.tl-row + .tl-row { border-top: 1px solid var(--border); }
.tl-name { min-width: 0; font-weight: 500; font-size: 13.5px; overflow-wrap: anywhere; }
.tl-name .sub { font-weight: 400; font-size: 12px; color: var(--text3); }
.tl-stat { font-size: 13px; text-align: right; }
.tl-stat .sub { font-size: 12px; color: var(--text2); }
.tl-cells { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 1px; height: 22px; }
.tl-cells .c { display: block; min-width: 0; border-radius: 1px; }
/* Each state has a shape as well as a colour (UX audit, 6): ok is pale, warn is striped, crit is solid with a
   dark edge, mute is dotted grey. The legend uses the same classes, so it shows the same shapes. */
.c.ok { background: color-mix(in srgb, var(--ok) 45%, transparent); }
.c.warn { background: repeating-linear-gradient(135deg, var(--warn) 0 3px, color-mix(in srgb, var(--warn) 35%, transparent) 3px 6px); }
.c.crit { background: var(--critFill); border-bottom: 3px solid var(--crit); }
.c.mute { background-color: color-mix(in srgb, var(--mute) 30%, transparent); background-image: radial-gradient(circle, var(--mute) 1.2px, transparent 1.6px); background-size: 5px 5px; }
.tl-tip { position: absolute; z-index: 30; max-width: 290px; background: var(--surface); border: 1px solid var(--border2); border-radius: 8px; box-shadow: var(--shadowMd); padding: 8px 10px; font-size: 12.5px; line-height: 17px; color: var(--text); }
.c.na { background: var(--surface3); }
.c.future { background: transparent; }
.c.d { box-shadow: inset 0 3px 0 var(--work); }
.tl-axis { padding-top: 0; }
.tl-axis + .tl-row, .tl-row + .tl-axis { border-top: 0; }
.tl-ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--text3); font-family: 'IBM Plex Mono', ui-monospace, monospace; }
@media (max-width: 720px) {
  .tl-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 10px 12px; }
  .tl-cells, .tl-ticks { grid-column: 1 / -1; }
  .tl-stat { grid-row: 1; grid-column: 2; }
  .tl-cells { gap: 0; height: 26px; }
  .tl-axis > div:empty { display: none; }
  .tl-ticks span:nth-child(2), .tl-ticks span:nth-child(4) { display: none; }
}

/* report mensile */
.frow.report-row { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; align-items: end; }
.report { display: flex; flex-direction: column; gap: 24px; }
.report-head { display: flex; flex-direction: column; gap: 6px; }
.report-head .h1 { margin: 0; }
.report-brand { display: none; align-items: center; gap: 8px; font-size: 12px; color: var(--text2); }
.report-tbl .num { white-space: nowrap; }
.report-method p { max-width: 80ch; margin: 0; }
@media (max-width: 720px) {
  .frow.report-row { grid-template-columns: minmax(0, 1fr); }
  .report-head .h1 { font-size: 22px; line-height: 28px; }
}
.print-only { display: none; }
@media print {
  :root, :root[data-theme] {
    --bg: #FFFFFF; --surface: #FFFFFF; --surface2: #F1EEE8; --surface3: #E9E5DD; --border: #E2DED6; --border2: #CFCAC0;
    --text: #1A1917; --text2: #55524C; --text3: #6E6A63; --crit: #B82323; --critBg: #FBE9E7; --warn: #8A5A00;
    --warnBg: #FCF1D8; --ok: #1B7A47; --okBg: #E2F4E8; --mute: #6E6A63; --muteBg: #EEEBE4; --link: #1A56B8;
  }
  body { background: #FFFFFF; color: #1A1917; }
  .sidebar, .topbar, .mtop, .tabbar, .footer, .no-print, #drawer, #search, .overlay, .banner { display: none !important; }
  .shell { display: block; height: auto; }
  .main { display: block; height: auto; }
  .page { max-width: none; padding: 0; gap: 16px; }
  .report-brand { display: flex; }
  .print-only { display: block; }
  .kpis.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kpi, .tbl, .card { box-shadow: none; break-inside: avoid; }
  .tbl-wrap { overflow: visible; }
  .tbl tr { break-inside: avoid; }
  .sect { break-inside: auto; }
  a { color: inherit; text-decoration: none; }
  @page { margin: 14mm 12mm; }
}

/* Charts (UX audit 2026-09-23): two more series, dashed so they read apart from the first two; counts per
   bucket drawn as bars; the legend swatch of a dashed series is dashed too. */
.chart .line.s4 { stroke: var(--work); stroke-dasharray: 6 4; }
.chart .line.s5 { stroke: var(--pause); stroke-dasharray: 6 4; }
.chart .bars rect { fill: var(--work); opacity: .85; }
.chart .bars.s1 rect { fill: var(--pause); } .chart .bars.s2 rect { fill: var(--text2); } .chart .bars.s3 rect { fill: var(--ok); }
.chart .legend .sw.dash { background: repeating-linear-gradient(90deg, currentColor 0 4px, transparent 4px 7px) !important; }
/* A chart before its first answer shows a skeleton, never a blank box; one whose polling fails fades and
   says when its data stopped (UX audit, 4 and 9). */
.chart .chart-sk { display: none; aspect-ratio: 4 / 1; width: 100%; border-radius: 6px; }
.chart.loading .chart-sk { display: block; }
.chart.loading svg, .chart.loading .legend, .chart.loading details { display: none; }
.chart .stale-note { display: none; margin-left: auto; font-size: 12px; color: var(--warn); font-weight: 500; }
.chart.stale .stale-note { display: inline; }
.chart.stale .chart-head .v { margin-left: 0; color: var(--text3); }
.chart.stale svg { opacity: .5; }
/* On the phone only the group's range control remains: four 24 px buttons per chart were not a target
   (UX audit, 7). */
@media (max-width: 720px) { .chart .win { display: none; } }

/* Keyboard and contrast (UX audit, 8): a visible focus on every control the kit forgot, the search field's
   ring back (the kit removed the outline and left nothing), the "0 allarmi" pill above AA on its surface,
   the select chevron drawn with the theme's own colour instead of a hex baked into a data URI, and the
   chart focusable so the arrows can walk its points. */
.rh-main:focus-visible, .acc-head:focus-visible, .chip:focus-visible, .seg button:focus-visible, .seg a:focus-visible,
.menu .mi:focus-visible, .tabbar a:focus-visible, .searchbtn:focus-visible, .ib:focus-visible, .chart svg:focus-visible,
.chart .win button:focus-visible, .tl-cells:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.palette .in:focus-within { box-shadow: inset 0 -2px 0 var(--focus); }
.nav-item .count.zero { color: var(--text2); }
.input.sel { position: relative; }
.input.sel select.bare { background-image: none; padding-right: 26px; }
.input.sel::after { content: ""; position: absolute; right: 10px; top: 50%; width: 12px; height: 12px; transform: translateY(-50%); pointer-events: none;
  background: var(--text3); -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>") center / contain no-repeat; }
/* The chart that explains a problem lives inside its row (UX audit, 14): a little quieter than the ones of Andamento. */
.row-body .chart.mini { margin-top: 8px; padding: 10px 12px; background: var(--surface2); }

/* Public status pages (status.py): one column, the kit's light theme, no navigation, nothing internal. */
body.public { background: var(--bg); }
.public-shell { max-width: 880px; margin: 0 auto; padding: 24px 16px 48px; }
.public-head { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.public-head .word { font-weight: 700; font-size: 17px; letter-spacing: -.02em; line-height: 20px; }
.public-head .sub { font-size: 12px; color: var(--text3); }
.public .band { grid-template-columns: 1fr; }
.public-foot { margin-top: 32px; font-size: 12px; color: var(--text3); }

/* Igiene: one finding per row, the label in its own column that wraps instead of running into the detail
   (the .ev grid of the checks list has a narrow first column: "Librerie vulnerabili: brainCRM production" overlapped). */
.finding { display: grid; grid-template-columns: minmax(200px, 280px) minmax(0, 1fr); gap: 4px 20px; padding: 10px 0; border-top: 1px solid var(--border); }
.finding:first-child { border-top: 0; padding-top: 4px; }
.finding .lbl { display: flex; align-items: flex-start; gap: 6px; min-width: 0; font-weight: 500; line-height: 20px; overflow-wrap: anywhere; }
.finding .lbl .i { flex: none; margin-top: 3px; }
.finding .lbl .wt { margin-left: auto; padding-left: 8px; color: var(--text3); font-size: 12px; white-space: nowrap; }
.finding .body { min-width: 0; }
.finding .body .t2 { line-height: 20px; overflow-wrap: anywhere; }
.finding .body .p { margin-top: 4px; font-size: 13px; }
@media (max-width: 720px) { .finding { grid-template-columns: 1fr; gap: 2px; } }

/* Rilasci (releases.py): the commits of one deploy, one per line, the sha quiet before the subject. */
.rel-commits { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.rel-commits li { line-height: 20px; overflow-wrap: anywhere; }
/* the verdict and the migrations warning are sentences: they wrap on a phone (kit .sig is nowrap) */
#rilasci .row-body .sig, .explain-box .sig { white-space: normal; align-items: flex-start; max-width: 100%; }
#rilasci .row-body .sig > span, .explain-box .sig > span { min-width: 0; overflow-wrap: anywhere; }
#rilasci .row-body .sig .i, .explain-box .sig .i { flex: none; margin-top: 2px; }

/* «Spiegamelo» (explain.py): Claude's answer under an error or on a check page, the steps numbered. */
.explain-box { display: grid; gap: 8px; margin-top: 10px; }
.explain-ask { display: flex; gap: 8px 12px; flex-wrap: wrap; align-items: center; }
.explanation .card-head .ttl { display: inline-flex; align-items: center; gap: 6px; }
.explain-steps { margin: 4px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.explain-steps li { line-height: 20px; overflow-wrap: anywhere; }
