/* ============================================================
   Mandrions Restaurant Suite — Design System Base (Fase 0)
   Generato da IAMC
   Fonte: DESIGN.md + README.md (decisioni confermate 2025-10-13)
   Rapporto visivo: 70% bianco/off-white · 20% navy/petrolio · 8% teal · 2% rame
   ============================================================ */

/* ---------- 1. Token ---------- */
:root {
  /* Colore */
  --navy: #000000;
  --petrolio: #000000;
  --teal: #000000;
  --teal-hover: #1c1c1c;
  --off-white: #f7f7f7;
  --white: #FFFFFF;
  --text-2nd: #5a5a5a;
  --border: #d8d8d8;
  --rame: #006aff;
  --error: #B3261E;
  --error-bg: rgba(179, 38, 30, 0.10);
  --success: #000000;
  --success-bg: rgba(21, 94, 99, 0.08);

  /* Tipografia */
  --font-sans: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --fs-base: 16px;          /* testo principale >= 16px */
  --fs-sm: 14px;
  --fs-xs: 12px;
  /* V5 (QA-visiva): H1/H2/H3 ridotti — gestionale sobrio, rapporto 1:2 col resto del testo */
  --fs-h1: clamp(1.5rem, 3vw, 2rem);
  --fs-h2: clamp(1.25rem, 2.5vw, 1.5rem);
  --fs-h3: clamp(1.125rem, 2vw, 1.25rem);
  --lh-tight: 1.25;
  --lh-base: 1.55;
  --lh-relaxed: 1.7;
  --max-line: 68ch;

  /* Spaziatura (scala 4-8) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 16px;
  --sp-4: 24px;
  --sp-5: 32px;
  --sp-6: 48px;
  --sp-7: 64px;

  /* Bordi (stile corporate, radius ridotto) — usare SOLO i 4 token: sm/md/lg/pill */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  /* Ombre molto leggere — usare SOLO i 3 token: sm/md/lg */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 2px 8px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 8px 24px rgba(15, 23, 42, 0.10);

  /* Touch / layout */
  --touch: 44px;                       /* area minima toccabile 44x44 */
  /* V7 (QA-visiva): contenuto 1280px — a 1024px il content usa meglio la larghezza (P3/P6) */
  --content-w: 1280px;
  --nav-w: 240px;
  --focus-ring: 0 0 0 3px rgba(15, 118, 110, 0.35);
}

/* ---------- 2. Reset minimale ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--navy);
  background: var(--off-white);
  -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  color: var(--navy);
  line-height: var(--lh-tight);
  margin: 0 0 var(--sp-3);
  letter-spacing: -0.01em;
}
h1 { font-size: var(--fs-h1); font-weight: 700; }
h2 { font-size: var(--fs-h2); font-weight: 700; }
h3 { font-size: var(--fs-h3); font-weight: 600; }

p { margin: 0 0 var(--sp-3); max-width: var(--max-line); }

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-hover); }

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

/* ---------- 3. Layout: shell + griglie ---------- */
.shell {
  display: flex;
  min-height: 100dvh;
}
.shell__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.page {
  width: 100%;
  max-width: var(--content-w);
  margin: 0 auto;
  padding: var(--sp-4) var(--sp-3) var(--sp-6);
}
.page--narrow { max-width: 640px; }

.grid {
  display: grid;
  gap: var(--sp-4);
}
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--auto { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* Pannello affiancato (tablet) */
.split {
  display: grid;
  gap: var(--sp-5);
  align-items: start;
}

/* ---------- 4. Header / barra locale ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-3);
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.topbar__brand {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--navy);
  font-weight: 700;
}
.topbar__logo-ph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: 1.5px dashed var(--rame);
  border-radius: var(--radius-md);
  color: var(--rame);
  font-size: var(--fs-xs);
  font-weight: 600;
}
.topbar__actions { display: flex; gap: var(--sp-2); }

/* ---------- 4b. Hamburger button — Generato da IAMC ---------- */
.hamburger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--touch);
  height: var(--touch);
  background: none;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  flex: none;
  transition: border-color .15s ease, background-color .15s ease;
}
.hamburger:hover { border-color: var(--petrolio); background: var(--off-white); }
.hamburger__lines {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 18px;
}
.hamburger__lines span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--navy);
  border-radius: 1px;
  transition: background-color .15s ease;
}
.hamburger:hover .hamburger__lines span { background: var(--petrolio); }

