/* ==========================================================================
   Onboarding BS Autotrasporti
   Idea guida: la procedura è un percorso con fermate (passi). Colori dal logo BS.
   ========================================================================== */
:root {
  --rosso: #C3030B;
  --rosso-scuro: #9A0208;
  --rosso-tenue: #FBEBEB;
  --oro: #A88406;
  --oro-chiaro: #F4ECD2;
  --asfalto: #262A30;
  --tenue: #5C646E;
  --cemento: #ECEEF0;
  --bianco: #FFFFFF;
  --linea: #D6DADF;
  --linea-forte: #B9BFC6;
  --verde: #1D7447;
  --verde-tenue: #E5F1EA;
  --ambra: #A85600;
  --ambra-tenue: #FCF0E1;

  --f-titoli: "Bahnschrift", "DIN Alternate", "DIN Next LT Pro", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
  --f-testo: "Segoe UI", system-ui, -apple-system, "Roboto", "Helvetica Neue", Arial, sans-serif;

  /* scala tipografica 1.25 su base 15px */
  --t-xs: .8rem;
  --t-s: .875rem;
  --t-m: 1rem;
  --t-l: 1.25rem;
  --t-xl: 1.5625rem;
  --t-xxl: 1.953rem;

  --r-pannello: 12px;
  --r-campo: 8px;
  --ombra: 0 1px 0 rgba(38, 42, 48, .04), 0 8px 24px -12px rgba(38, 42, 48, .18);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--cemento); color: var(--asfalto);
  font: 400 15px/1.5 var(--f-testo);
}
h1, h2, h3 { font-family: var(--f-titoli); font-weight: 600; letter-spacing: -.005em; line-height: 1.15; margin: 0; }
h1 { font-size: var(--t-xxl); margin-bottom: .35rem; }
h2 { font-size: var(--t-l); margin: 1.8rem 0 .8rem; }
p { margin: 0; }
a { color: var(--rosso); }
code { font-family: Consolas, "Cascadia Mono", monospace; font-size: .85em; background: var(--cemento); padding: .1rem .35rem; border-radius: 4px; }
[hidden] { display: none !important; }
.nascosto { display: none; }
.intro { color: var(--tenue); max-width: 64ch; margin: 0 0 1.4rem; font-size: var(--t-m); }
.piccolo { font-size: var(--t-xs); color: var(--tenue); }
.req { color: var(--rosso); }
:focus-visible { outline: 3px solid rgba(195, 3, 11, .35); outline-offset: 2px; }

/* ---------- testata: logo + fascia livrea */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem 1.75rem; background: var(--bianco);
  border-bottom: 1px solid var(--linea);
}
.topbar::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, var(--rosso) 0 68%, var(--bianco) 68% 68.6%, var(--oro) 68.6% 100%);
}
.brand { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.logo { height: 44px; width: auto; display: block; }
.brand-testo { border-left: 1px solid var(--linea); padding-left: 1rem; min-width: 0; }
.brand-title { font-family: var(--f-titoli); font-weight: 600; font-size: var(--t-l); line-height: 1.1; }
.brand-sub { font-size: var(--t-xs); color: var(--tenue); }
.user { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
.user-name { color: var(--tenue); font-size: var(--t-s); margin-right: .4rem; }

/* ---------- pulsanti */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  font: 600 var(--t-m)/1.2 var(--f-testo); text-decoration: none; cursor: pointer;
  padding: .7rem 1.25rem; border-radius: var(--r-campo); border: 1.5px solid transparent;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--rosso); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--rosso-scuro); }
