/* NotiziaE PRO — aggiunte al design system Alveo (app.css resta identico all'originale). */
#radice { min-height: 100vh; }
.pro-carica { display: grid; place-items: center; min-height: 40vh; color: var(--label-3); }

/* Coda: righe cliccabili */
.coda { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--r-container); box-shadow: var(--shadow-surface); overflow: hidden; }
.coda-riga { border-top: 1px solid var(--sep); }
.coda-riga:first-child { border-top: 0; }
.coda-riga > a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; padding: 14px 20px; color: inherit; text-decoration: none; min-height: 64px; }
.coda-riga > a:hover { background: var(--fill); text-decoration: none; }
.coda-titolo { font-weight: 600; font-size: 15px; line-height: 20px; overflow-wrap: anywhere; }
.coda-sotto { grid-column: 1; display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 13px; color: var(--label-3); }
.coda-lato { grid-row: 1 / span 2; grid-column: 2; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; font-size: 13px; color: var(--label-3); }
.coda-riga.occupata .coda-titolo { color: var(--label-2); font-weight: 500; }
.urgente { color: var(--brand); font-weight: 600; font-size: 12px; letter-spacing: .02em; text-transform: uppercase; }

/* Scheda notizia: email originale a sinistra, bozza a destra */
.scheda { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 24px; align-items: start; }
.scheda > * { min-width: 0; }
.scheda .card + .card { margin-top: 24px; }
.email-testa { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 16px; margin: 0 0 16px; font-size: 13px; }
.email-testa dt { color: var(--label-3); }
.email-testa dd { margin: 0; overflow-wrap: anywhere; }
.email-corpo { width: 100%; height: 420px; border: 1px solid var(--sep); border-radius: var(--r-control); background: #fff; }
.email-piano { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.5; max-height: 520px; overflow: auto; margin: 0; padding: 12px 16px; border: 1px solid var(--sep); border-radius: var(--r-control); background: var(--surface-2); font-family: var(--font); }
.allegati { list-style: none; margin: 0; padding: 0; }
.allegati li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--sep); font-size: 15px; }
.allegati li:first-child { border-top: 0; }
.allegati .nome { flex: 1; min-width: 0; overflow-wrap: anywhere; }

/* Editor del testo */
.editor { border: 1px solid var(--sep-strong); border-radius: var(--r-control); background: var(--surface); box-shadow: var(--field-inset); }
.editor:focus-within { border-color: var(--ring); box-shadow: var(--field-inset), 0 0 0 1px var(--ring), 0 0 0 5px var(--ring-halo); }
.editor-barra { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; border-bottom: 1px solid var(--sep); }
.editor-barra button { min-height: 32px; min-width: 36px; padding: 0 8px; font-size: 13px; box-shadow: none; background: transparent; }
.editor-barra button:hover { background: var(--fill); }
.editor-barra button.on { background: var(--fill-2); font-weight: 600; }
.editor .tiptap { min-height: 280px; max-height: 60vh; overflow: auto; padding: 12px 16px; font-size: 17px; line-height: 1.55; outline: none; }
.testo-articolo { font-size: 17px; line-height: 1.55; overflow-wrap: anywhere; }
.tiptap > :first-child, .testo-articolo > :first-child { margin-top: 0; }
.tiptap > :last-child, .testo-articolo > :last-child { margin-bottom: 0; }
.tiptap p, .testo-articolo p { margin: 0 0 12px; }
.tiptap h2, .testo-articolo h2 { font-size: 20px; margin: 20px 0 8px; }
.tiptap h3, .testo-articolo h3 { font-size: 17px; margin: 16px 0 8px; }
.tiptap blockquote, .testo-articolo blockquote { margin: 0 0 12px; padding-left: 12px; border-left: 3px solid var(--sep-strong); color: var(--label-2); }
.campo-titolo { font-size: 20px !important; font-weight: 600; height: auto !important; min-height: 48px; }
.salvataggio { font-size: 13px; color: var(--label-3); min-width: 9ch; }

/* Anteprima Facebook */
.fb { border: 1px solid var(--sep-strong); border-radius: var(--r-control); overflow: hidden; background: var(--surface-2); max-width: 520px; }
.fb-foto { display: block; width: 100%; aspect-ratio: 1.91 / 1; object-fit: cover; background: var(--fill); }
.fb-vuota { display: grid; place-items: center; width: 100%; aspect-ratio: 1.91 / 1; background: var(--fill); color: var(--label-3); font-size: 13px; }
.fb-testi { padding: 10px 12px 12px; border-top: 1px solid var(--sep); }
.fb-sito { font-size: 12px; text-transform: uppercase; color: var(--label-3); letter-spacing: .02em; }
.fb-titolo { font-size: 16px; font-weight: 600; line-height: 20px; margin-top: 2px; overflow-wrap: anywhere; }
.fb-sotto { font-size: 14px; color: var(--label-3); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.file-nascosto { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* Barra delle decisioni, sempre a portata */
.decisione { position: sticky; bottom: 16px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 24px 0 0; padding: 12px 16px; background: var(--surface); border: 1px solid var(--surface-edge); border-radius: var(--r-container); box-shadow: var(--shadow-raised); }
.decisione .spazio { flex: 1; }
.decisione button.primary, .decisione button.danger { min-width: 132px; }

/* Finestra del rifiuto */
dialog.foglio { border: 0; border-radius: var(--r-container); padding: 24px; width: min(480px, calc(100vw - 32px)); background: var(--surface); color: var(--label); box-shadow: var(--shadow-raised); }
dialog.foglio::backdrop { background: rgba(0, 0, 0, .4); }
dialog.foglio h2 { margin: 0 0 16px; font-size: 20px; }

/* Canali di pubblicazione e cronologia */
.canali { list-style: none; margin: 0; padding: 0; }
.canali li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 0; border-top: 1px solid var(--sep); align-items: center; }
.canali li:first-child { border-top: 0; padding-top: 0; }
.canali .dett { grid-column: 1 / -1; font-size: 13px; overflow-wrap: anywhere; }
.crono { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.crono li { display: flex; gap: 12px; padding: 6px 0; color: var(--label-2); }
.crono time { color: var(--label-3); flex: none; width: 112px; font-variant-numeric: tabular-nums; }
.impronta { font-family: var(--mono); font-size: 12px; color: var(--label-3); overflow-wrap: anywhere; }
.testa-pillole { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-top: 8px; }

@media (max-width: 1100px) { .scheda { grid-template-columns: minmax(0, 1fr); } .email-corpo { height: 320px; } }
@media (max-width: 860px) {
  .decisione { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 8px); padding: 12px; }
  .decisione button.primary, .decisione button.danger { flex: 1; min-height: 50px; }
  .coda-riga > a { padding: 12px 16px; }
  .crono time { width: 96px; }
}

/* ===== App: Home, Incarichi, Fonte, Bozza, Conferma (stile Alveo) ===== */
.main > * + *, .stretta > * + * { margin-top: 16px; }
.main > .backline + *, .stretta > .backline + * { margin-top: 0; }
.stretta { max-width: 640px; }

.pro-testata-nome { display: none; line-height: 1.15; }
.pro-testata-nome strong { font-size: 15px; color: var(--brand); letter-spacing: .02em; }
.pro-testata-nome small { display: block; font-size: 12px; color: var(--label-3); font-weight: 400; }
.saluto h1 { font-size: 22px; line-height: 28px; margin: 0; letter-spacing: -0.01em; }
.saluto p { margin: 6px 0 0; font-size: 15px; }
.metrics.quattro { grid-template-columns: repeat(4, minmax(0, 1fr)); box-shadow: var(--shadow-surface); }
.btn.grande { display: flex; justify-content: center; align-items: center; min-height: 50px; font-size: 17px; }
.scorciatoie { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.scorciatoie .btn { justify-content: space-between; min-height: 48px; background: var(--surface); box-shadow: var(--shadow-tile); font-weight: 500; }
.chev { width: 16px; height: 16px; flex: none; color: var(--label-3); }
.h-split { justify-content: space-between; }
.h-link { font-size: 15px; font-weight: 400; }
.lista-notifiche { list-style: none; margin: 0 -24px -24px; padding: 0; }
.card > .lista-notifiche:first-child { margin-top: -24px; }
.lista-notifiche li { border-top: 1px solid var(--sep); }
.card > .lista-notifiche:first-child li:first-child { border-top: 0; }
.lista-notifiche a { display: flex; align-items: center; gap: 12px; padding: 12px 24px; min-height: 56px; color: inherit; text-decoration: none; }
.lista-notifiche a:hover { background: var(--fill); }
.lista-notifiche .n-testo { flex: 1; min-width: 0; font-size: 15px; }
.lista-notifiche .n-testo small { display: block; font-size: 13px; }
.lista-notifiche .nuova .n-testo { font-weight: 600; }
.punto { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--info-dot); }
.punto.bad { background: var(--bad-dot); } .punto.ok { background: var(--ok-dot); }
.lista-notifiche li:not(.nuova) .punto { background: var(--fill-2); }
.fasce { list-style: none; margin: 0; padding: 0 0 0 20px; border-left: 2px solid var(--sep-strong); }
.fasce li { position: relative; padding: 0 0 16px; font-size: 15px; }
.fasce li:last-child { padding-bottom: 0; }
.fasce li::before { content: ""; position: absolute; left: -27px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand); }
.fascia-dett { font-size: 13px; color: var(--label-2); }

