/* =====================================================================
   PROLIGHTS Inside: stile del portale (inside.html).

   Base: il design system di ML-Visits (assets/styles.css). Stesso
   carattere (Inter, caricato in inside.html come in index.html), stessa
   palette ufficiale Prolights, stessi token, stessa elevazione FLAT
   (pannelli con bordo 1px e nessuna ombra; l'ombra solo sui flottanti:
   toast e anteprima dell'invito), stessi raggi, pulsanti, campi,
   badge, etichette e tabelle. I token sono copiati qui e non si carica
   styles.css: le sue regole globali (h1, .btn, .card, .field, .toast)
   romperebbero l'impaginazione del portale.

   Del mockup di Fabio (23.10.2026) restano impaginazione, struttura,
   foto, passi del form, logo e contenuti.

   Tema: scuro di default, chiaro con la classe light-mode su <html>,
   come nell'app staff. La scelta e' in localStorage 'ml-visits-theme',
   condivisa con l'app staff: la legge lo script in testa a inside.html
   (niente lampo scuro) e la cambia il pulsante nella barra in alto.
   Le fasce su foto (.hero, .ghero) restano scure in entrambi i temi.
   Contrasti AA: testo, muted e brand-ink su fondo e pannelli di
   entrambi i temi (verifica in tests/inside-portal-ui.test.cjs).
   ===================================================================== */

:root {
  /* Palette ufficiale Prolights */
  --prolights-yellow:   #f3cb12;
  --prolights-night:    #141414;
  --prolights-seasalt:  #f8f8f8;
  --prolights-blue:     #5a96f0;
  --prolights-orange:   #fa640a;
  --prolights-silver:   #c1c1c1;
  --prolights-gray:     #898989;
  --prolights-xanthous: #f3b412;
  --prolights-jet:      #303030;
  --prolights-violet:   #9b6dff;

  /* Alias semantici, come in styles.css */
  --brand: var(--prolights-yellow);
  --brand-dim: rgba(243, 203, 18, 0.12);
  --brand-bg-hover: rgba(243, 203, 18, 0.20);
  --danger: #ef4444;
  --success: #00e676;
  --warning: var(--prolights-xanthous);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  /* Inter, come l'app staff. */
  --font-brand: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
                Roboto, Arial, sans-serif;
}

/* Tema scuro (default) e fasce su foto, che restano scure anche nel
   tema chiaro: dichiarare i token anche su .hero e .ghero li riporta
   ai valori scuri per tutto il loro contenuto. */
:root, .hero, .ghero {
  --brand-ink: var(--prolights-yellow);
  /* Bordo che segnala uno stato (scelta, scheda attiva): sul chiaro il
     giallo puro non si vede, si usa l'ambra del testo. */
  --brand-edge: var(--prolights-yellow);
  --blue-ink: var(--prolights-blue);
  --success-ink: var(--success);
  --danger-ink: #ff6b6b;
  --warning-ink: var(--prolights-xanthous);

  --app-bg: var(--prolights-night);
  --app-panel: #1c1c1c;
  --app-panel-2: #262626;
  --app-surface: #181818;
  --app-text: var(--prolights-seasalt);
  /* Testo secondario del portale (descrizioni lunghe): fra testo e
     muted. In styles.css non c'e', il portale ha piu' testo corrente. */
  --app-text-2: var(--prolights-silver);
  --app-muted: #9a9a9a;
  --app-border: rgba(255, 255, 255, 0.08);
  --app-border-strong: rgba(255, 255, 255, 0.14);

  --hover-soft: rgba(255, 255, 255, 0.06);
  --hover-soft-2: rgba(255, 255, 255, 0.1);
  --input-bg: #222222;
  --input-bg-hover: #282828;
  --input-bg-focus: #222222;
  --btn-secondary-bg: #262626;
  --btn-secondary-bg-hover: #2f2f2f;
  --shadow-float: 0 12px 32px rgba(0, 0, 0, 0.35);
  --dialog-mask: rgba(0, 0, 0, 0.6);
  --focus-ring: 0 0 0 3px rgba(243, 203, 18, 0.35);
  --nav-bg: rgba(28, 28, 28, 0.94);
  color-scheme: dark;
}