/* ---------- 4c. Sidebar menu (.menu-side) — Generato da IAMC ---------- */
/* Menu laterale a sinistra, visibile solo quando aperto (body.menu-open). */
.menu-side {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(280px, 85vw);
  background: var(--white);
  border-right: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  z-index: 60;
  display: none;
  flex-direction: column;
  padding: var(--sp-4) 0;
  overflow-y: auto;
}
.menu-side.open { display: flex; }
.menu-side__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--sp-4) var(--sp-3);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-3);
}
.menu-side__titolo {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.menu-side__chiudi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--touch);
  height: var(--touch);
  background: none;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: var(--fs-base);
  color: var(--text-2nd);
  flex: none;
  transition: border-color .15s ease;
}
.menu-side__chiudi:hover { border-color: var(--petrolio); color: var(--petrolio); }
.menu-side__links {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  padding: 0 var(--sp-2);
  flex: 1;
}
.menu-side__links a {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: var(--touch);
  padding: 0 var(--sp-3);
  border-radius: var(--radius-md);
  color: var(--text-2nd);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.menu-side__links a:hover { background: var(--off-white); color: var(--petrolio); }
.menu-side__links a[aria-current="page"] { background: var(--petrolio); color: var(--white); }
.menu-side__links a[aria-current="page"]:hover { color: var(--white); }
.menu-side__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--off-white);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--navy);
  flex: none;
}
.menu-side__links a[aria-current="page"] .menu-side__num { background: rgba(255,255,255,.25); color: var(--white); }
.menu-side__etichetta { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 4d. Icona informativa + modale — Generato da IAMC ---------- */
/* Icona "i" con badge rosso conteggio: apre una modale con le informative della pagina. */
.info-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text-2nd);
  font-size: var(--fs-sm);
  font-weight: 700;
  cursor: pointer;
  flex: none;
  transition: border-color .15s ease, color .15s ease;
}
.info-btn:hover { border-color: var(--teal); color: var(--teal); }
.suite-module-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 7px clamp(14px, 3vw, 38px);
  border-bottom: 1px solid var(--border);
  background: var(--white);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.suite-module-nav::-webkit-scrollbar { display: none; }
.suite-module-nav a {
  display: inline-flex;
  align-items: center;
  flex: none;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 11px;
  color: var(--text-2nd);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.suite-module-nav a:hover { color: var(--navy); background: var(--off-white); }
.suite-module-nav a[aria-current="page"] { color: var(--petrolio); background: var(--success-bg); }
.info-btn__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--error);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  padding: 0 4px;
}
/* Modale informative */
.info-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
}
.info-modal.open { display: flex; }
.info-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
}
.info-modal__box {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 640px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: var(--sp-6);
}
.info-modal__titolo {
  font-size: var(--fs-h2);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: var(--sp-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.info-modal__chiudi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--touch);
  height: var(--touch);
  background: none;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: var(--fs-base);
  color: var(--text-2nd);
  flex: none;
}
.info-modal__chiudi:hover { border-color: var(--petrolio); color: var(--petrolio); }
.info-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-base);
  color: var(--navy);
  line-height: var(--lh-base);
}
.info-item:last-child { border-bottom: none; }
.info-item__icona {
  flex: none;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--off-white);
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--teal);
  font-weight: 700;
}

/* ---------- 5. Card ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-4);
}
.card--flush { padding: 0; overflow: hidden; }
.card--flush > :first-child { border-top: none; }
.card__title {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-2nd);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--sp-3);
}
.card__body { margin: 0; }

/* ---------- 6. Bottoni (CTA) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: var(--touch);
  min-width: var(--touch);
  padding: 0 var(--sp-4);
  font-family: inherit;
  font-size: var(--fs-base);
  font-weight: 600;
  line-height: 1;
  border: 1.5px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
  user-select: none;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn--primary { background: var(--teal); color: var(--white); }
.btn--primary:hover:not(:disabled) { background: var(--teal-hover); }

.btn--secondary { background: var(--white); color: var(--petrolio); border-color: var(--petrolio); }
.btn--secondary:hover:not(:disabled) { background: var(--petrolio); color: var(--white); }

.btn--ghost { background: transparent; color: var(--text-2nd); border-color: var(--border); }
.btn--ghost:hover:not(:disabled) { border-color: var(--petrolio); color: var(--petrolio); }

.btn--danger { background: var(--white); color: var(--error); border-color: var(--error); }
.btn--danger:hover:not(:disabled) { background: var(--error); color: var(--white); }

.btn--block { width: 100%; }
/* Generato da IAMC — .btn--sm mantiene look compatto ma rispetta il tap target (A1) */
.btn--sm { min-height: var(--touch); padding: 0 var(--sp-3); font-size: var(--fs-sm); }

