/* EasyCheck: app dell'operaio. Sistema «il cartellino» (DESIGN.md, 29/09/2026).
   Un solo foglio per la schermata di timbratura e le sue pagine: niente stili scritti nel JavaScript.
   Colori in OKLCH con il valore esadecimale accanto (quello dei token di DESIGN.md), per i browser vecchi. */
@import url("/fonts/archivo.css");

:root {
  color-scheme: light;
  --ink: #121627;       --ink: oklch(20.5% .035 272);
  --ink-2: #515869;     --ink-2: oklch(46% .03 268);
  --ink-3: #666c79;     --ink-3: oklch(53% .022 268);
  --edge: #7a808e;      --edge: oklch(60% .022 268);
  --bg: #f4f6f9;        --bg: oklch(97.2% .005 268);
  --surface: #fdfdff;   --surface: oklch(99.5% .002 268);
  --surface-2: #edf0f9; --surface-2: oklch(95.5% .012 268);
  --line: #dde0e6;      --line: oklch(90.5% .01 268);
  --go: #12773d;        --go: oklch(50% .125 152);
  --go-deep: #07602f;   --go-deep: oklch(43% .11 152);
  --go-ink: #0d6332;    --go-ink: oklch(44% .11 152);
  --go-tint: #e0f7e5;   --go-tint: oklch(95.5% .035 152);
  --go-line: #b5ddbe;   --go-line: oklch(86% .06 152);
  --travel: #006f6f;    --travel: oklch(49% .085 195);
  --travel-deep: #005a5a; --travel-deep: oklch(43% .075 195);
  --travel-ink: #006060; --travel-ink: oklch(44% .08 195);
  --travel-tint: #def6f5; --travel-tint: oklch(95.5% .025 195);
  --pause: #d98b09;     --pause: oklch(70% .15 70);
  --pause-ink: #824c11; --pause-ink: oklch(47% .1 62);
  --pause-tint: #fff0d0; --pause-tint: oklch(96% .045 85);
  --pause-line: #edd0a0; --pause-line: oklch(87% .07 80);
  --stop: #b02b27;      --stop: oklch(50% .17 27);
  --stop-deep: #951f1d; --stop-deep: oklch(44% .155 27);
  --stop-ink: #a12623;  --stop-ink: oklch(47% .16 27);
  --stop-tint: #ffeae8; --stop-tint: oklch(95.5% .025 25);
  --stop-line: #f1c2bd; --stop-line: oklch(86% .06 25);
  --navy: #101327;      --navy: oklch(19.5% .04 275);
  --brand-green: #3caf75;        /* il verde del logo: campo pieno con testo navy (6,6:1), mai testo su chiaro */
  --brand-green-press: #34a36c;  /* premuto: navy sopra 5,8:1 */

  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --brand-font: 'Sora', 'Archivo', system-ui, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --shadow-sheet: 0 -12px 40px -12px rgb(16 19 39 / .28);
  --shadow-pop: 0 16px 36px -16px rgb(16 19 39 / .30);
  --r-sm: 8px; --r-md: 12px; --r-lg: 18px; --r-xl: 24px;
  --gutter: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font); font-size: 1rem; line-height: 1.5; font-weight: 450;
  background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
