/* ============================================================
   OfficinaAI — Design System condiviso
   Piattaforma demo per officine e carrozzerie
   Tema chiaro, ottimizzato per portatile e proiettore.
   Tutto personalizzabile dalle variabili qui sotto.
   ============================================================ */

:root {
  /* Marchio (cambia qui per fare il rebrand) */
  --brand: #3b5bdb;
  --brand-dark: #2c46ad;
  --brand-light: #e8edff;
  --accent: #16a34a;       /* verde "fatto / valore" */
  --whatsapp: #25d366;     /* verde chat */
  --whatsapp-bg: #e6f7ee;
  --warn: #d97706;
  --danger: #dc2626;

  /* Neutri */
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-soft: #eef2f7;
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;

  /* Forma */
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 20px;
  --r-pill: 999px;

  /* Ombre */
  --sh-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --sh: 0 6px 20px rgba(15, 23, 42, .08);
  --sh-lg: 0 18px 50px rgba(15, 23, 42, .14);

  /* Tipografia */
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
/* Rete di sicurezza: ogni icona SVG senza dimensione esplicita resta piccola
   (le regole con classe qui sotto la sovrascrivono dove serve più grande). */
svg { width: 1em; height: 1em; display: inline-block; vertical-align: middle; }

/* ---------- Layout di pagina ---------- */
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  display: flex; align-items: center; gap: 16px;
  height: 64px;
}
.brand {
  display: flex; align-items: center; gap: 11px;
  font-weight: 800; font-size: 19px; letter-spacing: -.02em; color: var(--ink);
}
.brand__logo {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--brand), #6d8bff);
  display: grid; place-items: center; color: #fff;
  box-shadow: var(--sh-sm);
  flex: 0 0 auto;
}
.brand__logo svg { width: 22px; height: 22px; }
.brand b { color: var(--brand); }
.topbar__sep { width: 1px; height: 26px; background: var(--line); }
.topbar__module { font-weight: 650; color: var(--ink-soft); font-size: 15px; }
.topbar__spacer { flex: 1; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  background: var(--brand-light); color: var(--brand-dark);
}
.badge--demo { background: #fff4e5; color: #b45309; }
.badge--live { background: #e7f8ee; color: #15803d; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge--live .dot { animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--r-pill);
  border: 1px solid transparent; background: var(--brand); color: #fff;
  font-weight: 650; font-size: 14px; line-height: 1;
  transition: transform .08s ease, box-shadow .15s ease, background .15s ease;
  box-shadow: var(--sh-sm);
}
.btn:hover { background: var(--brand-dark); }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--ink-soft); border-color: var(--line); box-shadow: none; }
.btn--ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn--soft { background: var(--brand-light); color: var(--brand-dark); box-shadow: none; }
.btn--soft:hover { background: #dbe3ff; }
.btn svg { width: 16px; height: 16px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Home / launcher ---------- */
.hero { padding: 54px 0 18px; }
.hero__kicker {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--brand-dark); background: var(--brand-light);
  padding: 6px 13px; border-radius: var(--r-pill); font-weight: 700; font-size: 13px;
  margin-bottom: 18px; white-space: nowrap;
}
.hero__kicker svg { width: 16px; height: 16px; flex: 0 0 auto; }
.hero__title {
  font-size: 42px; line-height: 1.08; letter-spacing: -.03em; margin: 0 0 14px;
  font-weight: 820; max-width: 18ch;
}
.hero__title span { color: var(--brand); }
.hero__sub { font-size: 18px; color: var(--muted); max-width: 60ch; margin: 0; }

.section-label {
  display: flex; align-items: center; gap: 12px;
  margin: 40px 0 18px; color: var(--muted); font-weight: 700;
  font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
}
.section-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.modules {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  padding-bottom: 60px;
}
.module-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 22px; min-height: 196px;
  transition: transform .12s ease, box-shadow .18s ease, border-color .18s;
}
.module-card--active { cursor: pointer; }
.module-card--active:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); border-color: #c7d2fe; }
.module-card--soon { opacity: .82; }
.module-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.module-card__icon {
  width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center;
  background: var(--brand-light); color: var(--brand); margin-bottom: 16px;
}
.module-card__icon svg { width: 27px; height: 27px; }
.module-card__num {
  font-size: 13px; font-weight: 800; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--line);
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
}
.module-card__title { font-size: 18px; font-weight: 750; margin: 0 0 6px; letter-spacing: -.01em; }
.module-card__desc { font-size: 14px; color: var(--muted); margin: 0; flex: 1; }
.module-card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.status-pill {
  font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: var(--r-pill);
  display: inline-flex; align-items: center; gap: 6px;
}
.status-pill svg { width: 14px; height: 14px; flex: 0 0 auto; }
.status-pill--active { background: #e7f8ee; color: #15803d; }
.status-pill--soon { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.module-card__cta { color: var(--brand); font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 5px; }
.module-card--active:hover .module-card__cta svg { transform: translateX(3px); }
.module-card__cta svg { width: 15px; height: 15px; transition: transform .15s; }

.home-foot { padding: 0 0 50px; color: var(--muted); font-size: 13px; text-align: center; }

/* ============================================================
   DEMO CENTRALINO
   ============================================================ */
.demo-intro { padding: 26px 0 6px; }
.demo-intro__title { font-size: 27px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 6px; }
.demo-intro__sub { color: var(--muted); margin: 0; max-width: 70ch; font-size: 15px; }

/* Barra scenari */
.scenario-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 12px; margin: 18px 0 22px; box-shadow: var(--sh-sm);
}
.scenario-bar__label { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-right: 2px; }
.scenario-btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 14px; border-radius: var(--r-pill); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-soft); font-weight: 650; font-size: 13.5px;
  transition: all .14s ease;
}
.scenario-btn:hover { border-color: #c7d2fe; background: var(--surface-2); }
.scenario-btn.is-active { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: var(--sh-sm); }
.scenario-btn__n {
  width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand-light); color: var(--brand-dark); font-size: 11px; font-weight: 800; flex: 0 0 auto;
}
.scenario-btn.is-active .scenario-btn__n { background: rgba(255,255,255,.25); color: #fff; }
.scenario-bar__spacer { flex: 1; }

/* Palco a due colonne */
.stage { display: grid; grid-template-columns: 380px 1fr; gap: 24px; padding-bottom: 60px; align-items: start; }

/* ---------- Telefono / WhatsApp ---------- */
.phone {
  background: #0b141a; border-radius: 30px; padding: 11px;
  box-shadow: var(--sh-lg); position: sticky; top: 88px;
}
.phone__screen { background: #e9e2db; border-radius: 21px; overflow: hidden; display: flex; flex-direction: column; height: 620px; }
.phone__bar {
  background: var(--whatsapp); color: #fff; display: flex; align-items: center; gap: 11px;
  padding: 12px 14px; flex: 0 0 auto;
}
.phone__avatar {
  width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.22);
  display: grid; place-items: center; font-weight: 800; flex: 0 0 auto; font-size: 15px;
}
.phone__id { line-height: 1.25; min-width: 0; }
.phone__name { font-weight: 700; font-size: 15px; }
.phone__status { font-size: 12px; opacity: .9; display: flex; align-items: center; gap: 5px; }
.phone__status .dot { width: 6px; height: 6px; border-radius: 50%; background: #d6ffe2; }
.phone__bar-ico { margin-left: auto; display: flex; gap: 16px; opacity: .92; }
.phone__bar-ico svg { width: 19px; height: 19px; }

.chat {
  flex: 1; overflow-y: auto; padding: 14px 12px 6px;
  background-color: #d9d2c9;
  background-image:
    radial-gradient(rgba(255,255,255,.4) 1px, transparent 0),
    radial-gradient(rgba(0,0,0,.02) 1px, transparent 0);
  background-size: 22px 22px, 22px 22px;
  background-position: 0 0, 11px 11px;
  display: flex; flex-direction: column; gap: 8px;
}
.chat__day {
  align-self: center; background: #d3e3f1; color: #5a6b78;
  font-size: 11.5px; font-weight: 600; padding: 4px 11px; border-radius: 8px; margin: 4px 0;
  box-shadow: var(--sh-sm);
}
.msg {
  max-width: 80%; padding: 8px 11px 6px; border-radius: 9px; font-size: 14px;
  box-shadow: 0 1px .5px rgba(0,0,0,.13); position: relative; white-space: pre-wrap; word-wrap: break-word;
  animation: pop .22s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
.msg--ai { align-self: flex-start; background: #fff; border-top-left-radius: 2px; }
.msg--customer { align-self: flex-end; background: #d9fdd3; border-top-right-radius: 2px; }
.msg--system {
  align-self: center; background: #fff7d6; color: #7a5b00; font-size: 12.5px;
  text-align: center; max-width: 88%; box-shadow: var(--sh-sm); border-radius: 8px; padding: 7px 12px;
}
.msg--system b { color: #5c4400; }
.msg__meta { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 2px; }
.msg__time { font-size: 10.5px; color: #667781; }
.msg__tick { width: 15px; height: 11px; color: #53bdeb; }
.msg__aitag {
  display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700;
  color: var(--brand); background: var(--brand-light); padding: 1px 6px; border-radius: 6px; margin-bottom: 4px;
}
.msg__aitag svg { width: 11px; height: 11px; }

.typing { align-self: flex-start; background: #fff; border-radius: 9px; border-top-left-radius: 2px; padding: 11px 13px; box-shadow: 0 1px .5px rgba(0,0,0,.13); }
.typing span { display: inline-block; width: 7px; height: 7px; margin: 0 2px; border-radius: 50%; background: #9aa6ad; animation: blink 1.3s infinite both; }
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,80%,100%{opacity:.3; transform: translateY(0)} 40%{opacity:1; transform: translateY(-3px)} }

.callbanner {
  align-self: stretch; background: #fff; border-radius: 9px; padding: 10px 12px;
  display: flex; align-items: center; gap: 10px; box-shadow: 0 1px .5px rgba(0,0,0,.13);
  border-left: 3px solid var(--danger); animation: pop .22s ease;
}
.callbanner__ico { width: 34px; height: 34px; border-radius: 50%; background: #fde8e8; color: var(--danger); display: grid; place-items: center; flex: 0 0 auto; }
.callbanner__ico svg { width: 17px; height: 17px; }
.callbanner__txt { font-size: 13px; line-height: 1.3; }
.callbanner__txt b { display: block; color: var(--danger); }
.callbanner__time { font-size: 11px; color: var(--muted); }

/* Composer */
.composer { flex: 0 0 auto; background: #f0f0f0; padding: 9px 10px; border-top: 1px solid #d9d2c9; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 9px; }
.chip {
  font-size: 12.5px; font-weight: 600; padding: 7px 12px; border-radius: var(--r-pill);
  background: #fff; border: 1px solid #cfd8dc; color: var(--ink-soft); transition: all .12s;
}
.chip:hover { background: var(--whatsapp-bg); border-color: var(--whatsapp); color: #0b7a3b; }
.chips__hint { width: 100%; font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.composer__row { display: flex; align-items: center; gap: 8px; }
.composer__input {
  flex: 1; border: none; background: #fff; border-radius: var(--r-pill);
  padding: 10px 15px; font-size: 14px; outline: none; color: var(--ink);
}
.composer__send {
  width: 42px; height: 42px; border-radius: 50%; border: none; background: var(--whatsapp);
  color: #fff; display: grid; place-items: center; flex: 0 0 auto; transition: transform .08s;
}
.composer__send:hover { background: #1fb959; }
.composer__send:active { transform: scale(.94); }
.composer__send svg { width: 19px; height: 19px; }

/* ---------- Cockpit officina ---------- */
.cockpit { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px; box-shadow: var(--sh-sm); position: relative; overflow: hidden;
}
.kpi__ico { position: absolute; top: 13px; right: 13px; color: var(--brand); opacity: .9; }
.kpi__ico svg { width: 20px; height: 20px; }
.kpi__value { font-size: 28px; font-weight: 820; letter-spacing: -.02em; line-height: 1; }
.kpi__value.flash { animation: flash .7s ease; }
@keyframes flash { 0%{ color: var(--accent); transform: scale(1.12);} 100%{ color: var(--ink); transform: none;} }
.kpi__label { font-size: 12.5px; color: var(--muted); margin-top: 7px; font-weight: 600; }
.kpi__sub { font-size: 11.5px; color: var(--accent); font-weight: 700; margin-top: 3px; }
.kpi--accent .kpi__value { color: var(--accent); }
.kpi--accent .kpi__ico { color: var(--accent); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-sm); }
.panel__head { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--line-soft); }
.panel__head h3 { margin: 0; font-size: 15px; font-weight: 750; }
.panel__head .ico { color: var(--brand); display: grid; place-items: center; }
.panel__head .ico svg { width: 18px; height: 18px; }
.panel__count { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 600; }
.panel__body { padding: 8px 18px 16px; }

/* Agenda */
.agenda { display: flex; flex-direction: column; }
.agenda__empty { color: var(--muted); font-size: 13.5px; padding: 14px 2px; text-align: center; }
.appt {
  display: flex; align-items: center; gap: 14px; padding: 12px 4px;
  border-bottom: 1px solid var(--line-soft);
}
.appt:last-child { border-bottom: none; }
.appt.is-new { animation: slideIn .5s ease; }
@keyframes slideIn { from { opacity: 0; transform: translateX(-14px); background: var(--brand-light); } to { opacity: 1; transform: none; } }
.appt__time {
  flex: 0 0 auto; width: 58px; text-align: center;
  font-weight: 800; font-size: 15px; color: var(--brand-dark);
}
.appt__time small { display: block; font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.appt__bar { width: 3px; align-self: stretch; border-radius: 3px; background: var(--brand); flex: 0 0 auto; }
.appt__info { min-width: 0; flex: 1; }
.appt__svc { font-weight: 700; font-size: 14.5px; }
.appt__who { font-size: 13px; color: var(--muted); }
.appt__tag {
  font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em;
  padding: 3px 8px; border-radius: 6px; flex: 0 0 auto;
}
.tag--ai { background: var(--brand-light); color: var(--brand-dark); }
.tag--confirmed { background: #e7f8ee; color: #15803d; }

/* Feed attività */
.feed { display: flex; flex-direction: column; }
.feed__item { display: flex; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--line-soft); animation: pop .3s ease; }
.feed__item:last-child { border-bottom: none; }
.feed__ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 auto; }
.feed__ico svg { width: 17px; height: 17px; }
.fi--book { background: var(--brand-light); color: var(--brand); }
.fi--call { background: #fde8e8; color: var(--danger); }
.fi--rem  { background: #fff4e5; color: var(--warn); }
.fi--star { background: #fef3c7; color: #b45309; }
.fi--ok   { background: #e7f8ee; color: var(--accent); }
.fi--chat { background: var(--brand-light); color: var(--brand); }
.fi--euro { background: #e7f8ee; color: var(--accent); }
.feed__txt { font-size: 13.5px; line-height: 1.35; min-width: 0; }
.feed__txt b { font-weight: 700; }
.feed__time { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.feed__empty { color: var(--muted); font-size: 13.5px; padding: 14px 2px; text-align: center; }

/* Riquadro valore (business case) */
.valuebox {
  background: linear-gradient(135deg, #0f2a6b, var(--brand)); color: #fff;
  border-radius: var(--r); padding: 18px; box-shadow: var(--sh);
}
.valuebox h3 { margin: 0 0 4px; font-size: 14px; font-weight: 650; opacity: .85; display: flex; align-items: center; gap: 8px; }
.valuebox h3 svg { width: 17px; height: 17px; }
.valuebox__big { font-size: 32px; font-weight: 820; letter-spacing: -.02em; }
.valuebox__big.flash { animation: flashw .7s ease; }
@keyframes flashw { 0%{ transform: scale(1.1);} 100%{ transform: none;} }
.valuebox__note { font-size: 12px; opacity: .8; margin-top: 5px; }

/* Note a piè di demo */
.demo-note {
  display: flex; gap: 10px; align-items: flex-start;
  background: #fffbeb; border: 1px solid #fde68a; color: #92400e;
  border-radius: var(--r); padding: 12px 14px; font-size: 13px; margin: 10px 0 50px;
}
.demo-note svg { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 1px; }

/* ---------- Responsivo ---------- */
@media (max-width: 1000px) {
  .stage { grid-template-columns: 1fr; }
  .phone { position: relative; top: 0; max-width: 380px; margin: 0 auto; }
  .modules { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .modules { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .hero__title { font-size: 32px; }
}

/* ============================================================
   DEMO SCATTA E PREVENTIVA (AI vision carrozzeria)
   ============================================================ */
.vstage { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 24px; padding-bottom: 60px; align-items: start; }

/* Pannello vision (foto + overlay AI) */
.vision { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-sm); overflow: hidden; }
.vision__photos { display: flex; gap: 8px; padding: 12px; border-bottom: 1px solid var(--line-soft); overflow-x: auto; }
.thumb {
  flex: 0 0 auto; width: 92px; height: 64px; border-radius: 9px; background: var(--surface-2);
  border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--muted); font-size: 10.5px; font-weight: 600; text-align: center; padding: 4px;
}
.thumb svg { width: 18px; height: 18px; color: var(--brand); }
.thumb.is-main { border-color: var(--brand); background: var(--brand-light); color: var(--brand-dark); }

.vision__canvas { position: relative; background: linear-gradient(160deg, #eef2f8, #e2e8f2); }
.vision__canvas svg.car { display: block; width: 100%; height: auto; }
.vision__canvas .scan {
  position: absolute; top: 0; bottom: 0; width: 70px; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(59,91,219,.0) 10%, rgba(59,91,219,.35), rgba(255,255,255,.55), rgba(59,91,219,.35), transparent);
  border-right: 2px solid rgba(59,91,219,.7);
}
.vision__canvas .scan.run { opacity: 1; animation: scan 1.7s ease-in-out; }
@keyframes scan { 0% { left: -8%; } 100% { left: 102%; } }

/* riquadri di rilevamento (SVG) */
.det-g { transition: opacity .35s ease; }
.det-g.show { opacity: 1 !important; }
.det-box { fill: rgba(59,91,219,.10); stroke: var(--brand); stroke-width: 2.5; stroke-dasharray: 7 5; }
.det-box--alta { fill: rgba(220,38,38,.12); stroke: var(--danger); }
.det-box--media { fill: rgba(217,119,6,.12); stroke: var(--warn); }
.det-box--bassa { fill: rgba(22,163,74,.12); stroke: var(--accent); }
.det-num { fill: var(--brand); }
.det-num--alta { fill: var(--danger); }
.det-num--media { fill: var(--warn); }
.det-num--bassa { fill: var(--accent); }
.det-numt { fill: #fff; font-size: 13px; font-weight: 800; font-family: var(--font); }

.vision__status {
  display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-top: 1px solid var(--line-soft);
  font-size: 13.5px; font-weight: 600; color: var(--ink-soft); min-height: 50px;
}
.vision__status .spin { width: 17px; height: 17px; border: 2.5px solid var(--brand-light); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; flex: 0 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.vision__status .ok { color: var(--accent); display: flex; }
.vision__status .ok svg { width: 18px; height: 18px; }
.vision__flag { display: flex; gap: 9px; align-items: flex-start; padding: 0 16px 14px; font-size: 12.5px; color: var(--warn); }
.vision__flag svg { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 1px; }

/* Pulsanti casi */
.case-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; margin: 18px 0 22px; box-shadow: var(--sh-sm); }
.case-bar__label { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.case-btn { display: inline-flex; align-items: center; gap: 9px; padding: 9px 14px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); font-weight: 650; font-size: 13.5px; transition: all .14s; }
.case-btn:hover { border-color: #c7d2fe; background: var(--surface-2); }
.case-btn.is-active { background: var(--brand); color: #fff; border-color: var(--brand); }
.case-btn svg { width: 16px; height: 16px; }
.case-bar__spacer { flex: 1; }
.upload-btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: var(--r-pill); border: 1px dashed var(--brand); background: var(--brand-light); color: var(--brand-dark); font-weight: 650; font-size: 13.5px; cursor: pointer; }
.upload-btn svg { width: 16px; height: 16px; }

/* Preventivo */
.estimate { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-sm); overflow: hidden; }
.estimate__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; background: linear-gradient(135deg, #0f2a6b, var(--brand)); color: #fff; }
.estimate__head .who { font-size: 17px; font-weight: 800; }
.estimate__head .meta { font-size: 12px; opacity: .85; margin-top: 2px; }
.estimate__head .num { text-align: right; font-size: 12px; opacity: .9; }
.estimate__veh { display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 12px 18px; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.estimate__veh b { color: var(--ink); }
.estimate__veh span { color: var(--muted); }

.estimate__placeholder { padding: 50px 24px; text-align: center; color: var(--muted); }
.estimate__placeholder svg { width: 40px; height: 40px; color: var(--line); margin-bottom: 10px; }

/* Danni rilevati */
.dmg-list { padding: 12px 18px 4px; display: flex; flex-direction: column; gap: 9px; }
.dmg-card { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); opacity: 0; transform: translateY(8px); transition: all .35s ease; }
.dmg-card.show { opacity: 1; transform: none; }
.dmg-card__n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 12px; flex: 0 0 auto; }
.n--alta { background: var(--danger); } .n--media { background: var(--warn); } .n--bassa { background: var(--accent); }
.dmg-card__info { flex: 1; min-width: 0; }
.dmg-card__part { font-weight: 700; font-size: 14px; }
.dmg-card__type { font-size: 12.5px; color: var(--muted); }
.dmg-card__badges { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: 0 0 auto; }
.act-badge { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; padding: 3px 8px; border-radius: 6px; }
.act--replace { background: #fde8e8; color: var(--danger); }
.act--repair { background: #e7f8ee; color: var(--accent); }
.conf { font-size: 11px; color: var(--muted); font-weight: 600; }

/* Voci di costo */
.est-sections { padding: 6px 18px; }
.est-section { padding: 12px 0; border-top: 1px solid var(--line-soft); }
.est-section__title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 8px; display: flex; align-items: center; gap: 7px; }
.est-section__title svg { width: 15px; height: 15px; color: var(--brand); }
.est-line { display: flex; justify-content: space-between; gap: 14px; padding: 4px 0; font-size: 13.5px; opacity: 0; transform: translateX(-6px); transition: all .3s ease; }
.est-line.show { opacity: 1; transform: none; }
.est-line__desc { color: var(--ink-soft); }
.est-line__desc small { color: var(--muted); }
.est-line__amt { font-weight: 700; white-space: nowrap; }

.est-totals { padding: 14px 18px; background: var(--surface-2); border-top: 1px solid var(--line); }
.est-totals .row { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--ink-soft); padding: 3px 0; }
.est-totals .row.grand { font-size: 22px; font-weight: 820; color: var(--ink); padding-top: 10px; margin-top: 6px; border-top: 1px dashed var(--line); }
.est-totals .row.grand .est-line__amt { color: var(--brand); }

.est-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--line-soft); }
.est-badge { display: inline-flex; align-items: center; gap: 7px; background: #e7f8ee; color: #15803d; font-weight: 700; font-size: 12.5px; padding: 6px 11px; border-radius: var(--r-pill); }
.est-badge svg { width: 15px; height: 15px; }
.est-foot__spacer { flex: 1; }

/* Barra impatto (per il titolare) */
.impact { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
.impact__card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 15px 16px; box-shadow: var(--sh-sm); }
.impact__card.accent { background: linear-gradient(135deg, #0f2a6b, var(--brand)); color: #fff; border: none; }
.impact__big { font-size: 23px; font-weight: 820; letter-spacing: -.02em; }
.impact__big small { font-size: 14px; font-weight: 700; opacity: .8; }
.impact__lbl { font-size: 12px; color: var(--muted); margin-top: 4px; }
.impact__card.accent .impact__lbl { color: rgba(255,255,255,.82); }

/* Toast */
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--r-pill); font-weight: 650; font-size: 14px; box-shadow: var(--sh-lg); opacity: 0; transition: all .3s ease; z-index: 100; display: flex; align-items: center; gap: 9px; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast svg { width: 17px; height: 17px; color: #4ade80; }

@media (max-width: 1000px) {
  .vstage { grid-template-columns: 1fr; }
  .impact { grid-template-columns: 1fr; }
}

/* ============================================================
   DEMO NESSUN PREVENTIVO PERSO (recupero fatturato)
   ============================================================ */
.recovery-hero {
  display: flex; flex-wrap: wrap; align-items: center; gap: 22px;
  background: linear-gradient(135deg, #0f2a6b, var(--brand)); color: #fff;
  border-radius: var(--r-lg); padding: 22px 24px; box-shadow: var(--sh); margin-bottom: 18px;
}
.recovery-hero__money { min-width: 220px; }
.recovery-hero__big { font-size: 40px; font-weight: 850; letter-spacing: -.03em; line-height: 1; }
.recovery-hero__big.flash { animation: flashw .7s ease; }
.recovery-hero__lbl { font-size: 13.5px; opacity: .9; margin-top: 6px; font-weight: 600; }
.recovery-hero__sub { font-size: 12.5px; opacity: .78; margin-top: 2px; }
.recovery-hero__spacer { flex: 1; }
.recovery-hero__cta { display: flex; flex-direction: column; gap: 9px; }
.btn--cta { background: #fff; color: var(--brand-dark); font-size: 15px; padding: 13px 20px; font-weight: 800; }
.btn--cta:hover { background: #eef2ff; }
.btn--cta svg { width: 18px; height: 18px; }
.btn--ghost-light { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.3); box-shadow: none; }
.btn--ghost-light:hover { background: rgba(255,255,255,.2); }

.reco-grid { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,1fr); gap: 22px; padding-bottom: 60px; align-items: start; }
.reco-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.panel__btn {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 700; padding: 6px 12px; border-radius: var(--r-pill);
  background: var(--brand-light); color: var(--brand-dark); border: none; transition: all .14s;
}
.panel__btn:hover { background: #dbe3ff; }
.panel__btn:disabled { opacity: .5; cursor: default; }
.panel__btn svg { width: 14px; height: 14px; }

/* Voci recupero */
.reco-list { display: flex; flex-direction: column; }
.reco-item {
  display: flex; align-items: center; gap: 13px; padding: 12px 4px;
  border-bottom: 1px solid var(--line-soft); transition: background .3s;
}
.reco-item:last-child { border-bottom: none; }
.reco-item.is-booked { background: rgba(22,163,74,.07); }
.reco-item__av {
  width: 38px; height: 38px; border-radius: 50%; background: var(--brand-light); color: var(--brand-dark);
  display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: 0 0 auto;
}
.reco-item__info { flex: 1; min-width: 0; }
.reco-item__top { font-weight: 700; font-size: 14px; }
.reco-item__sub { font-size: 12.5px; color: var(--muted); }
.reco-item__right { text-align: right; flex: 0 0 auto; }
.reco-item__val { font-weight: 800; font-size: 14.5px; }
.reco-item__status { margin-top: 3px; }
.stag { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; padding: 3px 8px; border-radius: 6px; display: inline-flex; align-items: center; gap: 4px; }
.stag svg { width: 11px; height: 11px; }
.stag--wait { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.stag--sent { background: var(--brand-light); color: var(--brand-dark); }
.stag--booked { background: #e7f8ee; color: #15803d; }
.stag--replied { background: #fff4e5; color: #b45309; }

/* Card recensioni */
.reviews-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-sm); padding: 18px; }
.reviews-card__head { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 750; margin-bottom: 14px; }
.reviews-card__head .g { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; font-weight: 800; color: #4285F4; font-size: 13px; }
.reviews-card__head .panel__btn { margin-left: auto; }
.reviews-card__rating { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.reviews-card__num { font-size: 42px; font-weight: 850; letter-spacing: -.02em; line-height: 1; }
.reviews-card__stars { color: #f5b50a; font-size: 17px; letter-spacing: 1px; }
.reviews-card__stars .empty { color: var(--line); }
.reviews-card__count { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.reviews-card__rank { font-size: 12.5px; font-weight: 700; color: var(--accent); display: inline-flex; align-items: center; gap: 5px; margin-bottom: 12px; }
.reviews-card__rank svg { width: 14px; height: 14px; }
.review-snippet { border-top: 1px solid var(--line-soft); padding: 10px 0 2px; animation: pop .35s ease; }
.review-snippet__top { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.review-snippet__top b { font-weight: 700; }
.review-snippet__stars { color: #f5b50a; font-size: 12px; }
.review-snippet__txt { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }

@media (max-width: 1000px) {
  .reco-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   DEMO IL TECNICO HA LA RISPOSTA (diagnosi + ricambi)
   ============================================================ */
.diag-bar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin: 18px 0 22px; box-shadow: var(--sh-sm); }
.diag-inputs { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.diag-plate {
  display: inline-flex; align-items: stretch; border: 2px solid #1f2937; border-radius: 6px; overflow: hidden;
  font-weight: 800; background: #fff; height: 42px;
}
.diag-plate .eu { background: #1d4ed8; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 7px; font-size: 10px; }
.diag-plate .eu b { font-size: 12px; }
.diag-plate input { border: none; outline: none; font-weight: 800; font-size: 18px; letter-spacing: 1px; width: 130px; text-align: center; text-transform: uppercase; color: #1f2937; font-family: var(--font); }
.diag-text { flex: 1; min-width: 220px; border: 1px solid var(--line); border-radius: var(--r-pill); padding: 11px 16px; font-size: 14px; outline: none; color: var(--ink); }
.diag-text:focus { border-color: var(--brand); }
.diag-go { white-space: nowrap; }
.diag-go svg { width: 16px; height: 16px; }
.diag-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; align-items: center; }
.diag-chips__lbl { font-size: 12px; font-weight: 700; color: var(--muted); }

.diag-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 22px; padding-bottom: 60px; align-items: start; }
.diag-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.diag-placeholder { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r); padding: 44px 24px; text-align: center; color: var(--muted); }
.diag-placeholder svg { width: 38px; height: 38px; color: var(--line); margin-bottom: 10px; }

/* Card veicolo */
.vehicle-card { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 15px 17px; box-shadow: var(--sh-sm); }
.vehicle-card__ico { width: 46px; height: 46px; border-radius: 12px; background: var(--brand-light); color: var(--brand); display: grid; place-items: center; flex: 0 0 auto; }
.vehicle-card__ico svg { width: 26px; height: 26px; }
.vehicle-card__name { font-weight: 750; font-size: 16px; }
.vehicle-card__meta { font-size: 12.5px; color: var(--muted); }
.vehicle-card__plate { margin-left: auto; font-weight: 800; font-size: 13px; border: 1.5px solid #1f2937; border-radius: 5px; padding: 4px 9px; color: #1f2937; }

/* Cause probabili */
.cause-list { display: flex; flex-direction: column; gap: 12px; }
.cause-row { padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.cause-row.top { border-color: #c7d2fe; background: var(--brand-light); }
.cause-row__top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.cause-row__name { font-weight: 700; font-size: 14px; }
.cause-row__name .tagtop { font-size: 10px; font-weight: 800; text-transform: uppercase; color: #fff; background: var(--brand); padding: 2px 7px; border-radius: 5px; margin-left: 7px; letter-spacing: .03em; }
.cause-row__prob { font-weight: 800; font-size: 15px; color: var(--brand-dark); flex: 0 0 auto; }
.cause-bar { height: 8px; border-radius: 5px; background: #e2e8f0; margin: 8px 0 6px; overflow: hidden; }
.cause-bar__fill { height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--brand), #6d8bff); width: 0; transition: width .9s cubic-bezier(.2,.7,.2,1); }
.cause-row:not(.top) .cause-bar__fill { background: #94a3b8; }
.cause-row__note { font-size: 12.5px; color: var(--muted); }

.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.checks li { display: flex; gap: 9px; font-size: 13.5px; color: var(--ink-soft); align-items: flex-start; }
.checks li svg { width: 16px; height: 16px; color: var(--brand); flex: 0 0 auto; margin-top: 1px; }

/* Ricambio + fornitori */
.part-head { display: flex; align-items: center; gap: 12px; padding: 4px 0 12px; }
.part-head__name { font-weight: 750; font-size: 15px; }
.part-head__oe { font-size: 12px; color: var(--muted); font-family: ui-monospace, monospace; }
.suppliers { display: flex; flex-direction: column; gap: 8px; }
.supplier-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.supplier-row.is-best { border-color: var(--accent); background: rgba(22,163,74,.06); }
.supplier-row__name { font-weight: 650; font-size: 13.5px; flex: 1; }
.supplier-row__best { font-size: 10px; font-weight: 800; text-transform: uppercase; color: #fff; background: var(--accent); padding: 2px 7px; border-radius: 5px; }
.supplier-row__avail { font-size: 11.5px; font-weight: 600; }
.supplier-row__avail.ok { color: var(--accent); }
.supplier-row__avail.slow { color: var(--warn); }
.supplier-row__price { font-weight: 800; font-size: 15px; min-width: 64px; text-align: right; }
.part-alt { font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.part-alt b { color: var(--ink-soft); }

.mini-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mini-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--sh-sm); }
.mini-card__lbl { font-size: 11.5px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.mini-card__lbl svg { width: 14px; height: 14px; color: var(--brand); }
.mini-card__big { font-size: 22px; font-weight: 820; margin-top: 5px; }
.mini-card__big small { font-size: 13px; font-weight: 700; color: var(--muted); }

.proactive { display: flex; gap: 11px; align-items: flex-start; background: #ecfdf3; border: 1px solid #bbf7d0; color: #166534; border-radius: var(--r); padding: 13px 15px; font-size: 13px; }
.proactive svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; color: var(--accent); }
.proactive b { color: #14532d; }
.tsb-note { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: var(--muted); padding: 4px 2px; }
.tsb-note svg { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 1px; color: var(--warn); }

.diag-badge { display: inline-flex; align-items: center; gap: 7px; background: #e7f8ee; color: #15803d; font-weight: 700; font-size: 12.5px; padding: 6px 12px; border-radius: var(--r-pill); }
.diag-badge svg { width: 15px; height: 15px; }

@media (max-width: 1000px) {
  .diag-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   DEMO RACCONTA E FATTURA (voce → scheda + fattura)
   ============================================================ */
.voice-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.1fr); gap: 24px; padding-bottom: 60px; align-items: start; }

/* Pannello microfono */
.mic-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-sm); padding: 26px 22px; position: sticky; top: 88px; }
.mic-stage { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.mic-btn {
  width: 92px; height: 92px; border-radius: 50%; border: none; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--brand), #6d8bff); color: #fff;
  display: grid; place-items: center; box-shadow: 0 10px 26px rgba(59,91,219,.4); position: relative; transition: transform .1s;
}
.mic-btn:active { transform: scale(.96); }
.mic-btn svg { width: 38px; height: 38px; }
.mic-btn.rec { animation: micpulse 1.4s infinite; }
@keyframes micpulse { 0% { box-shadow: 0 0 0 0 rgba(59,91,219,.45); } 100% { box-shadow: 0 0 0 26px rgba(59,91,219,0); } }
.mic-hint { font-size: 13px; color: var(--muted); text-align: center; }

.waveform { display: flex; align-items: center; justify-content: center; gap: 4px; height: 46px; }
.wave-bar { width: 4px; height: 8px; border-radius: 3px; background: #cbd5e1; }
.waveform.on .wave-bar { background: var(--brand); animation: wave .9s ease-in-out infinite; }
.waveform.on .wave-bar:nth-child(2n) { animation-delay: .15s; }
.waveform.on .wave-bar:nth-child(3n) { animation-delay: .3s; }
.waveform.on .wave-bar:nth-child(4n) { animation-delay: .45s; }
.waveform.on .wave-bar:nth-child(5n) { animation-delay: .6s; }
@keyframes wave { 0%,100% { height: 8px; } 50% { height: 38px; } }

.transcript {
  width: 100%; min-height: 96px; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 16px; font-size: 15px; line-height: 1.5; color: var(--ink);
}
.transcript.empty { color: var(--muted); font-style: italic; }
.transcript .cur { display: inline-block; width: 2px; height: 1.05em; background: var(--brand); margin-left: 1px; vertical-align: text-bottom; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.mic-status { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; padding: 6px 13px; border-radius: var(--r-pill); }
.mic-status--idle { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.mic-status--rec { background: #fde8e8; color: var(--danger); }
.mic-status--proc { background: var(--brand-light); color: var(--brand-dark); }
.mic-status--done { background: #e7f8ee; color: #15803d; }
.mic-status .spin { width: 14px; height: 14px; border: 2px solid var(--brand-light); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
.mic-presets { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 6px; }
.mic-presets .lbl { width: 100%; text-align: center; font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }

/* Output a destra */
.jobcard { display: flex; flex-direction: column; gap: 18px; }
.jobcard__placeholder { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r); padding: 50px 24px; text-align: center; color: var(--muted); }
.jobcard__placeholder svg { width: 38px; height: 38px; color: var(--line); margin-bottom: 10px; }

.wo-vehicle { font-size: 13px; color: var(--muted); }
.wo-vehicle b { color: var(--ink); }
.cust-text { background: var(--brand-light); border-radius: 12px; padding: 13px 15px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }
.cust-text::before { content: "👤 "; }

.recovered-flag { display: flex; gap: 11px; align-items: flex-start; background: #ecfdf3; border: 1px solid #bbf7d0; color: #166534; border-radius: var(--r); padding: 12px 14px; font-size: 13px; }
.recovered-flag svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; color: var(--accent); }
.recovered-flag b { color: #14532d; }

.jobcard__actions { display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 1000px) {
  .voice-grid { grid-template-columns: 1fr; }
  .mic-panel { position: relative; top: 0; }
}

/* ============================================================
   DEMO CHIAMA PRIMA DEL GUASTO (manutenzione predittiva + flotte)
   ============================================================ */
.radar-item { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line-soft); }
.radar-item:last-child { border-bottom: none; }
.radar-item.is-done { background: rgba(22,163,74,.06); }
.radar-item__risk { width: 5px; align-self: stretch; min-height: 42px; border-radius: 3px; flex: 0 0 auto; }
.risk--alta { background: var(--danger); }
.risk--media { background: var(--warn); }
.risk--bassa { background: var(--accent); }
.radar-item__info { flex: 1; min-width: 0; }
.radar-item__need { font-weight: 700; font-size: 14px; }
.radar-item__who { font-size: 12.5px; color: var(--muted); }
.radar-item__signal { font-size: 12px; color: var(--ink-soft); margin-top: 2px; display: flex; align-items: center; gap: 6px; }
.radar-item__signal svg { width: 13px; height: 13px; color: var(--brand); flex: 0 0 auto; }
.radar-item__right { text-align: right; flex: 0 0 auto; }
.radar-item__val { font-weight: 800; font-size: 14px; }
.risk-tag { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; padding: 2px 7px; border-radius: 5px; }
.risk-tag--alta { background: #fde8e8; color: var(--danger); }
.risk-tag--media { background: #fff4e5; color: var(--warn); }
.risk-tag--bassa { background: #e7f8ee; color: #15803d; }
.radar-item__when { font-size: 11px; color: var(--muted); margin-top: 3px; }

/* Flotta */
.fleet-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-sm); overflow: hidden; }
.fleet-card__head { display: flex; align-items: center; gap: 11px; padding: 15px 18px; background: linear-gradient(135deg, #0f2a6b, var(--brand)); color: #fff; }
.fleet-card__head .ico { display: grid; place-items: center; } .fleet-card__head .ico svg { width: 22px; height: 22px; }
.fleet-card__name { font-weight: 750; font-size: 16px; }
.fleet-card__sub { font-size: 12px; opacity: .85; }
.fleet-card__count { margin-left: auto; background: rgba(255,255,255,.18); padding: 5px 11px; border-radius: var(--r-pill); font-weight: 700; font-size: 13px; }
.fleet-list { padding: 8px 18px; }
.fleet-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.fleet-row:last-child { border-bottom: none; }
.fleet-row__van { font-weight: 650; font-size: 13.5px; min-width: 92px; flex: 0 0 auto; }
.fleet-row__task { flex: 1; font-size: 13px; color: var(--ink-soft); }
.fleet-week { font-size: 11.5px; font-weight: 800; padding: 4px 10px; border-radius: var(--r-pill); background: var(--brand-light); color: var(--brand-dark); white-space: nowrap; flex: 0 0 auto; }
.fleet-foot { padding: 14px 18px; border-top: 1px solid var(--line-soft); display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.fleet-contract { font-size: 13px; }
.fleet-contract b { font-size: 18px; color: var(--brand-dark); }
.fleet-foot__spacer { flex: 1; }

/* ============================================================
   TABLET & TOUCH — per mostrare le demo su tablet (iPad/Android)
   ============================================================ */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
* { -webkit-tap-highlight-color: rgba(0, 0, 0, 0); }

/* niente ritardo al tocco né zoom da doppio-tap sugli elementi interattivi */
button, a, label, input, textarea, select, .btn, .scenario-btn, .case-btn, .chip,
.panel__btn, .mic-btn, .module-card, .upload-btn, .composer__send, .reco-item, .radar-item {
  touch-action: manipulation;
}

/* input ≥16px: su iOS evita lo zoom automatico della pagina al focus */
input, textarea, select, .composer__input, .diag-text { font-size: 16px; }

/* su touch: niente stati hover che restano "incollati" dopo il tocco */
@media (hover: none) {
  .module-card--active:hover { transform: none; box-shadow: var(--sh-sm); border-color: var(--line); }
  .module-card--active:active { transform: scale(.99); }
  .btn:active, .scenario-btn:active, .case-btn:active, .chip:active,
  .panel__btn:active, .mic-btn:active, .upload-btn:active { transform: scale(.97); }
}

/* tablet: tap target più comodi e KPI a due colonne in verticale */
@media (max-width: 1024px) {
  .btn, .scenario-btn, .case-btn, .upload-btn, .panel__btn { min-height: 44px; }
  .chip { min-height: 38px; }
}
@media (max-width: 880px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
}

/* Utility */
.hidden { display: none !important; }
.fade-in { animation: pop .3s ease; }