/* Tema chiaro: classe "light-mode" su <html>, valori di styles.css. */
html.light-mode {
  --brand-ink: #8f5f00;    /* 5.5:1 su bianco: il giallo puro sarebbe 1.4:1 */
  --brand-edge: #8f5f00;
  --blue-ink: #2563eb;
  --success-ink: #15803d;
  --danger-ink: #b91c1c;
  --warning-ink: #8a6400;

  --app-bg: var(--prolights-seasalt);
  --app-panel: #ffffff;
  --app-panel-2: #ededed;
  --app-surface: #f1f1f1;
  --app-text: var(--prolights-night);
  --app-text-2: #3d3d3d;
  --app-muted: #6b6b6b;
  --app-border: rgba(0, 0, 0, 0.1);
  --app-border-strong: rgba(0, 0, 0, 0.18);

  --hover-soft: rgba(0, 0, 0, 0.05);
  --hover-soft-2: rgba(0, 0, 0, 0.08);
  --input-bg: #f3f3f3;
  --input-bg-hover: #ececec;
  --input-bg-focus: #ffffff;
  --btn-secondary-bg: #ffffff;
  --btn-secondary-bg-hover: #f0f0f0;
  --shadow-float: 0 12px 32px rgba(0, 0, 0, 0.14);
  --dialog-mask: rgba(20, 20, 20, 0.35);
  --focus-ring: 0 0 0 3px rgba(143, 95, 0, 0.3);
  --nav-bg: rgba(255, 255, 255, 0.94);
  color-scheme: light;
}

/* Nomi del mockup ancora usati negli stili in linea di
   inside-portal.js: puntano ai token, cosi' seguono il tema. */
:root, .hero, .ghero {
  --silver: var(--app-text-2);
  --gray: var(--app-muted);
  --red: var(--danger-ink);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--app-bg); color: var(--app-text); font-family: var(--font-brand);
  font-size: 15px; line-height: 1.5; margin: 0; -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  /* Inter: "l" distinta da "I", come nell'app staff. */
  font-feature-settings: 'cv05' 1, 'ss01' 1; letter-spacing: -0.006em;
  transition: background-color .15s ease, color .15s ease;
}
a { color: var(--brand-ink); }
img { max-width: 100%; }
.in {
  max-width: 1120px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--brand); color: var(--prolights-night);
  padding: 10px 14px; font-weight: 600; border-radius: var(--radius-sm); text-decoration: none;
}
.skip:focus { top: 8px; }

/* ---------- barra in alto (come la topbar dell'app staff) ---------- */
nav.top {
  position: sticky; top: 0; z-index: 50; background: var(--nav-bg);
  backdrop-filter: blur(6px); border-bottom: 1px solid var(--app-border);
}
nav.top .in { display: flex; align-items: center; gap: 18px; padding-block: 12px; }
nav.top .logo { display: block; line-height: 0; }
nav.top .logo img, nav.top .logo svg { width: 150px; height: auto; display: block; }
nav.top .links { display: flex; gap: 4px; margin-left: auto; font-size: 13px; }
nav.top .links button {
  background: none; border: 0; padding: 7px 10px; color: var(--app-muted); font: inherit; font-weight: 600;
  border-radius: var(--radius-sm); cursor: pointer; transition: background-color .15s, color .15s;
}
nav.top .links button:hover { background: var(--hover-soft); color: var(--app-text); }
nav.top .right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
nav.top .links + .right { margin-left: 0; }

/* Lingua: pulsanti segmentati, l'attivo come la scheda attiva dell'app. */
.lang { display: flex; gap: 2px; padding: 2px; border: 1px solid var(--app-border-strong); border-radius: var(--radius-sm); }
.lang button {
  display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 0;
  color: var(--app-muted); font-family: inherit; font-size: 12px; font-weight: 600; letter-spacing: .3px;
  padding: 6px 9px; cursor: pointer; min-height: 32px; border-radius: 4px;
  transition: background-color .15s, color .15s;
}
.lang button:hover { background: var(--hover-soft); color: var(--app-text); }
.lang button[aria-pressed="true"] { background: var(--brand-dim); color: var(--brand-ink); }
.lang svg { display: block; border-radius: 1px; }

/* Tema chiaro / scuro: pulsante icona, come .icon-btn dell'app staff. */
.theme-btn {
  appearance: none; background: transparent; border: 1px solid var(--app-border-strong);
  color: var(--app-muted); width: 38px; height: 38px; border-radius: var(--radius-sm);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0;
  flex: 0 0 auto; transition: background-color .15s ease, color .15s ease;
}
.theme-btn:hover { background: var(--hover-soft); color: var(--app-text); }
.theme-btn svg { display: block; }