.btn--ghost--on-navy { color: rgba(255, 255, 255, .85); border-color: rgba(255, 255, 255, .4); }
.btn--ghost--on-navy:hover:not(:disabled) { border-color: var(--white); color: var(--white); }

/* ---------- 7. Form ---------- */
.field { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.field label { font-size: var(--fs-sm); font-weight: 600; color: var(--navy); }
.field input,
.field select,
.field textarea {
  min-height: var(--touch);
  padding: 0 var(--sp-3);
  font-family: inherit;
  font-size: var(--fs-base);
  color: var(--navy);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
}
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--teal); box-shadow: var(--focus-ring); }
.field--error input,
.field--error select { border-color: var(--error); }
.field__hint { font-size: var(--fs-xs); color: var(--text-2nd); }

/* ---------- 8. Badge, stato, tab ---------- */
/* .badge--* per stati generici e riutilizzabili (es. "Demo dimostrativa", "Facoltativo", "Disponibile").
   .stato--* per lo stato di ciclo di vita di una consegna/ordine/comanda
   (Ricevuto → In preparazione → Pronto → Completato). */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: var(--fs-xs);
  font-weight: 600;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
}
.badge--ok { background: rgba(21, 94, 99, 0.10); color: var(--petrolio); }
.badge--warn { background: rgba(166, 106, 67, 0.14); color: var(--rame); }
.badge--info { background: rgba(15, 118, 110, 0.10); color: var(--teal); }
.badge--muted { background: var(--off-white); color: var(--text-2nd); border-color: var(--border); }

.stato {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: 600;
}
.stato--ricevuto { background: rgba(15,118,110,.12); color: var(--teal); }
.stato--preparazione { background: rgba(166,106,67,.15); color: var(--rame); }
.stato--pronto { background: rgba(21,94,99,.14); color: var(--petrolio); }
.stato--completato { background: var(--off-white); color: var(--text-2nd); }

.tabs {
  display: flex;
  gap: var(--sp-1);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-4);
  overflow-x: auto;
}
.tab {
  min-height: var(--touch);
  padding: 0 var(--sp-3);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-2nd);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.tab[aria-selected="true"] { color: var(--petrolio); border-bottom-color: var(--teal); }

/* ---------- 9. Elenco / tabella dati ---------- */
.dati { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.dati th, .dati td {
  text-align: left;
  padding: 12px var(--sp-3);
  border-bottom: 1px solid var(--border);
}
.dati th { font-weight: 600; color: var(--text-2nd); text-transform: uppercase; font-size: var(--fs-xs); letter-spacing: .04em; }
.dati tr:last-child td { border-bottom: none; }
.dati .right { text-align: right; }

.lista { list-style: none; margin: 0; padding: 0; }
.lista li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.lista li:last-child { border-bottom: none; }

/* ---------- 10. Marker 📦 interconnessione modulare ---------- */
.marker-modulo {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  padding: var(--sp-3);
  margin: var(--sp-4) 0;
  background: var(--white);
  border: 1.5px dashed var(--rame);
  border-left: 4px solid var(--rame);
  border-radius: var(--radius-md);
}
.marker-modulo__icone {
  flex: none;
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.marker-modulo__testo { font-size: var(--fs-sm); color: var(--navy); }
.marker-modulo__testo strong { color: var(--rame); }
.marker-modulo a { font-weight: 600; }

/* ---------- 11. Strumenti demo (rappresentante) — Generato da IAMC (fix QA-visiva V1/V2/V3) ---------- */
.demo-toolbar {
  position: fixed;
  inset: auto 0 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  background: var(--navy);
  color: var(--white);
  font-size: var(--fs-xs);
  z-index: 50;
  flex-wrap: wrap;
}
/* V3: su smartphone (≤640) 1 riga compatta — niente wrap a 2 righe (139px) */
@media (max-width: 640px) {
  .demo-toolbar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: var(--sp-2);
    max-height: 56px;
  }
  .demo-toolbar::-webkit-scrollbar { display: none; }
  .demo-toolbar__label { flex: 1 1 0; min-width: 0; }
  .demo-toolbar__label span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .demo-toolbar__azioni { flex: 0 0 auto; flex-wrap: nowrap; }
}
.demo-toolbar__label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.demo-toolbar__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rame); flex: none; }
.demo-toolbar__azioni { display: flex; gap: var(--sp-2); flex-wrap: wrap; }

