/* =========================================================================
   Gestione — Evolution Clima. App staff (PWA).
   Stessi token del sito pubblico; layout app-first: barra in basso su
   telefono, barra laterale su schermo largo. Nessuna risorsa esterna.
   ========================================================================= */
:root {
  --green: #12904a; --green-700: #0c6e39; --green-800: #0a5730; --green-900: #0c3d28; --green-050: #eaf5ee;
  --blue: #2b9cd8; --blue-700: #1c7bad; --blue-050: #e8f4fb;
  --sun: #f2c009; --sun-700: #8a6100; --sun-050: #fdf4d2;
  --viola: #6d4fc2; --viola-050: #efeafb;
  --rosso: #b63a2b; --rosso-050: #fbe9e6;
  --ink: #16201b; --muted: #55625b; --line: #e4e6e1; --cream: #fbfaf6; --sand: #f2f1ea; --white: #ffffff;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --r-sm: 10px; --r-md: 16px; --r-lg: 22px; --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(16,40,28,.06);
  --shadow-md: 0 2px 6px rgba(16,40,28,.05), 0 12px 28px rgba(12,61,40,.08);
  --shadow-lg: 0 18px 48px rgba(12,61,40,.18);
  --focus: 0 0 0 3px #fff, 0 0 0 6px var(--blue-700);
  --top-h: 56px; --nav-h: 62px; --side-w: 236px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body {
  margin: 0; min-height: 100%;
  font-family: var(--font); font-size: 16px; line-height: 1.5; color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--green-700); text-decoration: none; }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.05rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .6em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.hidden { display: none !important; }
.noscript { padding: 2rem; text-align: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Pulsanti ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 44px; padding: 0 1.1rem; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--white); color: var(--ink);
  font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--green-700); border-color: var(--green-700); color: #fff; }
.btn.primary:hover { background: var(--green-800); }
.btn.danger { color: var(--rosso); border-color: #e9c9c4; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.small { min-height: 36px; padding: 0 .85rem; font-size: .9rem; }
.btn.block { width: 100%; }
.link { background: none; border: 0; color: var(--green-700); cursor: pointer; padding: .5rem 0; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Campi ---------- */
.field { display: block; margin-bottom: .9rem; }
.field > span { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: .3rem; letter-spacing: .02em; }
.input, input:not([type]), input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], input[type="date"], input[type="search"], select, textarea {
  width: 100%; min-height: 46px; padding: .6rem .85rem;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--white);
  -webkit-appearance: none; appearance: none;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2.2rem; }
input:focus, select:focus, textarea:focus { border-color: var(--blue-700); }
.form-msg { min-height: 1.4em; font-size: .9rem; color: var(--muted); margin-top: .5rem; }
.form-msg[data-tipo="errore"] { color: var(--rosso); }
.form-msg[data-tipo="ok"] { color: var(--green-700); }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 0 1rem; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .span2 { grid-column: 1 / -1; } }
.form-actions { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-top: .4rem; }
.check { display: flex; align-items: center; gap: .6rem; min-height: 44px; }
.check input { width: 22px; height: 22px; min-height: 0; accent-color: var(--green-700); }

/* ---------- Login ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: radial-gradient(1200px 600px at 50% -10%, var(--green-050), transparent 70%), var(--cream); }
.auth-card { width: 100%; max-width: 400px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 2rem 1.6rem; box-shadow: var(--shadow-md); }
.auth-card img { width: 72px; height: 72px; margin: 0 auto .8rem; }
.auth-card h1 { text-align: center; margin-bottom: .1em; }
.auth-card .sotto { text-align: center; margin-bottom: 1.4rem; }
.auth-card .btn { width: 100%; margin-top: .4rem; }
.auth-card .link { display: block; margin: .6rem auto 0; }

/* ---------- Shell ---------- */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--top-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0 1rem; background: var(--cream);
  border-bottom: 1px solid var(--line);
  /* niente backdrop-filter qui: creerebbe un contenitore per la .nav fissa e la sposterebbe in alto */
}
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--ink); font-weight: 700; letter-spacing: -.01em; }
.brand img { width: 30px; height: 30px; }
.brand small { font-weight: 500; color: var(--muted); font-size: .8rem; margin-left: .25rem; white-space: nowrap; }
@media (max-width: 379px) { .brand small { display: none; } }
.topbar-right { display: flex; align-items: center; gap: .8rem; }
.rt-dot { width: 9px; height: 9px; border-radius: 50%; background: #cfd4cf; box-shadow: 0 0 0 3px rgba(0,0,0,.03); }
.rt-dot.on { background: var(--green); box-shadow: 0 0 0 3px rgba(18,144,74,.18); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--green-900); color: #fff; font-weight: 700; font-size: .8rem; letter-spacing: .02em; }
.main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 1rem 1rem calc(var(--nav-h) + var(--safe-b) + 1.2rem); }

