/* Area agenzie di bsdhq: stesso linguaggio visivo di bsdhq.com (Poppins, fondo #0F0F0F, pill e card a gradiente)
   con gli schemi di una neobank. Colori dei soldi come in OFM Bank: verde entra, rosso esce, giallo in attesa. */

:root {
  --bg: #0f0f0f;
  --surface: #171717;
  --surface-2: #202020;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f5f5f5;
  --muted: rgba(245, 245, 245, 0.62);
  --faint: rgba(245, 245, 245, 0.4);
  --green: #34d399;
  --green-bg: rgba(52, 211, 153, 0.12);
  --red: #f87171;
  --red-bg: rgba(248, 113, 113, 0.1);
  --yellow: #facc15;
  --yellow-bg: rgba(250, 204, 21, 0.1);
  --blue: #93c5fd;
  --blue-bg: rgba(147, 197, 253, 0.12);
  --violet: linear-gradient(135deg, #3b82f6, #4f46e5 55%, #6d28d9);
  --shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.8);
  --radius: 28px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f4f4f5;
  --surface: #ffffff;
  --surface-2: #f4f4f5;
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.16);
  --text: #0f0f0f;
  --muted: rgba(15, 15, 15, 0.62);
  --faint: rgba(15, 15, 15, 0.42);
  --green: #059669;
  --green-bg: #d1fae5;
  --red: #dc2626;
  --red-bg: #fee2e2;
  --yellow: #a16207;
  --yellow-bg: #fef9c3;
  --blue: #2563eb;
  --blue-bg: #dbeafe;
  --shadow: 0 30px 80px -50px rgba(0, 0, 0, 0.35);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Poppins", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

h1,
h2,
p {
  margin: 0;
}

.muted {
  color: var(--muted);
}

/* Logo bsdhq: lo stesso file del sito, colorato con il testo. */
.logo {
  display: inline-block;
  width: 84px;
  height: 29px;
  background: currentColor;
  -webkit-mask: url(logo.svg) no-repeat left center / contain;
  mask: url(logo.svg) no-repeat left center / contain;
}

.logo-lg {
  width: 112px;
  height: 39px;
}

/* Il marchio dell'area dentro la dashboard: la scritta bsdhq con "agency" incastrata sotto, nel riflesso azzurro e
   viola del login (4 Dic 2026). Vincent voleva il marchio del login anche qui ("voglio che si veda come il logo della
   sezione login anche quando apri la dashboard"), ma con "agency" in basso: "io mi immagino qualcosa di diverso con
   tipo agency in basso". Tra sei versioni ha scelto questa ("La 1", Incastrata).
   Come è fatta. 1em = il corpo della scritta bsdhq: è larga 2.905em, la riga di base sta a 0.74em dall'alto e sotto
   la riga di base c'è solo la coda della q, da 2.734em in poi, che finisce a 1.006em. "agency" sta in quello spazio
   vuoto sotto "bsdh": spaziata da 0.022em a 2.64em, si ferma poco prima della coda, che la chiude.
   Il marchio finisce dritto in basso (Vincent, 5 Dic 2026: "quando finisce la Q, in automatico deve stargli la
   linea di agency… la Y la vedo che esce fuori"): le code di "g" e "y" arrivano esattamente dove arriva la coda
   della q, non oltre. Per starci la parola è un po' più piccola di prima (0.258 del corpo della scritta invece di
   0.3) e resta 0.05em sotto "bsdh". Le misure della parola sono in em suoi. La sua riga di base sta sul fondo della
   sua scatola, alta 1em (vedi ::before più sotto); in Poppins 600 la coda della g scende di 0.273em e l'occhio sale
   di 0.563em: top 2.626em porta il fondo della g a 1.006em; 1.269em tra le lettere la porta a quella larghezza (con
   un altro carattere viene più corta, mai più lunga). .lockup-xl è lo stesso marchio più grande, per la schermata di
   caricamento. Qui il fondo cambia col tema, quindi i colori vengono dal tema (nel pannello del login sono fissi). */