/* ---------- controlli (pulsanti come .btn dell'app staff) ---------- */
.btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--brand); color: var(--prolights-night); border: 1px solid var(--brand);
  font-family: inherit; font-weight: 600; font-size: 14px; line-height: 1.3;
  padding: 10px 16px; cursor: pointer; border-radius: var(--radius-sm); text-decoration: none; min-height: 44px;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover:not(:disabled) { background: #ffd53a; border-color: #ffd53a; }
.btn:active:not(:disabled) { background: #d4ae00; border-color: #d4ae00; }
/* ghost del mockup = btn-secondary dell'app staff */
.btn.ghost { background: var(--btn-secondary-bg); color: var(--app-text); border-color: var(--app-border-strong); }
.btn.ghost:hover:not(:disabled) { background: var(--btn-secondary-bg-hover); border-color: var(--app-border-strong); }
.btn.ghost:active:not(:disabled) { background: var(--btn-secondary-bg-hover); border-color: var(--app-border-strong); }
.btn.sm { padding: 6px 12px; min-height: 36px; font-size: 13px; }
/* danger del mockup = btn-outline-danger dell'app staff */
.btn.danger { background: transparent; color: var(--danger-ink); border-color: var(--danger); }
.btn.danger:hover:not(:disabled), .btn.danger:active:not(:disabled) { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
/* Azione di testo: btn-ghost dell'app staff. */
.linkbtn {
  background: none; border: 0; color: var(--app-muted); font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; padding: 6px 8px; min-height: 32px; border-radius: var(--radius-sm);
  transition: background-color .15s ease, color .15s ease;
}
.linkbtn:hover { background: var(--hover-soft); color: var(--app-text); }
.linkbtn.warn:hover { color: var(--danger-ink); }
/* Fuoco: l'anello dell'app staff sui controlli, il contorno sui link. */
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
.btn:focus-visible, .pick:focus-visible, label.btn:focus-within {
  outline: none; box-shadow: var(--focus-ring);
}
a:not(.btn):focus-visible, summary:focus-visible {
  outline: 2px solid var(--brand-edge); outline-offset: 2px; border-radius: 2px;
}

/* ---------- testi ---------- */
/* Etichette sopra i titoli: maiuscoletto di Inter, come h3 e le
   etichette delle statistiche dell'app staff, nel colore del brand. */
.kicker {
  font-size: 12px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--brand-ink); margin: 0 0 10px;
}
h1 { font-size: clamp(32px, 5.4vw, 56px); font-weight: 800; letter-spacing: -.02em; line-height: 1.05; margin: 0 0 16px; text-wrap: balance; }
h1 em { font-style: normal; color: var(--brand-ink); }
h2.sec { font-size: clamp(22px, 3vw, 30px); font-weight: 700; letter-spacing: -.015em; line-height: 1.15; margin: 0 0 8px; text-wrap: balance; }
.sub { color: var(--app-text-2); font-size: 15px; max-width: 64ch; margin: 0 0 24px; }
.muted { color: var(--app-muted); }
section.block { padding-block: 64px; border-top: 1px solid var(--app-border); }
.notice {
  border: 1px solid var(--app-border); border-left: 3px solid var(--brand); border-radius: var(--radius-md);
  background: var(--app-panel); padding: 12px 16px; color: var(--app-text-2); font-size: 14px; margin: 0 0 16px;
}
.notice.ok { border-left-color: var(--success); }
.notice.bad { border-left-color: var(--danger); color: var(--app-text); }
.err { color: var(--danger-ink); font-size: 13px; margin: 0; }

/* ---------- pagina pubblica ---------- */
/* Fascia su foto: scura in entrambi i temi (token scuri sopra). */
.hero {
  position: relative; padding-block: 130px 0; color: var(--app-text);
  background:
    linear-gradient(90deg, rgba(20, 20, 20, .88) 0%, rgba(20, 20, 20, .6) 42%, rgba(20, 20, 20, .12) 100%),
    linear-gradient(0deg, var(--prolights-night) 0%, rgba(20, 20, 20, 0) 30%),
    url(inside/img/hero.jpg) center 40% / cover no-repeat;
  background-color: var(--prolights-night);
}
.hero .in.hf { padding-bottom: 110px; }
.hero p.lede { font-size: 17px; color: var(--app-text-2); max-width: 56ch; margin: 0 0 26px; }
.ctas { display: flex; gap: 10px; flex-wrap: wrap; }
.credit { font-size: 11px; color: var(--app-muted); text-align: right; margin: 0; padding-block: 0 14px; }

.srgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.srtext { align-self: center; padding: 8px 8px 12px 20px; }
.ph { margin: 0; position: relative; overflow: hidden; background: var(--app-panel); min-width: 0; border-radius: var(--radius-md); }
.ph img { display: block; width: 100%; aspect-ratio: 3 / 2; height: auto; object-fit: cover; }

.days { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 12px; }
.day { background: var(--app-panel); border: 1px solid var(--app-border); border-radius: var(--radius-md); padding: 22px; min-width: 0; }
.day.main { background: var(--brand); border-color: var(--brand); color: var(--prolights-night); }
.day .tag { font-size: 11.5px; font-weight: 600; letter-spacing: 1.1px; text-transform: uppercase; color: var(--app-muted); }
.day.main .tag { color: var(--prolights-night); }
.day b { display: block; font-size: 22px; font-weight: 700; margin: 6px 0 8px; }
.day p { margin: 0; color: var(--app-text-2); font-size: 14.5px; }
.day.main p { color: var(--prolights-night); }

.tl { border-top: 1px solid var(--app-border); max-width: 760px; }
.tl .r { display: grid; grid-template-columns: 72px 1fr; border-bottom: 1px solid var(--app-border); padding: 12px 0; gap: 8px; }
/* Ora come .leg-hour dell'app staff. */
.tl .t { color: var(--brand-ink); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; padding-top: 1px; }
.tl b { font-weight: 600; font-size: 16px; }
.tl span { display: block; color: var(--app-muted); font-size: 13.5px; }
.tl .r.brk .t, .tl .r.brk b { color: var(--app-muted); font-weight: 500; }
.tl .r.hi b { color: var(--brand-ink); }
.tl .pl {
  font-style: normal; font-size: 10.5px; font-weight: 600; letter-spacing: .3px; text-transform: uppercase;
  border: 1px solid var(--app-border-strong); color: var(--app-muted); background: var(--hover-soft);
  padding: 1px 7px; border-radius: 999px; margin-left: 8px; vertical-align: 2px;
}

.feat { display: grid; grid-template-columns: 1.2fr 1fr; border: 1px solid var(--app-border); border-radius: var(--radius-md); overflow: hidden; background: var(--app-panel); }
.fph { background: linear-gradient(90deg, rgba(20, 20, 20, 0) 60%, var(--app-panel)), url(inside/img/showroom-desks.jpg) center / cover; min-height: 260px; }
.fbx { padding: 26px; display: grid; gap: 10px; align-content: center; justify-items: start; }
.fbx .lbl { font-size: 11.5px; font-weight: 600; letter-spacing: 1.1px; text-transform: uppercase; color: var(--app-muted); }
.fd { font-size: 26px; font-weight: 800; line-height: 1.15; }
.fbx p { margin: 0; color: var(--app-text-2); font-size: 14px; }
.mgrp { border-top: 1px solid var(--app-border); }
.mh { font-size: 12px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--brand-ink); padding: 16px 0 6px; }
.lrow { display: grid; grid-template-columns: 56px 1fr auto; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--app-border); }
.lrow.full { opacity: .6; }
.ld { display: grid; justify-items: center; background: var(--app-panel); border: 1px solid var(--app-border); border-radius: var(--radius-sm); padding: 6px 0; }
.ld b { font-size: 22px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.ld span { font-size: 10.5px; font-weight: 600; letter-spacing: .6px; color: var(--app-muted); text-transform: uppercase; }
.lm { min-width: 0; }
.lt { font-weight: 600; font-size: 16px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ls { color: var(--app-muted); font-size: 13px; margin-top: 2px; }

/* Stati: .badge dell'app staff. */
/* La tinta sta sopra il colore del pannello anche quando il badge e'
   sul fondo pagina: sul fondo Seasalt del tema chiaro verde e blu
   scenderebbero sotto 4.5:1. */
.pill {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; letter-spacing: .3px;
  text-transform: uppercase; padding: 3px 9px; border-radius: 999px; line-height: 1.4;
  border: 1px solid var(--app-border-strong); color: var(--app-muted); white-space: nowrap;
  --pill-tint: var(--hover-soft);
  background: linear-gradient(var(--pill-tint), var(--pill-tint)) var(--app-panel);
}
.pill.y { --pill-tint: var(--brand-dim); color: var(--brand-ink); border-color: rgba(243, 203, 18, .3); }
.pill.ok { --pill-tint: rgba(0, 230, 118, .12); color: var(--success-ink); border-color: rgba(0, 230, 118, .3); }
.pill.r { --pill-tint: rgba(239, 68, 68, .12); color: var(--danger-ink); border-color: rgba(239, 68, 68, .3); }
.pill.b { --pill-tint: rgba(90, 150, 240, .14); color: var(--blue-ink); border-color: rgba(90, 150, 240, .32); }

.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.card { background: var(--app-panel); border: 1px solid var(--app-border); border-radius: var(--radius-md); padding: 18px 20px; min-width: 0; }
.card h3 { font-size: 12px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--brand-ink); margin: 0 0 10px; }
.card p { margin: 0 0 8px; color: var(--app-text-2); font-size: 14px; }
.card ul { margin: 0; padding-left: 18px; color: var(--app-text-2); font-size: 14px; display: grid; gap: 5px; }
.card li::marker { color: var(--brand-ink); }
.card.hl { border-color: var(--brand-edge); }
.card.photo { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.card.photo figure { margin: 0 0 16px; position: relative; }
.card.photo img { display: block; width: 100%; aspect-ratio: 16 / 8; object-fit: cover; }
.card.photo figcaption {
  position: absolute; right: 6px; bottom: 6px; font-size: 10.5px; color: var(--prolights-seasalt);
  background: rgba(20, 20, 20, .72); padding: 1px 6px; border-radius: 4px;
}
.card.photo h3, .card.photo p { padding: 0 20px; }
.card.photo p:last-child { padding-bottom: 18px; }
.card b.w { color: var(--app-text); }
/* Tabelle: .table-wrap e table.tbl dell'app staff. */
.tbl { overflow-x: auto; border: 1px solid var(--app-border); border-radius: var(--radius-md); background: var(--app-panel); }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.tbl table { min-width: 560px; }
th {
  font-size: 11.5px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: var(--app-muted);
  text-align: left; padding: 10px 12px; background: var(--app-surface); border-bottom: 1px solid var(--app-border);
}
td { padding: 10px 12px; border-bottom: 1px solid var(--app-border); color: var(--app-text-2); vertical-align: top; font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: none; }
td b { color: var(--app-text); font-weight: 600; }

details.faq { border-bottom: 1px solid var(--app-border); padding: 16px 0; }
details.faq summary { cursor: pointer; font-weight: 600; font-size: 16px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--brand-ink); font-weight: 600; }
details.faq[open] summary::after { content: "–"; }
details.faq p { color: var(--app-text-2); margin: 10px 0 0; max-width: 72ch; font-size: 14.5px; }
.narrow { max-width: 720px; margin: 0 auto; }
/* Fascia gialla: testo Night in entrambi i temi. */
.cta { background: var(--brand); color: var(--prolights-night); padding-block: 44px; }
.cta .in { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.cta h2 { margin: 0; font-size: clamp(22px, 3vw, 30px); font-weight: 700; letter-spacing: -.015em; }
.cta p { margin: 6px 0 0; }
.cta .btn { background: var(--prolights-night); color: var(--prolights-yellow); border-color: var(--prolights-night); }
.cta .btn:hover:not(:disabled), .cta .btn:active:not(:disabled) { background: #2a2a2a; border-color: #2a2a2a; }
.cta .btn:focus-visible { box-shadow: 0 0 0 3px rgba(20, 20, 20, .45); }
footer { padding-block: 28px 48px; font-size: 12.5px; color: var(--app-muted); border-top: 1px solid var(--app-border); }
footer .in { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
footer a { color: var(--app-muted); }
footer a:hover { color: var(--app-text); }

/* ---------- viste dell'area e form ---------- */
.app { padding-block: 36px 72px; min-height: 60vh; }
.app h1 { font-size: clamp(26px, 3.6vw, 34px); letter-spacing: -.015em; }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
/* Etichette dei campi: peso di lavoro 600, come .field-label. */
.field label, .flabel { font-weight: 600; font-size: 13.5px; color: var(--app-text); }
.field .help { font-size: 12.5px; color: var(--app-muted); }
.field.bad input, .field.bad select, .field.bad textarea { border-color: var(--danger); }
.field .ferr { color: var(--danger-ink); font-size: 12.5px; }
.req { color: var(--danger-ink); }
.lock { font-size: 10.5px; font-weight: 600; color: var(--blue-ink); letter-spacing: .3px; text-transform: uppercase; margin-left: 6px; }
/* Campi: .input / .select / .textarea dell'app staff, alti 44px per il
   tocco. 16px sotto i 600px: iOS non ingrandisce la pagina. */
input.free, select.free, textarea.free {
  width: 100%; background: var(--input-bg); border: 1px solid var(--app-border); color: var(--app-text);
  font-family: inherit; font-size: 14px; padding: 10px 12px; border-radius: var(--radius-sm); min-height: 44px;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
input.free:hover, select.free:hover, textarea.free:hover { background-color: var(--input-bg-hover); border-color: var(--app-border-strong); }
input.free:focus, select.free:focus, textarea.free:focus {
  outline: none; background-color: var(--input-bg-focus); border-color: var(--brand); box-shadow: var(--focus-ring);
}
input.free::placeholder, textarea.free::placeholder { color: var(--app-muted); }
input.free[readonly] { color: var(--app-text-2); background-color: var(--app-surface); }
input.free:disabled, select.free:disabled, textarea.free:disabled { opacity: .6; cursor: not-allowed; }
textarea.free { min-height: 84px; resize: vertical; line-height: 1.5; }
select.free {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--app-muted) 50%), linear-gradient(135deg, var(--app-muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 34px;
}
select.free option { background: var(--app-panel); color: var(--app-text); }
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator { opacity: .75; cursor: pointer; }
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }
.q { background: var(--app-panel); border: 1px solid var(--app-border); border-radius: var(--radius-md); padding: 18px; display: grid; gap: 14px; margin-bottom: 12px; }
.q.bad { border-color: var(--danger); }
.q .qh { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.kk { color: var(--brand-ink); font-size: 12px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.chk { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--app-text-2); cursor: pointer; }
.chk input { accent-color: var(--brand); width: 18px; height: 18px; margin: 1px 0 0; flex: 0 0 auto; cursor: pointer; }
.chk.disabled { opacity: .5; cursor: not-allowed; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips label {
  display: inline-flex; gap: 7px; align-items: center; background: var(--btn-secondary-bg);
  border: 1px solid var(--app-border-strong); border-radius: var(--radius-sm); padding: 8px 12px;
  font-size: 13.5px; color: var(--app-text-2); cursor: pointer; min-height: 40px;
  transition: background-color .15s ease, border-color .15s ease;
}
.chips label:hover { background: var(--btn-secondary-bg-hover); }
.chips input { accent-color: var(--brand); width: 16px; height: 16px; margin: 0; }
.chips label:has(input:checked) { border-color: var(--brand-edge); background: var(--brand-dim); color: var(--app-text); }
.chips label:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.steps { display: flex; gap: 4px; margin: 18px 0 26px; padding: 0; list-style: none; }
.steps li { flex: 1; min-width: 0; }
.steps button {
  width: 100%; background: none; border: 0; border-top: 3px solid var(--app-border-strong); padding: 8px 0 0; text-align: left;
  color: var(--app-muted); font-family: inherit; font-size: 12.5px; font-weight: 600;
  cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.steps button:hover:not(:disabled) { color: var(--app-text); }
.steps button.done { border-color: var(--app-text-2); color: var(--app-text-2); }
.steps button.cur { border-color: var(--brand-edge); color: var(--brand-ink); }
.steps button:disabled { cursor: default; }
.wizfoot { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
/* Back, Save draft e Save draft and exit a sinistra, Continue a destra. */
.wizfoot-l { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
/* "Draft saved at 14:32" e cosa resta da correggere. */
.draftnote { font-size: 13px; color: var(--app-muted); margin: 10px 0 0; }
.draftnote.warn { color: var(--warning-ink); }
/* Riepilogo: "Before you can send", un punto per riga con il link al passo. */
.notice.todo { border-left-color: var(--warning); color: var(--app-text); }
.notice.todo .todo-sub { display: block; color: var(--app-text-2); margin-top: 2px; }
.checklist { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.checklist li { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.checklist li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--warning); flex: 0 0 auto; }
.checklist li > span { flex: 1 1 auto; min-width: 0; }

.pickgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pick {
  background: var(--app-panel); border: 1px solid var(--app-border-strong); border-radius: var(--radius-md); padding: 16px;
  text-align: left; color: var(--app-text); font-family: inherit; cursor: pointer; display: grid; gap: 4px; min-width: 0;
  transition: border-color .15s ease, background-color .15s ease;
}
.pick:hover:not(:disabled) { background: var(--hover-soft); }
.pick.on { border-color: var(--brand-edge); background: var(--brand-dim); box-shadow: inset 0 0 0 1px var(--brand-edge); }
.pick.on:focus-visible { box-shadow: inset 0 0 0 1px var(--brand-edge), var(--focus-ring); }
.pick:disabled { opacity: .5; cursor: not-allowed; }
.pick .d { font-size: 18px; font-weight: 700; }
.pick .meta { font-size: 12.5px; color: var(--app-text-2); }

.reg { background: var(--app-panel); border: 1px solid var(--app-border); border-radius: var(--radius-md); padding: 20px; display: grid; gap: 14px; margin-bottom: 12px; }
.reg .head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.reg .d { font-size: 20px; font-weight: 700; }
.reg .m { font-size: 11.5px; font-weight: 600; letter-spacing: 1.1px; text-transform: uppercase; color: var(--app-muted); }
.reg .pills { display: grid; gap: 6px; justify-items: end; }
/* Numeri dell'iscrizione: come le statistiche dell'app staff. */
/* Righe divisorie sulle celle (non sul fondo della griglia): le celle
   vuote dell'ultima riga restano del colore della superficie. */
.kv { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--app-surface); border: 1px solid var(--app-border); border-radius: var(--radius-sm); overflow: hidden; }
.kv div { padding: 10px 12px; min-width: 0; border-right: 1px solid var(--app-border); border-bottom: 1px solid var(--app-border); margin: 0 -1px -1px 0; }
.kv b { display: block; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.kv span { font-size: 11px; font-weight: 600; color: var(--app-muted); letter-spacing: .8px; text-transform: uppercase; }

.xlbar {
  display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap;
  border: 1px dashed var(--app-border-strong); border-radius: var(--radius-md); padding: 14px 16px; margin-bottom: 12px;
}
.xlbar b { display: block; font-size: 15px; font-weight: 600; }
.xlbar span { color: var(--app-text-2); font-size: 13px; display: block; max-width: 60ch; }
.xlbar label.btn { cursor: pointer; }
.results { margin-bottom: 12px; }
.results table { font-size: 13px; }
.results td.res-error, .results td.res-duplicate { color: var(--danger-ink); }
.results td.res-created, .results td.res-updated { color: var(--success-ink); }
/* Schede "un visitatore / piu' visitatori": come le schede dell'app
   staff, unite al pannello sotto. */
.addtabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px;
  background: var(--app-panel); border: 1px solid var(--app-border); border-bottom: 0;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}
.addtabs button {
  background: transparent; border: 1px solid transparent; color: var(--app-muted); font-family: inherit; font-size: 14px; font-weight: 600;
  padding: 10px 14px; cursor: pointer; text-align: left; min-height: 44px; border-radius: var(--radius-sm);
  transition: background-color .15s, color .15s;
}
.addtabs button:hover { background: var(--hover-soft); color: var(--app-text); }
.addtabs button[aria-selected="true"] { background: var(--brand-dim); color: var(--brand-ink); border-color: rgba(243, 203, 18, .25); }
.addtabs + .q { margin-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; }
.quick { display: grid; grid-template-columns: 1fr 1fr 1.4fr auto; gap: 8px; }
.vhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin: 22px 0 4px; }
.vhead b { display: block; font-size: 17px; font-weight: 700; }
.vhead span { color: var(--app-muted); font-size: 13px; }
.cogrp .mh { border-bottom: 1px solid var(--app-border); }
.gr { border-bottom: 1px solid var(--app-border); }
.grow { display: flex; align-items: center; gap: 10px; }
.gsum {
  flex: 1; display: grid; grid-template-columns: 18px auto minmax(0, 1fr) auto auto; gap: 12px; align-items: center;
  background: none; border: 0; color: var(--app-text); font-family: inherit; font-size: 15px; text-align: left;
  padding: 12px 0; cursor: pointer; min-width: 0; border-radius: var(--radius-sm);
}
.gsum b { font-weight: 600; }
.gsum:hover b { color: var(--brand-ink); }
.gsum .chev { color: var(--brand-ink); font-size: 20px; line-height: 1; transition: transform .15s; }
.gr.open .gsum .chev { transform: rotate(90deg); }
.gsum .ge { color: var(--app-muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gsum .hint { font-size: 12px; font-weight: 600; color: var(--app-muted); }
.gdet { display: grid; gap: 12px; padding: 4px 0 18px 30px; }
.gmiss { font-size: 13px; color: var(--warning-ink); margin: 0; }

.summary dl { display: grid; grid-template-columns: 180px 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.summary dt { color: var(--app-muted); font-size: 11.5px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; padding-top: 3px; }
.summary dd { margin: 0; color: var(--app-text); min-width: 0; overflow-wrap: anywhere; }
.privacy-text {
  font-size: 13.5px; color: var(--app-text-2); white-space: pre-wrap; max-height: 220px; overflow: auto;
  border: 1px solid var(--app-border); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--app-surface); margin: 0;
}
.privacy-text.placeholder { color: var(--warning-ink); border-color: var(--warning); font-weight: 600; }
.consent { display: grid; gap: 8px; border-top: 1px solid var(--app-border); padding-top: 12px; }
.consent:first-of-type { border-top: 0; padding-top: 0; }
.consent .ch { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.consent .ch b { font-size: 15px; font-weight: 600; }
.consent .tag { font-size: 11px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: var(--app-muted); }
.consent .tag.req { color: var(--danger-ink); }

/* ---------- pagina del visitatore ---------- */
/* Fascia su foto: scura in entrambi i temi (token scuri sopra). */
.ghero {
  padding-block: 70px 40px; color: var(--app-text); background-color: var(--prolights-night);
  background-image: linear-gradient(90deg, rgba(20, 20, 20, .92), rgba(20, 20, 20, .55)), url(inside/img/showroom-desks.jpg);
  background-position: center; background-size: cover;
}
.ghero h1 { font-size: clamp(28px, 4.4vw, 44px); }
.ghero .lede { color: var(--app-text-2); font-size: 16px; max-width: 60ch; margin: 0; }
.stay { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--app-border); border: 1px solid var(--app-border); border-radius: var(--radius-sm); overflow: hidden; }
.stay div { background: var(--app-surface); padding: 10px 12px; min-width: 0; }
.stay span { display: block; font-size: 11px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: var(--app-muted); }
.stay b { font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
.done-box { text-align: center; padding: 36px 20px; }

/* Toast: flottante (livello 2), come .toast dell'app staff. */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  background: var(--app-panel); color: var(--app-text); border: 1px solid var(--app-border-strong); border-left: 3px solid var(--brand);
  border-radius: var(--radius-md); box-shadow: var(--shadow-float);
  padding: 12px 16px; font-weight: 600; font-size: 14px; z-index: 80; max-width: calc(100% - 32px);
}
.spin { padding: 48px 0; color: var(--app-muted); font-size: 13px; }

/* ---------- schermi stretti ---------- */
@media (max-width: 900px) {
  .srgrid, .feat { grid-template-columns: 1fr; }
  .srtext { padding: 8px 0; }
  .three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .days { grid-template-columns: 1fr; }
  nav.top .links { display: none; }
  .fph { min-height: 180px; background: url(inside/img/showroom-desks.jpg) center / cover; }
}
@media (max-width: 700px) {
  .quick { grid-template-columns: 1fr 1fr; }
  .quick .btn { grid-column: span 2; }
  .gsum { grid-template-columns: 18px 1fr; row-gap: 4px; }
  .gsum .ge, .gsum .pill, .gsum .hint { grid-column: 2; justify-self: start; }
  .grow { flex-wrap: wrap; }
  .grow .btn { margin: 0 0 10px 30px; }
  .gdet { padding-left: 0; }
}
@media (max-width: 600px) {
  .hero { padding-block: 56px 0; background: linear-gradient(0deg, var(--prolights-night) 8%, rgba(20, 20, 20, .66) 60%, rgba(20, 20, 20, .42) 100%), url(inside/img/hero.jpg) center / cover no-repeat; }
  .hero .in.hf { padding-bottom: 64px; }
  nav.top .in { gap: 6px; padding-block: 8px; }
  nav.top .right { gap: 6px; }
  nav.top .logo img, nav.top .logo svg { width: 96px; }
  /* Lingua e tema: 44px per il tocco. */
  .lang button { padding: 6px 7px; gap: 4px; min-height: 40px; }
  .lang button span { display: none; }
  .theme-btn { width: 44px; height: 44px; }
  nav.top .right .btn { padding: 6px 9px; font-size: 12px; min-height: 44px; }
  nav.top .right .linkbtn { padding: 6px 4px; font-size: 12px; min-height: 44px; }
  input.free, select.free, textarea.free { font-size: 16px; }
  .three, .two, .grid2, .grid3, .pickgrid, .addtabs { grid-template-columns: 1fr; }
  .kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary dl { grid-template-columns: 1fr; }
  .steps button { font-size: 0; padding-top: 6px; }
  .steps button .n { font-size: 12px; }
  section.block { padding-block: 44px; }
  .lrow { grid-template-columns: 48px 1fr; }
  .lrow .btn, .lrow .pill { grid-column: 2; justify-self: start; }
  .reg .pills { justify-items: start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* Staff nel portale: scelta del distributore e fascia dell'anteprima.
   Fascia gialla: testo Night in entrambi i temi. */
.staff-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 18px; }
.staff-banner { background: var(--brand); color: var(--prolights-night); font-size: 13px; }
.staff-banner .in { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: space-between; align-items: center; padding-top: 8px; padding-bottom: 8px; }
.staff-banner .linkbtn { color: var(--prolights-night); text-decoration: underline; }
.staff-banner .linkbtn:hover { background: rgba(20, 20, 20, .1); color: var(--prolights-night); }
.staff-banner .linkbtn:focus-visible { box-shadow: 0 0 0 3px rgba(20, 20, 20, .45); }
.staff-banner .acts { display: inline-flex; gap: 14px; }

/* My registrations: pulsanti ai singoli passi. */
.steps-go { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }

/* Anteprima dell'invito: dialog (livello 2) come .modal dell'app staff. */
.mail-preview { position: fixed; inset: 0; z-index: 90; background: var(--dialog-mask); display: flex; align-items: center; justify-content: center; padding: 16px; }
.mail-preview .box {
  background: var(--app-panel); border: 1px solid var(--app-border-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow-float);
  width: 100%; max-width: 680px; max-height: 92vh; display: flex; flex-direction: column; padding: 14px;
}
.mail-preview .bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.mail-preview .subj { margin: 0 0 8px; color: var(--app-text-2); font-size: 13.5px; }
.mail-preview iframe { width: 100%; flex: 1; min-height: 60vh; border: 0; border-radius: var(--radius-sm); background: #e9e9e6; }
