/* ============================================================
   Command Center Adadò
   Stesso sistema visivo della dashboard Concierge (Live Feedback):
   Instrument Serif per nomi e numeri, Archivo per il testo,
   blu petrolio profondo, colore solo dove indica uno stato.
   Un'impaginazione per ogni schermo: Mac, iPad, iPhone, TV 16:9.
   ============================================================ */

@font-face { font-family: Archivo; src: url('../../dashboard-next/assets/archivo-latin.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: Instrument; src: url('../../dashboard-next/assets/instrument-serif-latin.woff2') format('woff2'); font-display: swap; }

:root {
  --bg: #0b1c23;
  --bg-deep: #081419;
  --surface: #12262e;
  --surface-2: #162d36;
  --raised: #1f3b44;
  --ink: #f2f3ec;
  --muted: #9fb4b8;
  --faint: #869ea3;
  --line: #24404a;
  --line-strong: #345561;
  --accent: #ff9b69;
  --accent-ink: #1a0d06;
  --good: #9ad5be;
  --warm: #f1c279;
  --bad: #ffaaa1;
  --info: #9ec9e2;
  --off: #6f878c;
  --fam-ops: #9ec9e2;
  --fam-vik: #e5a0a6;
  --fam-prs: #e8c27a;
  --fam-bkg: #8fb3f0;
  --fam-abn: #ff9f8f;
  --fam-ggl: #8ab4f8;
  --shadow: 0 1px 0 rgb(255 255 255 / .03) inset, 0 18px 40px -24px rgb(0 0 0 / .7);
  --radius: 22px;
  --radius-sm: 14px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-spring: cubic-bezier(.22, 1.2, .36, 1);
  --serif: Instrument, 'Iowan Old Style', Georgia, serif;
  --sans: Archivo, -apple-system, 'Helvetica Neue', sans-serif;
  --pad: clamp(16px, 3vw, 36px);
  color-scheme: dark;
}

[data-theme="ivory"] {
  --bg: #f1eee6;
  --bg-deep: #e9e5db;
  --surface: #fbf9f3;
  --surface-2: #f6f3eb;
  --raised: #e8e4d9;
  --ink: #172e34;
  --muted: #4f666b;
  --faint: #5c6f72;
  --line: #ddd8cc;
  --line-strong: #bfc7c3;
  --accent: #b2471a;
  --accent-ink: #fff6ef;
  --good: #1b6850;
  --warm: #8a5f12;
  --bad: #a83329;
  --info: #1f5b7a;
  --off: #8b9a9c;
  --fam-ops: #1f5b7a;
  --fam-vik: #8e2c3a;
  --fam-prs: #8a5a12;
  --fam-bkg: #1d4f9c;
  --fam-abn: #c2412f;
  --fam-ggl: #1a73e8;
  --shadow: 0 1px 2px rgb(23 46 52 / .05), 0 16px 36px -26px rgb(23 46 52 / .35);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(1200px 520px at 50% -180px, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%),
    var(--bg-deep);
  color: var(--ink);
  font: 400 15px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
}
body.embed { background: var(--bg); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.tnum { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

.app {
  max-width: 1680px;
  margin: 0 auto;
  padding: max(env(safe-area-inset-top), var(--pad)) max(env(safe-area-inset-right), var(--pad)) max(env(safe-area-inset-bottom), 24px) max(env(safe-area-inset-left), var(--pad));
}

/* ---------------- intestazione ---------------- */

.top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  margin-bottom: 22px;
}
.brand { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.brand-word { font: 600 26px/1 var(--sans); letter-spacing: -.02em; color: var(--accent); }
.brand-rule { width: 1px; height: 22px; background: var(--line-strong); }
.brand-name { font: 600 13px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--ink); }
body.embed .brand { display: none; }
body.embed .top { grid-template-columns: 1fr auto; }

.totals { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.tot {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: 999px;
  background: var(--surface); color: var(--muted); font-size: 14px;
  box-shadow: var(--shadow);
}
.tot b { color: var(--ink); font-weight: 600; }
.tot, .updated { white-space: nowrap; }

.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; flex: none; }
.lvl-ok { --lvl: var(--good); }
.lvl-warn { --lvl: var(--bad); }
.lvl-off { --lvl: var(--off); }
.lvl-unknown { --lvl: var(--warm); }
.tot .dot, .svc .dot { color: var(--lvl); }
.tot.lvl-ok .dot { animation: breathe 2.8s var(--ease) infinite; }

.controls { display: flex; align-items: center; gap: 10px; }
.updated { color: var(--faint); font-size: 13px; min-width: 44px; text-align: right; }
.updated.stale { color: var(--warm); }
.updated.stale::before { content: '● '; }

.icon-btn {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  color: var(--muted);
  transition: background .16s var(--ease), color .16s var(--ease);
}
.icon-btn:hover { background: var(--surface); color: var(--ink); }

.seg {
  position: relative; display: inline-grid; grid-template-columns: repeat(3, 52px);
  padding: 4px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow);
  --i: 2;
}
.seg button { position: relative; z-index: 1; height: 32px; border-radius: 999px; color: var(--muted); font-weight: 500; transition: color .2s var(--ease); }
.seg button[aria-checked="true"] { color: var(--accent-ink); }
.seg-thumb {
  position: absolute; top: 4px; left: 4px; width: 52px; height: 32px; border-radius: 999px;
  background: var(--accent);
  transform: translateX(calc(var(--i) * 52px));
  transition: transform .34s var(--ease-spring);
}

/* ---------------- avvisi ---------------- */

.alerts { display: flex; flex-wrap: wrap; gap: 10px; margin: -6px 0 22px; }
.alert {
  display: flex; align-items: center; gap: 10px; min-width: 0; max-width: 100%;
  padding: 6px 14px 6px 6px; border-radius: 999px;
  background: color-mix(in srgb, var(--lvl) 13%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lvl) 35%, transparent);
  text-align: left;
}
.alert img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--raised); }
.alert b { font-weight: 600; }
.alert span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------- organigramma ----------------
   Griglia rigida a 6 colonne uguali: riga 1 barre di famiglia, riga 2 card, riga 3
   riquadri. Ogni unita' (card + riquadri) e' una subgrid: tutte le card hanno la stessa
   altezza e tutti i riquadri partono dalla stessa riga. */

.org { --conn: var(--line-strong); --gap: 16px; }

.hero { display: flex; justify-content: center; }
.trunk { width: 2px; height: 28px; margin: 0 auto; background: var(--conn); }

.grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: auto auto auto;
  column-gap: var(--gap);
  row-gap: 14px;
}
.bar { grid-column: var(--dc); grid-row: var(--dr); }
.unit {
  grid-column: var(--dc); grid-row: var(--dr);
  display: grid; grid-template-rows: subgrid; row-gap: 12px; min-width: 0;
}

/* linee: dal tronco di Giovanni a ogni barra, compensando lo spazio tra le colonne */
.bar { position: relative; }
.bar::before { content: ''; position: absolute; top: -14px; left: calc(var(--gap) / -2); right: calc(var(--gap) / -2); border-top: 2px solid var(--conn); }
.bar::after { content: ''; position: absolute; top: -14px; left: calc(50% - 1px); width: 2px; height: 14px; background: var(--conn); }
.bar.fam-ops::before { left: 50%; }
.bar.fam-abn::before { right: 50%; }

/* ---------------- barre di famiglia ---------------- */

.bar {
  height: 64px; min-width: 0;
  display: flex; align-items: center; gap: 12px;
  padding: 0 14px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--fam) 7%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fam) 26%, var(--line));
}
.bar:not(.has-director) { justify-content: center; }
.bar.has-director { cursor: pointer; }
.bar.has-director:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fam) 45%, var(--line)); }
.fam-label {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  font: 600 11.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink);
}
.fam-label i { width: 8px; height: 8px; border-radius: 3px; background: var(--fam); }
.bar.has-director .fam-label { padding-right: 12px; border-right: 1px solid var(--line-strong); }
.bar-who { display: grid; min-width: 0; line-height: 1.15; }
.bar-who b { font: 400 24px/1 var(--serif); }
.bar-who em { font-style: normal; font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-line { margin-left: auto; font-size: 12.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bar .pill { flex: none; }
.bar .launch { position: static; flex: none; }
.bar.lvl-warn { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bad) 50%, transparent); }
.fam-ops { --fam: var(--fam-ops); }
.fam-vik { --fam: var(--fam-vik); }
.fam-prs { --fam: var(--fam-prs); }
.fam-bkg { --fam: var(--fam-bkg); }
.fam-abn { --fam: var(--fam-abn); }

/* ---------------- card (tutte uguali) ---------------- */

.card {
  --card-bg: var(--surface);
  position: relative; min-width: 0;
  display: grid;
  grid-template-rows: auto auto auto auto 1fr;
  row-gap: 12px;
  padding: 18px 16px 14px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
  cursor: pointer; outline: none;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease);
}
.card::before {
  content: ''; position: absolute; left: 22px; right: 22px; top: 0; height: 3px; border-radius: 0 0 3px 3px;
  background: var(--lvl, var(--line)); opacity: .5;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow), inset 0 0 0 1px var(--line-strong); }
.card:focus-visible, .bar:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.card.lvl-warn { box-shadow: var(--shadow), inset 0 0 0 1px color-mix(in srgb, var(--bad) 45%, transparent); }
.card.lvl-warn::before { opacity: 1; }
.card.lvl-off { filter: saturate(.3); }
.card.lvl-off .num { color: var(--muted); }

.card-head { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; padding-right: 30px; }
.ava { position: relative; display: block; width: 56px; height: 56px; flex: none; border-radius: 50%; }
.ava img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: 50% 18%; background: radial-gradient(circle at 50% 35%, var(--raised), var(--surface)); box-shadow: 0 0 0 2px var(--lvl, var(--line)); }
.ava::after { content: ''; position: absolute; right: -1px; bottom: 1px; width: 13px; height: 13px; border-radius: 50%; background: var(--lvl, var(--off)); box-shadow: 0 0 0 3px var(--card-bg); }
.lvl-ok .ava::after { animation: breathe 2.8s var(--ease) infinite; }
.lvl-warn .ava::after { animation: alarm 1.2s var(--ease) infinite; }
.ava-sm { width: 40px; height: 40px; }
.ava-sm::after { width: 10px; height: 10px; }
.bar { --card-bg: color-mix(in srgb, var(--fam) 7%, var(--surface)); }