/* sul computer l'app resta una colonna da telefono, su fondo blu notte */
@media (min-width: 540px) { body { background: var(--navy); } #app { box-shadow: 0 0 0 1px rgb(255 255 255 / .06); } }
#app { max-width: 480px; margin: 0 auto; min-height: 100dvh; background: var(--bg); position: relative; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--go-ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.ic { width: 1.25em; height: 1.25em; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; flex: none; display: inline-block; vertical-align: -.22em; }
.stamp { font-stretch: 68%; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .005em; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- testata ---------- */
.w-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(12px + env(safe-area-inset-top, 0px)) var(--gutter) 4px; }
.w-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.w-brand img { width: 36px; height: 36px; border-radius: 10px; display: block; flex: none; }
.w-brand b { display: block; font-family: var(--brand-font); font-weight: 700; font-size: 1rem; letter-spacing: -.02em; line-height: 1.1; }
.w-brand span { display: block; font-size: .8125rem; font-weight: 550; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-exit { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 10px 12px; margin-right: -12px; border: 0; background: none; color: var(--ink-2); font-size: .9375rem; font-weight: 650; border-radius: var(--r-md); }
.w-exit:active { background: var(--surface-2); }
.w-pad { padding: 0 var(--gutter); }
.w-end { padding-top: 12px; padding-bottom: calc(36px + env(safe-area-inset-bottom, 0px)); }

/* ---------- saluto ---------- */
.w-hi { padding: 18px 2px 14px; }
.w-date { margin: 0; font-size: .9375rem; font-weight: 550; color: var(--ink-2); }
.w-date::first-letter { text-transform: uppercase; }
.w-hello { margin: 2px 0 0; font-size: 2rem; line-height: 1.05; font-weight: 780; font-stretch: 112%; letter-spacing: -.015em; overflow-wrap: anywhere; }

/* ---------- scheda di stato ---------- */
.w-state { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1.5px solid var(--line); }
.w-state-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--ink-2); }
.w-state-ic .ic { width: 26px; height: 26px; stroke-width: 2.1; }
.w-state-t { min-width: 0; flex: 1; }
.w-state-w { font-size: 1.3125rem; line-height: 1.15; font-weight: 750; letter-spacing: -.01em; }
.w-state-s { margin-top: 3px; font-size: .9375rem; font-weight: 550; color: var(--ink-2); }
.w-state-s .stamp { font-size: 1.375rem; color: var(--ink); vertical-align: -.08em; }
/* ore di oggi: riga propria in fondo alla scheda (a lato rubava spazio alla parola dello stato) */
.w-state { flex-wrap: wrap; }
.w-hours { flex: 1 0 100%; display: flex; align-items: baseline; gap: 8px; margin-top: 2px; padding-top: 10px; border-top: 1px dashed color-mix(in oklch, currentColor 22%, transparent); font-size: .9375rem; font-weight: 600; color: var(--ink-2); }
.w-hours .stamp { font-size: 1.375rem; line-height: 1; color: var(--ink); }
.w-state.s-go { background: var(--go-tint); border-color: var(--go-line); }
.w-state.s-go .w-state-ic { background: var(--brand-green); color: var(--navy); }
.w-state.s-go .w-state-w { color: var(--go-ink); }
.w-state.s-travel { background: var(--travel-tint); border-color: color-mix(in oklch, var(--travel) 30%, var(--travel-tint)); }
.w-state.s-travel .w-state-ic { background: var(--travel); color: var(--surface); }
.w-state.s-travel .w-state-w { color: var(--travel-ink); }
.w-state.s-pause, .w-state.s-auto { background: var(--pause-tint); border-color: var(--pause-line); }
.w-state.s-pause .w-state-ic, .w-state.s-auto .w-state-ic { background: var(--surface); color: var(--pause-ink); }
.w-state.s-pause .w-state-w, .w-state.s-auto .w-state-w { color: var(--pause-ink); }

/* ---------- avvisi in linea (in attesa, giornata non chiusa, ecc.) ---------- */
.w-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; padding: 12px 14px; border-radius: var(--r-md); font-size: .9375rem; line-height: 1.4; font-weight: 550; background: var(--surface-2); color: var(--ink); }
.w-note .ic { margin-top: 1px; width: 20px; height: 20px; }
.w-note.warn { background: var(--pause-tint); color: var(--pause-ink); border: 1.5px solid var(--pause-line); }
.w-note.err { background: var(--stop-tint); color: var(--stop-ink); border: 1.5px solid var(--stop-line); }
.w-note.ok { background: var(--go-tint); color: var(--go-ink); border: 1.5px solid var(--go-line); }
.w-note b { font-weight: 750; }