.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: rgba(255,255,255,.96); border-top: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: .7rem; font-weight: 600; }
.nav a svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav a.active { color: var(--green-700); }
.nav a.solo-desktop { display: none; }
.nav a .cnt { position: absolute; transform: translate(14px, -16px); background: var(--blue-700); color: #fff; font-size: .62rem; min-width: 17px; height: 17px; border-radius: var(--r-pill); display: grid; place-items: center; padding: 0 4px; }
.nav a { position: relative; }

@media (min-width: 900px) {
  .shell { flex-direction: row; align-items: flex-start; }
  .topbar { position: sticky; top: 0; height: auto; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 1.2rem; width: var(--side-w); min-height: 100vh; padding: 1.2rem 1rem; border-bottom: 0; border-right: 1px solid var(--line); background: var(--white); }
  .brand { flex-wrap: wrap; row-gap: 0; }
  .brand small { flex-basis: 100%; margin: 0 0 0 calc(30px + .55rem); line-height: 1.1; }
  .topbar-right { order: 3; margin-top: auto; justify-content: space-between; padding-top: 1rem; border-top: 1px solid var(--line); }
  .nav { position: static; order: 2; display: flex; flex-direction: column; height: auto; padding: 0; background: transparent; border: 0; backdrop-filter: none; width: var(--side-w); margin-left: calc(-1 * var(--side-w)); }
  .shell .nav { margin: 0; }
  .topbar .nav { display: flex; }
  .nav a { flex-direction: row; justify-content: flex-start; gap: .7rem; padding: .65rem .8rem; border-radius: var(--r-sm); font-size: .95rem; font-weight: 600; }
  .nav a.active { background: var(--green-050); }
  .nav a.solo-desktop { display: flex; }
  .nav a .cnt { position: static; transform: none; margin-left: auto; }
  .main { padding: 1.6rem 2rem 2.5rem; }
}

/* ---------- Intestazione vista ---------- */
.vista-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; flex-wrap: wrap; }
.vista-head h1 { margin: 0; }
.vista-head .sotto { color: var(--muted); font-size: .9rem; }

