/* Axoon · un solo foglio di stile per pannello e pagina pubblica.
   Direzione: tramonto sull'Atlantico. Fondo chiaro e arioso, inchiostro indaco,
   un solo gradiente corallo-magenta usato poco: la scheda in testa, il pulsante principale, ciò che riguarda "te". */
:root {
  --bg: #f4f3f8;
  --card: #ffffff;
  --ink: #16142b;
  --ink-2: #5d5a74;
  --brand: #d9306f;          /* link, fuoco, dettagli: il magenta del gradiente, scurito per il contrasto */
  --hot: #ff4f6e;            /* "tu" nei grafici */
  --hot-soft: #ffe1e7;
  --ok: #0f9f78;
  --ok-soft: #dcf5ec;
  --bad: #d93b41;
  --bad-soft: #fde4e4;
  --wait: #b86e00;
  --wait-soft: #fff0d6;
  --mute: #b5b2c8;
  --mute-2: #e9e7f2;
  --line: #e3e1ec;
  --grad: linear-gradient(125deg, #ff9a3c 0%, #ff4f6e 45%, #e2338e 100%);
  --on-grad: #ffffff;
  --shadow: 0 1px 2px rgba(22, 20, 43, 0.04), 0 8px 24px rgba(22, 20, 43, 0.06);
  --glass: rgba(244, 243, 248, 0.78);
  --radius-s: 10px;
  --radius-m: 18px;
  --radius-l: 28px;
  --font: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Bricolage Grotesque", "Hanken Grotesk", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0e1a; --card: #1a1828; --ink: #f3f1fa; --ink-2: #a9a5bf; --brand: #ff7aa2; --hot: #ff6b84; --hot-soft: #3b1d2a;
    --ok: #3ddba8; --ok-soft: #123329; --bad: #ff6b6b; --bad-soft: #3a1a1e; --wait: #ffb547; --wait-soft: #3a2a12;
    --mute: #5a566f; --mute-2: #2a2740; --line: #2e2b44; --glass: rgba(15, 14, 26, 0.78);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f0e1a; --card: #1a1828; --ink: #f3f1fa; --ink-2: #a9a5bf; --brand: #ff7aa2; --hot: #ff6b84; --hot-soft: #3b1d2a;
  --ok: #3ddba8; --ok-soft: #123329; --bad: #ff6b6b; --bad-soft: #3a1a1e; --wait: #ffb547; --wait-soft: #3a2a12;
  --mute: #5a566f; --mute-2: #2a2740; --line: #2e2b44; --glass: rgba(15, 14, 26, 0.78);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.55;
  font-variant-numeric: tabular-nums;
}
a { color: var(--brand); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

h1, h2, h3 { font-family: var(--display); line-height: 1.08; margin: 0; font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.3rem + 2.8vw, 3.25rem); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.125rem; }
p { margin: 0; }
.muted { color: var(--ink-2); }
.small { font-size: 0.875rem; }

.wrap {
  max-width: 1120px; margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* ───────── barra in alto, a vetro ───────── */
.top-band {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 15;
  background: var(--glass); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 0; }
.brand {
  font-family: var(--display); font-weight: 800; font-size: 1.25rem; letter-spacing: -0.03em;
  color: var(--ink); text-decoration: none; margin-right: auto; display: inline-flex; align-items: center; gap: 8px;
}
.brand::before { content: ""; width: 26px; height: 26px; border-radius: 7px; background: url("logo.svg") center / cover no-repeat; box-shadow: 0 4px 12px rgba(255, 79, 110, 0.3); }
.brand span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ───────── comandi ───────── */
button, .btn {
  font: inherit; font-weight: 700; font-size: 0.9375rem; cursor: pointer; line-height: 1.2;
  border-radius: 999px; padding: 11px 20px; border: 1px solid transparent;
  background: var(--ink); color: var(--bg); text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
button:hover, .btn:hover { transform: translateY(-1px); }
button:active { transform: translateY(0); }
button.primary { background: var(--grad); color: var(--on-grad); box-shadow: 0 6px 18px rgba(255, 79, 110, 0.35); }
button.primary:hover { box-shadow: 0 10px 24px rgba(255, 79, 110, 0.45); }
button.light { background: #ffffff; color: #16142b; }
button.quiet, .btn.quiet { background: var(--card); color: var(--ink); border-color: var(--line); }
button.quiet:hover { border-color: var(--ink-2); }
button.danger { background: transparent; color: var(--bad); border-color: var(--line); }
button.ghost-light { background: rgba(255, 255, 255, 0.18); color: #ffffff; border-color: rgba(255, 255, 255, 0.4); }
button:disabled { opacity: 0.55; cursor: progress; transform: none; }
button.small, .btn.small { padding: 6px 12px; font-size: 0.8125rem; }

select, input, textarea {
  font: inherit; font-weight: 400; color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius-s); padding: 11px 13px; width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
select { border-radius: 999px; padding: 8px 34px 8px 14px; font-weight: 600; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--hot-soft); }
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
label { display: grid; gap: 6px; font-weight: 600; font-size: 0.9375rem; }
label .hint { font-weight: 400; color: var(--ink-2); font-size: 0.8125rem; }

/* ───────── avvisi ───────── */
.notice {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-m);
  padding: 14px 18px; margin: 16px 0; display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
}
.notice::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--wait); flex: none; }
.notice.error { background: var(--bad-soft); border-color: transparent; }
.notice.error::before { background: var(--bad); }
.notice.info::before { background: var(--ok); }
.notice > p { flex: 1 1 300px; }

/* ───────── sezioni ───────── */
.section { padding: 40px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section > h2 { margin-bottom: 8px; }
.section > .lead, .lead { color: var(--ink-2); margin-bottom: 22px; max-width: 68ch; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 24px; box-shadow: var(--shadow); }

/* ───────── la scheda in testa: l'unico punto con il gradiente pieno ───────── */
.hero {
  position: relative; overflow: hidden; margin: 24px 0 8px; border-radius: var(--radius-l);
  background: var(--grad); color: var(--on-grad); padding: clamp(24px, 4vw, 44px);
  display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
}
.hero::after {
  content: ""; position: absolute; inset: auto -10% -60% 40%; height: 120%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.28), transparent); pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero .kicker { font-weight: 600; opacity: 0.9; font-size: 0.9375rem; }
.hero h1 { max-width: 20ch; color: var(--on-grad); }
.hero .sub { max-width: 60ch; opacity: 0.95; font-size: 1.0625rem; }
.hero .row { margin-top: 4px; }
@media (max-width: 720px) { .hero { grid-template-columns: 1fr; } }

/* anello di avanzamento */
.ring { --p: 0; position: relative; width: 136px; height: 136px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.14); }
.ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(#ffffff calc(var(--p) * 1%), rgba(255, 255, 255, 0.28) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 12px), #000 calc(100% - 11px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 12px), #000 calc(100% - 11px)); }
.ring > div { position: relative; display: grid; place-items: center; text-align: center; line-height: 1.1; }
.ring b { font-family: var(--display); font-size: 2rem; font-weight: 800; display: block; }
.ring span { font-size: 0.75rem; opacity: 0.9; }

/* striscia dei sette giorni */
.weekstrip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin: 18px 0 4px; }
.wday { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 10px 8px; text-align: center; display: grid; gap: 6px; justify-items: center; }
.wday .d { font-size: 0.75rem; color: var(--ink-2); font-weight: 600; text-transform: capitalize; }
.wday .n { font-family: var(--display); font-size: 1.25rem; font-weight: 700; line-height: 1; }
.wday .dots { display: flex; gap: 3px; min-height: 8px; }
.wday .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--mute); }
.wday .dots i.da_approvare { background: var(--wait); }
.wday .dots i.approvato, .wday .dots i.programmato { background: var(--hot); }
.wday .dots i.pubblicato { background: var(--ok); }
.wday .dots i.errore { background: var(--bad); }
.wday.today { border-color: var(--ink); }
.wday.past { opacity: 0.6; }
@media (max-width: 520px) { .weekstrip { gap: 4px; } .wday { padding: 8px 2px; } .wday .d { font-size: 0.6875rem; } }