/* ---------- scelta del luogo ---------- */
.w-loc { margin-top: 14px; }
.w-loc-btn { display: flex; width: 100%; align-items: center; gap: 10px; min-height: 52px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--surface); text-align: left; font-size: .9375rem; font-weight: 600; color: var(--ink); }
.w-loc-btn .ic { color: var(--ink-2); width: 20px; height: 20px; }
.w-loc-btn .w-loc-v { flex: 1; min-width: 0; overflow-wrap: anywhere; }   /* va a capo: con testo grande nessuna parola sparisce */
.w-loc-btn .w-loc-c { color: var(--go-ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.w-loc select { width: 100%; min-height: 56px; padding: 12px 14px; border: 1.5px solid var(--edge); border-radius: var(--r-md); background: var(--surface); font-size: 1.0625rem; font-weight: 600; }

/* ---------- fasi (flusso cantiere) ---------- */
.w-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 14px; padding: 12px 10px; border-radius: var(--r-lg); background: var(--surface); border: 1.5px solid var(--line); list-style: none; }
.w-steps li { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .8125rem; font-weight: 650; color: var(--ink-2); text-align: center; }
.w-steps i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: .875rem; background: var(--surface-2); color: var(--ink-2); border: 1.5px solid var(--line); }
.w-steps .done i { background: var(--brand-green); color: var(--navy); border-color: var(--brand-green); }
.w-steps .done i .ic { width: 16px; height: 16px; stroke-width: 3; }
.w-steps .now i { background: var(--surface); color: var(--go-ink); border: 3px solid var(--go); }
.w-steps .now, .w-steps .done { color: var(--go-ink); }

/* ---------- il tasto di timbratura ---------- */
.w-actions { margin-top: 18px; }
.w-punch {
  display: flex; align-items: center; gap: 16px; width: 100%; min-height: 112px; padding: 20px 20px;
  border: 0; border-radius: var(--r-xl); text-align: left; color: var(--navy); background: var(--brand-green);
  box-shadow: 0 12px 26px -14px color-mix(in oklch, var(--go) 70%, transparent);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), background-color .15s var(--ease);
}
.w-punch:active { transform: translateY(1px); background: var(--brand-green-press); box-shadow: none; }
.w-punch.t-stop { color: var(--surface); background: var(--stop); box-shadow: 0 12px 26px -14px color-mix(in oklch, var(--stop) 70%, transparent); }
.w-punch.t-stop:active { background: var(--stop-deep); box-shadow: none; }
.w-punch.t-travel { color: var(--surface); background: var(--travel); box-shadow: 0 12px 26px -14px color-mix(in oklch, var(--travel) 70%, transparent); }
.w-punch.t-travel:active { background: var(--travel-deep); box-shadow: none; }
.w-punch.t-plain { background: var(--surface); color: var(--go-ink); border: 2px solid var(--go-line); box-shadow: none; }
.w-punch-ic { width: 60px; height: 60px; border-radius: 17px; display: grid; place-items: center; flex: none; background: rgb(16 19 39 / .10); }
.w-punch.t-stop .w-punch-ic, .w-punch.t-travel .w-punch-ic { background: rgb(255 255 255 / .16); }
.w-punch.t-plain .w-punch-ic { background: var(--go-tint); }
.w-punch-ic .ic { width: 32px; height: 32px; stroke-width: 2.25; }
.w-punch-x { display: flex; flex-direction: column; min-width: 0; }
.w-punch-t { font-size: 1.625rem; line-height: 1.08; font-weight: 750; letter-spacing: -.01em; }
.w-punch-s { margin-top: 5px; font-size: .9375rem; line-height: 1.3; font-weight: 550; opacity: .9; }
/* la conferma prende il posto del tasto per 3 secondi (bibbia dei video, B2.4): il tasto dopo non
   c'e' ancora, quindi un secondo tocco non puo' finire su un'azione diversa */
.w-punch.t-done { background: var(--go-tint); color: var(--go-ink); border: 2px solid var(--go-line); box-shadow: none; cursor: default; }
.w-punch.t-done .w-punch-ic { background: var(--brand-green); color: var(--navy); }
.w-punch.t-done .w-punch-s { opacity: 1; color: var(--ink-2); }
.w-punch.t-done .w-punch-s .stamp { font-size: 1.25rem; color: var(--ink); }
.w-sec-row { display: flex; gap: 10px; margin-top: 12px; }
.w-sec {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 60px; padding: 10px 10px;
  border: 1.5px solid var(--edge); border-radius: var(--r-lg); background: var(--surface); color: var(--ink);
  font-size: 1rem; line-height: 1.2; font-weight: 700; text-align: center;
}
.w-sec .ic { width: 22px; height: 22px; color: var(--ink-2); }
.w-sec.t-pause { background: var(--pause-tint); border-color: var(--pause-line); color: var(--pause-ink); }
.w-sec.t-pause .ic { color: var(--pause-ink); }
.w-sec.t-stop { color: var(--stop-ink); border-color: var(--stop-line); }
.w-sec.t-stop .ic { color: var(--stop-ink); }
.w-sec:active { background: var(--surface-2); }
.w-sec.t-pause:active { background: color-mix(in oklch, var(--pause-tint) 80%, var(--pause)); }
.w-sec-col { display: flex; flex-direction: column; }
.w-sec-col .w-sec { flex: none; }
.w-sec-col .w-sec + .w-sec { margin-top: 10px; }