:root {
  --shine: linear-gradient(100deg, #6d8bff 0%, #a78bfa 28%, #fff 50%, #a78bfa 72%, #6d8bff 100%);
}

:root[data-theme="light"] {
  --shine: linear-gradient(100deg, #4f46e5 0%, #7c3aed 28%, #a78bfa 50%, #7c3aed 72%, #4f46e5 100%);
}

.lockup {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  height: 1.008em;
  font-size: 38px;
  line-height: 0;
  white-space: nowrap;
}

.lockup-xl {
  font-size: 60px;
}

.lockup-logo {
  display: block;
  width: 2.905em;
  height: 1.008em;
  background: currentColor;
  -webkit-mask: url(logo.svg) no-repeat center / contain;
  mask: url(logo.svg) no-repeat center / contain;
}

/* Il riflesso passa una volta quando la dashboard si apre, poi la parola resta ferma: accanto ai numeri non deve
   muoversi niente. Nella schermata di caricamento continua a passare finché si aspetta. */
.lockup-word {
  position: absolute;
  left: 0.052em;
  top: 2.626em;
  font-size: 0.258em;
  font-weight: 600;
  line-height: 0;
  /* Il colore è un fondo ritagliato sulle lettere, e un fondo si ferma al bordo della scatola: le code di "g" e "y"
     scendono sotto la riga di base, cioè sotto la scatola, e restavano tagliate (Vincent, 5 Dic 2026). Lo spazio
     sotto le fa entrare; la parola non si sposta, perché è appesa dall'alto. */
  padding-bottom: 0.4em;
  letter-spacing: 1.269em;
  background: var(--shine) 0 0 / 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: artShine 2.6s ease-in-out 0.3s 1;
}

/* Un montante alto 1em che poggia sulla riga di base: è lui a dare l'altezza alla scatola (la riga del testo è alta
   zero), così la riga di base cade esattamente sul fondo della scatola a ogni grandezza. Con una riga alta 1em il
   browser arrotondava la posizione al pixel intero, e su un marchio di 38px un terzo di pixel si vede. */
.lockup-word::before {
  content: "";
  display: inline-block;
  height: 1em;
}

.lockup-xl .lockup-word {
  animation: artShine 7s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .lockup-word,
  .lockup-xl .lockup-word {
    animation: none;
  }
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pill-sm {
  height: 24px;
  padding: 0 10px;
  font-size: 9px;
}

.pill-glass {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.24);
  color: #fff;
}

/* Etichetta "Crypto Wallet": scritta così (non in maiuscolo), con il logo di Trust Wallet al posto del pallino. */
.pill-wallet {
  gap: 8px;
  padding: 0 14px 0 5px;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}

.tw-logo {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
}

.tw-logo svg {
  width: 12px;
  height: 13px;
  stroke: none;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.dot-green {
  background: #6ee7b7;
  box-shadow: 0 0 10px #6ee7b7;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
}

.btn-block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.icon-btn:hover {
  color: var(--text);
  background: var(--surface-2);
}

.icon-btn.round {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
}

:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
}

/* --- Accesso ------------------------------------------------------------- */

/* Due colonne come una banca online: a sinistra il modulo, a destra un pannello scuro (uguale nei due temi) con le
   schede bsdhq inclinate e una scheda chiara che dice cos'è l'area. Sotto i 900px resta solo il modulo. */
.login {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  background: var(--surface);
}

.login-side {
  display: grid;
  place-items: center;
  padding: 40px 24px;
}

.login-card {
  width: 100%;
  max-width: 412px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

/* L'icona bsdhq (la stessa della scheda del browser) come icona di un'app. */
.login-mark {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 13px;
  box-shadow: 0 0 0 1px var(--line-strong), 0 16px 30px -16px rgba(0, 0, 0, 0.55);
}

.login-card h1 {
  margin: 8px 0 12px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

/* Etichetta letta dagli screen reader ma non mostrata: nel modulo di accesso basta il testo dentro il campo. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.login-card .field {
  position: relative;
}

.login-card .input {
  height: 48px;
  padding: 0 6px 0 16px;
  border-radius: 12px;
}

.login-card .input input {
  font-size: 14px;
  font-weight: 400;
}

.login-card .input input::placeholder {
  color: var(--faint);
  opacity: 1;
}

.login-forgot {
  align-self: flex-end;
  margin-top: -4px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.login-forgot:hover,
.login-help a:hover {
  text-decoration: underline;
}

/* "Sign in": il gradiente bsdhq, largo quanto i campi. */
.btn-login {
  width: 100%;
  height: 48px;
  margin-top: 8px;
  border: 0;
  border-radius: 12px;
  background: var(--violet);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, opacity 0.15s ease;
}

.btn-login:hover {
  filter: brightness(1.08);
}

.btn-login:active {
  transform: scale(0.99);
}

.btn-login[disabled] {
  opacity: 0.6;
  cursor: progress;
}

/* Pannello di destra: un pezzo di bsdhq.com, sempre scuro. Dietro il cielo di "Our Story" (un canvas disegnato da
   app.js), sopra il titolo dell'hero e il suo carosello di schede in prospettiva. */
.login-art {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 5vh, 52px);
  margin: 20px;
  padding: 48px 28px 40px;
  border-radius: 28px;
  overflow: hidden;
  background: radial-gradient(ellipse 130% 90% at 50% -10%, #10101a 0%, #0a0a0c 55%, #050506 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  color: #fff;
  text-align: center;
}

.art-sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
}

.art-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

/* Il marchio in cima al pannello, scritto come una collaborazione: "bsdhq × agency". La scritta bsdhq è il file del
   sito (logo.svg: 2905 × 1008 unità, linea di base a 740 dall'alto), grande quanto il testo accanto e sulla stessa
   linea di base. "agency" ha un riflesso azzurro e viola che scorre piano. */
.art-lockup {
  font-size: clamp(24px, 2.3vw, 32px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.art-lockup-logo {
  display: inline-block;
  width: 2.905em;
  height: 1.008em;
  vertical-align: -0.268em;
  background: #fff;
  -webkit-mask: url(logo.svg) no-repeat center / contain;
  mask: url(logo.svg) no-repeat center / contain;
}

.art-x {
  margin: 0 0.5em;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.72em;
  font-weight: 300;
  letter-spacing: 0;
}

.art-agency {
  background: linear-gradient(100deg, #6d8bff 0%, #a78bfa 28%, #fff 50%, #a78bfa 72%, #6d8bff 100%) 0 0 / 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 16px rgba(109, 139, 255, 0.4));
  animation: artShine 7s linear infinite;
}

/* Il gradiente è largo due volte la parola e comincia e finisce con lo stesso colore: spostato di una sua larghezza
   intera, riparte senza salti. */
@keyframes artShine {
  to { background-position: -200% 0; }
}

/* Il titolo dell'hero del sito, con la parola nel blocco bianco. */
.art-title {
  max-width: 12ch;
  font-size: clamp(30px, 3.5vw, 54px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1;
  text-transform: uppercase;
}

.art-pop {
  display: inline-block;
  margin: 0.08em 0;
  padding: 0.04em 0.26em;
  border-radius: 0.3em;
  background: #fff;
  color: #0a0a0c;
  box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.8);
}

/* Il carosello: la scheda al centro è piatta e a fuoco, le due ai lati arretrano, ruotano e si sfocano. Sotto, i
   puntini: quello della scheda al centro è una lineetta. */
.art-carousel {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.art-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 6px;
}

.art-dots span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  transition: width 0.3s ease, background 0.3s ease;
}

.art-dots span.is-on {
  width: 30px;
  background: #fff;
}

.art-stage {
  position: relative;
  width: 100%;
  height: 270px;
  display: grid;
  place-items: center;
  perspective: 1600px;
}

.art-slide {
  position: absolute;
  width: min(360px, 66%);
  min-height: 236px;
  padding: 24px 24px 26px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  color: #fff;
  text-align: left;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.6s ease, filter 0.6s ease;
}

.art-slide[data-pos="0"] {
  z-index: 3;
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  cursor: default;
}

.art-slide[data-pos="-1"] {
  z-index: 2;
  opacity: 0.8;
  filter: blur(1.5px);
  transform: translateX(-36%) scale(0.82) rotateY(10deg);
}

.art-slide[data-pos="1"] {
  z-index: 2;
  opacity: 0.8;
  filter: blur(1.5px);
  transform: translateX(36%) scale(0.82) rotateY(-10deg);
}

.art-zinc {
  background: linear-gradient(135deg, #27272a, #18181b 50%, #000);
}

.art-violet {
  background: linear-gradient(135deg, #3b82f6, #4f46e5 50%, #6d28d9);
}

.art-emerald {
  background: linear-gradient(135deg, #10b981, #0d9488 50%, #065f46);
}

.art-glow {
  position: absolute;
  top: -96px;
  right: -96px;
  width: 256px;
  height: 256px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  filter: blur(64px);
  pointer-events: none;
}

/* In cima a ogni scheda il marchio del servizio: il logo tondo e la sua scritta (app.js li scrive qui dentro). */
.art-brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px;
}

.art-brand .brand-logo,
.art-brand .usdc-logo {
  display: block;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  stroke: none;
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.5);
}

.art-brand .brand-logo svg {
  display: block;
  width: 100%;
  height: 100%;
  stroke: none;
}

.art-brand .slash-logo {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 6px 16px -6px rgba(0, 0, 0, 0.5);
}

.trust-logo {
  background: #fff;
}

.art-wordmark {
  width: auto;
  height: 24px;
  stroke: none;
}

.art-wordmark-cosmo {
  height: 13px;
}

/* Wallet: due loghi affiancati, lo scudo di Trust Wallet e USDC. */
.art-pair {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
}

.art-brand-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.art-brand-name i {
  margin: 0 0.4em;
  font-style: normal;
  opacity: 0.6;
}

.art-slide h3 {
  position: relative;
  max-width: 11ch;
  margin: 28px 0 0;
  font-size: clamp(24px, 2.3vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.02;
  text-transform: uppercase;
}

.art-slide p {
  position: relative;
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.5;
  opacity: 0.8;
}

@media (prefers-reduced-motion: reduce) {
  .art-agency {
    animation: none;
  }

  .art-slide,
  .art-dots span {
    transition: none;
  }
}

/* Telefono e finestre strette: una colonna. Il pannello diventa una fascia in alto con il cielo e il titolo (niente
   carosello), il modulo sta subito sotto. */
@media (max-width: 900px) {
  .login {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr;
  }

  .login-art {
    order: -1;
    gap: 0;
    margin: 12px 12px 0;
    padding: 30px 20px 34px;
    border-radius: 24px;
  }

  .art-carousel {
    display: none;
  }

  .art-top {
    gap: 14px;
  }

  .art-title {
    max-width: 16ch;
    font-size: clamp(24px, 7.4vw, 36px);
  }

  .login-side {
    place-items: start center;
    padding: 30px 20px 40px;
  }
}

/* Finestre basse: il titolo si accorcia, così il carosello non viene tagliato. */
@media (max-height: 700px) {
  .art-title {
    font-size: clamp(26px, 2.8vw, 38px);
  }
}

.field {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.input {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 8px 0 16px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--faint);
  transition: border-color 0.15s ease;
}

.input:focus-within {
  border-color: #818cf8;
  color: var(--text);
}

.input input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
}

.form-error {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--red-bg);
  color: var(--red);
  font-size: 13px;
  font-weight: 500;
}

.login-help {
  width: 100%;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  text-align: center;
}

.login-help a {
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}

.demo-note {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px dashed var(--line-strong);
  font-size: 12px;
  color: var(--muted);
}

.demo-note strong {
  color: var(--text);
  font-weight: 600;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
}

/* --- Struttura della dashboard ------------------------------------------ */

.app {
  display: flex;
  min-height: 100vh;
}

.side {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 248px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 28px 18px 20px;
  border-right: 1px solid var(--line);
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.side-nav a:hover {
  color: var(--text);
  background: var(--surface);
}

.side-nav a.is-active {
  color: var(--text);
  background: var(--surface-2);
}

/* Menu a tendina: My Creators (Creators / Talent) e Crypto Wallet (i wallet spese). La voce apre la sua sezione; la
   freccia apre e chiude l'elenco senza cambiare pagina. */
.nav-group {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-caret {
  position: absolute;
  top: 7px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.nav-caret:hover {
  color: var(--text);
}

.nav-caret svg {
  width: 16px;
  height: 16px;
  transition: transform 0.15s ease;
}

.nav-caret[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.nav-sub {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 0 4px 22px;
  padding-left: 10px;
  border-left: 1px solid var(--line-strong);
}

.side-nav .nav-sub a {
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
}

.side-nav .nav-sub a.is-active {
  background: transparent;
  font-weight: 600;
}

/* Le stesse voci in cima alla pagina: solo su telefono, dove il menu laterale non c'è. */
.subtabs {
  display: none;
}

.side-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.side-action {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}

.side-action:hover {
  color: var(--text);
  background: var(--surface);
}

.side-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--violet);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.side-user-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.side-user-text strong {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-user-text small {
  font-size: 11px;
  color: var(--faint);
}

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 28px 32px 40px;
  max-width: 1240px;
}

.top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.top-brand {
  display: none;
}

.top-title h1 {
  margin-top: 6px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}

.top-actions {
  display: flex;
  gap: 8px;
}

/* --- Saldo e stadi -------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 20px;
  scroll-margin-top: 24px;
}

/* Total available: tutto al centro della scheda, in orizzontale e in verticale. */
.balance-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 18px;
  padding: 28px;
  border-radius: 32px;
  background: var(--violet);
  color: #fff;
  box-shadow: 0 40px 120px -40px rgba(79, 70, 229, 0.6);
}

/* Il bagliore in alto a destra è un gradiente dentro la scheda, non un cerchio sfocato che ne esce: Safari su iPhone
   non ritaglia sull'angolo arrotondato un elemento con filter, e dall'angolo usciva un triangolo grigio. */
.balance-glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle 250px at calc(100% - 40px) 20px,
    rgba(255, 255, 255, 0.17) 0,
    rgba(255, 255, 255, 0.15) 22%,
    rgba(255, 255, 255, 0.085) 52%,
    rgba(255, 255, 255, 0.025) 78%,
    rgba(255, 255, 255, 0) 100%
  );
  pointer-events: none;
}

.balance-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.balance-asset {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  opacity: 0.8;
}

.balance-amount {
  position: relative;
  margin-top: 4px;
  font-size: 60px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.balance-amount .cents {
  font-size: 28px;
  font-weight: 700;
  opacity: 0.7;
}

.quick {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 76px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.quick-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  transition: background 0.15s ease;
}

.quick-btn:hover .quick-icon {
  background: rgba(255, 255, 255, 0.28);
}

.stages {
  display: grid;
  gap: 12px;
}

.stage {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.stage-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
}

.stage-step {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
}

.stage-cur {
  margin-left: auto;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--faint);
}

.stage-amount {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stage-pending {
  background: var(--yellow-bg);
  border-color: transparent;
}

.stage-pending .stage-step,
.stage-pending .stage-amount,
.stage-pending .stage-label {
  color: var(--yellow);
}

/* Sotto Pending: la parte già in viaggio verso il wallet. */
.stage-note {
  margin: 0;
  font-size: 12px;
  color: var(--yellow);
  opacity: 0.85;
  /* Su telefono va su due righe: bilanciate, senza una parola sola a capo. */
  text-wrap: balance;
}

.stage-pending .stage-step {
  background: var(--yellow-bg);
  border: 1px solid currentColor;
}

.stage-main .stage-step {
  background: var(--blue-bg);
  color: var(--blue);
}

/* Crypto Wallet: logo di Trust Wallet, saldo in verde (è disponibile) con il token USDC davanti. */
.stage .tw-logo {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  box-shadow: 0 0 0 1px var(--line-strong);
}

.stage .tw-logo svg {
  width: 13px;
  height: 14px;
}

.stage-wallet .stage-amount {
  display: flex;
  align-items: center;
  gap: 0.3em;
  color: var(--green);
}

.stage-amount .token-icon {
  width: 0.95em;
  height: 0.95em;
}

.stage-amount .balance-unit {
  font-size: 0.5em;
}

/* Etichetta della scheda grande: icona di bsdhq davanti a "Total available". */
.pill-logo {
  display: grid;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
}

.pill-logo .brand-logo {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

/* --- Pannelli ---------------------------------------------------------------- */

.panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  scroll-margin-top: 24px;
  min-width: 0;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.panel-head h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.panel-head p {
  margin-top: 4px;
  font-size: 13px;
}

/* Stesse colonne di .hero: in Home la seconda colonna parte sulla linea degli stadi. */
.columns {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.table-wrap {
  overflow-x: auto;
  margin: 0 -8px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.table th {
  padding: 0 8px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--faint);
  white-space: nowrap;
}

.table td {
  padding: 14px 8px;
  border-top: 1px solid var(--line);
  white-space: nowrap;
}

.table tfoot td {
  font-weight: 700;
}

.num {
  text-align: right !important;
}

.creator {
  display: flex;
  align-items: center;
  gap: 12px;
}

.creator .avatar {
  width: 34px;
  height: 34px;
  font-size: 12px;
}

.creator small {
  display: block;
  font-size: 11px;
  color: var(--faint);
}

.creator strong {
  font-weight: 600;
}

.amount-pending {
  color: var(--yellow);
  font-weight: 600;
}

.amount-out {
  color: var(--red);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.tag-new {
  background: var(--blue-bg);
  color: var(--blue);
}

.table th small {
  font-weight: 500;
  opacity: 0.7;
}

.table td small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 500;
  color: var(--faint);
}

.amount-in {
  color: var(--green);
  font-weight: 600;
}

.c-who .split {
  margin-top: 10px;
  max-width: 220px;
}

/* --- Viste, intestazioni, admin ------------------------------------------- */

.view {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: -6px;
}

.section-head h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.see-all {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
}

.see-all:hover {
  text-decoration: underline;
}

.admin-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  padding: 6px 6px 6px 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  font-size: 13px;
}

.admin-badge {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--yellow-bg);
  color: var(--yellow);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-text {
  color: var(--muted);
}

.select {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.select select {
  appearance: none;
  -webkit-appearance: none;
  height: 34px;
  padding: 0 34px 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.select svg {
  position: absolute;
  right: 12px;
  width: 14px;
  height: 14px;
  pointer-events: none;
}

.icon-btn.is-spinning svg {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.empty {
  padding: 18px 4px;
  font-size: 13px;
  color: var(--muted);
  list-style: none;
}

.more-btn {
  align-self: center;
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.more-btn:hover {
  background: var(--surface-2);
}

/* --- Conti Slash -------------------------------------------------------------- */

.accounts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

/* In Home, Slash Debit parte sulla linea degli stadi (stesse colonne e spazio di .hero). */
#home-accounts {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 20px;
}

.acct {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

a.acct:hover,
button.acct:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

/* Vista Slash: le due schede sono il selettore del conto. Quella scelta è accesa, l'altra resta in secondo piano. */
button.acct {
  font: inherit;
  text-align: left;
  cursor: pointer;
}

button.acct:not(.is-selected) {
  opacity: 0.6;
}

button.acct:not(.is-selected):hover {
  opacity: 0.85;
}

button.acct.is-selected {
  border-color: var(--text);
  box-shadow: 0 0 0 1px var(--text);
}

button.acct:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.acct::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -70px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.35;
  pointer-events: none;
}

.acct-cash::after {
  background: #10b981;
}

.acct-debit::after {
  background: #6366f1;
}

.acct-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.acct-head strong {
  font-weight: 700;
}

.acct-logo {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--surface-2);
}

.acct-cash .acct-logo {
  color: var(--green);
  background: var(--green-bg);
}

.acct-debit .acct-logo {
  color: var(--blue);
  background: var(--blue-bg);
}

.acct-logo svg {
  width: 16px;
  height: 16px;
}

/* Sui conti Slash l'icona è il loro logo, a tutto riquadro. */
.acct-logo .brand-logo {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.acct-logo .brand-logo svg {
  width: 100%;
  height: 100%;
}

.acct-cur {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--faint);
}

.acct-amount {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.acct-amount .cents {
  font-size: 18px;
  opacity: 0.6;
}

.accounts-lg .acct-amount {
  font-size: 36px;
}

.acct-sub {
  font-size: 12px;
  color: var(--muted);
}

.acct-note {
  font-size: 12px;
  line-height: 1.5;
  color: var(--faint);
}

.columns-slash {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.chip.is-active {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.cardlist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.carditem {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}

.carditem:first-child {
  border-top: 0;
}

.carditem.is-paused {
  opacity: 0.55;
}

.carditem-chip {
  display: grid;
  place-items: center;
  width: 40px;
  height: 28px;
  border-radius: 7px;
  background: var(--surface-2);
}

.carditem-chip.acct-cash {
  background: var(--green-bg);
  color: var(--green);
}

.carditem-chip.acct-debit {
  background: var(--blue-bg);
  color: var(--blue);
}

.carditem-chip svg {
  width: 18px;
  height: 18px;
}

.carditem-text {
  min-width: 0;
}

.carditem-text strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.carditem-text small,
.carditem-right small {
  font-size: 12px;
  color: var(--muted);
}

.carditem-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: right;
}

.carditem-right strong {
  font-size: 14px;
  font-weight: 700;
}

.carditem-right .tag {
  height: 20px;
  margin-top: 2px;
  font-size: 10px;
}

.tag-declined {
  background: var(--red-bg);
  color: var(--red);
}

/* --- Creator: elenco in Home, riquadri, barra prelevato / pending ------------ */

.crew {
  list-style: none;
  margin: 0 -12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.crew-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "who nums";
  align-items: center;
  gap: 10px 12px;
  padding: 10px 12px;
  border-radius: 18px;
  font-variant-numeric: tabular-nums;
}

.crew-row .creator {
  grid-area: who;
  min-width: 0;
}

/* My Talent: "View only" apre la dashboard della talent come la vede lei; sta a destra del nome. */
.talent-view {
  grid-area: nums;
  justify-self: end;
  height: 36px;
  padding: 0 14px 0 12px;
  gap: 6px;
}

.talent-view svg {
  width: 16px;
  height: 16px;
}

/* I bottoni di una talent, a destra del nome: "Request payment" (dove ci sono le richieste) e "View only". */
.talent-actions {
  grid-area: nums;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}

.talent-request {
  height: 36px;
  padding: 0 16px;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}

.crew-nums {
  grid-area: nums;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 13px;
}

.crew-row .split {
  grid-area: bar;
}

.crew-legend {
  display: flex;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--faint);
}

.crew-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.crew-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-w {
  background: var(--green);
}

.dot-p {
  background: var(--yellow);
}

.split {
  display: flex;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--yellow);
}

.split-w {
  display: block;
  background: var(--green);
}

.split-p {
  display: block;
  flex: 1;
  background: var(--yellow);
}

.split-empty {
  background: var(--surface-2);
}

.tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}

.tile-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
}

.tile-value {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tile-sub {
  font-size: 12px;
  color: var(--muted);
}

.tile-in .tile-value {
  color: var(--green);
}

.tile-out .tile-value {
  color: var(--red);
}

/* Un saldo sotto zero è rosso: nella scheda grande (su sfondo colorato, più chiaro) e in quella del crypto wallet. */
.balance-amount.is-negative {
  color: #ffb4b4;
}

.stage-wallet .stage-amount.is-negative {
  color: var(--red);
}

/* Overview: a sinistra da dove sono entrati i soldi, a destra dove sono andati. */
.inout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
  margin-top: 16px;
}

.inout-col {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
}

.inout-col h3 {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
}

.inout-group {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.inout-col h3 + .inout-group {
  border-top: 0;
}

.inout-row,
.inout-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-variant-numeric: tabular-nums;
}

.inout-row {
  font-weight: 600;
}

.inout-item {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}

.inout-item span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inout-empty {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.inout-note {
  margin: 12px 0 0;
  font-size: 12px;
}

/* My Creators: quattro riquadri (Available, Net pending, Withdrawn 30 giorni e in totale). */
#creator-tiles,
#creator-money {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tile-pending {
  background: var(--yellow-bg);
  border-color: transparent;
}

.tile-pending .tile-value,
.tile-pending .tile-label {
  color: var(--yellow);
}

/* --- Movimenti ------------------------------------------------------------ */

.feed {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.day h3 {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.day ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mov {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  grid-template-areas:
    "icon text amount"
    "icon text extra";
  align-items: center;
  column-gap: 14px;
  row-gap: 2px;
  padding: 12px 14px;
  border-radius: 18px;
  font-variant-numeric: tabular-nums;
}

.mov-icon {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mov-text {
  grid-area: text;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mov-text strong {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mov-text small {
  font-size: 12px;
  opacity: 0.8;
}

.mov-amount {
  grid-area: amount;
  align-self: end;
  text-align: right;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.mov-extra {
  grid-area: extra;
  align-self: start;
  text-align: right;
  font-size: 11px;
  font-weight: 500;
  opacity: 0.75;
  white-space: nowrap;
}

/* Prelievo: la parte dell'agenzia, una riga per creator sotto il movimento. */
.mov-has-detail {
  grid-template-areas:
    "icon text amount"
    "icon text extra"
    ". detail detail";
}

.mov-detail {
  grid-area: detail;
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
  padding: 8px 0 0;
  list-style: none;
  border-top: 1px dashed var(--line-strong);
  color: var(--text);
  font-size: 12px;
}

.mov-detail li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.mov-detail li span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mov-detail li span:last-child {
  font-weight: 600;
  white-space: nowrap;
}

.mov-detail small {
  margin-left: 6px;
  color: var(--muted);
  font-weight: 400;
}

.mov-in {
  color: var(--green);
}

.mov-in .mov-icon {
  background: var(--green-bg);
}

.mov-out {
  color: var(--red);
}

.mov-out .mov-icon {
  background: var(--red-bg);
}

.mov-pending {
  color: var(--yellow);
  background: var(--yellow-bg);
}

.mov-pending .mov-icon {
  background: rgba(250, 204, 21, 0.16);
}

.mov-move .mov-icon {
  background: var(--blue-bg);
  color: var(--blue);
}

.mov-move .mov-amount {
  color: var(--muted);
}

.mov-spend .mov-icon {
  background: var(--surface-2);
  color: var(--muted);
}

.mov-spend .mov-text small,
.mov-spend .mov-extra {
  color: var(--muted);
}

.mov-declined {
  color: var(--muted);
}

.mov-declined .mov-icon {
  background: var(--surface-2);
}

.mov-declined .mov-amount {
  text-decoration: line-through;
}

/* Rifiutati e stornati: il logo di Slash resta, ma spento. */
.mov-declined .slash-logo {
  opacity: 0.45;
}

.mov-extra .tag {
  height: 20px;
  padding: 0 8px;
  font-size: 10px;
}

/* --- Trasferimenti ------------------------------------------------------- */

.transfers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.transfer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}

.transfer:first-child {
  border-top: 0;
}

.transfer-date {
  width: 48px;
  font-size: 11px;
  font-weight: 600;
  color: var(--faint);
  text-transform: uppercase;
  line-height: 1.3;
}

.transfer-date b {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.transfer-who strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.transfer-who small {
  font-size: 12px;
  color: var(--muted);
}

.transfer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
}

.tag-main {
  background: var(--blue-bg);
  color: var(--blue);
}

.tag-done {
  background: var(--green-bg);
  color: var(--green);
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 8px;
  font-size: 11px;
  color: var(--faint);
}

.demo-tag {
  color: var(--yellow);
}

.tabbar {
  display: none;
}

.loading {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.loading[hidden] {
  display: none;
}

.loading-bar {
  width: 120px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #6366f1, transparent) 0 0 / 50% 100% no-repeat, var(--line);
  animation: loading 1.1s ease-in-out infinite;
}

@keyframes loading {
  from {
    background-position: -60px 0, 0 0;
  }
  to {
    background-position: 180px 0, 0 0;
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 50;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow);
}

/* --- Valute, come in Trust Wallet: dollari con il $, USDC con il logo del token ---------- */

.usdc-logo {
  flex-shrink: 0;
  width: 1.05em;
  height: 1.05em;
  border-radius: 50%;
  stroke: none; /* le icone del sito hanno il contorno: i loghi no */
}

/* Logo USDC con il badge di Ethereum in basso a destra. */
.token-icon {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.token-icon .usdc-logo {
  display: block;
  width: 100%;
  height: 100%;
}

.net-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 42%;
  height: 42%;
  border-radius: 50%;
  stroke: none;
  box-shadow: 0 0 0 2px var(--surface);
}

/* Loghi delle piattaforme (OnlyFans sui payout), a tutto cerchio. */
.token-icon .brand-logo {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  stroke: none;
}

/* Cosmo Payment: simbolo bianco sul gradiente viola della loro icona. */
.cosmo-logo {
  background: linear-gradient(135deg, #8000ff, #dd00ff);
}

.cosmo-logo svg {
  display: block;
  width: 100%;
  height: 100%;
  stroke: none;
}

/* Slash: la S del loro marchio in oro chiaro su cerchio scuro, come la loro icona. Un filo di bordo la stacca dalle
   schede scure. */
.slash-logo {
  background: #0b0b0d;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.slash-logo svg {
  display: block;
  width: 100%;
  height: 100%;
  stroke: none;
  fill: #ead9a0;
}

/* Icona b+q di bsdhq: nera con il simbolo bianco nel tema chiaro, bianca con il simbolo nero nel tema scuro. */
.bsdhq-mark {
  background: var(--text);
  color: var(--surface);
}

.bsdhq-mark svg {
  display: block;
  width: 100%;
  height: 100%;
  stroke: none;
}

/* Al posto dei numeri degli stadi: logo di Cosmo (1 e 2) e di bsdhq (3). */
.stage .stage-step[data-step-logo] {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background: none;
}

.stage-step .brand-logo {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

/* Pallino informativo (ⓘ) in alto a destra: la spiegazione appare al passaggio del mouse o al tocco. */
.info {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin: -3px -4px -3px 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
}

.info svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.8;
}

.info:hover,
.info:focus-visible,
.info.is-open {
  color: var(--text);
}

.tip {
  position: absolute;
  top: calc(100% + 10px);
  right: -6px;
  z-index: 40;
  width: 260px;
  max-width: calc(100vw - 48px);
  padding: 12px 14px;
  border-radius: 10px;
  background: #202124;
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
  white-space: normal;
  box-shadow: 0 14px 36px -10px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  pointer-events: none;
}

.tip::before {
  content: "";
  position: absolute;
  top: -5px;
  right: 11px;
  width: 11px;
  height: 11px;
  border-radius: 2px;
  background: inherit;
  transform: rotate(45deg);
}

.info:hover .tip,
.info:focus-visible .tip,
.info.is-open .tip {
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* Nel tema scuro il fumetto ha un bordo, così si stacca dalle schede scure. */
:root:not([data-theme="light"]) .tip {
  border: 1px solid var(--line-strong);
}

/* Nella scheda Crypto Wallet il pallino sta nell'angolo, in bianco. */
/* Negli stadi il pallino sta a destra (prima lo spingeva l'etichetta della valuta, ora tolta). */
.stage-head .info {
  margin-left: auto;
}

.info-corner {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 2;
}

.info-corner .info {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
}

.info-corner .info:hover,
.info-corner .info.is-open {
  color: #fff;
}

/* Payout ancora in pending: orologio piccolo sul logo. */
.icon-badge {
  position: absolute;
  right: -3px;
  bottom: -3px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--surface);
  box-shadow: 0 0 0 2px var(--surface);
}

.icon-badge svg {
  width: 12px;
  height: 12px;
  stroke-width: 2.6;
}

.token-sm {
  width: 34px;
  height: 34px;
}

/* Nei movimenti in USDC l'icona è il token, senza il cerchio colorato. */
.mov.mov-logo .mov-icon {
  background: none;
}

.mov-logo .mov-icon .token-icon {
  width: 100%;
  height: 100%;
}

/* Etichetta "USDC" con il logo piccolo (stadi, schede). */
.cur-token {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cur-token .usdc-logo,
.cur-token .brand-logo {
  display: inline-block;
  width: 13px;
  height: 13px;
  border-radius: 50%;
}

/* Saldo Available: è solo USDC, quindi logo del token davanti e "USDC" piccolo dopo le cifre. */
.balance-amount {
  display: flex;
  align-items: center;
  gap: 0.24em;
}

.balance-amount .token-icon {
  width: 0.82em;
  height: 0.82em;
}

.balance-amount .net-badge {
  box-shadow: 0 0 0 2px #4f46e5;
}

.balance-unit {
  margin-left: 0.22em;
  font-size: 0.4em;
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0.8;
}

/* --- My Creators: disponibile in verde, pending in giallo; il nome apre la pagina della creator ------------- */

/* Tutta la riga di una creator si clicca, con lo stesso effetto al passaggio del mouse dei movimenti. */
.row-link {
  cursor: pointer;
  transition: background 0.15s ease;
}

.row-link:hover,
tr.row-link:hover td {
  background: var(--surface-2);
}

.row-link:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

tr.row-link td:first-child {
  border-radius: 14px 0 0 14px;
}

tr.row-link td:last-child {
  border-radius: 0 14px 14px 0;
}

.crew-money {
  grid-area: nums;
  display: flex;
  gap: 8px;
}

.money-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  min-width: 104px;
  padding: 7px 12px;
  border-radius: 14px;
}

.money-chip small {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.8;
}

.money-chip strong {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.chip-ok {
  background: var(--green-bg);
  color: var(--green);
}

/* Giallo vero per il pending (il --yellow del tema chiaro è un ambra scuro, pensato per il testo). */
.chip-wait {
  background: #fde047;
  color: #713f12;
}

:root:not([data-theme="light"]) .chip-wait {
  background: rgba(250, 204, 21, 0.16);
  color: #fde047;
}

.amount-wait {
  font-weight: 600;
  color: #a16207;
}

:root:not([data-theme="light"]) .amount-wait {
  color: #fde047;
}

/* My Creators e pagina creator: tre riquadri (Available, Net pending, On main account), come le tre colonne. */
.chip-main {
  background: var(--blue-bg);
  color: var(--blue);
}

.c-main {
  font-weight: 600;
  color: var(--blue);
}

/* Riquadro con il token USDC davanti all'importo (saldo del Crypto Wallet). */
.tile-token {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}

.tile-token .token-icon {
  width: 0.95em;
  height: 0.95em;
}

/* Schede della Home che aprono una sezione: si sollevano appena, senza cambiare colore. */
.stage.row-link {
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.stage.row-link:hover {
  background: var(--surface);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.stage-pending.row-link:hover {
  background: var(--yellow-bg);
  border-color: var(--yellow);
}

/* Home: My Creators e General Activity alti uguali. */
.columns-home {
  align-items: stretch;
}

/* Un conto Slash solo (Debit non usato): la scheda prende tutta la riga. */
.accounts.accounts-one,
#home-accounts.accounts-one {
  grid-template-columns: minmax(0, 1fr);
}

/* Titolo di un pannello con il pallino informativo accanto. */
.title-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.title-info .info {
  margin: 0;
}

/* Pallino vicino al bordo sinistro: il fumetto si apre verso destra. */
.info-start .tip {
  left: -6px;
  right: auto;
}

.info-start .tip::before {
  left: 11px;
  right: auto;
}

/* Pulsante secondario (Profile). */
.btn-soft {
  height: 40px;
  padding: 0 16px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
}

.btn-soft:hover {
  background: var(--surface-2);
}

.creator-name {
  flex: 1;
  min-width: 0;
}

/* Filtri del periodo negli Insights. */
.period-chips {
  margin-bottom: 14px;
}

/* Periodo a scelta: pulsante con le date e calendario nello stile del sito. */
.range {
  position: relative;
  margin-bottom: 14px;
}

.range[hidden] {
  display: none;
}

.range-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.range-btn svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

/* Il calendario sta nel pop-up "Custom period", al centro dello schermo. */
.sheet.sheet-cal {
  width: min(340px, 100%);
  padding: 20px;
}

.sheet-cal .sheet-icon {
  color: var(--muted);
}

.sheet-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.sheet-actions .btn {
  height: 40px;
  padding: 0 18px;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}

/* Pagina Profile di una creator, come le impostazioni di Pagos: due schede in alto (Personal details, Documents) e
   sotto i riquadri uno dopo l'altro, a tutta larghezza. */
.ptabs {
  display: inline-flex;
  align-self: flex-start;
  gap: 4px;
  max-width: 100%;
  padding: 5px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.ptab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.ptab svg {
  width: 16px;
  height: 16px;
}

.ptab:hover {
  color: var(--text);
}

.ptab.is-active {
  background: var(--text);
  color: var(--bg);
}

.ptab-count {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.ptab.is-active .ptab-count {
  background: rgba(127, 127, 127, 0.3);
  color: inherit;
}

.pstack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pstack[hidden],
.ptab-count[hidden],
.pcard[hidden] {
  display: none;
}

.pcard-head .title-info {
  flex: 1;
}

/* Upload: pulsante azzurro tenue, come le icone delle schede (il nero pieno qui stonava). */
.pcard-action.btn-tint {
  height: 38px;
  padding: 0 16px 0 12px;
  background: var(--blue-bg);
  color: var(--blue);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}

.pcard-action svg {
  width: 16px;
  height: 16px;
}

/* SAN code: il numero grande, da copiare o da scrivere a mano, e sotto come inserirlo. */
.san-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px;
  border-radius: 18px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.san-line {
  display: flex;
  align-items: center;
  gap: 12px;
}

.san-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.san-line .icon-btn {
  width: 34px;
  height: 34px;
}

.san-box small {
  font-size: 12px;
  color: var(--muted);
}

.san-how {
  margin-top: 16px;
  font-size: 13px;
}

.san-how summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  font-weight: 600;
  color: var(--blue);
  cursor: pointer;
}

.san-how summary::-webkit-details-marker {
  display: none;
}

.san-how summary svg {
  width: 14px;
  height: 14px;
  transition: transform 0.15s ease;
}

.san-how[open] summary svg {
  transform: rotate(180deg);
}

.san-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: san-step;
  color: var(--muted);
}

.san-steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  counter-increment: san-step;
}

.san-steps li::before {
  content: counter(san-step);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--blue-bg);
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.san-steps strong {
  font-weight: 600;
  color: var(--text);
}

.san-note {
  margin-top: 12px;
  color: var(--muted);
}

.pcard-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pcard-head h2 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.pcard-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: var(--blue-bg);
  color: var(--blue);
}

.profile dd.is-empty {
  font-weight: 400;
  color: var(--faint);
}

.pcard-head h2 {
  flex: 1;
}

.pcard-action {
  height: 34px;
  padding: 0 14px;
  font-size: 12px;
}

.pcard-action[hidden] {
  display: none;
}

/* Scheda del profilo in modifica: stesse righe della lettura (etichetta a sinistra), con il campo al posto del valore. */
.pform {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pform .field {
  display: grid;
  grid-template-columns: 220px minmax(0, 440px);
  align-items: center;
  column-gap: 16px;
  row-gap: 4px;
  font-size: 14px;
  font-weight: 400;
}

.pform .field-error {
  grid-column: 2;
}

.pform .sheet-actions {
  justify-content: flex-start;
  margin-top: 6px;
  padding-left: 236px;
}

.pform .input {
  height: 46px;
}

.pform .input input {
  font-size: 14px;
}

.input.has-error {
  border-color: var(--red);
}

.field-error {
  font-size: 11px;
  font-weight: 500;
  color: var(--red);
}

/* Documenti della creator: tabella in un riquadro, come in Pagos. */
.doctable-wrap {
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}

.doctable {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.doctable th {
  padding: 12px 16px;
  background: var(--surface-2);
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.doctable td {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
  color: var(--muted);
}

.doctable .doc-type {
  width: 150px;
}

.doctable .doc-size {
  width: 100px;
}

.doctable .doc-date {
  width: 130px;
}

.doctable .doc-actions {
  width: 108px;
  text-align: right;
  white-space: nowrap;
}

.doc-name {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.docitem-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--muted);
}

.docitem-icon svg {
  width: 20px;
  height: 20px;
}

.doc-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.doc-text strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-meta {
  display: none;
  font-size: 11px;
}

.doctable .icon-btn {
  width: 34px;
  height: 34px;
}

.doctable .icon-btn + .icon-btn {
  margin-left: 4px;
}

.doc-count {
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
}

/* Tipo del documento. */
.badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-id {
  background: var(--blue);
  color: var(--surface);
}

.badge-contract {
  border: 1px solid var(--line-strong);
  color: var(--text);
}

.badge-other {
  background: var(--surface-2);
  color: var(--muted);
}

/* Scelta del file nel pop-up di caricamento. */
.filepick {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 24px 16px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 20px;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s ease;
}

.filepick:hover,
.filepick:focus-within {
  background: var(--surface-2);
}

.filepick.has-file {
  border-style: solid;
  border-color: var(--green);
}

.filepick input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.filepick strong {
  max-width: 100%;
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.filepick small {
  font-size: 12px;
  color: var(--muted);
}

.btn-danger {
  background: var(--red);
  color: #fff;
}

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.cal-head strong {
  font-size: 14px;
  font-weight: 700;
}

.cal-head .icon-btn {
  width: 34px;
  height: 34px;
}

.cal-week,
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
}

.cal-week {
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  color: var(--faint);
}

.cal-day {
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.cal-day:hover {
  background: var(--surface-2);
}

/* I giorni dentro il periodo restano tondi, come gli altri. */
.cal-day.in-range {
  background: var(--surface-2);
}

.cal-day.is-today {
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.cal-day.is-start,
.cal-day.is-end {
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
}

.cal-hint {
  margin-top: 10px;
  font-size: 11px;
  text-align: center;
  color: var(--muted);
}

.stat-row.stat-row-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Richiesta di un nuovo sub-account. */
/* "Add a creator": un invito tratteggiato, tutto cliccabile. In Home riempie lo spazio sotto le creator. */
.add-creator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 76px;
  padding: 14px 18px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 24px;
  color: var(--text);
  font-size: 14px;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.add-creator strong {
  font-weight: 600;
}

.add-creator:hover {
  background: var(--surface);
  border-color: var(--blue);
}

.add-creator .add-icon {
  width: 40px;
  height: 40px;
}

.add-creator .add-icon svg {
  width: 20px;
  height: 20px;
}

.add-fill {
  flex: 1;
  min-height: 64px;
  border-radius: 18px;
}

.add-fill:hover {
  background: var(--surface-2);
}

.add-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--blue-bg);
  color: var(--blue);
}

.add-icon svg {
  width: 22px;
  height: 22px;
}

/* --- Pagina di una creator ---------------------------------------------------------------------- */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}

.back-link:hover {
  color: var(--text);
}

.creator-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.creator-head h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.avatar-lg {
  width: 60px;
  height: 60px;
  font-size: 20px;
}

.columns-creator {
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
  font-variant-numeric: tabular-nums;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  border-radius: 16px;
  background: var(--surface-2);
  min-width: 0;
}

.stat strong {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.stat small {
  font-size: 11px;
  color: var(--muted);
}

.chart {
  display: block;
  width: 100%;
  height: auto;
  stroke: none;
}

.chart .bar {
  fill: var(--green);
}

.chart .bar:hover {
  opacity: 0.8;
}

.chart-base {
  stroke: var(--line-strong);
  stroke-width: 1;
}

.chart text {
  font-family: inherit;
  text-anchor: middle;
  stroke: none;
}

.bar-value {
  font-size: 11px;
  font-weight: 700;
  fill: var(--text);
}

.bar-month {
  font-size: 11px;
  fill: var(--muted);
}

.profile {
  display: grid;
  gap: 0;
  margin: 0;
  font-size: 14px;
}

.profile div {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  padding: 8px 0;
}

.profile dt {
  color: var(--muted);
}

.profile dd {
  margin: 0;
  font-weight: 500;
  overflow-wrap: anywhere;
}

/* --- Movimenti come in un'app bancaria: riga essenziale, i dettagli si aprono toccandola ------------- */

.mov[role="button"] {
  cursor: pointer;
  transition: background 0.15s ease, filter 0.15s ease;
}

.mov[role="button"]:hover {
  background: var(--surface-2);
}

.mov-pending[role="button"]:hover {
  background: var(--yellow-bg);
  filter: brightness(0.97);
}

.mov[role="button"]:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* Senza la seconda riga a destra, l'importo sta al centro della riga. */
.mov.mov-plain {
  grid-template-areas: "icon text amount";
}

.mov-plain .mov-amount {
  align-self: center;
}

/* Logo dell'agenzia in fondo al menu, su un cerchio scuro (arriva dall'API dopo il login). */
.avatar-logo {
  background: #0f0f0f;
  border: 1px solid var(--line-strong);
  overflow: hidden;
}

.avatar-logo img {
  display: block;
  width: 70%;
  height: 70%;
  object-fit: contain;
}

/* --- Pop-up "Transaction details" ---------------------------------------------------------------- */

.sheet-open {
  overflow: hidden;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(10, 10, 14, 0.55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  animation: sheet-fade 0.16s ease;
}

.sheet-backdrop[hidden] {
  display: none;
}

.sheet {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  padding: 24px;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.6);
  animation: sheet-rise 0.2s ease;
  font-variant-numeric: tabular-nums;
}

@keyframes sheet-fade {
  from { opacity: 0; }
}

@keyframes sheet-rise {
  from { opacity: 0; transform: translateY(14px); }
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.sheet-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface-2);
}

.sheet-icon.mov-logo {
  background: none;
}

.sheet-icon .token-icon {
  width: 100%;
  height: 100%;
}

.sheet-icon.mov-in { color: var(--green); }
.sheet-icon.mov-out,
.sheet-icon.mov-declined { color: var(--red); }
.sheet-icon.mov-move { color: var(--blue); }

.sheet-headtext {
  flex: 1;
  min-width: 0;
}

.sheet-headtext h2 {
  margin: 2px 0 8px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.sheet-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-size: 12px;
  color: var(--muted);
}

.sheet-status {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.st-ok { background: var(--green-bg); color: var(--green); }
.st-pending { background: var(--yellow-bg); color: var(--yellow); }
.st-info { background: var(--blue-bg); color: var(--blue); }
.st-bad { background: var(--red-bg); color: var(--red); }

.block-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.sheet-box {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line-strong);
}

.sheet-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 20px;
  background: var(--surface-2);
}

.sheet-block[hidden] {
  display: none;
}

/* Da chi a chi, con la freccia in mezzo. */
.flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.flow-side {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.flow-to {
  align-items: flex-end;
  text-align: right;
}

.flow-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.flow-name {
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.flow-sub {
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.flow-address,
.ref-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.sheet code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.flow-amount {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.flow-chip {
  padding: 3px 8px;
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.flow-arrow {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  color: var(--muted);
}

.flow-arrow svg {
  width: 15px;
  height: 15px;
}

.flow-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

.flow-meta strong {
  margin-left: 4px;
  font-weight: 700;
  color: var(--text);
}

.copy-btn {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
}

.copy-btn:hover {
  background: var(--line);
  color: var(--text);
}

.copy-btn svg {
  width: 14px;
  height: 14px;
}

.ref-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
}

.ref-link:hover {
  text-decoration: underline;
}

.ref-link svg {
  width: 13px;
  height: 13px;
}

#sheet-lines ul,
#sheet-list ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}

#sheet-lines li,
#sheet-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

#sheet-lines li span:last-child,
#sheet-list li span:last-child {
  text-align: right;
  white-space: nowrap;
}

#sheet-lines small,
#sheet-list small {
  margin-left: 8px;
  color: var(--muted);
}

/* Dati di un beneficiario: etichetta sopra e valore sotto, perché IBAN e indirizzi sono lunghi; a destra il tasto
   per copiare. */
#sheet-lines ul.rows-stacked {
  gap: 0;
}

#sheet-lines .rows-stacked li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "label copy" "value copy";
  align-items: center;
  gap: 2px 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

#sheet-lines .rows-stacked li:first-child {
  padding-top: 2px;
  border-top: 0;
}

#sheet-lines .rows-stacked li:last-child {
  padding-bottom: 0;
}

.rows-stacked .row-label {
  grid-area: label;
  font-size: 12px;
  color: var(--muted);
}

.rows-stacked .row-value {
  grid-area: value;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.rows-stacked .row-value code {
  padding: 0;
  background: none;
  font-size: 13px;
}

.rows-stacked .row-value.is-missing {
  font-weight: 500;
  color: var(--faint);
}

.rows-stacked .copy-btn {
  grid-area: copy;
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

.rows-stacked .copy-btn svg {
  width: 16px;
  height: 16px;
}

.sheet-box[hidden] {
  display: none;
}

#sheet-note p {
  font-size: 13px;
  line-height: 1.55;
}

/* Due testi nello stesso riquadro (la risposta di BSD, poi la nota): un po' d'aria prima del secondo titolo. */
#sheet-note p + .block-label {
  margin-top: 8px;
}

/* Il documento allegato a una richiesta: un bottone che sembra un link, alto abbastanza per il dito. */
.file-link {
  min-height: 32px;
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.file-link span {
  overflow-wrap: anywhere;
}

.file-link:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

.sheet-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Soldi in entrata: riquadro verde "You received". */
.sheet-total.total-in {
  border-color: transparent;
  background: var(--green-bg);
}

.total-in .block-label,
.total-in strong {
  color: var(--green);
}

.sheet-total strong {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

/* --- Tablet e telefono ------------------------------------------------- */

@media (max-width: 1100px) {
  .hero,
  .columns,
  .columns-slash,
  .columns-creator {
    grid-template-columns: minmax(0, 1fr);
  }

  .stages {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #home-accounts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (max-width: 860px) {
  .side {
    display: none;
  }

  .main {
    padding: 16px 16px calc(96px + env(safe-area-inset-bottom));
    gap: 16px;
  }

  .top {
    flex-wrap: wrap;
    align-items: center;
  }

  .top-brand {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .top-title {
    order: 3;
    width: 100%;
  }

  .top-title h1 {
    font-size: 24px;
  }

  .stages {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stage {
    padding: 16px;
  }

  .stage-amount {
    font-size: 20px;
  }

  /* Su telefono Crypto Wallet e Pending prendono una riga ciascuno. */
  .stage-wallet,
  .stage-pending {
    grid-column: 1 / -1;
  }

  .balance-card {
    padding: 22px;
    border-radius: 28px;
  }

  .balance-amount {
    font-size: 40px;
  }

  .balance-amount .cents {
    font-size: 22px;
  }

  /* Su telefono i quattro pulsanti stanno su una riga sola, ognuno in un quarto della scheda. */
  .quick {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
  }

  .quick-btn {
    min-width: 0;
  }

  .panel {
    padding: 18px;
    border-radius: 24px;
  }

  /* Movimenti: fee e netto vanno sotto il titolo, così il titolo non viene tagliato. */
  .mov {
    grid-template-areas:
      "icon text amount"
      "icon extra extra";
    padding: 10px 12px;
    column-gap: 10px;
    row-gap: 4px;
  }

  .mov-has-detail {
    grid-template-areas:
      "icon text amount"
      "icon extra extra"
      "detail detail detail";
  }

  /* Profile su telefono: schede su tutta la larghezza, etichetta sopra il campo, documenti senza peso e data in colonna. */
  .ptabs {
    display: flex;
    align-self: stretch;
  }

  .ptab {
    flex: 1;
    justify-content: center;
    padding: 0 10px;
  }

  .profile div {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: 12px;
  }

  .pform .field {
    grid-template-columns: minmax(0, 1fr);
  }

  .pform .field-error {
    grid-column: 1;
  }

  .pform .sheet-actions {
    padding-left: 0;
  }

  .san-code {
    font-size: 24px;
    letter-spacing: 0.08em;
  }

  .doctable th,
  .doctable td {
    padding: 12px;
  }

  .doctable .doc-size,
  .doctable .doc-date {
    display: none;
  }

  .doctable .doc-type {
    width: 112px;
  }

  .doctable .doc-actions {
    width: 92px;
  }

  .doctable .icon-btn + .icon-btn {
    margin-left: 0;
  }

  .doc-meta {
    display: block;
  }

  .docitem-icon {
    display: none;
  }

  /* My Creators su telefono: i due saldi sotto il nome; statistiche su due colonne. */
  .crew-row {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "who" "nums";
  }

  .subtabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
  }

  .subtabs .chip {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
  }

  /* My Talent su telefono: il bottone resta a destra del nome, sulla stessa riga. */
  #talents-list .crew-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "who nums";
  }

  .crew-money {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .money-chip {
    align-items: flex-start;
    min-width: 0;
  }

  .stat-row,
  .stat-row.stat-row-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mov.mov-plain {
    grid-template-areas: "icon text amount";
  }

  .sheet-backdrop {
    place-items: end stretch;
    padding: 0;
  }

  .sheet {
    width: 100%;
    max-height: 92vh;
    max-height: 92dvh;
    padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
    border-radius: 28px 28px 0 0;
  }

  .flow {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .flow-to {
    align-items: flex-start;
    text-align: left;
  }

  .flow-arrow {
    transform: rotate(90deg);
  }

  .mov-amount {
    align-self: start;
  }

  .mov-extra {
    text-align: left;
    white-space: normal;
  }

  .mov-text strong {
    white-space: normal;
  }

  /* Creator: una scheda per riga, con "In attesa" in alto a destra. */
  .table-wrap {
    overflow: visible;
    margin: 0;
  }

  .table thead {
    display: none;
  }

  .table,
  .table tbody,
  .table tfoot {
    display: block;
  }

  .table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "who who"
      "withdrawn pending"
      "recent all";
    gap: 12px 10px;
    padding: 16px 0;
    border-top: 1px solid var(--line);
  }

  .table tbody tr:first-child {
    border-top: 0;
    padding-top: 4px;
  }

  .table td {
    padding: 0;
    border: 0;
    text-align: left !important;
    white-space: normal;
  }

  .table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--faint);
  }

  .c-who {
    grid-area: who;
    align-self: center;
  }

  .c-who .split {
    max-width: none;
  }

  .c-withdrawn {
    grid-area: withdrawn;
    font-size: 15px;
  }

  .c-pending {
    grid-area: pending;
    font-size: 15px;
  }

  .c-recent {
    grid-area: recent;
    font-size: 15px;
  }

  .c-all {
    grid-area: all;
    font-size: 15px;
  }

  .inout {
    grid-template-columns: minmax(0, 1fr);
  }

  .c-month {
    grid-area: month;
  }

  .c-last {
    grid-area: last;
  }

  .c-last .tag {
    white-space: normal;
    height: auto;
    padding: 3px 8px;
    text-align: right;
  }

  .table tfoot tr {
    grid-template-areas:
      "who who who"
      "withdrawn pending main";
  }

  .table tfoot .c-month,
  .table tfoot .c-last {
    display: none;
  }

  .table tfoot tr {
    border-top: 1px solid var(--line-strong);
  }

  .accounts,
  .tiles {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  #home-accounts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #home-accounts .acct {
    padding: 16px;
    gap: 6px;
  }

  #home-accounts .acct-amount {
    font-size: 22px;
  }

  #home-accounts .acct-amount .cents {
    font-size: 14px;
  }

  #home-accounts .acct-cur {
    display: none;
  }

  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tiles .tile:last-child {
    grid-column: 1 / -1;
  }

  /* Tre riquadri su telefono: due affiancati e uno su tutta la riga (il saldo del wallet sta sopra, gli altri sotto). */
  #creator-tiles,
  #creator-money,
  #wallet-tiles,
  #cosmo-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #wallet-tiles .tile:last-child,
  #creator-tiles .tile:last-child,
  #creator-money .tile:last-child {
    grid-column: auto;
  }

  #wallet-tiles .tile:first-child {
    grid-column: 1 / -1;
  }

  /* Un fumetto chiuso non occupa spazio: largo 260px accanto a un titolo usciva dallo schermo e allargava la pagina
     (la barra in basso finiva tagliata). Aperto, app.js lo riporta dentro i bordi con --tip-shift. */
  .tip {
    display: none;
    transition: none;
  }

  .info:hover .tip,
  .info:focus-visible .tip,
  .info.is-open .tip {
    display: block;
  }

  /* Lo spostamento va sulla posizione, non su transform: una trasformazione non toglie l'ingombro che allarga la
     pagina. La punta fa il percorso inverso e resta sotto il pallino. */
  .tip {
    right: calc(-6px - var(--tip-shift, 0px));
  }

  .tip::before {
    right: calc(11px + var(--tip-shift, 0px));
  }

  .info-start .tip {
    left: calc(-6px + var(--tip-shift, 0px));
    right: auto;
  }

  .info-start .tip::before {
    left: calc(11px - var(--tip-shift, 0px));
    right: auto;
  }

  /* Quattro riquadri in due colonne: un importo a sei cifre deve stare in mezzo schermo. */
  #creator-tiles .tile-value,
  #creator-money .tile-value {
    font-size: 20px;
  }

  /* Overview: tre righe compatte, etichetta a sinistra e importo a destra. */
  #overview-tiles {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  #overview-tiles .tile {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
  }

  #overview-tiles .tile-value {
    font-size: 20px;
  }

  .acct {
    padding: 18px;
  }

  .accounts-lg .acct-amount {
    font-size: 30px;
  }

  .admin-bar {
    align-self: stretch;
  }

  .admin-bar .select {
    flex: 1;
  }

  .admin-bar select {
    width: 100%;
  }

  .tabbar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    padding: 6px;
    border-radius: 24px;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    border: 1px solid var(--line-strong);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
  }

  .tabbar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 0;
    border-radius: 18px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
    text-decoration: none;
  }

  .tabbar a.is-active {
    color: var(--text);
    background: var(--surface-2);
  }

  .toast {
    bottom: calc(100px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 420px) {
  .mov-text small {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

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

/* --- Payments, moduli e onboarding ----------------------------------------------------------
   Richieste di pagamento, beneficiari, pro forme (sezione Payments), il modulo "Add a creator" e l'avanzamento
   dell'onboarding in My Creators. Stessi pezzi del resto dell'area: riquadri, righe dei movimenti, chip, pop-up. */

/* Azione di un riquadro: bottone pieno e compatto, a destra del titolo. */
.btn-action {
  flex-shrink: 0;
  height: 40px;
  padding: 0 18px 0 14px;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}

.btn-action svg {
  width: 16px;
  height: 16px;
}

.btn-action[disabled] {
  cursor: default;
}

.tag-wait {
  background: #fde047;
  color: #713f12;
}

:root:not([data-theme="light"]) .tag-wait {
  background: rgba(250, 204, 21, 0.16);
  color: #fde047;
}

.paylist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Una riga che non è un movimento di denaro (beneficiario, richiesta aperta): testo nel colore normale. */
.mov.mov-quiet {
  color: var(--text);
}

.mov-quiet .mov-icon {
  background: var(--surface-2);
  color: var(--muted);
}

.mov-quiet .mov-text small,
.mov-quiet .mov-extra {
  color: var(--muted);
  opacity: 1;
}

.mov .mov-amount .tag {
  vertical-align: middle;
}

.mov-icon .avatar {
  width: 40px;
  height: 40px;
}

/* Titolo di un elenco dentro un riquadro ("Payments made"): più forte dei giorni, più piano del titolo del riquadro. */
.list-title {
  margin: 8px 0 -6px;
  font-size: 14px;
  font-weight: 600;
}

/* Pop-up con un modulo. */
.sheet.sheet-form {
  gap: 16px;
}

.sheet-form .sheet-icon {
  color: var(--muted);
}

.sheet-form .title-info h2 {
  margin: 0;
}

.form-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.sheet-form .input {
  height: 46px;
}

.sheet-form .input input {
  font-size: 14px;
}

.sheet-form .input input::placeholder {
  color: var(--faint);
}

.sheet-form .field small {
  margin-left: 4px;
  font-weight: 500;
  color: var(--faint);
}

.sheet-form .field .chips {
  min-height: 46px;
  align-items: center;
}

/* L'errore di un campo, sotto il campo stesso (non il "optional" grigio accanto all'etichetta). */
.sheet-form .field small.field-error {
  margin-left: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--red);
}

.input-unit {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.form-hint {
  margin: -4px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.form-hint.is-warn {
  color: var(--yellow);
}

.sheet-form .chip:focus-visible,
.pick-card:focus-visible,
.tick:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* "New beneficiary" in fondo ai chip dei beneficiari: non è una scelta, apre il modulo. */
.sheet-form .chip[data-value="+"] {
  border-style: dashed;
  color: var(--text);
}

.sheet-form .chip[data-value="+"]::before {
  content: "+";
  margin-right: 6px;
  font-weight: 500;
}

/* Da dove pagare: due schede, una scelta. */
.pick-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pick-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.pick-card:hover {
  background: var(--surface-2);
}

.pick-card .token-icon {
  width: 36px;
  height: 36px;
}

.pick-card strong,
.pick-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pick-card strong {
  font-size: 14px;
  font-weight: 600;
}

.pick-card small {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.pick-card small.is-negative {
  color: var(--red);
}

.pick-card[aria-pressed="true"] {
  border-color: var(--text);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--text);
}

/* Allegato su una riga sola, dentro un modulo. */
.filepick-row {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 2px 10px;
  padding: 14px 16px;
  border-radius: 16px;
}

/* Casella di conferma, disegnata (niente controllo del browser). */
.tick {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.tick-box {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--line-strong);
  border-radius: 6px;
}

.tick-box svg {
  width: 14px;
  height: 14px;
  stroke-width: 3;
  opacity: 0;
}

.tick[aria-checked="true"] {
  color: var(--text);
}

.tick[aria-checked="true"] .tick-box {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}

.tick[aria-checked="true"] .tick-box svg {
  opacity: 1;
}

.sheet > .sheet-actions[hidden] {
  display: none;
}

/* Onboarding: chi è, a che passo è (cinque tratti), chi deve muoversi. */
.onb-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) auto;
  align-items: center;
  gap: 8px 20px;
  padding: 12px;
  border-radius: 18px;
}

.onb-row .creator {
  min-width: 0;
}

.onb-track {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.onb-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.onb-steps li {
  height: 6px;
  border-radius: 999px;
  background: var(--line-strong);
}

.onb-steps li.is-done {
  background: var(--green);
}

.onb-steps li.is-now {
  background: var(--blue);
}

.onb-caption {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.onb-caption strong {
  font-weight: 600;
  color: var(--text);
}

.onb-row .tag {
  justify-self: end;
}

/* Login del team (solo creator e onboarding): niente barra in basso, c'è una sola sezione; niente nota su
   "View only", che il team non ha. */
:root.role-team .tabbar,
:root.role-team #talents .info {
  display: none;
}

@media (max-width: 860px) {
  #payments .panel-head {
    flex-wrap: wrap;
    align-items: center;
  }

  .form-grid,
  .pick-cards {
    grid-template-columns: minmax(0, 1fr);
  }

  /* My Talent su telefono con due bottoni: vanno sotto il nome, larghi uguali. */
  #talents-list .crew-row.has-request {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "who" "nums";
  }

  .has-request .talent-actions {
    justify-self: stretch;
  }

  .has-request .talent-actions .btn {
    flex: 1;
    justify-content: center;
    height: 40px;
    padding: 0 10px;
    white-space: nowrap;
  }

  .onb-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "who tag" "track track";
  }

  .onb-row .creator {
    grid-area: who;
  }

  .onb-row .tag {
    grid-area: tag;
  }

  .onb-track {
    grid-area: track;
  }
}

/* --- Menu a tendina dei moduli (5 Dic 2026) -------------------------------------------------------------
   Una scelta fra più voci con icona, nome e una riga sotto: da dove pagare, a chi. Non è il <select> del browser:
   un bottone apre l'elenco, che sta sopra il resto del modulo. */
.drop {
  position: relative;
}

.drop-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.drop-btn:hover,
.drop-btn[aria-expanded="true"] {
  background: var(--surface-2);
}

.drop-btn[aria-expanded="true"] {
  border-color: var(--text);
}

.drop-btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.drop-btn[disabled] {
  cursor: default;
  background: transparent;
  border-style: dashed;
}

.drop-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--line);
  color: var(--muted);
}

.drop-icon .token-icon {
  width: 36px;
  height: 36px;
}

.drop-text {
  flex: 1;
  min-width: 0;
}

.drop-text strong,
.drop-text small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drop-text strong {
  font-size: 14px;
  font-weight: 600;
}

.drop-text small {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.drop-text small.is-negative {
  color: var(--red);
}

.drop-text .drop-empty {
  font-weight: 500;
  color: var(--muted);
}

.drop-chevron {
  color: var(--muted);
  transition: transform 0.15s ease;
}

.drop-btn[aria-expanded="true"] .drop-chevron {
  transform: rotate(180deg);
}

.drop-btn[disabled] .drop-chevron {
  visibility: hidden;
}

.drop-list {
  position: absolute;
  z-index: 5;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 284px;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--surface-2);
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.55);
  outline: 0;
  animation: sheet-fade 0.12s ease;
}

.drop-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 10px;
  border-radius: 12px;
  cursor: pointer;
}

.drop-list li:hover,
.drop-list li.is-active {
  background: var(--line);
}

.drop-list:focus-visible li.is-active {
  box-shadow: inset 0 0 0 2px var(--blue);
}

.drop-check {
  color: var(--text);
  visibility: hidden;
}

.drop-list li[aria-selected="true"] .drop-check {
  visibility: visible;
}

/* Il logo di un beneficiario: in un cerchio scuro, come il logo dell'agenzia nel menu. Quello dell'agenzia è un
   disegno chiaro senza sfondo e sta più piccolo; gli altri sono icone già complete e riempiono il cerchio. */
.token-icon.person-logo {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #0f0f0f;
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.person-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.person-logo.is-agency img {
  width: 68%;
  height: 68%;
  object-fit: contain;
}

/* Un avviso sotto un campo quando la cosa non si può fare (non ci sono i soldi): rosso, non giallo. */
.form-hint.is-bad {
  color: var(--red);
}

/* --- Richiesta di pagamento a una talent: la pro forma (5 Dic 2026) --------------------------------------
   Per che cosa (.slots): una riga per ogni anticipo o saldo con il suo stato; si sceglie solo fra quelli aperti. */
.slots {
  display: grid;
  gap: 8px;
}

.slot {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
  min-height: 52px;
  padding: 8px 16px 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.slot:hover,
.slot[aria-pressed="true"] {
  background: var(--surface-2);
}

.slot[aria-pressed="true"] {
  border-color: var(--text);
}

.slot[aria-disabled="true"] {
  cursor: default;
  background: transparent;
  border-color: var(--line);
}

.slot:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.slot strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slot[aria-disabled="true"] strong {
  font-weight: 500;
  color: var(--muted);
}

.slot small {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.slot-open small {
  color: var(--green);
}

.slot-waiting small {
  color: var(--yellow);
}

.slot-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--faint);
}

.slot-mark svg {
  width: 16px;
  height: 16px;
}

.slot[aria-pressed="true"] .slot-mark {
  background: var(--text);
  color: var(--bg);
}

.slot-settled .slot-mark {
  color: var(--green);
}

/* Le righe: descrizione e importo, fino a cinque. Il segno dell'importo è un bottone (+ / −): una detrazione è rossa. */
.lines {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.line,
.lines-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 168px;
  align-items: center;
  gap: 8px;
}

.has-remove .line,
.has-remove .lines-head {
  grid-template-columns: minmax(0, 1fr) 168px 36px;
}

.lines-head .block-label:nth-child(2) {
  padding-left: 16px;
}

.line-field {
  gap: 6px;
}

.sheet-form .line-amount {
  gap: 2px;
  padding: 0 14px 0 6px;
}

.line-amount input {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.line-sign {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--faint);
  font: inherit;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
}

.line-sign:hover {
  background: var(--line);
  color: var(--text);
}

.line-sign[aria-pressed="true"] {
  background: var(--red-bg);
  color: var(--red);
}

.line-sign:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}

.is-deduction .line-amount input {
  color: var(--red);
}

.icon-btn.round.line-remove {
  width: 36px;
  height: 36px;
  background: transparent;
}

.line-remove svg {
  width: 14px;
  height: 14px;
}

.sheet-form .chip.line-add {
  align-self: flex-start;
}

/* Il riepilogo, come in fondo a una pro forma: periodo, subtotale, IVA, anticipo già pagato, totale. */
.pf-sum {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-2);
  font-size: 13px;
}

.pf-sum div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.pf-sum dt {
  color: var(--muted);
}

.pf-sum dd {
  margin: 0;
  font-weight: 600;
  white-space: nowrap;
}

.pf-sum .pf-total {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.pf-total dt {
  font-weight: 600;
  color: var(--text);
}

.pf-total dd {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

@media (max-width: 560px) {
  /* Sul telefono la descrizione prende tutta la riga e l'importo va sotto. */
  .lines-head {
    display: none;
  }

  .lines {
    gap: 14px;
  }

  .line,
  .has-remove .line {
    grid-template-columns: minmax(0, 1fr);
  }

  .has-remove .line {
    grid-template-columns: minmax(0, 1fr) 36px;
  }

  .has-remove .line-what {
    grid-column: 1 / -1;
  }

  .slot {
    grid-template-columns: 28px minmax(0, 1fr);
    row-gap: 2px;
  }

  .slot small {
    grid-column: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .drop-list {
    animation: none;
  }

  .drop-chevron {
    transition: none;
  }
}

/* Senza link al Telegram di BSD (Vincent, 5 Dic 2026): Support, Get paid senza Payments e Add a creator senza
   onboarding restano al loro posto ma spenti, finché non c'è cosa aprire. Add a creator è un pulsante. */
button.add-creator {
  width: 100%;
  background: transparent;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.quick-btn:disabled,
.quick-btn[aria-disabled="true"],
.add-creator:disabled {
  opacity: 0.45;
  cursor: default;
}

.quick-btn[aria-disabled="true"] {
  pointer-events: none;
}

.quick-btn:disabled:hover .quick-icon {
  background: rgba(255, 255, 255, 0.16);
}

.add-creator:disabled:hover {
  background: transparent;
  border-color: var(--line-strong);
}

/* Una richiesta annullata da chi l'aveva fatta: uno stato spento, né buono né cattivo. */
.st-off { background: var(--surface-2); color: var(--muted); }

/* --- Anticipo fermo: il disponibile della talent non lo copre (Vincent, 5 Dic 2026) ---------------------------- */
/* In Home, sotto i saldi: un avviso per ogni talent con l'anticipo fermo. Dice cosa fare e quanto manca. */
.hold-alerts {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hold-alert {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto auto;
  grid-template-areas: "icon text amount open";
  align-items: center;
  gap: 16px;
  padding: 16px 18px 16px 16px;
  border-radius: 24px;
  background: var(--red-bg);
}

.hold-icon {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--red);
}

.hold-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hold-text {
  grid-area: text;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.hold-text strong {
  font-size: 15px;
  font-weight: 600;
}

.hold-text small {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text);
  opacity: 0.78;
}

.hold-amount {
  grid-area: amount;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--red);
}

.hold-amount small {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text);
  opacity: 0.7;
}

.hold-btn {
  grid-area: open;
  height: 44px;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 600;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line-strong);
}

/* La riga dell'anticipo fermo nell'elenco delle pro forma: rossa, come l'avviso. */
.mov-held {
  color: var(--red);
  background: var(--red-bg);
}

.mov-held .mov-icon {
  background: rgba(248, 113, 113, 0.16);
}

.sheet-icon.mov-held { color: var(--red); }

.slot-short small {
  color: var(--red);
}

@media (max-width: 640px) {
  .hold-alert {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    grid-template-areas:
      "icon text text"
      "amount amount open";
    row-gap: 14px;
  }

  .hold-amount {
    align-items: flex-start;
  }
}

/* --- Cambio workspace (Vincent, 5 Dic 2026): la scheda in fondo al menu laterale apre il menu dell'admin. Per
   chi non ha niente da scegliere (un'agenzia, una creator) il bottone è spento e resta l'etichetta di prima. --- */
.ws-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.ws-btn:disabled {
  color: inherit;
  cursor: default;
}

.ws-btn:disabled .ws-chevron {
  display: none;
}

.ws-chevron {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-left: -2px;
  color: var(--faint);
  transition: color 120ms ease;
}

.ws-btn:hover .ws-chevron,
.ws-btn[aria-expanded="true"] .ws-chevron {
  color: var(--text);
}

/* Con la freccia in più la scheda si stringe un poco, così "FansGrowth" resta intero. */
.side-user:has(.ws-btn:not(:disabled)) {
  gap: 6px;
  transition: border-color 120ms ease;
}

.side-user:has(.ws-btn:not(:disabled):hover),
.side-user:has(.ws-btn[aria-expanded="true"]) {
  border-color: var(--line-strong);
}

.ws-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.ws-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-chip svg {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.ws-chip:hover,
.ws-chip[aria-expanded="true"] {
  background: var(--surface-2);
}

.ws-scrim {
  position: fixed;
  inset: 0;
  z-index: 60;
}

.ws-scrim.is-dim {
  background: rgba(0, 0, 0, 0.5);
}

.ws-menu {
  position: fixed;
  z-index: 61;
  width: 320px;
  max-width: calc(100vw - 24px);
  max-height: min(72vh, 560px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow), 0 12px 32px -12px rgba(0, 0, 0, 0.45);
  animation: ws-in 140ms ease-out;
}

.ws-menu[hidden],
.ws-scrim[hidden] {
  display: none;
}

@keyframes ws-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.ws-menu.is-sheet {
  left: 12px;
  right: 12px;
  bottom: calc(96px + env(safe-area-inset-bottom));
  width: auto;
  max-width: none;
  max-height: 64vh;
}

.ws-label {
  margin: 10px 10px 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.ws-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 0 2px 4px;
  padding: 4px;
  border-radius: 14px;
  background: var(--surface-2);
}

.ws-seg > * {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.ws-seg-on {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}

.ws-seg-go:hover,
.ws-seg-go:focus-visible {
  color: var(--text);
}

.ws-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ws-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 6px 10px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.ws-item:hover,
.ws-item[aria-current="true"] {
  background: var(--surface-2);
}

.ws-avatar {
  width: 30px;
  height: 30px;
  font-size: 11px;
}

.ws-name {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.ws-name strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-name small {
  font-size: 11px;
  color: var(--faint);
}

.ws-due {
  color: var(--blue);
}

.ws-check {
  width: 16px;
  height: 16px;
  stroke-width: 2.4;
}

.ws-menu.is-sheet .ws-seg > * {
  height: 44px;
}

/* Il nome nella barra si accorcia con i puntini invece di allargare la pagina. */
.ws-chip {
  position: relative;
  flex: 0 1 auto;
  min-width: 0;
}

.ws-chip span {
  min-width: 0;
}

.ws-chip svg {
  flex-shrink: 0;
}

/* Su telefono la barra dell'admin va a capo: il promemoria dei rimborsi prende una riga sua e può andare su due
   (su una riga sola usciva dallo schermo e allargava la pagina). Il nome si tocca su 44 px di altezza. */
@media (max-width: 860px) {
  .admin-bar {
    flex-wrap: wrap;
    row-gap: 8px;
    padding: 8px;
    border-radius: 22px;
  }

  .admin-bar .tag {
    flex: 1 1 100%;
    height: auto;
    min-height: 24px;
    padding: 5px 10px;
    border-radius: 12px;
    line-height: 1.35;
    white-space: normal;
  }

  .ws-chip::after {
    content: "";
    position: absolute;
    inset: -6px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ws-menu {
    animation: none;
  }
}