/* ───────── visibilità: punteggio ───────── */
.headline { padding: 8px 0; display: grid; gap: 14px; }
.headline h1 { max-width: 22ch; }
.score-line { font-size: 1.125rem; max-width: 62ch; }
.score-line b { font-weight: 800; }
.delta-up, .delta-down { font-weight: 800; padding: 1px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.22); }

/* il mosaico delle risposte */
.mosaic-wrap { padding: 28px 0 32px; }
.mosaic { display: grid; gap: 12px; }
.mosaic-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: center; }
.mosaic-row .eng { font-weight: 700; font-size: 0.875rem; }
.mosaic-row .eng .small { color: var(--ink-2); font-weight: 600; }
.tiles { display: flex; flex-wrap: wrap; gap: 4px; }
.tile { width: 14px; height: 24px; border-radius: 5px; background: var(--mute-2); position: relative; border: 0; padding: 0; transition: transform 0.12s ease; }
.tile:hover { transform: scale(1.25); }
.tile.r1 { background: var(--grad); }
.tile.r2 { background: linear-gradient(to top, var(--hot) 75%, var(--mute-2) 75%); }
.tile.r3 { background: linear-gradient(to top, var(--hot) 50%, var(--mute-2) 50%); }
.tile.r4 { background: linear-gradient(to top, var(--hot) 30%, var(--mute-2) 30%); }
.tile.neg { box-shadow: inset 0 0 0 2px var(--ink); }
.tiles .tile { animation: tile-in 0.5s both; }
@keyframes tile-in { from { opacity: 0; transform: translateY(6px); } }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 0.8125rem; color: var(--ink-2); margin-top: 14px; }
.legend i { display: inline-block; width: 10px; height: 16px; border-radius: 3px; vertical-align: -3px; margin-right: 6px; }
.tip {
  position: fixed; z-index: 30; max-width: 340px; pointer-events: none;
  background: var(--ink); color: var(--bg); padding: 12px 14px; border-radius: var(--radius-s);
  font-size: 0.8125rem; line-height: 1.45; box-shadow: var(--shadow);
}

/* azioni della settimana */
.actions { display: grid; gap: 14px; }
.action { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 20px; box-shadow: var(--shadow); }
.action header { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.action header > div { flex: 1 1 260px; }
.action .n { flex: none; width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center;
  background: var(--grad); color: var(--on-grad); font-family: var(--display); font-weight: 800; }
.action h3 { margin-bottom: 4px; }
.action .why { color: var(--ink-2); font-size: 0.9375rem; max-width: 72ch; }
.action .state { margin-left: auto; font-size: 0.8125rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; white-space: nowrap; background: var(--wait-soft); color: var(--wait); }
.action .state.approvata { background: var(--hot-soft); color: var(--brand); }
.action .state.fatta { background: var(--ok-soft); color: var(--ok); }
.action .state.scartata { background: var(--mute-2); color: var(--ink-2); }
.action details { margin-top: 12px; }
.action summary { cursor: pointer; font-weight: 700; color: var(--brand); }
.action textarea { margin-top: 10px; min-height: 260px; font-size: 0.875rem; }
.action .row { margin-top: 10px; }

/* confronto */
.split { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 860px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.bars { display: grid; gap: 12px; }
.bar { display: grid; grid-template-columns: minmax(90px, 150px) minmax(0, 1fr) 44px; gap: 12px; align-items: center; font-size: 0.9375rem; }
.bar .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .track { height: 12px; background: var(--mute-2); border-radius: 6px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--mute); border-radius: 6px; }
.bar.self .fill { background: var(--grad); }
.bar.self .name { font-weight: 800; }
.bar .val { text-align: right; font-weight: 700; }
svg.chart { width: 100%; height: auto; display: block; overflow: visible; }
svg.chart text { fill: var(--ink-2); font-size: 11px; font-family: var(--font); }

/* tabelle */
.table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.table th, .table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table th { font-weight: 600; color: var(--ink-2); font-size: 0.8125rem; }
.table td.num, .table th.num { text-align: right; white-space: nowrap; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; background: var(--mute-2); color: var(--ink); white-space: nowrap; }
.meter { display: inline-block; width: 64px; height: 8px; background: var(--mute-2); border-radius: 4px; overflow: hidden; vertical-align: middle; margin-right: 8px; }
.meter b { display: block; height: 100%; background: var(--grad); }
.scroll-x { overflow-x: auto; }

/* moduli */
.form { display: grid; gap: 18px; max-width: 760px; }
.form .two { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); align-items: end; }
@media (min-width: 640px) { .form .two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check input { width: auto; margin-top: 5px; accent-color: var(--hot); }

.site-issues { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-issues li { padding-left: 20px; position: relative; max-width: 75ch; }
.site-issues li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 10px; height: 10px; border-radius: 50%; background: var(--mute); }
.site-issues li.sev-alta::before { background: var(--bad); }
.site-issues li.sev-media::before { background: var(--wait); }

.progress { height: 8px; background: var(--mute-2); border-radius: 4px; overflow: hidden; margin-top: 8px; max-width: 320px; flex-basis: 100%; }
.progress b { display: block; height: 100%; background: var(--grad); transition: width 0.4s; }

.foot { padding: 32px 0 56px; font-size: 0.8125rem; color: var(--ink-2); max-width: 75ch; }
.center-box { max-width: 460px; margin: 12vh auto; padding: 32px; display: grid; gap: 18px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow); }