/* dopo un timbro i tasti restano fermi 3 s, e si vede */
#body.ec-cooldown button[data-type] { pointer-events: none; opacity: .55; transition: opacity .15s; }

/* ---------- tastiera completa (griglia) ---------- */
.w-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.w-tile {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 10px;
  min-height: 96px; padding: 14px; border-radius: var(--r-lg); text-align: left;
  border: 2px solid var(--go); background: var(--surface); color: var(--ink);
  font-size: 1.0625rem; line-height: 1.15; font-weight: 750;
  box-shadow: 0 2px 0 color-mix(in oklch, var(--go) 35%, transparent);
}
.w-tile .ic { width: 28px; height: 28px; color: var(--go-ink); stroke-width: 2.1; }
.w-tile:active { background: var(--go-tint); box-shadow: none; transform: translateY(1px); }
.w-tile.t-stop { background: var(--stop); border-color: var(--stop); color: var(--surface); }
.w-tile.t-stop .ic { color: var(--surface); }
.w-tile.t-stop:active { background: var(--stop-deep); }
.w-tile[disabled] { background: var(--surface-2); border-color: var(--line); color: var(--ink-2); cursor: default; box-shadow: none; }
.w-tile[disabled] .ic { color: var(--ink-3); opacity: .7; }

/* ---------- posizione ---------- */
.w-geo { margin-top: 18px; text-align: center; }
.w-geo-l { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: .9375rem; font-weight: 650; color: var(--go-ink); }
.w-geo-l .ic { width: 18px; height: 18px; }
.w-geo-l.warn { display: flex; align-items: flex-start; justify-content: flex-start; text-align: left; padding: 12px 14px; border-radius: var(--r-md); background: var(--pause-tint); border: 1.5px solid var(--pause-line); color: var(--pause-ink); line-height: 1.4; }
.w-geo-l.warn .ic { margin-top: 1px; }
.w-geo-n { margin-top: 2px; font-size: .8125rem; font-weight: 500; color: var(--ink-2); }