.btn-ghost { background: var(--bianco); border-color: var(--linea-forte); color: var(--asfalto); }
.btn-ghost:hover:not(:disabled) { border-color: var(--asfalto); }
.btn-ok { background: var(--verde); color: #fff; }
.btn-ok:hover { background: #155a37; }
.btn-pericolo { background: var(--bianco); color: var(--rosso); border-color: var(--rosso); }
.btn-pericolo:hover { background: var(--rosso-tenue); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-sm { padding: .38rem .8rem; font-size: var(--t-s); }
.topbar .btn-sm { padding: .4rem .75rem; }

/* ---------- pannelli e layout */
.pannello { background: var(--bianco); border: 1px solid var(--linea); border-radius: var(--r-pannello); box-shadow: var(--ombra); padding: 2rem; min-width: 0; }
.layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 2rem; max-width: 1200px; margin: 2rem auto 3rem; padding: 0 1.75rem; align-items: start; }
.contenitore { max-width: 960px; margin: 2rem auto 3rem; padding: 0 1.75rem; display: grid; gap: 1.5rem; }
.contenitore.largo { max-width: 1200px; }

/* ---------- PERCORSO (stepper) */
.stepper { position: sticky; top: 92px; }
.percorso-tit { font-family: var(--f-titoli); font-weight: 600; font-size: var(--t-m); margin: 0 0 .2rem .2rem; }
.percorso-sub { font-size: var(--t-xs); color: var(--tenue); margin: 0 0 1rem .2rem; }
.percorso-mobile { display: none; }
.stepper ol { list-style: none; margin: 0; padding: 0; position: relative; }
.passo { position: relative; }
/* tratto di strada tra una fermata e la successiva */
.passo:not(:last-child)::after {
  content: ""; position: absolute; left: 22px; top: 20px; bottom: -20px; width: 4px; border-radius: 2px;
  background: #C2C8CF;
}
.passo.fatto:not(:last-child)::after { background: var(--oro); }
.passo button {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: .8rem; width: 100%; text-align: left;
  background: none; border: 0; padding: .5rem .6rem; border-radius: 10px;
  font: 500 var(--t-s)/1.25 var(--f-testo); color: var(--asfalto); cursor: pointer;
}
.passo button:hover:not(:disabled) .passo-titolo { text-decoration: underline; text-underline-offset: 3px; }
.passo button:disabled { cursor: not-allowed; color: #98A0A9; }
.passo-num {
  width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font: 600 .75rem/1 var(--f-titoli); color: var(--tenue);
  background: var(--bianco); border: 3px solid #C2C8CF;
}
.passo.fatto .passo-num { background: var(--oro); border-color: var(--oro); color: #fff; }
.passo.corrente button { font-weight: 700; font-size: var(--t-m); }
.passo.corrente .passo-num { background: var(--rosso); border-color: var(--rosso); color: #fff; box-shadow: 0 0 0 4px rgba(195, 3, 11, .16); }
.passo-home { margin-bottom: .6rem; }
.passo-home::after { display: none; }
.passo-home button { color: var(--tenue); font-weight: 500; }
.passo-home .passo-num { background: transparent; border: 0; font-size: 1rem; }
.passo button { padding: .55rem .6rem .55rem 10px; }

/* ---------- testi di passo */
.banner-fase {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  font-size: var(--t-s); color: var(--tenue); margin-bottom: 1.2rem; padding-bottom: 1rem; border-bottom: 1px dashed var(--linea);
}
.banner-fase strong { color: var(--asfalto); }

/* ---------- campi */
.griglia { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.1rem 1.3rem; }
.campo label { display: block; font-size: var(--t-s); font-weight: 600; margin-bottom: .35rem; }
.campo input, .campo select, .filtri input, .filtri select, .stato-azioni textarea {
  width: 100%; font: 400 var(--t-m)/1.3 var(--f-testo); color: var(--asfalto);
  padding: .65rem .8rem; border: 1.5px solid var(--linea-forte); border-radius: var(--r-campo); background: var(--bianco);
  transition: border-color .15s, box-shadow .15s;
}
.campo input:hover, .campo select:hover { border-color: #8F979F; }
.campo input:focus, .campo select:focus, .filtri input:focus, .filtri select:focus, .stato-azioni textarea:focus {
  outline: none; border-color: var(--asfalto); box-shadow: 0 0 0 3px rgba(38, 42, 48, .12);
}
.maiuscolo { text-transform: uppercase; letter-spacing: .05em; }
.aiuto { font-size: var(--t-xs); color: var(--tenue); margin-top: .3rem; }

.scelte { border: 0; padding: 0; margin: 1.6rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .8rem; }
.scelte legend { font-size: var(--t-s); font-weight: 600; margin-bottom: .45rem; padding: 0; }
.scelta {
  display: flex; gap: .75rem; align-items: flex-start; padding: .95rem 1.05rem; cursor: pointer;
  border: 1.5px solid var(--linea-forte); border-radius: 10px; background: var(--bianco); transition: border-color .15s, background-color .15s;
}
.scelta:hover { border-color: #8F979F; }
.scelta.attiva { border-color: var(--asfalto); background: #F7F8F9; box-shadow: inset 4px 0 0 var(--rosso); }
.scelta input { margin-top: .2rem; accent-color: var(--rosso); width: 17px; height: 17px; }
.scelta strong { display: block; font-size: var(--t-m); }
.scelta small { color: var(--tenue); font-size: var(--t-s); }

.conferme { display: grid; gap: .6rem; margin-top: 1.3rem; }
.conferma, .dichiarazione {
  display: flex; gap: .75rem; align-items: flex-start; padding: .9rem 1.05rem; cursor: pointer;
  border: 1.5px solid var(--linea-forte); border-radius: 10px; font-weight: 600; font-size: var(--t-m);
  transition: border-color .15s, background-color .15s;
}
.conferma.attiva { border-color: var(--verde); background: var(--verde-tenue); }
.conferma input, .dichiarazione input { margin-top: .15rem; accent-color: var(--verde); width: 18px; height: 18px; flex: none; }
.dichiarazione { margin-top: 1.6rem; font-weight: 500; }
.dichiarazione:has(input:checked) { border-color: var(--verde); background: var(--verde-tenue); }

/* ---------- caricamento file */
.consigli { font-size: var(--t-s); color: var(--tenue); margin: 0 0 1.1rem; padding-left: .9rem; border-left: 3px solid var(--oro); }
.box-modello {
  display: flex; align-items: center; justify-content: space-between; gap: .8rem 1.2rem; flex-wrap: wrap;
  background: var(--oro-chiaro); border-radius: 10px; padding: .75rem 1rem; margin-bottom: 1.1rem; font-size: var(--t-s);
}
.facce { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.faccia { border: 1.5px solid var(--linea); border-radius: 12px; padding: 1rem; display: flex; flex-direction: column; gap: .65rem; background: var(--bianco); }
.faccia.ok { border-color: var(--verde); }
.faccia.ko { border-color: var(--rosso); }
.faccia-tit { display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-family: var(--f-titoli); font-weight: 600; font-size: var(--t-m); }
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .45rem; min-height: 190px; padding: 1.2rem;
  border: 2px dashed var(--linea-forte); border-radius: 10px; background: #F7F8F9; font: inherit; color: var(--asfalto); cursor: pointer; text-align: center;
  transition: border-color .15s, background-color .15s;
}
.dropzone:hover, .dropzone.sopra { border-color: var(--rosso); background: var(--rosso-tenue); }
.dropzone small { color: var(--tenue); font-size: var(--t-xs); }
.dz-icona { width: 64px; height: 46px; color: var(--asfalto); opacity: .75; }
.dz-icona svg { width: 100%; height: 100%; display: block; }
.dropzone:hover .dz-icona { color: var(--rosso); opacity: 1; }
.anteprima { width: 100%; max-height: 230px; object-fit: contain; background: var(--cemento); border-radius: 8px; }
.nome-file { font-size: var(--t-xs); color: var(--tenue); overflow-wrap: anywhere; }
.controlli { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .3rem .8rem; font-size: var(--t-s); }
.controlli li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem; }
.controlli li > span { font-weight: 700; }
.controlli li.ok > span { color: var(--verde); }
.controlli li.ko { color: var(--rosso); font-weight: 600; }
.controlli small { width: 100%; padding-left: 1.1rem; color: var(--tenue); font-weight: 400; font-size: var(--t-xs); }
.stato-ok, .stato-ko { border-radius: 8px; padding: .55rem .75rem; font-size: var(--t-s); }
.stato-ok { background: var(--verde-tenue); color: var(--verde); font-weight: 600; }
.stato-ko { background: var(--rosso-tenue); color: var(--rosso-scuro); }
.stato-ko ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.faccia .riga-azioni .btn { align-self: flex-start; }
.analisi { min-height: 190px; display: flex; align-items: center; justify-content: center; gap: .65rem; color: var(--tenue); font-size: var(--t-s); }
.spinner { width: 20px; height: 20px; border: 3px solid var(--linea); border-top-color: var(--rosso); border-radius: 50%; animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

/* ---------- esiti e azioni */
.esito { margin-top: 1.6rem; display: grid; gap: .7rem; }
.esito:empty { display: none; }
.box { border-radius: 10px; padding: .85rem 1.05rem; font-size: var(--t-s); }
.box ul { margin: .35rem 0 0; padding-left: 1.2rem; }
.box li + li { margin-top: .15rem; }
.box-errore { background: var(--rosso-tenue); color: var(--rosso-scuro); }
.box-avviso { background: var(--ambra-tenue); color: var(--ambra); }
.esito-ok { background: var(--verde-tenue); color: var(--verde); font-weight: 600; }
.azioni { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.6rem; padding-top: 1.3rem; border-top: 1px solid var(--linea); }
.azioni .btn { min-width: 140px; }
.riga-azioni { display: flex; gap: .45rem; flex-wrap: wrap; }

.progresso { margin-top: 1.1rem; background: var(--cemento); border-radius: 99px; height: 30px; position: relative; overflow: hidden; }
.progresso .barra { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--rosso); transition: width .25s; }
.progresso span { position: relative; display: block; text-align: center; line-height: 30px; font-size: var(--t-xs); font-weight: 600; color: #fff; mix-blend-mode: difference; }

/* ---------- conferma invio (unico momento animato) */
.inviato { text-align: center; padding: 2.5rem 0 1rem; }
.inviato h1 { margin-bottom: .6rem; }
.inviato p { color: var(--tenue); max-width: 52ch; margin: 0 auto 1rem; }
.inviato .btn { margin-top: .8rem; }
.inviato-icona { width: 76px; height: 76px; margin: 0 auto 1.2rem; }
.inviato-icona svg { width: 100%; height: 100%; }
.inviato-icona circle { fill: var(--verde-tenue); stroke: var(--verde); stroke-width: 3; }
.inviato-icona path { fill: none; stroke: var(--verde); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 48; stroke-dashoffset: 48; animation: traccia .5s .15s ease-out forwards; }
@keyframes traccia { to { stroke-dashoffset: 0; } }

/* ---------- tabelle, etichette */
.tabella-wrap { overflow-x: auto; }
.tabella { width: 100%; border-collapse: collapse; font-size: var(--t-s); }
.tabella th, .tabella td { text-align: left; padding: .75rem .6rem; border-bottom: 1px solid var(--linea); vertical-align: middle; }
.tabella th { color: var(--tenue); font-weight: 600; font-size: var(--t-xs); white-space: nowrap; }
.tabella.cliccabile tbody tr { cursor: pointer; transition: background-color .12s; }
.tabella.cliccabile tbody tr:hover, .tabella.cliccabile tbody tr:focus { background: #F6F7F8; outline: none; }
.tabella.cliccabile tbody tr:focus-visible { box-shadow: inset 3px 0 0 var(--rosso); }
.tabella td.vuoto { text-align: center; color: var(--tenue); padding: 2.5rem; cursor: default; }
.pill { display: inline-block; font-size: var(--t-xs); font-weight: 600; border-radius: 99px; padding: .2rem .65rem; white-space: nowrap; }
.pill.ok { background: var(--verde-tenue); color: var(--verde); }
.pill.ko { background: var(--rosso-tenue); color: var(--rosso-scuro); }
.pill.avviso { background: var(--ambra-tenue); color: var(--ambra); }
.pill.neutro { background: var(--cemento); color: var(--tenue); }
.pill.oro { background: var(--oro-chiaro); color: #7A5F00; }
.anag { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.4rem; margin: 0 0 1.2rem; font-size: var(--t-m); }
.anag dt { color: var(--tenue); }
.anag dd { margin: 0; font-weight: 600; }

/* ---------- home preposto */
.saluto { margin: .2rem 0 .3rem; }
.saluto h1 { font-size: var(--t-xxl); }
.saluto p { color: var(--tenue); }
.home-griglia { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.home-col { display: grid; gap: 1.5rem; min-width: 0; }
.home-nuova {
  position: relative; overflow: hidden; display: grid; gap: 1.1rem;
  background: var(--asfalto); color: #fff; border: 0;
}
.home-nuova::after {
  /* fascia livrea come sulla fiancata dei camion */
  content: ""; position: absolute; right: -40px; bottom: 28px; width: 62%; height: 14px; transform: skewX(-28deg);
  background: linear-gradient(90deg, var(--rosso) 0 70%, transparent 70% 72%, var(--oro) 72% 100%);
}
.home-nuova h1 { font-size: var(--t-xxl); }
.home-nuova .intro { color: #C9CED4; margin: 0; }
.home-nuova ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .3rem; font-size: var(--t-s); color: #DDE1E5; }
.home-nuova li::before { content: "✓"; color: var(--oro); font-weight: 700; margin-right: .5rem; }
.home-nuova .btn { justify-self: start; position: relative; z-index: 1; margin-bottom: 2.2rem; }
.tit-sezione { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .35rem; }
.tit-sezione h2 { margin: 0; font-size: var(--t-xl); }
.conta { font-family: var(--f-titoli); font-weight: 600; font-size: var(--t-m); color: var(--rosso); }
.lista-attesa { list-style: none; margin: 1rem 0 0; padding: 0; }
.lista-attesa li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 0; border-top: 1px solid var(--linea); }
.lista-attesa .chi strong { display: block; font-size: var(--t-m); }
.vuoto-home { margin-top: 1rem; padding: 1.4rem; border: 1.5px dashed var(--linea-forte); border-radius: 10px; color: var(--tenue); font-size: var(--t-s); text-align: center; }
.lista-moduli { list-style: none; margin: 1rem 0 0; padding: 0; }
.lista-moduli li { display: flex; align-items: center; justify-content: space-between; gap: .9rem; padding: .75rem 0; border-top: 1px solid var(--linea); }
.lista-moduli .nome-modulo { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.lista-moduli .nome-modulo strong { display: block; font-size: var(--t-s); }
.ico-file { flex: none; width: 30px; height: 36px; border-radius: 4px; display: grid; place-items: end center; padding-bottom: 4px; font: 700 .58rem/1 var(--f-titoli); color: #fff; }
.ico-file.pdf { background: var(--rosso); }
.ico-file.doc, .ico-file.docx { background: #2F5D9E; }

/* ---------- login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem 1rem; }
.login { width: 100%; max-width: 420px; background: var(--bianco); border-radius: 16px; box-shadow: var(--ombra); border: 1px solid var(--linea); overflow: hidden; }
.login-testa { padding: 2rem 2rem 1.4rem; text-align: center; border-bottom: 1px solid var(--linea); position: relative; }
.login-testa::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px;
  background: linear-gradient(90deg, var(--rosso) 0 68%, var(--bianco) 68% 68.6%, var(--oro) 68.6% 100%);
}
.login-testa .logo { height: 76px; margin: .4rem auto 1rem; }
.login-testa h1 { font-size: var(--t-xl); margin: 0; }
.login-testa p { color: var(--tenue); font-size: var(--t-s); margin-top: .25rem; }
.login-corpo { padding: 1.6rem 2rem 2rem; display: grid; gap: 1.05rem; }
.login-corpo .btn { width: 100%; padding: .85rem; margin-top: .2rem; }
.login-corpo .intro { margin: 0; font-size: var(--t-s); }
.piede { text-align: center; font-size: var(--t-xs); color: var(--tenue); margin-top: 1.2rem; }

/* ---------- gestione utenti */
.spunta { display: flex; gap: .55rem; align-items: center; font-size: var(--t-m); }
.spunta input { accent-color: var(--rosso); width: 17px; height: 17px; }
.mt { margin-top: 1.2rem; }
.mt-s { margin-top: .55rem; }

/* ---------- pratiche */
.barra-strumenti { display: flex; flex-wrap: wrap; gap: .9rem 1.2rem; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.barra-strumenti h1 { margin: 0; }
.filtri { display: flex; gap: .6rem; flex-wrap: wrap; flex: 1; justify-content: flex-end; }
.filtri input { flex: 1; min-width: 200px; max-width: 380px; width: auto; }
.filtri select { width: auto; }
.indietro { display: inline-flex; color: var(--tenue); text-decoration: none; font-weight: 600; font-size: var(--t-s); margin-bottom: 1.1rem; }
.indietro:hover { color: var(--rosso); }
.intest-pratica { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.4rem; }
.intest-pratica .pill { font-size: var(--t-s); padding: .35rem .85rem; }
.box.nota { background: var(--cemento); color: var(--asfalto); margin-top: .8rem; }
.blocco-azioni { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; justify-content: space-between; margin-top: 1.5rem; padding-top: 1.3rem; border-top: 1px solid var(--linea); }
.stato-azioni { display: grid; gap: .55rem; flex: 1; min-width: 260px; max-width: 580px; }
.stato-azioni textarea { resize: vertical; }
.zona-pericolo { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; border-color: #E9B7B4; box-shadow: none; }
.zona-pericolo p { margin-top: .2rem; }
.sezione-fase { display: flex; align-items: center; gap: .8rem; font-family: var(--f-titoli); font-weight: 600; font-size: var(--t-l); margin: .8rem 0 -.3rem; }
.sezione-fase::after { content: ""; flex: 1; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--oro), transparent); }
h2.tit-doc { margin: 0 0 1rem; font-size: var(--t-l); }
.galleria { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.file-doc { margin: 0; border: 1px solid var(--linea); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.file-doc img { display: block; width: 100%; height: 180px; object-fit: contain; background: var(--cemento); }
.file-doc .pdf { height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; background: var(--cemento); color: var(--asfalto); font-weight: 600; text-decoration: none; }
.file-doc .pdf:hover { color: var(--rosso); }
.file-doc .pdf span { background: var(--rosso); color: #fff; font: 700 .72rem/1 var(--f-titoli); padding: .4rem .6rem; border-radius: 4px; }
.file-doc figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; padding: .7rem .8rem; }
.file-doc figcaption strong { width: 100%; font-size: var(--t-s); }
.file-doc figcaption .btn { margin-left: auto; }
#vista-dettaglio { display: grid; gap: 1.5rem; }

/* ---------- telefono */
@media (max-width: 860px) {
  .topbar { padding: .6rem 1rem; }
  .logo { height: 34px; }
  .brand-testo { display: none; }
  .user-name { display: none; }
  .layout { grid-template-columns: minmax(0, 1fr); gap: 1rem; margin: 1rem auto 2rem; padding: 0 1rem; }
  .contenitore { margin: 1rem auto 2rem; padding: 0 1rem; gap: 1rem; }
  .pannello { padding: 1.3rem; }
  h1 { font-size: var(--t-xl); }
  .home-griglia { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .home-col { gap: 1rem; }
  /* percorso orizzontale compatto */
  .stepper { position: static; min-width: 0; }
  .percorso-tit, .percorso-sub { display: none; }
  .percorso-mobile { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; font-size: var(--t-s); margin: 0 .1rem .5rem; }
  .percorso-mobile strong { font-family: var(--f-titoli); font-size: var(--t-m); }
  .stepper ol { display: flex; align-items: center; }
  .passo { flex: 1; display: flex; align-items: center; }
  .passo:not(:last-child)::after { position: static; flex: 1; height: 3px; width: auto; margin: 0 2px; }
  .passo button { width: auto; padding: 0; background: none !important; box-shadow: none !important; }
  .passo-titolo { display: none; }
  .passo-home { flex: none; margin: 0 .35rem 0 0; }
  .passo:last-child { flex: none; }
  .passo-num { width: 22px; height: 22px; font-size: .65rem; }
  .azioni .btn { min-width: 0; flex: 1; }
  .intest-pratica { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .inviato-icona path { stroke-dashoffset: 0; }
}
.pannello > h2:first-child, .pannello > .tit-sezione:first-child, .home-nuova h2 { margin-top: 0; }
.home-nuova h2 { font-size: var(--t-xxl); }
.conta { white-space: nowrap; }
@media (max-width: 860px) {
  .home-nuova h2, .saluto h1 { font-size: var(--t-xl); }
  .tit-sezione h2 { font-size: var(--t-l); }
  .lista-attesa li, .lista-moduli li { gap: .6rem; }
}