/* ───────── schede del pannello ───────── */
.tabs { display: flex; gap: 4px; overflow-x: auto; padding: 0 0 12px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  background: transparent; color: var(--ink-2); border: 0; padding: 8px 14px; white-space: nowrap; font-weight: 700;
}
.tabs button:hover { background: var(--mute-2); color: var(--ink); transform: none; }
.tabs button[aria-current="page"] { background: var(--ink); color: var(--bg); }
.tabs .count { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 2px; border-radius: 10px; background: var(--grad); color: #fff; font-size: 0.75rem; line-height: 20px; text-align: center; }

.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ───────── la settimana ───────── */
.days { display: grid; gap: 6px; padding-bottom: 40px; }
.day { display: grid; gap: 14px; padding-top: 26px; }
.day > h2 { font-size: 1.25rem; }
.post {
  display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 16px; box-shadow: var(--shadow);
}
@media (max-width: 640px) { .post { grid-template-columns: minmax(0, 1fr); } }
.post-body { display: grid; gap: 12px; align-content: start; min-width: 0; padding: 4px 4px 4px 0; }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 0.9375rem; }
.post-meta b { font-family: var(--display); font-size: 1.125rem; margin-right: 6px; }
.pill.fmt { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.status { margin-left: auto; font-size: 0.8125rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: var(--mute-2); color: var(--ink); white-space: nowrap; }
.status.da_approvare { background: var(--wait-soft); color: var(--wait); }
.status.approvato, .status.programmato { background: var(--hot-soft); color: var(--brand); }
.status.pubblicato { background: var(--ok-soft); color: var(--ok); }
.status.errore { background: var(--bad-soft); color: var(--bad); }
.post .why { font-size: 0.875rem; color: var(--ink-2); padding: 10px 12px; background: var(--bg); border-radius: var(--radius-s); }
.post .why b { color: var(--ink); }
.post textarea.caption { min-height: 0; font-size: 0.9375rem; }
.caption-ro { white-space: pre-line; font-size: 0.9375rem; }
.tags { color: var(--brand); font-size: 0.875rem; font-weight: 600; }
.err { color: var(--bad); font-weight: 700; font-size: 0.875rem; }

.media {
  position: relative; aspect-ratio: 4 / 5; max-width: 100%; border-radius: var(--radius-m); overflow: hidden;
  background: linear-gradient(160deg, var(--mute-2), var(--bg)); display: grid; place-items: center;
}
.media img, .media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media .ph, .asset .ph, .pick .ph { padding: 16px; font-size: 0.8125rem; color: var(--ink-2); text-align: center; }
.media .ph b, .asset .ph b { display: block; font-family: var(--display); font-size: 1.5rem; color: var(--ink); margin-bottom: 6px; }
.media-change { position: absolute; right: 10px; bottom: 10px; }
.media.missing { background: var(--wait-soft); border: 2px dashed var(--wait); padding: 16px; align-content: center; gap: 12px; text-align: left; font-size: 0.875rem; place-items: start; }
.media.missing b { color: var(--wait); }
@media (max-width: 640px) { .media { aspect-ratio: 16 / 10; } }

/* ───────── archivio ───────── */
.assets { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.asset { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; display: grid; box-shadow: var(--shadow); }
.asset img, .asset video, .asset .ph { width: 100%; aspect-ratio: 1; object-fit: cover; display: grid; place-items: center; background: linear-gradient(160deg, var(--mute-2), var(--bg)); }
.asset figcaption { padding: 12px; display: grid; gap: 6px; }
.asset input { padding: 7px 10px; font-size: 0.875rem; }

.picker {
  position: fixed; inset: 0; z-index: 40; background: var(--bg); overflow: auto;
  padding: max(20px, env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) 28px max(20px, env(safe-area-inset-left, 0px));
}
.picker-head { display: flex; justify-content: space-between; align-items: center; max-width: 1120px; margin: 0 auto 18px; }
.picker-grid { max-width: 1120px; margin: 0 auto; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.pick { display: grid; gap: 8px; padding: 10px; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-m); text-align: left; font-weight: 500; font-size: 0.8125rem; }
.pick:hover { border-color: var(--hot); }
.pick img, .pick video, .pick .ph { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-s); background: var(--mute-2); display: grid; place-items: center; }

fieldset.channels { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 0; background: var(--card); }
fieldset.channels legend { font-weight: 700; font-size: 0.9375rem; padding: 0 6px; }

/* ───────── pagina pubblica ───────── */
.public-hero { padding: 32px 0 8px; }
.public-hero h1 { font-size: clamp(2.25rem, 1.4rem + 3.6vw, 4rem); max-width: 16ch; }
.public-hero h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.public-hero .sub { color: var(--ink-2); font-size: 1.125rem; max-width: 62ch; margin-top: 18px; }
.chat { display: grid; gap: 10px; max-width: 520px; margin-top: 26px; }
.bubble { padding: 12px 16px; border-radius: 18px; max-width: 85%; font-size: 0.9375rem; box-shadow: var(--shadow); }
.bubble.q { justify-self: end; background: var(--ink); color: var(--bg); border-bottom-right-radius: 6px; }
.bubble.a { background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.bubble.a .you { display: inline-block; padding: 0 8px; border-radius: 6px; background: var(--grad); color: #fff; font-weight: 700; }
.steps { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 18px; counter-increment: s; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--grad); color: #fff; font-family: var(--display); font-weight: 800; margin-bottom: 10px; }
.redact { display: inline-block; height: 0.75em; border-radius: 4px; background: var(--mute-2); vertical-align: middle; }

/* ───────── grafiche automatiche ───────── */
.gfx-badge {
  position: absolute; left: 10px; top: 10px; z-index: 1; padding: 4px 10px; border-radius: 999px;
  background: rgba(22, 20, 43, 0.72); color: #ffffff; font-size: 0.75rem; font-weight: 700;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.media.gfx img { width: 100%; height: 100%; object-fit: cover; }
.form-title { font-size: 1.25rem; margin-top: 18px; }
input[type="color"] { height: 48px; padding: 4px; cursor: pointer; }
.swatch { border-radius: var(--radius-m); padding: 22px; color: #ffffff; min-height: 90px; display: flex; align-items: flex-end; font-family: var(--display); font-size: 1.25rem; }

/* ───────── pagina di approvazione ───────── */
.approve-list { display: grid; gap: 16px; padding: 18px 0 40px; }
.approve-bar {
  position: sticky; bottom: 0; z-index: 10; margin: 0 calc(-1 * max(20px, env(safe-area-inset-left, 0px)));
  padding: 12px max(20px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
  background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line);
  display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.done-box { text-align: center; padding: 48px 0; display: grid; gap: 12px; justify-items: center; }
.done-box .big { width: 84px; height: 84px; border-radius: 28px; background: var(--grad); display: grid; place-items: center; color: #fff; font-family: var(--display); font-size: 2.5rem; font-weight: 800; }
.legal { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.8125rem; }
.legal a { color: var(--ink-2); }

/* ───────── studio video ───────── */
.segmented { display: inline-flex; gap: 4px; padding: 4px; background: var(--mute-2); border-radius: 999px; flex-wrap: wrap; }
.segmented .seg { background: transparent; color: var(--ink-2); padding: 8px 16px; }
.segmented .seg:hover { transform: none; color: var(--ink); }
.segmented .seg.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.pickgrid { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.pickgrid legend { font-weight: 700; font-size: 0.9375rem; margin-bottom: 8px; padding: 0; }
.pickcard { position: relative; display: grid; gap: 6px; padding: 8px; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius-m); font-weight: 500; font-size: 0.8125rem; cursor: pointer; }
.pickcard input { position: absolute; top: 12px; left: 12px; width: auto; z-index: 1; accent-color: var(--hot); }
.pickcard:has(input:checked) { border-color: var(--hot); box-shadow: 0 0 0 4px var(--hot-soft); }
.pickcard img, .pickcard video, .pickcard .ph { width: 100%; aspect-ratio: 9 / 12; object-fit: cover; border-radius: var(--radius-s); background: linear-gradient(160deg, var(--mute-2), var(--bg)); display: grid; place-items: center; }
.avatar-ph { font-family: var(--display); font-size: 2.4rem; font-weight: 800; color: var(--ink-2); }
.jobs { display: grid; gap: 14px; }
.job { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 14px; box-shadow: var(--shadow); }
.job-media { aspect-ratio: 9 / 16; border-radius: var(--radius-m); overflow: hidden; background: linear-gradient(160deg, var(--mute-2), var(--bg)); display: grid; place-items: center; }
.job-media video { width: 100%; height: 100%; object-fit: cover; }
.job-media .ph { text-align: center; font-size: 0.75rem; color: var(--ink-2); padding: 8px; }
.job-media .ph b { display: block; font-family: var(--display); font-size: 1.5rem; color: var(--ink); }
.job-body { display: grid; gap: 8px; align-content: start; min-width: 0; }
.job-body details summary { cursor: pointer; color: var(--brand); font-weight: 700; font-size: 0.875rem; }
@media (max-width: 520px) { .job { grid-template-columns: 96px minmax(0, 1fr); } }

/* ───────── recensioni ───────── */
.reviews { display: grid; gap: 14px; }
.review { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 18px; display: grid; gap: 12px; box-shadow: var(--shadow); }
.stars { color: #f5a524; letter-spacing: 2px; font-size: 1.05rem; }
.stars span { color: var(--mute-2); }
.review-text { font-size: 1rem; max-width: 70ch; }
.review textarea.reply { min-height: 0; margin-top: 4px; }
.reply-ro { background: var(--bg); border-radius: var(--radius-s); padding: 12px 14px; font-size: 0.9375rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8125rem; word-break: break-all; }

/* ───────── pubblicità ───────── */
.ads { display: grid; gap: 16px; }
.adcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 18px; display: grid; gap: 14px; box-shadow: var(--shadow); }
.chip-meta, .chip-chatgpt { font-size: 0.75rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; color: #ffffff; }
.chip-meta { background: linear-gradient(120deg, #7b3fe4, #e2338e); }
.chip-chatgpt { background: #10a37f; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.kpis div { background: var(--bg); border-radius: var(--radius-s); padding: 10px 12px; display: grid; gap: 2px; }
.kpis span { font-size: 0.75rem; color: var(--ink-2); font-weight: 600; }
.kpis b { font-size: 0.9375rem; }
.chat-preview { display: grid; gap: 8px; max-width: 520px; padding: 14px; background: var(--bg); border-radius: var(--radius-m); }
.chat-preview .bubble { box-shadow: none; }
.sponsored { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 2px; background: var(--card); }
label.inline { display: inline-flex; align-items: center; gap: 8px; font-size: 0.875rem; }
label.inline input { width: 90px; padding: 8px 10px; }
.section .split > .panel { align-self: start; display: grid; gap: 8px; }
.job { grid-template-columns: 112px minmax(0, 1fr); }
label .status { justify-self: start; margin: 0; }

/* ───────── Studio di punta, piano e crediti ───────── */
.lock { color: var(--mute); font-size: 0.6rem; vertical-align: middle; }
.cost { margin: 4px 0 0; font-size: 0.95rem; color: var(--ink-2); }
.cost b { color: var(--ink); font-family: var(--display); }
.range { display: flex; gap: 12px; align-items: center; }
.range input { flex: 1; accent-color: var(--hot); padding: 0; }
.range output { font-family: var(--display); font-weight: 800; font-size: 1.25rem; min-width: 1.5ch; text-align: right; }
.chips { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-block; padding: 8px 14px; border-radius: 999px; background: var(--mute-2); font-weight: 600; font-size: 0.9rem; transition: background .15s, color .15s; }
.chip input:checked + span { background: var(--grad); color: var(--on-grad); }
.chip input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }
.outs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.outs .pill { text-decoration: none; }
.row-btns { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.linkish { background: none; border: 0; padding: 0; color: var(--brand); text-decoration: underline; font: inherit; cursor: pointer; box-shadow: none; }
.linkish:hover { transform: none; }

.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.bars { display: grid; gap: 10px; margin-top: 12px; }
.bar-row { display: grid; grid-template-columns: minmax(120px, 1.2fr) 2fr auto; gap: 12px; align-items: center; font-size: 0.92rem; }
.bar { height: 10px; border-radius: 999px; background: var(--mute-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--grad); border-radius: inherit; }
.mini { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.mini th { text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.mini td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.mini tr:last-child td { border-bottom: 0; }
.mini td:last-child { text-align: right; white-space: nowrap; }
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-m); }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-top: 16px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 22px 20px; box-shadow: var(--shadow); }
.plan h3 { font-size: 1.2rem; }
.plan .price { margin: 4px 0 0; display: flex; align-items: baseline; gap: 4px; }
.plan .price b { font-family: var(--display); font-size: 2.2rem; font-weight: 800; letter-spacing: -0.03em; }
.plan .price span { color: var(--ink-2); }
.plan-credits { margin: 0; padding: 8px 12px; border-radius: var(--radius-s); background: var(--mute-2); font-size: 0.9rem; }
.plan ul { margin: 6px 0 12px; padding-left: 18px; font-size: 0.92rem; display: grid; gap: 4px; flex: 1; align-content: start; }
.plan > button, .plan > .pill { align-self: flex-start; }
.plan.pick { border: 2px solid transparent; background: linear-gradient(var(--card), var(--card)) padding-box, var(--grad) border-box; }
.plan.current { outline: 2px solid var(--ok); outline-offset: -2px; }
.plan-flag { position: absolute; top: -11px; left: 20px; background: var(--grad); color: var(--on-grad); font-size: 0.72rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.packs { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.pack { display: grid; justify-items: start; gap: 2px; min-width: 150px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 16px 18px; box-shadow: var(--shadow); }
.pack b { font-family: var(--display); font-size: 1.8rem; font-weight: 800; line-height: 1; }
.pack span { color: var(--ink-2); font-size: 0.85rem; }
.pack p { margin: 6px 0 8px; font-weight: 700; }
.admin { border-top: 1px dashed var(--line); padding-top: 28px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 16px 0; }
.kpis div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px 16px; }
.kpis b { display: block; font-family: var(--display); font-size: 1.6rem; font-weight: 800; }
.kpis span { color: var(--ink-2); font-size: 0.85rem; }
@media (max-width: 560px) {
  .bar-row { grid-template-columns: 1fr auto; }
  .bar-row .bar { grid-column: 1 / -1; grid-row: 2; }
}
.mini th:last-child { text-align: right; }
.plan-state { display: inline-block; margin: 10px 0 4px; padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,0.22); color: var(--on-grad); font-weight: 700; font-size: 0.9rem; }

/* ───────── Contatti: pagine, editor con l'agente, rubrica, radar ───────── */
.segmented .count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--grad); color: #fff; font-size: 0.72rem; line-height: 20px; text-align: center; }
.hero-kpis { margin: 0; grid-template-columns: repeat(3, minmax(110px, 1fr)); }
.hero-kpis div { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.28); color: var(--on-grad); backdrop-filter: blur(6px); }
.hero-kpis span { color: var(--on-grad); opacity: 0.9; }
@media (max-width: 720px) { .hero-kpis { grid-template-columns: repeat(3, 1fr); } .hero-kpis b { font-size: 1.25rem; } }
.row-btns.left { justify-content: flex-start; }
.btn.quiet-link { background: transparent; color: var(--brand); padding-left: 4px; padding-right: 4px; }
button.danger.quiet { color: var(--bad); }

.pagecards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); margin-bottom: 28px; }
.pagecard { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 14px; box-shadow: var(--shadow); }
.pagecard .thumb { border-radius: var(--radius-m); background: linear-gradient(150deg, var(--a), var(--b)); color: #fff; padding: 14px; display: flex; align-items: flex-start; min-height: 170px; position: relative; overflow: hidden; }
.pagecard .thumb::before { content: ""; position: absolute; left: 14px; right: 14px; bottom: 14px; height: 26%; border-radius: 10px; background: rgba(255, 255, 255, 0.92); }
.pagecard .thumb span { position: relative; font-weight: 800; font-size: 0.82rem; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.pc-body { display: grid; gap: 6px; align-content: start; min-width: 0; }
.pc-body h3 { font-size: 1.1rem; }
.pc-body a { word-break: break-all; }
.pc-stats { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.9rem; color: var(--ink-2); }
.pc-stats b { color: var(--ink); font-family: var(--display); }
.pagecard .ab { background: var(--mute-2); border-radius: var(--radius-s); padding: 6px 10px; margin: 2px 0; }
@media (max-width: 520px) { .pagecard { grid-template-columns: 1fr; } .pagecard .thumb { min-height: 110px; } }

.newpage h2 { margin-bottom: 6px; }
.goals { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.goals legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.goal { position: relative; display: block; cursor: pointer; }
.goal input { position: absolute; opacity: 0; inset: 0; }
.goal span { display: grid; gap: 2px; height: 100%; padding: 12px 14px; border-radius: var(--radius-m); border: 1px solid var(--line); background: var(--bg); font-weight: 400; font-size: 0.86rem; color: var(--ink-2); transition: border-color .15s, box-shadow .15s; }
.goal span b { color: var(--ink); font-size: 0.95rem; }
.goal span i { font-style: normal; font-size: 0.75rem; font-weight: 700; color: var(--brand); }
.goal input:checked + span { border: 2px solid transparent; background: linear-gradient(var(--card), var(--card)) padding-box, var(--grad) border-box; box-shadow: var(--shadow); }
.goal input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }

.editor-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 22px 0 14px; }
.ed-title { font-size: clamp(1.3rem, 3vw, 1.8rem); }
.editor-top .grow { flex: 1; }
.editor-top label.inline { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 600; }
.editor-top label.inline select { max-width: 220px; padding: 7px 10px; font-size: 0.85rem; }
.segmented.small .seg { padding: 6px 12px; font-size: 0.82rem; }
.editor { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 18px; align-items: start; padding-bottom: 40px; }
.chat { display: grid; gap: 12px; padding: 16px; position: sticky; top: 120px; }
.msgs { display: grid; gap: 10px; max-height: 46vh; overflow-y: auto; padding-right: 4px; align-content: start; }
.msg { max-width: 92%; padding: 10px 14px; border-radius: 16px; font-size: 0.93rem; }
.msg p { margin: 0; white-space: pre-wrap; }
.msg.agente { background: var(--mute-2); border-bottom-left-radius: 4px; }
.msg.titolare { background: var(--grad); color: var(--on-grad); justify-self: end; border-bottom-right-radius: 4px; }
.msg.typing p { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.chips-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.chipbtn { flex: none; background: var(--card); color: var(--ink); border: 1px solid var(--line); font-size: 0.8rem; font-weight: 600; padding: 6px 12px; }
.chatbox { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.chatbox textarea { resize: vertical; min-height: 48px; }
.outline { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 2px; }
.chat details summary { cursor: pointer; font-weight: 700; }
.chat details .form { margin-top: 10px; }
.preview { display: grid; justify-items: center; background: repeating-linear-gradient(45deg, var(--mute-2) 0 12px, transparent 12px 24px); border-radius: var(--radius-l); padding: 22px; border: 1px solid var(--line); }
.preview .device { width: 100%; background: var(--card); border-radius: 18px; overflow: hidden; box-shadow: 0 20px 50px rgba(22, 20, 43, 0.18); }
.preview.telefono .device { width: 390px; max-width: 100%; border-radius: 36px; border: 10px solid #16142b; }
.preview iframe { display: block; width: 100%; height: 78vh; min-height: 560px; border: 0; background: #fff; }
@media (max-width: 900px) { .editor { grid-template-columns: 1fr; } .chat { position: static; } .msgs { max-height: 40vh; } .preview { padding: 12px; } }

.rub-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.rub-head .lead { margin: 0; }
.contacts, .radars { display: grid; gap: 12px; }
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); gap: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 18px; }
.contact h3 { font-size: 1.05rem; margin-bottom: 2px; }
.c-main { display: grid; gap: 6px; align-content: start; min-width: 0; }
.c-main p { margin: 0; }
.c-msg { background: var(--bg); border-radius: var(--radius-s); padding: 8px 12px; font-size: 0.93rem; }
.c-side { display: grid; gap: 8px; align-content: start; }
.c-side select, .c-side textarea { font-size: 0.9rem; }
@media (max-width: 640px) { .contact { grid-template-columns: 1fr; } }
.radar { display: grid; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 18px; }
.radar.risposta { opacity: 0.7; }
.radar h3 { font-size: 1.05rem; }
.radar h3 a { color: var(--ink); text-decoration-color: var(--line); }
.radar p { margin: 0; }
.radar textarea { font-size: 0.92rem; }
@media (min-width: 900px) { .tabs { flex-wrap: wrap; } }
.pack.addon { max-width: 320px; } .pack.addon b { font-size: 1.3rem; } .pack.addon span { font-size: 0.88rem; }

/* ───────── Costruttore con Claude ───────── */
.working { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--hot-soft); color: var(--ink); font-weight: 700; font-size: 0.85rem; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--hot); border-right-color: transparent; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.stepline { display: flex; align-items: center; gap: 10px; font-size: 0.84rem; color: var(--ink-2); padding: 2px 4px; }
.stepline .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.stepline.now { color: var(--ink); font-weight: 600; }
.stepline.now .dot { background: var(--hot); box-shadow: 0 0 0 4px var(--hot-soft); animation: pulse 1.2s ease-in-out infinite; }
.msg .linkish { margin-top: 4px; display: inline-block; }
.msg.titolare .linkish { color: var(--on-grad); }
.checks { border-radius: var(--radius-m); padding: 14px 18px; margin: 0 0 16px; border: 1px solid var(--line); background: var(--card); }
.checks.bad { background: var(--bad-soft); border-color: transparent; }
.checks.ok { background: var(--ok-soft); border-color: transparent; }
.checks p { margin: 0 0 6px; }
.checks ul { margin: 0 0 8px; padding-left: 20px; font-size: 0.9rem; }
.checks li.b { color: var(--ink); font-weight: 600; }
.checks details { font-size: 0.88rem; margin-bottom: 8px; }
.checks summary { cursor: pointer; font-weight: 700; }
.draft-note { margin: 0 0 12px; font-size: 0.85rem; font-weight: 600; color: var(--ink-2); background: var(--card); padding: 6px 12px; border-radius: 999px; }
.preview > a.small { margin-top: 10px; }

/* ───────── Regia con Claude ───────── */
.editor.regia { grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); }
.player { display: grid; gap: 14px; }
.screen { background: #0d0b16; border-radius: var(--radius-l); overflow: hidden; display: grid; place-items: center; min-height: 420px; box-shadow: var(--shadow); }
.screen video { width: 100%; max-height: 70vh; background: #000; display: block; }
.ph-screen { color: #cfc8e2; text-align: center; padding: 40px 24px; display: grid; gap: 14px; justify-items: center; max-width: 360px; }
.spin.big { width: 34px; height: 34px; border-width: 3px; }
.tl-head { display: flex; justify-content: space-between; align-items: baseline; }
.tl { background: #15121f; border-radius: var(--radius-m); padding: 12px 14px 14px; color: #cfc8e2; font: 600 0.72rem ui-monospace, SFMono-Regular, Menlo, monospace; overflow-x: auto; }
.tl-ruler { display: grid; grid-template-columns: 44px 1fr; margin-bottom: 8px; }
.tl-ruler div { position: relative; height: 16px; border-bottom: 1px dashed #3a3450; }
.tl-ruler i { position: absolute; transform: translateX(-50%); font-style: normal; color: #8f88a8; }
.tl-ruler i:first-child { transform: none; }
.tl-row { display: grid; grid-template-columns: 44px 1fr; align-items: center; margin-top: 8px; }
.tl-name { display: inline-grid; place-items: center; width: 34px; height: 24px; border-radius: 6px; border: 1px solid #3a3450; color: #e9e4f5; }
.tl-lane { position: relative; height: 34px; background: #1d1929; border-radius: 8px; min-width: 420px; }
.tl-item { position: absolute; top: 3px; bottom: 3px; border-radius: 6px; padding: 4px 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 700; color: #3b1408; }
.tl-item.v { background: linear-gradient(180deg, #f08a5d, #e2683f); }
.tl-item.t { background: #f7c4ad; }
.tl-item.c { background: #ffe08a; color: #3d2e00; }
.tl-item.a { background: repeating-linear-gradient(90deg, #6d6687 0 2px, transparent 2px 5px); opacity: .9; }
.pill.on { background: var(--grad); color: var(--on-grad); }
button.pill { border: 0; cursor: pointer; }
@media (max-width: 900px) { .editor.regia { grid-template-columns: 1fr; } .screen { min-height: 260px; } }
.brand b { font-weight: inherit; }

/* ───────── home pubblica (www) ─────────
   Un solo momento in movimento: il registro della notte degli agenti che si compila e finisce con «Approva». */
.btn.primary { background: var(--grad); color: var(--on-grad); box-shadow: 0 6px 18px rgba(255, 79, 110, 0.35); }
.btn-lg { padding: 15px 26px; font-size: 1rem; }
.home-top { display: flex; align-items: center; gap: 18px; padding-top: 18px; padding-bottom: 18px; }
.home-top nav { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.home-top nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.9375rem; }
.home-top nav a:hover { color: var(--brand); }
.home-top .home-login { border: 1px solid var(--line); background: var(--card); padding: 8px 16px; border-radius: 999px; }
@media (max-width: 720px) { .home-top nav a:not(.home-login) { display: none; } }

.home-hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; padding-top: 48px; padding-bottom: 88px; }
.home-hero h1 { font-size: clamp(2.3rem, 1.4rem + 3.4vw, 4rem); line-height: 1.02; letter-spacing: -0.04em; max-width: 14ch; }
.home-hero .sub { font-size: 1.125rem; color: var(--ink-2); max-width: 54ch; margin: 22px 0 28px; }
.home-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
@media (max-width: 900px) { .home-hero { grid-template-columns: 1fr; gap: 40px; padding-top: 20px; padding-bottom: 56px; } }

.night-shift {
  margin: 0; background: #16142b; color: #f3f1fa; border-radius: var(--radius-l); padding: 26px 26px 22px;
  box-shadow: 0 30px 60px -20px rgba(22, 20, 43, 0.45); position: relative; overflow: hidden;
}
.night-shift::after { content: ""; position: absolute; inset: auto -30% -60% -30%; height: 70%; background: var(--grad); filter: blur(70px); opacity: 0.28; pointer-events: none; }
.night-shift figcaption { display: flex; flex-direction: column; gap: 2px; margin-bottom: 18px; }
.night-shift figcaption b { font-family: var(--display); font-size: 1.125rem; }
.night-shift figcaption span { color: #a9a5bf; font-size: 0.875rem; }
.shift-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; position: relative; z-index: 1; }
.shift-log li { display: grid; grid-template-columns: 3.4em 1fr; gap: 12px; font-size: 0.9375rem; line-height: 1.4; opacity: 0; transform: translateY(6px); animation: shift-in 0.5s ease forwards; }
.shift-log time { color: #ff9ab0; font-weight: 700; font-variant-numeric: tabular-nums; }
.shift-log li:nth-child(1) { animation-delay: 0.3s; } .shift-log li:nth-child(2) { animation-delay: 0.9s; }
.shift-log li:nth-child(3) { animation-delay: 1.5s; } .shift-log li:nth-child(4) { animation-delay: 2.1s; }
.shift-log li:nth-child(5) { animation-delay: 2.7s; }
.shift-ready {
  position: relative; z-index: 1; margin-top: 20px; background: #ffffff; color: #16142b; border-radius: var(--radius-m);
  padding: 14px 14px 14px 18px; display: flex; align-items: center; gap: 12px; justify-content: space-between;
  opacity: 0; transform: translateY(10px) scale(0.98); animation: shift-in 0.6s cubic-bezier(.2,.8,.2,1) 3.5s forwards;
}
.shift-ready p { display: flex; flex-direction: column; }
.shift-ready p span { color: #5d5a74; font-size: 0.875rem; }
.shift-btn { background: var(--grad); color: #fff; font-weight: 700; border-radius: 999px; padding: 10px 18px; flex: none; }
@keyframes shift-in { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .shift-log li, .shift-ready { opacity: 1; transform: none; } }

.home-band { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 80px 0; }
.home-section { padding-top: 80px; padding-bottom: 80px; }
.home h2 { font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.5rem); letter-spacing: -0.03em; max-width: 24ch; margin-bottom: 28px; }
.home .lead { color: var(--ink-2); max-width: 66ch; margin: -12px 0 32px; }

.jobs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; margin: 0; }
.jobs > div { padding: 22px 0; border-top: 1px solid var(--line); }
.jobs dt { font-family: var(--display); font-weight: 700; font-size: 1.1875rem; margin-bottom: 6px; }
.jobs dd { margin: 0; color: var(--ink-2); max-width: 52ch; }
@media (max-width: 760px) { .jobs { grid-template-columns: 1fr; } }

.home-steps li b { display: block; font-family: var(--display); font-size: 1.125rem; margin-bottom: 4px; color: var(--ink); }

.plans-home { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.plan-home { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 22px; display: flex; flex-direction: column; gap: 12px; background: var(--bg); }
.plan-home.best { background: #16142b; color: #f3f1fa; border-color: transparent; }
.plan-home.best .plan-facts, .plan-home.best li { color: #cbc7de; }
.plan-home.lite { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 24px; }
.plan-home.lite ul { display: none; }
.plan-home.lite .plan-facts { flex: 1; }
.plan-tag { font-size: 0.8125rem; color: #ff9ab0; font-weight: 600; margin-top: -6px; }
.plan-price b { font-family: var(--display); font-size: 2.25rem; letter-spacing: -0.03em; }
.plan-price span { color: var(--ink-2); margin-left: 6px; font-size: 0.875rem; }
.plan-home.best .plan-price span { color: #a9a5bf; }
.plan-facts { color: var(--ink-2); font-size: 0.9375rem; font-weight: 600; }
.plan-home ul { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; font-size: 0.9rem; color: var(--ink-2); flex: 1; }
.plan-home .btn { justify-content: center; margin-top: 6px; }
@media (max-width: 980px) { .plans-home { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .plans-home { grid-template-columns: 1fr; } .plan-home.lite { flex-direction: column; align-items: stretch; } }

.rules { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; max-width: 72ch; }
.rules li { color: var(--ink-2); padding-left: 28px; position: relative; }
.rules li::before { content: ""; position: absolute; left: 0; top: 0.45em; width: 12px; height: 12px; border-radius: 4px; background: var(--grad); }
.rules b { color: var(--ink); }

.home-final { text-align: left; padding-top: 24px; padding-bottom: 96px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.home-final h2 { margin: 0; max-width: 20ch; }
.home-foot { padding-bottom: 40px; }

/* ───────── accesso e area soci ───────── */
.center-box.auth.wide { max-width: 680px; }
.notice.ok { background: var(--ok-soft); border-color: transparent; }
.notice.ok::before { background: var(--ok); }
button.google { background: var(--card); color: var(--ink); border-color: var(--line); justify-content: center; padding: 13px 20px; width: 100%; }
button.google:hover { border-color: var(--ink-2); }
.or { display: flex; align-items: center; gap: 12px; color: var(--ink-2); font-size: 0.8125rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.admin .kpis b { font-family: var(--display); font-size: 1.5rem; }
.admin-tools { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0 12px; }
.admin-tools input { flex: 1 1 280px; }
.admin .chips { margin-bottom: 14px; }
button.chip { background: var(--card); color: var(--ink); border-color: var(--line); padding: 7px 14px; font-size: 0.8125rem; }
button.chip span { color: var(--ink-2); font-weight: 600; }
button.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
button.chip[aria-pressed="true"] span { color: var(--mute); }
.admin-row { cursor: pointer; }
.admin-row:hover td, .admin-row.open td { background: var(--bg); }
.admin-detail > td { background: var(--bg); padding: 0 !important; }
.admin-editor { display: grid; grid-template-columns: 260px 1fr; gap: 28px; padding: 20px; }
@media (max-width: 760px) { .admin-editor { grid-template-columns: 1fr; } }
.facts { margin: 0; display: grid; gap: 10px; align-content: start; }
.facts dt { font-size: 0.75rem; color: var(--ink-2); font-weight: 600; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.pill.st-attivo { background: var(--ok-soft); color: var(--ok); }
.pill.st-omaggio { background: var(--hot-soft); color: var(--brand); }
.pill.st-prova { background: var(--wait-soft); color: var(--wait); }
.pill.st-sospeso, .pill.st-scaduto { background: var(--bad-soft); color: var(--bad); }
.admin-log summary { cursor: pointer; }

/* ───────── home: l'orbita degli agenti (3D con CSS, nessuna libreria) ─────────
   Il nucleo è il brand del cliente; gli otto lavori degli agenti gli girano intorno e restano sempre leggibili (si girano verso chi guarda).
   Segue il puntatore o l'inclinazione del telefono; si ferma fuori schermo e con «riduci movimento». */
@media (min-width: 901px) { .home-hero { grid-template-columns: 1fr 1fr; } }
.orbit-scene { --r: clamp(130px, 19vw, 250px); height: clamp(400px, 44vw, 540px); position: relative; touch-action: pan-y; }
.orbit-tilt { position: absolute; inset: 0; transform-style: preserve-3d; }
.core {
  position: absolute; left: 50%; top: 50%; width: 140px; height: 140px; margin: -70px 0 0 -70px; border-radius: 50%; z-index: 50;
  background: radial-gradient(circle at 34% 30%, #ffd9b5 0%, #ff8a5c 26%, #ff4f6e 52%, #a81d6a 100%);
  box-shadow: 0 0 90px 18px rgba(255, 79, 110, 0.38), inset -16px -20px 44px rgba(60, 10, 50, 0.45);
  display: grid; place-items: center; color: #fff; text-align: center; animation: core-breathe 6s ease-in-out infinite;
}
@keyframes core-breathe { 50% { box-shadow: 0 0 120px 26px rgba(255, 79, 110, 0.48), inset -16px -20px 44px rgba(60, 10, 50, 0.45); } }
.core b { font-family: var(--display); font-size: 1rem; line-height: 1.1; max-width: 8ch; text-shadow: 0 1px 8px rgba(80, 10, 40, 0.5); position: relative; }
.core-ring { position: absolute; left: 50%; top: 50%; width: 330%; height: 92%; transform: translate(-50%, -50%); border-radius: 50%; border: 1px solid rgba(255, 79, 110, 0.28); pointer-events: none; }
.core-ring.r2 { width: 450%; height: 130%; border-color: rgba(255, 154, 60, 0.2); }
.orbit { position: absolute; inset: 0; cursor: grab; }
.orbit.dragging { cursor: grabbing; }
.tile { position: absolute; left: 50%; top: 50%; width: 176px; margin: -54px 0 0 -88px; will-change: transform, opacity, filter; user-select: none; }
.tile .face {
  display: grid; gap: 3px; padding: 12px 13px; border-radius: 16px; background: rgba(255, 255, 255, 0.92); color: #16142b;
  border: 1px solid rgba(255, 255, 255, 0.95); box-shadow: 0 22px 44px -20px rgba(22, 20, 43, 0.5);
  font-size: 0.8125rem; line-height: 1.3;
}
.tile .face b { font-weight: 800; font-size: 0.875rem; }
.tile .face span { color: #5d5a74; font-size: 0.75rem; }
.tile .face i { display: block; font-style: normal; margin-bottom: 5px; }
/* senza JavaScript o con «riduci movimento»: le tessere stanno ferme su un'ellisse */
.orbit:not(.live) .tile { transform: translate(calc(sin(var(--i) * 45deg) * var(--r)), calc(cos(var(--i) * 45deg) * var(--r) * 0.32)) scale(calc(0.8 + cos(var(--i) * 45deg) * 0.15)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tile .face { background: rgba(32, 29, 50, 0.9); color: #f3f1fa; border-color: rgba(255, 255, 255, 0.12); } :root:not([data-theme="light"]) .tile .face span { color: #a9a5bf; } }

/* miniature dentro le tessere */
.thumb { height: 46px; border-radius: 9px; background: linear-gradient(135deg, #ffb36b, #ff4f6e 55%, #7b3fe4); }
.play { height: 46px; border-radius: 9px; background: #16142b; position: relative; }
.play::after { content: ""; position: absolute; left: 50%; top: 50%; margin: -9px 0 0 -6px; border-left: 15px solid #fff; border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
.play::before { content: ""; position: absolute; left: 8px; right: 8px; bottom: 6px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, #ff4f6e 62%, rgba(255,255,255,.3) 62%); }
.browser { height: 46px; border-radius: 9px; border: 1px solid #e3e1ec; background: #fff; padding: 12px 8px 6px; display: grid; gap: 4px; position: relative; }
.browser::before { content: ""; position: absolute; left: 6px; top: 5px; width: 18px; height: 3px; border-radius: 3px; background: #ffb36b; }
.browser u { display: block; height: 4px; border-radius: 3px; background: #e9e7f2; }
.browser u:first-child { width: 70%; background: #16142b; }
.stars { color: #ff9a3c; letter-spacing: 2px; font-size: 1rem; }
.bar { height: 10px; border-radius: 6px; background: #e9e7f2; overflow: hidden; margin-top: 8px; }
.bar u { display: block; height: 100%; width: 40%; background: var(--grad); }
.spark { font-size: 1.4rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ping { width: 14px; height: 14px; border-radius: 50%; background: #0f9f78; box-shadow: 0 0 0 0 rgba(15, 159, 120, 0.5); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 12px rgba(15, 159, 120, 0); } 100% { box-shadow: 0 0 0 0 rgba(15, 159, 120, 0); } }
.bubble { display: inline-block !important; width: max-content; background: #dcf8c6; color: #16142b; border-radius: 10px 10px 10px 2px; padding: 5px 9px; font-weight: 700; font-size: 0.75rem; }
@media (max-width: 900px) { .orbit-scene { order: -1; height: clamp(330px, 80vw, 440px); } .tile { width: 146px; margin: -48px 0 0 -73px; } .tile .face { padding: 10px; } }
@media (max-width: 420px) { .tile .face span { display: none; } .tile { width: 122px; margin: -40px 0 0 -61px; } .core { width: 104px; height: 104px; margin: -52px 0 0 -52px; } }

/* come funziona: passi a sinistra, la notte degli agenti a destra (parte quando entra nello schermo) */
.how { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: start; }
.how .steps { grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .how { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .how .steps { grid-template-columns: 1fr; } }
.night-shift:not(.is-playing) .shift-log li, .night-shift:not(.is-playing) .shift-ready { animation-play-state: paused; }