/* ---------- la giornata: il cartellino ---------- */
.w-sect { margin: 30px 2px 10px; font-size: .8125rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.w-day { list-style: none; margin: 0; padding: 6px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1.5px solid var(--line); }
.w-day li { display: grid; grid-template-columns: 3.4em 18px 1fr; align-items: center; column-gap: 10px; min-height: 52px; padding: 6px 0; position: relative; }
.w-day li + li { border-top: 1px dashed var(--line); }
.w-day .stamp { font-size: 1.5rem; line-height: 1; }
.w-day .w-dot { width: 12px; height: 12px; border-radius: 50%; justify-self: center; background: var(--go); box-shadow: 0 0 0 3px var(--go-tint); }
.w-day .k-out .w-dot { background: var(--ink-2); box-shadow: 0 0 0 3px var(--surface-2); }
.w-day .k-pause .w-dot { background: var(--pause); box-shadow: 0 0 0 3px var(--pause-tint); }
.w-day .k-travel .w-dot { background: var(--travel); box-shadow: 0 0 0 3px var(--travel-tint); }
.w-day .k-wait .w-dot { background: var(--surface); border: 2.5px solid var(--pause); box-shadow: none; }
.w-day .k-auto .stamp { color: var(--pause-ink); }
.w-day-w { min-width: 0; font-size: 1rem; font-weight: 700; line-height: 1.25; }
.w-day-w small { display: block; font-size: .875rem; font-weight: 550; color: var(--ink-2); overflow-wrap: anywhere; }
.w-day .k-wait .w-day-w small, .w-day .k-auto .w-day-w small { color: var(--pause-ink); font-weight: 650; }

/* ---------- collegamenti ---------- */
.w-links { margin-top: 24px; border-radius: var(--r-lg); background: var(--surface); border: 1.5px solid var(--line); overflow: hidden; }
.w-links a { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 0 16px; color: var(--ink); text-decoration: none; font-size: 1.0625rem; font-weight: 650; }
.w-links a + a { border-top: 1px solid var(--line); }
.w-links a .ic { width: 22px; height: 22px; color: var(--go-ink); }
.w-links a .ic.chev { margin-left: auto; color: var(--ink-3); width: 20px; height: 20px; }
.w-links a:active { background: var(--surface-2); }

/* ---------- schede (lavori, rapportino, avvisi del titolare) ---------- */
.w-card { margin-top: 12px; padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1.5px solid var(--line); }
.w-card-h { display: flex; align-items: center; gap: 10px; font-size: 1.0625rem; font-weight: 750; }
.w-card-h .ic { width: 22px; height: 22px; color: var(--go-ink); }
.w-card p { margin: 6px 0 12px; font-size: .9375rem; color: var(--ink-2); line-height: 1.45; }
.w-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 56px; padding: 12px 16px; border: 0; border-radius: var(--r-md); background: var(--brand-green); color: var(--navy); font-size: 1.0625rem; font-weight: 700; text-decoration: none; }
.w-btn:active { background: var(--brand-green-press); }
.w-btn.ghost { background: var(--surface); color: var(--ink); border: 1.5px solid var(--edge); }
.w-btn[disabled] { background: var(--line); color: var(--ink-2); cursor: default; }
.w-lav { padding: 12px 0; border-top: 1px solid var(--line); }
.w-lav:first-of-type { margin-top: 8px; }
.w-lav-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.w-lav-t { font-size: 1rem; font-weight: 700; }
.w-lav-m { margin-top: 2px; font-size: .875rem; color: var(--ink-2); }
.w-lav-d { margin-top: 6px; font-size: .9375rem; white-space: pre-wrap; }
.w-lav a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: .9375rem; font-weight: 700; color: var(--go-ink); text-decoration: none; }
.w-chip { flex: none; font-size: .8125rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.w-chip.c-go { background: var(--go-tint); color: var(--go-ink); }
.w-chip.c-pause { background: var(--pause-tint); color: var(--pause-ink); }
.w-chip.c-travel { background: var(--travel-tint); color: var(--travel-ink); }
.w-rap-list { margin-top: 12px; }
.w-rap-list h3 { margin: 4px 0 8px; font-size: .8125rem; font-weight: 700; color: var(--ink-2); }
.w-rap-item { padding: 10px 12px; margin-bottom: 8px; border-radius: var(--r-md); background: var(--bg); }
.w-rap-item div:first-child { font-size: .8125rem; color: var(--ink-2); margin-bottom: 3px; }
.w-rap-item div:last-child { font-size: .9375rem; white-space: pre-wrap; }
.w-ann { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1.5px solid var(--line); }
.w-ann > .ic { width: 22px; height: 22px; color: var(--travel-ink); }
.w-ann-t { flex: 1; min-width: 0; line-height: 1.3; }
.w-ann-t b { display: block; font-size: 1rem; font-weight: 700; }
.w-ann-t span { display: block; font-size: .9375rem; color: var(--ink-2); white-space: pre-wrap; }
.w-ann button { flex: none; min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--go-line); background: var(--go-tint); color: var(--go-ink); font-size: .9375rem; font-weight: 700; }
.w-ann .w-read { flex: none; font-size: .875rem; font-weight: 650; color: var(--ink-2); }
.w-resp { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; margin-top: 10px; border-radius: var(--r-md); background: var(--surface); border: 1.5px solid var(--edge); color: var(--ink); font-weight: 700; text-decoration: none; }
.w-resp .ic { color: var(--travel-ink); }

/* ---------- avviso in cima (#banner) ---------- */
.w-banner { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; padding: 13px 14px; border-radius: var(--r-md); font-size: .9375rem; line-height: 1.4; font-weight: 600; }
.w-banner .ic { margin-top: 1px; width: 20px; height: 20px; }
.w-banner.b-offline { background: var(--pause-tint); color: var(--pause-ink); border: 1.5px solid var(--pause-line); }
.w-banner.b-err { background: var(--stop-tint); color: var(--stop-ink); border: 1.5px solid var(--stop-line); }
.w-banner.b-ok { background: var(--go-tint); color: var(--go-ink); border: 1.5px solid var(--go-line); }