/* V1: scrim — copre il resto della pagina quando un .demo-panel è aperto (z tra toolbar=50 e pannello=60) */
.demo-scrim {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  z-index: 55;
  display: none;
}
.demo-scrim.open { display: block; }

/* Pannello: desktop (>1024) resta a destra, sopra la toolbar */
.demo-panel {
  position: fixed;
  right: var(--sp-3);
  bottom: 56px;
  width: min(320px, calc(100vw - 24px));
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-4);
  z-index: 60;
  display: none;
}
/* V1: su mobile/tablet (≤1023) bottom-sheet full-width, alto max 70vh con scroll.
   A 1024+ il pannello resta a destra con scrim (regola base .demo-panel). */
@media (max-width: 1023px) {
  .demo-panel {
    position: fixed !important;
    inset: auto 0 0 0 !important;
    right: 0 !important;
    left: 0 !important;
    top: auto !important;
    width: 100% !important;
    max-height: 70vh !important;
    overflow-y: auto !important;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
    border-left: none;
    border-right: none;
    border-bottom: none;
  }
}
/* V2: il bottom-sheet resta sopra la demo-toolbar (56px) per non coprirla */
@media (max-width: 1023px) {
  body.has-demo-toolbar .demo-panel { bottom: 56px !important; }
}
.demo-panel.open { display: block; }
.demo-panel h3 { margin-bottom: var(--sp-3); font-size: var(--fs-base); }
.demo-panel__row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.demo-panel__row:last-child { margin-bottom: 0; }

/* ---------- 12. Utility ---------- */
.spazio-1 { margin-bottom: var(--sp-1); }
.spazio-2 { margin-bottom: var(--sp-2); }
.spazio-3 { margin-bottom: var(--sp-3); }
.spazio-4 { margin-bottom: var(--sp-4); }
.spazio-5 { margin-bottom: var(--sp-5); }
.spazio-6 { margin-bottom: var(--sp-6); }
.spazio-auto { margin-bottom: auto; }
.testo-2nd { color: var(--text-2nd); }
.testo-centro { text-align: center; }
.fle { display: flex; align-items: center; gap: var(--sp-2); }
.fle-spazio { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.nascosto { display: none !important; }

/* Spazio in fondo per la demo-toolbar fissa — V3: 56px (toolbar a 1 riga su mobile) */
body.has-demo-toolbar .page { padding-bottom: calc(var(--sp-6) + 56px); }

/* ---------- 13. Responsive: tablet (768–1024) ---------- */
@media (min-width: 768px) {
  .page { padding: var(--sp-5) var(--sp-5) var(--sp-7); }
  .split { grid-template-columns: 1.2fr 1fr; }
  /* .grid--2--stack: variante tablet→mobile, usata solo da demo-home per card affiancate */
  .grid--2--stack { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- 14. Responsive: smartphone (360–430) ---------- */
@media (max-width: 640px) {
  :root { --fs-h1: 1.6rem; --fs-h2: 1.3rem; }
  .page { padding: var(--sp-3) var(--sp-3) var(--sp-6); }
  /* Collasso deterministico a 1 colonna su smartphone (incl. .grid--auto) */
  .grid--2, .grid--3, .grid--4, .grid--auto { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .topbar { flex-wrap: wrap; }
  /* .dati: tabelle dense — su smartphone evitare >3 colonne, usare .lista o card */
  .dati { font-size: var(--fs-xs); }
  .dati th, .dati td { padding: 10px var(--sp-2); }
}

/* ---------- 15. Preferenza movimento ridotto ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Informative: modale compatta e leggibile su telefoni. */
@media (max-width: 600px) {
  .info-modal { padding: max(10px, env(safe-area-inset-left)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)); align-items: flex-end; }
  .info-modal__box { width: 100%; max-width: none; max-height: min(88dvh, 720px); padding: 22px 18px calc(18px + env(safe-area-inset-bottom)); border-radius: 20px 20px 14px 14px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .info-modal__titolo { min-height: 44px; margin: 0 48px 12px 0; font-size: clamp(1.15rem, 5vw, 1.35rem); line-height: 1.2; }
  .info-modal__chiudi { position: absolute; top: 12px; right: 12px; z-index: 2; width: 44px; height: 44px; background: var(--white); }
  .info-item { gap: 10px; padding: 14px 0; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
  .info-item__icona { width: 26px; height: 26px; }
}


/* Galleria: anteprima immersiva e controlli utilizzabili anche al tocco. */
.gallery-zoom-area { position: relative; }
.gallery-zoom-trigger { position:absolute; inset:0; z-index:2; width:100%; height:100%; padding:0; border:0; background:transparent; cursor:zoom-in; }
.gallery-zoom-trigger::after { content:"⤢"; position:absolute; top:10px; right:10px; display:grid; place-items:center; width:38px; height:38px; border:1px solid rgba(255,255,255,.72); border-radius:50%; background:rgba(14,32,34,.76); color:#fff; font-size:21px; box-shadow:0 3px 12px rgba(0,0,0,.22); transition:transform .18s ease,background .18s ease; }
.gallery-zoom-trigger:hover::after,.gallery-zoom-trigger:focus-visible::after { transform:scale(1.08); background:#102d34; }
.gallery-zoom-trigger:focus-visible { outline:3px solid #d89c68; outline-offset:-4px; }
.gallery-lightbox { position:fixed; inset:0; z-index:200; display:none; align-items:center; justify-content:center; padding:20px; }
.gallery-lightbox.open { display:flex; }
.gallery-lightbox__backdrop { position:absolute; inset:0; width:100%; height:100%; border:0; background:rgba(7,16,18,.94); backdrop-filter:blur(8px); cursor:zoom-out; }
.gallery-lightbox__panel { position:relative; z-index:1; display:flex; width:min(96vw,1200px); height:min(94dvh,1000px); align-items:center; justify-content:center; padding:52px 10px 44px; }
.gallery-lightbox__image { display:block; max-width:100%; max-height:100%; object-fit:contain; border-radius:5px; box-shadow:0 24px 80px rgba(0,0,0,.48); }
.gallery-lightbox__close { position:absolute; top:0; right:0; display:flex; min-width:102px; min-height:44px; align-items:center; justify-content:center; gap:10px; padding:8px 14px; border:1px solid rgba(255,255,255,.34); border-radius:999px; background:rgba(255,255,255,.12); color:#fff; font:inherit; font-size:14px; font-weight:600; cursor:pointer; }
.gallery-lightbox__close span { font-size:22px; line-height:1; }
.gallery-lightbox__caption { position:absolute; right:8px; bottom:0; left:8px; margin:0; color:rgba(255,255,255,.8); font-size:13px; text-align:center; }
body.gallery-lightbox-open { overflow:hidden; }
@media(max-width:600px) { .gallery-lightbox { padding:0; } .gallery-lightbox__panel { width:100%; height:100dvh; padding:66px 0 calc(48px + env(safe-area-inset-bottom)); } .gallery-lightbox__image { max-width:100vw; max-height:calc(100dvh - 120px); border-radius:0; } .gallery-lightbox__close { top:max(12px,env(safe-area-inset-top)); right:14px; min-height:46px; background:rgba(255,255,255,.16); } .gallery-lightbox__caption { bottom:max(15px,env(safe-area-inset-bottom)); } }


/* Callout di supporto alla presentazione commerciale, distinti dalle informative tecniche. */
.sales-callout { display:grid; grid-template-columns:42px minmax(0,1fr); align-items:center; gap:13px; margin:0 0 var(--sp-4); padding:14px 17px; border:1px solid #ead8c3; border-left:4px solid #006aff; border-radius:14px; background:linear-gradient(105deg,#fff7ea,#ffffff 72%); box-shadow:0 5px 18px rgba(69,49,31,.055); }
.sales-callout__mark { display:grid; width:40px; height:40px; place-items:center; border-radius:12px; background:#f0dfc9; color:#744a2e; font-size:19px; }
.sales-callout__kicker { display:block; margin-bottom:4px; color:#8c5634; font-size:10px; font-weight:800; letter-spacing:.13em; text-transform:uppercase; }
.sales-callout p { margin:0; color:#3f4846; font-size:13px; line-height:1.5; }
@media(max-width:600px){ .sales-callout { grid-template-columns:34px minmax(0,1fr); gap:10px; padding:12px; } .sales-callout__mark { width:34px;height:34px;border-radius:10px;font-size:16px; } .sales-callout p { font-size:12px; line-height:1.45; } }

/* Icone leggere per rendere riconoscibili le azioni ricorrenti senza togliere le etichette. */
.azione-icona{display:inline-block;width:1em;height:1em;max-width:none;flex:0 0 auto;margin-right:.45em;vertical-align:-.17em;pointer-events:none}
button[data-azione-icona],a[data-azione-icona],[role="button"][data-azione-icona]{align-items:center}
input[type="search"]{padding-left:38px!important;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%235a5a5a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10.8' cy='10.8' r='6.8'/%3E%3Cpath d='m16 16 5 5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:12px center}
