/* E.R.U. — centrale operativa. Notte, vetro e oro del marchio.
   Caratteri (licenza SIL OFL) serviti dal nostro server: nessuna richiesta a servizi esterni. */

@font-face { font-family: "Geist"; src: url("fonts/geist-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/geist-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/geist-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/geist-mono-latin-500-normal.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/geist-mono-latin-600-normal.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Libre Caslon Text"; src: url("fonts/libre-caslon-text-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --bg: #050608;
  --panel: rgba(255,255,255,.035);
  --panel-2: rgba(255,255,255,.055);
  --field: rgba(0,0,0,.35);
  --line: rgba(255,255,255,.07);
  --line-2: rgba(255,255,255,.12);
  --text: #EEF1F6;
  --soft: #C3C9D4;
  --muted: #8C94A3;
  --dim: #6B7383;
  --gold: #D9B868;
  --gold-hi: #F0D79C;
  --gold-deep: #9E7429;
  --gold-grad: linear-gradient(135deg, #F1DCA2, #C79B48 45%, #9E7429 70%, #E6C77F);
  --gold-ink: #14100A;
  --red: #FF5C7A;
  --red-soft: #FF8FA3;
  --green: #3DDC97;
  --cyan: #4FD1FF;
  --violet: #B28CFF;
  --ivory: #F3F0EA;
  --radius: 18px;
  --radius-lg: 22px;
  --ease: cubic-bezier(.2,.8,.2,1);
  --mx: 0;
  --my: 0;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --serif: "Libre Caslon Text", Georgia, serif;
  font-family: var(--sans);
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-hi); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.strong { font-weight: 600; color: var(--text); }
.sm { font-size: 13px; }
.big { font-size: 18px; font-weight: 700; }
::selection { background: rgba(217,184,104,.35); }

/* --- Sfondo con profondità (si muove col mouse, vedi app.js) ------------- */
.fx { position: fixed; inset: -120px; pointer-events: none; z-index: 0; overflow: hidden; }
.fx-glow { position: absolute; border-radius: 50%; filter: blur(10px); transition: transform .6s var(--ease); }
.fx-glow.a { width: 1000px; height: 560px; left: 45%; top: -160px; background: radial-gradient(closest-side, rgba(79,209,255,.14), transparent);
  transform: translate3d(calc(var(--mx) * -40px), calc(var(--my) * -26px), 0); }
.fx-glow.b { width: 820px; height: 520px; left: -60px; bottom: -40px; background: radial-gradient(closest-side, rgba(217,184,104,.12), transparent);
  transform: translate3d(calc(var(--mx) * 24px), calc(var(--my) * 18px), 0); }
.fx-grid { position: absolute; inset: 0; transition: transform .8s var(--ease);
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 48px 48px; transform: translate3d(calc(var(--mx) * -10px), calc(var(--my) * -8px), 0);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 80%); mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 80%); }

/* --- Effetti 3D ---------------------------------------------------------- */
.lift { transition: transform .35s var(--ease), box-shadow .35s, border-color .35s; }
.lift:hover { transform: perspective(900px) translateY(-4px) rotateX(1.5deg); box-shadow: 0 24px 60px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); }
.chip3d { transition: transform .3s var(--ease), box-shadow .3s, border-color .3s; }
.chip3d:hover { transform: perspective(600px) translateY(-4px) translateZ(20px) rotateX(6deg); box-shadow: 0 18px 36px rgba(0,0,0,.6); }
.press { transition: transform .2s, box-shadow .2s, filter .2s; }
.press:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,.5); }
.press:active { transform: translateY(1px) scale(.98); }
[data-tilt] { transform: perspective(1000px) rotateX(calc(var(--ty, 0) * -4deg)) rotateY(calc(var(--tx, 0) * 6deg)); transition: transform .5s var(--ease); transform-style: preserve-3d; }
@keyframes eruPulse { 0% { box-shadow: 0 0 0 0 rgba(255,92,122,.55); } 70% { box-shadow: 0 0 0 10px rgba(255,92,122,0); } 100% { box-shadow: 0 0 0 0 rgba(255,92,122,0); } }
@keyframes eruPulseGold { 0% { box-shadow: 0 0 0 0 rgba(217,184,104,.6); } 70% { box-shadow: 0 0 0 12px rgba(217,184,104,0); } 100% { box-shadow: 0 0 0 0 rgba(217,184,104,0); } }
@keyframes eruIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* --- Struttura: binario a sinistra + contenuto --------------------------- */
body.app { display: flex; }
.rail {
  position: sticky; top: 0; height: 100vh; z-index: 5; flex: 0 0 76px;
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 0;
  border-right: 1px solid rgba(255,255,255,.06); background: rgba(5,6,8,.55); backdrop-filter: blur(14px);
}
.rail a { width: 44px; height: 44px; border-radius: 12px; color: var(--muted); display: flex; align-items: center; justify-content: center; transition: background .2s, color .2s, transform .2s; }
@media (hover: hover) { .rail a:hover { color: var(--text); background: rgba(255,255,255,.05); transform: translateY(-1px); } }
.rail a.on { color: #fff; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.rail a.rail-seal { width: auto; height: auto; margin-bottom: 14px; line-height: 0; background: none; transition: transform .4s var(--ease), filter .4s; }
.rail a.rail-seal:hover { transform: rotate(-8deg) scale(1.06); filter: drop-shadow(0 6px 18px rgba(217,184,104,.35)); }
.rail-label { display: none; }
.rail-more { display: none; }
.rail-fill { flex-grow: 1; }
.rail-out { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.me { width: 36px; height: 36px; border-radius: 50%; background: #1C212B; border: 1px solid var(--line-2); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; }
.icon-btn { margin: 0; width: 36px; height: 36px; padding: 0; display: flex; align-items: center; justify-content: center; background: transparent; color: var(--muted); border: 1px solid transparent; border-radius: 10px; }
.icon-btn:hover { color: var(--text); background: rgba(255,255,255,.05); filter: none; }

.stage { position: relative; z-index: 1; flex: 1 1 auto; min-width: 0; max-width: 1180px; margin: 0 auto; padding: 22px 32px 72px; display: flex; flex-direction: column; gap: 20px; animation: eruIn .45s var(--ease) both; }
.stage.wide { max-width: 1440px; }
.topline { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.mobile-brand { display: none; }
.search-pill { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 0 14px; color: var(--muted); transition: border-color .2s, background .2s; }
.search-pill:focus-within { border-color: rgba(217,184,104,.6); background: rgba(255,255,255,.07); }
.search-pill input { background: transparent; border: 0; outline: none; color: var(--text); padding: 10px 0; width: 230px; font-size: 14px; }
.search-pill input:focus { outline: none; }
.topline .button { margin: 0; }

/* --- Titoli e testo ------------------------------------------------------ */
h1 { font-size: 26px; margin: 0 0 4px; font-weight: 600; letter-spacing: -.01em; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
h1.display { font-family: var(--display); font-weight: 700; font-size: 52px; line-height: 1; letter-spacing: .01em; text-transform: uppercase; margin: 0 0 6px; }
h2 { font-size: 12px; margin: 0 0 14px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .12em; }
h2.h { font-size: 16px; color: var(--text); text-transform: none; letter-spacing: 0; margin: 0; }
.card h2:not(:first-child):not(.h) { margin-top: 24px; }
.muted { color: var(--muted); margin: 0; }
.small { font-size: 13px; margin-top: 12px; }
.eyebrow { color: var(--muted); font-size: 12px; margin: 0 0 8px; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow-gold { color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.prewrap { white-space: pre-wrap; margin: 0; }
.crumbs { font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text); }
.crumbs .mono { color: var(--text); }

/* --- Pannelli di vetro ---------------------------------------------------- */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 22px; margin: 0; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.card.hero {
  background: linear-gradient(160deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border-color: rgba(255,255,255,.08); border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.06);
}
.card.narrow { max-width: 440px; margin: 0 auto; padding: 32px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.head .button { margin-top: 0; white-space: nowrap; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 14px; }
.grid3.tight { grid-template-columns: 2fr 1fr 1fr; gap: 0 10px; }

/* --- Moduli -------------------------------------------------------------- */
form { display: grid; gap: 6px; margin: 0; }
fieldset { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
fieldset + fieldset { border-top: 1px solid var(--line); padding-top: 18px; }
form > button, form > .button { justify-self: start; }
legend { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 8px; }
label { font-size: 13px; color: var(--muted); margin-top: 8px; display: block; }
input, select, textarea {
  width: 100%; padding: 11px 13px; font-size: 16px; font-family: inherit;
  background: var(--field); color: var(--text);
  border: 1px solid var(--line-2); border-radius: 12px; transition: border-color .2s, box-shadow .2s, background .2s;
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
select option { background: #0B0D12; color: var(--text); }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--dim); }
input:focus, select:focus, textarea:focus { outline: none; border-color: rgba(217,184,104,.7); box-shadow: 0 0 0 3px rgba(217,184,104,.15); background: rgba(0,0,0,.5); }
input[type="date"] { color-scheme: dark; }
input.code { font-family: var(--mono); font-size: 28px; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; padding: 14px; }
.plate-input { font-family: var(--mono); letter-spacing: .12em; text-transform: uppercase; }

.segmented { display: inline-flex; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; margin-bottom: 4px; background: var(--field); }
.segmented label { margin: 0; padding: 9px 14px; cursor: pointer; display: flex; gap: 8px; align-items: center; color: var(--text); font-size: 14px; }
.segmented label + label { border-left: 1px solid var(--line-2); }
.segmented label:has(input:checked) { background: rgba(217,184,104,.14); }
.segmented input { width: auto; accent-color: var(--gold); }

button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; padding: 11px 18px;
  font-size: 15px; font-weight: 700; font-family: inherit; line-height: 1.2;
  background: var(--gold); color: var(--gold-ink); text-decoration: none; text-align: center;
  border: 1px solid var(--gold); border-radius: 12px; cursor: pointer;
}
button:hover, .button:hover { color: var(--gold-ink); background: var(--gold-hi); border-color: var(--gold-hi); }
button.ghost, .button.ghost { background: rgba(255,255,255,.06); color: var(--text); border-color: var(--line-2); font-weight: 500; }
button.ghost:hover, .button.ghost:hover { background: rgba(255,255,255,.1); color: var(--text); border-color: rgba(255,255,255,.2); }
button.danger { background: transparent; color: var(--red-soft); border-color: rgba(255,92,122,.5); font-weight: 600; }
button.danger:hover { background: rgba(255,92,122,.12); color: var(--red-soft); border-color: var(--red); }
.button.danger-fill { background: var(--red); border-color: var(--red); color: #1A0207; }
.button.danger-fill:hover { background: var(--red-soft); border-color: var(--red-soft); color: #1A0207; }
button.small { margin: 0; padding: 6px 12px; font-size: 14px; }

.error, .notice { padding: 12px 14px; border-radius: 14px; font-size: 15px; display: flex; align-items: center; gap: 10px; }
.error { background: rgba(255,92,122,.08); border: 1px solid rgba(255,92,122,.4); color: var(--red-soft); margin-bottom: 14px; }
.notice { background: #000; border: 1px solid var(--line-2); color: var(--text); border-radius: 999px; align-self: flex-start; padding: 8px 18px 8px 10px; box-shadow: 0 10px 30px rgba(0,0,0,.5); animation: eruIn .4s var(--ease) both; }
.err-dot, .info-dot { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: none; }
.err-dot { background: #E5484D; color: #fff; }
.info-dot { background: rgba(255,255,255,.14); color: inherit; font-style: italic; font-family: Georgia, serif; }
.notice.is-error { border-color: rgba(229,72,77,.6); }
.ok-dot { width: 20px; height: 20px; border-radius: 50%; background: var(--green); color: #04170D; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: none; }

/* --- Elenchi --------------------------------------------------------------- */
.search { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { font-size: 14px; color: var(--muted); padding: 6px 14px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(255,255,255,.03); transition: border-color .2s, color .2s, background .2s; }
.chips a span { color: var(--text); margin-left: 4px; font-family: var(--mono); font-size: 13px; }
.chips a:hover { color: var(--text); border-color: rgba(255,255,255,.22); }
.chips a.on { border-color: rgba(217,184,104,.7); color: var(--text); background: rgba(217,184,104,.1); }

.list { display: grid; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--panel); backdrop-filter: blur(14px); }
.list.compact { border: 0; background: none; backdrop-filter: none; border-radius: 0; }
.list-row {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 16px;
  padding: 14px 20px; color: var(--text); border-top: 1px solid var(--line); transition: background .2s, transform .25s var(--ease);
}
.list-row:first-child { border-top: 0; }
.list-row:hover { background: rgba(255,255,255,.04); color: var(--text); }
.lift-rows .list-row:hover { transform: translateX(4px); }
.list-row .main { display: grid; min-width: 0; }
.list-row .plate { justify-self: start; }
.list-row .main small, .list-row .date, .list-row .count { color: var(--muted); font-size: 13px; }
.list-row .main strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .date { font-family: var(--mono); }
.list.compact .list-row { grid-template-columns: auto 1fr auto; padding: 10px 0; }
.list.compact .list-row:hover { background: none; }
.empty { padding: 40px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius-lg); background: rgba(255,255,255,.02); }

/* Targhe */
.plate { font-family: var(--mono); font-weight: 700; letter-spacing: .08em; padding: 2px 9px; border-radius: 5px; background: #F2F4F8; color: #0B0D12; font-size: 13px; box-shadow: inset 6px 0 0 #2450B0; padding-left: 13px; white-space: nowrap; }
.plate.big { font-size: 20px; padding: 2px 12px 2px 16px; }
.tag.cat { color: var(--gold); border-color: rgba(217,184,104,.45); white-space: nowrap; justify-self: start; }
body.public .tag.cat { color: #9E7429; }
.mini-plate { font-family: var(--mono); font-size: 11px; font-weight: 700; background: rgba(255,255,255,.08); border-radius: 4px; padding: 1px 6px; letter-spacing: .04em; }
.plate-eu { position: relative; display: inline-flex; align-items: stretch; background: linear-gradient(180deg, #FFFFFF, #E3E7EE); border-radius: 8px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,.35), 0 2px 0 #9AA3B2, 0 18px 40px rgba(0,0,0,.6); }
.plate-eu .eu { background: linear-gradient(180deg, #2450B0, #17357A); color: #fff; font-size: 12px; font-weight: 700; padding: 0 9px 7px; display: flex; align-items: flex-end; }
.plate-eu .num { font-family: var(--mono); color: #0B0D12; font-weight: 700; font-size: 22px; letter-spacing: .08em; padding: 4px 14px; text-shadow: 0 1px 0 rgba(255,255,255,.9), 0 -1px 0 rgba(0,0,0,.25); white-space: nowrap; }
.plate-eu .sheen { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light;
  background: linear-gradient(calc(110deg + var(--tx, 0) * 40deg), transparent 30%, rgba(255,255,255,.6) 48%, transparent 62%); }
.plate-eu.lg .num { font-size: 34px; padding: 6px 18px; }
.plate-eu.sm { border-radius: 5px; box-shadow: 0 0 0 1px rgba(255,255,255,.2); }
.plate-eu.sm .eu { font-size: 9px; padding: 0 5px 3px; }
.plate-eu.sm .num { font-size: 13px; padding: 1px 8px; }
.plate-tilt { display: inline-block; }

/* Stati */
.badge {
  font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 999px; white-space: nowrap;
  background: rgba(79,209,255,.1); color: var(--cyan); border: 1px solid rgba(79,209,255,.32);
}
.badge.large { font-size: 14px; padding: 6px 15px; }
.badge.s-richiesta, .badge.s-mandato { background: rgba(217,184,104,.1); color: var(--gold); border-color: rgba(217,184,104,.4); }
.badge.s-strategia, .badge.s-intervento, .badge.s-documenti_istanza, .badge.s-autorizzazione_ritiro { background: rgba(178,140,255,.1); color: var(--violet); border-color: rgba(178,140,255,.35); }
.badge.s-monitoraggio, .badge.s-ritiro_deposito, .badge.s-riconsegna, .badge.s-chiusa { background: rgba(61,220,151,.1); color: var(--green); border-color: rgba(61,220,151,.35); }
.badge.s-sospesa, .badge.s-annullata { background: transparent; color: var(--muted); border-color: var(--line-2); }

/* Colori di servizio */
.c-red { --c: var(--red); --c-soft: rgba(255,92,122,.16); }
.c-gold { --c: var(--gold); --c-soft: rgba(217,184,104,.16); }
.c-cyan { --c: var(--cyan); --c-soft: rgba(79,209,255,.16); }
.c-green { --c: var(--green); --c-soft: rgba(61,220,151,.16); }
.c-violet { --c: var(--violet); --c-soft: rgba(178,140,255,.16); }
.t-red { color: var(--red-soft) !important; }
.t-cyan { color: var(--cyan) !important; }

/* --- Oggi ------------------------------------------------------------------ */
.hello h1 { margin-bottom: 2px; }
.island { align-self: flex-start; display: flex; align-items: center; gap: 12px; background: #000; border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 10px 8px 16px; box-shadow: 0 10px 30px rgba(0,0,0,.5); font-size: 14px; }
.island.calm { padding-right: 18px; }
.island .pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--green); flex: none; }
.island.alert .pulse { background: var(--red); animation: eruPulse 1.8s infinite; }
.pill-btn { white-space: nowrap; background: var(--gold); color: var(--gold-ink); border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 700; }
.pill-btn:hover { background: var(--gold-hi); color: var(--gold-ink); }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; backdrop-filter: blur(14px); }
.kpi-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }
.kpi-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; min-height: 34px; }
.kpi-value { font-family: var(--mono); font-size: 32px; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.kpi-note { font-size: 13px; color: var(--muted); }
.spark polyline { fill: none; stroke: var(--c); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 6px var(--c-soft)); }

.today-grid > * { min-width: 0; }
.today-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1.25fr); gap: 14px; align-items: start; }
.rings-card { display: flex; flex-direction: column; gap: 14px; }
.rings-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.rings { flex: none; filter: drop-shadow(0 14px 22px rgba(0,0,0,.6)); transform: translate3d(calc(var(--tx, 0) * 8px), calc(var(--ty, 0) * 6px), 50px); transition: transform .5s var(--ease); }
.rings circle { fill: none; stroke-width: 13; }
.rings .track { stroke: var(--c-soft); }
.rings .arc { stroke: var(--c); stroke-linecap: round; animation: eruRing 1.1s var(--ease) both; }
@keyframes eruRing { from { stroke-dashoffset: 420; } to { stroke-dashoffset: 0; } }
.ring-legend { display: flex; flex-direction: column; gap: 10px; }
.ring-legend > div { border-left: 3px solid var(--c); padding-left: 10px; }
.ring-legend .of { color: var(--dim); font-size: 13px; font-weight: 500; }

.now { background: linear-gradient(160deg, rgba(255,92,122,.16), rgba(255,92,122,.04)); border: 1px solid rgba(255,92,122,.45); border-radius: 16px; padding: 16px; box-shadow: 0 0 28px rgba(255,92,122,.18); display: flex; flex-direction: column; gap: 8px; }
.now.calm { background: linear-gradient(160deg, rgba(217,184,104,.14), rgba(217,184,104,.03)); border-color: rgba(217,184,104,.4); box-shadow: 0 0 28px rgba(217,184,104,.1); }
.now-eyebrow { font-size: 12px; color: #FF9BAD; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; }
.now.calm .now-eyebrow { color: var(--gold); }
.now-title { font-size: 18px; font-weight: 600; line-height: 1.3; }
.now-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--soft); font-size: 14px; }
.now-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.now-actions .button { margin: 0; padding: 9px 16px; font-size: 14px; }
.up-next { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.up-next li { display: flex; gap: 12px; align-items: center; }
.up-next li > .mono { white-space: nowrap; }
.up-next .bar { width: 3px; height: 34px; border-radius: 2px; background: var(--c); flex: none; }
.up-next a { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; color: var(--text); }
.up-next a:hover .t { color: var(--gold-hi); }
.up-next .t, .todo .t { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.todo { list-style: none; margin: 0; padding: 0; }
.todo li { border-top: 1px solid rgba(255,255,255,.06); }
.todo li:first-child { border-top: 0; }
.todo a { display: flex; gap: 12px; align-items: flex-start; padding: 9px 0; color: var(--text); }
.todo a:hover .t { color: var(--gold-hi); }
.todo .check { width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--line-2); flex: none; margin-top: 2px; transition: border-color .2s; }
.todo .check.hot { border-color: rgba(255,92,122,.7); }
.todo a:hover .check { border-color: var(--gold); }
.todo .body { flex-grow: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.todo .meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.flag { font-size: 11px; font-weight: 700; color: var(--red-soft); border: 1px solid rgba(255,92,122,.5); border-radius: 999px; padding: 2px 8px; flex: none; }

.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.col { background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.06); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.col-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.col-head > span:first-child { display: flex; gap: 8px; align-items: center; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.col-empty { font-size: 13px; color: var(--dim); padding: 8px 2px; }
.bcard { border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); color: var(--text); }
.bcard:hover { color: var(--text); border-color: rgba(255,255,255,.18); }
.bcard.hot { background: rgba(255,92,122,.08); border-color: rgba(255,92,122,.55); box-shadow: 0 0 22px rgba(255,92,122,.22); }
.bcard-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.bcard-top .strong { font-size: 14px; letter-spacing: .06em; }
.bcard .days { color: var(--muted); font-weight: 700; }
.bcard.hot .days { color: var(--red-soft); }
.bcard .client { font-size: 13px; color: var(--soft); }
.bcard .sm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- Scheda pratica -------------------------------------------------------- */
.case-hero { display: flex; flex-direction: column; gap: 26px; padding: 26px; }
.case-top { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.case-id { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; min-width: 0; }
.case-title { font-size: 26px; margin: 0; }

.stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); }
.stepper li { display: flex; flex-direction: column; align-items: center; gap: 10px; position: relative; text-align: center; }
.stepper li::before { content: ""; position: absolute; top: 15px; left: -50%; width: 100%; height: 2px; background: rgba(255,255,255,.1); z-index: 0; }
.stepper li:first-child::before { display: none; }
.stepper li.done::before, .stepper li.current::before { background: linear-gradient(90deg, var(--gold-deep), var(--gold)); }
.stepper .node { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 13px; font-weight: 700; background: #0A0C10; border: 2px solid rgba(255,255,255,.14); color: var(--dim); transition: transform .3s var(--ease); }
.stepper li.done .node { background: var(--gold-grad); border-color: transparent; color: var(--gold-ink); font-family: var(--sans); font-size: 15px; }
.stepper li.current .node { border-color: var(--gold); color: var(--gold); background: #14100A; animation: eruPulseGold 2s infinite; transform: scale(1.12); }
.stepper .lbl { font-size: 12px; color: var(--dim); line-height: 1.25; padding: 0 2px; }
.stepper li.done .lbl { color: var(--muted); }
.stepper li.current .lbl { color: var(--text); font-weight: 600; }
.stepper li:hover .node { transform: translateY(-2px); }
.stepper li.current:hover .node { transform: scale(1.12) translateY(-2px); }

.hud { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: rgba(255,255,255,.07); border-radius: 16px; overflow: hidden; }
.hud > div { background: #0A0C10; padding: 14px 18px; }
.hud-l { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }
.hud-v { font-family: var(--mono); font-size: 26px; font-weight: 700; line-height: 1.3; }
.hud-n { font-size: 12px; color: var(--muted); }

.split { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.split-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.split-side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }

.next-step { background: linear-gradient(150deg, rgba(217,184,104,.14), rgba(217,184,104,.03) 60%); border-color: rgba(217,184,104,.45); box-shadow: 0 0 40px rgba(217,184,104,.1); display: flex; flex-direction: column; gap: 8px; }
.ns-title { font-size: 20px; font-weight: 600; line-height: 1.3; }
.ns-text { color: var(--soft); font-size: 14px; margin: 0; }
.ns-row { grid-template-columns: 1fr auto; align-items: center; gap: 10px; margin-top: 4px; }
.ns-row button { margin: 0; padding: 12px 22px; }
.next-step .stack { margin-top: 4px; }

.quick { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.quick a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 14px 6px; border-radius: 14px; font-size: 13px; font-weight: 600; text-align: center;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); color: var(--soft); }
.quick a:hover { color: var(--text); border-color: rgba(255,255,255,.2); }
.quick a.on { background: rgba(217,184,104,.12); border-color: rgba(217,184,104,.6); color: var(--gold-hi); box-shadow: 0 0 22px rgba(217,184,104,.12); }
.quick .q-chiamata_uscita svg { color: var(--red-soft); }
.quick .q-chiamata_entrata svg { color: var(--green); }
.quick .q-visita svg { color: var(--cyan); }
.quick .q-pec svg { color: var(--violet); }
.quick .q-nota svg { color: var(--gold); }

.journal-form { margin-bottom: 18px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.journal-form.flash { animation: eruFlash 1s var(--ease); }
@keyframes eruFlash { 0% { box-shadow: 0 0 0 0 rgba(217,184,104,.5); } 100% { box-shadow: 0 0 0 16px rgba(217,184,104,0); } }
.journal { list-style: none; padding: 0; margin: 0; }
.journal li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 14px; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.06); --c: var(--muted); }
.journal li:first-child { border-top: 0; }
.journal li .dot { margin-top: 7px; width: 10px; height: 10px; box-shadow: 0 0 0 4px rgba(255,255,255,.03), 0 0 12px var(--c); }
.journal li.o-risposto, .journal li.o-completato { --c: var(--green); }
.journal li.o-non_risponde, .journal li.o-occupato, .journal li.o-ufficio_chiuso { --c: var(--red); }
.journal li.o-richiamare, .journal li.o-rimandato { --c: var(--gold); }
.journal li.o-altro { --c: var(--cyan); }
.j-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.j-who { color: var(--muted); font-size: 14px; margin-top: 2px; }
.journal p { margin: 6px 0 0; color: var(--soft); font-size: 14px; }
.journal .next { color: var(--gold); }
.journal .when .sep { display: none; }
.journal .when { font-family: var(--mono); font-size: 12px; color: var(--muted); text-align: right; white-space: nowrap; }
.tag { font-size: 11px; font-weight: 600; padding: 2px 9px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--muted); }
.o-non_risponde .tag:first-of-type, .o-occupato .tag:first-of-type, .o-ufficio_chiuso .tag:first-of-type { color: var(--red-soft); border-color: rgba(255,92,122,.45); }
.o-risposto .tag:first-of-type, .o-completato .tag:first-of-type { color: var(--green); border-color: rgba(61,220,151,.4); }

.who-row { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.who-main { min-width: 0; }
.avatar { width: 38px; height: 38px; border-radius: 11px; background: var(--c-soft); color: var(--c); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: none; }

.facts { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; margin: 0 0 6px; }
.facts dt { color: var(--muted); font-size: 13px; }
.facts dd { margin: 0; overflow-wrap: anywhere; font-size: 14px; }

details.more { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
details.more summary { cursor: pointer; color: var(--muted); font-size: 14px; list-style: none; display: flex; align-items: center; gap: 8px; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: "›"; display: inline-block; transition: transform .2s; font-size: 18px; line-height: 1; color: var(--gold); }
details.more[open] summary::before { transform: rotate(90deg); }
details.more summary:hover { color: var(--text); }
details.more form { margin-top: 12px; }
details.more .grid2 { gap: 14px; }

.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 14px 20px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.timeline li::before { content: ""; position: absolute; left: 3px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px rgba(217,184,104,.6); }
.timeline li::after { content: ""; position: absolute; left: 6px; top: 18px; bottom: 0; width: 1px; background: var(--line-2); }
.timeline li:last-child::after { display: none; }
.timeline .when { color: var(--muted); font-size: 12px; font-family: var(--mono); }

/* --- Caselle PEC ed email ---------------------------------------------------- */
.mailbox { display: flex; flex-direction: column; gap: 14px; }
.mailbox .card-head { margin-bottom: 0; align-items: center; }
.mb-title { display: flex; gap: 12px; align-items: center; min-width: 0; }
.mb-title .avatar { font-size: 11px; letter-spacing: .04em; }
.mb-title .h { overflow-wrap: anywhere; }
progress { appearance: none; -webkit-appearance: none; width: 100%; height: 8px; border: 0; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
progress::-webkit-progress-bar { background: rgba(255,255,255,.08); border-radius: 999px; }
progress::-webkit-progress-value { background: linear-gradient(90deg, var(--gold-deep), var(--gold)); border-radius: 999px; transition: width .6s var(--ease); }
progress::-moz-progress-bar { background: linear-gradient(90deg, var(--gold-deep), var(--gold)); border-radius: 999px; }
.mb-progress { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.mb-progress progress { height: 12px; box-shadow: 0 0 18px rgba(217,184,104,.15); }
.folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 20px; }
.folder { display: grid; grid-template-columns: minmax(0, 1fr) 90px auto; gap: 10px; align-items: center; font-size: 14px; }
.folder .f-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--soft); }
.folder progress { height: 6px; }
.recent { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.recent li { display: flex; gap: 10px; align-items: baseline; font-size: 14px; min-width: 0; }
.recent .r-subj { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.mb-actions form { display: contents; }
.mb-actions button, .mb-actions .button { margin: 0; }
.mb-actions .island { align-self: center; }
.pw-wrap { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.pw-wrap .pw-toggle { margin: 0; padding: 0 16px; }
.notes { margin: 16px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }

/* --- Posta ------------------------------------------------------------------ */
.mail-wrap { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; }
.mail-side { padding: 12px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; }
.mf { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; color: var(--soft); font-size: 14px; min-width: 0; }
.mf:hover { background: rgba(255,255,255,.05); color: var(--text); }
.mf.on { background: rgba(217,184,104,.12); color: var(--gold-hi); }
.mf.acc { margin-top: 10px; font-weight: 600; color: var(--text); }
.mf.sub { padding-left: 38px; }
.mf .addr { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mf .kind { flex: none; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 6px; background: var(--c-soft); color: var(--c); }
.mf .count { flex: none; font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--gold-ink); background: var(--gold); border-radius: 999px; padding: 0 7px; }
.mail-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.mail-search input { border-radius: 14px; }
.mail-row { display: grid; grid-template-columns: 200px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); color: var(--soft); transition: background .2s; }
.mail-row:first-child { border-top: 0; }
.mail-row:hover { background: rgba(255,255,255,.04); color: var(--soft); }
.mail-row.unread { color: var(--text); }
.mail-row.unread .who, .mail-row.unread .subj { font-weight: 700; }
.mail-row.unread .who::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); margin-right: 8px; vertical-align: middle; box-shadow: 0 0 8px var(--gold); }
.mail-row .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.mail-row .what { display: flex; flex-direction: column; min-width: 0; }
.mail-row .subj, .mail-row .snip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-row .subj { font-size: 14px; color: var(--text); }
.mail-row .snip { font-size: 13px; color: var(--muted); }
.mail-row .meta { display: flex; gap: 8px; align-items: center; color: var(--muted); white-space: nowrap; }
.tag.gold { color: var(--gold); border-color: rgba(217,184,104,.5); }
.tag.d-consegnata { color: var(--green); border-color: rgba(61,220,151,.4); }
.tag.d-errore { color: var(--red-soft); border-color: rgba(255,92,122,.45); }
.mail-row .tag { margin-right: 4px; vertical-align: 1px; }
.pager { display: flex; justify-content: space-between; gap: 10px; }
.pager .button { margin: 0; }
.mail-head { display: flex; flex-direction: column; gap: 14px; }
.mh-top { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: flex-start; }
.mh-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.mh-facts { grid-template-columns: 60px 1fr; }
.atts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.att { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); color: var(--text); }
.att:hover { color: var(--text); border-color: rgba(217,184,104,.5); }
.att-ext { grid-row: 1 / 3; font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--gold); background: rgba(217,184,104,.12); border-radius: 8px; padding: 8px 6px; min-width: 44px; text-align: center; }
.att-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.mail-body iframe { width: 100%; height: 72vh; border: 0; border-radius: 12px; background: #fff; }
.mail-body .muted { margin-top: 10px; }
.mail-text { font-size: 15px; overflow-wrap: anywhere; }

/* --- Scrivi e firme -------------------------------------------------------- */
.compose { display: flex; flex-direction: column; gap: 10px; }
.c-row { display: grid; grid-template-columns: 80px minmax(0, 1fr); align-items: center; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.c-row label { margin: 0; }
.c-row input, .c-row select { border-color: transparent; background: transparent; padding-left: 4px; }
.c-row input:focus, .c-row select:focus { background: rgba(0,0,0,.35); }
.c-body { min-height: 280px; font-size: 15px; line-height: 1.6; margin-top: 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; color: var(--soft); font-size: 14px; }
.check input { width: auto; margin-top: 3px; accent-color: var(--gold); }
.big-check { margin-top: 32px; }
.fwd { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.c-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.c-actions button { margin: 0; padding: 12px 30px; }
.sig-preview { display: flex; gap: 14px; align-items: flex-start; background: #fff; color: #333; border-radius: 12px; padding: 14px; }
.sig-preview img { max-height: 64px; max-width: 180px; }
.sig-text { border-left: 2px solid #C79B48; padding-left: 12px; font-size: 13px; }
.sig-disc { font-size: 12px; color: var(--muted); margin: 10px 0 0; }
.sig-del { margin-top: 10px; }
.sig .card-head .tag { margin-left: 8px; vertical-align: 2px; }

/* --- Avvisi ------------------------------------------------------------------ */
.alerts { display: flex; flex-direction: column; gap: 8px; }
.alert { display: flex; align-items: center; gap: 8px; padding: 0 8px 0 0; border-radius: 14px; color: var(--text); background: rgba(217,184,104,.08); border: 1px solid rgba(217,184,104,.4); transition: transform .2s, border-color .2s; }
.alert:hover { color: var(--text); transform: translateX(3px); }
.alert .pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); flex: none; }
.alert.a-red { background: rgba(255,92,122,.08); border-color: rgba(255,92,122,.45); }
.alert.a-red .pulse { background: var(--red); animation: eruPulse 1.8s infinite; }
.alert .a-text { flex: 1 1 auto; font-size: 14px; min-width: 0; }
.alert .a-act { flex: none; font-size: 13px; font-weight: 700; color: var(--gold); white-space: nowrap; }
.alert.a-red .a-act { color: var(--red-soft); }

/* --- Posta e pratiche ---------------------------------------------------------- */
.case-link { padding: 14px 20px; }
.cl-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.cl-row .eyebrow { margin: 0; }
.cl-row select { flex: 1 1 260px; width: auto; }
.cl-row form { display: contents; }
.cl-case { color: var(--text); font-weight: 600; flex: 1 1 auto; }
.case-mail { list-style: none; margin: 0; padding: 0; }
.case-mail li { border-top: 1px solid rgba(255,255,255,.06); }
.case-mail li:first-child { border-top: 0; }
.case-mail a { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; color: var(--text); }
.case-mail a:hover .cm-subj { color: var(--gold-hi); }
.cm-dir { font-weight: 700; text-align: center; }
.cm-dir.in { color: var(--cyan); }
.cm-dir.out { color: var(--gold); }
.cm-main { display: flex; flex-direction: column; min-width: 0; }
.cm-subj { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#posta .card-head .mb-actions .button, #posta .card-head .mb-actions button { margin: 0; }

/* --- Automatismi --------------------------------------------------------------- */
.autoreply { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.autoreply .card-head { margin-bottom: 0; }
.rules { list-style: none; margin: 0 0 8px; padding: 0; }
.rules li { display: flex; gap: 10px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.rules li:first-child { border-top: 0; }
.rules li.off { opacity: .5; }
.rules .r-main { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }

/* --- Firme nella pratica ----------------------------------------------------- */
.signs { list-style: none; margin: 0 0 6px; padding: 0; }
.signs li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.signs li:first-child { border-top: 0; }
.sg-main { display: flex; flex-direction: column; min-width: 0; }
.sg-actions { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.sg-actions form { display: contents; }
.sg-actions .button, .sg-actions button { margin: 0; }

/* --- Pagine pubbliche e clienti: avorio e oro ---------------------------------- */
body.public {
  --text: #14130F; --soft: #3C3A35; --muted: #6B6458; --dim: #8F8778; --line: #E2DCCF; --line-2: #D6CEBE;
  --panel: #FFFFFF; --field: #FFFFFF; --gold: #9E7429; --gold-hi: #7E5B1E; --gold-ink: #FFFFFF;
  background: radial-gradient(900px 500px at 50% -10%, rgba(199,155,72,.18), transparent 70%), #F3F0EA; color: var(--text);
}
body.public .fx { display: none; }
body.public a { color: var(--gold); }
.pub-head { display: flex; align-items: center; gap: 14px; justify-content: center; padding: 26px 16px 10px; }
.pub-word { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: .04em; color: #0B0B0C; line-height: 1; }
.pub-motto { font-family: var(--serif); font-size: 14px; color: #9E7429; margin-top: 4px; }
.pub-main { max-width: 680px; margin: 0 auto; padding: 16px 16px 48px; display: flex; flex-direction: column; gap: 16px; }
.pub-foot { text-align: center; color: var(--muted); font-size: 12px; padding: 0 16px 28px; }
.pub-card { background: #FFFFFF; border: 1px solid var(--line); border-radius: 22px; padding: 26px; box-shadow: 0 20px 50px rgba(60,45,20,.08), 0 1px 0 rgba(255,255,255,.8) inset; }
.pub-card h1 { font-family: var(--display); font-weight: 700; font-size: 34px; text-transform: uppercase; letter-spacing: .01em; line-height: 1.05; margin: 2px 0 6px; }
.pub-eyebrow { color: #9E7429; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin: 0; }
body.public input, body.public select, body.public textarea { background: #fff; color: var(--text); border-color: var(--line-2); }
body.public input:focus { border-color: #C79B48; box-shadow: 0 0 0 3px rgba(199,155,72,.2); background: #fff; }
body.public button, body.public .button { background: #0B0B0C; border-color: #0B0B0C; color: #F3F0EA; }
body.public button:hover, body.public .button:hover { background: #2A2620; border-color: #2A2620; color: #fff; }
body.public button.ghost, body.public .button.ghost { background: #fff; color: var(--text); border-color: var(--line-2); }
body.public .error { background: #FFF1F3; border-color: #F3B3BF; color: #A3213A; }
body.public .notice { background: #0B0B0C; color: #F3F0EA; border-color: #0B0B0C; }
body.public .muted { color: var(--muted); }
.pub-steps { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.pub-steps > li { border: 1px solid var(--line); border-radius: 16px; padding: 16px; opacity: .55; }
.pub-steps > li.on { opacity: 1; border-color: #C79B48; box-shadow: 0 0 0 3px rgba(199,155,72,.12); }
.pub-steps > li.ok { opacity: .9; }
.pub-steps h2 { color: var(--text); font-size: 15px; letter-spacing: 0; text-transform: none; margin: 0 0 10px; }
.doc-open { margin: 0 0 6px; }
.sig-pad-wrap { position: relative; border: 1.5px dashed #C9BFAB; border-radius: 14px; background: #fff; overflow: hidden; }
.sig-pad { display: block; width: 100%; height: 220px; touch-action: none; cursor: crosshair; }
.sig-line { position: absolute; left: 16px; right: 16px; bottom: 44px; border-top: 1px solid #E2DCCF; font-size: 11px; color: #B5AB97; padding-top: 4px; pointer-events: none; }
.sig-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sig-tools button { margin: 0; }
.resend { margin-top: 8px; }
.resend button { margin: 0; }
.done { text-align: center; }
.done-mark { width: 64px; height: 64px; margin: 0 auto 8px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 30px; color: #fff; background: linear-gradient(135deg, #F1DCA2, #C79B48 45%, #9E7429); box-shadow: 0 12px 30px rgba(158,116,41,.35); }
body.public input.code { letter-spacing: .35em; }

/* --- Area clienti (chiaro) ------------------------------------------------------ */
.pub-nav { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; padding: 0 16px 6px; }
.pub-nav a { padding: 8px 14px; border-radius: 999px; color: var(--text); font-size: 14px; font-weight: 600; }
.pub-nav a:hover { background: rgba(199,155,72,.14); color: var(--text); }
.pub-nav form { display: contents; }
.pub-nav button { margin: 0; }
.pub-nav .pn-ic, .pn-more, .pn-short { display: none; }
.pub-nav a.on { background: rgba(199,155,72,.16); }
/* Area clienti dal telefono: barra in basso come un'app (4 voci + «Altro») */
@media (max-width: 760px) {
  body.public { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .pub-head { padding: 14px 16px 4px; gap: 10px; }
  .pub-head .pub-seal svg { width: 40px; height: 40px; }
  .pub-word { font-size: 18px; }
  .pub-motto { font-size: 12px; }
  body.public nav.pub-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; flex-wrap: nowrap; gap: 0; justify-content: space-around;
    padding: 6px 4px calc(2px + env(safe-area-inset-bottom)); background: #FAF8F4; border-top: 1px solid rgba(60,45,20,.12); box-shadow: 0 -8px 24px rgba(60,45,20,.06); }
  .pub-nav .pn-sec, .pub-nav .pn-out { display: none; }
  .pub-nav > a, .pn-more { flex: 1 1 0; min-width: 0; }
  .pub-nav > a, .pn-more > summary { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 12px; color: #6B6355; font-size: 10.5px; font-weight: 600; }
  .pub-nav .pn-ic { display: block; line-height: 0; }
  .pub-nav .pn-long { display: none; }
  .pub-nav .pn-short { display: inline; }
  .pub-nav .pn-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .pub-nav > a.on, .pn-more > summary.on, .pn-more[open] > summary { color: #0B0B0C; background: rgba(199,155,72,.18); }
  .pn-more { display: flex; }
  .pn-more > summary { list-style: none; cursor: pointer; flex: 1; }
  .pn-more > summary::-webkit-details-marker { display: none; }
  .pn-more[open] > summary::after { content: ""; position: fixed; left: 0; right: 0; top: 0; bottom: calc(60px + env(safe-area-inset-bottom)); background: rgba(20,16,10,.35); z-index: 1; }
  .pn-sheet { position: fixed; left: 0; right: 0; bottom: calc(60px + env(safe-area-inset-bottom)); z-index: 2; padding: 16px; background: #FBFAF7; border-radius: 22px 22px 0 0; box-shadow: 0 -20px 50px rgba(60,45,20,.18); }
  .pn-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
  .pn-grid a { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 14px; background: #fff; border: 1px solid rgba(60,45,20,.1); color: #2A2620; font-weight: 600; font-size: 14px; }
  .pn-grid a.on { border-color: #C79B48; }
  .pn-sheet form { display: block; }
  .pn-sheet button { width: 100%; }
}
.pub-back { margin: 0; font-size: 14px; }
.pub-h2 { color: var(--text); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 12px; }
.pub-card.attn { border-color: #C79B48; box-shadow: 0 0 0 4px rgba(199,155,72,.12), 0 20px 50px rgba(60,45,20,.08); }
.pub-list { list-style: none; margin: 0; padding: 0; }
.pub-list > li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.pub-list > li:first-child { border-top: 0; }
.pub-list > li > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.pub-list small { color: var(--muted); font-size: 13px; }
.pub-list small.note { color: var(--soft); margin-top: 4px; }
.pub-list .button { margin: 0; flex: none; }
.pl-link { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; color: var(--text); }
.pl-link:hover { color: var(--text); }
.pl-link > span:first-child { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.mini-steps { display: flex; gap: 3px; flex: none; }
.mini-steps i { width: 10px; height: 6px; border-radius: 3px; background: #E2DCCF; }
.mini-steps i.on { background: #C79B48; }
.st { flex: none; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.st-wait { background: #FBF3E2; color: #9E7429; }
.st-ok { background: #E6F7EE; color: #1D7A4C; }
.st-no { background: #FFF1F3; color: #A3213A; }
.st-off { background: #EEE; color: #666; }
.st-line { margin: 10px 0 4px; }
.pub-flow { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.pub-flow li { display: flex; gap: 12px; align-items: flex-start; padding: 6px 0; color: var(--dim); position: relative; }
.pub-flow li:not(:last-child)::after { content: ""; position: absolute; left: 13px; top: 32px; bottom: -6px; width: 2px; background: #E2DCCF; }
.pub-flow li.done::after { background: #C79B48; }
.pub-flow .dot { width: 28px; height: 28px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; border: 2px solid #E2DCCF; background: #fff; }
.pub-flow li.done { color: var(--text); }
.pub-flow li.done .dot { background: linear-gradient(135deg, #F1DCA2, #C79B48 45%, #9E7429); border-color: transparent; color: #fff; }
.pub-flow li.cur { color: var(--text); font-weight: 700; }
.pub-flow li.cur .dot { border-color: #C79B48; color: #9E7429; box-shadow: 0 0 0 4px rgba(199,155,72,.18); }
.pub-flow li > span:last-child { display: flex; flex-direction: column; padding-top: 4px; }
.pub-flow small { color: var(--muted); font-weight: 400; font-size: 12px; }
.pub-activity { list-style: none; margin: 0; padding: 0; }
.pub-activity li { display: flex; gap: 14px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.pub-activity li:first-child { border-top: 0; }
.pub-activity .when { font-family: var(--mono); color: var(--muted); font-size: 12px; flex: none; width: 82px; }
body.public .plate { box-shadow: inset 6px 0 0 #2450B0, 0 0 0 1px #D6CEBE; }
.reg fieldset { border-top: 1px solid var(--line); padding-top: 14px; margin: 6px 0 4px; }
.reg legend { color: #9E7429; }
.choice3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 6px; }
.choice { margin: 0; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 8px; border: 1.5px solid var(--line-2); border-radius: 14px; background: #fff; color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer; text-align: center; }
.choice input { width: auto; accent-color: #9E7429; }
.choice:has(input:checked) { border-color: #C79B48; background: #FBF5E8; }
.check.big { font-size: 15px; color: var(--text); font-weight: 600; }
.req-box { border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin-top: 8px; background: #FDFBF7; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.reg-link { text-align: center; margin-top: 14px !important; }
@media (max-width: 760px) { .choice3 { grid-template-columns: 1fr; } .pub-card { padding: 20px; } .pub-card h1 { font-size: 28px; } }

/* --- Accesso ------------------------------------------------------------- */
body.auth { display: block; }
.auth-wrap { position: relative; z-index: 1; min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 40px; max-width: 1180px; margin: 0 auto; padding: 48px 32px; }
.auth-brand { display: flex; align-items: center; gap: 40px; justify-content: center; }
.auth-brand .seal { flex: none; filter: drop-shadow(0 24px 50px rgba(0,0,0,.7)) drop-shadow(0 0 40px rgba(199,155,72,.18)); }
.wordmark { font-family: var(--display); font-weight: 700; font-size: 64px; line-height: .92; letter-spacing: .02em; color: var(--ivory); }
.motto { font-family: var(--serif); font-size: 21px; color: var(--gold); margin-top: 12px; }
.auth-panel { display: flex; flex-direction: column; gap: 16px; animation: eruIn .5s var(--ease) both; }
.auth-panel .card { background: linear-gradient(160deg, rgba(255,255,255,.06), rgba(255,255,255,.02)); box-shadow: 0 30px 80px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.06); width: 100%; max-width: 460px; margin: 0; }
.auth-panel .card.narrow { padding: 34px; }
.auth-panel h1 { font-family: var(--display); font-weight: 700; font-size: 38px; text-transform: uppercase; letter-spacing: .02em; line-height: 1; }
.auth-panel .card .muted { margin-bottom: 18px; }
.auth-panel button { width: 100%; padding: 13px 18px; }
.auth-panel .notice { align-self: stretch; max-width: 460px; border-radius: 14px; }
.auth-foot { font-size: 12px; color: var(--dim); margin: 0; letter-spacing: .04em; }

.steps { padding-left: 20px; margin: 16px 0 24px; color: var(--soft); }
.steps li { margin-bottom: 6px; }
.qr-wrap { display: grid; justify-items: center; gap: 12px; margin-bottom: 8px; }
.qr { width: 220px; height: 220px; background: #fff; border-radius: 14px; padding: 8px; box-shadow: 0 20px 50px rgba(0,0,0,.6), 0 0 0 4px rgba(217,184,104,.25); }
.qr svg { width: 100%; height: 100%; display: block; }
.manual { color: var(--muted); font-size: 14px; text-align: center; }
.manual summary { cursor: pointer; }
.secret { display: block; margin-top: 8px; font-family: var(--mono); font-size: 16px; letter-spacing: .1em; color: var(--text); word-break: break-all; }

/* --- Schermi medi ---------------------------------------------------------- */
@media (max-width: 1180px) {
  .today-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rings-card { grid-column: 1 / -1; }
  .rings-wrap { justify-content: flex-start; }
  .auth-wrap { grid-template-columns: 1fr; justify-items: center; gap: 28px; }
  .auth-brand { gap: 24px; }
  .auth-brand .seal { width: 150px; height: 150px; }
  .wordmark { font-size: 48px; }
}

/* --- Telefono: il binario diventa la barra in basso, come un'app ------------ */
@media (max-width: 760px) {
  body.app { display: block; padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .rail {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; flex-direction: row; justify-content: space-around; gap: 0;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid rgba(255,255,255,.08); background: rgba(5,6,8,.88);
  }
  .rail a { flex-direction: column; width: auto; height: auto; padding: 6px 10px; gap: 2px; border-radius: 12px; }
  .rail-label { display: block; font-size: 10px; letter-spacing: .02em; white-space: nowrap; }
  .rail a.rail-seal, .rail-fill, .rail .me { display: none; }
  .rail-out { flex-direction: row; }
  /* barra come un'app: 4 voci fisse + «Altro» (le altre sezioni ed «Esci» stanno nel pannello) */
  .rail { justify-content: space-around; padding: 6px 4px calc(2px + env(safe-area-inset-bottom)); background: #07080A; }
  .rail .rail-sec, .rail-out { display: none; }
  .rail > a, .rail-more { flex: 1 1 0; min-width: 0; }
  .rail > a, .rail-more > summary { padding: 6px 2px !important; }
  .rail-label { font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .rail-more { display: flex; }
  .rail-more > summary { list-style: none; cursor: pointer; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; border-radius: 12px; color: var(--muted); }
  .rail-more > summary::-webkit-details-marker { display: none; }
  .rail-more > summary.on, .rail-more[open] > summary { color: #fff; background: rgba(255,255,255,.08); }
  .rail-more[open] > summary::after { content: ""; position: fixed; left: 0; right: 0; top: 0; bottom: calc(60px + env(safe-area-inset-bottom)); background: rgba(0,0,0,.55); z-index: 1; }
  .more-sheet { position: fixed; left: 0; right: 0; bottom: calc(60px + env(safe-area-inset-bottom)); z-index: 2; max-height: 72vh; overflow-y: auto; padding: 16px 16px 14px;
    background: #0D0F13; border-top: 1px solid rgba(255,255,255,.1); border-radius: 22px 22px 0 0; box-shadow: 0 -20px 50px rgba(0,0,0,.6); }
  .more-who { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
  .more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .more-grid a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border-radius: 14px; background: rgba(255,255,255,.04); color: var(--soft);
    font-size: 12px; text-align: center; line-height: 1.25; border: 1px solid rgba(255,255,255,.05); }
  .more-grid a.on { color: #fff; border-color: rgba(217,184,104,.5); }
  .more-out { margin-top: 12px; }
  .more-out button { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; }
  .stage { padding: 14px 16px 32px; gap: 16px; }
  .topline { justify-content: space-between; }
  .mobile-brand { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: .12em; color: var(--text); }
  .search-pill { order: 3; flex: 1 1 100%; }
  .search-pill input { width: 100%; }
  .topline .button { padding: 9px 14px; font-size: 14px; }
  h1.display { font-size: 36px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 14px; }
  .kpi-value { font-size: 26px; }
  .spark { width: 64px; }
  .today-grid { grid-template-columns: minmax(0, 1fr); }
  .board { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; margin: 0 -6px; }
  .col { flex: 0 0 78%; scroll-snap-align: start; }
  .cols, .grid2, .grid3, .grid3.tight { grid-template-columns: 1fr; }
  .head { flex-direction: column; align-items: flex-start; }
  .list-row { grid-template-columns: auto 1fr; gap: 6px 12px; padding: 12px 14px; }
  .list-row .badge { justify-self: start; grid-column: 2; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .chips a { white-space: nowrap; }
  .list-row .date, .list-row .count { display: none; }
  .card { padding: 18px; border-radius: 18px; }
  .case-hero { padding: 18px; gap: 20px; }
  .plate-eu.lg .num { font-size: 26px; padding: 4px 12px; }
  .stepper .node { width: 26px; height: 26px; font-size: 11px; }
  .stepper li::before { top: 12px; }
  .stepper .lbl { display: none; }
  .stepper li.current .lbl { display: block; position: absolute; top: 36px; white-space: nowrap; font-size: 11px; }
  .stepper { padding-bottom: 22px; }
  .hud { grid-template-columns: 1fr 1fr; }
  .folder { grid-template-columns: minmax(0, 1fr) 70px auto; }
  .mail-wrap { grid-template-columns: minmax(0, 1fr); }
  .mail-side { position: static; max-height: none; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; padding: 8px; }
  .mail-side .mf-account { display: contents; }
  .mail-side .mf { flex: none; white-space: nowrap; }
  .mail-side .mf.acc { margin-top: 0; }
  .mail-side .mf.sub { padding-left: 10px; }
  .mail-side .mf .addr { overflow: visible; }
  .mail-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 2px 10px; padding: 12px 14px; }
  .mail-row .what { grid-column: 1 / -1; grid-row: 2; }
  .mail-row .meta { grid-column: 2; grid-row: 1; }
  .mail-body iframe { height: 65vh; }
  .c-row { grid-template-columns: 1fr; gap: 2px; }
  .big-check { margin-top: 8px; }
  .hud > div { padding: 12px 14px; }
  .hud-v { font-size: 22px; }
  .quick { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .quick a { padding: 10px 2px; font-size: 11px; }
  .ns-row { grid-template-columns: 1fr; }
  .journal li { grid-template-columns: 12px minmax(0, 1fr); }
  .journal .when { grid-column: 2; text-align: left; }
  .journal .when br { display: none; }
  .journal .when .sep { display: inline; }
  .auth-wrap { padding: 28px 16px; }
  .auth-brand { flex-direction: column; text-align: center; }
  .auth-brand .seal { width: 120px; height: 120px; }
  .wordmark { font-size: 40px; }
  .auth-panel .card.narrow { padding: 24px; }
}

/* Chi ha chiesto meno movimento non vede animazioni né effetti 3D */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .lift:hover, .chip3d:hover, .press:hover, .press:active, [data-tilt], .rings, .fx-glow, .fx-grid, .lift-rows .list-row:hover { transform: none !important; }
}

/* --- Listino, garanzia, pagamenti ---------------------------------------------- */
.guarantee { background: linear-gradient(160deg, #FFFFFF, #FBF5E8); border-color: #E6C77F; }
.g-motto { font-family: var(--serif); font-size: 26px; line-height: 1.15; color: #0B0B0C; margin: 6px 0 10px; letter-spacing: 0; text-transform: none; }
.g-steps, .g-list { margin: 0 0 16px; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.pub-card .pub-h2 { margin-top: 18px; }
.svc-list { list-style: none; margin: 16px 0; padding: 0; }
.svc-list li { padding: 14px 0; border-top: 1px solid var(--line); }
.svc-list li:first-child { border-top: 0; }
.svc-list p { margin: 4px 0 0; font-size: 14px; }
.svc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.svc-price { font-family: var(--display); font-weight: 700; font-size: 22px; color: #9E7429; flex: none; }
.svc-g { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 700; color: #1D7A4C; background: #E6F7EE; padding: 3px 9px; border-radius: 999px; }
.price-note { border: 1px solid #E6C77F; background: #FBF5E8; border-radius: 14px; padding: 12px 14px; font-size: 14px; color: var(--soft); margin: 4px 0 10px; }
.price-note strong { color: var(--text); }
/* centrale */
.pay-list { list-style: none; margin: 0; padding: 0; }
.pay-list > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.pay-list > li:first-child { border-top: 0; }
.pay-main { display: flex; flex-direction: column; min-width: 0; }
.pay-actions { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.pay-actions form { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 0; }
.pay-actions input { width: auto; flex: 1 1 180px; margin: 0; }
.pay-actions button { margin: 0; }
.p-da_pagare { color: var(--gold); } .p-pagato { color: #3ECF8E; } .p-rimborso_dovuto { color: #FF6B81; } .p-rimborsato, .p-annullato { color: var(--dim); }
.svc-edit { border-top: 1px solid var(--line); padding: 14px 0; }
.svc-edit:first-child { border-top: 0; }
.svc-edit summary { cursor: pointer; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.svc-edit summary .sumup-missing { color: var(--gold); font-size: 12px; }
.pay-add { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.pay-add select { flex: 2 1 220px; width: auto; margin: 0; }
.pay-add input { flex: 1 1 160px; width: auto; margin: 0; }
.pay-add button { margin: 0; }
.acc-edit { display: block; }
.acc-edit summary { cursor: pointer; color: var(--gold); }
.acc-edit form { margin-top: 10px; }
.acc-new { margin-top: 14px; }
.acc-new summary { cursor: pointer; }
.acc-new form { margin-top: 12px; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.row-btns .button { margin: 0; }
.q-actions { display: flex; gap: 6px; flex: none; }
.q-actions form { margin: 0; }
.q-actions button { margin: 0; }
.svc-buy { margin-top: 10px; }
.svc-buy summary { list-style: none; display: inline-flex; cursor: pointer; }
.svc-buy summary::-webkit-details-marker { display: none; }
.svc-buy[open] summary { display: none; }
.svc-buy form { margin-top: 6px; border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: #FDFBF7; }
.pub-foot .claim { font-family: var(--serif); font-style: italic; color: #9E7429; font-size: 15px; }
.t-gold { color: var(--gold); }
.list-row > .badge { flex: none; align-self: center; width: auto; }
.mb-sender { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 8px; }
.mb-sender form { margin: 0; }
.mb-sender button { margin: 0; }
.inline-form { margin: 8px 0 0; }
.inline-form button { margin: 0; }
.pay-actions.chg { align-items: center; }
.pay-actions.chg input { flex: 1 1 160px; }
.span2 { grid-column: 1 / -1; }
.lbl { display: block; font-size: 13px; color: var(--soft); margin-bottom: 6px; }
.brand-pick { display: flex; gap: 10px; flex-wrap: wrap; }
.brand-pick .choice { border: 1.5px solid var(--line-2, rgba(255,255,255,.14)); border-radius: 12px; padding: 8px 12px; display: flex; align-items: center; gap: 8px; cursor: pointer; margin: 0; }
.brand-pick .choice:has(input:checked) { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217,184,104,.15); }
.brand-pick img { display: block; height: 44px; width: auto; }
.brand-pick .choice { background: rgba(255,255,255,.04); color: var(--text); font-weight: 500; }
.brand-pick .choice:has(input:checked) { background: rgba(217,184,104,.10); }
.spam-hint { display: flex; gap: 12px; align-items: flex-start; border: 1px solid rgba(217,184,104,.55); background: rgba(217,184,104,.10); border-radius: 14px; padding: 12px 14px; margin: 10px 0 14px; text-align: left; }
.spam-hint p { margin: 0; font-size: 14px; line-height: 1.5; }
.spam-ico { flex: none; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; color: #14100A; background: linear-gradient(135deg, #F1DCA2, #C79B48 45%, #9E7429); }
body.public .spam-hint { background: #FBF5E8; border-color: #E6C77F; color: var(--soft); }
.center-note { text-align: center; }

/* --- Area clienti: profondità, parallax e luci di stato -------------------------- */
:root { --sy: 0; }
.pub-depth { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.pub-depth .pd { position: absolute; border-radius: 50%; filter: blur(60px); will-change: transform; }
.pub-depth .a { width: 520px; height: 520px; left: -160px; top: -120px; background: radial-gradient(circle, rgba(199,155,72,.28), transparent 65%); transform: translate3d(0, calc(var(--sy) * -0.04px), 0); }
.pub-depth .b { width: 460px; height: 460px; right: -140px; top: 280px; background: radial-gradient(circle, rgba(230,199,127,.22), transparent 65%); transform: translate3d(0, calc(var(--sy) * -0.07px), 0); }
.pub-depth .c { width: 380px; height: 380px; left: 30%; top: 760px; background: radial-gradient(circle, rgba(158,116,41,.14), transparent 65%); transform: translate3d(0, calc(var(--sy) * -0.1px), 0); }
body.public .pub-head, body.public .pub-nav, body.public .pub-main, body.public .pub-foot { position: relative; z-index: 1; }
.pub-seal { display: inline-flex; transform: translate3d(0, calc(var(--sy) * 0.02px), 0); filter: drop-shadow(0 10px 22px rgba(60,45,20,.28)); }

/* card: ombra a strati, entrata e inclinazione leggera */
body.public .pub-card { box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 2px 4px rgba(60,45,20,.04), 0 12px 28px rgba(60,45,20,.07), 0 30px 60px -20px rgba(60,45,20,.16); }
.rise { animation: pubRise .6s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--d, 0ms); }
@keyframes pubRise { from { opacity: 0; transform: translate3d(0, 18px, 0) scale(.985); } to { opacity: 1; transform: none; } }
.tilt3d { position: relative; transform-style: preserve-3d; transform: perspective(2400px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s; }
.tilt3d.rise { animation-fill-mode: backwards; }
.tilt3d::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(255,255,255,.55), transparent 45%); mix-blend-mode: soft-light; }
.tilt3d:hover::after { opacity: 1; }
.tilt3d:hover { box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 4px 8px rgba(60,45,20,.05), 0 22px 40px rgba(60,45,20,.10), 0 40px 80px -24px rgba(60,45,20,.22); }
body.public .button, body.public button { transition: transform .15s, box-shadow .2s, background .2s; }
body.public .button:hover, body.public button:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(20,16,10,.18); }

/* luci di stato: verde tutto ok, arancione serve una tua azione, rosso attenzione */
.led { flex: none; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #B9B2A4; box-shadow: 0 0 0 3px rgba(185,178,164,.18); vertical-align: middle; }
.led.g { background: #22B573; box-shadow: 0 0 0 3px rgba(34,181,115,.16), 0 0 10px rgba(34,181,115,.65); }
.led.o { background: #F2992E; box-shadow: 0 0 0 3px rgba(242,153,46,.18), 0 0 10px rgba(242,153,46,.7); animation: ledPulse 1.8s ease-in-out infinite; }
.led.r { background: #E5484D; box-shadow: 0 0 0 3px rgba(229,72,77,.18), 0 0 12px rgba(229,72,77,.75); animation: ledPulse 1.2s ease-in-out infinite; }
@keyframes ledPulse { 50% { box-shadow: 0 0 0 6px rgba(242,153,46,0), 0 0 18px currentColor; opacity: .75; } }
.st { display: inline-flex; align-items: center; gap: 7px; }
.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.st-wait { color: #C77514; background: #FFF3E3; }
.st-wait::before { animation: ledPulse 1.8s ease-in-out infinite; }
.st-no::before { animation: ledPulse 1.2s ease-in-out infinite; }
/* centro notifiche */
.notif { padding: 18px 22px; }
.notif-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.notif-list a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--text); text-decoration: none; transition: background .2s, transform .2s; }
.notif-list a:hover { background: #FBF5E8; transform: translateX(3px); color: var(--text); }
.notif-list .n-text { flex: 1; font-weight: 600; font-size: 15px; }
.notif-list .n-text small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.notif-list .n-go { color: #9E7429; font-size: 13px; font-weight: 700; }
.notif.all-ok .notif-list a { font-weight: 500; }
.mini-steps i.cur { background: #F2992E; box-shadow: 0 0 8px rgba(242,153,46,.8); animation: ledPulse 1.8s ease-in-out infinite; }
.pub-flow li.cur .dot { animation: curGlow 2.2s ease-in-out infinite; }
@keyframes curGlow { 50% { box-shadow: 0 0 0 7px rgba(199,155,72,.12), 0 0 18px rgba(199,155,72,.45); } }
@media (prefers-reduced-motion: reduce) {
  .rise, .led.o, .led.r, .st::before, .mini-steps i.cur, .pub-flow li.cur .dot { animation: none !important; }
  .pub-depth .pd, .pub-seal { transform: none !important; }
}
.pl-title { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.st-line .led { margin-right: 4px; }
body.public .notif-list a, body.public .notif-list a:hover { color: var(--text); }
body.public .notif-list .n-go { color: #9E7429; }
.pay-waiver { flex: none; max-width: 100%; }
.pay-waiver summary { list-style: none; cursor: pointer; }
.pay-waiver summary::-webkit-details-marker { display: none; }
.pay-waiver[open] { flex-basis: 100%; }
.pay-waiver[open] summary { display: none; }
.pay-waiver form { border: 1px solid #E6C77F; background: #FBF5E8; border-radius: 14px; padding: 12px; font-size: 13px; }
.pub-list > li:has(.pay-waiver[open]) { flex-wrap: wrap; }

/* --- Documenti e foto della pratica ---------------------------------------------- */
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 6px 0 12px; }
.ph { margin: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: rgba(255,255,255,.03); display: flex; flex-direction: column; }
.ph a { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #0d0d0f; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.ph a:hover img { transform: scale(1.04); }
.ph figcaption { padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.ph-t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-m { color: var(--muted); }
.ph-a, .dl-a { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.ph-a form, .dl-a form { margin: 0; }
.ph-a button, .dl-a button { margin: 0; padding: 4px 8px; font-size: 11px; }
.ph.internal, .doc-list li.internal { border-style: dashed; }
.doc-list { list-style: none; margin: 0 0 10px; padding: 0; }
.doc-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.doc-list li:first-child { border-top: 0; }
.doc-list li.internal { border-top-style: dashed; }
.dl-main { flex: 1; min-width: 180px; display: flex; flex-direction: column; }
.dl-main small { color: var(--muted); font-size: 12px; }
.up-pick { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.up-btn { position: relative; margin: 0; display: inline-flex; align-items: center; gap: 6px; padding: 11px 16px; border-radius: 12px; border: 1.5px dashed var(--gold); color: var(--text); cursor: pointer; font-weight: 600; font-size: 14px; }
.up-btn:hover { background: rgba(217,184,104,.08); }
.up-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
button.armed { background: var(--red, #E5484D) !important; color: #fff !important; border-color: transparent !important; }
body.public .ph { background: #fff; }
body.public .ph a { background: #F3F0EA; }
body.public .up-btn { border-color: #C79B48; }
body.public .up-btn:hover { background: #FBF5E8; }
.consents { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 4px; }
.check.consent { align-items: flex-start; font-size: 14px; line-height: 1.45; color: var(--text); padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #FDFBF7; }
.check.consent input { margin-top: 3px; flex: none; }
.check.consent:has(input:checked) { border-color: #C79B48; background: #FBF5E8; }

/* --- Incarichi ------------------------------------------------------------------- */
.inc-kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 14px; }
.inc-kpi .card { display: flex; flex-direction: column; gap: 6px; }
.kpi-n { font-family: var(--display); font-size: 40px; line-height: 1; }
.filters { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: space-between; margin-bottom: 12px; }
.filters input[type=search] { max-width: 320px; margin: 0; }
.inc-list .pay-main a { color: var(--gold); }
.inc-show { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 24px; align-items: center; }
.inc-show .row-btns form { display: inline; margin: 0; }
.inc-qr { text-align: center; }
.inc-qr .qr { background: #fff; border-radius: 16px; padding: 10px; width: 220px; height: 220px; margin: 0 auto 8px; }
.inc-qr .qr svg { width: 100%; height: 100%; }
.step-h { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.step-h .h { margin: 0; }
.step-n { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #14100A; background: linear-gradient(135deg, #F1DCA2, #C79B48 45%, #9E7429); }
.choice-row { display: flex; gap: 8px; flex-wrap: wrap; border: 0; padding: 0; margin: 0 0 12px; }
.choice-row legend { margin-bottom: 6px; }
.pill { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line-2); cursor: pointer; font-size: 14px; color: var(--text); }
.pill input { width: auto; margin: 0; accent-color: var(--gold); }
.pill:has(input:checked) { border-color: var(--gold); background: rgba(217,184,104,.12); }
.arts { display: flex; flex-direction: column; gap: 12px; }
.art { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: rgba(255,255,255,.02); }
.art-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.art-head input, .art-head select { margin: 0; }
.art-n { font-family: var(--mono); color: var(--gold); font-size: 13px; }
.art-tools { display: flex; gap: 4px; }
.art-tools button { margin: 0; padding: 6px 10px; }
.art textarea { margin: 0; }
.art:has(select option[value="1"]:checked) { border-color: rgba(229,72,77,.45); }
.ph-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px; font-size: 13px; }
.ph-list code { color: var(--gold); }
@media (max-width: 760px) {
  .inc-show { grid-template-columns: 1fr; }
  .art-head { grid-template-columns: auto minmax(0, 1fr); }
  .art-head select, .art-tools { grid-column: 1 / -1; }
  .inc-kpi { grid-template-columns: 1fr; }
}
.art-head { grid-template-columns: auto 70px minmax(0, 1fr) auto auto; }
.art-num { text-align: center; font-family: var(--mono); }
@media (max-width: 760px) { .art-head { grid-template-columns: auto 70px minmax(0, 1fr); } }
.client-card { margin-top: 12px; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: rgba(255,255,255,.02); }
.client-card .facts { margin: 6px 0; }
.row-btns { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row-btns > form { margin: 0; }
.row-btns > .button, .row-btns > button, .row-btns > form > button { margin: 0; }
/* documenti del cliente (visura, identità) */
.cdocs { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.cdocs li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; flex-wrap: wrap; }
.cdocs li > div:first-of-type { flex: 1 1 220px; display: grid; gap: 2px; }
.cdocs .row-btns { gap: 6px; }
.t-amber { color: #F2B45E; }
.cdoc-up { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.cdoc-up select { width: auto; }
.cdoc-up input[type=file] { flex: 1 1 220px; }
.verify { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .verify { grid-template-columns: 1fr; } }
.verify .preview img { width: 100%; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.verify .preview iframe { width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.vtable { width: 100%; border-collapse: collapse; }
.vtable th, .vtable td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 14px; }
.vtable td.cur { color: var(--muted, #9a9a9a); max-width: 180px; overflow-wrap: anywhere; }
.vtable input[type=text] { margin: 0; }
.vtable .same { color: #22B573; font-size: 12px; }
.extract-box { border: 1px dashed var(--line-2, #444); border-radius: 14px; padding: 12px 14px; display: grid; gap: 8px; margin-bottom: 12px; }
.extract-box .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.extract-box .row select { width: auto; }
.extract-box [data-ex-status] { font-size: 13px; }
.t-green { color: #3CCB8A; }
input.filled, select.filled { border-color: rgba(60,203,138,.7) !important; box-shadow: 0 0 0 3px rgba(60,203,138,.15); }
.cdocs .row-btns .button, .cdocs .row-btns button { padding: 6px 12px; font-size: 13px; min-height: 0; line-height: 1.3; }
/* precedenti */
.prec-progress .bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.prec-progress .bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #C79B48, #E6C77F); transition: width .4s; }
.prec-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.prec-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.prec-list li > a:first-of-type { flex: 1; display: grid; gap: 2px; color: inherit; text-decoration: none; }
.prec-list li > * { min-width: 0; overflow-wrap: anywhere; }
.verify .preview img + .eyebrow, .verify .preview a + .eyebrow { margin-top: 14px; }
pre.ocr { white-space: pre-wrap; font-size: 12px; max-height: 320px; overflow: auto; background: rgba(255,255,255,.03); padding: 10px; border-radius: 10px; }
.notice-box { border: 1px solid rgba(242,153,46,.5); background: rgba(242,153,46,.08); border-radius: 12px; padding: 12px 14px; display: grid; gap: 8px; }
.right { display: flex; justify-content: flex-end; margin-top: 10px; }
/* rinotifiche */
.search-row { margin: 14px 0; }
.search-row input[type=search] { width: auto; flex: 1 1 260px; margin: 0; }
.search-row select { width: auto; margin: 0; }
.fine-row .date { text-align: right; font-size: 12px; line-height: 1.3; }
.badge.s-fine-da_lavorare, .badge.s-fine-attesa_documenti { border-color: rgba(242,153,46,.5); color: #F2B45E; }
.badge.s-fine-pronta { border-color: rgba(217,184,104,.7); color: #E6C77F; }
.badge.s-fine-inviata, .badge.s-fine-consegnata { border-color: rgba(60,203,138,.5); color: #3CCB8A; }
.badge.s-fine-errore_invio { border-color: rgba(229,72,77,.6); color: #ff8a8e; }
.checklist { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.checklist li { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.deadline-big { font-family: var(--mono); font-size: 28px; line-height: 1; }
textarea.letter { font-family: var(--mono); font-size: 13px; line-height: 1.5; min-height: 380px; }
.fine-cols { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1000px) { .fine-cols { grid-template-columns: 1fr; } }
.head.flush { margin: 0; }
.right-col { text-align: right; }
/* normativa */
.law-text { font-size: 15px; line-height: 1.65; margin: 10px 0; padding: 16px 18px; border-left: 3px solid rgba(217,184,104,.6); background: rgba(255,255,255,.02); border-radius: 0 12px 12px 0; }
.law-text p { margin: 0 0 .7em; }
.law-note { border: 1px dashed var(--line-2); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.lead { font-size: 18px; color: var(--muted); margin: 4px 0 0; }
.checklist.folder li { align-items: baseline; }
.fine-reason { font-size: 17px; margin: 6px 0 2px; }
.span2 { grid-column: 1 / -1; }
.checklist.folder li { display: block; padding: 6px 0; border-bottom: 1px solid var(--line); line-height: 1.45; }
.checklist.folder li:last-child { border-bottom: 0; }
.folder li a { overflow-wrap: anywhere; word-break: break-word; min-width: 0; }
.fine-row .main { min-width: 0; }
.fine-row .main strong, .fine-row .main small { overflow-wrap: anywhere; }
.case-title .plate { vertical-align: middle; margin-right: 6px; }
.checklist.folder { display: block !important; columns: auto; }
.mail-pick { cursor: pointer; } .mail-pick input[type=checkbox] { width: auto; margin: 0; }
.chips.sub { margin-top: 8px; }
.chips.sub a { font-size: 13px; padding: 4px 12px; }
.list-group { padding: 10px 16px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: rgba(255,255,255,.03); border-bottom: 1px solid var(--line); }
.list-group.ok { color: #E6C77F; }
.list-group.late { color: #ff8a8e; }
.company-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; margin-top: 14px; }
.company-card { display: block; color: inherit; text-decoration: none; transition: border-color .2s, transform .2s; }
.company-card:hover { border-color: rgba(217,184,104,.6); transform: translateY(-2px); }
.company-card .kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 10px; }
.company-card .kpis .n { display: block; font-family: var(--mono); font-size: 26px; line-height: 1.1; }
.company-card .kpis small { color: var(--muted); font-size: 12px; }

/* Precedenti: per anno, mese ed ente */
.year-head{font-family:var(--display,inherit);font-size:1.4rem;margin:1.4rem 0 .4rem;letter-spacing:.02em}
.prec-ente{margin:.6rem 0 .2rem}
.prec-mail-groups .month-block{margin-bottom:1rem}
.prec-mail-groups .prec-group{margin:.5rem 0}
.prec-group-head{display:flex;gap:.6rem;align-items:baseline}
.mail-pick{display:flex!important;align-items:center;gap:.7rem;text-align:left}
.mail-pick .main{flex:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start;text-align:left}
.mail-pick > a{flex:none}

/* Avvisi: tutta la riga porta alla cosa da fare, la spunta la archivia */
.alert .a-main { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 12px 8px 12px 16px; color: inherit; }
.alert .a-main:hover { color: inherit; }
.alert .a-done { flex: none; margin: 0; display: flex; align-items: center; }
.alert .a-done button { margin: 0; padding: 0; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; }
.alert .a-done button:hover { color: #22B573; border-color: #22B573; background: rgba(34,181,115,.1); }
.alerts-archive { align-self: flex-end; color: var(--muted); }
.list-ente { padding: 8px 16px 6px 28px; font-size: 13px; font-weight: 600; color: var(--text); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.015); }
.list-ente span { color: var(--muted); font-weight: 400; margin-left: 6px; }

/* Area cliente: verbali */
.pub-list > li.pub-group { display: block; padding: 14px 0 6px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-top: 0; }
.pub-fine { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 240px; color: inherit; }
.pub-fine small { color: var(--muted); }
.pub-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pub-cols > div { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 560px) { .pub-cols { grid-template-columns: 1fr; } .pub-list > li { flex-wrap: wrap; } }
.pub-dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 20px; margin: 14px 0 0; }
.pub-dl dt { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.pub-dl dd { margin: 2px 0 0; font-weight: 600; }
.pub-mail { white-space: normal; font-size: 14px; line-height: 1.55; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(0,0,0,.02); max-height: 420px; overflow: auto; overflow-wrap: anywhere; }
.pub-add { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }

/* LIFEX Sign */
.lifex-mark { font-family: var(--display); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: 14px; color: var(--gold, #D9B868); margin: 0; }
.lifex-mark span { color: inherit; opacity: .7; font-weight: 400; }
.lifex-mark.sm { font-size: 11px; letter-spacing: .12em; }
.lifex-hero { display: grid; gap: 10px; margin-bottom: 18px; }
.lifex-hero h1 { margin: 0; }
.lifex-points { list-style: none; padding: 0; margin: 6px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.lifex-points li { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.02); }
.lifex-points span { color: var(--muted); font-size: 13px; line-height: 1.5; }
.lifex-signer { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line); }
.lifex-signer:first-of-type { border-top: 0; }
.lifex-qr { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.lifex-qr .qr { width: 150px; height: auto; aspect-ratio: 1; background: #fff; border-radius: 10px; padding: 4px; }
.lifex-qr .qr svg { width: 100%; height: auto; display: block; }
.lifex-more summary { cursor: pointer; color: var(--gold, #D9B868); margin: 6px 0; }
.lifex-done .mono { font-family: var(--mono); word-break: break-all; }
.pub-list > li.pub-sub { padding-left: 22px; }
.lx-hero h1 { font-size: 40px; }
.lx-lead { font-size: 17px; line-height: 1.55; }
.lifex-points.lx-light li { background: #FBF8F2; }
.lx-faq { border-top: 1px solid var(--line); padding: 10px 0; }
.lx-faq summary { cursor: pointer; font-weight: 600; }
.lx-faq p { margin: 8px 0 0; }
@media (max-width: 560px) { .lx-hero h1 { font-size: 30px; } }
.selfie-box { padding: 14px; border: 1px dashed #C79B48; border-radius: 14px; background: #FBF8F2; margin: 10px 0; }
.selfie-box h3 { margin: 0; font-size: 16px; }
.selfie-pick { position: relative; overflow: hidden; display: inline-flex; justify-content: center; }
.selfie-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ok-line { color: #1E8F5A; font-weight: 600; }
.lifex-signer-row { padding: 12px 0; border-top: 1px solid var(--line); } .lifex-signer-row:first-of-type { border-top: 0; }
.lifex-logo { display: block; height: 46px; width: auto; margin: 0 0 6px; } .pub-card .lifex-logo { height: 34px; margin-bottom: 10px; }

/* LIFEX Sign: riquadri della firma */
.lf-tools { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; position: sticky; top: 0; z-index: 3; padding: 10px 0; background: inherit; }
.lf-who, .lf-kind { display: flex; flex-wrap: wrap; gap: 8px; }
.lf-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; border: 2px solid currentColor; cursor: pointer; font-size: 14px; }
.lf-chip input { margin: 0; }
.lf-kind label { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; }
.lf-pages { display: flex; flex-direction: column; gap: 18px; align-items: center; }
.lf-page { position: relative; width: 100%; max-width: 820px; background: #fff; box-shadow: 0 10px 40px rgba(0,0,0,.35); cursor: crosshair; user-select: none; -webkit-user-select: none; }
.lf-page img { display: block; width: 100%; height: auto; pointer-events: none; }
.lf-num { position: absolute; right: 8px; bottom: 6px; font-size: 11px; color: #555; background: rgba(255,255,255,.8); padding: 1px 6px; border-radius: 6px; }
.lf-box { position: absolute; margin: 0; padding: 2px 4px; border: 2px dashed currentColor; border-radius: 6px; background: rgba(255,255,255,.55); font-size: 11px; line-height: 1.1; font-weight: 600; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; cursor: pointer; }
.lf-box.v { border-style: dotted; background: rgba(255,240,200,.65); }
.c0 { color: #067AEB; } .c1 { color: #E0457B; } .c2 { color: #13A06A; } .c3 { color: #C77700; } .c4 { color: #7B4DDB; } .c5 { color: #0096A8; }
.lf-box.c0, .lf-box.c1, .lf-box.c2, .lf-box.c3, .lf-box.c4, .lf-box.c5 { color: inherit; }
.lf-box.c0 { border-color: #067AEB; color: #067AEB; } .lf-box.c1 { border-color: #E0457B; color: #E0457B; } .lf-box.c2 { border-color: #13A06A; color: #13A06A; }
.lf-box.c3 { border-color: #C77700; color: #C77700; } .lf-box.c4 { border-color: #7B4DDB; color: #7B4DDB; } .lf-box.c5 { border-color: #0096A8; color: #0096A8; }
.lf-bar { position: sticky; bottom: 0; z-index: 3; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; padding: 12px 0; margin-top: 16px; background: inherit; }
.lf-bar [data-fields-count] { flex: 1 1 200px; color: var(--muted); }
@media (max-width: 760px) { .lf-bar { bottom: calc(76px + env(safe-area-inset-bottom)); } }
.lf-tools, .lf-bar { background: rgba(5,6,8,.94); }
body.lx .lf-tools, body.lx .lf-bar { background: rgba(8,29,54,.95); }
.pub-media { margin-top: 12px; }
.pub-media-list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pub-media-list a { display: inline-block; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; text-decoration: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.api-app { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.api-app + .api-app { margin-top: 8px; }
.api-app summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.api-app[open] summary { margin-bottom: 12px; }
.secret-box { display: inline-block; padding: 8px 10px; border: 1px dashed var(--gold); border-radius: 10px; word-break: break-all; font-family: var(--mono); font-size: 13px; }
.cg-point { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 0; min-width: 0; }
.cg-point + .cg-point { margin-top: 10px; }
.cg-point legend { padding: 0 6px; font-size: 13px; color: var(--muted); }
.check-col { display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; }
.cg-help summary { cursor: pointer; }
.cg-steps { margin: 10px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.5; }
/* Verifica Veicolo */
.vv-group { margin: 14px 0 6px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.vv-checks { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.vv-check { display: grid; grid-template-columns: 14px 170px 130px 1fr; gap: 10px; align-items: baseline; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.vv-check .led { align-self: center; }
.vv-check-name { font-weight: 600; }
.vv-check-state { font-size: 13px; color: var(--muted); }
.vv-check.anomalia:not(.resolved) .vv-check-state { color: #E5484D; font-weight: 600; }
.vv-check.ok .vv-check-state, .vv-check.resolved .vv-check-state { color: #22B573; }
.vv-check-text { font-size: 14px; color: var(--soft); }
.vv-check-text em { color: var(--gold); font-style: normal; }
@media (max-width: 720px) { .vv-check { grid-template-columns: 14px 1fr auto; } .vv-check-text { grid-column: 2 / -1; } }
.vv-mode { display: grid; gap: 10px; }
.vv-mode .check { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.vv-public-state { font-weight: 700; font-size: 17px; }
.vv-public-state.ok { color: #22B573; }
.vv-public-state.ko { color: #E5484D; }
.vv-hash { font-size: 12px; }
.vv-land { display: flex; flex-direction: column; gap: 22px; max-width: 980px; margin: 0 auto; }
.vv-hero { text-align: center; padding: 34px 8px 10px; }
.vv-hero h1 { font-family: var(--display, inherit); font-size: clamp(32px, 6vw, 58px); line-height: 1.04; margin: 10px 0 14px; text-transform: uppercase; letter-spacing: .01em; }
.vv-eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.vv-lead { font-size: 17px; line-height: 1.6; color: var(--soft); max-width: 720px; margin: 0 auto; }
.vv-ctas { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.vv-price { font-size: 14px; color: var(--muted); margin-top: 12px; }
.vv-sec { border: 1px solid var(--line); border-radius: 22px; padding: 22px; background: rgba(255,255,255,.02); }
.vv-sec h2 { margin: 0 0 14px; font-size: 22px; }
.vv-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.vv-steps li { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 16px; background: rgba(255,255,255,.03); }
.vv-steps span:last-child { color: var(--soft); font-size: 14px; line-height: 1.5; }
.vv-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #111; font-weight: 700; }
.vv-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; border: 0; padding: 0; background: none; }
.vv-box { border: 1px solid var(--line); border-radius: 22px; padding: 22px; background: rgba(255,255,255,.02); }
.vv-box ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 10px; line-height: 1.5; color: var(--soft); }
.vv-box strong { color: var(--text); }
.vv-more summary { cursor: pointer; font-weight: 600; }
.vv-more-body h3 { margin: 16px 0 4px; font-size: 15px; color: var(--gold); }
.vv-more-body p { margin: 0; line-height: 1.6; color: var(--soft); }
.vv-disclaimer { font-size: 13px; color: var(--muted); text-align: center; max-width: 760px; margin: 0 auto; line-height: 1.5; }
.vv-ctas.center { justify-content: center; }
@media (max-width: 760px) { .vv-steps, .vv-two { grid-template-columns: 1fr; } }

/* Compilazione dinamica dei documenti */
.art-if { margin: 0 0 8px; font-size: 13px; }
.flds { display: grid; gap: 10px; }
.fld { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: rgba(255,255,255,.02); }
.fld-head { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto auto auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.sgn .fld-head { grid-template-columns: 200px minmax(0, 1fr) auto; }
.fld-head input, .fld-head select, .fld-more input, .fld-more select, .fld-more textarea { margin: 0; }
.fld-more { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fld-more textarea { grid-column: 1 / -1; }
.fld-ph { margin: 8px 0 0; }
.mono { font-family: var(--mono); }
@media (max-width: 760px) { .fld-head, .sgn .fld-head, .fld-more { grid-template-columns: 1fr; } }
.dc-pick { display: grid; gap: 12px; }
.dc-tpl { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.dc-tpl p { margin: 4px 0 0; }
.dc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.dc-field.wide { grid-column: 1 / -1; }
.dc-field fieldset { border: 0; padding: 0; margin: 0; }
.dc-field legend { font-size: 14px; color: var(--soft); margin-bottom: 6px; text-transform: none; letter-spacing: 0; font-weight: 400; }
.dc-field .req { color: var(--gold); }
.dc-field.has-err input, .dc-field.has-err select, .dc-field.has-err textarea { border-color: rgba(255,92,122,.7); }
.dc-err { color: var(--red-soft); font-size: 13px; margin: 4px 0 8px; }
.dc-errlist { margin: 6px 0 0; padding-left: 18px; font-size: 14px; }
.dc-euro { position: relative; }
.dc-euro::before { content: '€'; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.dc-euro input { padding-left: 28px; }
.dc-motive { margin-top: 4px; }
.dc-actions { position: sticky; bottom: 12px; background: rgba(10,12,16,.85); backdrop-filter: blur(10px); padding: 10px; border-radius: 16px; border: 1px solid var(--line-2); }
.dc-values { display: grid; grid-template-columns: minmax(160px, 1fr) 2fr; gap: 6px 16px; margin: 0; }
.dc-values dt { color: var(--muted); font-size: 14px; }
.dc-values dd { margin: 0; }

.dc-signer .wide-row, .dc-signer .sg-actions:empty { grid-column: 1 / -1; }
@media (max-width: 760px) { .dc-grid, .dc-values { grid-template-columns: 1fr; } .dc-tpl { flex-direction: column; align-items: stretch; } }

/* Stanze */
.room-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.room-head-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.room-quota { height: 6px; border-radius: 99px; background: var(--line-2); overflow: hidden; max-width: 320px; margin-top: 8px; }
.room-quota-bar { display: block; height: 100%; width: 0; background: var(--gold); }
.room-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; margin-top: 18px; }
.room-main, .room-side { display: grid; gap: 18px; }
.room-steps { margin: 0; padding-left: 20px; display: grid; gap: 10px; }
.room-steps li strong { display: block; }
.room-steps li span { color: var(--soft); font-size: 14px; }
.room-items, .room-files, .room-updates, .room-members, .room-list, .room-log { list-style: none; margin: 0; padding: 0; }
.room-items li, .room-files li, .room-members li, .room-list li { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.room-items li:first-child, .room-files li:first-child, .room-members li:first-child, .room-list li:first-child { border-top: 0; }
.room-list li > div > strong { display: block; }
.room-items li.mine { border-left: 3px solid var(--gold); padding-left: 10px; }
.room-items .badge { margin-left: 6px; }
.room-items p, .room-updates p { margin: 4px 0 0; }
.room-note { color: var(--gold); }
.room-file-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 320px; }
.room-file-main strong { word-break: break-word; }
.room-preview video, .room-preview img { width: 100%; max-height: 420px; border-radius: 12px; margin-top: 8px; background: #000; }
.room-progress { border: 1px solid var(--line-2); border-radius: 12px; padding: 10px; }
.room-progress-bar { display: block; height: 8px; width: 0; border-radius: 99px; background: var(--gold); transition: width .2s; }
.room-updates li { padding: 10px 0; border-top: 1px solid var(--line); }
.room-updates li.aggiornamento p { font-weight: 500; }
.room-members li.revoked { opacity: .5; }
.room-members .sm { display: block; }
.room-log li { padding: 4px 0; font-size: 13px; border-top: 1px solid var(--line); }
.room-req { border-top: 1px solid var(--line); padding-top: 12px; }
.room-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.room-row .sm { display: block; }
.room-invite { display: grid; grid-template-columns: 1fr 1.2fr 1fr 170px; gap: 8px; margin-bottom: 8px; }
.room-invite input, .room-invite select { margin: 0; }
.room-access { max-width: 520px; margin: 0 auto; }
@media (max-width: 900px) { .room-grid { grid-template-columns: 1fr; } .room-invite { grid-template-columns: 1fr; } .room-head { flex-direction: column; } .room-head-actions { align-items: flex-start; } }
.room-files .room-preview { flex-basis: 100%; }
.room-powered { text-align: center; margin: 24px auto 0; max-width: 640px; }

/* Accordo nella stanza */
.agr-rows { display: grid; gap: 6px; }
.agr-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; }
.agr-row input { margin: 0; }
.agr-n { font-family: var(--mono); color: var(--gold); text-align: right; }
.agr-list { list-style: none; margin: 0; padding: 0; }
.agr-list li { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.agr-main { display: flex; flex-direction: column; gap: 3px; flex: 1 1 320px; min-width: 0; }
.agr-main .badge { align-self: flex-start; }
.agr-ok { color: var(--green); }
.agr-progress p { margin: 6px 0 0; }
.agr .row-btns form { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* Area clienti: pratiche e documenti come cartelle */
.fold-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 34px 22px; padding-top: 18px; }
.fold-grid-sm { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 28px 16px; margin-bottom: 14px; }
.fold { position: relative; display: block; aspect-ratio: 5 / 4; color: inherit; text-decoration: none; --back: #d9dde3; --front: linear-gradient(160deg, rgba(255,255,255,.92), rgba(236,239,244,.82)); --ink: #15171b; --sub: #5d6470; }
.fold-red { --back: linear-gradient(135deg, #2a0b0e, #7d1d22 55%, #c2453e); --front: linear-gradient(160deg, rgba(48,14,17,.93), rgba(20,8,10,.9)); --ink: #fff; --sub: rgba(255,255,255,.72); }
.fold-blue { --back: linear-gradient(135deg, #1d2f4d, #4f78b0 55%, #b7c9e4); --front: linear-gradient(160deg, rgba(255,255,255,.93), rgba(232,237,245,.85)); }
.fold-warn { --back: linear-gradient(135deg, #5b3a07, #c98a1f 60%, #f0c46c); --front: linear-gradient(160deg, rgba(255,251,240,.94), rgba(250,238,210,.86)); }
.fold-archive { --back: #cfd3d9; --front: linear-gradient(160deg, rgba(246,247,249,.95), rgba(229,232,236,.9)); --sub: #7a808a; }
.fold-link { position: absolute; inset: 0; display: block; perspective: 900px; color: inherit; text-decoration: none; }
.fold-back { position: absolute; inset: 9% 0 0 0; border-radius: 0 16px 16px 16px; background: var(--back); box-shadow: 0 14px 30px rgba(15,18,24,.16); }
.fold-back::before { content: ''; position: absolute; top: -9%; left: 0; width: 44%; height: 12%; border-radius: 12px 12px 0 0; background: inherit; }
.fold-papers { position: absolute; left: 7%; right: 7%; top: 3%; height: 62%; }
.paper { position: absolute; top: 0; width: 64%; height: 100%; background: #fff; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,.18); overflow: hidden; display: flex; flex-direction: column; justify-content: flex-start; padding: 8px; gap: 2px; color: #1b1e23;
  transform: translateY(var(--ty, 0)) rotate(var(--r, 0deg)); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.paper:nth-child(1) { left: 0; --r: -7deg; }
.paper:nth-child(2) { left: 18%; --r: 1deg; }
.paper:nth-child(3) { left: 36%; --r: 7deg; }
.paper img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.paper b { font-family: var(--mono); font-size: 11px; color: #8a1f24; }
.paper small { font-size: 10px; color: #5d6470; line-height: 1.2; }
.paper-blank { background: repeating-linear-gradient(#fff 0 10px, #eef0f3 10px 11px); }
.fold-front { position: absolute; left: 0; right: 0; bottom: 0; height: 64%; border-radius: 16px; background: var(--front); border: 1px solid rgba(255,255,255,.45); box-shadow: 0 -2px 18px rgba(0,0,0,.08), 0 12px 24px rgba(15,18,24,.14);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); padding: 12px 14px; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; color: var(--ink);
  transform-origin: bottom center; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.fold-title { font-weight: 700; font-size: 15px; line-height: 1.25; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fold-sub { font-size: 13px; color: var(--sub); }
.fold-meta { font-size: 12px; color: var(--sub); }
.fold .mini-steps { margin-top: 6px; }
.fold:hover .fold-front, .fold:focus-within .fold-front { transform: rotateX(-16deg); }
.fold:hover .paper, .fold:focus-within .paper { --ty: -14%; }
.fold:active .fold-front { transform: rotateX(-22deg); }
.fold-add { position: absolute; right: 12px; bottom: 12px; z-index: 2; width: 38px; height: 38px; border-radius: 12px; background: #111; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; line-height: 1; text-decoration: none; box-shadow: 0 6px 14px rgba(0,0,0,.25); transition: transform .2s; }
.fold-add:hover { transform: scale(1.08); color: #fff; }
.fold-red .fold-add { background: #fff; color: #111; }
.fold-archive-list:not(:target) { display: none; }
.doc-group { display: none; }
.doc-group:target { display: block; animation: eruIn .3s var(--ease) both; }
.pub-h3 { font-size: 16px; margin: 10px 0; }
@media (prefers-reduced-motion: reduce) { .paper, .fold-front, .fold-add { transition: none; } }
@media (max-width: 520px) { .fold-grid:not(.fold-grid-sm) .fold { aspect-ratio: 16 / 10; } .fold-grid-sm { grid-template-columns: 1fr 1fr; } .fold-grid-sm .fold-title { font-size: 14px; } }

/* --- Videochiamata della stanza ------------------------------------------------------------- */
body.sala-body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--text); font-family: var(--sans); }
.sala { display: flex; flex-direction: column; min-height: 100dvh; }
.sala-flash { margin: 12px 16px 0; }
.sala-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.sala-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sala-title strong { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sala-center { width: min(560px, calc(100% - 32px)); margin: 6vh auto; }
.sala-list { list-style: none; margin: 0; padding: 0; }
.sala-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.sala-list form.inline { display: inline; }
.sala-preview { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #0b0d11; border: 1px solid var(--line-2); }
.sala-preview video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.sala-preview-off { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.sala-lobby-btns button[aria-pressed="false"], .sala-bar [data-mic][aria-pressed="false"], .sala-bar [data-cam][aria-pressed="false"] { color: var(--red-soft); border-color: rgba(255,92,122,.45); }
.sala-dots { display: flex; gap: 6px; }
.sala-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); animation: salaDot 1.2s infinite ease-in-out; }
.sala-dots i:nth-child(2) { animation-delay: .15s; } .sala-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes salaDot { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }
.sala-stage { flex: 1; display: flex; gap: 12px; padding: 12px 12px 84px; min-height: 0; position: relative; }
.sala-grid { flex: 1; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-content: center; min-width: 0; }
.sala-grid[data-n="1"] { grid-template-columns: minmax(0, 960px); justify-content: center; }
.sala-grid[data-n="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sala-grid.focus { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); align-content: start; }
.sala-grid.focus .sala-tile.screen { grid-column: 1 / -1; order: -1; aspect-ratio: auto; height: min(62vh, 640px); }
.sala-grid.focus .sala-tile.screen video { object-fit: contain; background: #000; }
.sala-tile { position: relative; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #0d1015; border: 1px solid var(--line); transition: border-color .2s, box-shadow .2s; }
.sala-tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.sala-tile.is-me:not(.screen) video { transform: scaleX(-1); }
.sala-tile.off video { visibility: hidden; }
.sala-avatar { position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 50%; display: none; align-items: center; justify-content: center; font-size: 28px; font-weight: 600; color: var(--gold-ink); background: var(--gold-grad); }
.sala-tile.off .sala-avatar { display: flex; }
.sala-name { position: absolute; left: 8px; bottom: 8px; max-width: calc(100% - 16px); padding: 3px 9px; border-radius: 8px; background: rgba(0,0,0,.6); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sala-tile.muted:not(.screen) .sala-name::before { content: "microfono spento · "; color: var(--red-soft); }
.sala-tile.speaking { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(217,184,104,.45); }
.sala-side { width: 340px; flex: none; display: flex; flex-direction: column; gap: 10px; padding: 12px; max-height: calc(100dvh - 170px); overflow: hidden; }
.sala-tabs { display: flex; gap: 6px; align-items: center; }
.sala-tabs [aria-selected="true"] { border-color: var(--gold); color: var(--gold-hi); }
.sala-close { margin-left: auto; }
.sala-pane { display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow: auto; }
.sala-pane[hidden] { display: none; }
.sala-chat { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; overflow: auto; flex: 1; min-height: 120px; max-height: 50vh; }
.sala-chat li { background: var(--panel-2); border-radius: 10px; padding: 6px 10px; }
.sala-chat li.mine { background: rgba(217,184,104,.1); }
.sala-chat p { margin: 2px 0 0; white-space: pre-wrap; word-break: break-word; }
.sala-chat-form { display: flex; gap: 6px; }
.sala-chat-form input { flex: 1; min-width: 0; }
.sala-files, .sala-people { list-style: none; margin: 0; padding: 0; }
.sala-files li, .sala-people li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.sala-bar { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; padding: 10px 12px; border-radius: 18px;
  background: rgba(12,14,18,.96); border: 1px solid var(--line-2); box-shadow: 0 12px 30px rgba(0,0,0,.5); width: max-content; max-width: calc(100% - 24px); z-index: 5; }
.sala-bar [data-screen][aria-pressed="true"] { border-color: var(--gold); color: var(--gold-hi); }
.sala-bar button, .sala-tabs button, .sala-chat-form button, .sala-people button, .sala-top .button, .sala-knock button, .sala-list button { margin-top: 0; }
.sala-badge { display: inline-flex; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--gold); color: var(--gold-ink); font-size: 11px; font-weight: 700; align-items: center; justify-content: center; margin-left: 4px; }
.sala-badge[hidden] { display: none; }
.sala-knock { position: fixed; top: 70px; right: 16px; z-index: 6; display: flex; flex-direction: column; gap: 8px; }
.sala-knock div { background: rgba(12,14,18,.95); border: 1px solid var(--gold); border-radius: 12px; padding: 10px 12px; display: flex; gap: 10px; align-items: center; animation: eruIn .3s var(--ease) both; }
.sala-reconnecting .sala-grid { opacity: .5; }
.sala-reconnecting .sala-top::after { content: "Riconnessione…"; color: var(--gold); font-size: 13px; }
@media (max-width: 760px) {
  .sala-stage { padding-bottom: 140px; }
  .sala-grid, .sala-grid[data-n="2"] { grid-template-columns: 1fr; align-content: start; }
  .sala-side { position: fixed; inset: auto 8px 130px 8px; width: auto; max-height: 60dvh; z-index: 6; }
  .sala-bar button { padding: 9px 11px; font-size: 13px; }
}

/* Area legale */
.legal-text { line-height: 1.65; }
.legal-text p { margin: 0 0 12px; }
.legal-text .legal-h3 { font-size: 15px; margin: 14px 0 8px; }
.legal-text mark { background: #F5E2B8; color: #3A2A0C; padding: 0 3px; border-radius: 3px; }
.legal-text a { word-break: break-word; }
.legal-dark .pub-h2 { color: var(--text); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; margin: 18px 0 10px; }
.legal-dark .g-list { margin: 0 0 14px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.legal-editor { font-family: var(--mono); font-size: 13px; line-height: 1.55; min-height: 420px; }
.legal-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.legal-actions button { margin: 0; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; }
.legal-nav a[aria-current] { font-weight: 700; text-decoration: none; }
.pub-legal { display: inline-block; margin-top: 6px; line-height: 1.9; }
.pub-legal a { color: var(--muted); }
.list-row.legal-row { grid-template-columns: 1fr auto; }
.legal-row .main small { display: block; }

/* Web app: notifiche e installazione */
.push-card { margin-top: 18px; }
.push-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.push-actions button { margin: 0; }
.inst-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin: 14px 0 6px; padding: 0; list-style: none; }
.inst-steps li { display: flex; flex-direction: column; gap: 8px; }
.inst-steps svg { width: 100%; height: auto; max-width: 220px; margin: 0 auto; display: block; }
.inst-steps p { margin: 0; font-size: 14px; line-height: 1.45; }
.inst-os { border: 1px solid var(--line-2); border-radius: 16px; padding: 4px 18px 12px; margin: 12px 0; background: #fff; }
.inst-os > summary { cursor: pointer; font-weight: 700; padding: 12px 0; list-style: none; }
.inst-os > summary::-webkit-details-marker { display: none; }
.inst-os > summary::after { content: "＋"; float: right; color: var(--muted); }
.inst-os[open] > summary::after { content: "－"; }
.inst-note { border-left: 3px solid #C79B48; padding: 8px 12px; background: #FBF7EE; border-radius: 6px; font-size: 14px; }

.app-dl { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 14px auto 0; width: fit-content; }
.app-dl[hidden] { display: none; }

/* Caselle: E.R.U. e clienti separate */
.mb-group { font-family: var(--display); font-size: 22px; letter-spacing: .03em; text-transform: uppercase; margin: 18px 0 0; }
.mb-group-d { margin: 0 0 4px; }
.mb-owner { margin-top: 8px; }
.mb-owner-forms { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }
.mb-owner-cli { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mb-owner-cli select { width: auto; min-width: 200px; margin: 0; }
.mb-owner-forms button { margin: 0; }
.mb-owner-new { border: 1px solid var(--line-2); border-radius: 14px; padding: 10px 14px; display: grid; gap: 6px; }
.mb-roles { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.mb-roles form { display: inline; }
.mb-roles button { margin: 0; }
.card-alarm { border-color: rgba(255,92,122,.5); box-shadow: 0 0 0 3px rgba(255,92,122,.12); }

/* --- LIFEX Sign dentro la centrale: grafica di Sign (brand kit: blu notte #081D36, electric #067AEB, cyan #00CFF3) --- */
body.th-sign {
  --bg: #081D36;
  --panel: rgba(242,247,252,.045);
  --panel-2: rgba(242,247,252,.07);
  --field: rgba(3,14,28,.55);
  --line: rgba(242,247,252,.10);
  --line-2: rgba(242,247,252,.16);
  --soft: #C3D3E6;
  --muted: #8EA4BF;
  --dim: #6E87A6;
  --gold: #2BB4F5;
  --gold-hi: #00CFF3;
  --gold-deep: #067AEB;
  --gold-grad: linear-gradient(120deg, #067AEB 0%, #0A9CF0 50%, #00CFF3 100%);
  --gold-ink: #FFFFFF;
  background: #081D36;
}
html:has(body.th-sign) { background: #081D36; }
body.th-sign button:not(.icon-btn), body.th-sign .button { background: var(--gold-grad); border-color: transparent; color: #FFFFFF; }
body.th-sign button:not(.icon-btn):hover, body.th-sign .button:hover { background: var(--gold-grad); color: #FFFFFF; box-shadow: 0 10px 34px rgba(6,122,235,.35); }
body.th-sign button.ghost, body.th-sign .button.ghost { background: rgba(242,247,252,.05); border-color: var(--line-2); color: var(--text); }
body.th-sign button.ghost:hover, body.th-sign .button.ghost:hover { background: rgba(242,247,252,.10); color: #FFFFFF; box-shadow: none; }
body.th-sign .fx-glow.a { background: radial-gradient(closest-side, rgba(0,207,243,.20), transparent); }
body.th-sign .fx-glow.b { background: radial-gradient(closest-side, rgba(6,122,235,.28), transparent); }
body.th-sign .rail { background: rgba(4,16,31,.7); border-right-color: rgba(242,247,252,.08); }
body.th-sign .rail-sign img { display: block; width: 40px; height: 40px; }
body.th-sign .tag.cat, body.th-sign .badge.s-richiesta, body.th-sign .badge.s-mandato { color: var(--gold); border-color: rgba(43,180,245,.45); background: rgba(43,180,245,.10); }
body.th-sign .eyebrow-gold { color: var(--gold-hi); }
.sign-brand { display: inline-flex; align-items: center; }
.sign-brand img { height: 30px; width: auto; display: block; }
.sign-fill { flex: 1 1 auto; }
@media (max-width: 760px) {
  body.th-sign .rail { background: #04101F; }
  body.th-sign .topline .button.ghost { display: none; }
}

/* --- Pratiche da LMX: verbale e messaggi ---------------------------------------------------- */
.lmx-fine { border: 1px solid var(--line-2); border-radius: 16px; padding: 16px; margin: 12px 0 18px; background: var(--panel); display: grid; gap: 10px; }
.lmx-fine-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.lmx-fine-head h3 { margin: 4px 0; }
.lmx-deadline { display: grid; justify-items: end; align-content: start; text-align: right; }
.lmx-deadline strong { font-family: var(--display); font-size: 34px; line-height: 1; }
.lmx-deadline.t-red strong { color: var(--red); }
.lmx-thread { list-style: none; padding: 0; margin: 8px 0 16px; display: grid; gap: 10px; }
.lmx-thread li { border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; background: var(--panel); max-width: 92%; }
.lmx-thread li.lmx-mine { justify-self: end; border-color: rgba(217,184,104,.35); }
.lmx-thread p { margin: 6px 0 0; overflow-wrap: anywhere; }
.lmx-who { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
@media (max-width: 760px) { .lmx-deadline { justify-items: start; text-align: left; } .lmx-thread li { max-width: 100%; } }

/* --- Invio automatico --------------------------------------------------------------------- */
.auto-status { display: grid; gap: 14px; }
.auto-row { display: flex; gap: 12px; align-items: flex-start; }
.auto-row .led { margin-top: 6px; }
.auto-row p { margin: 2px 0 0; }
.auto-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.auto-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--panel); }
.auto-list li.off { opacity: .6; }
.auto-main { display: grid; gap: 2px; min-width: 0; }
.auto-main strong { overflow-wrap: anywhere; }

/* --- LIFEX Sign: panoramica, modelli, organizzazioni ---------------------------------------- */
.sx-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0 0 18px; }
.sx-kpi { display: grid; gap: 4px; padding: 18px; border-radius: 18px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text) !important; text-decoration: none; transition: border-color .2s; }
.sx-kpi:hover { border-color: var(--gold); }
.sx-kpi span { font-size: 13px; color: var(--muted); }
.sx-kpi strong { font-family: var(--display); font-size: 42px; line-height: 1; color: var(--gold-hi); }
.sx-kpi small { color: var(--dim); font-size: 12px; }
.sx-org { align-items: center; }
.sx-logo { width: 44px; height: 44px; border-radius: 10px; object-fit: contain; background: #fff; padding: 4px; flex: 0 0 44px; }
.sx-nologo { display: grid; place-items: center; background: var(--panel-2); color: var(--soft); font-weight: 700; padding: 0; }
.sx-letterhead { border: 1px solid var(--line-2); border-radius: 14px; padding: 16px; background: #fff; color: #222; }
.sx-letterhead .muted { color: #666; }
.sx-lh-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.sx-lh-top img { max-height: 60px; max-width: 220px; object-fit: contain; }
.sx-lh-data { display: grid; justify-items: end; text-align: right; font-size: 12px; color: #555; }
.sx-lh-name { font-size: 15px; color: #111; }
.sx-swatch { vertical-align: -2px; }
@media (max-width: 900px) { .sx-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* --- Nuova verifica veicolo: passaggi numerati e riepilogo a lato --------------------------- */
.vv-new { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.vv-steps { counter-reset: vvstep; display: grid !important; grid-template-columns: minmax(0, 1fr); gap: 18px; min-width: 0; }
.vv-step { counter-increment: vvstep; }
.vv-num::before { content: counter(vvstep); display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 10px; border-radius: 50%;
  background: var(--gold); color: var(--gold-ink); font-size: 14px; font-weight: 700; vertical-align: 2px; }
.vv-aside { position: sticky; top: 18px; }
.vv-sum { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; margin: 0; align-items: center; }
.vv-sum dt { color: var(--muted); font-size: 13px; }
.vv-sum dd { margin: 0; text-align: right; font-weight: 600; }
.vv-incl { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.vv-incl li { display: grid; gap: 2px; padding-left: 22px; position: relative; }
.vv-incl li::before { content: "✓"; position: absolute; left: 0; color: var(--gold); font-weight: 700; }
.vv-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line-2); padding-top: 12px; }
.vv-total strong { font-family: var(--display); font-size: 34px; color: var(--gold-hi); }
.vv-free { border: 1px dashed var(--line-2); border-radius: 14px; padding: 12px 14px; display: grid; gap: 8px; }
.vv-free-h { margin: 0; }
.vv-free-links { display: flex; gap: 8px; flex-wrap: wrap; }
.vv-steps .vv-mode { grid-template-columns: 1fr 1fr; }
@media (max-width: 1000px) { .vv-new { grid-template-columns: 1fr; } .vv-aside { position: static; } }
@media (max-width: 640px) { .vv-steps .vv-mode { grid-template-columns: 1fr; } }

/* --- LIFEX Stanze: stanza di un sito con il suo aspetto (layout sito.php) --- */
body.site-room { min-height: 100vh; display: flex; flex-direction: column; }
body.site-room .pub-depth, body.site-room .fx { display: none; }
.site-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 2px solid var(--gold); }
.site-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; }
.site-logo { height: 34px; width: auto; max-width: 160px; object-fit: contain; }
.site-main { width: 100%; max-width: 1180px; margin: 0 auto; padding: 18px 16px 32px; display: flex; flex-direction: column; gap: 16px; flex: 1; }
.site-main.site-narrow { max-width: 620px; }
.site-foot { text-align: center; color: var(--muted); font-size: 12px; padding: 10px 16px 18px; }
body.site-embed .site-head { display: none; }
body.site-embed .site-main { padding-top: 12px; }
body.site-dark { background: var(--bg); }
.sala-foot { position: fixed; left: 0; right: 0; bottom: 0; padding: 4px 8px; font-size: 11px; pointer-events: none; opacity: .7; }
@media (max-width: 640px) { .site-head { padding: 10px 14px; } .site-logo { height: 28px; } }

/* --- Pagare: carte salvate e richiesta all'amministrazione (area/paga.php) --- */
.pay-amount { font-size: 30px; font-weight: 700; margin: 4px 0 8px; }
.pay-cards { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.pay-card { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; cursor: pointer; background: var(--panel); }
.pay-card:has(input:checked) { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(199,155,72,.18); }
.pay-card input { width: auto; flex: 0 0 auto; margin: 0; }
.pay-card span { display: flex; flex-direction: column; flex: 1; text-align: left; }
.pay-card small { color: var(--muted); font-size: 12px; }
#sumup-card { min-height: 260px; margin: 12px 0; }

/* --- Firma del preventivo dell'officina: lavori consigliati da spuntare --- */
.quote-pick { border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; display: grid; gap: 6px; }
.quote-choice { border-left: 3px solid var(--gold); padding-left: 10px; }

/* Titolare che vede l'area come un cliente */
.imp-bar { position: sticky; top: 0; z-index: 1000; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: center; padding: 8px 16px; background: #7A1F1F; color: #fff; font-size: 14px; }
.imp-bar form { margin: 0; }
.imp-bar button { background: #fff; color: #7A1F1F; border: 0; }
.lw-bar { background: #2A2416; color: #F3E6C4; border-bottom: 1px solid rgba(201, 162, 74, .45); }
.lw-bar select { width: auto; min-width: 180px; padding: 4px 8px; }
.lw-bar noscript button { background: #C9A24A; color: #111; }

/* Avvocati */
.av-pick { display: flex; flex-direction: column; gap: 8px; }
.av-pick-list { max-height: 260px; overflow: auto; display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border: 1px solid var(--line, rgba(255,255,255,.12)); border-radius: 10px; }
.av-pick-list [hidden] { display: none; }
.av-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.av-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line, rgba(255,255,255,.08)); }
.av-list li > span { display: flex; flex-direction: column; gap: 2px; }
.av-list form { margin: 0; }

/* Rubrica */
.rb-search select { width: auto; }
.rb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; margin-bottom: 18px; }
.rb-card { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.rb-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.rb-name { margin: 6px 0 2px; font-size: 18px; }
.rb-comp { margin: 0; }
.rb-k { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; opacity: .65; }
.rb-lines { display: flex; flex-direction: column; gap: 4px; }
.rb-mail { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; word-break: break-all; }
.rb-tel { font-weight: 600; white-space: nowrap; }
.rb-people { list-style: none; margin: 4px 0 0; padding: 8px 0 0; border-top: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; gap: 8px; }
.rb-people li { display: flex; flex-direction: column; gap: 3px; }
.rb-person { margin: 8px 0; }
@media (max-width: 520px) { .rb-grid { grid-template-columns: 1fr; } }

/* Diario: tocca una voce per correggerla */
.j-det > summary { list-style: none; cursor: pointer; }
.j-det > summary::-webkit-details-marker { display: none; }
.j-edit-hint { margin-left: auto; color: var(--gold, #C79B48); opacity: .8; }
.j-det[open] .j-edit-hint { display: none; }
.j-det .j-edit { margin: 12px 0 8px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.08); }

/* Caricamento: trascina i file, nome e tipo per ognuno */
.up-drop { border: 1.5px dashed rgba(217,184,104,.45); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; transition: background .15s, border-color .15s; }
.up-drop.over { background: rgba(217,184,104,.10); border-color: var(--gold); }
.up-drop-hint { margin: 0; }
.up-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.up-list li { display: grid; grid-template-columns: 1fr 220px auto; gap: 8px; align-items: center; }
.up-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.up-ext { padding-left: 4px; }
body.public .up-drop { border-color: #D9C9A3; }
body.public .up-drop.over { background: #FBF5E8; }
@media (max-width: 640px) { .up-list li { grid-template-columns: 1fr; } .up-drop-hint { display: none; } }

/* LIFEX Sign: quale PDF è firmato; istanza: scelta del documento firmato */
.lx-docs a { display: flex; flex-direction: column; gap: 4px; }
.lx-doc-badge { align-self: flex-start; width: fit-content; justify-self: start; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,.08); }
.lx-doc-badge.ok { background: rgba(46,204,113,.16); color: #4ADE80; }
.lx-doc-badge.orig { background: rgba(255,255,255,.06); color: rgba(255,255,255,.6); }
.lx-pick { display: flex; flex-direction: column; gap: 8px; }
.lx-pick-grp { margin: 8px 0 0; }
.lx-pick-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; cursor: pointer; margin: 0; }
.lx-pick-row:has(input:checked) { border-color: var(--gold); background: rgba(217,184,104,.08); }
.lx-pick-row input { width: auto; margin-top: 3px; }
.lx-pick-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lx-pick-main strong { overflow-wrap: anywhere; }

/* Anteprima della PEC */
.pec-preview .pec-body { margin: 14px 0 18px; padding: 16px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); line-height: 1.55; }
.pec-files { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

/* Pratica: cerca nella posta */
.cp-boxes { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.cp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cp-list li { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; padding: 10px 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; }
.cp-row { margin: 0; align-items: flex-start; flex: 1; min-width: 0; }
.cp-row input { width: auto; margin-top: 4px; }
.cp-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cp-att { overflow-wrap: anywhere; }

/* Area clienti: documenti del verbale dalla mail e controllo delle date */
.vm-atts li { display: grid; grid-template-columns: 1fr minmax(200px, 300px); gap: 10px; align-items: center; }
.vm-check { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; align-items: start; width: min(1180px, calc(100vw - 32px)); margin-left: 50%; transform: translateX(-50%); }
.vm-doc { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.vm-doc img { display: block; width: 100%; margin-top: 10px; border-radius: 8px; border: 1px solid #E7DFCF; background: #fff; }
.vm-doc-item + .vm-doc-item { margin-top: 12px; }
@media (max-width: 860px) { .vm-check { grid-template-columns: 1fr; width: auto; margin-left: 0; transform: none; } .vm-doc { position: static; max-height: none; } .vm-atts li { grid-template-columns: 1fr; } }
.vm-steps { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 14px; }
.vm-steps .button, .vm-steps button { margin-top: 6px; }

/* Ricevuta CaRGOS ufficiale su più contratti */
.cg-ref { max-width: 300px; }
.cg-batch { border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; display: grid; gap: 6px; }
.cg-batch legend { padding: 0 6px; }