/* ---------- Filtri ---------- */
.filtri { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1rem; }
.cerca { position: relative; }
.cerca input { padding-left: 2.4rem; border-radius: var(--r-pill); }
.cerca svg { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; stroke: var(--muted); fill: none; stroke-width: 2; }
.chips { display: flex; gap: .45rem; overflow-x: auto; padding-bottom: .2rem; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: .4rem; min-height: 36px; padding: 0 .85rem; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--white); font-size: .875rem; font-weight: 600; cursor: pointer; color: var(--ink); }
.chip .n { font-size: .75rem; color: var(--muted); font-weight: 700; }
.chip.on { background: var(--green-900); border-color: var(--green-900); color: #fff; }
.chip.on .n { color: rgba(255,255,255,.75); }
.chip.toggle.on { background: var(--blue-700); border-color: var(--blue-700); }

/* ---------- Badge stati ---------- */
.badge { display: inline-flex; align-items: center; gap: .35rem; height: 24px; padding: 0 .6rem; border-radius: var(--r-pill); font-size: .74rem; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .9; }
.st-nuova { background: var(--blue-050); color: var(--blue-700); }
.st-da_preventivare { background: var(--sun-050); color: var(--sun-700); }
.st-preventivo_inviato { background: var(--viola-050); color: var(--viola); }
.st-vinta { background: var(--green-050); color: var(--green-700); }
.st-persa { background: var(--rosso-050); color: var(--rosso); }
.st-sospesa { background: var(--sand); color: var(--muted); }
.origine { font-size: .74rem; color: var(--muted); font-weight: 600; }
.origine.sito { color: var(--blue-700); }
.num { font-size: .74rem; color: var(--muted); font-variant-numeric: tabular-nums; margin-left: auto; }

/* ---------- Card pratica ---------- */
.lista { display: grid; grid-template-columns: 1fr; gap: .7rem; }
@media (min-width: 720px) { .lista { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1180px) { .lista { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-sm); overflow: hidden; }
.pratica { display: flex; flex-direction: column; }
.card-main { display: block; padding: .9rem 1rem .6rem; color: inherit; }
.card-main:hover h3 { color: var(--green-700); }
.card-top { display: flex; align-items: center; gap: .6rem; margin-bottom: .45rem; }
.card h3 { margin: 0 0 .15rem; font-size: 1.05rem; }
.card .servizio { margin: 0; color: var(--ink); font-size: .92rem; }
.card .meta { margin: .35rem 0 0; color: var(--muted); font-size: .8rem; }
.card .importo { margin: .35rem 0 0; font-weight: 700; font-size: .95rem; color: var(--green-800); }
.azioni { display: flex; gap: .4rem; padding: .5rem .8rem .8rem; border-top: 1px dashed var(--line); }
.azioni a, .azioni button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 40px; border-radius: var(--r-sm); background: var(--sand); color: var(--ink); font-size: .8rem; font-weight: 600; border: 0; cursor: pointer; }
.azioni a[aria-disabled="true"] { opacity: .35; pointer-events: none; }
.azioni svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.azioni.grandi a { min-height: 46px; font-size: .9rem; }
.vuoto { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.vuoto strong { display: block; color: var(--ink); margin-bottom: .3rem; }

/* ---------- Lavagna (kanban) ---------- */
.kanban { display: flex; gap: .8rem; overflow-x: auto; padding-bottom: 1rem; align-items: flex-start; -webkit-overflow-scrolling: touch; }
.colonna { flex: 0 0 272px; background: var(--sand); border-radius: var(--r-md); padding: .6rem; min-height: 200px; transition: background .12s; }
.colonna.over { background: var(--green-050); outline: 2px dashed var(--green); outline-offset: -4px; }
.colonna-head { display: flex; align-items: center; justify-content: space-between; padding: .2rem .4rem .6rem; }
.colonna-head .somma { font-size: .78rem; color: var(--muted); font-weight: 600; }
.kcard { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-sm); padding: .65rem .75rem; margin-bottom: .5rem; cursor: grab; box-shadow: var(--shadow-sm); display: block; color: inherit; }
.kcard:active { cursor: grabbing; }
.kcard.dragging { opacity: .45; }
.kcard h4 { margin: 0 0 .15rem; font-size: .95rem; }
.kcard p { margin: 0; font-size: .8rem; color: var(--muted); }
.kcard .importo { color: var(--green-800); font-weight: 700; }

/* ---------- Dettaglio ---------- */
.detail-head { display: flex; align-items: center; gap: .7rem; margin-bottom: .5rem; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: .2rem; color: var(--green-700); font-weight: 600; min-height: 36px; }
.detail h1 { margin-bottom: .2rem; }
.sezione { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1rem; margin-top: 1rem; }
.sezione h2 { margin-bottom: .8rem; }
.stepper { display: flex; gap: .45rem; flex-wrap: wrap; }
.stepper button { min-height: 40px; padding: 0 .9rem; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--white); font-weight: 600; font-size: .875rem; cursor: pointer; }
.stepper button.on { border-color: transparent; }
.stepper button.on.st-nuova { background: var(--blue-700); color: #fff; }
.stepper button.on.st-da_preventivare { background: var(--sun-700); color: #fff; }
.stepper button.on.st-preventivo_inviato { background: var(--viola); color: #fff; }
.stepper button.on.st-vinta { background: var(--green-700); color: #fff; }
.stepper button.on.st-persa { background: var(--rosso); color: #fff; }
.stepper button.on.st-sospesa { background: var(--muted); color: #fff; }
.esito-box { margin-top: .8rem; padding: .7rem .9rem; border-radius: var(--r-sm); background: var(--sand); font-size: .9rem; }
.file-row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .7rem .9rem; border-radius: var(--r-sm); background: var(--sand); }
.file-row .nome-file { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .92rem; }
.salva-bar { position: sticky; bottom: calc(var(--nav-h) + var(--safe-b) + .6rem); display: flex; justify-content: flex-end; gap: .6rem; padding: .6rem; margin-top: .6rem; background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-md); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
@media (min-width: 900px) { .salva-bar { bottom: 1rem; } }
.salva-bar[hidden] { display: none; }

/* ---------- Diario ---------- */
.nota-form { display: flex; gap: .5rem; margin-bottom: 1rem; }
.nota-form input { flex: 1; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 1rem 1.4rem; border-left: 2px solid var(--line); margin-left: .4rem; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: .35rem; width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.timeline li.ev-stato::before { background: var(--viola); }
.timeline li.ev-creata::before { background: var(--blue-700); }
.timeline li.ev-nota::before { background: var(--sun); }
.timeline li.ev-allegato::before { background: var(--green); }
.timeline li.ev-appuntamento::before { background: var(--blue); }
.timeline .ev-testo { margin: 0; font-size: .95rem; }
.timeline .ev-meta { margin: .15rem 0 0; font-size: .78rem; color: var(--muted); }
.timeline ul { margin: .25rem 0 0; padding-left: 1rem; font-size: .88rem; color: var(--muted); }
.timeline .nota-testo { white-space: pre-wrap; background: var(--sun-050); padding: .5rem .7rem; border-radius: var(--r-sm); display: inline-block; }

/* ---------- Calendario ---------- */
.cal-blocco { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: .9rem; margin-bottom: 1.1rem; }
@media (min-width: 720px) { .cal-blocco { max-width: 420px; } }
.cal-intestazione { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: .72rem; font-weight: 700; color: var(--muted); margin: .7rem 0 .35rem; }
.cal-griglia { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-cella { position: relative; aspect-ratio: 1; display: grid; place-items: center; border: 0; background: transparent; border-radius: var(--r-sm); font-size: .85rem; font-weight: 600; color: var(--ink); cursor: pointer; }
.cal-cella.vuota { cursor: default; }
.cal-cella:not(.vuota):hover { background: var(--sand); }
.cal-cella.oggi { color: var(--green-700); box-shadow: inset 0 0 0 1.5px var(--green-700); }
.cal-cella.selezionata { background: var(--green-700); color: #fff; box-shadow: none; }
.cal-dot { position: absolute; bottom: 4px; width: 5px; height: 5px; border-radius: 50%; background: var(--blue-700); }
.cal-cella.selezionata .cal-dot { background: #fff; }
.cal-dot.spento { background: var(--muted); opacity: .5; }

.agenda-gruppo { margin-bottom: 1.1rem; }
.agenda-gruppo:last-child { margin-bottom: 0; }
.agenda-data { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 .5rem; }
.agenda-data.scaduti { color: var(--rosso); }
.agenda-mini { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.agenda-riga { width: 100%; display: flex; align-items: center; gap: .7rem; text-align: left; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-sm); padding: .6rem .8rem; cursor: pointer; color: inherit; }
.agenda-riga:hover { box-shadow: var(--shadow-sm); }
.agenda-riga .ora { flex: 0 0 auto; width: 54px; font-size: .78rem; font-weight: 700; color: var(--green-800); font-variant-numeric: tabular-nums; }
.agenda-riga .corpo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.agenda-riga .corpo strong { font-size: .92rem; }
.agenda-riga .badge { align-self: flex-start; }
.agenda-item.fatto .agenda-riga { opacity: .6; }
.agenda-item.annullato .agenda-riga { opacity: .55; }
.agenda-item.annullato .corpo strong { text-decoration: line-through; }

.app-riga { display: block; width: 100%; text-align: left; background: var(--sand); border: 0; border-radius: var(--r-sm); padding: .7rem .9rem; cursor: pointer; }
.app-riga .ora { display: block; font-size: .78rem; font-weight: 700; color: var(--green-800); margin-bottom: .15rem; }
.app-riga .titolo { display: block; font-size: .95rem; }

/* ---------- Cruscotto ---------- */
.mese-nav { display: flex; align-items: center; gap: .6rem; }
.mese-nav button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--white); cursor: pointer; font-size: 1.1rem; }
.mese-nav strong { min-width: 150px; text-align: center; text-transform: capitalize; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; margin: 1rem 0; }
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: .9rem 1rem; }
.tile .k { font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.tile .v { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin-top: .2rem; font-variant-numeric: tabular-nums; }
.tile .s { font-size: .8rem; color: var(--muted); margin-top: .1rem; }
.tile.ok .v { color: var(--green-700); } .tile.ko .v { color: var(--rosso); } .tile.att .v { color: var(--viola); }
.todo { list-style: none; margin: 0; padding: 0; }
.todo li a { display: flex; align-items: center; gap: .7rem; padding: .7rem .2rem; border-bottom: 1px solid var(--line); color: inherit; }
.todo li:last-child a { border-bottom: 0; }
.todo .perche { margin-left: auto; font-size: .78rem; color: var(--rosso); font-weight: 700; white-space: nowrap; }
.attivita { list-style: none; margin: 0; padding: 0; }
.attivita li { display: flex; gap: .7rem; padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.attivita li:last-child { border-bottom: 0; }
.attivita .chi { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--green-050); color: var(--green-800); font-size: .7rem; font-weight: 800; }
.attivita .chi.sito { background: var(--blue-050); color: var(--blue-700); }
.attivita .quando { margin-left: auto; color: var(--muted); font-size: .78rem; white-space: nowrap; }

/* ---------- Altro / impostazioni ---------- */
.colleghi { list-style: none; margin: 0; padding: 0; }
.colleghi li { display: flex; align-items: center; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.colleghi li:last-child { border-bottom: 0; }
.colleghi .chi { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--green-900); color: #fff; font-weight: 700; font-size: .78rem; }
.colleghi .info { flex: 1; min-width: 0; }
.colleghi .info strong { display: block; }
.colleghi .info span { font-size: .82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.pill { font-size: .72rem; font-weight: 700; padding: .15rem .55rem; border-radius: var(--r-pill); background: var(--sand); color: var(--muted); }
.pill.ok { background: var(--green-050); color: var(--green-700); }

/* ---------- Sheet (finestra dal basso) ---------- */
.sheet-bg { position: fixed; inset: 0; background: rgba(12,61,40,.35); z-index: 40; animation: fade .15s ease; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; background: var(--white); border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 1.2rem 1.2rem calc(1.2rem + var(--safe-b)); box-shadow: var(--shadow-lg); max-height: 88vh; overflow: auto; animation: sali .22s cubic-bezier(.2,.8,.2,1); }
.sheet h2 { color: var(--ink); text-transform: none; letter-spacing: -.01em; font-size: 1.2rem; }
@media (min-width: 640px) { .sheet { left: 50%; right: auto; bottom: auto; top: 50%; transform: translate(-50%, -50%); width: min(520px, 94vw); border-radius: var(--r-lg); animation: fade .15s ease; } }
@keyframes sali { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 14px); transform: translate(-50%, 20px); z-index: 50; max-width: min(92vw, 480px); padding: .7rem 1rem; border-radius: var(--r-md); background: var(--green-900); color: #fff; font-size: .9rem; font-weight: 600; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast.errore { background: var(--rosso); }
.toast.info { background: var(--blue-700); }
@media (min-width: 900px) { .toast { bottom: 24px; } }

/* ---------- Varie ---------- */
.spinner { display: grid; place-items: center; min-height: 40vh; color: var(--muted); }
.spinner::after { content: ""; width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--green); animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
.banner { padding: .7rem .9rem; border-radius: var(--r-sm); background: var(--blue-050); color: var(--blue-700); font-size: .9rem; font-weight: 600; margin-bottom: .8rem; display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.banner.attenzione { background: var(--sun-050); color: var(--sun-700); }
.riga { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }
