/* =========================================================================
   ADL Consulting — design system v2
   Energia da sport/streaming: blocchi neri, tagli obliqui, rosso per l'azione,
   giallo stella per i traguardi. Tema chiaro (base) e scuro, tutto con variabili.
   ========================================================================= */

@font-face { font-family: "Kanit"; src: url("../fonts/kanit-800-italic.2698dd46d37c.woff2") format("woff2"); font-weight: 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Kanit"; src: url("../fonts/kanit-700-italic.a79df9566d84.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-variable.8e433c0592f7.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

/* ---------- Token ---------- */
:root {
  --black: #0b0b0b;
  --ink: #141414;
  --red: #e23b3b;
  --red-strong: #c42a2a;
  --red-glow: rgb(226 59 59 / 0.35);
  --yellow: #f2e52e;
  --beige: #d9d4cc;
  --white: #ffffff;
  --green: #18a058;

  --bg: #f3f1ec;
  --surface: #ffffff;
  --surface-2: #f1eee8;
  --surface-3: #e8e4dc;
  --border: #e4dfd6;
  --text: #121212;
  --text-muted: #6d675e;
  --text-soft: #9a948a;
  --primary: var(--red);
  --primary-hover: var(--red-strong);
  --on-primary: #fff;
  --accent: var(--yellow);
  --on-accent: #111;
  --danger-soft: #fde9e9;
  --danger-text: #b42323;
  --warn-soft: #fbf6c4;
  --warn-text: #6b6000;
  --ok-soft: #dcf5e6;
  --ok-text: #11663a;
  --shell: #0b0b0b;
  --shell-text: #f4f2ee;
  --shell-muted: #8f8a82;
  --shell-hover: #1c1c1c;
  --focus: #1d63ff;
  --grid-line: #ece8e1;
  --shadow-1: 0 1px 2px rgb(20 16 10 / 0.05), 0 2px 8px rgb(20 16 10 / 0.04);
  --shadow-2: 0 4px 12px rgb(20 16 10 / 0.08), 0 16px 40px rgb(20 16 10 / 0.08);

  --kind-live_twitch: #e23b3b;
  --kind-video_youtube: #111111;
  --kind-tiktok: #c9b800;
  --kind-shooting: #8a7f70;
  --kind-appuntamento: #2f6bff;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --skew: -8deg;
  --tap: 44px;
  --sidebar: 264px;
  --topbar: 60px;
  --bottombar: 72px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --fast: 140ms;
  --mid: 260ms;

  --font-display: "Kanit", "Arial Black", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

/* Tema scuro. Lo script in testa alla pagina imposta data-theme prima del disegno:
   scelta dell'utente (chiaro / scuro) oppure, se è su "automatico", quella del telefono. */
:root[data-theme="dark"] {
  --bg: #0a0a0a;
  --surface: #141414;
  --surface-2: #1c1c1c;
  --surface-3: #262626;
  --border: #272727;
  --text: #f4f2ee;
  --text-muted: #a8a299;
  --text-soft: #77726a;
  --danger-soft: rgb(226 59 59 / 0.16);
  --danger-text: #ff8a8a;
  --warn-soft: rgb(242 229 46 / 0.13);
  --warn-text: #f2e52e;
  --ok-soft: rgb(24 160 88 / 0.18);
  --ok-text: #6fe3a3;
  --shell: #050505;
  --shell-hover: #161616;
  --focus: #f2e52e;
  --grid-line: #222;
  --shadow-1: 0 1px 2px rgb(0 0 0 / 0.5);
  --shadow-2: 0 8px 30px rgb(0 0 0 / 0.55);
  --kind-video_youtube: #f4f2ee;
  --kind-tiktok: #f2e52e;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar) + 12px); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; }
p { margin: 0 0 .75rem; }
button { font: inherit; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1rem 0; }
::selection { background: var(--yellow); color: #111; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
[x-cloak] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--text-muted); }
.soft { color: var(--text-soft); }
.small { font-size: .875rem; }
.tiny { font-size: .75rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; }
.skip-link { position: absolute; left: -9999px; z-index: 200; }
.skip-link:focus { left: 1rem; top: 1rem; background: var(--yellow); color: #111; padding: .6rem 1rem; border-radius: var(--r-sm); }

.icon { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 18px; height: 18px; }
.icon-lg { width: 28px; height: 28px; }

/* ---------- Struttura dell'app ---------- */
.shell { min-height: 100vh; }
.sidebar { display: none; }
.main { min-width: 0; }
.content { max-width: 1180px; margin: 0 auto; padding: 1.25rem 1rem 2.5rem; }
.content-narrow { max-width: 760px; }

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  height: var(--topbar); padding: 0 .75rem 0 1rem;
  background: var(--shell); color: var(--shell-text);
}
.topbar-actions { display: flex; align-items: center; gap: .25rem; }

@media (min-width: 1024px) {
  .shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
  .sidebar {
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
    display: flex; flex-direction: column; gap: 1rem;
    padding: 1.25rem .9rem 1rem; background: var(--shell); color: var(--shell-text);
  }
  .topbar { display: none; }
  .content { padding: 2rem 2.25rem 3rem; }
}

/* Marchio */
.brand { display: inline-flex; align-items: center; gap: .45rem; text-decoration: none; min-height: var(--tap); color: var(--shell-text); }
.brand-star { width: 13px; height: 13px; fill: var(--yellow); stroke: none; align-self: flex-end; margin-bottom: 7px; }
.brand-year {
  display: inline-flex; flex-direction: column; justify-content: center; padding: 2px 6px;
  border: 1.5px solid var(--beige); background: #000;
  font: italic 800 .66rem/1.05 var(--font-display); transform: skewX(var(--skew));
}
.y-red { color: var(--red); } .y-beige { color: var(--beige); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font: italic 800 1.65rem/1 var(--font-display); letter-spacing: .01em; }
.brand-sub { font-size: .52rem; font-weight: 700; font-style: italic; letter-spacing: .3em; text-transform: uppercase; color: var(--shell-muted); margin-top: 2px; }
.sidebar .brand { padding: 0 .5rem .5rem; }
@media (max-width: 420px) { .topbar .brand-sub { display: none; } }

/* Navigazione laterale */
.side-label { padding: 0 .75rem; font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--shell-muted); }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a, .side-nav button {
  position: relative; display: flex; align-items: center; gap: .75rem;
  min-height: 44px; padding: 0 .75rem; border-radius: 12px; border: 0;
  background: none; color: #cfcac2; font-weight: 600; font-size: .95rem; text-decoration: none; text-align: left; cursor: pointer;
  transition: background var(--fast), color var(--fast);
}
.side-nav a:hover, .side-nav button:hover { background: var(--shell-hover); color: #fff; }
.side-nav a[aria-current="page"] { background: #1d1d1d; color: #fff; }
.side-nav a[aria-current="page"]::before {
  content: ""; position: absolute; left: -.9rem; top: 8px; bottom: 8px; width: 5px;
  background: var(--red); transform: skewY(var(--skew)); border-radius: 0 3px 3px 0;
}
.side-nav .badge { margin-left: auto; }
.side-creator {
  display: flex; align-items: center; gap: .7rem; padding: .7rem; border-radius: 14px;
  background: linear-gradient(135deg, #1b1b1b, #121212); border: 1px solid #222; text-decoration: none; color: #fff;
}
.side-creator small { display: block; color: var(--shell-muted); font-size: .75rem; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: .5rem; padding-top: .75rem; border-top: 1px solid #1f1f1f; }
.side-user { display: flex; align-items: center; gap: .6rem; padding: .25rem .5rem; }
.side-user strong { display: block; font-size: .9rem; }
.side-user small { color: var(--shell-muted); font-size: .75rem; }

/* Barra in basso (telefono) */
.bottombar {
  position: fixed; inset: auto 0 0 0; z-index: 45;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
  height: calc(var(--bottombar) + env(safe-area-inset-bottom)); padding: 0 .25rem env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-top: 1px solid var(--border);
}
.bottombar a, .bottombar button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  height: var(--bottombar); border: 0; background: none; color: var(--text-soft);
  font-size: .68rem; font-weight: 650; text-decoration: none; cursor: pointer; position: relative;
}
.bottombar [aria-current="page"] { color: var(--text); }
.bottombar [aria-current="page"] .icon { color: var(--primary); }
.bottombar [aria-current="page"]::after {
  content: ""; position: absolute; top: 0; width: 26px; height: 3px; border-radius: 0 0 3px 3px; background: var(--primary);
}
.bottombar .fab-slot { align-self: center; }
.bottombar .fab, .fab {
  display: grid; place-items: center; width: 58px; height: 58px; margin: -26px auto 0;
  border-radius: 18px; border: 0; background: var(--primary); color: #fff; cursor: pointer;
  box-shadow: 0 8px 22px var(--red-glow); transform: rotate(-8deg);
  transition: transform var(--mid) var(--ease), box-shadow var(--mid);
}
.bottombar .fab .icon { transform: rotate(8deg); width: 26px; height: 26px; color: #fff; }
.bottombar .fab:hover { transform: rotate(0) scale(1.04); }
.bottombar .fab[aria-expanded="true"] { transform: rotate(37deg); }
body.has-bottombar { padding-bottom: calc(var(--bottombar) + 1rem + env(safe-area-inset-bottom)); }
@media (min-width: 1024px) { .bottombar { display: none; } body.has-bottombar { padding-bottom: 0; } }

/* Pulsanti tondi nella barra superiore */
.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: var(--tap); height: var(--tap);
  border: 0; border-radius: 12px; background: transparent; color: inherit; cursor: pointer; text-decoration: none;
}
.icon-btn:hover { background: rgb(255 255 255 / .08); }
.content .icon-btn:hover { background: var(--surface-2); }
.dot-badge {
  position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px;
  display: grid; place-items: center; border-radius: 999px; background: var(--red); color: #fff;
  font-size: .65rem; font-weight: 800; border: 2px solid var(--shell);
}
.badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--red); color: #fff; font-size: .72rem; font-weight: 800; }
.badge-yellow { background: var(--yellow); color: #111; }

.avatar-mini {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--yellow); color: #111; font-weight: 800; font-size: .88rem; text-transform: uppercase; flex: none;
}

/* ---------- Pannelli a scomparsa (menu, azioni rapide, notifiche) ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 80; background: rgb(0 0 0 / .45); backdrop-filter: blur(3px); }
.sheet {
  position: fixed; z-index: 90; left: 0; right: 0; bottom: 0; max-height: 86vh; overflow-y: auto;
  padding: .6rem 1rem calc(1.25rem + env(safe-area-inset-bottom));
  background: var(--surface); color: var(--text); border-radius: 24px 24px 0 0; box-shadow: var(--shadow-2);
}
.sheet::before { content: ""; display: block; width: 44px; height: 5px; margin: 0 auto .9rem; border-radius: 99px; background: var(--surface-3); }
@media (min-width: 720px) {
  .sheet { left: 50%; right: auto; bottom: auto; top: 12vh; width: 520px; transform: translateX(-50%); border-radius: 24px; padding: 1.25rem; }
  .sheet::before { display: none; }
}
.sheet-title { font: italic 800 1.35rem/1.1 var(--font-display); text-transform: uppercase; margin: 0 0 .9rem; }
.sheet-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.sheet-action {
  display: flex; flex-direction: column; gap: .45rem; padding: 1rem; border-radius: var(--r);
  background: var(--surface-2); text-decoration: none; font-weight: 700; min-height: 96px;
  transition: transform var(--fast), background var(--fast);
}
.sheet-action:hover { transform: translateY(-2px); background: var(--surface-3); }
.sheet-action .icon { width: 26px; height: 26px; color: var(--primary); }
.sheet-action small { font-weight: 500; color: var(--text-muted); font-size: .78rem; }
.sheet-list a { display: flex; align-items: center; gap: .8rem; min-height: 52px; padding: 0 .5rem; border-radius: 12px; text-decoration: none; font-weight: 600; }
.sheet-list a:hover, .sheet-list a[aria-current="page"] { background: var(--surface-2); }
.sheet-list a[aria-current="page"] .icon { color: var(--primary); }

.menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 70; min-width: 240px; padding: .4rem;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-2);
}
.sidebar .menu { right: auto; left: 0; top: auto; bottom: calc(100% + 8px); }
.menu-head { padding: .6rem .75rem .55rem; border-bottom: 1px solid var(--border); margin-bottom: .3rem; }
.menu-head strong { display: block; }
.menu-item {
  display: flex; align-items: center; gap: .65rem; width: 100%; min-height: var(--tap); padding: 0 .75rem;
  border: 0; border-radius: 10px; background: none; color: inherit; text-decoration: none; text-align: left; cursor: pointer;
}
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-2); }
.menu form { margin: 0; }

/* ---------- Tipografia di pagina ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .9rem 1rem; margin-bottom: 1.4rem; }
.eyebrow { margin: 0 0 .35rem; font-size: .72rem; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; color: var(--text-muted); }
.display {
  font: italic 800 clamp(1.9rem, 6.5vw, 2.9rem)/.98 var(--font-display); text-transform: uppercase; letter-spacing: .005em;
}
.display .hl { color: var(--primary); }
.title-bar { display: block; width: 54px; height: 7px; margin-top: .55rem; background: var(--primary); transform: skewX(var(--skew)); }
.h2 { font-size: 1.08rem; font-weight: 750; letter-spacing: -.01em; }
.h3 { font-size: .95rem; font-weight: 700; }
.lead { font-size: 1.05rem; color: var(--text-muted); }

/* ---------- Hero (intestazione nera obliqua) ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  margin: -1.25rem -1rem 1.25rem; padding: 1.4rem 1rem 1.6rem;
  background: var(--black); color: #fff;
}
.hero::before {
  content: ""; position: absolute; z-index: -1; right: -60px; top: -40px; width: 260px; height: 140%;
  background: var(--red); transform: skewX(var(--skew)); opacity: .95;
}
.hero::after {
  content: ""; position: absolute; z-index: -1; right: 150px; top: -40px; width: 34px; height: 140%;
  background: var(--yellow); transform: skewX(var(--skew));
}
.hero-grain { position: absolute; inset: 0; z-index: -1; opacity: .07; background-image: radial-gradient(#fff 1px, transparent 1px); background-size: 4px 4px; }
.hero .eyebrow { color: #bdb8af; }
.hero-row { display: flex; align-items: center; gap: 1rem; }
.hero-name { font: italic 800 clamp(2rem, 8vw, 3.4rem)/.95 var(--font-display); text-transform: uppercase; text-shadow: 0 2px 0 rgb(0 0 0 / .25); }
.hero-sub { color: #cfcac2; margin: .35rem 0 0; }
.hero .avatar { border: 3px solid #fff; }
@media (min-width: 1024px) {
  .hero { margin: -2rem -2.25rem 1.75rem; padding: 2.25rem 2.25rem 2.4rem; }
  .hero::before { width: 360px; right: -40px; }
  .hero::after { right: 300px; }
}
@media (max-width: 520px) { .hero::before { width: 120px; right: -70px; } .hero::after { right: 40px; width: 20px; } }

/* ---------- Superfici ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.15rem; box-shadow: var(--shadow-1); margin-bottom: 1rem; }
.card-tight { padding: .5rem .9rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .8rem; }
.card-link { font-size: .85rem; font-weight: 650; color: var(--primary); text-decoration: none; display: inline-flex; align-items: center; gap: .2rem; min-height: var(--tap); }
.card-link:hover { text-decoration: underline; }
.card-warn { border-color: color-mix(in srgb, var(--yellow) 70%, var(--border)); background: color-mix(in srgb, var(--warn-soft) 55%, var(--surface)); }
.card-danger { border-color: color-mix(in srgb, var(--red) 45%, var(--border)); }
.card-black { background: var(--black); color: #fff; border-color: #000; }

.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.grid > .card { margin-bottom: 0; }
@media (min-width: 820px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } }
@media (min-width: 1100px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stack > * + * { margin-top: 1rem; }

/* ---------- Pulsanti ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: var(--tap); padding: 0 1.15rem; border: 1.5px solid transparent; border-radius: 12px;
  font-weight: 700; font-size: .93rem; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background var(--fast), border-color var(--fast), transform var(--fast), box-shadow var(--fast);
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 6px 16px var(--red-glow); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-dark { background: var(--text); color: var(--bg); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--text-soft); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--red-strong); color: #fff; }
.btn-ghost-danger { background: transparent; color: var(--danger-text); }
.btn-ghost-danger:hover { background: var(--danger-soft); }
.btn-block { width: 100%; }
.btn-sm { min-height: 38px; padding: 0 .8rem; font-size: .84rem; border-radius: 10px; }
.btn-icon { width: var(--tap); padding: 0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 1.25rem; }
.actions-end { justify-content: flex-end; }

/* ---------- Avvisi (toast) ---------- */
.toasts { position: fixed; z-index: 120; top: calc(var(--topbar) + .75rem); right: .75rem; left: .75rem; display: grid; gap: .5rem; pointer-events: none; }
@media (min-width: 720px) { .toasts { left: auto; width: 380px; top: 1.25rem; } }
.toast {
  pointer-events: auto; display: flex; align-items: flex-start; gap: .7rem; padding: .85rem 1rem;
  border-radius: 14px; background: var(--black); color: #fff; box-shadow: var(--shadow-2);
  border-left: 5px solid var(--yellow); animation: toast-in var(--mid) var(--ease);
}
.toast-error { border-left-color: var(--red); }
.toast p { margin: 0; flex: 1; font-weight: 550; }
.toast button { border: 0; background: none; color: #aaa; cursor: pointer; min-width: 28px; min-height: 28px; font-size: 1.15rem; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
.inline-alert { display: flex; gap: .6rem; padding: .8rem 1rem; margin-bottom: 1rem; border-radius: 12px; background: var(--danger-soft); color: var(--danger-text); font-weight: 600; }
.inline-note { display: flex; gap: .6rem; padding: .8rem 1rem; border-radius: 12px; background: var(--surface-2); color: var(--text-muted); font-size: .92rem; }
.inline-note .icon { color: var(--text); }
.inline-warn { background: var(--warn-soft); color: var(--warn-text); font-weight: 600; }

/* ---------- Statistiche ---------- */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1.25rem; }
@media (min-width: 820px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: .15rem;
  padding: 1rem 1.05rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border);
  text-decoration: none; box-shadow: var(--shadow-1); transition: transform var(--fast), box-shadow var(--fast);
}
a.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.stat .icon { color: var(--text-soft); margin-bottom: .35rem; }
.stat-value { font: italic 800 2.15rem/1 var(--font-display); letter-spacing: -.01em; }
.stat-label { font-size: .8rem; font-weight: 650; color: var(--text-muted); }
.stat-black { background: var(--black); border-color: #000; color: #fff; }
.stat-black .icon, .stat-black .stat-label { color: #b6b0a7; }
.stat-black::after { content: ""; position: absolute; right: -18px; top: -20px; width: 44px; height: 140%; background: var(--red); transform: skewX(var(--skew)); opacity: .9; }
.stat-alert .stat-value { color: var(--primary); }
.stat-gold .stat-value { color: #b49e00; }
.trend { margin-top: .25rem; font-size: .78rem; font-weight: 750; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.trend-up { color: var(--ok-text); } .trend-down { color: var(--danger-text); }
.stat-black .trend-up { color: #6fe3a3; } .stat-black .trend-down { color: #ff8a8a; }

/* ---------- Elenchi ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.item { display: flex; align-items: center; gap: .85rem; min-height: 58px; padding: .55rem .35rem; border-bottom: 1px solid var(--border); text-decoration: none; }
.list > li:last-child > .item { border-bottom: 0; }
a.item { border-radius: 12px; transition: background var(--fast); }
a.item:hover { background: var(--surface-2); }
.item-main { flex: 1; min-width: 0; }
.item-title { display: block; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-sub { display: block; font-size: .84rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; }
.chev { color: var(--text-soft); }
.date-tile {
  flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 50px; height: 54px; border-radius: 13px; background: var(--surface-2); line-height: 1.05; position: relative; overflow: hidden;
}
.date-tile b { font: italic 800 1.25rem/1 var(--font-display); }
.date-tile span { font-size: .62rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.date-tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--kind, var(--text-soft)); }
.date-tile-time b { font-size: 1rem; font-style: normal; font-family: var(--font-body); font-weight: 800; }

.empty { display: flex; flex-direction: column; align-items: center; gap: .55rem; padding: 1.75rem 1rem; text-align: center; color: var(--text-muted); }
.empty-art {
  display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; margin-bottom: .25rem;
  background: var(--surface-2); color: var(--text-soft); transform: rotate(-6deg);
}
.empty-art .icon { width: 30px; height: 30px; transform: rotate(6deg); }
.empty strong { color: var(--text); }
.empty p { margin: 0; max-width: 36ch; }

/* ---------- Etichette ---------- */
.pill {
  display: inline-flex; align-items: center; gap: .35rem; padding: .16rem .62rem; border-radius: 999px;
  font-size: .74rem; font-weight: 750; white-space: nowrap; background: var(--surface-2); color: var(--text);
}
.pill-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--kind, currentColor); }
.tag-skew {
  display: inline-block; padding: .12rem .6rem; font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  background: var(--black); color: #fff; transform: skewX(var(--skew));
}
.kind-live_twitch { --kind: var(--kind-live_twitch); }
.kind-video_youtube { --kind: var(--kind-video_youtube); }
.kind-tiktok { --kind: var(--kind-tiktok); }
.kind-shooting { --kind: var(--kind-shooting); }
.kind-appuntamento { --kind: var(--kind-appuntamento); }
.status-proposta { background: var(--surface-2); color: var(--text-muted); }
.status-confermata { background: var(--warn-soft); color: var(--warn-text); }
.status-in_corso { background: var(--danger-soft); color: var(--danger-text); }
.status-conclusa { background: var(--ok-soft); color: var(--ok-text); }
.state-in_linea { background: var(--ok-soft); color: var(--ok-text); }
.state-ritardo { background: var(--danger-soft); color: var(--danger-text); }
.state-raggiunto { background: var(--yellow); color: #111; }
.state-scaduto { background: var(--surface-2); color: var(--text-muted); }
.role-admin { background: var(--text); color: var(--bg); }
.role-manager { background: var(--warn-soft); color: var(--warn-text); }
.role-creator { background: var(--surface-2); color: var(--text-muted); }
@media (max-width: 560px) {
  .item .pill-dot { font-size: 0; gap: 0; padding: 0; background: none; }
  .item .pill-dot::before { width: 10px; height: 10px; }
}

/* ---------- Avatar ---------- */
.avatar {
  display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 50%; object-fit: cover;
  background: var(--black); color: var(--yellow); font: italic 800 1.25rem/1 var(--font-display);
}
.avatar-sm { width: 34px; height: 34px; font-size: .9rem; }
.avatar-lg { width: 84px; height: 84px; font-size: 2.2rem; }
.avatar-xl { width: 104px; height: 104px; font-size: 2.8rem; }

/* ---------- Progressi ---------- */
.bar { position: relative; height: 12px; margin: .55rem 0 .4rem; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: var(--text); transform-origin: left; animation: grow 900ms var(--ease) both; }
.bar-late > span { background: var(--primary); }
.bar-done > span { background: var(--yellow); }
.bar-ideal { position: absolute; top: -3px; bottom: -3px; width: 3px; border-radius: 2px; background: var(--text-muted); opacity: .7; }
@keyframes grow { from { transform: scaleX(0); } }
.ring { --p: 0; --c: var(--primary); width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--surface-3) 0); }
.ring::before { content: ""; grid-area: 1/1; width: 92px; height: 92px; border-radius: 50%; background: var(--surface); }
.ring > * { grid-area: 1/1; position: relative; font: italic 800 1.6rem/1 var(--font-display); }

/* ---------- Obiettivi ---------- */
.goal-card { display: block; padding: 1.1rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); text-decoration: none; box-shadow: var(--shadow-1); transition: transform var(--fast), box-shadow var(--fast); }
.goal-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.goal-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.goal-title { font-weight: 750; font-size: 1.02rem; }
.goal-numbers { display: flex; align-items: baseline; gap: .35rem; margin-top: .6rem; }
.goal-numbers b { font: italic 800 1.7rem/1 var(--font-display); }
.goal-meta { display: flex; flex-wrap: wrap; gap: .35rem .75rem; font-size: .8rem; color: var(--text-muted); }
.goal-row { padding: .8rem 0; border-bottom: 1px solid var(--border); }
.goal-row:last-child { border-bottom: 0; }
.goal-row-top { display: flex; justify-content: space-between; gap: .5rem; font-size: .95rem; }

/* ---------- Interruttori e filtri ---------- */
.segmented { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 13px; background: var(--surface-2); }
.segmented a { display: inline-flex; align-items: center; gap: .4rem; min-height: 38px; padding: 0 .9rem; border-radius: 10px; font-weight: 650; font-size: .88rem; text-decoration: none; color: var(--text-muted); }
.segmented a[aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.filters select { width: auto; flex: 1 1 10rem; }
.search { position: relative; flex: 1 1 100%; }
@media (min-width: 820px) { .search { flex: 2 1 20rem; } }
.search .icon { z-index: 1; position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--text-soft); pointer-events: none; }
.search input { padding-left: 2.6rem; }

/* ---------- Moduli ---------- */
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; }
.form-section { margin-bottom: 1.4rem; }
.form-section > legend, .form-section > .h2 { margin-bottom: .75rem; }
.field { margin-bottom: 1rem; }
.field > label, .field legend { display: block; margin-bottom: .35rem; font-weight: 650; font-size: .9rem; }
.optional { font-weight: 450; color: var(--text-soft); }
input[type="text"], input[type="password"], input[type="email"], input[type="tel"], input[type="url"], input[type="number"],
input[type="date"], input[type="time"], input[type="search"], select, textarea {
  width: 100%; min-height: 50px; padding: .65rem .9rem; border: 1.5px solid var(--border); border-radius: 13px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 16px;
  transition: border-color var(--fast), box-shadow var(--fast);
}
textarea { min-height: 100px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--text-soft); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 4px color-mix(in srgb, var(--text) 10%, transparent); }
.field-invalid input, .field-invalid select, .field-invalid textarea { border-color: var(--red); }
.form-error { display: flex; align-items: flex-start; gap: .35rem; margin-top: .35rem; color: var(--danger-text); font-weight: 650; font-size: .86rem; }
.hint { margin-top: .3rem; color: var(--text-muted); font-size: .84rem; }
.row { display: grid; gap: 0 1rem; }
@media (min-width: 600px) { .row-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.choices { display: flex; flex-wrap: wrap; gap: .5rem; }
.choices-col { flex-direction: column; align-items: stretch; }
.choice {
  display: inline-flex; align-items: center; gap: .55rem; min-height: var(--tap); padding: 0 1rem;
  border: 1.5px solid var(--border); border-radius: 999px; background: var(--surface);
  font-weight: 650; font-size: .9rem; cursor: pointer; user-select: none; transition: all var(--fast);
}
.choices-col .choice { border-radius: 13px; }
.choice:hover { border-color: var(--text-soft); }
.choice:has(input:checked) { border-color: var(--text); background: var(--text); color: var(--bg); }
.choice input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); }
.choice-danger:has(input:checked) { border-color: var(--red-strong); background: var(--red-strong); color: #fff; }
input[type="file"] { width: 100%; }
.form-card { max-width: 720px; }
details > summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; gap: .5rem; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: "▾"; margin-left: auto; color: var(--text-soft); transition: transform var(--fast); }
details[open] > summary::after { transform: rotate(180deg); }
.sticky-actions { position: sticky; bottom: calc(var(--bottombar) + env(safe-area-inset-bottom) + .5rem); z-index: 5; display: flex; gap: .5rem; padding: .6rem; margin-top: 1rem; border-radius: 16px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--border); box-shadow: var(--shadow-2); }
@media (min-width: 1024px) { .sticky-actions { bottom: 1rem; } }

/* ---------- Calendario ---------- */
.month-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .75rem; }
.month-title { font: italic 800 1.45rem/1 var(--font-display); text-transform: uppercase; }
.month { width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; }
.month th { padding: .25rem 0; font-size: .7rem; font-weight: 800; letter-spacing: .08em; color: var(--text-soft); text-transform: uppercase; }
.month td { padding: 0; vertical-align: top; }
.day { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; min-height: 52px; padding: 6px 2px; border: 0; border-radius: 13px; background: transparent; color: var(--text); cursor: pointer; transition: background var(--fast); }
.day:hover { background: var(--surface-2); }
.out .day { color: var(--text-soft); opacity: .6; }
.day-num { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; font-weight: 700; font-size: .92rem; }
.today .day-num { background: var(--primary); color: #fff; transform: skewX(var(--skew)); }
.day[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.day[aria-pressed="true"] .day-num { color: var(--bg); }
.today .day[aria-pressed="true"] .day-num { color: #fff; }
.dots { display: flex; gap: 3px; min-height: 6px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--kind); }
.chips { display: none; }
@media (min-width: 820px) {
  .day { min-height: 108px; align-items: stretch; padding: 7px; background: var(--surface); border: 1px solid var(--border); }
  .out .day { background: transparent; border-color: transparent; }
  .day-num { align-self: flex-start; }
  .dots { display: none; }
  .chips { display: flex; flex-direction: column; gap: 3px; }
  .chip { display: block; padding: 3px 7px; border-radius: 7px; font-size: .72rem; font-weight: 650; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: color-mix(in srgb, var(--kind) 14%, var(--surface)); border-left: 3px solid var(--kind); }
  .day[aria-pressed="true"] .chip { background: rgb(255 255 255 / .14); color: inherit; }
  .more { font-size: .72rem; color: var(--text-muted); text-align: left; }
}
.legend { display: flex; flex-wrap: wrap; gap: .4rem; margin: .75rem 0 0; }
.day-panel { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }

/* ---------- Bacheca collaborazioni ---------- */
.board-tabs { display: flex; gap: .4rem; overflow-x: auto; margin: 0 -1rem 1rem; padding: 0 1rem .25rem; scrollbar-width: none; }
.board-tab { flex: none; display: inline-flex; align-items: center; gap: .45rem; min-height: var(--tap); padding: 0 1rem; border-radius: 999px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font-weight: 650; font-size: .88rem; cursor: pointer; }
.board-tab[aria-selected="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--yellow); color: #111; font-size: .72rem; font-weight: 800; }
.board { display: grid; gap: 1rem; }
.board > * { min-width: 0; }
.board-col { display: none; }
.board-col-active { display: block; }
.board-col-head { display: none; }
@media (min-width: 1000px) {
  .board-tabs { display: none; }
  .board { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; }
  .board-col { display: block; padding: .6rem; border-radius: var(--r-lg); background: var(--surface-2); min-height: 10rem; }
  .board-col-head { display: flex; align-items: center; justify-content: space-between; padding: .3rem .4rem .7rem; }
}
.collab { padding: .95rem; margin-bottom: .6rem; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-1); }
.collab-brand { margin: 0; font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }
.collab-title { margin: .2rem 0 .35rem; font-weight: 750; font-size: 1.02rem; }
.collab-desc { font-size: .88rem; color: var(--text-muted); margin-bottom: .5rem; }
.collab-foot { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .6rem; }
.stepper { display: flex; gap: 3px; margin: .5rem 0 .2rem; }
.stepper span { flex: 1; height: 4px; border-radius: 99px; background: var(--surface-3); }
.stepper span.on { background: var(--primary); }

/* ---------- Profilo ---------- */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin: 0; }
@media (min-width: 820px) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fact { padding: .8rem .9rem; border-radius: 14px; background: var(--surface-2); min-width: 0; }
.fact dt { font-size: .72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.fact dd { margin: .2rem 0 0; font-weight: 700; overflow-wrap: anywhere; }

/* ---------- Analitiche ---------- */
.chart-box { position: relative; height: 270px; }
@media (min-width: 820px) { .chart-box { height: 310px; } }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.hbars li { display: grid; grid-template-columns: minmax(4.5rem, 30%) 1fr 3.4rem; align-items: center; gap: .6rem; font-size: .9rem; }
.hbar-label { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar { height: 12px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.hbar span { display: block; height: 100%; border-radius: 999px; background: var(--text); animation: grow 900ms var(--ease) both; transform-origin: left; }
.hbars li:first-child .hbar span { background: var(--primary); }
.hbar-value { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.reading { flex-wrap: wrap; }
.reading-value { margin-left: .35rem; font-variant-numeric: tabular-nums; }
.reading-doubt { background: var(--warn-soft); border-radius: 13px; padding-left: .7rem; padding-right: .7rem; border-bottom-color: transparent; margin-bottom: 5px; }
.doubt-reason { display: flex; gap: .3rem; margin-top: .2rem; font-size: .82rem; font-weight: 650; color: var(--warn-text); }
.doubt-reason::before { content: "⚠"; }
.confirm-form { display: flex; gap: .4rem; width: 100%; }
.confirm-form input { min-height: var(--tap); flex: 1; min-width: 0; }
@media (min-width: 600px) { .confirm-form { width: auto; } .confirm-form input { width: 8rem; flex: none; } }
.source { font-weight: 650; }
.source-file { color: var(--ok-text); } .source-screenshot { color: var(--warn-text); } .source-manuale { color: var(--text-muted); }
.thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.thumb { display: flex; flex-direction: column; gap: .25rem; font-size: .72rem; color: var(--text-muted); text-decoration: none; }
.thumb-img { position: relative; display: block; }
.thumb img { display: block; width: 100%; aspect-ratio: 9/16; object-fit: cover; border-radius: 12px; background: var(--surface-2); }
.thumb-count { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 99px; background: var(--black); color: #fff; font-size: .74rem; font-weight: 800; }
.dropzone { display: grid; place-items: center; min-height: 210px; padding: 1rem; border: 2px dashed var(--surface-3); border-radius: var(--r-lg); background: var(--surface-2); cursor: pointer; text-align: center; transition: border-color var(--fast); }
.dropzone:hover, .dropzone.drag { border-color: var(--primary); }
.dropzone-empty { display: flex; flex-direction: column; align-items: center; gap: .4rem; }
.dropzone-empty .icon { width: 40px; height: 40px; color: var(--primary); }
.preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: .5rem; width: 100%; }
.preview-grid img { width: 100%; aspect-ratio: 9/16; object-fit: cover; border-radius: 10px; }
.review { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .review { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: start; } .review-image { position: sticky; top: 1.5rem; } }
.review-image img { display: block; width: 100%; max-height: 72vh; object-fit: contain; border-radius: 14px; background: var(--surface-2); }
.shot-strip { display: flex; gap: .4rem; overflow-x: auto; margin-top: .6rem; padding-bottom: .25rem; }
.shot-strip button { position: relative; flex: none; width: 56px; padding: 0; border: 2px solid transparent; border-radius: 11px; background: none; cursor: pointer; }
.shot-strip button[aria-pressed="true"] { border-color: var(--primary); }
.shot-strip img { display: block; width: 100%; aspect-ratio: 9/16; object-fit: cover; border-radius: 9px; }
.shot-flag { position: absolute; top: -4px; right: -4px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--red); color: #fff; font-size: .7rem; font-weight: 800; }
.values-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 .75rem; }
@media (min-width: 820px) { .values-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- Tabelle ---------- */
.table-card { padding: .4rem; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: .8rem .7rem; text-align: left; border-bottom: 1px solid var(--border); }
.table thead th { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--text-soft); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table tbody tr:last-child > * { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table-creator { display: inline-flex; align-items: center; gap: .6rem; font-weight: 750; text-decoration: none; min-height: var(--tap); }
@media (max-width: 720px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table th, .table td { display: block; width: 100%; }
  .table tr { padding: .5rem .25rem; border-bottom: 1px solid var(--border); }
  .table th, .table td { border: 0; padding: .2rem .4rem; }
  .table td.num { display: flex; justify-content: space-between; }
  .table td::before { content: attr(data-label); color: var(--text-muted); font-size: .85rem; }
}
.perm-table { width: 100%; border-collapse: collapse; }
.perm-table th, .perm-table td { padding: .35rem .2rem; text-align: center; border-bottom: 1px solid var(--border); }
.perm-table th[scope="row"] { text-align: left; font-weight: 650; font-size: .92rem; }
.perm-table thead th { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-soft); }
.perm-choice { display: inline-grid; place-items: center; width: var(--tap); height: var(--tap); border-radius: 50%; cursor: pointer; }
.perm-choice:hover { background: var(--surface-2); }
.perm-choice input { width: 20px; height: 20px; margin: 0; accent-color: var(--primary); }

/* ---------- Creator (elenco staff) ---------- */
.creator-grid { display: grid; gap: .8rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .creator-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .creator-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.creator-tile {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: .8rem; padding: 1rem;
  border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); text-decoration: none; box-shadow: var(--shadow-1);
  transition: transform var(--mid) var(--ease), box-shadow var(--mid);
}
.creator-tile::after { content: ""; position: absolute; right: -16px; top: -10px; width: 26px; height: 130%; background: var(--surface-2); transform: skewX(var(--skew)); transition: background var(--mid); }
.creator-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.creator-tile:hover::after { background: var(--primary); }
.creator-tile-top { display: flex; align-items: center; gap: .85rem; position: relative; z-index: 1; }
.creator-tile-name { font: italic 800 1.25rem/1 var(--font-display); text-transform: uppercase; }
.facts-row { display: flex; flex-wrap: wrap; gap: .35rem; position: relative; z-index: 1; }
.fact-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem; border-radius: 999px; background: var(--surface-2); font-size: .76rem; font-weight: 650; color: var(--text-muted); }
.fact-alert { background: var(--danger-soft); color: var(--danger-text); }
.fact-warn { background: var(--warn-soft); color: var(--warn-text); }

/* ---------- Varie ---------- */
.credentials { display: grid; gap: .6rem; margin: 1.25rem 0; }
.credentials div { padding: .8rem 1rem; border-radius: 14px; background: var(--surface-2); }
.credentials dt { font-size: .72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.credentials dd { margin: .2rem 0 0; font-size: 1.05rem; overflow-wrap: anywhere; }
.credentials code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-weight: 800; }
.credentials .password { font-size: 1.45rem; letter-spacing: .06em; color: var(--primary); }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin-top: 1rem; }
.log-item { align-items: flex-start; }
.log-dot { flex: none; width: 10px; height: 10px; margin-top: .45rem; border-radius: 50%; background: var(--surface-3); }
.log-creazione { background: var(--green); } .log-modifica { background: var(--text); } .log-eliminazione { background: var(--red); }
.log-cambio_password, .log-reimpostazione_password { background: var(--yellow); }
.collab-group { border-top: 1px solid var(--border); padding: .2rem 0; }
.collab-group:first-of-type { border-top: 0; }
.notif { display: flex; gap: .8rem; padding: .85rem .6rem; border-bottom: 1px solid var(--border); text-decoration: none; border-radius: 12px; }
.notif:hover { background: var(--surface-2); }
.notif-unread { background: color-mix(in srgb, var(--warn-soft) 60%, transparent); }
.notif-icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); color: var(--primary); }
.notif-body { flex: 1; min-width: 0; }
.notif-body strong { display: block; }
.notif-time { font-size: .76rem; color: var(--text-soft); }

/* Palette comandi (ricerca rapida) */
.palette input { min-height: 56px; font-size: 1.05rem; padding-left: 2.8rem; }
.palette-results { margin-top: .6rem; max-height: 50vh; overflow-y: auto; }
.palette-results a { display: flex; align-items: center; gap: .75rem; min-height: 52px; padding: 0 .6rem; border-radius: 12px; text-decoration: none; }
.palette-results a:hover, .palette-results a.active { background: var(--surface-2); }
.kbd { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px; border: 1px solid #333; font-size: .7rem; font-weight: 700; color: var(--shell-muted); }

/* Accesso */
.auth {
  position: relative; overflow: hidden; isolation: isolate; min-height: 100vh; display: grid; place-items: center; padding: 1.5rem 1rem;
  background: var(--black); color: #fff;
}
.auth::before { content: ""; position: absolute; z-index: -1; left: 58%; top: -20%; width: 32%; height: 140%; background: var(--red); transform: skewX(var(--skew)); animation: slide-in 900ms var(--ease) both; }
.auth::after { content: ""; position: absolute; z-index: -1; left: 52%; top: -20%; width: 4%; height: 140%; background: var(--yellow); transform: skewX(var(--skew)); animation: slide-in 900ms 120ms var(--ease) both; }
@keyframes slide-in { from { transform: translateX(40%) skewX(var(--skew)); opacity: 0; } }
.auth-card { width: 100%; max-width: 430px; padding: 2rem 1.6rem; border-radius: 26px; background: var(--surface); color: var(--text); box-shadow: 0 30px 80px rgb(0 0 0 / .5); animation: rise 600ms var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.auth-brand { display: flex; justify-content: center; margin-bottom: 1.4rem; }
.auth-brand .brand { color: var(--text); transform: scale(1.35); transform-origin: center; }
.auth-brand .brand-sub { color: var(--text-muted); }
.auth-title { font: italic 800 2rem/1 var(--font-display); text-transform: uppercase; margin-bottom: .3rem; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 6rem; }
.password-wrap button { position: absolute; right: 4px; top: 4px; min-height: 42px; }

/* ---------- Compatibilità con i nomi della prima versione ---------- */
.page-title { font: italic 800 clamp(1.9rem, 6.5vw, 2.9rem)/.98 var(--font-display); text-transform: uppercase; }
.page-title::after { content: ""; display: block; width: 54px; height: 7px; margin-top: .55rem; background: var(--primary); transform: skewX(var(--skew)); }
.section-title { font-size: 1.08rem; font-weight: 750; }
.form-alert { display: flex; gap: .6rem; padding: .8rem 1rem; margin-bottom: 1rem; border-radius: 12px; background: var(--danger-soft); color: var(--danger-text); font-weight: 600; }
.notice { padding: .8rem 1rem; margin-bottom: 1rem; border-radius: 12px; background: var(--warn-soft); color: var(--warn-text); font-weight: 600; }
.creator-bar { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.25rem; }
.creator-bar strong { display: block; font-size: 1.1rem; }
.back { display: grid; place-items: center; flex: none; width: var(--tap); height: var(--tap); border-radius: 14px; background: var(--surface); border: 1px solid var(--border); text-decoration: none; }
.narrow { max-width: 480px; margin-left: auto; margin-right: auto; }
.narrow-form { max-width: 720px; }
.stat-dark { background: var(--black); border-color: #000; color: #fff; }
.stat-dark .icon, .stat-dark .stat-label { color: #b6b0a7; }
.icon-chevron { color: var(--text-soft); }
.card-head .link { font-size: .85rem; font-weight: 650; color: var(--primary); text-decoration: none; display: inline-flex; align-items: center; min-height: var(--tap); }
.date-badge { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 50px; height: 54px; border-radius: 13px; background: var(--surface-2); line-height: 1.05; }
.date-badge b { font: italic 800 1.1rem/1 var(--font-display); }
.date-badge-time b { font: 800 .95rem/1 var(--font-body); }
.goal { padding: .8rem 0; border-bottom: 1px solid var(--border); }
.goal:last-child { border-bottom: 0; }
.goal-top strong { font-weight: 700; }
.tag-late { color: var(--danger-text); font-weight: 750; }

/* Animazioni d'ingresso */
.reveal > * { animation: rise 520ms var(--ease) both; }
.reveal > *:nth-child(2) { animation-delay: 50ms; } .reveal > *:nth-child(3) { animation-delay: 100ms; }
.reveal > *:nth-child(4) { animation-delay: 150ms; } .reveal > *:nth-child(5) { animation-delay: 200ms; } .reveal > *:nth-child(n+6) { animation-delay: 250ms; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Consegne, economia, media kit ---------- */
.fact-ok { background: var(--ok-soft); color: var(--ok-text); }
.collab { position: relative; }
.collab-title a { text-decoration: none; }
.collab-title a:hover { text-decoration: underline; }
.deliverable .item { align-items: flex-start; }
.deliv-check { flex: none; display: grid; place-items: center; width: 26px; height: 26px; margin-top: .15rem; border-radius: 8px; border: 2px solid var(--surface-3); color: #fff; }
.deliverable-pubblicata .deliv-check { background: var(--green); border-color: var(--green); }
.deliverable-approvata .deliv-check { border-color: var(--yellow); }
.deliverable-bozza .deliv-check { border-color: var(--text-soft); border-style: dashed; }
.deliverable-pubblicata .item-title { color: var(--text-muted); }
.deliv-form { display: flex; flex-wrap: wrap; gap: .4rem; width: 100%; margin-left: 2.4rem; }
.deliv-form select { width: auto; min-height: 40px; padding-top: .35rem; padding-bottom: .35rem; font-size: .9rem; }
.deliv-publish { display: flex; gap: .4rem; flex: 1 1 16rem; }
.deliv-publish input { min-height: 40px; }
.deliv-tools { display: flex; gap: .2rem; margin-left: auto; }
@media (min-width: 820px) { .deliv-form { width: auto; margin-left: auto; } }
.deliv-pill-pubblicata { background: var(--ok-soft); color: var(--ok-text); }
.deliv-pill-approvata { background: var(--warn-soft); color: var(--warn-text); }
.deal-da_fatturare { background: var(--surface-2); color: var(--text-muted); }
.deal-fatturato { background: var(--warn-soft); color: var(--warn-text); }
.deal-incassato { background: var(--danger-soft); color: var(--danger-text); }
.deal-chiuso { background: var(--ok-soft); color: var(--ok-text); }
.money-table td, .money-table th { white-space: nowrap; }

/* Scheda creator nell'elenco: tutta cliccabile, con pulsanti rapidi sopra al collegamento. */
.tile-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.tile-link:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.tile-actions { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: .4rem; padding-top: .7rem; border-top: 1px solid var(--border); }
.kit-on { margin-left: .2rem; padding: 0 .4rem; border-radius: 999px; background: var(--yellow); color: #111; font-size: .68rem; font-weight: 800; }