/* ---------- timbri non accettati ---------- */
.w-blocked { margin-top: 10px; padding: 16px; border-radius: var(--r-lg); background: var(--pause-tint); border: 1.5px solid var(--pause-line); color: var(--pause-ink); }
.w-blocked h2 { margin: 0; font-size: 1.0625rem; font-weight: 750; }
.w-blocked p { margin: 4px 0 8px; font-size: .9375rem; line-height: 1.4; }
.w-blocked-r { padding: 9px 0; border-top: 1px solid var(--pause-line); font-size: .9375rem; line-height: 1.4; color: var(--ink); }
.w-blocked .w-btn { margin-top: 8px; background: var(--surface); color: var(--pause-ink); border: 1.5px solid var(--pause-line); }

/* ---------- conferma del timbro (in basso, vicino al pollice) ---------- */
#ecToast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 9999;
  width: calc(100% - 32px); max-width: 448px; display: flex; align-items: center; gap: 12px; padding: 16px 18px;
  border-radius: var(--r-lg); background: var(--navy); color: var(--surface); font-size: 1.0625rem; line-height: 1.3; font-weight: 700;
  box-shadow: var(--shadow-sheet); cursor: pointer; animation: ec-up .25s var(--ease);
}
/* la spunta e' disegnata qui (il testo arriva con textContent, senza markup) */
#ecToast::before {
  content: ''; flex: none; width: 26px; height: 26px; background: #77de96;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m8.5 12 2.5 2.5 4.5-5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m8.5 12 2.5 2.5 4.5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}