.segmented.due { display: grid; grid-template-columns: 1fr 1fr; width: 100%; max-width: 420px; }
.segmented.due span { justify-content: center; width: 100%; }
.incarico h2 { font-size: 20px; line-height: 26px; margin: 4px 0 4px; display: block; }
.incarico h2 a { color: inherit; }
.incarico-testa { margin: 0; font-size: 13px; color: var(--label-2); display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.incarico-azioni { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; max-width: 420px; }
.incarico-azioni .btn { justify-content: center; }
a.card.riga-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: inherit; text-decoration: none; padding: 16px 24px; }
a.card.riga-link:hover { background: var(--surface-2); }

.dati-fonte { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--sep); border-radius: var(--r-container); overflow: hidden; box-shadow: var(--shadow-surface); margin-bottom: 16px; }
.dati-fonte > div { background: var(--surface); padding: 12px 16px; min-width: 0; }
.dati-fonte small { display: block; font-size: 12px; color: var(--label-3); }
.dati-fonte strong { display: block; font-size: 15px; overflow-wrap: anywhere; }
.scheda .page-head { margin-bottom: 12px; }
.scheda .page-head h1 { font-size: 22px; line-height: 28px; }
.spie { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin: 0 0 16px; min-height: 24px; }
button.spia-link { background: none; box-shadow: none; min-height: 0; padding: 0; text-decoration: underline; cursor: pointer; }
textarea.campo-titolo { min-height: 0; resize: none; line-height: 1.25; padding: 10px 12px; field-sizing: content; }
.obbl { color: var(--brand); }
.editor .tiptap { min-height: 320px; max-height: none; }
.toolbar.tre { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 480px; }
.toolbar.tre button { padding: 0 8px; }
button.danger-outline { background: var(--surface); color: var(--brand); font-weight: 600; box-shadow: inset 0 0 0 1px var(--brand); }
button.danger-outline:hover { background: var(--brand-tint); color: var(--brand); }
.decisione button.danger-outline { min-width: 132px; }
.solo-telefono { display: none; }
.titolo-conferma { font-size: 20px !important; line-height: 26px; margin: 6px 0 0 !important; display: block !important; }
label.dichiarazione { display: flex; gap: 14px; align-items: flex-start; font-size: 15px; font-weight: 500; line-height: 1.4; cursor: pointer; }
label.dichiarazione input { width: 24px; height: 24px; flex: none; margin: 0; accent-color: var(--ok-dot); }
label.dichiarazione:has(input:checked) { background: var(--ok-bg); }
.colonna-azioni { display: grid; gap: 12px; margin-top: 24px; }
.colonna-azioni button { min-height: 50px; font-size: 17px; }
.mirino { aspect-ratio: 1; max-width: 360px; margin: 0 auto; background: #000; border-radius: var(--r-element); overflow: hidden; display: grid; place-items: center; }
.mirino video { width: 100%; height: 100%; object-fit: cover; }
.mirino p { padding: 16px; text-align: center; color: #d1d1d6; }

/* Collegamento del computer */
.collega-pannello { max-width: 760px !important; width: 100%; }
.card.collega { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center; padding: 32px; text-align: left; }
.collega h1 { font-size: 22px; margin: 0 0 16px; }
.collega-passi { margin: 0 0 16px; padding-left: 20px; font-size: 17px; line-height: 1.7; }
.collega-qr { text-align: center; min-width: 264px; }
.collega-qr img { display: block; border-radius: var(--r-control); background: #fff; }
.collega-codice { font-family: var(--mono); font-size: 20px; letter-spacing: .14em; margin: 12px 0 0; color: var(--label-2); }

@media (max-width: 1100px) {
  .solo-telefono { display: revert; }
  .decisione.solo-telefono { display: flex; }
  .scheda.passo-fonte .col-bozza, .scheda.passo-bozza .col-fonte { display: none; }
}
@media (max-width: 860px) {
  .main > .saluto:first-child { margin-top: 0; }
  .pro-testata-nome { display: block; }
  .topbar .pills { display: none; }
  .metrics.quattro { grid-template-columns: 1fr 1fr; }
  .incarico-azioni, .segmented.due, .toolbar.tre { max-width: none; }
  .decisione { flex-wrap: nowrap; }
  .decisione .spazio { display: none; }
  .decisione button.plain { flex: none; padding: 0 4px; font-size: 13px; }
  .decisione button.danger-outline { flex: 1; min-height: 50px; min-width: 0; }
  .lista-notifiche { margin: 0 -16px -16px; } .card > .lista-notifiche:first-child { margin-top: -16px; }
  .lista-notifiche a { padding: 12px 16px; }
  .editor .tiptap { min-height: 240px; }
}
.segmented.due label { grid-column: auto; }
.brand.pro-testata { flex-direction: row; align-items: center; gap: 10px; }

/* Approvate / In pubblicazione / Pubblicate tenute distinte */
.metrics.sei { grid-template-columns: repeat(6, minmax(0, 1fr)); box-shadow: var(--shadow-surface); }
.metrics a.kpi { color: inherit; text-decoration: none; }
.metrics a.kpi:hover { background: var(--surface-2); }
.kpi.info .value { color: var(--info); }
.segmented.esiti { margin-bottom: 16px; }
@media (max-width: 1100px) { .metrics.sei { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .metrics.sei { grid-template-columns: 1fr 1fr; } }

/* ===== Impaginazione delle schermate di riferimento, resa in stile Alveo ===== */
.app-colonna { max-width: 640px; }
.app-colonna > * + * { margin-top: 16px; }
.scheda > .app-colonna { max-width: none; }
.segno { width: 22px; height: 22px; flex: none; }
.segno.rosso { color: var(--brand); }
.segno.grande { width: 30px; height: 30px; }
.segno.chev { width: 18px; height: 18px; color: var(--label-3); }
.tessera { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: var(--r-element); background: var(--brand-tint); color: var(--brand); }
.tessera .segno { width: 28px; height: 28px; }
.tessera.piccola { width: 40px; height: 40px; border-radius: var(--r-control); }
.tessera.piccola .segno { width: 22px; height: 22px; }
.sbarra { display: inline-block; width: 1px; height: 16px; background: var(--sep-strong); margin: 0 4px; }
.sbarra.alta { height: 48px; margin: 0; flex: none; }

/* Testata dell'app: marchio E | NotiziaE PRO + sottotitolo */
.pro-marchio { width: 40px; height: 40px; border-radius: 8px; }
.pro-sbarra { width: 1px; height: 36px; background: var(--sep-strong); }
.pro-testata-nome strong { font-size: 22px; line-height: 24px; font-weight: 700; color: var(--label); letter-spacing: -0.02em; }
.pro-testata-nome strong em { color: var(--brand); font-style: italic; }
.pro-testata-nome small { font-size: 14px; color: var(--label-2); }

/* Fascia in alto con icona */
.card.fascia-saluto { display: flex; align-items: center; gap: 16px; }
.card.fascia-saluto > * { margin: 0; }
.fascia-saluto h1 { font-size: 20px; line-height: 25px; margin: 0; letter-spacing: -0.01em; font-weight: 700; }
.fascia-saluto p { margin: 6px 0 0; font-size: 15px; line-height: 20px; color: var(--label-2); }

/* Riquadri 2×2 con icona a sinistra */
.riquadri { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.riquadro { display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 12px 16px; border-radius: var(--r-container); background: var(--surface); border: 1px solid var(--surface-edge); box-shadow: var(--shadow-tile); color: var(--label); text-decoration: none; min-width: 0; }
a.riquadro:hover { text-decoration: none; color: var(--label); filter: brightness(.98); }
.riquadro > .segno { width: 28px; height: 28px; }
.riquadro > div { min-width: 0; }
.riquadro span { display: block; font-size: 15px; line-height: 18px; color: var(--label-2); }
.riquadro strong { display: block; font-size: 24px; line-height: 28px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.riquadro strong small { font-size: 20px; font-weight: 500; color: var(--label-2); }
.riquadro strong.piccolo { font-size: 15px; line-height: 19px; font-weight: 600; }
.riquadri.fonte .riquadro strong { font-size: 17px; line-height: 22px; }
.riquadri.fonte .riquadro strong.piccolo { font-size: 14px; line-height: 18px; }
.riquadro.ok { background: color-mix(in srgb, var(--ok-bg) 60%, var(--surface)); } .riquadro.ok > .segno { color: var(--ok); }
.riquadro.bad { background: color-mix(in srgb, var(--bad-bg) 60%, var(--surface)); } .riquadro.bad > .segno { color: var(--brand); }
.riquadro.warn { background: color-mix(in srgb, var(--warn-bg) 60%, var(--surface)); } .riquadro.warn > .segno { color: var(--warn); }

/* Pulsanti */
.btn.pulsantone { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 0 20px; font-size: 19px; font-weight: 700; border-radius: var(--r-element); }
.btn.pulsantone span { flex: 1; text-align: center; }
.btn.spento, .btn.pulsantone.spento { opacity: .45; pointer-events: none; }
.btn.contorno, button.contorno { background: var(--surface); box-shadow: inset 0 0 0 1px var(--sep-strong), var(--shadow-tile); font-weight: 600; }
.btn.contorno:hover, button.contorno:hover { background: var(--surface-2); }
button.rosso-testo { color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--brand); }
button.rosso-testo:hover { background: var(--brand-tint); color: var(--brand); }
.btn .segno, button .segno { width: 20px; height: 20px; }
.scorciatoie .btn { justify-content: flex-start; gap: 10px; min-height: 52px; padding: 0 12px; font-weight: 600; font-size: 15px; border: 1px solid var(--surface-edge); }
.scorciatoie .btn span { flex: 1; text-align: left; min-width: 0; }
.h-link { display: inline-flex; align-items: center; gap: 2px; color: var(--brand); }
.h-link .chev { color: var(--brand); }
.lista-notifiche a { gap: 14px; }
.lista-notifiche .n-testo { font-weight: 500; }

/* Incarichi */
.segmented.due { max-width: none; padding: 4px; border-radius: var(--r-element); }
.segmented.due span { min-height: 48px; gap: 8px; font-size: 16px; font-weight: 600; border-radius: var(--r-control); }
.segmented.due input:checked + span { background: var(--primary); color: var(--primary-ink); box-shadow: var(--shadow-btn); }
.incarico-testa { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 16px; color: var(--label); }
.incarico-testa .urgente { margin-left: 6px; }
.incarico-corpo { display: flex; align-items: flex-start; gap: 16px; margin-top: 12px; }
.card.incarico-corpo { margin-top: 16px; align-items: center; }
.incarico-corpo h2 { font-size: 19px; line-height: 24px; margin: 0; display: block; font-weight: 700; }
.incarico-ora { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; font-size: 15px; color: var(--label-2); }
.incarico-ora .segno { width: 18px; height: 18px; }
.incarico-azioni { max-width: none; grid-template-columns: 1fr 1fr; }
.incarico-azioni .btn { min-height: 46px; gap: 8px; font-size: 16px; font-weight: 600; }
.incarico-azioni.unico { grid-template-columns: 1fr; }
a.card.riga-link { gap: 16px; justify-content: flex-start; }
a.card.riga-link > span { flex: 1; }
a.card.riga-link strong { font-size: 19px; }
a.card.riga-link small { display: block; font-size: 15px; line-height: 20px; margin-top: 2px; }
.riepilogo-conferma h2 { margin-top: 4px; font-size: 20px; line-height: 26px; }

/* Fonte originale */
.testa-passo { display: flex; align-items: center; gap: 14px; }
.testa-passo h1 { flex: 1; margin: 0; font-size: 24px; line-height: 28px; }
.tasto-indietro { display: grid; place-items: center; width: 40px; height: 40px; min-height: 0; padding: 0; flex: none; border-radius: var(--r-control); background: var(--brand-tint); color: var(--brand); box-shadow: none; }
.pill.numero { font-size: 15px; padding: 4px 10px; font-weight: 600; color: var(--label); }
.card.email { padding: 0; overflow: hidden; }
.card .email-barra { display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 16px; background: var(--brand); color: #fff; font-size: 19px; font-weight: 700; }
.email-dentro { padding: 12px 16px 16px; }
.email-blocco { display: flex; justify-content: flex-end; margin: 0 0 8px; }
.email-blocco .pill { gap: 6px; padding: 4px 10px; font-size: 13px; border-radius: var(--r-control); }
.email-blocco .segno { width: 15px; height: 15px; }
.email-testo { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; line-height: 1.45; }
.email-corpo { height: 360px; border: 0; }
.email-integrale { margin: 16px 0 0; font-size: 14px; }
.lista-allegati { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lista-allegati a, .lista-allegati .riga-ferma { display: flex; align-items: center; gap: 14px; padding: 10px 14px; min-height: 60px; border: 1px solid var(--sep); border-radius: var(--r-element); color: var(--label); text-decoration: none; }
.lista-allegati a:hover { background: var(--surface-2); }
.lista-allegati .nome { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.lista-allegati .nome strong { display: block; font-size: 16px; }
.lista-allegati .nome small { font-size: 14px; }
.lista-allegati .segno.rosso { width: 30px; height: 30px; }
.barra-fissa { display: none; }

/* Bozza assistita */
.spie { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
.spia { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: var(--r-control); font-size: 15px; font-weight: 500; color: var(--label); border: 1px solid var(--surface-edge); box-shadow: none; }
.spia.ok { background: var(--ok-bg); } .spia.ok .segno { color: var(--ok); }
.spia.warn { background: var(--warn-bg); } .spia.warn .segno { color: var(--warn); }
.spia.bad { background: var(--bad-bg); } .spia.bad .segno { color: var(--bad); }
button.spia { text-decoration: underline; cursor: pointer; }
.col-bozza .field { margin-bottom: 0; }
.col-bozza .field label { font-size: 15px; margin-bottom: 6px; }
textarea.campo-titolo { font-size: 19px !important; font-weight: 700; min-height: 52px; }
.editor .tiptap { font-size: 16px; line-height: 1.45; min-height: 300px; }
.nota-info { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; color: var(--label-2); }
.nota-info .segno { width: 18px; height: 18px; }
.app-colonna > .nota-info { margin-top: 10px; }
.tre-azioni { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; }
.tre-azioni button { gap: 6px; padding: 0 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--sep-strong), var(--shadow-tile); font-weight: 500; white-space: nowrap; }
.coppia-azioni { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.coppia-azioni button, .barra-fissa button { min-height: 54px; gap: 8px; font-size: 19px; font-weight: 700; border-radius: var(--r-element); }
.app-colonna > .coppia-azioni { margin-top: 24px; }

/* Conferma e pubblica */
label.dichiarazione { align-items: center; font-weight: 600; font-size: 16px; background: color-mix(in srgb, var(--ok-bg) 55%, var(--surface)); }
label.dichiarazione input { width: 30px; height: 30px; accent-color: #1a7f37; }
.colonna-azioni { margin-top: 28px; }
.colonna-azioni button.con-freccia { display: flex; align-items: center; min-height: 56px; padding: 0 20px; font-size: 19px; font-weight: 700; border-radius: var(--r-element); }
.colonna-azioni button.con-freccia span { flex: 1; text-align: center; }
.colonna-azioni button.contorno.con-freccia { font-weight: 600; }

@media (min-width: 1101px) {
  .scheda .fascia-saluto h1, .scheda .testa-passo h1 { font-size: 22px; }
  .col-bozza .fascia-saluto { min-height: 0; }
}
@media (max-width: 1100px) {
  .barra-fissa.solo-telefono { display: grid; grid-template-columns: 5fr 6fr; gap: 12px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--sep); }
  .passo-fonte .col-fonte { padding-bottom: 96px; }
  .app.senza-schede .tabbar { display: none; }
}
@media (max-width: 860px) {
  .pro-testata-nome { display: block; }
  .topbar { height: auto; min-height: 64px; padding-top: 10px; padding-bottom: 10px; }
  .app-colonna { max-width: none; }
  .tre-azioni button { font-size: 14px; padding: 0 10px; }
}
@media (max-width: 380px) { .riquadro { padding: 10px 12px; gap: 10px; } .incarico-azioni .btn { font-size: 15px; } .tre-azioni button .segno { display: none; } }
.scorciatoie { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.scorciatoie .btn { min-width: 0; white-space: normal; line-height: 1.2; }
.scorciatoie .btn span { overflow-wrap: anywhere; }
.testa-passo h1 { font-size: 22px; min-width: 0; }
.pill.numero { max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }
.riquadro strong.piccolo { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 860px) { .scorciatoie .btn { font-size: 14px; gap: 8px; padding: 0 10px; } }
.app-colonna > .spie { margin: 16px 0 0; }
.spia { font-size: 14px; white-space: nowrap; padding: 0 10px; gap: 6px; min-width: 0; }
.spia .segno { width: 20px; height: 20px; }
.tre-azioni { grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; }
.tre-azioni button { min-width: 0; padding: 0 10px; }
.tre-azioni button .segno { width: 18px; height: 18px; }
@media (max-width: 380px) { .spia { font-size: 13px; padding: 0 8px; } .spia .segno { width: 18px; height: 18px; } .spie { gap: 8px; } }

/* Accesso provvisorio con password da computer */
.accesso-prova { margin-top: 16px; text-align: left; padding: 16px 24px; }
.accesso-prova summary { cursor: pointer; font-weight: 600; color: var(--tint); }
.accesso-prova[open] summary { margin-bottom: 8px; }

/* Correzioni dalla verifica dei collaudatori */
.fascia-saluto h1, .incarico-corpo h2, .lista-notifiche .n-testo, .titolo-conferma, .coda-titolo, .page-head h1, .fb-titolo, .testo-articolo, .fascia-saluto p { overflow-wrap: anywhere; min-width: 0; }
.fascia-saluto > div, .incarico-corpo > div { min-width: 0; }
.lista-notifiche .n-testo { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.riquadro strong.piccolo.intero { display: block; -webkit-line-clamp: unset; overflow: visible; overflow-wrap: anywhere; }
.incarico-azioni .btn, .coppia-azioni button, .barra-fissa button, .colonna-azioni button { min-width: 0; white-space: normal; line-height: 1.15; text-align: center; }
.email-integrale a, .h-link { display: inline-flex; align-items: center; min-height: 44px; }
.incarico-ora span + span { font-size: 14px; }
@media (min-width: 861px) and (max-width: 1100px) { .barra-fissa.solo-telefono { position: sticky; left: auto; right: auto; margin: 0 -16px; } .passo-fonte .col-fonte { padding-bottom: 0; } }
@media (max-width: 860px) { .editor .tiptap { min-height: 180px; } }
@media (max-width: 350px) {
  .incarico-azioni .btn { font-size: 14px; gap: 4px; padding: 0 6px; } .incarico-azioni .btn .segno:last-child { display: none; }
  .coppia-azioni button, .barra-fissa button { font-size: 16px; padding: 0 8px; gap: 6px; }
  .spie { grid-template-columns: 1fr; } .scorciatoie { grid-template-columns: 1fr; }
  .tre-azioni { grid-template-columns: 1fr 1fr; } .tre-azioni button:nth-child(2) { order: 3; grid-column: 1 / -1; }
}

/* Resa su computer: non una colonna da telefono a metà schermo */
@media (min-width: 1101px) {
  .app-colonna { max-width: 760px; }
  .app-colonna.home { max-width: 1120px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 24px; align-items: start; }
  .app-colonna.home > * { margin-top: 0; grid-column: 1; }
  .app-colonna.home > .fascia-saluto { grid-column: 1 / -1; }
  .app-colonna.home > section.card:not(.fascia-saluto) { grid-column: 2; }
  .app-colonna.home > section.card:nth-of-type(2) { grid-row: 2 / span 3; }
  .app-colonna.home > section.card:nth-of-type(3) { grid-row: 5; }
  /* «Rifiuta / Approva» sempre a portata anche su schermi bassi */
  .col-bozza .coppia-azioni { position: sticky; bottom: 0; z-index: 5; margin-top: 16px; padding: 12px 0; background: var(--bg); }
  .col-bozza .editor .tiptap { min-height: 220px; max-height: calc(100vh - 520px); overflow: auto; }
}
button.spia.bad { cursor: pointer; text-decoration: underline; }

/* Avviso con «Annulla» dopo la decisione */
.avviso-decisione { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.avviso-decisione button { flex: none; min-height: 36px; font-weight: 600; }
/* Miniatura della foto nella Bozza */
button.card.mini-foto { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px; text-align: left; color: var(--label); background: var(--surface); box-shadow: var(--shadow-tile); border: 1px solid var(--surface-edge); font-weight: 400; min-height: 0; }
button.card.mini-foto:hover { background: var(--surface-2); }
.mini-foto img, .mini-vuota { width: 112px; aspect-ratio: 1.91 / 1; object-fit: cover; border-radius: var(--r-control); flex: none; background: var(--fill); }
.mini-vuota { display: grid; place-items: center; font-size: 12px; color: var(--label-3); text-align: center; padding: 4px; }
.mini-testi { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mini-testi strong { font-size: 15px; }
.mini-testi small { font-size: 13px; color: var(--label-2); overflow-wrap: anywhere; }
.mini-testi .mini-azione { color: var(--tint); }
.col-bozza .mini-foto { margin-top: 16px; }
button.card.mini-foto { white-space: normal; overflow: hidden; }
.mini-testi { flex: 1; }
@media (max-width: 380px) { .mini-foto img, .mini-vuota { width: 88px; } }

/* Correzioni dal ricontrollo */
.card h3, .testo-articolo, .canali .dett { overflow-wrap: anywhere; min-width: 0; }
.tasto-indietro { width: 44px; height: 44px; }
.spia { min-height: 44px; }
.canali a.dett { display: inline-block; min-height: 44px; padding: 12px 0; }
@media (pointer: coarse) { .h-link, .email-integrale a, a.brand.pro-testata { min-height: 44px; } }
.pill.plain.muted { color: #5a5a5f; }
/* «Rifiuta / Approva» sempre a portata nella Bozza su telefono e tablet */
@media (max-width: 1100px) {
  .col-bozza .coppia-azioni { position: sticky; bottom: 0; z-index: 6; margin-left: -16px; margin-right: -16px; padding: 12px 16px; background: var(--bg); border-top: 1px solid var(--sep); }
}
@media (max-width: 860px) {
  .col-bozza .coppia-azioni { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
}
/* Tema scuro: il rosso di marca come testo diventa più chiaro per restare leggibile */
@media (prefers-color-scheme: dark) {
  button.rosso-testo, button.danger-outline, .h-link, .h-link .chev, .obbl, .urgente, .segno.rosso { color: #ff6961; }
  button.rosso-testo, button.danger-outline { box-shadow: inset 0 0 0 1.5px #ff6961; }
  .pill.plain.muted { color: #c7c7cc; }
}

/* Allegati letti dentro l'app */
.allegati-visore h2 { margin-bottom: 12px; }
.allegato + .allegato { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--sep); }
.allegato-testa { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.allegato-testa .nome { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.allegato-testa .nome strong { display: block; font-size: 16px; }
.allegato-testa .nome small { font-size: 13px; }
.allegato-testa a.scarica { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: var(--r-control); color: var(--label-2); background: var(--fill); }
.visore-pdf { display: grid; gap: 10px; margin: 0 -8px; }
.pagina-pdf { position: relative; width: 100%; background: #fff; border-radius: 6px; box-shadow: 0 0 0 1px var(--sep), var(--shadow-tile); overflow: hidden; }
.pagina-pdf canvas { display: block; width: 100%; height: 100%; }
.numero-pagina { position: absolute; right: 8px; bottom: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; font-variant-numeric: tabular-nums; }
.allegato-immagine { display: block; width: 100%; height: auto; border-radius: 6px; box-shadow: 0 0 0 1px var(--sep); background: var(--fill); }
.allegato-nota { margin: 0; padding: 14px 16px; border-radius: var(--r-control); background: var(--surface-2); color: var(--label-2); font-size: 14px; }
@media (max-width: 860px) { .visore-pdf { margin: 0 -10px; } }

.modo-lettura { display: grid; grid-template-columns: 1fr 1fr; width: 100%; max-width: 360px; margin-bottom: 12px; }
.modo-lettura label { grid-column: auto !important; }
.modo-lettura span { justify-content: center; }
.testo-allegato { padding: 16px 18px; border-radius: var(--r-control); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--sep); font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.testo-allegato p { margin: 0 0 12px; }
.testo-allegato p:last-child { margin-bottom: 0; }
.testo-allegato .separa-pagina { margin: 18px 0 12px; padding-top: 12px; border-top: 1px dashed var(--sep-strong); font-size: 12px; color: var(--label-3); text-transform: uppercase; letter-spacing: .04em; }

.segmented.modo-lettura { grid-template-columns: 1fr 1fr; overflow: visible; }
.segmented.modo-lettura label { grid-column: auto !important; }
.segmented.modo-lettura span { width: 100%; justify-content: center; }