.who { min-width: 0; }
.who h3 { margin: 0; font: 400 30px/1 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.role { margin: 5px 0 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pill {
  justify-self: start;
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  color: var(--lvl); background: color-mix(in srgb, var(--lvl) 14%, transparent);
}
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.metric { display: grid; gap: 4px; }
.num { font: 400 52px/.9 var(--serif); letter-spacing: -.02em; }
.lbl { color: var(--muted); font-size: 13px; line-height: 1.25; min-height: 1.25em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.details { display: grid; gap: 5px; margin: 0; padding-top: 10px; border-top: 1px solid var(--line); }
.details div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; min-width: 0; }
.details dt { color: var(--faint); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.details dd { margin: 0; font-weight: 600; font-size: 14px; }

/* riga di stato: due righe fisse, mostra il problema oppure l'ultima operazione */
.line {
  align-self: end; margin: 0;
  font-size: 12.5px; line-height: 1.35; color: var(--faint);
  height: calc(2 * 1.35em);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card.lvl-warn .line, .card.lvl-unknown .line { color: var(--lvl); font-weight: 500; }
.extra:empty { display: none; }

.launch {
  position: absolute; top: 12px; right: 12px; z-index: 1;
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  color: var(--faint); box-shadow: inset 0 0 0 1px var(--line);
  transition: color .16s var(--ease), background .16s var(--ease), box-shadow .16s var(--ease);
}
.launch svg { width: 16px; height: 16px; }
.launch:hover { color: var(--accent-ink); background: var(--accent); box-shadow: none; }

/* ---------------- riquadri (sottoagenti, corsie, flussi): tutti uguali ---------------- */

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 104px; gap: 8px; align-content: start; }
.tile {
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 9px; row-gap: 2px; align-content: center;
  padding: 10px 11px; border-radius: 14px; min-width: 0;
  background: color-mix(in srgb, var(--raised) 42%, var(--surface));
  box-shadow: inset 0 0 0 1px var(--line);
  text-align: left;
}
.tile-face { grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; overflow: hidden; background: var(--raised); display: grid; place-items: center; }
.tile-face img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.tile-ini { font: 700 12px/1 var(--sans); letter-spacing: .04em; color: var(--fam-prs); }
.lane-badge { font: 400 20px/1 var(--serif); color: var(--fam-vik); }
.tile-name { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile b { grid-column: 1 / -1; font: 400 28px/1 var(--serif); margin-top: 6px; }
.tile-lbl { grid-column: 1 / -1; font-size: 11.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-face + .tile-name { align-self: center; grid-row: span 2; }

/* flussi di Giovanni: stessi riquadri, in riga dentro la sua card */
.card-hero .extra { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.tile-svc { grid-template-columns: minmax(0, 1fr); height: 84px; cursor: pointer; }
.tile-svc .tile-name { display: flex; align-items: center; gap: 7px; grid-row: auto; }
.tile-svc .dot { color: var(--lvl); }
.tile-svc b { margin-top: 2px; }
.tile-svc:hover { background: var(--raised); }

/* ---------------- Giovanni ---------------- */

.card-hero {
  width: min(960px, 100%);
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto auto auto;
  column-gap: 24px;
  padding: 22px 24px 18px;
}
.card-hero .card-head { grid-column: 1; grid-row: 1; padding-right: 0; }
.card-hero .ava { width: 92px; height: 92px; }
.card-hero .ava::after { width: 17px; height: 17px; right: 2px; bottom: 4px; }
.card-hero .who h3 { font-size: 46px; }
.card-hero .role { font-size: 14.5px; }
.card-hero > .pill { grid-column: 1; grid-row: 2; margin-left: 104px; margin-top: -12px; }
.card-hero .metric { grid-column: 2; grid-row: 1 / span 2; justify-items: end; text-align: right; align-self: center; margin-right: 34px; }
.card-hero .num { font-size: 76px; }
.card-hero .lbl { font-size: 14px; }
.card-hero .details { grid-column: 1 / -1; grid-row: 3; display: flex; gap: 28px; }
.card-hero .details div { justify-content: flex-start; }
.card-hero .extra { grid-column: 1 / -1; grid-row: 4; }
.card-hero .line { display: none; }

/* ---------------- scheda di dettaglio ---------------- */

.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgb(3 10 13 / .5); opacity: 0; transition: opacity .26s var(--ease); backdrop-filter: blur(2px); }
.sheet {
  position: fixed; z-index: 41; top: 0; right: 0; bottom: 0; width: min(520px, 100vw);
  overflow-y: auto; overscroll-behavior: contain;
  padding: max(env(safe-area-inset-top), 24px) 26px max(env(safe-area-inset-bottom), 28px);
  background: var(--bg); box-shadow: -30px 0 60px -30px rgb(0 0 0 / .6), inset 1px 0 0 var(--line);
  transform: translateX(104%); transition: transform .34s var(--ease);
}
body.sheet-open .sheet { transform: none; }
body.sheet-open .sheet-backdrop { opacity: 1; }

.sheet-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; }
.sheet-ava { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; object-position: 50% 18%; background: var(--raised); box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--lvl); }
.eyebrow { margin: 0 0 4px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.sheet-head h2 { margin: 0 0 8px; font: 400 42px/1 var(--serif); }
.sheet-close { align-self: start; }
.sheet-blurb { color: var(--muted); margin: 18px 0 0; }
.sheet-reason { margin: 14px 0 0; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--lvl) 12%, transparent); }

.wtable { width: 100%; border-collapse: collapse; margin: 22px 0 6px; font-size: 14px; }
.wtable th { font: 600 11.5px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); text-align: right; padding: 0 0 10px; width: 64px; }
.wtable th.on { color: var(--accent); }
.wtable td { padding: 9px 0; border-top: 1px solid var(--line); color: var(--muted); }
.wtable td.tnum { text-align: right; color: var(--ink); }
.wtable td.on { font-weight: 600; }
.wtable tr.main td:first-child { color: var(--ink); font-weight: 600; }

.work { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.work h3 { margin: 0 0 14px; font: 400 28px/1.1 var(--serif); }
.ai-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-pick button { padding: 7px 12px; border-radius: 999px; font-size: 13.5px; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-strong); transition: all .16s var(--ease); }
.ai-pick button[aria-checked="true"] { color: var(--accent-ink); background: var(--accent); box-shadow: none; font-weight: 600; }
.launch-row { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 9px; padding: 11px 16px; border-radius: 13px;
  font-weight: 600; font-size: 14.5px; text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.btn:hover { filter: brightness(1.06); }
.hint { margin: 10px 0 0; font-size: 13px; color: var(--faint); }
.cmds { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 14px; }
.cmd-head { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.cmd-head b { color: var(--ink); font-weight: 600; font-size: 14px; }
.cmd-head a { margin-left: auto; font-size: 13px; color: var(--accent); text-decoration: none; }
.cmd-hint { margin: 3px 0 0 26px; font-size: 12.5px; color: var(--faint); }
.cmd { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding: 4px 4px 4px 14px; border-radius: 12px; background: var(--bg-deep); box-shadow: inset 0 0 0 1px var(--line); }
.cmd code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; padding: 8px 0; font: 12.5px/1.4 ui-monospace, 'SF Mono', Menlo, monospace; color: var(--ink); scrollbar-width: none; }
.cmd code::-webkit-scrollbar { display: none; }

.toast {
  position: fixed; left: 50%; bottom: max(env(safe-area-inset-bottom), 24px); z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 10px 16px; border-radius: 12px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 14px;
  transition: all .26s var(--ease);
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

.foot { margin: 26px 0 0; text-align: center; font-size: 12.5px; color: var(--faint); }

/* ---------------- accesso (stessa scheda della dashboard) ---------------- */

.login-wrap, .login { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(400px, 100%); display: grid; gap: 16px; padding: 30px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.login-brand { width: 200px; height: auto; }
.login-sub { margin: 0; color: var(--muted); line-height: 1.5; }
.login-field { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.login-field input { font: inherit; font-size: 16px; color: var(--ink); background: var(--bg-deep); border: 1px solid var(--line-strong); border-radius: 12px; padding: 12px 14px; }
.login-field input:focus { outline: none; border-color: var(--accent); }
.login-error { margin: 0; color: var(--bad); }
.login-error:empty { display: none; }
.login-card .btn.primary { justify-content: center; border: 0; cursor: pointer; }



/* ---------------- iPad e finestre medie: 2 colonne ---------------- */

@media (max-width: 1180px) {
  .top { grid-template-columns: 1fr auto; row-gap: 14px; }
  .totals { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; }
  .bar, .unit { grid-column: var(--tc); grid-row: var(--tr); }
  .bar::before, .bar::after, .trunk { display: none; }
  .bar { margin-top: 12px; }
  .hero { margin-bottom: 8px; }
}

/* ---------------- iPhone: una colonna ---------------- */

@media (max-width: 700px) {
  body { font-size: 14.5px; }
  .top { grid-template-columns: 1fr auto; }
  .brand-word { font-size: 22px; }
  .brand-name { font-size: 11px; letter-spacing: .18em; }
  .updated, #tvBtn { display: none; }
  .seg { grid-template-columns: repeat(3, 46px); }
  .seg button { height: 30px; font-size: 14px; }
  .seg-thumb { width: 46px; height: 30px; transform: translateX(calc(var(--i) * 46px)); }

  .grid { display: flex; flex-direction: column; gap: 12px; }
  .unit { display: grid; grid-template-rows: auto auto; }
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 92px; }
  .tile { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding: 8px 4px; }
  .tile-face { grid-row: auto; }
  .tile-face + .tile-name { grid-row: auto; }
  .tile b { font-size: 22px; margin-top: 2px; }
  .tile-lbl { display: none; }
  .tiles:empty { display: none; }
  .bar { height: 58px; }
  .bar-line, .bar .pill { display: none; }
  .bar .launch { margin-left: auto; }
  .card:hover { transform: none; }

  .card-hero { grid-template-columns: minmax(0, 1fr); padding: 18px 16px 14px; }
  .card-hero .ava { width: 72px; height: 72px; }
  .card-hero .who h3 { font-size: 38px; }
  .card-hero > .pill { grid-row: 2; margin: 0; }
  .card-hero .metric { grid-column: 1; grid-row: 3; justify-items: start; text-align: left; margin: 0; }
  .card-hero .num { font-size: 60px; }
  .card-hero .details { grid-row: 4; flex-wrap: wrap; gap: 6px 18px; }
  .card-hero .extra { grid-row: 5; grid-template-columns: 1fr; }
  .tile-svc { height: auto; }
  .alert span { max-width: 60vw; }
  .sheet { width: 100vw; top: auto; max-height: 92dvh; border-radius: 24px 24px 0 0; transform: translateY(104%); padding-top: 22px; }
  .sheet-ava { width: 68px; height: 68px; }
  .sheet-head h2 { font-size: 34px; }
}

/* ---------------- schermo TV 16:9 (AirPlay) ----------------
   Palco fisso 1920x1080 scalato allo schermo: sul televisore non scorre nulla. */

body.tv { overflow: hidden; background: var(--bg-deep); }
/* zoom e non transform: il browser ridisegna testo e volti alla risoluzione vera dello
   schermo invece di ingrandire un'immagine gia' disegnata (testo sfocato sulla TV) */
body.tv { display: grid; place-items: center; height: 100dvh; }
body.tv .app {
  width: 1920px; height: 1080px; max-width: none; margin: 0;
  padding: 40px 56px 26px;
  zoom: var(--tv-scale, 1);
  display: flex; flex-direction: column;
}
body.tv.cursor-hidden, body.tv.cursor-hidden * { cursor: none !important; }
body.tv .top { margin-bottom: 14px; }
body.tv .brand-word { font-size: 32px; }
body.tv .brand-name { font-size: 15px; }
body.tv #themeBtn, body.tv .launch { display: none; }
body.tv .updated { font-size: 22px; color: var(--muted); }
body.tv .tot { font-size: 17px; padding: 9px 16px; }
body.tv .alerts { margin: 0 0 12px; justify-content: center; }
body.tv .alert { font-size: 17px; }
body.tv .card, body.tv .bar { cursor: default; }
body.tv .card:hover { transform: none; }
body.tv .card-head { padding-right: 0; }
body.tv .card-hero { padding: 16px 24px 14px; row-gap: 10px; }
body.tv .card-hero .ava { width: 80px; height: 80px; }
body.tv .card-hero > .pill { margin-left: 92px; }
body.tv .card-hero .num { font-size: 68px; }
body.tv .card-hero .metric { margin-right: 0; }
body.tv .card-hero .extra { padding-top: 10px; }
body.tv .tile-svc { height: 74px; }
body.tv .trunk { height: 22px; }
body.tv .card { padding: 14px 16px 12px; row-gap: 10px; }
body.tv .num { font-size: 48px; }
body.tv .tiles { grid-auto-rows: 88px; }
body.tv .foot { margin-top: auto; font-size: 15px; }
body.tv #tvBtn { opacity: 0; transition: opacity .3s; }
body.tv:not(.cursor-hidden) #tvBtn { opacity: 1; }

/* riquadro nella dashboard */
body.embed #themeBtn { display: none; }
body.embed .app { padding-top: 14px; }

/* ---------------- animazioni ---------------- */

@keyframes breathe { 0%, 100% { box-shadow: 0 0 0 3px var(--card-bg, var(--surface)), 0 0 0 3px color-mix(in srgb, var(--lvl) 0%, transparent); } 50% { box-shadow: 0 0 0 3px var(--card-bg, var(--surface)), 0 0 0 7px color-mix(in srgb, var(--lvl) 24%, transparent); } }
.tot.lvl-ok .dot { animation: breathe-dot 2.8s var(--ease) infinite; }
@keyframes breathe-dot { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--lvl) 0%, transparent); } 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--lvl) 25%, transparent); } }
@keyframes alarm { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.sheet { overflow-x: hidden; }
.cmds li { min-width: 0; }

/* rifiniture: tasto in basso a destra, barre senza riga di sessione, riquadri piu' alti */
.card-head { padding-right: 0; }
.card > .launch { top: auto; bottom: 12px; right: 12px; }
.card > .line { padding-right: 40px; }
.card-hero > .launch { bottom: auto; top: 14px; }
.bar-line { display: none; }
.bar .pill { margin-left: auto; }
.bar-who em { overflow: visible; }
.tiles { grid-auto-rows: 112px; }
.tile { padding: 10px 11px 12px; }
.alerts { justify-content: center; }
body.tv .tiles { grid-auto-rows: 96px; }
body.tv .card-hero .details { display: none; }
body.tv .tile-svc { height: 86px; }
body.tv .tiles { grid-auto-rows: 104px; }
body.tv .foot { margin-top: auto; padding-top: 8px; }
body.tv .tile { padding: 8px 11px; }
body.tv .tile-face { width: 28px; height: 28px; }
body.tv .tile b { font-size: 25px; margin-top: 4px; }

/* colonne strette (dashboard, finestre medie): ruoli su due righe, riquadri verticali */
.card:not(.card-hero), .tiles { container-type: inline-size; }
.role { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@container (max-width: 290px) {
  .tile { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding: 8px 6px; row-gap: 1px; }
  .tile-face, .tile-face + .tile-name { grid-row: auto; }
  .tile b { margin-top: 2px; font-size: 24px; }
  .tile-lbl { max-width: 100%; }
  .num { font-size: 46px; }
  .ava { width: 50px; height: 50px; }
  .who h3 { font-size: 27px; }
}

/* TV: testi leggibili da qualche metro (niente sotto i 15 px sul palco 1080p) */
body.tv .role, body.tv .lbl, body.tv .details dt, body.tv .details dd, body.tv .line { font-size: 16px; }
body.tv .line { line-height: 1.3; }
body.tv .who h3 { font-size: 32px; }
body.tv .pill { font-size: 14px; padding: 5px 11px; }
body.tv .fam-label { font-size: 14px; }
body.tv .bar-who b { font-size: 28px; }
body.tv .bar-who em { font-size: 14px; }
body.tv .tile-name { font-size: 15px; }
body.tv .tile-lbl { font-size: 13px; }
body.tv .tile b { font-size: 28px; }
body.tv .tile-svc .tile-name { font-size: 16px; }
body.tv .card-hero .role, body.tv .card-hero .lbl { font-size: 17px; }
body.tv .foot { font-size: 16px; }
body.tv .tot { font-size: 19px; }
body.tv .alert { font-size: 19px; }
body.tv .foot { display: none; }
body.tv .card-hero .who h3 { font-size: 44px; }
body.tv .tiles { grid-auto-rows: 114px; }
body.tv .tile-face { width: 30px; height: 30px; }
body.tv .grid { row-gap: 12px; }
body.tv .unit { row-gap: 10px; }
body.tv .app { padding: 28px 56px 24px; }
body.tv .top { margin-bottom: 10px; }
body.tv .alerts { margin-bottom: 10px; }

/* ============================================================
   Tabellone TV (16:9): palco 1920x1080 ridisegnato alla risoluzione
   dello schermo (zoom), scene a rotazione, nastro delle notizie.
   ============================================================ */

body.tv .app { display: none; }
.tv-root { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: var(--bg-deep); overflow: hidden; }
.tvw {
  position: relative;
  width: 1920px; height: 1080px; zoom: var(--tv-scale, 1);
  display: grid; grid-template-rows: 96px 1fr 64px;
  background:
    radial-gradient(900px 500px at 12% -10%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%),
    radial-gradient(900px 600px at 100% 110%, color-mix(in srgb, var(--fam-bkg) 9%, transparent), transparent 70%),
    var(--bg-deep);
  overflow: hidden;
}

/* intestazione */
.tvw-top { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 36px; padding: 0 56px; border-bottom: 1px solid var(--line); }
.tvw-top .brand-word { font-size: 34px; }
.tvw-top .brand-name { font-size: 15px; }
.tvw-tabs { display: flex; gap: 10px; justify-content: center; }
.tvw-tab { position: relative; display: grid; gap: 8px; min-width: 190px; padding: 10px 18px 12px; border-radius: 14px; color: var(--faint); font: 600 17px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; text-align: left; transition: color .4s var(--ease), background .4s var(--ease); }
.tvw-tab.on { color: var(--ink); background: var(--surface); }
.tvw-tab i { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.tvw-tab b { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.tvw-status { display: flex; gap: 10px; }
.tvw-status .tot { font-size: 18px; padding: 9px 15px; }
.tvw-status .tot.hot { animation: hot 1.6s var(--ease) infinite; }
.tvw-clock { display: grid; justify-items: end; line-height: 1; }
.tvw-clock b { font: 400 50px/1 var(--serif); font-variant-numeric: tabular-nums; }
.tvw-clock span { margin-top: 4px; font-size: 15px; color: var(--faint); text-transform: capitalize; }

/* palco e scene */
.tvw-stage { position: relative; overflow: hidden; }
.scene { position: absolute; inset: 0; padding: 26px 56px 18px; opacity: 0; visibility: hidden; transform: translateX(60px); transition: opacity .8s var(--ease), transform .9s var(--ease), visibility 0s .9s; }
.scene.on { opacity: 1; visibility: visible; transform: none; transition: opacity .8s var(--ease) .15s, transform .9s var(--ease) .15s, visibility 0s; }
.scene.leave { transform: translateX(-60px); }
.scene > div { height: 100%; }
.scene-empty { display: grid; place-items: center; height: 100%; font: 400 44px/1.2 var(--serif); color: var(--faint); }

/* Squadra: l'organigramma entra nella scena */
.scene-team .org { height: 100%; display: flex; flex-direction: column; }
.scene-team .hero { flex: none; }

/* Manutenzioni */
.scene-maint { display: grid; grid-template-rows: auto 1fr auto; gap: 22px; }
.mcounters { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.mcount { display: grid; gap: 6px; padding: 18px 24px; border-radius: 22px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.mcount b { font: 400 92px/.9 var(--serif); }
.mcount span { font-size: 19px; color: var(--muted); }
.mc-toTake b { color: var(--warm); }
.mc-resolvedToday b { color: var(--good); }
.mc-alarms.hot { background: color-mix(in srgb, var(--bad) 14%, var(--surface)); box-shadow: var(--shadow), inset 0 0 0 2px color-mix(in srgb, var(--bad) 60%, transparent); animation: hot 1.6s var(--ease) infinite; }
.mc-alarms.hot b { color: var(--bad); }
.mcols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; min-height: 0; }
.mcol { display: grid; grid-template-rows: auto 1fr auto; gap: 12px; min-height: 0; }
.mcol h3 { display: flex; align-items: center; gap: 12px; margin: 0; font: 600 16px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.mcol h3 b { font: 400 30px/1 var(--serif); letter-spacing: 0; color: var(--ink); }
.mcol-list { display: grid; grid-auto-rows: min-content; gap: 10px; min-height: 0; overflow: hidden; }
.job { position: relative; display: grid; gap: 6px; padding: 13px 18px 13px 22px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.job::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--prio); }
.job.p3 { --prio: var(--bad); } .job.p2 { --prio: var(--warm); } .job.p1 { --prio: var(--info); }
.job header { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--faint); }
.job .prio { color: var(--prio); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.job .where { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job h4 { margin: 0; font: 500 21px/1.2 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job footer { display: flex; gap: 14px; font-size: 15px; color: var(--muted); }
.job .tech { color: var(--ink); font-weight: 600; }
.job.alarm { background: color-mix(in srgb, var(--bad) 11%, var(--surface)); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--bad) 50%, transparent); }
.job .why { margin: 0; font-size: 15px; font-weight: 600; color: var(--bad); }
.mcol-resolved .job { opacity: .8; }
.mcol .more, .mcol .empty { margin: 0; font-size: 16px; color: var(--faint); }
.mtechs { display: flex; gap: 14px; flex-wrap: wrap; }
.mtech { display: inline-flex; align-items: baseline; gap: 12px; padding: 10px 18px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 16px; }
.mtech b { font: 400 24px/1 var(--serif); }
.mtech em { font-style: normal; color: var(--muted); }

/* Recensioni */
.scene-reviews { display: grid; grid-template-columns: 470px 1fr 620px; gap: 34px; }
.scene-reviews h3, .scene-reviews h4 { margin: 0 0 14px; font: 600 16px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.rleft { display: grid; grid-template-rows: auto auto 1fr; gap: 22px; min-height: 0; }
.rtoday { display: grid; gap: 4px; padding: 24px 28px; border-radius: 26px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.rtoday span { font-size: 18px; color: var(--muted); }
.rtoday b { font: 400 150px/.9 var(--serif); color: var(--tone, var(--ink)); }
.rtoday small { font-size: 18px; color: var(--faint); }
.good { --tone: var(--good); } .warm { --tone: var(--warm); } .bad { --tone: var(--bad); }
.rperiods { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rperiod { display: grid; gap: 2px; padding: 16px 20px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.rperiod span { font-size: 16px; color: var(--muted); }
.rperiod b { font: 400 58px/1 var(--serif); color: var(--tone, var(--ink)); }
.rperiod small { font-size: 15px; color: var(--faint); }
.delta { font-style: normal; font-weight: 600; margin-left: 6px; }
.delta.up, .rtrend .up { color: var(--good); } .delta.down, .rtrend .down { color: var(--bad); }
.rcompl { min-height: 0; }
.rbar { display: grid; grid-template-columns: 150px 1fr 40px; align-items: center; gap: 14px; margin-bottom: 10px; font-size: 17px; color: var(--muted); }
.rbar i { height: 10px; border-radius: 10px; background: var(--raised); position: relative; overflow: hidden; }
.rbar i::after { content: ''; position: absolute; inset: 0; width: calc(var(--p) * 100%); border-radius: inherit; background: var(--bad); }
.rbar b { text-align: right; color: var(--ink); }
.rmid { display: grid; grid-template-rows: auto 1fr auto; min-height: 0; padding: 26px 30px; border-radius: 26px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.rspark { color: var(--tone, var(--info)); min-height: 0; }
.spark { width: 100%; height: 100%; }
.spark-line { stroke-dasharray: 4000; stroke-dashoffset: 4000; animation: draw 2.4s var(--ease) forwards; }
.scene:not(.on) .spark-line { animation: none; }
.spark-dot { animation: breathe-svg 2.4s var(--ease) infinite; transform-box: fill-box; transform-origin: center; }
.rtrend { margin: 12px 0 0; font-size: 20px; color: var(--muted); }
.rtrend b { font: 400 34px/1 var(--serif); color: var(--ink); }
.rright { display: grid; grid-template-rows: auto 1fr auto; min-height: 0; }
.rstack { display: flex; flex-direction: column; gap: 14px; min-height: 0; overflow: hidden; }
.rcard {
  display: grid; gap: 12px; padding: 20px 24px; border-radius: 24px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background .6s var(--ease), box-shadow .6s var(--ease), opacity .6s var(--ease);
  opacity: .6;
}
.rcard.front { opacity: 1; background: linear-gradient(180deg, var(--surface-2), var(--surface)); box-shadow: var(--shadow), inset 0 0 0 2px color-mix(in srgb, var(--tone, var(--line)) 55%, transparent); animation: rise .7s var(--ease); }
.rcard.gone { display: none; }
.rcard header { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; }
.rscore { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; font: 400 38px/1 var(--serif); color: var(--accent-ink); background: var(--tone, var(--muted)); }
.rcard.front .rscore { width: 78px; height: 78px; font-size: 46px; }
.rcard header b { display: block; font: 400 28px/1.1 var(--serif); }
.rcard header div span { font-size: 15px; color: var(--faint); }
.rcard p { margin: 0; font-size: 19px; line-height: 1.4; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.rcard.front p { font-size: 23px; color: var(--ink); -webkit-line-clamp: 5; }
@keyframes rise { from { transform: translateY(18px); } to { transform: none; } }
.rdots { display: flex; gap: 8px; justify-content: center; padding-top: 12px; }
.rdots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); transition: all .4s var(--ease); }
.rdots i.on { width: 28px; border-radius: 9px; background: var(--accent); }
.scene-reviews .empty { font-size: 18px; color: var(--faint); }

/* nastro delle notizie */
.tvw-ticker { display: grid; grid-template-columns: auto 1fr; align-items: center; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 70%, transparent); overflow: hidden; }
.ticker-tag { display: inline-flex; align-items: center; gap: 10px; height: 100%; padding: 0 22px 0 56px; font: 700 15px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--accent); background: var(--bg-deep); box-shadow: 18px 0 24px -6px var(--bg-deep); position: relative; z-index: 1; }
.ticker-tag i { width: 10px; height: 10px; border-radius: 50%; background: var(--bad); animation: blink 1.4s var(--ease) infinite; }
.ticker-win { overflow: hidden; white-space: nowrap; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-track { display: inline-flex; animation: ticker var(--dur, 60s) linear infinite; }
.ticker-run { display: inline-flex; align-items: center; gap: 22px; padding-right: 22px; }
.ti { font-size: 21px; color: var(--muted); }
.ti b { color: var(--ink); font-weight: 600; margin-right: 6px; }
.ti.bad, .ti.bad b { color: var(--bad); }
.sep { font-style: normal; font-size: 12px; color: var(--accent); opacity: .7; }

.tvw-exit { position: absolute; right: 18px; bottom: 76px; padding: 8px 14px; border-radius: 10px; background: var(--surface); color: var(--muted); font-size: 14px; opacity: 0; transition: opacity .3s; }
body.tv:not(.cursor-hidden) .tvw-exit { opacity: 1; }

.bump { animation: bump .9s var(--ease); }
@keyframes bump { 0% { color: inherit; } 30% { color: var(--accent); transform: scale(1.06); } 100% { transform: none; } }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes hot { 0%, 100% { box-shadow: var(--shadow), inset 0 0 0 2px color-mix(in srgb, var(--bad) 60%, transparent); } 50% { box-shadow: var(--shadow), inset 0 0 0 2px color-mix(in srgb, var(--bad) 20%, transparent), 0 0 34px -6px color-mix(in srgb, var(--bad) 60%, transparent); } }
@keyframes breathe-svg { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

/* ---------------- TV leggibile: palco 1600x900 (tutto +20% sullo schermo) e meno contenuto ---------------- */
.tvw { width: 1600px; height: 900px; grid-template-rows: 84px 1fr 58px; }
.tvw-top { gap: 24px; padding: 0 36px; }
.tvw-top .brand-word { font-size: 30px; }
.tvw-top .brand-name { display: none; }
.tvw-tab { min-width: 150px; padding: 9px 14px 11px; font-size: 17px; }
.tvw-status .tot { font-size: 18px; padding: 8px 14px; }
.tvw-clock b { font-size: 46px; }
.tvw-clock span { font-size: 15px; }
.scene { padding: 18px 36px 12px; }
.ticker-tag { padding-left: 36px; font-size: 15px; }
.ti { font-size: 22px; }

/* Squadra in TV: nome, stato e numero; i dettagli restano nella web app */
body.tv .scene-team .details,
body.tv .scene-team .tile-lbl,
body.tv .scene-team .card-hero .details { display: none; }
body.tv .scene-team .card { row-gap: 8px; padding: 12px 14px 10px; }
body.tv .scene-team .num { font-size: 50px; }
body.tv .scene-team .lbl { font-size: 17px; }
body.tv .scene-team .role { font-size: 16px; }
body.tv .scene-team .line { font-size: 16px; }
body.tv .scene-team .who h3 { font-size: 32px; }
body.tv .scene-team .tiles { grid-auto-rows: 92px; }
body.tv .scene-team .tile-name { font-size: 16px; }
body.tv .scene-team .tile b { font-size: 28px; }
body.tv .scene-team .bar { height: 58px; }
body.tv .scene-team .bar-who b { font-size: 28px; }
body.tv .scene-team .fam-label { font-size: 15px; }
body.tv .scene-team .card-hero { width: 980px; padding: 14px 22px 12px; }
body.tv .scene-team .tile-svc { height: 80px; }
body.tv .scene-team .tile-svc .tile-name { font-size: 17px; }
body.tv .scene-team .tile-svc .tile-lbl { display: none; }
body.tv .scene-team .trunk { height: 16px; }

/* Manutenzioni in TV */
.scene-maint { gap: 16px; }
.mcounters { gap: 12px; }
.mcount { padding: 12px 20px; }
.mcount b { font-size: 76px; }
.mcount span { font-size: 19px; }
.mcols { gap: 16px; }
.mcol h3 { font-size: 17px; }
.job { padding: 12px 16px 12px 20px; }
.job header { font-size: 15px; }
.job h4 { font-size: 23px; }
.job footer, .job .why { font-size: 17px; }
.mtech { font-size: 17px; padding: 8px 16px; }

/* Recensioni in TV */
.scene-reviews { grid-template-columns: 380px 1fr 500px; gap: 22px; }
.rtoday { padding: 18px 24px; }
.rtoday b { font-size: 128px; }
.rtoday span, .rtoday small { font-size: 19px; }
.rperiod b { font-size: 50px; }
.rperiod span, .rperiod small { font-size: 16px; }
.rbar { grid-template-columns: 130px 1fr 34px; font-size: 18px; }
.rmid { padding: 20px 24px; }
.rtrend { font-size: 20px; }
.rcard { padding: 16px 20px; }
.rcard header b { font-size: 27px; }
.rcard header div span { font-size: 16px; }
.rcard p { font-size: 19px; }
.rcard.front p { font-size: 23px; -webkit-line-clamp: 4; }
.scene-reviews h3, .scene-reviews h4 { font-size: 17px; }
.tvw-top .brand-rule { display: none; }
.tvw-exit { display: none; }
.tvw-controls { position: absolute; right: 20px; bottom: 72px; z-index: 5; display: flex; gap: 10px; opacity: 0; transition: opacity .3s var(--ease); pointer-events: none; }
body.tv:not(.cursor-hidden) .tvw-controls { opacity: 1; pointer-events: auto; }
.tvw-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 12px; background: var(--surface); color: var(--ink); font-size: 16px; font-weight: 600; box-shadow: var(--shadow), inset 0 0 0 1px var(--line-strong); }
.tvw-btn:hover { background: var(--accent); color: var(--accent-ink); }
.mcol { grid-template-rows: auto auto auto; align-content: start; }
.rperiod small { white-space: nowrap; font-size: 15px; }

/* transizioni piu' rapide tra le pagine */
.scene { transition: opacity .45s var(--ease), transform .5s var(--ease), visibility 0s .5s; transform: translateX(40px); }
.scene.on { transition: opacity .45s var(--ease) .08s, transform .5s var(--ease) .08s, visibility 0s; }
.scene.leave { transform: translateX(-40px); }

/* ---------------- Escalation in diretta ---------------- */
.scene-esc { display: grid; grid-template-rows: auto 1fr; gap: 16px; }
.ecounters { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.ecount { display: grid; gap: 6px; padding: 12px 20px; border-radius: 22px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.ecount b { font: 400 70px/.9 var(--serif); }
.ecount span { font-size: 18px; color: var(--muted); line-height: 1.2; }
.ec-closed b { color: var(--good); }
.ecount.hot { background: color-mix(in srgb, var(--bad) 14%, var(--surface)); animation: hot 1.6s var(--ease) infinite; }
.ecount.hot b { color: var(--bad); }
.ebody { display: grid; grid-template-columns: 1fr 1fr 1.1fr; gap: 16px; min-height: 0; }
.ebody section { display: grid; grid-template-rows: auto 1fr; min-height: 0; padding: 16px 18px; border-radius: 22px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.ebody h3 { margin: 0 0 12px; font: 600 17px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.ebody section > div { display: grid; gap: 10px; align-content: start; }
.eitem { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.eitem b { display: block; font: 400 26px/1.1 var(--serif); }
.eitem span { font-size: 16px; color: var(--muted); }
.eitem em { font: 400 32px/1 var(--serif); font-style: normal; color: var(--warm); }
.eitem.late { background: color-mix(in srgb, var(--bad) 12%, var(--surface-2)); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--bad) 50%, transparent); }
.eitem.late em { color: var(--bad); }
.eitem.urgent b::after { content: ' · urgente'; font: 700 14px/1 var(--sans); color: var(--bad); text-transform: uppercase; letter-spacing: .08em; }
.eclear { display: grid; place-items: center; gap: 8px; height: 100%; min-height: 240px; color: var(--good); }
.eclear b { font: 400 90px/1 var(--serif); }
.eclear span { font-size: 22px; }
.eop { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; }
.eop-ava { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: color-mix(in srgb, var(--info) 22%, var(--surface-2)); font: 400 26px/1 var(--serif); color: var(--info); }
.eop-main { display: grid; gap: 5px; min-width: 0; }
.eop-main b { font-size: 20px; font-weight: 600; }
.eop-main i { height: 8px; border-radius: 8px; background: var(--raised); position: relative; overflow: hidden; }
.eop-main i::after { content: ''; position: absolute; inset: 0; width: calc(var(--p) * 100%); border-radius: inherit; background: var(--good); transition: width .8s var(--ease); }
.eop-main span { font-size: 15px; color: var(--faint); }
.eop strong { font: 400 46px/1 var(--serif); }
.erow { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 17px; color: var(--muted); }
.erow em { font-style: normal; color: var(--faint); font-size: 16px; }
.erow b { color: var(--ink); }
.erow div span { color: var(--muted); }
.erow strong { color: var(--good); font-weight: 600; font-size: 16px; white-space: nowrap; }
.erow div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------- Recensioni e FRS ---------------- */
.scene-frs { display: grid; grid-template-rows: auto 1fr auto; gap: 14px; }
.fkpis { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 12px; }
.fkpi { display: grid; gap: 4px; padding: 12px 20px; border-radius: 22px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.fkpi span { font-size: 17px; color: var(--muted); }
.fkpi b { font: 400 72px/.95 var(--serif); color: var(--tone, var(--ink)); }
.fkpi small { font-size: 16px; color: var(--faint); }
.fk-removed b { color: var(--good); }
.fk-lift { background: color-mix(in srgb, var(--good) 12%, var(--surface)); box-shadow: var(--shadow), inset 0 0 0 2px color-mix(in srgb, var(--good) 40%, transparent); }
.fk-lift b { color: var(--good); }
.fbody { display: grid; grid-template-columns: 1fr 440px; gap: 16px; min-height: 0; }
.fbody section { display: grid; grid-template-rows: auto 1fr auto; min-height: 0; padding: 16px 20px; border-radius: 22px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.fbody h3 { margin: 0 0 10px; font: 600 17px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.fchart-svg { min-height: 0; }
.band { width: 100%; height: 100%; }
.band-fill { fill: color-mix(in srgb, var(--good) 26%, transparent); }
.band-avg { fill: none; stroke: var(--good); stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 4000; stroke-dashoffset: 4000; animation: draw 1.8s var(--ease) forwards; }
.band-without { fill: none; stroke: var(--bad); stroke-width: 3; stroke-dasharray: 8 7; opacity: .85; }
.band-dot { fill: var(--good); animation: breathe-svg 2.4s var(--ease) infinite; }
.scene:not(.on) .band-avg { animation: none; }
.flegend { display: flex; gap: 26px; margin: 10px 0 0; font-size: 16px; color: var(--muted); }
.flegend span::before { content: ''; display: inline-block; width: 22px; height: 4px; margin-right: 8px; vertical-align: middle; border-radius: 3px; }
.lg-avg::before { background: var(--good); }
.lg-without::before { background: repeating-linear-gradient(90deg, var(--bad) 0 6px, transparent 6px 10px); }
.lg-band::before { height: 12px !important; background: color-mix(in srgb, var(--good) 30%, transparent); }
.fremoved > div { display: grid; gap: 10px; align-content: start; }
.frow { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; }
.fscore { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; font: 400 30px/1 var(--serif); color: var(--accent-ink); background: var(--tone, var(--muted)); position: relative; }
.fscore::after { content: ''; position: absolute; left: 8px; right: 8px; top: 50%; height: 3px; background: var(--accent-ink); opacity: .7; transform: rotate(-12deg); }
.frow b { display: block; font: 400 24px/1.1 var(--serif); }
.frow span { font-size: 15px; color: var(--faint); }
.ffunnel { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-radius: 22px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.fstep { display: flex; align-items: baseline; gap: 10px; }
.fstep b { font: 400 40px/1 var(--serif); }
.fstep span { font-size: 17px; color: var(--muted); }
.fstep:last-of-type b { color: var(--good); }
.farrow { font-style: normal; font-size: 26px; color: var(--accent); }
.ffunnel::before { content: 'Percorso FRS · oggi'; font: 600 15px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-right: 10px; }
.band path, .band circle { stroke-width: inherit; }
.band-fill { stroke: none; }
.band-dot { stroke: none; }
.frow .fscore { font: 400 30px/1 var(--serif); color: var(--accent-ink); }
.frow div span { font-size: 15px; color: var(--faint); }
.fscore::after { height: 2px; opacity: .45; }
.erow { grid-template-columns: auto 1fr auto; align-items: center; padding: 10px 0; }
.erow div { display: grid; gap: 2px; white-space: normal; }
.erow div b { font-size: 19px; }
.erow div span { font-size: 16px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eop { padding: 4px 0; }

/* ---------------- Economics ---------------- */
.scene-eco { display: grid; grid-template-rows: auto 1fr auto; gap: 14px; }
.xkpis { display: grid; grid-template-columns: 1.3fr 1.2fr 1fr 1fr 1fr; gap: 12px; }
.xkpi { display: grid; gap: 4px; padding: 12px 20px; border-radius: 22px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); min-width: 0; }
.xkpi span { font-size: 17px; color: var(--muted); }
.xkpi b { font: 400 62px/1 var(--serif); white-space: nowrap; }
.xkpi small { font-size: 16px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xk-gross { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); box-shadow: var(--shadow), inset 0 0 0 2px color-mix(in srgb, var(--accent) 40%, transparent); }
.xk-gross b { color: var(--accent); }
.xk-net b { color: var(--good); }
.xbody { display: grid; grid-template-columns: 1fr 520px; gap: 16px; min-height: 0; }
.xbody section { display: grid; grid-template-rows: auto 1fr; min-height: 0; padding: 16px 20px; border-radius: 22px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.xbody h3 { display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px; font: 600 17px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.xlegend { display: flex; align-items: center; gap: 8px; font-size: 14px; letter-spacing: .04em; text-transform: none; color: var(--faint); }
.xlegend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-left: 12px; }
.lg-net { background: var(--good); }
.lg-com { background: color-mix(in srgb, var(--accent) 55%, transparent); }
.ebars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 10px; align-items: end; min-height: 0; height: 100%; }
.ebar { display: grid; grid-template-rows: auto 1fr auto; gap: 6px; height: 100%; justify-items: center; }
.ebar i { position: relative; width: 100%; align-self: end; height: calc(var(--g) * 100%); border-radius: 8px 8px 3px 3px; background: color-mix(in srgb, var(--accent) 55%, transparent); overflow: hidden; animation: grow .9s var(--ease) both; transform-origin: bottom; }
.ebar i b { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--n) * 100%); background: var(--good); }
.ebar-val { font-size: 14px; color: var(--muted); }
.ebar-day { font-size: 13px; color: var(--faint); white-space: nowrap; }
.ebar.today i { outline: 2px dashed color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; }
.ebar.today .ebar-day { color: var(--accent); font-weight: 700; }
.scene:not(.on) .ebar i { animation: none; }
.xtop { align-content: start; }
.xrow { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.xrow em { font: 400 28px/1 var(--serif); font-style: normal; color: var(--faint); }
.xrow b { display: block; font: 400 25px/1.1 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xrow span { font-size: 15px; color: var(--faint); }
.xrow strong { font: 400 32px/1 var(--serif); color: var(--accent); }
.xplat { display: flex; gap: 12px; }
.xp { position: relative; flex: max(var(--w), .16) 1 0; display: grid; gap: 4px; padding: 12px 18px 16px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; min-width: 0; }
.xp b { font: 400 26px/1 var(--serif); }
.xp span { font-size: 15px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xp i { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--fam-bkg); }
.xp:nth-child(2) i { background: var(--fam-abn); }
.xp:nth-child(3) i { background: var(--good); }
@keyframes grow { from { transform: scaleY(0); } to { transform: none; } }
/* cinque pagine: intestazione piu' compatta, colonne vincolate al palco */
.tvw-top { grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 18px; }
.tvw-tabs { gap: 4px; }
.tvw-tab { min-width: 0; padding: 9px 12px 11px; font-size: 15px; letter-spacing: .05em; }
.tvw-status { gap: 8px; }
.tvw-status .tot { font-size: 16px; padding: 7px 12px; }
.tvw-status .tot.lvl-ok { display: none; }
.tvw-clock b { font-size: 42px; }
.xkpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.xkpi b { font-size: 54px; }
.xbody { grid-template-columns: minmax(0, 1fr) 470px; }
.xtop { display: block !important; }
.xrow strong { white-space: nowrap; font-size: 30px; }
.fkpis, .ecounters, .mcounters { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.xp { flex: max(var(--w), .27) 1 0; }

/* Squadra: il tratto tra Giovanni e le famiglie non si schiaccia mai (sovrapposizione) */
.scene-team .trunk, .scene-team .grid, .scene-team .hero { flex: none; }

/* carte che girano di 180 gradi */
.flip { perspective: 1400px; min-width: 0; min-height: 0; }
.flip-in { position: relative; display: grid; height: 100%; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.45, .05, .25, 1); }
.flip.flipped .flip-in { transform: rotateY(180deg); }
.face { grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden; min-width: 0; min-height: 0; display: grid; }
.face.back { transform: rotateY(180deg); }
.face > * { height: 100%; }
.fbody { grid-template-columns: minmax(0, 1fr) 460px; }
.fside { display: grid; grid-template-rows: auto 1fr; min-height: 0; padding: 16px 20px; border-radius: 22px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.fside > div { display: grid; gap: 12px; align-content: start; }
.face.back .fside { background: color-mix(in srgb, var(--info) 8%, var(--surface)); }
.frow.new .fscore::after { display: none; }

/* scala dei punteggi */
.fchart-svg { position: relative; display: grid; grid-template-columns: 52px 1fr; min-height: 0; }
.axis { position: relative; }
.axis span { position: absolute; right: 10px; transform: translateY(-50%); font: 400 20px/1 var(--serif); color: var(--muted); font-variant-numeric: tabular-nums; }
.plot { position: relative; min-height: 0; }
.grid-line { stroke: var(--line-strong); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 3 6; }
.band-avg, .band-without { vector-effect: non-scaling-stroke; }
.band-now { position: absolute; right: -7px; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 5px color-mix(in srgb, var(--good) 25%, transparent); animation: breathe-svg 2.4s var(--ease) infinite; }
body.tv .scene-team .trunk { height: 24px; }
body.in-app .tvw-controls { display: none; }
/* dentro la dashboard: pagine statiche, niente barra del tempo sulle schede */
.tv-root.manual .tvw-tab i { visibility: hidden; }
.tv-root.manual .tvw-tab { cursor: pointer; }
.tv-root.manual .tvw-tab:not(.on):hover { color: var(--ink); background: color-mix(in srgb, var(--surface) 60%, transparent); }

/* avvisi */
.alert-btn.on { color: var(--accent); }
.alert-btn.on svg { fill: color-mix(in srgb, var(--accent) 25%, transparent); }
.steps { margin: 12px 0 0; padding-left: 20px; color: var(--muted); line-height: 1.8; }
.alerts-h { margin: 26px 0 10px; font: 400 26px/1.1 var(--serif); }
.alerts-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.alerts-log li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.alerts-log em { font-style: normal; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); grid-column: 1; }
.alerts-log b { grid-column: 1; font-weight: 600; }
.alerts-log span { grid-column: 1; font-size: 13.5px; color: var(--muted); }
.alerts-log small { grid-column: 2; grid-row: 1 / span 3; align-self: center; color: var(--faint); font-variant-numeric: tabular-nums; }
.alerts-log .empty { display: block; color: var(--faint); }
body.tv .alert-btn { display: none; }
.sheet-head:not(:has(.sheet-ava)) { grid-template-columns: 1fr auto; }

/* ---------------- avviso "Nuova prenotazione" (tabellone TV) ---------------- */
.bk-toast {
  position: absolute; left: 50%; bottom: 84px; z-index: 20;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px;
  min-width: 820px; max-width: 1180px; padding: 22px 30px 22px 22px;
  border-radius: 28px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--pl) 20%, var(--surface-2)), var(--surface));
  box-shadow: 0 30px 80px -20px rgb(0 0 0 / .75), inset 0 0 0 2px color-mix(in srgb, var(--pl) 60%, transparent);
  transform: translate(-50%, 140%) scale(.96); opacity: 0; pointer-events: none;
  transition: transform .7s cubic-bezier(.2, 1.3, .4, 1), opacity .5s var(--ease);
  --pl: var(--accent);
}
.bk-toast.show { transform: translate(-50%, 0) scale(1); opacity: 1; }
.bk-toast.pl-bkg { --pl: var(--fam-bkg); }
.bk-toast.pl-abn { --pl: var(--fam-abn); }
.bk-toast.pl-ggl { --pl: var(--fam-ggl); }
.bk-toast.pl-dir { --pl: var(--good); }
.bk-glow { position: absolute; inset: -2px; border-radius: inherit; pointer-events: none; box-shadow: 0 0 0 0 color-mix(in srgb, var(--pl) 60%, transparent); }
.bk-toast.show .bk-glow { animation: bk-ring 1.6s var(--ease) .3s 2; }
.bk-icon { display: grid; place-items: center; width: 92px; height: 92px; border-radius: 26px; background: var(--pl); color: var(--accent-ink); }
.bk-icon svg { width: 52px; height: 52px; stroke-width: 1.8; }
.bk-toast.show .bk-icon { animation: bk-bell 1s var(--ease) .4s 2; }
.bk-main { display: grid; gap: 6px; min-width: 0; }
.bk-eyebrow { font: 700 17px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--pl); }
.bk-name { font: 400 54px/1.02 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-size: 21px; color: var(--muted); }
.bk-pl { font-style: normal; font-weight: 700; color: var(--ink); padding: 4px 12px; border-radius: 999px; background: color-mix(in srgb, var(--pl) 30%, transparent); }
.bk-amount { font: 400 66px/1 var(--serif); color: var(--pl); white-space: nowrap; }
@keyframes bk-ring { from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pl) 55%, transparent); } to { box-shadow: 0 0 0 26px transparent; } }
@keyframes bk-bell { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-14deg); } 40% { transform: rotate(12deg); } 60% { transform: rotate(-8deg); } 80% { transform: rotate(5deg); } }
@media (prefers-reduced-motion: reduce) { .bk-toast { transition: opacity .3s; } }

/* ---------------- logo Adadò (wordmark ufficiale) ---------------- */
.brand-logo { width: auto; height: 26px; fill: currentColor; stroke: none; color: var(--accent); display: block; }
body.tv .brand-logo { height: 32px; }
.tvw-top .brand-logo { height: 34px; }
@media (max-width: 640px) { .brand-logo { height: 22px; } }

/* lockup: adadò + "Command Center." su due righe, punto quadrato arancione */
.brand { gap: 16px; align-items: center; }
.brand-cc { display: inline-block; font: 600 15px/1 var(--sans); letter-spacing: -.01em; color: var(--ink); white-space: nowrap; }
.brand-dot { display: inline-block; width: .38em; height: .38em; margin-left: .1em; background: var(--accent); vertical-align: baseline; }
body.tv .brand-cc { font-size: 18px; }
.tvw-top .brand { gap: 18px; }
.tvw-top .brand-cc { display: inline-block !important; font-size: 20px; }
@media (max-width: 640px) { .brand-cc { font-size: 12px; } }

/* ---------------- testi che non entrano: scorrono verso sinistra, a nastro ---------------- */
.mq { display: block; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mq-on { text-overflow: clip !important; white-space: nowrap; overflow: hidden;
  mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); }
mq-in { display: inline-flex; white-space: nowrap; will-change: transform; animation: mq var(--mqd, 8s) linear infinite; }
mq-part { display: inline-block; flex: none; padding-right: 56px; }
/* pausa sull'inizio (il primo 22% del giro), poi scorrimento costante fino alla copia */
@keyframes mq { 0%, 22% { transform: translateX(0); } 100% { transform: translateX(var(--mq, 0)); } }
@media (prefers-reduced-motion: reduce) { mq-in { animation-duration: calc(var(--mqd, 8s) * 2); } }

/* ---------------- Squadra Erkole (utenti del gestionale) ---------------- */
/* sei pagine: schede su una riga */
.tvw-tab { padding: 9px 10px 11px; font-size: 14px; }
.tvw-tab span { white-space: nowrap; }
.scene-erk { display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 12px; }
.scene-erk > .scene-empty { grid-row: 1 / -1; }
.scene-erk h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font: 600 16px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.scene-erk h3 > b { font: 400 26px/1 var(--serif); letter-spacing: 0; color: var(--ink); }
.scene-erk .empty { margin: 0; font-size: 18px; color: var(--faint); }

/* barra: periodo, aree, stato */
.sk-bar { display: flex; align-items: center; gap: 14px; min-width: 0; }
.sk-bar > .sk-seg, .sk-bar > .sk-range, .sk-bar > .sk-note { flex: none; }
.sk-bar > .sk-areas { flex: 1 1 auto; }
.sk-seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.sk-seg button { padding: 8px 16px; border-radius: 999px; font-size: 15px; font-weight: 600; color: var(--muted); transition: background .25s var(--ease), color .25s var(--ease); }
.sk-seg button.on { background: var(--accent); color: var(--accent-ink); }
.sk-seg button:not(.on):hover { color: var(--ink); }
.sk-range { font: 400 26px/1 var(--serif); white-space: nowrap; }
.tv-root.manual .sk-range { display: none; }
.tv-root:not(.manual) .sk-seg { display: none; }
.sk-areas { display: flex; gap: 8px; min-width: 0; overflow-x: auto; scrollbar-width: none; mask-image: linear-gradient(90deg, #000 calc(100% - 30px), transparent); padding-right: 30px; }
.sk-areas::-webkit-scrollbar { display: none; }
.sk-chip { flex: none; display: inline-flex; align-items: baseline; gap: 7px; padding: 7px 14px; border-radius: 999px; font-size: 15px; color: var(--muted); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap; transition: background .25s var(--ease), color .25s var(--ease); }
.sk-chip b { font-weight: 700; color: var(--ink); }
.sk-chip.on { background: color-mix(in srgb, var(--info) 22%, var(--surface)); color: var(--ink); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--info) 60%, transparent); }
.tv-root.manual .sk-chip:not(.on):hover { color: var(--ink); background: var(--surface-2); }
.sk-note { font-style: normal; font-size: 14px; color: var(--faint); white-space: nowrap; }
.sk-note.warn { color: var(--warm); font-weight: 600; }

/* numeri */
.skpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.skpis .xkpi { padding: 10px 18px; }
.skpis .xkpi span { font-size: 15px; }
.skpis .xkpi b { font-size: 48px; }
.skpis .xkpi small { font-size: 15px; }
.sk-people { background: color-mix(in srgb, var(--info) 12%, var(--surface)); box-shadow: var(--shadow), inset 0 0 0 2px color-mix(in srgb, var(--info) 40%, transparent); }
.sk-people b { color: var(--info); }

/* corpo: persone a sinistra, grafico e registro a destra */
.sk-body { display: grid; grid-template-columns: 560px minmax(0, 1fr); gap: 14px; min-height: 0; }
.sk-body > section { display: grid; min-height: 0; padding: 14px 18px; border-radius: 22px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.sk-left { grid-template-rows: auto minmax(0, 1fr) auto; }
.sk-right { grid-template-rows: auto auto auto minmax(0, 1fr); }
.sk-right:not(:has(.sk-who)) { grid-template-rows: auto auto minmax(0, 1fr); }

.sk-ava { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; overflow: hidden; background: color-mix(in srgb, var(--info) 22%, var(--surface-2)); box-shadow: 0 0 0 2px var(--surface-2); }
.sk-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sk-ini { font: 400 24px/1 var(--serif); color: var(--info); }
.sk-ava-s { width: 32px; height: 32px; }
.sk-ava-s.sk-ini { font-size: 17px; }
.sk-ava-xl { width: 76px; height: 76px; box-shadow: 0 0 0 3px var(--accent); }
.sk-ava-xl.sk-ini { font-size: 38px; }

.sk-plist { display: grid; grid-auto-rows: min-content; gap: 8px; min-height: 0; overflow: hidden; align-content: start; }
.skp { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 9px 12px 12px; border-radius: 16px; text-align: left; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; transition: box-shadow .25s var(--ease), background .25s var(--ease); }
.skp.quiet { opacity: .72; }
.skp.on { background: color-mix(in srgb, var(--accent) 12%, var(--surface-2)); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 70%, transparent); opacity: 1; }
.tv-root.manual .skp:not(.on):hover { box-shadow: inset 0 0 0 1px var(--line-strong); background: var(--raised); }
.skp-main { display: grid; gap: 3px; min-width: 0; }
.skp-main > b { font: 400 24px/1.1 var(--serif); }
.skp-main > small { font-size: 14px; color: var(--faint); }
.skp-spark { display: flex; align-items: end; gap: 2px; height: 16px; margin-top: 2px; }
.skp-spark i { flex: 1; height: max(2px, calc(var(--h) * 100%)); border-radius: 2px; background: var(--info); opacity: .85; }
.skp-spark i.z { background: var(--line); opacity: 1; }
.skp-num { display: grid; justify-items: end; line-height: 1; }
.skp-num strong { font: 400 42px/1 var(--serif); }
.skp-num em { font-style: normal; font-size: 13px; color: var(--faint); }
.skp-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: calc(var(--p) * 100%); background: var(--info); border-radius: 0 3px 3px 0; }
.skp.on .skp-bar { background: var(--accent); }

.sk-idle { display: grid; gap: 6px; padding-top: 10px; margin-top: 8px; border-top: 1px solid var(--line); min-width: 0; }
.sk-idle > span { font: 600 13px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.sk-idle-list { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; mask-image: linear-gradient(90deg, #000 calc(100% - 30px), transparent); padding-right: 30px; }
.sk-idle-list::-webkit-scrollbar { display: none; }
.sk-idle-list em { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; font-style: normal; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.sk-idle-list em b { font-size: 14px; font-weight: 600; white-space: nowrap; }
.sk-idle-list em small { font-size: 13px; color: var(--faint); white-space: nowrap; }
.sk-idle-list .sk-ava-s { width: 28px; height: 28px; }

.sk-who { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 4px 0 14px; margin-bottom: 12px; border-bottom: 1px solid var(--line); animation: rise .45s var(--ease); }
.sk-who-main { display: grid; gap: 4px; min-width: 0; }
.sk-who-main > b { font: 400 36px/1.05 var(--serif); }
.sk-who-main > small { font-size: 15px; color: var(--muted); }
.sk-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; }
.sk-tags em { font-style: normal; font-size: 14px; color: var(--muted); padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--info) 12%, transparent); }
.sk-tags em b { color: var(--ink); }
.sk-tags em.act-create { background: color-mix(in srgb, var(--good) 16%, transparent); }
.sk-tags em.act-delete { background: color-mix(in srgb, var(--bad) 16%, transparent); }
.sk-x { width: 38px; height: 38px; border-radius: 50%; font-size: 16px; color: var(--muted); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.sk-x:hover { color: var(--ink); background: var(--raised); }
.tv-root:not(.manual) .sk-x { display: none; }

.sk-chart { display: grid; grid-template-rows: auto 110px; min-height: 0; }
.sk-legend { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font: 500 13px/1 var(--sans); letter-spacing: .02em; text-transform: none; color: var(--faint); }
.sk-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-left: 10px; }
.sk-legend i.a { background: var(--info); }
.sk-legend i.l { background: var(--warm); }
.sk-bars { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 4px; align-items: stretch; min-height: 0; }
.sk-col { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 4px; min-width: 0; }
.sk-col-bars { display: flex; align-items: end; justify-content: center; gap: 2px; min-height: 0; border-bottom: 1px solid var(--line); }
.sk-col-bars i { flex: 1; max-width: 22px; height: calc(var(--h) * 100%); border-radius: 4px 4px 1px 1px; animation: grow .7s var(--ease) both; transform-origin: bottom; }
.sk-col-bars i.a { background: var(--info); }
.sk-col-bars i.l { background: color-mix(in srgb, var(--warm) 75%, transparent); max-width: 10px; }
.sk-col span { font-size: 12px; color: var(--faint); text-align: center; white-space: nowrap; }
.scene:not(.on) .sk-col-bars i { animation: none; }

.sk-feed-h { margin-top: 12px !important; }
.sk-feed { display: grid; grid-auto-rows: min-content; align-content: start; min-height: 0; overflow: hidden; }
.skf { display: grid; grid-template-columns: 88px auto minmax(0, 1fr) auto 26px; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.skf > em { font-style: normal; font-size: 15px; color: var(--faint); white-space: nowrap; }
.skf-who { display: block; border-radius: 50%; }
.skf-main { display: grid; gap: 2px; min-width: 0; }
.skf-main > b { font-size: 18px; font-weight: 600; color: var(--ink); }
.skf-main > b span { font-weight: 400; color: var(--muted); }
.skf-main > small { font-size: 14px; color: var(--faint); }
.skf-area { font-size: 13px; font-weight: 600; color: var(--muted); padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--info) 12%, transparent); white-space: nowrap; }
.skf.act-create .skf-area { background: color-mix(in srgb, var(--good) 16%, transparent); }
.skf.act-delete .skf-area { background: color-mix(in srgb, var(--bad) 18%, transparent); }
.skf-link { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; font-size: 15px; text-decoration: none; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.skf-link:hover { background: var(--accent); color: var(--accent-ink); }
.tv-root:not(.manual) .skf-link { visibility: hidden; }

/* nella dashboard le liste scorrono con la rotella o il dito */
.tv-root.manual .sk-plist, .tv-root.manual .sk-feed { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; padding-right: 4px; }
.tv-root.manual .sk-idle-list { overflow-x: auto; }
.tv-root:not(.manual) .sk-plist, .tv-root:not(.manual) .sk-feed { mask-image: linear-gradient(180deg, #000 calc(100% - 46px), transparent); }
.xrow { grid-template-columns: 34px minmax(0, 1fr) auto; }
.xrow > div, .erow > div, .eitem > div, .frow > div { min-width: 0; }

/* ---------------- Cleaners (team di pulizia, da Live Feedback) ---------------- */
.scene-clean { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 14px; }
.scene-clean > .scene-empty { grid-row: 1 / -1; }
.scene-clean h3 { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; font: 600 16px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.scene-clean .empty { margin: 0; font-size: 18px; color: var(--faint); }
.cl-kpis b.good, .cl-score.good, .cl-detail strong.good, .cl-stats b.good, .cl-w strong.good { color: var(--good); }
.cl-kpis b.warm, .cl-score.warm, .cl-detail strong.warm, .cl-stats b.warm, .cl-w strong.warm { color: var(--warm); }
.cl-kpis b.bad, .cl-score.bad, .cl-detail strong.bad, .cl-stats b.bad, .cl-w strong.bad, .cl-num.bad { color: var(--bad); }
.cl-kpis .cl-name { font-size: 34px !important; line-height: 1.35 !important; }
.cl-k-avg { background: color-mix(in srgb, var(--good) 10%, var(--surface)); box-shadow: var(--shadow), inset 0 0 0 2px color-mix(in srgb, var(--good) 35%, transparent); }
.cl-k-watch { background: color-mix(in srgb, var(--bad) 10%, var(--surface)); box-shadow: var(--shadow), inset 0 0 0 2px color-mix(in srgb, var(--bad) 40%, transparent); }
.cl-k-watch b { color: var(--bad); }

.cl-body { display: grid; grid-template-columns: minmax(0, 1fr) 480px; gap: 14px; min-height: 0; }
.cl-body > section { display: grid; min-height: 0; padding: 14px 18px; border-radius: 22px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.cl-board { grid-template-rows: auto auto minmax(0, 1fr); }
.cl-head, .cl-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) 60px 180px 66px 92px 62px 150px; align-items: center; gap: 12px; }
.cl-head { padding: 0 12px 8px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); border-bottom: 1px solid var(--line); }
.cl-head span:nth-child(n+5):nth-child(-n+7) { text-align: right; }
.cl-list { display: grid; grid-auto-rows: min-content; align-content: start; min-height: 0; overflow: hidden; }
.cl-row { width: 100%; padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; border-radius: 12px; transition: background .25s var(--ease); }
.cl-row.on { background: color-mix(in srgb, var(--accent) 14%, transparent); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 60%, transparent); }
.tv-root.manual .cl-row:not(.on):hover, .tv-root.manual .cl-pod:hover, .tv-root.manual .cl-w:hover { background: var(--surface-2); }
.cl-rank { font: 400 24px/1 var(--serif); font-style: normal; color: var(--faint); }
.cl-row > b { font: 400 24px/1.15 var(--serif); }
.cl-score { font: 400 34px/1 var(--serif); }
.cl-num { font-size: 17px; color: var(--muted); text-align: right; }
.cl-d { font-style: normal; font-size: 15px; font-weight: 700; text-align: right; color: var(--faint); white-space: nowrap; }
.cl-d.up { color: var(--good); } .cl-d.down { color: var(--bad); }
.cl-spark { display: flex; align-items: end; gap: 2px; height: 30px; }
.cl-spark i { flex: 1; height: calc(var(--h) * 100%); min-height: 2px; border-radius: 2px; background: var(--info); position: relative; }
.cl-spark i.good { background: var(--good); } .cl-spark i.warm { background: var(--warm); } .cl-spark i.bad { background: var(--bad); }
.cl-spark i.z { background: var(--line); height: 2px; }
.cl-spark i[data-c]::after { content: ''; position: absolute; left: 50%; top: -6px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--bad); }
.cl-badge { justify-self: start; font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; color: var(--muted); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.cl-badge.good { color: var(--good); background: color-mix(in srgb, var(--good) 14%, transparent); box-shadow: none; }
.cl-badge.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); box-shadow: none; }

.cl-side { grid-template-rows: auto auto auto minmax(0, 1fr); align-content: start; }
.cl-podium { display: grid; gap: 8px; margin-bottom: 16px; }
.cl-pod { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 10px 14px; border-radius: 16px; text-align: left; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.cl-pod em { grid-row: 1 / 3; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font: 400 24px/1 var(--serif); font-style: normal; color: var(--accent-ink); background: var(--good); }
.cl-pod.p2 em { background: color-mix(in srgb, var(--good) 70%, var(--surface)); }
.cl-pod.p3 em { background: color-mix(in srgb, var(--good) 45%, var(--surface)); }
.cl-pod b { font: 400 25px/1.1 var(--serif); }
.cl-pod strong { grid-row: 1 / 3; grid-column: 3; font: 400 40px/1 var(--serif); color: var(--good); }
.cl-pod span { font-size: 14px; color: var(--faint); }
.cl-watch { display: grid; gap: 8px; align-content: start; }
.cl-w { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; padding: 10px 14px; border-radius: 16px; text-align: left; background: color-mix(in srgb, var(--bad) 8%, var(--surface-2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bad) 35%, transparent); }
.cl-w b { font: 400 23px/1.1 var(--serif); }
.cl-w strong { grid-row: 1 / 3; grid-column: 2; align-self: center; font: 400 34px/1 var(--serif); }
.cl-w span { font-size: 14px; color: var(--bad); }
.cl-side .eclear { min-height: 160px; }

.cl-detail { display: grid; grid-template-rows: auto auto auto minmax(0, 1fr) auto auto; gap: 12px; min-height: 0; animation: rise .45s var(--ease); }
.cl-detail header { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 14px; }
.cl-detail header div { display: grid; gap: 4px; min-width: 0; }
.cl-detail header span { font: 600 13px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.cl-detail header b { font: 400 34px/1.1 var(--serif); }
.cl-detail header strong { font: 400 64px/1 var(--serif); }
.tv-root:not(.manual) .cl-detail .sk-x { display: none; }
.cl-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cl-stats div { display: grid; gap: 2px; padding: 10px 14px; border-radius: 14px; background: var(--surface-2); }
.cl-stats b { font: 400 30px/1 var(--serif); }
.cl-stats span { font-size: 13px; color: var(--faint); }
.cl-detail h3 { margin: 4px 0 0; }
.cl-chart { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 3px; min-height: 110px; align-items: stretch; }
.cl-c { position: relative; display: flex; flex-direction: column; justify-content: end; gap: 3px; }
.cl-c i { height: calc(var(--h) * 100%); border-radius: 3px 3px 1px 1px; background: var(--info); animation: grow .7s var(--ease) both; transform-origin: bottom; }
.cl-c i.good { background: var(--good); } .cl-c i.warm { background: var(--warm); } .cl-c i.bad { background: var(--bad); }
.cl-c i.z { background: var(--line); }
.cl-c u { display: block; height: 4px; border-radius: 2px; background: var(--info); opacity: calc(.15 + var(--n) * .85); }
.cl-c s { position: absolute; top: -2px; left: 50%; transform: translateX(-50%); min-width: 16px; padding: 1px 4px; border-radius: 999px; font: 700 10px/1.3 var(--sans); text-decoration: none; text-align: center; color: var(--accent-ink); background: var(--bad); }
.cl-legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 0; font-size: 13px; color: var(--faint); }
.cl-legend u { display: inline-block; width: 16px; height: 4px; margin-right: 6px; vertical-align: middle; border-radius: 2px; background: var(--info); }
.cl-legend s { display: inline-block; margin-right: 4px; padding: 0 5px; border-radius: 999px; font-size: 10px; font-weight: 700; text-decoration: none; color: var(--accent-ink); background: var(--bad); }
.cl-reasons { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.cl-reasons em { font-style: normal; font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }
.scene:not(.on) .cl-c i { animation: none; }
.tv-root.manual .cl-list { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.tv-root:not(.manual) .cl-list { mask-image: linear-gradient(180deg, #000 calc(100% - 46px), transparent); }
/* sette pagine: schede ancora su una riga */
.tvw-tab { padding: 9px 9px 11px; font-size: 13.5px; letter-spacing: .04em; }

/* ---------------- barra delle pagine: capsula unica, attiva a pillola ---------------- */
.tvw-top { grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 22px; }
.tvw-tabs { justify-self: center; display: inline-flex; gap: 2px; padding: 5px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 80%, transparent); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.tvw-tab { position: relative; display: block; min-width: 0; padding: 10px 15px; border-radius: 999px; font: 600 13px/1 var(--sans); letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; color: var(--faint); background: transparent; transition: color .35s var(--ease), background .35s var(--ease), box-shadow .35s var(--ease); }
.tvw-tab span { display: block; white-space: nowrap; }
.tvw-tab.on { color: var(--ink); background: var(--raised); box-shadow: 0 1px 0 rgb(255 255 255 / .04) inset, 0 6px 16px -8px rgb(0 0 0 / .6); }
.tvw-tab i { position: absolute; left: 15px; right: 15px; bottom: 4px; height: 2px; border-radius: 2px; background: transparent; overflow: hidden; opacity: 0; transition: opacity .3s var(--ease); }
.tvw-tab.on i { opacity: 1; background: color-mix(in srgb, var(--accent) 22%, transparent); }
.tvw-tab b { display: block; height: 100%; background: var(--accent); transform-origin: left; }
.tv-root.manual .tvw-tab.on i { opacity: 0; }
.tv-root.manual .tvw-tab:not(.on):hover { color: var(--ink); background: color-mix(in srgb, var(--raised) 55%, transparent); }
.tvw-status .tot { font-size: 15px; padding: 7px 12px; }

/* ---------------- testata: spazio tra logo, pagine, avvisi e orologio ---------------- */
.tvw-top { gap: 30px; padding: 0 32px; }
.tvw-top .brand { gap: 14px; flex: none; }
.tvw-top .brand-logo { height: 30px; }
.tvw-top .brand-cc { font-size: 17px; }
.tvw-tabs { gap: 1px; padding: 4px; }
.tvw-tab { padding: 9px 11px; font-size: 12.5px; letter-spacing: .05em; }
.tvw-tab i { left: 11px; right: 11px; }
.tvw-status { flex: none; }
.tvw-status .tot { font-size: 15px; padding: 7px 13px; white-space: nowrap; }
.tot-sep { font-style: normal; margin: 0 7px; color: var(--muted); opacity: .7; }
.tvw-clock b { font-size: 40px; }
.tvw-clock span { font-size: 14px; }

/* ---------------- nessuna informazione tagliata: file di pillole e testi a nastro ---------------- */
mq-in { flex: none; }
.sk-areas.mq-on, .sk-idle-list.mq-on { overflow: hidden; padding-right: 0; mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); }
.sk-areas mq-part { display: inline-flex; gap: 8px; }
.sk-idle-list mq-part { display: inline-flex; gap: 8px; }
.tv-root.manual .mq-on:hover > mq-in { animation-play-state: paused; }
/* estratti delle recensioni: le schede dietro su una riga che scorre, quella in primo piano intera */
.rcard:not(.front) p { display: block; white-space: nowrap; overflow: hidden; -webkit-line-clamp: unset; }
.rcard.front p { -webkit-line-clamp: unset; display: block; }
/* organigramma sulla TV: la riga di stato su una riga che scorre invece di due righe tagliate */
.scene-team .line { display: block; height: auto; white-space: nowrap; overflow: hidden; -webkit-line-clamp: unset; }
mq-in.long { animation-name: mq-long; }
@keyframes mq-long { 0%, 6% { transform: translateX(0); } 100% { transform: translateX(var(--mq, 0)); } }

/* ---------------- Strutture (piu' critiche e migliori, 30 giorni) ---------------- */
.pr-body { grid-template-columns: minmax(0, 1fr) 470px; }
.pr-head, .pr-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) 58px 50px 50px 250px 56px 60px 62px; align-items: center; gap: 10px; }
.pr-head { padding: 0 12px 8px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); border-bottom: 1px solid var(--line); }
.pr-head span:nth-child(n+4):nth-child(-n+5), .pr-head span:nth-child(n+7) { text-align: right; }
.pr-row { width: 100%; padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; border-radius: 12px; transition: background .25s var(--ease); }
.pr-row > b { font: 400 22px/1.15 var(--serif); }
.pr-row.on, .pr-best.on { background: color-mix(in srgb, var(--accent) 14%, transparent); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 60%, transparent); }
.tv-root.manual .pr-row:not(.on):hover, .tv-root.manual .pr-best:not(.on):hover { background: var(--surface-2); }
.cl-num.warn { color: var(--warm); }
.pr-chips { display: block; white-space: nowrap; overflow: hidden; }
.pr-chips mq-part, .pr-chips { gap: 6px; }
.pr-c { display: inline-block; margin-right: 6px; font-style: normal; font-size: 13px; font-weight: 600; padding: 3px 9px; border-radius: 999px; color: var(--muted); background: var(--surface-2); }
.pr-c b { color: var(--ink); }
.pr-c.pr-more { color: var(--faint); }
/* reclamo piu' frequente: intero e fermo, alla misura del riquadro */
.skpis .cl-name { font-size: 38px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-c.pr-pulizia { background: color-mix(in srgb, var(--info) 16%, transparent); }
.pr-c.pr-manutenzione { background: color-mix(in srgb, var(--warm) 18%, transparent); }
.pr-c.pr-struttura { background: color-mix(in srgb, var(--fam-bkg) 16%, transparent); }
.pr-c.pr-assistenza { background: color-mix(in srgb, var(--bad) 16%, transparent); }
.pr-none { font-style: normal; font-size: 13px; color: var(--faint); }
.pr-best-list { display: grid; gap: 8px; align-content: start; }
.pr-best { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 14px; border-radius: 16px; text-align: left; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.pr-best > em { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font: 400 20px/1 var(--serif); font-style: normal; color: var(--accent-ink); background: var(--good); }
.pr-best-main { display: grid; gap: 3px; min-width: 0; }
.pr-best-main b { font: 400 22px/1.1 var(--serif); }
.pr-best-main small { font-size: 13px; color: var(--faint); }
.pr-best > strong { font: 400 36px/1 var(--serif); }
.pr-best > strong.good { color: var(--good); } .pr-best > strong.warm { color: var(--warm); } .pr-best > strong.bad { color: var(--bad); }
.pr-detail { grid-template-rows: auto auto auto auto auto minmax(0, 1fr); }
.pr-stats { grid-template-columns: repeat(3, 1fr); }
.pr-stats div { padding: 8px 12px; }
.pr-stats b { font-size: 26px; }
.pr-bars { display: grid; gap: 6px; }
.pr-bar { display: grid; grid-template-columns: 110px 1fr 34px; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.pr-bar i { height: 10px; border-radius: 10px; background: var(--raised); position: relative; overflow: hidden; }
.pr-bar i::after { content: ''; position: absolute; inset: 0; width: calc(var(--p) * 100%); border-radius: inherit; background: var(--info); }
.pr-bar i.pr-manutenzione::after { background: var(--warm); } .pr-bar i.pr-struttura::after { background: var(--fam-bkg); } .pr-bar i.pr-assistenza::after { background: var(--bad); }
.pr-bar b { text-align: right; color: var(--ink); }
.scene-props .cl-chart { min-height: 90px; }

/* ---------------- loghi delle piattaforme (targhetta chiara, leggibile in entrambi i temi) ---------------- */
.brand-chip { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; background: #fff; border-radius: 7px; box-shadow: 0 1px 2px rgb(0 0 0 / .18); line-height: 0; flex: none; }
.brand-chip img { display: block; width: auto; height: 100%; }
.brand-word { height: 22px; padding: 4px 8px; }
.brand-mark { height: 20px; padding: 3px; border-radius: 6px; }
.brand-mark.brand-booking { padding: 0; background: transparent; box-shadow: none; }
.brand-mark.brand-booking img { border-radius: 5px; }
/* Economics: tessere delle piattaforme */
.xp > b .xp-logo { height: 30px; padding: 6px 11px; border-radius: 9px; }
/* avviso nuova prenotazione */
.bk-logo { height: 34px; padding: 7px 12px; border-radius: 10px; }
/* nastro Live */
.ti .ti-logo { height: 22px; margin: 0 2px 0 6px; transform: translateY(-2px); }
/* organigramma: famiglie Vikey, Booking, Airbnb */
.fam-label .fam-logo { height: 20px; padding: 3px 7px; border-radius: 6px; }
body.tv .fam-label .fam-logo, .scene-team .fam-label .fam-logo { height: 24px; padding: 4px 9px; }
/* elenchi (Top sales, recensioni): simbolo accanto al testo */
.xrow span .brand-mark, .rcard .brand-mark, .frow .brand-mark { height: 18px; margin: 0 1px; transform: translateY(-1px); }
/* logo per esteso ridotto dentro le righe di testo (Top sales, recensioni) */
.brand-chip.inline-logo { height: 20px; padding: 3px 7px; border-radius: 5px; transform: translateY(-1px); }
.ti .brand-chip.ti-logo { height: 24px; padding: 4px 8px; border-radius: 6px; }

/* Adadò Direct (prenotazioni dal sito): logo compatto sul blu del sito */
.brand-chip.brand-direct { gap: .45em; padding: 0 .75em; background: #1f00f7; color: #fff; font: 700 12px/1 var(--sans); letter-spacing: .14em; box-shadow: 0 1px 2px rgb(0 0 0 / .25); }
.brand-chip.brand-direct svg { width: auto !important; height: 1.4em !important; fill: #fff; stroke: none; flex: none; }
.brand-chip.brand-direct .bd-word { font: 700 1em/1 var(--sans) !important; letter-spacing: .14em; color: #ee7a3e !important; transform: translateY(.08em); white-space: nowrap; }
.xp > b .xp-logo.brand-direct { font-size: 15px; }
.bk-logo.brand-direct { font-size: 17px; }
.brand-direct.inline-logo, .ti .brand-direct.ti-logo { font-size: 11px; }
.fam-label .brand-direct { font-size: 11px; }

/* ---------------- loghi delle piattaforme: trasparenti, variante chiara nel tema scuro ---------------- */
.brand-chip { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; background: none !important; box-shadow: none !important; border-radius: 0; padding: 0 !important; line-height: 0; flex: none; }
.brand-chip img { display: block; width: auto; height: 100%; }
.brand-chip img.on-light { display: none; }
[data-theme="ivory"] .brand-chip img.on-dark { display: none; }
[data-theme="ivory"] .brand-chip img.on-light { display: block; }
.brand-chip.brand-direct { gap: .4em; color: var(--ink); background: none !important; font: 700 12px/1 var(--sans); letter-spacing: .14em; }
.brand-chip.brand-direct svg { fill: currentColor !important; }
/* Google: "G" a colori e scritta nel colore del testo */
.brand-chip.brand-google { gap: .35em; color: var(--ink); font: 600 13px/1 var(--sans); letter-spacing: 0; }
.brand-chip.brand-google svg { width: auto !important; height: 1.25em !important; flex: none; stroke: none; }
.brand-chip.brand-google .bg-word { font: 600 1em/1 var(--sans) !important; white-space: nowrap; }
.xp > b .xp-logo.brand-google { font-size: 24px !important; }
.bk-logo.brand-google { font-size: 17px !important; }
.brand-google.inline-logo, .ti .brand-google.ti-logo, .fam-label .brand-google { font-size: 11px !important; }
.bk-side-logo.brand-google { font-size: 11px !important; height: auto; padding: 0; }
.brand-word { height: 18px; }
.brand-mark { height: 18px; }
.xp > b .xp-logo { height: 26px; }
.bk-logo { height: 30px; }
.ti .brand-chip.ti-logo { height: 20px; margin: 0 4px 0 8px; }
.brand-chip.inline-logo { height: 15px; transform: translateY(1px); }
.fam-label .fam-logo, body.tv .fam-label .fam-logo, .scene-team .fam-label .fam-logo { height: 17px; }

/* il tabellone (anche dentro la dashboard) mostra sempre il suo marchio "adadò Command Center." */
body.embed .tvw-top .brand { display: flex; }

/* ---------------- grafico attivita' di Human Team ---------------- */
.sk-chart { grid-template-rows: auto 168px; }
.skc { display: grid; grid-template-columns: 30px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; column-gap: 8px; height: 100%; min-height: 0; }
.skc-grid { grid-row: 1; grid-column: 1; display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; line-height: 1; color: var(--faint); text-align: right; padding: 0 0 1px; }
.skc-plot { grid-row: 1; grid-column: 2; position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 3px; align-items: end; min-height: 0;
  background-image: linear-gradient(color-mix(in srgb, var(--line) 80%, transparent) 1px, transparent 1px); background-size: 100% 50%; border-bottom: 1px solid var(--line-strong); }
.skc.daily .skc-plot { gap: 8px; }
.skc-col { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; border-radius: 8px 8px 0 0; }
.skc-col.we { background: color-mix(in srgb, var(--raised) 45%, transparent); }
.skc-col i { position: relative; width: 100%; max-width: 26px; height: calc(var(--h) * 100%); min-height: 2px; border-radius: 7px 7px 2px 2px;
  background: linear-gradient(180deg, var(--info), color-mix(in srgb, var(--info) 30%, transparent)); animation: grow .7s var(--ease) both; transform-origin: bottom; }
.skc.daily .skc-col i { max-width: 38px; }
.skc-col.now i { background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 30%, transparent)); }
.skc-col i b { position: absolute; bottom: 100%; left: 50%; transform: translate(-50%, -5px); font: 700 12px/1 var(--sans); color: var(--ink); white-space: nowrap; }
.scene:not(.on) .skc-col i { animation: none; }
.skc-line { position: absolute; inset: 0; width: 100% !important; height: 100% !important; overflow: visible; pointer-events: none; }
.skc-line polyline { fill: none; stroke: var(--warm) !important; stroke-width: 2.2 !important; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; opacity: .9; }
.skc-dot { position: absolute; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: var(--warm); box-shadow: 0 0 0 2px var(--surface); pointer-events: none; }
.skc-axis { grid-row: 2; grid-column: 2; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 3px; margin-top: 6px; }
.skc.daily .skc-axis { gap: 8px; }
.skc-axis span { text-align: center; font-size: 12px; line-height: 1.15; color: var(--faint); white-space: nowrap; }
.skc-axis span.now { color: var(--accent); font-weight: 700; }
.skc.daily .skc-axis span { display: grid; gap: 1px; }
.skc.daily .skc-axis b { font-size: 11px; font-weight: 600; text-transform: capitalize; }
.skc.daily .skc-axis small { font: 400 15px/1 var(--serif); color: var(--muted); }
.skc.daily .skc-axis span.we b { color: var(--warm); }
.skc.daily .skc-axis span.now small { color: var(--accent); }
.sk-legend i.l { height: 3px; border-radius: 2px; }

/* ---------------- adadò TV (27/09/2026): logo adadò + "TV" al posto di "Command Center" ---------------- */
.brand-cc.brand-tv { font: 800 22px/1 var(--sans); letter-spacing: .02em; }
body.tv .brand-cc.brand-tv { font-size: 26px; }
.tvw-top .brand-cc.brand-tv { font-size: 26px; }
@media (max-width: 640px) { .brand-cc.brand-tv { font-size: 17px; } }

/* ---------------- avviso "Nuova recensione" (27/09/2026) ----------------
   Stessa carta della prenotazione, colore dal voto; sopra l'8 in oro, con i fuochi. */
.rv-toast.rv-good { --pl: var(--good); }
.rv-toast.rv-warm { --pl: var(--warm); }
.rv-toast.rv-bad { --pl: var(--bad); }
.rv-toast.rv-big { --pl: #f2c14e; }
.rv-toast .bk-icon svg { fill: currentColor; stroke: none; }
.rv-toast.show .bk-icon { animation: rv-pop .9s var(--ease) .3s 2; }
.bk-amount small { margin-left: 6px; font: 600 22px/1 var(--sans); letter-spacing: .02em; color: var(--muted); }
@keyframes rv-pop { 0%, 100% { transform: scale(1) rotate(0); } 40% { transform: scale(1.18) rotate(-10deg); } 70% { transform: scale(.95) rotate(6deg); } }
.fw-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 19; pointer-events: none; opacity: 0; transition: opacity .3s var(--ease); }
.fw-canvas.on { opacity: 1; }

/* ---------------- giornata in corso (27/09/2026): Cleaners, Strutture, Economics ---------------- */
.cl-head.cl-today, .cl-row.cl-today { grid-template-columns: 30px minmax(0, 1fr) 64px 60px 76px 70px 170px; }
.cl-head.cl-today span { text-align: left; }
.cl-head.cl-today span:nth-child(n+4):nth-child(-n+6) { text-align: right; }
.cl-row.cl-today.idle { opacity: .5; }
.pr-head.pr-today, .pr-row.pr-today { grid-template-columns: 30px minmax(0, 1fr) 58px 50px 50px 280px 60px 64px; }
.ebars.ehours { grid-template-columns: repeat(var(--cols, 24), minmax(0, 1fr)); gap: 6px; }
.ebars.ehours .ebar-val { font-size: 12px; }
.fbody .fside-main { min-width: 0; }

/* ---------------- mazzo degli avvisi (27/09/2026) ----------------
   Arrivi dello stesso momento: la prima carta entra dal basso, poi le altre escono da
   dietro e si aprono verso l'alto una dopo l'altra. */
.bk-deck {
  position: absolute; left: 50%; bottom: 84px; z-index: 20;
  display: flex; flex-direction: column-reverse; align-items: stretch; gap: 12px;
  width: max-content; min-width: 820px; max-width: 1180px;
  transform: translate(-50%, 140%) scale(.96); opacity: 0; pointer-events: none;
  transition: transform .7s cubic-bezier(.2, 1.3, .4, 1), opacity .5s var(--ease);
}
.bk-deck.show { transform: translate(-50%, 0) scale(1); opacity: 1; }
.bk-deck .bk-toast {
  position: relative; left: auto; bottom: auto; z-index: calc(10 - var(--k, 0));
  min-width: 0; max-width: none; transform: none; opacity: 1;
  transition: transform .65s cubic-bezier(.2, 1.2, .4, 1) calc(var(--k, 0) * 160ms), opacity .45s var(--ease) calc(var(--k, 0) * 160ms);
}
.bk-deck .folded { transform: translateY(calc(var(--k, 1) * 96px + 30px)) scale(.94); opacity: 0; }
.bk-deck.show .bk-toast:first-child .bk-glow { animation: bk-ring 1.6s var(--ease) .3s 2; }
.bk-deck.show .bk-toast:first-child .bk-icon { animation: bk-bell 1s var(--ease) .4s 2; }
.bk-deck.show .rv-toast:first-child .bk-icon { animation: rv-pop .9s var(--ease) .3s 2; }
.bk-toast.mini { gap: 18px; padding: 12px 24px 12px 14px; border-radius: 22px; }
.bk-toast.mini .bk-icon { width: 58px; height: 58px; border-radius: 18px; }
.bk-toast.mini .bk-icon svg { width: 32px; height: 32px; }
.bk-toast.mini .bk-main { gap: 4px; }
.bk-toast.mini .bk-eyebrow { font-size: 13px; }
.bk-toast.mini .bk-name { font-size: 32px; }
.bk-toast.mini .bk-meta { font-size: 17px; }
.bk-toast.mini .bk-amount { font-size: 40px; }
.bk-toast.mini .bk-amount small { font-size: 16px; }
.bk-more {
  position: relative; align-self: center; padding: 10px 22px; border-radius: 999px;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line);
  font: 700 18px/1 var(--sans); color: var(--muted);
  transition: transform .65s cubic-bezier(.2, 1.2, .4, 1) calc(var(--k, 0) * 160ms), opacity .45s var(--ease) calc(var(--k, 0) * 160ms);
}
@media (prefers-reduced-motion: reduce) { .bk-deck, .bk-deck .bk-toast, .bk-more { transition: opacity .3s; } }

/* ---------------- logo adadò TV (27/09/2026) ----------------
   Sfondo trasparente, palette adado': "adado'" blu, "tv" arancio. Sul tema scuro il blu
   del marchio (#1E00F7) si legge poco: si usa una tinta piu' chiara dello stesso blu. */
:root { --tv-blue: #5b6bff; --tv-orange: #ea6230; }
[data-theme="ivory"] { --tv-blue: #1e00f7; --tv-orange: #e0582a; }
.brand-tvlogo { display: inline-flex; align-items: center; }
.brand-tv-logo { display: block; height: 34px; width: auto; }
.brand-tv-logo .tvl-word { fill: var(--tv-blue); }
.brand-tv-logo .tvl-tv { fill: var(--tv-orange); }
.tvw-top .brand-tv-logo { height: 42px; }
@media (max-width: 640px) { .brand-tv-logo { height: 24px; } }

/* ---------------- pagina Recensioni (27/09/2026, rifatta) ----------------
   Due fasce: media di oggi in un anello + distribuzione dei voti; sotto reclami di oggi,
   ultime recensioni, percorso FRS di oggi. Tutto sulla giornata in corso. */
.scene-rev { display: grid; grid-template-columns: 580px minmax(0, 1fr) 440px; grid-template-rows: 330px minmax(0, 1fr); gap: 16px; height: 100%; min-height: 0; }
.rv-card { position: relative; min-width: 0; min-height: 0; padding: 20px 24px; border-radius: 24px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); overflow: hidden; }
.rv-card h3 { display: flex; align-items: baseline; gap: 14px; margin: 0 0 14px; font: 600 17px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.rv-note { font: 500 15px/1 var(--sans); letter-spacing: .02em; text-transform: none; color: var(--faint); font-style: normal; }
.rv-sub { margin-top: 18px !important; margin-bottom: 10px !important; }

.rv-hero { display: grid; grid-template-columns: 224px minmax(0, 1fr); align-items: center; gap: 26px; --tone: var(--info); }
.rv-hero.good { --tone: var(--good); } .rv-hero.warm { --tone: var(--warm); } .rv-hero.bad { --tone: var(--bad); }
.rv-hero::before { content: ''; position: absolute; left: -80px; top: -80px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--tone) 22%, transparent), transparent 70%); pointer-events: none; }
.rv-ring-box { position: relative; width: 224px; height: 224px; }
.rv-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.rv-ring-track { fill: none; stroke: var(--line); stroke-width: 16; }
.rv-ring-val { fill: none; stroke: var(--tone); stroke-width: 16; stroke-linecap: round; transition: stroke-dasharray 1.2s var(--ease); filter: drop-shadow(0 0 10px color-mix(in srgb, var(--tone) 45%, transparent)); }
.rv-ring-num { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 2px; }
.rv-ring-num b { font: 400 84px/0.9 var(--serif); color: var(--tone); }
.rv-ring-num span { font-size: 15px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.rv-hero-side { display: grid; gap: 6px; min-width: 0; }
.rv-eyebrow { font: 600 15px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.rv-total { font: 400 72px/1 var(--serif); color: var(--ink); }
.rv-split { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 9px; }
.rv-split li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; align-items: center; gap: 12px; font-size: 19px; color: var(--muted); white-space: nowrap; }
.rv-legend { margin-top: 4px; font-size: 14px; color: var(--faint); white-space: nowrap; }
.rv-split li i { width: 12px; height: 12px; border-radius: 4px; background: var(--good); }
.rv-split li.warm i { background: var(--warm); } .rv-split li.bad i { background: var(--bad); }
.rv-split li b { font: 400 34px/1 var(--serif); color: var(--ink); }

.rv-dist { grid-column: 2 / 4; display: grid; grid-template-rows: auto minmax(0, 1fr); }
.rv-bars { position: relative; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 14px; align-items: end; min-height: 0; height: 100%; padding-bottom: 2px; }
.rv-bar { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; min-height: 0; }
.rv-bar i { flex: none; width: 100%; height: calc(var(--h) * (100% - 72px)); min-height: 3px; border-radius: 10px 10px 4px 4px; background: linear-gradient(180deg, var(--good), color-mix(in srgb, var(--good) 45%, transparent)); animation: grow .9s var(--ease) both; transform-origin: bottom; }
.rv-bar.warm i { background: linear-gradient(180deg, var(--warm), color-mix(in srgb, var(--warm) 45%, transparent)); }
.rv-bar.bad i { background: linear-gradient(180deg, var(--bad), color-mix(in srgb, var(--bad) 45%, transparent)); }
.rv-bar.zero i { background: var(--line); }
.rv-bar-n { font: 400 30px/1 var(--serif); color: var(--ink); min-height: 30px; }
.rv-bar-x { margin-top: 2px; }
.rv-bar-x { font: 700 17px/1 var(--sans); color: var(--faint); }
.rv-avg-mark { position: absolute; top: 0; bottom: 26px; left: calc(var(--x) * 100%); width: 0; border-left: 2px dashed color-mix(in srgb, var(--ink) 55%, transparent); pointer-events: none; }
.rv-avg-mark span { position: absolute; top: 0; left: 8px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font: 600 14px/1 var(--sans); color: var(--ink); white-space: nowrap; }
.scene:not(.on) .rv-bar i { animation: none; }

.rv-cat-list { display: grid; gap: 10px; }
.rv-cat { display: grid; grid-template-columns: 140px minmax(0, 1fr) 40px; align-items: center; gap: 12px; font-size: 18px; color: var(--muted); }
.rv-cat i { height: 14px; border-radius: 999px; background: var(--line); overflow: hidden; }
.rv-cat u { display: block; height: 100%; width: calc(var(--p) * 100%); border-radius: inherit; background: var(--bad); }
.rv-cat.pr-pulizia u { background: var(--info); } .rv-cat.pr-manutenzione u { background: var(--warm); } .rv-cat.pr-struttura u { background: var(--accent); }
.rv-cat b { font: 400 28px/1 var(--serif); color: var(--ink); text-align: right; }
.rv-worst { display: grid; gap: 6px; }
.rv-w { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 7px 12px; border-radius: 14px; background: color-mix(in srgb, var(--bad) 8%, var(--surface-2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bad) 25%, transparent); }
.rv-w b { font: 400 22px/1.1 var(--serif); white-space: nowrap; overflow: hidden; }
.rv-w em { font-style: normal; font-size: 15px; color: var(--muted); white-space: nowrap; }
.rv-w strong { font: 400 30px/1 var(--serif); }
.rv-w strong.good { color: var(--good); } .rv-w strong.warm { color: var(--warm); } .rv-w strong.bad { color: var(--bad); }

.rv-feed-list { display: grid; gap: 12px; }
.rv-item { display: grid; grid-template-columns: 84px minmax(0, 1fr); align-items: center; gap: 18px; padding: 10px 12px 10px 10px; border-radius: 18px; }
.rv-item.fresh { background: color-mix(in srgb, var(--accent) 9%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }
.rv-tile { display: grid; grid-auto-flow: row; place-content: center; justify-items: center; width: 84px; height: 76px; border-radius: 16px; background: color-mix(in srgb, var(--good) 22%, var(--surface-2)); color: var(--good); }
.rv-tile.warm { background: color-mix(in srgb, var(--warm) 20%, var(--surface-2)); color: var(--warm); }
.rv-tile.bad { background: color-mix(in srgb, var(--bad) 20%, var(--surface-2)); color: var(--bad); }
.rv-tile.rv-top { background: #f2c14e; color: #3b2a00; box-shadow: 0 0 22px -6px #f2c14e; }
.rv-tile b { font: 400 44px/0.9 var(--serif); }
.rv-tile small { font: 700 12px/1 var(--sans); opacity: .8; }
.rv-item-main { display: grid; gap: 6px; min-width: 0; }
.rv-item-main > b { font: 400 30px/1.1 var(--serif); color: var(--ink); white-space: nowrap; overflow: hidden; }
.rv-item-meta { display: flex; align-items: center; gap: 12px; font-size: 16px; color: var(--muted); white-space: nowrap; }
.rv-item-meta em { font-style: normal; }
.rv-chip { padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--bad) 18%, transparent); color: var(--ink); font-size: 14px; font-weight: 600; }
.rv-new { padding: 3px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

.rv-frs { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; }
.rv-frs-top { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 16px; margin-bottom: 18px; }
.rv-frs-top b { font: 400 84px/0.9 var(--serif); color: var(--good); }
.rv-frs-top span { display: grid; gap: 4px; font-size: 19px; color: var(--ink); }
.rv-frs-top small { font-size: 15px; color: var(--muted); }
.rv-funnel { display: grid; gap: 10px; align-content: start; }
.rv-step { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 10px 14px; border-radius: 12px; overflow: hidden; font-size: 16px; color: var(--muted); background: color-mix(in srgb, var(--line) 45%, transparent); }
.rv-step i { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--w) * 100%); background: color-mix(in srgb, var(--info) 20%, transparent); border-radius: inherit; }
.rv-step span, .rv-step b { position: relative; }
.rv-step b { font: 400 26px/1 var(--serif); color: var(--ink); }
.rv-step:last-child i { background: color-mix(in srgb, var(--good) 30%, transparent); }
.rv-lift { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding-top: 14px; border-top: 1px solid var(--line); }
.rv-lift span { font-size: 16px; color: var(--muted); }
.rv-lift b { grid-row: 1 / 3; grid-column: 2; font: 400 44px/1 var(--serif); color: var(--good); }
.rv-lift small { font-size: 14px; color: var(--faint); }

/* ---------------- due facce: oggi e ultimi 7 giorni (27/09/2026) ----------------
   Human Team, Cleaners e Strutture: a meta' pagina tutte le carte ruotano una dopo l'altra
   e mostrano gli ultimi 7 giorni. */
.scene-erk, .scene-clean { perspective: 2400px; }
.face-out :is(.sk-bar, .xkpi, .cl-board, .cl-side, .sk-left, .sk-right) { animation: card-out .36s cubic-bezier(.55, 0, .8, .2) both; backface-visibility: hidden; }
.face-in :is(.sk-bar, .xkpi, .cl-board, .cl-side, .sk-left, .sk-right) { animation: card-in .6s cubic-bezier(.2, .9, .3, 1.05) both; backface-visibility: hidden; }
.face-out .skpis > :nth-child(2), .face-in .skpis > :nth-child(2) { animation-delay: 40ms; }
.face-out .skpis > :nth-child(3), .face-in .skpis > :nth-child(3) { animation-delay: 80ms; }
.face-out .skpis > :nth-child(4), .face-in .skpis > :nth-child(4) { animation-delay: 120ms; }
.face-out .skpis > :nth-child(5), .face-in .skpis > :nth-child(5) { animation-delay: 160ms; }
.face-out :is(.cl-board, .sk-left), .face-in :is(.cl-board, .sk-left) { animation-delay: 110ms; }
.face-out :is(.cl-side, .sk-right), .face-in :is(.cl-side, .sk-right) { animation-delay: 170ms; }
@keyframes card-out { from { transform: rotateY(0); opacity: 1; } to { transform: rotateY(90deg); opacity: .15; } }
@keyframes card-in { from { transform: rotateY(-90deg); opacity: .15; } to { transform: rotateY(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .face-out *, .face-in * { animation: none !important; } }

/* ---------------- pagina Commerciali (27/09/2026) ----------------
   Gara a colonne dei commerciali: posizione per classifica (il primo a sinistra), altezza
   per strutture firmate nel periodo; corona, anello dorato che gira e riflettore sul primo.
   Settimana, mese, anno e totale si alternano da soli, con la barra sulla pillola. */
.scene-sales { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 16px; height: 100%; min-height: 0; --sl-p: 0; }
.sl-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.sl-title { display: flex; align-items: baseline; gap: 18px; min-width: 0; }
.sl-title span { font: 600 17px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.sl-title b { font: 400 58px/1 var(--serif); color: var(--ink); white-space: nowrap; }
.sl-title em { font-style: normal; font-size: 18px; color: var(--faint); white-space: nowrap; }
.sl-seg { display: flex; gap: 6px; padding: 5px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.sl-pill { position: relative; overflow: hidden; padding: 12px 24px; border: 0; border-radius: 999px; background: none; font: 700 15px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); transition: background .4s var(--ease), color .4s var(--ease); }
.sl-pill.done { color: var(--muted); }
.sl-pill.on { color: var(--accent-ink); background: var(--accent); box-shadow: 0 8px 24px -10px var(--accent); }
.sl-pill i { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: rgb(255 255 255 / .75); }
.sl-pill.on i { width: calc(var(--sl-p) * 100%); }

.sl-body { display: grid; grid-template-columns: minmax(0, 1fr) 540px; gap: 18px; min-height: 0; }
.sl-race { position: relative; min-height: 0; border-radius: 26px; overflow: hidden;
  background: radial-gradient(90% 70% at 50% 110%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%), linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.sl-spot { position: absolute; left: 24px; top: 0; bottom: 0; width: calc((100% - 48px) / 5); background: radial-gradient(60% 55% at 50% 42%, rgb(255 209 102 / .16), transparent 70%); pointer-events: none; }
.sl-lanes { position: absolute; inset: 58px 24px 18px; }
.sl-col { --w: calc(100% / 5); position: absolute; top: 0; bottom: 0; left: calc(var(--x, 0) * var(--w)); width: var(--w); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 12px; padding: 0 16px; transition: left 1.1s cubic-bezier(.65, 0, .25, 1); }
.sl-val { display: grid; justify-items: center; gap: 4px; margin-bottom: 66px; }
.sl-val b { font: 400 78px/.9 var(--serif); color: var(--ink); }
.sl-val small { display: grid; justify-items: center; gap: 3px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }
.sl-val small em { font-style: normal; font-size: 15px; font-weight: 600; letter-spacing: .02em; text-transform: none; color: var(--muted); }
.sl-ava { position: relative; flex: none; width: 128px; height: 128px; }
.sl-ava img { position: absolute; inset: 7px; width: calc(100% - 14px); height: calc(100% - 14px); border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 4px var(--c), 0 16px 30px -12px rgb(0 0 0 / .8); transition: filter .6s var(--ease); }
.sl-ring { position: absolute; inset: -2px; border-radius: 50%; opacity: 0; transition: opacity .6s var(--ease);
  background: conic-gradient(from 0deg, #ffd166, #ff9b69, #fff4c9, #ffd166, #f7b267, #ffd166);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 calc(100% - 7px)); mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 calc(100% - 7px));
  animation: sl-spin 3.6s linear infinite; }
.sl-col.first .sl-ring { opacity: 1; }
.sl-crown { position: absolute; left: 50%; top: -58px; width: 72px; transform: translateX(-50%) scale(0); fill: #ffd166; filter: drop-shadow(0 6px 12px rgb(255 209 102 / .45)); transition: transform .7s cubic-bezier(.3, 1.6, .5, 1); }
.sl-crown svg { display: block; width: 100%; }
.sl-crown svg, .sl-crown svg * { fill: #ffd166; stroke: none; }
.sl-col.first .sl-crown { transform: translateX(-50%) scale(1); animation: sl-bob 2.6s ease-in-out infinite; }
.sl-medal { position: absolute; right: -4px; bottom: 0; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font: 400 24px/1 var(--serif); font-style: normal; color: #2a2100; background: #ffd166; box-shadow: 0 6px 14px -6px rgb(0 0 0 / .8), inset 0 0 0 2px rgb(255 255 255 / .35); }
.sl-medal:empty { display: none; }
.sl-col[data-rank="2"] .sl-medal { background: #d7dee2; color: #20282c; }
.sl-col[data-rank="3"] .sl-medal { background: #d9a07a; color: #2d170a; }
.sl-bar { position: relative; flex: none; width: 100%; height: calc(var(--h, 0) * (100% - 400px)); min-height: 12px; border-radius: 20px 20px 8px 8px; overflow: hidden;
  background: linear-gradient(180deg, var(--c), color-mix(in srgb, var(--c) 30%, transparent)); box-shadow: 0 0 48px -14px var(--c);
  transition: height 1.1s cubic-bezier(.65, 0, .25, 1); }
.sl-bar i { position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / .28) 50%, transparent 65%); background-size: 260% 100%; animation: sl-shine 3.4s linear infinite; }
.sl-units { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; font: 700 15px/1 var(--sans); color: rgb(0 0 0 / .6); white-space: nowrap; }
.sl-name { display: grid; justify-items: center; gap: 4px; min-height: 58px; text-align: center; }
.sl-name b { font: 400 27px/1.05 var(--serif); color: var(--ink); white-space: nowrap; }
.sl-name small { font-size: 14px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--c); white-space: nowrap; }
.sl-col.first .sl-name b { color: #ffd166; }
.sl-col.zero .sl-bar { background: var(--line); box-shadow: none; }
.sl-col.zero .sl-bar i { display: none; }
.sl-col.zero .sl-ava img { filter: grayscale(.75) brightness(.78); }
.sl-col.zero .sl-val b { color: var(--faint); }

.sl-side { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 16px; min-height: 0; }
.sl-kpi { display: grid; gap: 8px; padding: 16px 24px; border-radius: 24px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 20%, var(--surface-2)), var(--surface)); box-shadow: var(--shadow), inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, var(--line)); }
.sl-kpi > span { font: 600 16px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.sl-kpi > b { font: 400 74px/.9 var(--serif); color: var(--ink); }
.sl-kmix { height: 10px; border-radius: 999px; overflow: hidden; background: color-mix(in srgb, var(--faint) 30%, transparent); }
.sl-kmix i { display: block; height: 100%; width: calc(var(--t, 0) * 100%); border-radius: inherit; background: linear-gradient(90deg, var(--accent), #ffd166); transition: width 1s var(--ease); }
.sl-kpi small { font-size: 16px; color: var(--muted); }
.sl-kpi small b { color: var(--ink); font-weight: 700; }
.sl-card { min-height: 0; padding: 18px 22px; border-radius: 24px; overflow: hidden; background: linear-gradient(180deg, var(--surface-2), var(--surface)); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.sl-card h3 { margin: 0 0 10px; font: 600 16px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.sl-rec { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 6px 0; border-bottom: 1px solid var(--line); animation: sl-in .7s var(--ease) both; animation-delay: calc(var(--i) * 110ms); }
.sl-rec:last-child { border-bottom: 0; }
.sl-rava { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 3px var(--c); font: 700 18px/1 var(--sans); color: var(--ink); background: var(--surface-2); }
.sl-rava img { width: 100%; height: 100%; object-fit: cover; }
.sl-rec > div { display: grid; gap: 3px; min-width: 0; }
.sl-rec b { font: 400 22px/1.1 var(--serif); color: var(--ink); white-space: nowrap; overflow: hidden; }
.sl-rec span { font-size: 15px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.sl-rec em { font: 700 15px/1 var(--sans); font-style: normal; color: var(--c); white-space: nowrap; }
.sl-rec.fresh em { padding: 5px 10px; border-radius: 999px; background: color-mix(in srgb, var(--c) 22%, transparent); }
.sl-months { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; align-items: end; height: 142px; }
.sl-m { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; justify-items: center; gap: 4px; height: 100%; }
.sl-m > span { font: 400 20px/1 var(--serif); color: var(--ink); }
.sl-stack { align-self: end; display: flex; flex-direction: column-reverse; width: 100%; height: calc(var(--h) * 100%); min-height: 3px; border-radius: 8px 8px 3px 3px; overflow: hidden; animation: grow .9s var(--ease) both; transform-origin: bottom; }
.sl-stack i { display: block; flex: var(--n) 0 0; background: var(--c); }
.sl-stack i.oth { background: color-mix(in srgb, var(--faint) 45%, transparent); }
.sl-m > em { font: 700 12px/1 var(--sans); font-style: normal; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.sl-m.now .sl-stack { outline: 2px dashed color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; }
.sl-m.now > em { color: var(--accent); }
.scene:not(.on) :is(.sl-stack, .sl-rec) { animation: none; }
@keyframes sl-spin { to { transform: rotate(360deg); } }
@keyframes sl-bob { 0%, 100% { transform: translateX(-50%) translateY(0) rotate(-4deg); } 50% { transform: translateX(-50%) translateY(-7px) rotate(4deg); } }
@keyframes sl-shine { from { background-position: 130% 0; } to { background-position: -130% 0; } }
@keyframes sl-in { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sl-ring, .sl-crown, .sl-bar i { animation: none !important; } }

/* ---------------- avvisi prenotazione nella barra a destra (28/09/2026) ----------------
   Carte piccole in colonna sotto la testata, la piu' nuova in alto; entrano da destra e
   se ne vanno da sole. Le recensioni restano al centro, nel mazzo. */
.bk-rail {
  position: absolute; top: 96px; right: 18px; z-index: 21;
  display: flex; flex-direction: column; gap: 10px; width: 372px; pointer-events: none;
}
.bk-side {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 10px 14px 10px 10px; border-radius: 18px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--pl) 18%, var(--surface-2)), var(--surface));
  box-shadow: 0 16px 40px -18px rgb(0 0 0 / .7), inset 0 0 0 1.5px color-mix(in srgb, var(--pl) 55%, transparent);
  transition: transform .6s cubic-bezier(.2, 1.2, .4, 1), opacity .45s var(--ease), max-height .5s var(--ease), margin .5s var(--ease);
  max-height: 120px; --pl: var(--accent);
}
.bk-side.pl-bkg { --pl: var(--fam-bkg); }
.bk-side.pl-abn { --pl: var(--fam-abn); }
.bk-side.pl-ggl { --pl: var(--fam-ggl); }
.bk-side.pl-dir { --pl: var(--good); }
.bk-side.enter { transform: translateX(120%); opacity: 0; }
.bk-side.leave { transform: translateX(120%); opacity: 0; max-height: 0; margin-bottom: -10px; }
.bk-side-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--pl); color: var(--accent-ink); }
.bk-side-icon svg { width: 25px; height: 25px; stroke-width: 1.8; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.bk-side:not(.enter):not(.leave) .bk-side-icon { animation: bk-bell 1s var(--ease) .3s 1; }
.bk-side-main { display: grid; gap: 3px; min-width: 0; }
.bk-side-eyebrow { font: 700 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--pl); }
.bk-side-name { font: 400 22px/1.05 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-side-meta { display: flex; flex-wrap: wrap; gap: 3px 10px; align-items: center; font-size: 13px; color: var(--muted); }
.bk-side-meta i { font-style: normal; font-weight: 700; color: var(--ink); }
.bk-side-logo.brand-chip { height: 16px; padding: 2px 6px; border-radius: 5px; }
.bk-side-amount { display: grid; justify-items: end; font: 400 26px/1 var(--serif); color: var(--pl); white-space: nowrap; }
.bk-side-amount small { font: 600 11px/1 var(--sans); letter-spacing: .08em; color: var(--faint); margin-top: 3px; }
@media (prefers-reduced-motion: reduce) { .bk-side { transition: opacity .3s; } .bk-side.enter, .bk-side.leave { transform: none; } }

/* ---------------- Economics: Top sales per unita', oggi / settimana / mese (28/09/2026) ---------------- */
.scene-eco { --ep: 0; }
.xtop h3 { gap: 12px; }
.xtop-seg { display: inline-flex; gap: 4px; padding: 3px; border-radius: 999px; background: var(--bg-deep); box-shadow: inset 0 0 0 1px var(--line); letter-spacing: 0; }
.xtop-pill { position: relative; overflow: hidden; padding: 7px 12px; border: 0; border-radius: 999px; background: none; font: 700 12px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.xtop-pill.done { color: var(--muted); }
.xtop-pill.on { color: var(--accent-ink); background: var(--accent); }
.xtop-pill i { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: rgb(255 255 255 / .75); }
.xtop-pill.on i { width: calc(var(--ep) * 100%); }
.tv-root.manual .xtop-pill { cursor: pointer; }
.xtop-sub { margin: -4px 0 6px; font-size: 15px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xtop .xrow span { white-space: nowrap; }
.xtop .xrow > div { min-width: 0; overflow: hidden; }
.xtop .brand-direct.inline-logo.multi { font-size: 9px; }
.bk-side-logo.brand-direct { font-size: 10px; }
.xtop .brand-mark.inline-logo { height: 22px; padding: 0; margin-left: 2px; border-radius: 6px; }
.xtop .brand-mark.inline-logo img { height: 100%; width: auto; border-radius: 6px; }
.xk-cancel b { color: var(--bad); }

/* ---------------- Panoramica unita' (28/09/2026) ----------------
   Numeri in alto; sotto mappa delle aree con anello fisso/percentuale, fisso o percentuale per
   area e per tipo, unita' in start-up con la data di avvio. Fisso = --info, percentuale = --accent. */
.scene-units { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 14px; height: 100%; min-height: 0; --k-fix: var(--info); --k-pct: var(--accent); }
.pm-kpis { grid-template-columns: 1.25fr 1fr 1.1fr .9fr .9fr; }
.pm-k-main b { color: var(--good); }
.pm-k-start b { color: var(--warm); }
.pm-k-fix b { color: var(--k-fix); }
.pm-k-pct b { color: var(--k-pct); }
.pm-body { display: grid; grid-template-columns: 500px minmax(0, 1fr) 470px; gap: 16px; min-height: 0; }
.pm-card { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 16px 20px; border-radius: 24px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); overflow: hidden; }
.pm-card h3 { display: flex; align-items: baseline; gap: 12px; margin: 0 0 10px; font: 600 16px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.pm-card h4 { margin: 16px 0 8px; font: 600 13px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }

.pm-geo { padding-bottom: 12px; }
/* la mappa sta tutta nello spazio che resta, con le sue proporzioni: le etichette in % combaciano */
.pm-mapbox { flex: 1 1 0; min-height: 0; display: grid; place-items: center; container-type: size; }
.pm-map { position: relative; width: min(100cqw, 100cqh * var(--ar)); aspect-ratio: var(--ar); }
.pm-map svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pm-land { fill: color-mix(in srgb, var(--info) 16%, var(--surface)); stroke: color-mix(in srgb, var(--info) 45%, transparent); stroke-width: 1.4; }
.pm-near { fill: color-mix(in srgb, var(--info) 7%, var(--surface)); stroke: none; }
.pm-halo { fill: color-mix(in srgb, var(--good) 10%, transparent); stroke: none; }
.pm-dot { fill: color-mix(in srgb, var(--good) 55%, var(--surface)); stroke: var(--surface); stroke-width: 2; }
.pm-ring { fill: none; stroke-width: 7; transform: rotate(-90deg); }
.pm-fix { stroke: var(--k-fix); }
.pm-pct { stroke: var(--k-pct); }
.pm-label { position: absolute; display: grid; justify-items: center; gap: 1px; padding: 5px 10px 6px; border-radius: 12px; background: color-mix(in srgb, var(--bg-deep) 82%, transparent); box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap; pointer-events: none; }
.pm-label.pm-n { transform: translate(-50%, -100%); }
.pm-label.pm-s { transform: translate(-50%, 0); }
.pm-label.pm-e { transform: translate(0, -50%); justify-items: start; }
.pm-label.pm-ne { transform: translate(0, -100%); justify-items: start; }
.pm-label b { font: 600 12px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pm-label strong { font: 400 30px/1 var(--serif); color: var(--ink); }
.pm-label small { font-size: 12px; color: var(--warm); }

.pm-split { display: flex; height: 54px; border-radius: 14px; overflow: hidden; gap: 3px; }
.pm-split i { flex: var(--w) 1 0; display: grid; align-items: center; padding: 0 14px; min-width: 56px; }
.pm-split i.fixed { background: color-mix(in srgb, var(--k-fix) 80%, transparent); }
.pm-split i.percent { background: color-mix(in srgb, var(--k-pct) 80%, transparent); justify-items: end; }
.pm-split b { font: 400 30px/1 var(--serif); color: var(--accent-ink); }
.pm-legend { display: flex; justify-content: space-between; margin-top: 8px; font-size: 15px; color: var(--muted); }
.pm-legend span { display: inline-flex; align-items: center; gap: 7px; }
.pm-legend i, .pm-type i { width: 11px; height: 11px; border-radius: 3px; }
.pm-legend .fixed i, .pm-type.fixed i { background: var(--k-fix); }
.pm-legend .percent i, .pm-type.percent i { background: var(--k-pct); }
.pm-type.other i { background: var(--off); }
.pm-areas { display: grid; gap: 9px; }
.pm-arow { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.pm-arow b { font: 400 21px/1.1 var(--serif); }
.pm-arow span { font-size: 15px; color: var(--muted); min-width: 74px; text-align: right; }
.pm-abar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 2px; background: var(--line); }
.pm-abar i { flex: var(--w) 1 0; }
.pm-abar i.fixed { background: var(--k-fix); }
.pm-abar i.percent { background: var(--k-pct); }
.pm-types { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
.pm-type { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.pm-type b { font: 400 22px/1 var(--serif); color: var(--ink); }

.pm-slist { display: grid; align-content: start; gap: 0; min-height: 0; overflow: hidden; }
.pm-srow { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.pm-date { display: grid; gap: 2px; padding: 4px 8px; border-radius: 12px; text-align: center; background: color-mix(in srgb, var(--warm) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warm) 35%, transparent); }
.pm-date b { font: 400 21px/1 var(--serif); color: var(--ink); }
.pm-date small { font-size: 11px; color: var(--warm); white-space: nowrap; }
.pm-smain { display: grid; gap: 3px; min-width: 0; }
.pm-smain b { font: 400 20px/1.1 var(--serif); }
.pm-smain b em { font: 500 14px/1 var(--sans); font-style: normal; color: var(--muted); }
.pm-smain span { font-size: 14px; color: var(--faint); }
.pm-srow.fixed .pm-smain span::before, .pm-srow.percent .pm-smain span::before { content: ''; display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 2px; background: var(--k-fix); }
.pm-srow.percent .pm-smain span::before { background: var(--k-pct); }

/* ---------------- recensioni nella barra a destra (28/09/2026) ----------------
   Stessa carta piccola delle prenotazioni: colore dal voto, oro sopra l'8 (con i fuochi). */
.bk-side.rv-good { --pl: var(--good); }
.bk-side.rv-warm { --pl: var(--warm); }
.bk-side.rv-bad { --pl: var(--bad); }
.bk-side.rv-big { --pl: #f2c14e; box-shadow: 0 16px 40px -18px rgb(0 0 0 / .7), 0 0 26px -6px color-mix(in srgb, #f2c14e 70%, transparent), inset 0 0 0 1.5px color-mix(in srgb, #f2c14e 75%, transparent); }
.rv-side .bk-side-icon svg { fill: currentColor; stroke: none; }
.rv-side:not(.enter):not(.leave) .bk-side-icon { animation: rv-pop .9s var(--ease) .3s 2; }
.rv-side .bk-side-amount { font-size: 30px; }

/* ---------------- Patrimonio (28/09/2026, versione realistica) ----------------
   A sinistra la mappa notturna (strade vere, luci delle unita') con il grafico sotto; a destra
   contatore e data, Bari e provincia, le schede di Palermo, Napoli e Lecce con la loro mappa. */
.scene-growth { position: relative; height: 100%; min-height: 0; }
.gw { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; }
.gw-none > :not(.gw-empty) { display: none; }
.gw-empty { position: absolute; inset: 0; }
.gw-stage { position: relative; min-width: 0; overflow: hidden; border-radius: 26px; background: var(--bg-deep); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); isolation: isolate; }
.gw-map { position: absolute; inset: 0; display: block; }
.gw-labels { position: absolute; inset: 0; pointer-events: none; }
.gw-credit { position: absolute; right: 14px; bottom: 212px; font-size: 10px; letter-spacing: .04em; color: var(--faint); opacity: .7; }
.gw-town { position: absolute; left: 0; top: 0; display: flex; gap: 6px; align-items: baseline; padding: 3px 8px 4px; border-radius: 9px; white-space: nowrap;
  font: 700 11px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  background: color-mix(in srgb, var(--bg-deep) 70%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line) 80%, transparent); }
.gw-town b { font: 400 18px/1 var(--serif); letter-spacing: 0; color: var(--ink); }
.gw-town.r { translate: -100% -50%; }
.gw-town.l { translate: 0 -50%; }
.gw-town.c { translate: -50% -50%; }
.gw-town.big { font-size: 13px; color: var(--accent); }
.gw-town.big b { font-size: 26px; }
.gw-q { position: absolute; left: 0; top: 0; translate: -50% -50%; font: italic 400 15px/1 var(--serif); color: var(--muted); white-space: nowrap; text-shadow: 0 0 6px var(--bg-deep), 0 0 12px var(--bg-deep); letter-spacing: .02em; }
.gw-tag { position: absolute; left: 18px; top: 16px; display: grid; gap: 2px; padding: 10px 14px 12px; border-radius: 16px;
  background: color-mix(in srgb, var(--bg-deep) 72%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent); }
.gw-tag b { font: 700 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.gw-tag strong { font: 400 38px/1 var(--serif); color: var(--ink); }
.gw-tag span { font-size: 12px; color: var(--faint); }

.gw-chart { position: absolute; left: 14px; right: 14px; bottom: 14px; height: 190px; border-radius: 20px; box-sizing: border-box;
  background: color-mix(in srgb, var(--bg-deep) 78%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line) 80%, transparent); }
.gw-plot { position: absolute; left: 18px; right: 18px; top: 16px; bottom: 28px; }
.gw-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; }
.gw-layers path { stroke: none; }
.gw-edge { fill: none; stroke: var(--ink); stroke-width: 1.6; opacity: .85; vector-effect: non-scaling-stroke; }
.gw-ghost { fill: none; stroke: var(--muted); stroke-width: 1.4; stroke-dasharray: 3 6; opacity: .55; vector-effect: non-scaling-stroke; }
.gw-future-veil { fill: color-mix(in srgb, var(--bg-deep) 38%, transparent); }
.gw-grid line { stroke: color-mix(in srgb, var(--line) 85%, transparent); stroke-width: 1; stroke-dasharray: 2 6; vector-effect: non-scaling-stroke; }
.gw-grid text { fill: var(--faint); font: 600 11px var(--sans); text-anchor: end; }
.gw-target line { stroke: var(--warm); stroke-width: 1.5; stroke-dasharray: 6 5; }
.gw-target circle { fill: var(--warm); stroke: var(--bg-deep); stroke-width: 2; }
.gw-axis { position: absolute; inset: 0; pointer-events: none; }
.gw-axis span { position: absolute; top: calc(100% + 8px); translate: -50% 0; font: 600 12px/1 var(--sans); letter-spacing: .08em; color: var(--faint); }
.gw-target-lbl { position: absolute; translate: -100% -160%; font: italic 400 14px/1 var(--serif); color: var(--warm); white-space: nowrap; }
.gw-now { position: absolute; top: -6px; bottom: 0; width: 0; pointer-events: none; }
.gw-now i { position: absolute; top: 0; bottom: 0; left: 0; border-left: 1px dashed var(--muted); }
.gw-now span { position: absolute; top: -4px; left: 6px; font: 700 11px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.gw-head { position: absolute; top: 0; bottom: 0; left: 0; width: 0; pointer-events: none; --y: 100%; }
.gw-head::before { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 2px; translate: -1px 0; background: linear-gradient(to bottom, transparent, var(--ink)); opacity: .8; }
.gw-head i { position: absolute; left: 0; top: var(--y); width: 12px; height: 12px; translate: -50% -50%; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ink) 22%, transparent), 0 0 22px var(--ink); }
.gw-svg path, .gw-svg text, .gw-future-veil, .gw-grid text { stroke: none; }
.gw-svg .gw-edge { stroke: var(--ink); }
.gw-svg .gw-ghost { stroke: var(--muted); }
.gw-svg .gw-target line { stroke: var(--warm); }
.gw-svg .gw-grid line { stroke: color-mix(in srgb, var(--line) 85%, transparent); }
.gw-play { position: absolute; left: 22px; bottom: 218px; display: none; place-items: center; width: 50px; height: 50px; border: 0; border-radius: 50%; background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 30px -10px var(--accent); cursor: pointer; }
.gw-play svg { width: 22px; height: 22px; fill: currentColor; stroke: none; }
.scene-growth.gw-manual .gw-play { display: grid; }
.scene-growth.gw-manual .gw-chart { cursor: ew-resize; }
.scene-growth.gw-manual .gw-tag { left: 84px; }

.gw-side { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.gw-hud { display: grid; justify-items: start; gap: 2px; padding: 16px 20px 14px; border-radius: 22px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.gw-eyebrow { font: 700 12px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.gw-count { font: 400 104px/.92 var(--serif); color: var(--ink); letter-spacing: -.01em; }
.gw-date { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.gw-month { font: 400 28px/1.1 var(--serif); color: var(--ink); }
.gw-phase { padding: 5px 10px; border-radius: 999px; font: 700 10.5px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.gw-future .gw-phase { color: var(--accent-ink); background: var(--good); }
.gw-caption { margin: 6px 0 0; min-height: 22px; font: italic 400 19px/1.2 var(--serif); color: var(--warm); }
.gw-caption span { display: inline-block; }
.gw-caption span.in { animation: gw-cap .9s var(--ease) both; }
@keyframes gw-cap { from { opacity: 0; transform: translateY(8px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
.gw-row { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.gw-row i { width: 11px; height: 11px; border-radius: 50%; background: var(--c); box-shadow: 0 0 12px var(--c); }
.gw-row span { display: grid; font: 400 21px/1.1 var(--serif); color: var(--ink); }
.gw-row span em { font: 500 12px/1.3 var(--sans); font-style: normal; color: var(--faint); }
.gw-row b { font: 400 34px/1 var(--serif); color: var(--ink); }
.gw-rows { display: grid; gap: 8px; }
.gw-rows .gw-row { padding: 9px 16px; transition: opacity .6s var(--ease); }
.gw-rows .gw-row b { font-size: 32px; }
.gw-rows .gw-row.off { opacity: .55; }
.gw-lens-lbl { position: absolute; left: 0; top: 0; translate: -50% 0; display: flex; align-items: baseline; gap: 8px; padding: 5px 12px 6px; border-radius: 12px; white-space: nowrap; pointer-events: none;
  background: color-mix(in srgb, var(--bg-deep) 78%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 55%, transparent), 0 8px 22px -12px rgb(0 0 0 / .8); }
.gw-lens-lbl b { font: 700 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--c); }
.gw-lens-lbl strong { font: 400 28px/1 var(--serif); color: var(--ink); }
.gw-catania { margin: -2px 4px 0; min-height: 14px; font-size: 12.5px; color: var(--faint); }
.gw-ass { margin-top: auto; padding: 10px 14px 12px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); opacity: .6; transition: opacity .8s var(--ease), box-shadow .8s var(--ease); }
.gw-future .gw-ass { opacity: 1; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--good) 45%, transparent); }
.gw-ass h4 { margin: 0 0 6px; font: 700 10.5px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--good); }
.gw-ass ul { margin: 0; padding-left: 15px; display: grid; gap: 2px; font-size: 12px; line-height: 1.28; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .gw-caption span.in { animation: none; } }

/* undici pagine nella barra: schede piu' strette (28/09/2026) */
.tvw-top { gap: 18px; }
.tvw-tab { padding: 9px 8px; font-size: 11.5px; letter-spacing: .035em; }
.tvw-tab i { left: 8px; right: 8px; }
/* le regole globali degli svg delle icone non devono toccare il grafico */
.gw-svg path, .gw-svg text, .gw-future-veil, .gw-grid text { stroke: none; }
.gw-svg .gw-edge { stroke: var(--ink); }
.gw-svg .gw-ghost { stroke: var(--muted); }
.gw-svg .gw-target line { stroke: var(--warm); }
.gw-svg .gw-grid line { stroke: color-mix(in srgb, var(--line) 85%, transparent); }

/* pagina Unita': prima scheda con le unita' contrattualizzate a oggi (28/09/2026) */
.scene-props .skpis { grid-template-columns: 1.2fr repeat(5, minmax(0, 1fr)); gap: 10px; }
.scene-props .skpis .xkpi { padding: 10px 14px; }
.scene-props .skpis .xkpi span { font-size: 14px; }
.scene-props .skpis .xkpi small { font-size: 13.5px; }
.pr-k-all { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, var(--surface-2)), var(--surface)); box-shadow: var(--shadow), inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, var(--line)); }
.pr-k-all b { color: var(--ink); }
.face-out .skpis > :nth-child(6), .face-in .skpis > :nth-child(6) { animation-delay: 200ms; }


/* testata con undici pagine e la pillola lunga ("1 problema · 59 allarmi"): tutto deve
   stare su una riga senza coprire il logo (28/09/2026, visto sulla TV a 1920x1080) */
.tvw-top { gap: 14px; padding: 0 24px; }
.tvw-tab { padding: 8px 7px; font-size: 11px; letter-spacing: .03em; }
.tvw-tab i { left: 7px; right: 7px; }
.tvw-top .tvw-status .tot { font-size: 14px; padding: 6px 11px; gap: 6px; }
.tvw-top .tvw-status .tot b { font-size: 15px; }
.tvw-top .tvw-status .tot-sep { margin: 0 5px; }

/* schede staccate dalla mappa con la linea che le collega (Patrimonio, 28/09/2026) */
.gw-callout { position: absolute; left: 0; top: 0; width: 214px; height: 62px; box-sizing: border-box; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; align-items: center; column-gap: 8px; padding: 8px 14px;
  border-radius: 14px; background: color-mix(in srgb, var(--surface) 92%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 45%, var(--line)), 0 10px 26px -16px rgb(0 0 0 / .8);
  transition: transform .7s var(--ease), opacity .6s var(--ease); animation: gw-co-in .7s var(--ease) both; }
.gw-callout.right { border-left: 3px solid var(--c); }
.gw-callout.left { border-right: 3px solid var(--c); }
.gw-co-name { grid-column: 1; grid-row: 1; font: 700 12px/1.1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gw-callout b { grid-column: 2; grid-row: 1 / span 2; font: 400 34px/1 var(--serif); color: var(--ink); }
.gw-callout em { grid-column: 1; grid-row: 2; font: 500 11.5px/1.2 var(--sans); font-style: normal; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gw-callout.dim { opacity: .55; }
@keyframes gw-co-in { from { opacity: 0; } to { opacity: 1; } }

/* Panoramica: schede delle localita' staccate dalla mappa (28/09/2026) */
.pm-lines polyline { fill: none; stroke-width: 2.2; opacity: .8; }
.pm-pt { fill: var(--bg-deep); stroke-width: 3.5; }
.pm-pt-halo { opacity: .22; stroke: none; }
.pm-co rect:first-child { fill: var(--surface-2); stroke-width: 1.5; stroke-opacity: .6; }
.pm-co text { stroke: none; }
.pm-co-name { font: 700 22px var(--sans); letter-spacing: .08em; }
.pm-co-n { font: 400 54px var(--serif); fill: var(--ink); }
.pm-co-sub { font: 500 19px var(--sans); fill: var(--faint); }
.pm-body { grid-template-columns: 640px minmax(0, 1fr) 430px; }

/* testata: le schede si adattano alla pillola degli avvisi (fitHeader in tv.mjs), mai sovrapposte */
.tvw-tabs { max-width: 100%; overflow: hidden; }
.tvw-tab { font-size: var(--tab-fs, 11px); }
.tvw-status { white-space: nowrap; }

/* avvisi di manutenzioni eseguite e contatti dalla pagina Acquisizioni (28/09/2026) */
.bk-side.mt-side { --pl: var(--good); }
.bk-side.aq-side { --pl: var(--warm); }
.bk-side.aq-side.aq-signed { --pl: var(--accent); }
.mt-side .bk-side-icon svg, .aq-side .bk-side-icon svg { fill: none; stroke: currentColor; stroke-width: 1.8; }
.bk-side-amount.mt-ok, .bk-side-amount.aq-tag { font-size: 26px; }

/* ---------------- Brain: il Second Brain come costellazione (brain.mjs) ---------------- */
.scene-brain {
  position: relative; height: 100%; min-height: 0;
  --bn-c0: #ff9b69; --bn-c1: #f1c279; --bn-c2: #9ad5be; --bn-c3: #8fb3f0; --bn-c4: #c3a6ff; --bn-c5: #7fdcc8;
  --bn-c6: #ffd27a; --bn-c7: #e5a0a6; --bn-c8: #7ec3ff; --bn-c9: #ff9f8f; --bn-c10: #b8e07a;
}
[data-theme="ivory"] .scene-brain {
  --bn-c0: #b2471a; --bn-c1: #9a6a10; --bn-c2: #1b6850; --bn-c3: #1d4f9c; --bn-c4: #5b3aa8; --bn-c5: #11706a;
  --bn-c6: #8a6200; --bn-c7: #8e2c3a; --bn-c8: #1f5b7a; --bn-c9: #c2412f; --bn-c10: #4d7a12;
}
.bn { position: absolute; inset: 0; display: grid; grid-template-columns: 300px minmax(0, 1fr) 300px; gap: 16px; }
.bn-none > :not(.bn-empty) { display: none; }
.bn-empty { position: absolute; inset: 0; }
.bn-side { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.bn-card { display: grid; align-content: start; gap: 8px; padding: 16px 20px; border-radius: 22px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); min-height: 0; }
.bn-card h4 { margin: 0; font: 700 12px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.bn-eyebrow { font: 700 12px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.bn-sub { margin-top: -2px; font: 500 13px/1.2 var(--sans); color: var(--faint); }
.bn-nil { list-style: none; font: italic 400 18px/1.3 var(--serif); color: var(--faint); }

.bn-today { gap: 2px; }
.bn-big { font: 400 96px/.95 var(--serif); color: var(--accent); letter-spacing: -.01em; }
.bn-today p { margin: 2px 0 0; font: 500 15px/1.3 var(--sans); color: var(--muted); }

.bn-topics-card { flex: 1 1 auto; }
.bn-topics { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 11px; }
.bn-topics li { display: grid; grid-template-columns: minmax(0, 1fr) auto; row-gap: 5px; align-items: baseline; }
.bn-topics span { font: 400 22px/1.05 var(--serif); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bn-topics b { font: 400 24px/1 var(--serif); color: var(--ink); }
.bn-topics i { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: color-mix(in srgb, var(--line) 80%, transparent); position: relative; overflow: hidden; }
.bn-topics i::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: inherit; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 55%, transparent), var(--accent)); box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 60%, transparent); }

.bn-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; height: 118px; align-items: end; }
.bn-bar { display: grid; grid-template-rows: auto 1fr auto; justify-items: center; gap: 5px; height: 100%; }
.bn-bar b { font: 600 13px/1 var(--sans); color: var(--muted); }
.bn-bar i { align-self: end; width: 100%; height: max(3px, var(--h)); border-radius: 6px 6px 3px 3px; background: color-mix(in srgb, var(--info) 45%, transparent); }
.bn-bar span { font: 600 11px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.bn-bar.now i { background: var(--accent); box-shadow: 0 0 16px color-mix(in srgb, var(--accent) 55%, transparent); }
.bn-bar.now b, .bn-bar.now span { color: var(--accent); }

.bn-stage { position: relative; min-width: 0; overflow: hidden; border-radius: 26px; isolation: isolate;
  background: radial-gradient(120% 90% at 50% 55%, color-mix(in srgb, var(--surface) 70%, var(--bg-deep)), var(--bg-deep) 70%);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
.bn-canvas { position: absolute; inset: 0; display: block; }
.bn-labels { position: absolute; inset: 0; pointer-events: none; }
.bn-leaders { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.bn-leaders path { fill: none; stroke: var(--c); stroke-width: 1; stroke-opacity: .55; }
.bn-leaders path.on { stroke-width: 1.6; stroke-opacity: .9; }
.bn-leaders circle { fill: var(--c); }
.bn-legend { position: absolute; left: 22px; bottom: 14px; display: flex; gap: 16px; font: 600 11px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); pointer-events: none; }
.bn-legend span { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.bn-legend i { display: inline-block; }
.bn-lg-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--bn-c3); box-shadow: 0 0 6px var(--bn-c3); }
.bn-lg-line { width: 18px; height: 1px; background: linear-gradient(90deg, var(--bn-c3), var(--bn-c8)); }
.bn-lg-pulse { width: 18px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--accent)); box-shadow: 0 0 6px var(--accent); }
.bn-hub { position: absolute; left: 0; top: 0; display: grid; grid-template-columns: auto auto; column-gap: 8px; align-items: baseline; white-space: nowrap; will-change: transform, opacity;
  padding: 7px 12px 8px; border-radius: 14px; background: color-mix(in srgb, var(--bg-deep) 62%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 28%, transparent);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.bn-hub.on { box-shadow: inset 0 0 0 1.5px var(--c), 0 0 30px -4px var(--c); background: color-mix(in srgb, var(--bg-deep) 40%, color-mix(in srgb, var(--c) 18%, transparent)); }
.bn-hub.left { justify-items: end; }
.bn-hub b { font: 700 13px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--c); }
.bn-hub span { font: 400 22px/1 var(--serif); color: var(--ink); }
.bn-hub em { grid-column: 1 / -1; margin-top: 3px; font: 600 12px/1 var(--sans); font-style: normal; letter-spacing: .06em; color: var(--accent); }
.bn-hub.left em { justify-self: end; }
.bn-core { position: absolute; left: var(--core-x, 50%); top: var(--core-y, 53%); translate: -50% -34%; display: grid; justify-items: center; gap: 8px; pointer-events: none; color: var(--ink); z-index: 2; }
/* il nucleo: logo adado' blu con alone, "Second Brain" spaziato, la firma in corsivo */
/* logo blu come la scritta adado' in testata (Fabrizio 30/09/2026) */
.bn-mark { width: 190px; filter: drop-shadow(0 0 14px var(--bg-deep)) drop-shadow(0 0 26px color-mix(in srgb, var(--tv-blue) 60%, transparent)); }
.bn-mark svg { display: block; width: 100%; height: auto; fill: currentColor; color: var(--tv-blue); }
.bn-core b { padding-left: .55em; font: 600 15px/1 var(--sans); letter-spacing: .55em; text-transform: uppercase; white-space: nowrap;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 40%, var(--info)) 55%, var(--info)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 8px var(--bg-deep)); }
.bn-core em { font: italic 400 17px/1 var(--serif); letter-spacing: .02em; color: var(--muted); white-space: nowrap; text-shadow: 0 0 10px var(--bg-deep), 0 0 18px var(--bg-deep); }
.bn-hud { position: absolute; left: 22px; top: 18px; display: grid; gap: 4px; pointer-events: none; text-shadow: 0 0 12px var(--bg-deep); }
.bn-hud b { font: 400 64px/.95 var(--serif); color: var(--ink); }
.bn-hud span:last-child { font: 500 14px/1.2 var(--sans); color: var(--muted); }
.bn-foot { position: absolute; right: 20px; bottom: 14px; font: 600 11px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.bn-foot.stale { color: var(--warm); }

.bn-readers { flex: 1 1 auto; gap: 4px; }
.bn-asks { font-size: 72px; }
.bn-rank { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 14px; }
.bn-rank li { display: grid; grid-template-columns: 30px 48px minmax(0, 1fr) auto; column-gap: 10px; row-gap: 6px; align-items: baseline; }
.bn-rank .bn-ava { grid-row: span 3; align-self: center; width: 48px; height: 48px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; text-decoration: none; font: 400 22px/1 var(--serif); color: var(--faint); background: color-mix(in srgb, var(--line) 80%, transparent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--line) 90%, transparent); }
.bn-rank .bn-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bn-rank li.first .bn-ava { box-shadow: 0 0 0 2px var(--accent); }
.bn-rank em { font: 400 24px/1 var(--serif); font-style: normal; color: var(--faint); }
.bn-rank span { font: 400 28px/1 var(--serif); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bn-rank b { font: 400 30px/1 var(--serif); color: var(--ink); }
.bn-rank i { grid-column: 3 / -1; height: 5px; border-radius: 5px; position: relative; overflow: hidden; background: color-mix(in srgb, var(--line) 80%, transparent); }
.bn-rank i::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: inherit; background: var(--info); }
.bn-rank small { grid-column: 3 / -1; font: 500 12px/1 var(--sans); color: var(--faint); }
.bn-rank li.first em, .bn-rank li.first b { color: var(--accent); }
.bn-rank li.first i::after { background: var(--accent); box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 60%, transparent); }
.bn-kinds ul { list-style: none; margin: 2px 0 0; padding: 0; display: grid; gap: 7px; }
.bn-kinds li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.bn-kinds span { font: 500 15px/1.2 var(--sans); color: var(--muted); }
.bn-kinds b { font: 400 22px/1 var(--serif); color: var(--ink); }

/* Manutenzioni ed Escalation: colonne intere, in liste che scorrono in altezza (roll in tv.mjs) */
.mcol, .mcol.mcol-resolved { grid-template-rows: auto minmax(0, 1fr); align-content: stretch; }
.ebody section > div:has(> .mroll) { display: grid; grid-template-rows: minmax(0, 1fr); min-height: 0; }
.ebody .mroll-part { gap: 10px; }
.eops .mroll-part { gap: 18px; }
/* titoli delle schede: fino a due righe, fermi (a nastro restavano tagliati ai due lati) */
.job h4 { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: clip; line-height: 1.22; }
.mc-stale.bad b { color: var(--bad); }
.mc-age b { color: var(--ink); }
.eitem.stale { box-shadow: inset 0 0 0 2px var(--bad), 0 0 22px -6px var(--bad); }
.eitem.stale span { color: var(--bad); font-weight: 600; }
.mroll { display: block; position: relative; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
  mask-image: linear-gradient(to bottom, transparent, #000 14px, #000 calc(100% - 26px), transparent); -webkit-mask-image: linear-gradient(to bottom, transparent, #000 14px, #000 calc(100% - 26px), transparent); }
.mroll::-webkit-scrollbar { display: none; }
.mroll-part { display: grid; gap: 10px; padding: 2px 0 10px; }
.mroll.rolling { overflow: hidden; }
.mroll.rolling .mroll-track { will-change: transform; }

/* ---------------- Cleaners reinventata (29/09/2026): puntualita', sporco all'arrivo, voto ---------------- */
.scene-clean.scene-cleaners { grid-template-rows: auto minmax(0, 1.05fr) minmax(0, 1fr); gap: 14px; }
.scene-cleaners h3 { justify-content: space-between; margin: 0; }
.scene-cleaners h3 em { display: inline-flex; align-items: center; gap: 8px; font: 500 13px/1 var(--sans); font-style: normal; letter-spacing: .02em; text-transform: none; color: var(--faint); }
.scene-cleaners h3 em i { display: inline-block; width: 18px; height: 3px; border-radius: 2px; background: var(--accent); }
.scene-cleaners h3 em i.sw-ghost { background: none; border-top: 2px dashed var(--muted); height: 0; }
.scene-cleaners h3 em i.sw-bar { width: 10px; height: 12px; background: var(--warm); }
.scene-cleaners .good { color: var(--good); } .scene-cleaners .warm { color: var(--warm); } .scene-cleaners .bad { color: var(--bad); }

.cln-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cln-k { display: grid; align-content: start; gap: 6px; padding: 14px 20px 14px; border-radius: 20px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); min-width: 0; }
.cln-k > span { font: 700 12px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.cln-k > b, .cln-k-ring b { font: 400 64px/.95 var(--serif); color: var(--ink); }
.cln-k-ring { display: flex; align-items: center; gap: 14px; }
.cln-k-ring svg { width: 62px; height: 62px; transform: rotate(-90deg); flex: none; }
.cln-k-ring circle { fill: none; stroke-width: 5; }
.cln-k-ring .bg { stroke: var(--line); }
.cln-k-ring .fg { stroke: var(--warm); stroke-linecap: round; }
.cln-k-ring .fg.good { stroke: var(--good); } .cln-k-ring .fg.bad { stroke: var(--bad); }
.cln-k-ring b small { font-size: 34px; color: var(--muted); }
.cln-k small { font: 500 15px/1.3 var(--sans); color: var(--muted); }
.cln-d { font: 600 13px/1.2 var(--sans); font-style: normal; }
.cln-d.good { color: var(--good); } .cln-d.bad { color: var(--bad); } .cln-d.flat { color: var(--faint); }

.cln-charts { display: grid; grid-template-columns: 1.25fr 1fr; gap: 14px; min-height: 0; }
.cln-card { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 10px; padding: 14px 20px 12px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); min-height: 0; }
.cln-plot { position: relative; min-height: 0; }
.cln-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cln-plot path, .cln-plot line, .cln-plot circle { vector-effect: non-scaling-stroke; }
.cln-area { fill: color-mix(in srgb, var(--accent) 22%, transparent); }
.cln-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.cln-ghost { fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-dasharray: 5 6; opacity: .8; }
.cln-arr { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 2 5; opacity: .6; }
.cln-15 { stroke: var(--warm); stroke-width: 1.6; stroke-dasharray: 6 5; }
.cln-now { fill: var(--accent); stroke: var(--bg-deep); stroke-width: 3; }
.cln-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 6; }
.cln-ticks text { fill: var(--faint); font: 600 13px var(--sans); text-anchor: middle; }
.cln-bars rect { fill: color-mix(in srgb, var(--warm) 70%, transparent); }
.cln-bars rect.good { fill: color-mix(in srgb, var(--good) 55%, transparent); }
.cln-bars rect.bad { fill: color-mix(in srgb, var(--bad) 75%, transparent); }
.cln-day-lbl span { position: absolute; font: 600 13px/1 var(--sans); color: var(--muted); white-space: nowrap; }
.cln-day-lbl .a { right: 4px; translate: 0 -140%; }
.cln-day-lbl .k { top: -4px; translate: 8px 0; color: var(--warm); }
.cln-day-lbl .k b { color: var(--ink); font-size: 15px; }

.cln-teams { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 10px; min-height: 0; }
.cln-roll { min-height: 0; }
.cln-grid-teams { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.cln-team { display: grid; gap: 7px; padding: 12px 16px 12px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.cln-team header { display: grid; gap: 3px; }
.cln-team header b { font: 400 22px/1.1 var(--serif); color: var(--ink); white-space: nowrap; overflow: hidden; }
.cln-team header span { font: 500 13px/1 var(--sans); color: var(--faint); }
.cln-m { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: 8px; row-gap: 4px; }
.cln-m > span { font: 500 13px/1.2 var(--sans); color: var(--muted); }
.cln-m strong { font: 400 24px/1 var(--serif); color: var(--ink); white-space: nowrap; }
.cln-m strong small { font: 500 12px/1 var(--sans); color: var(--faint); }
.cln-bar { grid-column: 1 / -1; height: 5px; border-radius: 5px; background: var(--line); overflow: hidden; }
.cln-bar u { display: block; height: 100%; border-radius: inherit; background: var(--warm); }
.cln-bar.good u { background: var(--good); } .cln-bar.bad u { background: var(--bad); }
.cln-spark { grid-column: 1 / -1; width: 100%; height: 22px; }
.cln-spark path { fill: none; stroke: currentColor; stroke-width: 1.6; vector-effect: non-scaling-stroke; opacity: .85; }
.cln-x { position: absolute; left: 0; right: 0; bottom: 0; height: 18px; }
.cln-x span { position: absolute; bottom: 0; translate: -50% 0; font: 600 13px/1 var(--sans); color: var(--faint); white-space: nowrap; }

/* Human Team: quattro riquadri (via quello delle integrazioni, 30/09/2026) */
.skpis.skpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------------- Ospiti e recensioni (01/10/2026: Unita' + Recensioni) ---------------- */
.gs-side { grid-template-rows: auto auto auto minmax(0, 1fr); gap: 10px; }
.gs-side h3 { margin: 4px 0 2px; }
.gs-feed { gap: 8px; }
.gs-feed .rv-item { grid-template-columns: 68px minmax(0, 1fr); gap: 14px; padding: 6px 10px 6px 6px; }
.gs-feed .rv-tile { width: 68px; height: 60px; }
.gs-feed .rv-tile b { font-size: 34px; }
.gs-feed .rv-item-main > b { font-size: 25px; }
.gs-feed .rv-item-meta { font-size: 15px; gap: 10px; }
.gs-frs b { color: var(--good); }

/* ---------------- Portafoglio (01/10/2026: Panoramica + Patrimonio) ---------------- */
.pf-stack { position: relative; height: 100%; min-height: 0; }
.pf-stack > .pf-a, .pf-stack > .pf-b { position: absolute; inset: 0; transition: opacity .7s var(--ease), visibility 0s .7s; }
.pf-stack > .pf-b { opacity: 0; visibility: hidden; }
.pf-stack.pf-growth > .pf-a { opacity: 0; visibility: hidden; }
.pf-stack.pf-growth > .pf-b { opacity: 1; visibility: visible; transition: opacity .7s var(--ease), visibility 0s; }
.pf-seg { display: none; position: absolute; left: 0; top: 0; z-index: 3; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.manual .pf-seg { display: flex; }
.pf-seg button { padding: 6px 14px; border-radius: 999px; font: 600 13px/1 var(--sans); color: var(--muted); }
.pf-seg button[aria-checked="true"] { background: var(--accent); color: var(--accent-ink); }

/* nastro delle notizie: ora, poi il fatto */
.ti .ti-at { font-style: normal; font-size: .82em; color: var(--faint); margin-right: 8px; font-variant-numeric: tabular-nums; }
.ti.good b { color: var(--good); }
.scene-props.scene-guests .skpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
/* nella dashboard (senza rotazione) i due bottoni stanno in una riga sopra, non sopra i riquadri */
.manual .pf-stack > .pf-a, .manual .pf-stack > .pf-b { top: 46px; }

/* Commerciali: periodi senza gara (meno di due commerciali con acquisizioni) saltati in TV */
.sl-pill.skip { opacity: .35; }

/* testata (01/10/2026): le schede non si restringono (fitHeader rimpicciolisce il testo e
   accorcia la pillola), quindi il testo non esce mai dalla sua scheda */
.tvw-tab { flex: none; }
.tvw-status .tot-short { display: none; }
.tvw-status.compact .tot-long { display: none; }
.tvw-status.compact .tot-short { display: inline; }
/* grafico di Human Team: spazio sopra per il numero della barra piu' alta (01/10/2026 toccava il titolo) */
.sk-chart .skc { margin-top: 18px; height: calc(100% - 18px); }

/* ---------------- Campagne (01/10/2026): campagne Meta live, modulo ads.mjs ----------------
   Palco 1600x900: scena alta ~728 px. Righe fisse misurate: testata 112, zone il resto, percorso 128. */
.scene-ads { display: grid; grid-template-rows: 112px minmax(0, 1fr) 128px; gap: 12px; height: 100%; }
.ad-head { display: grid; grid-template-columns: 360px minmax(0, 1fr) 440px; gap: 12px; min-height: 0; }
.ad-head > * { border-radius: var(--radius); background: linear-gradient(180deg, var(--surface-2), var(--surface)); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); padding: 12px 22px; min-width: 0; min-height: 0; overflow: hidden; }
.ad-title { display: grid; align-content: center; gap: 5px; background: radial-gradient(120% 160% at 0% 0%, color-mix(in srgb, var(--tv-blue) 24%, transparent), transparent 62%), linear-gradient(180deg, var(--surface-2), var(--surface)); }
.ad-kicker { display: flex; align-items: center; gap: 9px; font: 600 12.5px/1 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.ad-live { flex: none; width: 9px; height: 9px; border-radius: 50%; background: #ff5a4f; animation: adLive 2.4s var(--ease) infinite; }
@keyframes adLive { 0% { box-shadow: 0 0 0 0 rgb(255 90 79 / .55); } 70% { box-shadow: 0 0 0 9px rgb(255 90 79 / 0); } 100% { box-shadow: 0 0 0 0 rgb(255 90 79 / 0); } }
.ad-title h2 { font: 400 38px/1 var(--serif); white-space: nowrap; }
.ad-title h2 em { color: var(--tv-blue); font-style: italic; }
.ad-since { font-size: 13.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 26px; }
.ad-hero-main { display: grid; gap: 4px; }
.ad-hero-main span, .ad-hero-side span, .ad-pace-row span { font-size: 14px; color: var(--muted); white-space: nowrap; }
.ad-hero-main b { font: 400 64px/.95 var(--serif); }
.ad-hero-side { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; border-left: 1px solid var(--line); padding-left: 24px; }
.ad-hero-side div { display: grid; gap: 6px; min-width: 0; }
.ad-hero-side b { font: 400 38px/1 var(--serif); }
.ad-pace { display: grid; align-content: center; gap: 12px; }
.ad-pace-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: baseline; column-gap: 8px; row-gap: 6px; }
.ad-pace-row b { font: 400 30px/1 var(--serif); }
.ad-pace-row em { font-style: normal; font-size: 14px; color: var(--faint); }
.ad-pace-row i, .ad-bud i { grid-column: 1 / -1; position: relative; height: 7px; border-radius: 99px; background: var(--raised); overflow: hidden; }
.ad-pace-row i::after, .ad-bud i::after { content: ''; position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--k, 0)); border-radius: inherit; background: linear-gradient(90deg, color-mix(in srgb, var(--tv-blue) 60%, var(--info)), var(--tv-blue)); transition: transform 1.4s var(--ease); }

.ad-zones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, .7fr); gap: 12px; min-height: 0; }
.ad-zone { position: relative; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto auto auto; gap: 9px; padding: 14px 18px 12px 22px; border-radius: var(--radius); min-width: 0; min-height: 0; overflow: hidden;
  background: radial-gradient(120% 60% at 100% 0%, color-mix(in srgb, var(--zc) 15%, transparent), transparent 62%), linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line); transition: box-shadow 1s var(--ease); }
.ad-zone::before { content: ''; position: absolute; left: 0; top: 16px; bottom: 16px; width: 4px; border-radius: 0 4px 4px 0; background: var(--zc); }
.ad-zone.ad-glow { box-shadow: var(--shadow), inset 0 0 0 2px var(--zc), 0 0 46px -6px color-mix(in srgb, var(--zc) 70%, transparent); }
.ad-zone.off { opacity: .55; }
.ad-zone header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: 10px; }
.ad-zone h3 { font: 400 29px/1.05 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-zbud { font-size: 13px; color: var(--faint); white-space: nowrap; }
.ad-zsub { grid-column: 1 / -1; font-size: 12.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.ad-zbig { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.ad-zbig b { font: 400 52px/1 var(--serif); color: var(--zc); }
.ad-zbig span { font-size: 14px; color: var(--muted); white-space: nowrap; }
.ad-zspark { position: relative; min-height: 0; color: var(--zc); }
.ad-spark { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }
.ad-sbars rect { fill: currentColor; opacity: .15; }
.ad-zone[data-z="bari"] .ad-sarea { fill: url(#adg-bari); } .ad-zone[data-z="costa"] .ad-sarea { fill: url(#adg-costa); }
.ad-zone[data-z="palermo"] .ad-sarea { fill: url(#adg-palermo); } .ad-zone[data-z="stranieri"] .ad-sarea { fill: url(#adg-stranieri); }
.ad-sline { fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 6px color-mix(in srgb, currentColor 55%, transparent)); }
.ad-sticks line { stroke: var(--line-strong); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ad-snow { fill: currentColor; }
.ad-snow-ring { fill: none; stroke: currentColor; stroke-width: 2; vector-effect: non-scaling-stroke; transform-box: fill-box; transform-origin: center; animation: adRing 2.8s var(--ease) infinite; }
@keyframes adRing { 0% { opacity: .7; transform: scale(.5); } 80%, 100% { opacity: 0; transform: scale(1.7); } }
.ad-zstats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px; }
.ad-zone-mini .ad-zstats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ad-zstats div { display: grid; gap: 3px; min-width: 0; }
.ad-zstats span { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-zstats b { font: 400 25px/1 var(--serif); white-space: nowrap; }
.ad-zstats .ad-lead b { color: var(--zc); }
.ad-zbuds { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ad-zone-mini .ad-zbuds { grid-template-columns: 1fr; gap: 6px; }
.ad-bud { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: baseline; column-gap: 5px; row-gap: 5px; font-size: 12.5px; color: var(--muted); }
.ad-bud b { font: 600 15px/1 var(--sans); color: var(--ink); justify-self: end; }
.ad-bud em { font-style: normal; color: var(--faint); white-space: nowrap; }
.ad-bud i { height: 5px; }
.ad-bud i::after { background: var(--zc); }
.ad-ztop { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 11px; align-items: center; padding-top: 9px; border-top: 1px solid var(--line); min-width: 0; }
.ad-ztop img, .ad-ztop > i { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--raised); }
.ad-ztop div { display: grid; gap: 2px; min-width: 0; }
.ad-ztop span { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.ad-ztop b { font: 600 15px/1.15 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-ztop em { font-style: normal; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ad-funnel { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 12px; min-height: 0; }
.ad-fhead { display: grid; align-content: center; gap: 7px; padding: 0 4px; }
.ad-fhead span { font: 600 12.5px/1 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.ad-fhead b { font: 400 27px/1.08 var(--serif); }
.ad-guard { margin: 2px 0 0; font: 500 12.5px/1.35 var(--sans); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-fhead .ad-guard b { font: 700 12.5px/1.35 var(--sans); color: var(--ink); }
.ad-guard i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--good); margin-right: 7px; vertical-align: 1px; }
.ad-guard.warn i { background: var(--warm); }
.ad-funnel ol { list-style: none; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0; padding: 0; min-width: 0; }
.ad-funnel li { position: relative; display: grid; align-content: center; gap: 4px; padding: 10px 18px 10px 36px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); min-width: 0;
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 50%, calc(100% - 20px) 100%, 0 100%, 20px 50%); margin-right: -12px; }
.ad-funnel li:first-child { clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 50%, calc(100% - 20px) 100%, 0 100%); border-radius: var(--radius) 0 0 var(--radius); padding-left: 22px; }
.ad-funnel li:last-child { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 20px 50%); border-radius: 0 var(--radius) var(--radius) 0; margin-right: 0; }
.ad-funnel li.lit { background: linear-gradient(180deg, color-mix(in srgb, var(--tv-blue) 20%, var(--surface-2)), var(--surface)); }
.ad-funnel li:nth-child(n+4).lit { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 24%, var(--surface-2)), var(--surface)); }
.ad-funnel li span { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-funnel li b { font: 400 40px/1 var(--serif); }
.ad-funnel li em { font-style: normal; font-size: 12.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 15px; }
.ad-funnel li small { font: 600 13px/1 var(--sans); color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 13px; }
.ad-bump { animation: adBump 1.1s var(--ease); }
@keyframes adBump { 30% { color: var(--accent); } 100% { color: inherit; } }
.ad-dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 12px currentColor; }
.ad-dot::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid currentColor; animation: adRing 2.8s var(--ease) infinite; }
.scene-ads h2, .scene-ads h3, .scene-ads p, .scene-ads ol { margin: 0; }
.ad-zone-mini { grid-template-rows: auto auto minmax(0, 1fr) auto auto auto; }
.ad-zspark { margin-bottom: 14px; }
.ad-axis { position: absolute; left: 0; right: 0; bottom: -16px; height: 12px; }
.ad-axis span { position: absolute; transform: translateX(-50%); font-size: 11px; color: var(--faint); }
.ad-axis span:last-child { transform: translateX(-100%); }