#ecToast[data-tono="attesa"]::before {
  background: #f2c46b;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E");
}
@keyframes ec-up { from { transform: translate(-50%, 12px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

/* ---------- fogli dal basso (conferme) ---------- */
.w-sheet-bg { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: flex-end; justify-content: center; padding: 0 12px calc(12px + env(safe-area-inset-bottom, 0px)); background: rgb(16 19 39 / .55); animation: ec-fade .2s var(--ease); }
.w-sheet { width: 100%; max-width: 456px; padding: 24px 20px 16px; border-radius: var(--r-xl); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sheet); animation: ec-sheet .25s var(--ease); }
.w-sheet h2 { margin: 0 0 16px; font-size: 1.25rem; line-height: 1.35; font-weight: 700; }
.w-sheet .w-btn + .w-btn { margin-top: 10px; }
.w-sheet-p { margin: 0 0 8px; font-size: 1.0625rem; line-height: 1.45; color: var(--ink); }
.w-sheet-n { margin: 0 0 16px; font-size: .9375rem; line-height: 1.4; color: var(--ink-2); }
/* app nativa: avviso di versione nuova (mobile/native/native.js), in basso come la conferma */
.w-update { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 9998; max-width: 456px; margin: 0 auto; display: flex; gap: 12px; align-items: center; padding: 12px 8px 12px 16px; border-radius: var(--r-lg); background: var(--navy); color: var(--surface); box-shadow: var(--shadow-sheet); font-size: .9375rem; font-weight: 600; }
.w-update-t { flex: 1; line-height: 1.35; }
.w-update-go { flex: none; min-height: 44px; padding: 0 16px; border: 0; border-radius: var(--r-md); background: var(--brand-green); color: var(--navy); font-weight: 750; }
.w-update-x { flex: none; min-width: 44px; min-height: 44px; border: 0; background: none; color: var(--surface); font-size: 1.5rem; line-height: 1; }
@keyframes ec-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ec-sheet { from { transform: translateY(24px); } to { transform: none; } }

/* ---------- accesso ---------- */
.l-wrap { min-height: 100dvh; display: flex; flex-direction: column; padding: calc(28px + env(safe-area-inset-top, 0px)) 24px calc(24px + env(safe-area-inset-bottom, 0px)); }
.l-head { display: flex; align-items: center; gap: 14px; }
.l-head img { width: 56px; height: 56px; border-radius: 16px; display: block; flex: none; }
.l-head b { display: block; font-family: var(--brand-font); font-size: 1.5rem; font-weight: 700; letter-spacing: -.025em; line-height: 1.1; }
.l-head span { display: block; font-size: .9375rem; font-weight: 550; color: var(--ink-2); }
.l-switch { display: flex; gap: 4px; margin-top: 24px; padding: 4px; border-radius: 14px; background: var(--surface-2); }
.l-switch button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border: 0; border-radius: 11px; background: transparent; color: var(--ink-2); font-size: 1rem; font-weight: 700; }
.l-switch button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(16 19 39 / .12), 0 0 0 1px var(--line); }
.l-switch .ic { width: 20px; height: 20px; }
.l-field { margin-top: 22px; }
.l-field label, .l-pinlabel { display: block; font-size: .9375rem; font-weight: 700; color: var(--ink); }
.l-field input { display: block; width: 100%; min-height: 58px; margin-top: 8px; padding: 12px 16px; border: 1.5px solid var(--edge); border-radius: var(--r-md); background: var(--surface); font-size: 1.1875rem; font-weight: 700; color: var(--ink); }
.l-field input::placeholder { color: var(--ink-3); font-weight: 500; }
.l-field input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in oklch, var(--go) 35%, transparent); }
.l-field .l-hint { margin-top: 6px; font-size: .875rem; color: var(--ink-2); }
#code { text-transform: uppercase; letter-spacing: .03em; }
.l-pw { position: relative; }
.l-pw input { padding-right: 58px; }
.l-pw button { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border: 0; background: none; color: var(--ink-2); display: grid; place-items: center; }
.l-pinrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 14px; }
.l-dots { display: flex; gap: 14px; }
.l-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--edge); background: var(--surface); transition: background-color .12s var(--ease), border-color .12s var(--ease); }
.l-dots i.on { background: var(--ink); border-color: var(--ink); }
.l-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.l-pad button { min-height: 64px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); font-size: 1.75rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); box-shadow: 0 1px 0 var(--line); }
.l-pad button:active { background: var(--surface-2); transform: translateY(1px); box-shadow: none; }
.l-pad .ic { width: 28px; height: 28px; }
.l-err { display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; padding: 12px 14px; border-radius: var(--r-md); background: var(--stop-tint); color: var(--stop-ink); border: 1.5px solid var(--stop-line); font-size: .9375rem; font-weight: 650; line-height: 1.4; }
.l-err .ic { width: 20px; height: 20px; margin-top: 1px; }
.l-go { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 60px; margin-top: 18px; border: 0; border-radius: 16px; background: var(--brand-green); color: var(--navy); font-size: 1.1875rem; font-weight: 750; transition: background-color .15s var(--ease); }
.l-go:active { background: var(--brand-green-press); }
.l-go[disabled] { background: var(--line); color: var(--ink-2); cursor: default; }
.l-go .ic { width: 22px; height: 22px; }
.l-help { margin: 12px 0 0; text-align: center; font-size: .9375rem; color: var(--ink-2); line-height: 1.45; }
.l-alt { margin-top: 10px; padding-top: 6px; border-top: 1px solid var(--line); text-align: center; }
.l-alt a, .l-foot a { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 10px; font-size: .9375rem; font-weight: 700; color: var(--go-ink); text-decoration: none; }
.l-alt a.mut { color: var(--ink-2); }
.l-foot { margin-top: auto; padding-top: 24px; text-align: center; }
.l-foot p { margin: 0; font-size: .875rem; color: var(--ink-2); line-height: 1.45; }
/* schermi bassi (livelli misurati: vedi loginLivello in app.js) */
.l-lv1 .l-wrap { padding-top: calc(18px + env(safe-area-inset-top, 0px)); }
.l-lv1 .l-switch { margin-top: 16px; }
.l-lv1 .l-field { margin-top: 14px; }
.l-lv1 .l-pinrow { margin: 14px 0 10px; }
.l-lv1 .l-pad { gap: 8px; }
.l-lv1 .l-pad button { min-height: 56px; }
.l-lv1 .l-go { margin-top: 12px; }
.l-lv2 .l-wrap { padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
.l-lv2 .l-head img { width: 44px; height: 44px; border-radius: 12px; }
.l-lv2 .l-head b { font-size: 1.25rem; }
.l-lv2 .l-switch { margin-top: 10px; }
.l-lv2 .l-switch button { min-height: 44px; }
.l-lv2 .l-field { margin-top: 10px; }
.l-lv2 .l-field input { min-height: 50px; margin-top: 6px; }
.l-lv2 .l-pinrow { margin: 10px 0 8px; }
.l-lv2 .l-pad { gap: 7px; }
.l-lv2 .l-pad button { min-height: 48px; font-size: 1.5rem; }
.l-lv2 .l-go { margin-top: 8px; min-height: 54px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
