/*
 * Lotus Zen Yoga — gestionale.
 *
 * Nessuna risorsa esterna: nessun carattere tipografico scaricato, nessun
 * foglio di stile da un CDN, nessuna icona presa altrove. La palestra è
 * offline e deve restarlo, quindi qui dentro c'è tutto quello che serve.
 *
 * Indice
 *   1. tavolozza          i colori, chiari e scuri
 *   2. fondamenta         reset, tipografia, forme
 *   3. impianto           colonna, pagina, intestazioni
 *   4. pezzi              schede, numeri, pulsanti, campi, tabelle
 *   5. finestre           modali, fogli, conferme
 *   6. disegni            grafici e griglie, in SVG
 *   7. schermi piccoli    telefono e tablet
 *   8. stampa             la tessera e i riepiloghi su carta
 */

/* ================================================================== */
/* 1. tavolozza                                                       */
/* ================================================================== */

:root {
  /* Carta calda e inchiostro, come il marchio. Il verde salvia è l'unico
     colore che decide qualcosa: dove si guarda e cosa si preme. */
  --paper:        #f7f5f1;
  --paper-2:      #f1eee8;
  --surface:      #ffffff;
  --surface-2:    #fbfaf7;
  --surface-3:    #f4f1ec;
  --ink:          #17171a;
  --ink-2:        #4a4640;
  --muted:        #726c63;
  --faint:        #9c958a;
  --line:         #e5dfd5;
  --line-strong:  #d4ccbf;

  --accent:       #2f6f5e;
  /* Lo stesso verde in cifre, per le trasparenze: `rgba(var(--accent-rgb), .4)`
     lo capiscono anche i browser vecchi, `color-mix()` no. */
  --accent-rgb:   47, 111, 94;
  --accent-hover: #275d4e;
  --accent-soft:  #e6efeb;
  --accent-ink:   #1d4c3f;

  --good:         #2f6f5e;
  --good-soft:    #e6efeb;
  --warn:         #9a6612;
  --warn-soft:    #f9f0dd;
  --warn-line:    #ead9b4;
  --danger:       #a3352c;
  --danger-hover: #8c2c24;
  --danger-soft:  #faeae7;
  --danger-line:  #ecccc6;
  --info:         #2b5d86;
  --info-soft:    #e6eef5;

  /* Il nero della colonna di sinistra e delle tessere stampate. */
  --night:        #15150f;
  --night-2:      #23231b;
  --night-ink:    #eae6de;
  --night-muted:  #a29b8e;
  --night-faint:  #756f64;

  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --shadow-1: 0 1px 2px rgba(24, 20, 14, .05);
  --shadow-2: 0 1px 2px rgba(24, 20, 14, .05), 0 6px 18px rgba(24, 20, 14, .05);
  --shadow-3: 0 12px 32px rgba(24, 20, 14, .12), 0 2px 6px rgba(24, 20, 14, .07);
  --shadow-4: 0 24px 60px rgba(20, 18, 14, .24);
  --ring: 0 0 0 3px var(--accent-soft);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* Un ritmo solo per tutte le distanze: senza, ogni pezzo finiva con i suoi
     margini a caso e la pagina non si allineava mai davvero. */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 22px; --s6: 30px; --s7: 42px; --s8: 60px;
}

/* Tema scuro: la reception a luci spente, e chi apre il gestionale dal
   telefono la sera. Non è un filtro sul tema chiaro — i colori sono scelti
   uno per uno, o il verde diventerebbe fango. */
:root[data-theme="dark"],
:root[data-theme="auto"] {
  color-scheme: dark;
  --paper:        #131310;
  --paper-2:      #171713;
  --surface:      #1c1c17;
  --surface-2:    #212119;
  --surface-3:    #26261e;
  --ink:          #f0ece4;
  --ink-2:        #cdc7bb;
  --muted:        #9e978a;
  --faint:        #7b746a;
  --line:         #2e2e25;
  --line-strong:  #3d3d31;

  --accent:       #57a98d;
  --accent-rgb:   87, 169, 141;
  --accent-hover: #64bb9c;
  --accent-soft:  #1c3830;
  --accent-ink:   #8fd0b6;

  --good:         #57a98d;
  --good-soft:    #1c3830;
  --warn:         #d3a252;
  --warn-soft:    #362b16;
  --warn-line:    #4a3a1d;
  --danger:       #d98077;
  --danger-hover: #e59188;
  --danger-soft:  #3a1f1c;
  --danger-line:  #4d2a25;
  --info:         #7db0d8;
  --info-soft:    #1a2a36;

  --night:        #0e0e0a;
  --night-2:      #1c1c15;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-2: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 18px rgba(0, 0, 0, .3);
  --shadow-3: 0 12px 32px rgba(0, 0, 0, .5), 0 2px 6px rgba(0, 0, 0, .4);
  --shadow-4: 0 24px 60px rgba(0, 0, 0, .6);
  --ring: 0 0 0 3px rgba(87, 169, 141, .28);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #131310; --paper-2: #171713;
    --surface: #1c1c17; --surface-2: #212119; --surface-3: #26261e;
    --ink: #f0ece4; --ink-2: #cdc7bb; --muted: #9e978a; --faint: #7b746a;
    --line: #2e2e25; --line-strong: #3d3d31;
    --accent: #57a98d; --accent-rgb: 87, 169, 141;
    --accent-hover: #64bb9c; --accent-soft: #1c3830; --accent-ink: #8fd0b6;
    --good: #57a98d; --good-soft: #1c3830;
    --warn: #d3a252; --warn-soft: #362b16; --warn-line: #4a3a1d;
    --danger: #d98077; --danger-hover: #e59188; --danger-soft: #3a1f1c; --danger-line: #4d2a25;
    --info: #7db0d8; --info-soft: #1a2a36;
    --night: #0e0e0a; --night-2: #1c1c15;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-2: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 18px rgba(0, 0, 0, .3);
    --shadow-3: 0 12px 32px rgba(0, 0, 0, .5), 0 2px 6px rgba(0, 0, 0, .4);
    --shadow-4: 0 24px 60px rgba(0, 0, 0, .6);
    --ring: 0 0 0 3px rgba(87, 169, 141, .28);
  }
}

/* ================================================================== */
/* 2. fondamenta                                                      */
/* ================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body { overflow-x: hidden; }

button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
p { margin: 0 0 var(--s3); }
p:last-child { margin-bottom: 0; }

/* Il bordo del fuoco si vede solo a chi naviga da tastiera: al mouse
   darebbe fastidio, alla tastiera è l'unico modo di sapere dove si è. */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

::selection { background: var(--accent-soft); color: var(--accent-ink); }

/* Chi ha chiesto al sistema di non far muovere niente lo ha chiesto sul
   serio: qui dentro non si muove niente. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

.serif { font-family: var(--serif); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.right { text-align: right; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: var(--s3); }
.inline { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.between { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.pos { color: var(--good); }
.neg { color: var(--danger); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ================================================================== */
/* 3. impianto                                                        */
/* ================================================================== */

.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }

.sidebar {
  background: var(--night);
  color: var(--night-ink);
  padding: var(--s5) var(--s4) var(--s4);
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  scrollbar-width: thin;
}

.brand {
  display: flex; align-items: center; gap: 11px;
  padding: 0 6px var(--s5);
  text-align: left;
  background: none; border: 0; cursor: pointer; color: inherit;
  width: 100%;
}
.brand img {
  width: 40px; height: 40px; border-radius: 50%;
  background: #fff; padding: 2px; flex: none;
}
.brand b {
  font-family: var(--serif); font-size: 17px; font-weight: 600;
  letter-spacing: .2px; display: block; line-height: 1.15;
}
.brand span {
  font-size: 10.5px; color: var(--night-faint);
  letter-spacing: .1em; text-transform: uppercase;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--night-muted); text-decoration: none; cursor: pointer;
  border: 0; background: none; width: 100%; text-align: left;
  transition: background .13s, color .13s;
  position: relative;
}
.nav-item:hover { background: var(--night-2); color: var(--night-ink); }
.nav-item.on { background: var(--accent); color: #fff; font-weight: 500; }
.nav-item .ico { width: 18px; text-align: center; opacity: .95; flex: none; font-size: 15px; }
.nav-item .badge {
  margin-left: auto; background: rgba(255, 255, 255, .16);
  border-radius: 999px; padding: 1px 7px; font-size: 11px; font-variant-numeric: tabular-nums;
}
.nav-item.on .badge { background: rgba(255, 255, 255, .26); }
.nav-item .badge.alert { background: var(--danger); color: #fff; }

.nav-sep { height: 1px; background: #ffffff14; margin: var(--s3) 6px; }

.nav-foot {
  margin-top: auto; font-size: 11px; color: var(--night-faint);
  padding: var(--s4) 6px 0; line-height: 1.7;
}
.dot-live {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); margin-right: 6px; vertical-align: middle;
}
.dot-live.off { background: var(--danger); }

.main { padding: var(--s6) var(--s6) var(--s8); max-width: 1280px; }

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--s4); margin-bottom: var(--s5); flex-wrap: wrap;
}
.page-head h1 { font-family: var(--serif); font-size: 28px; margin-bottom: 3px; letter-spacing: -.2px; }
.page-head p { margin: 0; color: var(--muted); font-size: 13.5px; }
.head-actions { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; }

.section-title {
  font-family: var(--serif); font-size: 15px; font-weight: 600;
  color: var(--muted); text-transform: uppercase; letter-spacing: .08em;
  margin: var(--s6) 0 var(--s3);
}

.grid { display: grid; gap: var(--s4); }
.grid.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.k2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* Contenuto largo più una colonna di riepilogo che sta a fianco finché ci sta. */
.grid.split { grid-template-columns: minmax(0, 1fr) 336px; }
.mt { margin-top: var(--s4); }

/* ================================================================== */
/* 4. pezzi                                                           */
/* ================================================================== */

/* ---- schede ---- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.card + .card { margin-top: var(--s4); }
.card-head {
  padding: var(--s3) var(--s5);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  min-height: 52px;
  background: var(--surface-2);
}
.card-head h2 { font-family: var(--serif); font-size: 16.5px; }
.card-head .sub { font-size: 12px; color: var(--muted); font-weight: 400; }
.card-body { padding: var(--s4) var(--s5); }
.card-body.tight { padding: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.card-body.flush { padding: var(--s3) 0; }
.card-foot {
  padding: var(--s3) var(--s5); border-top: 1px solid var(--line);
  background: var(--surface-2); font-size: 12.5px; color: var(--muted);
}

/* ---- numeri in evidenza ---- */

.stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: var(--s4) var(--s5);
  box-shadow: var(--shadow-1);
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0;
}
.stat.link { cursor: pointer; text-align: left; transition: border-color .13s, box-shadow .13s; }
.stat.link:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); }
.stat .label {
  font-size: 11px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--muted); font-weight: 600;
}
.stat .value {
  font-family: var(--serif); font-size: 31px; line-height: 1.05; margin-top: 5px;
  font-variant-numeric: tabular-nums; letter-spacing: -.5px;
}
.stat .value.sm { font-size: 23px; }
.stat .sub { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.stat .value.pos { color: var(--good); }
.stat .value.neg { color: var(--danger); }
.stat .spark { margin-top: var(--s2); }

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

.notice {
  border-radius: var(--radius); padding: var(--s3) var(--s4); margin-bottom: var(--s4);
  font-size: 13.5px; line-height: 1.6; border: 1px solid;
  display: flex; gap: var(--s3); align-items: flex-start;
}
.notice .ico { font-size: 17px; line-height: 1.4; flex: none; }
.notice b { display: block; margin-bottom: 2px; }
.notice .acts { margin-top: var(--s3); display: flex; gap: var(--s2); flex-wrap: wrap; }
.notice.warn { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn); }
.notice.bad { background: var(--danger-soft); border-color: var(--danger-line); color: var(--danger); }
.notice.info { background: var(--info-soft); border-color: transparent; color: var(--info); }
.notice.good { background: var(--good-soft); border-color: transparent; color: var(--accent-ink); }
.notice.warn b, .notice.bad b, .notice.info b, .notice.good b { color: inherit; }

/* ---- pulsanti ---- */

.btn {
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  padding: 8px 14px; border-radius: var(--radius-sm); cursor: pointer; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  white-space: nowrap; text-decoration: none;
  transition: background .12s, border-color .12s, color .12s, transform .06s;
  font-weight: 500;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.danger { color: var(--danger); border-color: var(--danger-line); background: var(--surface); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger-solid:hover { background: var(--danger-hover); border-color: var(--danger-hover); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--surface-3); color: var(--ink); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.lg { padding: 11px 20px; font-size: 15px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn .ico { font-size: 14px; }

.btn-group { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.btn-group button {
  border: 0; background: var(--surface); color: var(--muted); cursor: pointer;
  padding: 7px 13px; font-size: 13px; border-right: 1px solid var(--line);
  transition: background .12s, color .12s;
}
.btn-group button:last-child { border-right: 0; }
.btn-group button:hover { background: var(--surface-3); color: var(--ink); }
.btn-group button.on { background: var(--accent); color: #fff; font-weight: 500; }

/* ---- campi ---- */

.field { display: block; margin-bottom: var(--s3); }
.field > span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; font-weight: 500; }
.field > span em { font-style: normal; color: var(--faint); font-weight: 400; }
.field .help { display: block; font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.5; font-weight: 400; }

input[type=text], input[type=number], input[type=date], input[type=email],
input[type=tel], input[type=search], input[type=password], select, textarea {
  width: 100%; padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink);
  outline: none;
  transition: border-color .12s, box-shadow .12s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: var(--ring); }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-3); color: var(--muted); cursor: not-allowed; }
input[type=date] { min-height: 38px; }
textarea { min-height: 76px; resize: vertical; line-height: 1.55; }
select {
  appearance: none;
  /* La freccina è disegnata qui: un'icona presa da fuori non arriverebbe mai. */
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(50% + 1px), calc(100% - 11px) calc(50% + 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}

.row { display: flex; gap: var(--s3); }
.row > * { flex: 1; min-width: 0; }

label.check {
  display: flex; align-items: flex-start; gap: var(--s2); font-size: 14px;
  margin-bottom: var(--s3); cursor: pointer; line-height: 1.5;
}
label.check input { width: auto; margin-top: 2px; accent-color: var(--accent); flex: none; }
label.check .help { display: block; font-size: 12px; color: var(--muted); }

.search { position: relative; width: 260px; max-width: 100%; }
.search input { padding-left: 33px; }
.search::before {
  content: "⌕"; position: absolute; left: 11px; top: 50%; transform: translateY(-52%);
  color: var(--muted); font-size: 18px; pointer-events: none;
}
.search .clear {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: 0; background: none; color: var(--faint); cursor: pointer;
  font-size: 15px; padding: 4px 7px; border-radius: 50%; line-height: 1;
}
.search .clear:hover { color: var(--ink); background: var(--surface-3); }
.date-input { width: 148px; }

/* ---- tabelle ---- */

table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); font-weight: 600; padding: 10px var(--s5);
  border-bottom: 1px solid var(--line); background: var(--surface-2);
  white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--ink); }
th .arrow { opacity: .5; font-size: 9px; margin-left: 3px; }
td { padding: 11px var(--s5); border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr.clickable { cursor: pointer; transition: background .1s; }
tbody tr.clickable:hover { background: var(--surface-2); }
tbody tr.dim td { opacity: .6; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.actions { text-align: right; white-space: nowrap; }
td.actions .btn { opacity: 0; transition: opacity .12s; }
tr:hover td.actions .btn, td.actions .btn:focus-visible { opacity: 1; }
@media (hover: none) { td.actions .btn { opacity: 1; } }

.empty { padding: var(--s7) var(--s5); text-align: center; color: var(--muted); }
.empty .big { font-size: 34px; opacity: .3; margin-bottom: var(--s2); line-height: 1; }
.empty p { max-width: 46ch; margin: 0 auto var(--s3); line-height: 1.6; }

/* ---- pastiglie ---- */

.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px;
  border-radius: 999px; font-size: 12px; background: var(--surface-3);
  color: var(--muted); white-space: nowrap; font-weight: 500;
}
.chip.ok { background: var(--good-soft); color: var(--accent-ink); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--danger-soft); color: var(--danger); }
.chip.info { background: var(--info-soft); color: var(--info); }
.chip.mono { font-family: var(--mono); letter-spacing: .07em; background: var(--surface-3); color: var(--ink-2); }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }

.code-badge {
  font-family: var(--mono);
  letter-spacing: .16em; font-size: 15px; font-weight: 600;
  background: var(--night); color: var(--night-ink);
  padding: 5px 11px; border-radius: var(--radius-sm); display: inline-block;
}

/* ---- barre ---- */

.bar { height: 6px; background: var(--surface-3); border-radius: 4px; overflow: hidden; margin: var(--s2) 0 3px; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 4px; transition: width .3s; }
.bar > i.warn { background: var(--warn); }
.bar > i.bad { background: var(--danger); }

/* ---- schede a linguette ---- */

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: var(--s4); flex-wrap: wrap; }
.tab {
  padding: 9px 14px; border: 0; background: none; cursor: pointer; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: 14px;
  transition: color .12s, border-color .12s;
}
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.tab .count { font-size: 11px; color: var(--faint); margin-left: 4px; }

/* ---- abbonamenti nella scheda cliente ---- */

.sub-item {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--s3) var(--s4); margin-bottom: var(--s3); background: var(--surface);
}
.sub-item.on { border-color: rgba(var(--accent-rgb), .38); background: var(--surface-2); }
.sub-item.off { background: var(--surface-2); opacity: .72; }
.sub-item .top { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin-bottom: 6px; flex-wrap: wrap; }
.sub-item .name { font-weight: 600; }
.sub-item .meta { font-size: 12.8px; color: var(--muted); line-height: 1.7; }
.sub-actions { display: flex; gap: 6px; margin-top: var(--s3); flex-wrap: wrap; }

/* ---- scheda cliente ---- */

.client-hero { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; }
.avatar {
  width: 54px; height: 54px; border-radius: 50%; background: var(--night); color: var(--night-ink);
  display: grid; place-items: center; font-family: var(--serif); font-size: 20px; flex: none;
}
.client-hero h3 { margin: 0 0 3px; font-family: var(--serif); font-size: 22px; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px var(--s4); font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* ---- listino ---- */

.plan-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
.plan-opt {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 13px;
  cursor: pointer; background: var(--surface); text-align: left;
  transition: border-color .12s, background .12s;
  display: flex; align-items: flex-start; gap: var(--s3);
}
.plan-opt:hover { border-color: var(--line-strong); background: var(--surface-2); }
.plan-opt.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.plan-opt b { display: block; font-size: 14.5px; margin-bottom: 2px; }
.plan-opt span { font-size: 12.3px; color: var(--muted); }
.plan-opt .price { margin-left: auto; font-family: var(--serif); font-size: 16px; white-space: nowrap; }

/* ---- elenchi dell'agenda ---- */

.list { display: flex; flex-direction: column; }
.list-row {
  display: flex; align-items: center; gap: var(--s3);
  padding: 10px var(--s5); border-bottom: 1px solid var(--line);
  text-align: left; background: none; border-left: 0; border-right: 0; border-top: 0;
  width: 100%; cursor: pointer; color: inherit; font: inherit;
}
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: var(--surface-2); }
.list-row .who { font-weight: 600; }
.list-row .what { font-size: 12.5px; color: var(--muted); }
.list-row .tail { margin-left: auto; text-align: right; white-space: nowrap; }

/* ================================================================== */
/* 5. finestre                                                        */
/* ================================================================== */

.backdrop {
  position: fixed; inset: 0; background: rgba(20, 18, 14, .46);
  display: flex; align-items: flex-start; justify-content: center;
  padding: var(--s7) var(--s4); overflow-y: auto; z-index: 50;
  backdrop-filter: blur(3px);
  animation: fade .14s ease-out;
}
.modal {
  background: var(--surface); border-radius: var(--radius-xl); width: 100%; max-width: 580px;
  box-shadow: var(--shadow-4); overflow: hidden; margin: auto;
  border: 1px solid var(--line);
  animation: rise .18s cubic-bezier(.2, .8, .3, 1);
}
.modal.wide { max-width: 900px; }
.modal.narrow { max-width: 420px; }
.modal-head {
  padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
}
.modal-head h2 { font-family: var(--serif); font-size: 19px; }
.modal-head .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.modal-body { padding: var(--s5); max-height: 68vh; overflow-y: auto; }
.modal-foot {
  padding: var(--s3) var(--s5); border-top: 1px solid var(--line);
  display: flex; justify-content: flex-end; gap: var(--s2); background: var(--surface-2);
  flex-wrap: wrap;
}
.modal-foot .left { margin-right: auto; }
.x {
  border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--muted);
  line-height: 1; padding: 6px 8px; border-radius: var(--radius-sm); flex: none;
}
.x:hover { background: var(--surface-3); color: var(--ink); }

@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(10px) scale(.99); opacity: 0; } }

/* ---- conferme ---- */

/*
 * Il `confirm()` del browser diceva sempre la stessa cosa nello stesso modo,
 * e non poteva dire quanto costa un sì: quanti abbonamenti si portava via,
 * quanti incassi. Qui la domanda ha lo spazio per essere precisa, e il
 * pulsante che fa il danno è rosso e non è quello sotto il dito.
 */
.confirm-body { padding: var(--s5); }
.confirm-body h3 { font-family: var(--serif); font-size: 19px; margin-bottom: var(--s2); }
.confirm-body p { color: var(--ink-2); line-height: 1.6; font-size: 14px; }
.confirm-body .detail {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--s3) var(--s4); margin-top: var(--s3); font-size: 13px; color: var(--muted);
}
.confirm-body .detail ul { margin: 0; padding-left: 18px; }
.confirm-body .detail li { margin: 3px 0; }

/* ---- ricerca rapida ---- */

.palette-wrap { align-items: flex-start; padding-top: 12vh; }
.palette { max-width: 620px; width: 100%; margin: 0 auto; }
.palette-input {
  border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  font-size: 18px; padding: var(--s5); background: transparent;
}
.palette-input:focus { box-shadow: none; border-color: var(--line); }
.palette-results { max-height: 56vh; overflow-y: auto; padding: var(--s2) 0 var(--s3); }
.palette-group { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); padding: var(--s3) var(--s5) 4px; font-weight: 600; }
.palette-item {
  display: flex; align-items: center; gap: var(--s3); width: 100%;
  padding: 9px var(--s5); border: 0; background: none; cursor: pointer;
  text-align: left; color: inherit; font: inherit;
}
.palette-item:hover, .palette-item.on { background: var(--accent-soft); }
.palette-item .ico { width: 20px; text-align: center; color: var(--muted); flex: none; }
.palette-item .tail { margin-left: auto; font-size: 12px; color: var(--muted); }
.palette-foot {
  padding: var(--s2) var(--s5); border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--faint); display: flex; gap: var(--s4); flex-wrap: wrap;
  background: var(--surface-2);
}
kbd {
  font-family: var(--mono); font-size: 11px; background: var(--surface-3);
  border: 1px solid var(--line-strong); border-bottom-width: 2px;
  border-radius: 5px; padding: 1px 5px; color: var(--ink-2);
}

/* ---- messaggi che passano ---- */

#toasts {
  position: fixed; right: var(--s5); bottom: var(--s5);
  display: flex; flex-direction: column; gap: var(--s2); z-index: 200;
  pointer-events: none;
}
.toast {
  background: var(--night); color: var(--night-ink);
  padding: 11px var(--s4); border-radius: var(--radius);
  box-shadow: var(--shadow-3); font-size: 14px; max-width: 400px;
  animation: pop .18s ease-out; pointer-events: auto;
  display: flex; align-items: center; gap: var(--s3);
  transition: opacity .3s, transform .3s;
}
.toast.bad { background: var(--danger); color: #fff; }
.toast.good { background: var(--accent); color: #fff; }
.toast .undo {
  margin-left: auto; background: rgba(255, 255, 255, .18); border: 0; color: inherit;
  padding: 4px 11px; border-radius: 999px; cursor: pointer; font-size: 12.5px;
  font-weight: 600; white-space: nowrap;
}
.toast .undo:hover { background: rgba(255, 255, 255, .3); }
.toast.leaving { opacity: 0; transform: translateY(6px); }
@keyframes pop { from { transform: translateY(10px); opacity: 0; } }

/* ---- caricamento ---- */

.skeleton {
  background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 50%, var(--surface-3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { to { background-position: -200% 0; } }
.skeleton-row { height: 42px; margin: 0 0 1px; border-radius: 0; }

/* ================================================================== */
/* 6. disegni                                                         */
/* ================================================================== */

/*
 * I grafici sono SVG scritti a mano, senza librerie.
 * Una libreria di grafici pesa più di tutto il resto del gestionale messo
 * insieme, e andrebbe scaricata da internet: qui non c'è internet.
 */

.chart { display: block; width: 100%; overflow: visible; }
.chart .axis { stroke: var(--line); stroke-width: 1; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
.chart .label { fill: var(--muted); font-size: 10px; font-family: var(--sans); }
.chart .bar-in { fill: var(--accent); }
.chart .bar-out { fill: var(--danger); opacity: .75; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--accent); opacity: .1; }
.chart .point { fill: var(--accent); }

.spark { display: block; width: 100%; height: 26px; overflow: visible; }
.spark path { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.spark .fill { fill: var(--accent); opacity: .12; stroke: none; }

.heat { display: grid; gap: 2px; font-size: 10px; }
.heat-cell { aspect-ratio: 1; border-radius: 3px; background: var(--surface-3); min-height: 13px; }
.heat-label { color: var(--muted); font-size: 10px; display: flex; align-items: center; justify-content: center; }
.heat-legend { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.heat-legend i { width: 13px; height: 13px; border-radius: 3px; display: block; }

/* ================================================================== */
/* 7. schermi piccoli                                                 */
/* ================================================================== */

/*
 * Il gestionale non si guarda solo dal PC della reception: capita di aprirlo
 * dal telefono mentre si è in sala, o dal tablet. Sotto certe larghezze la
 * colonna di sinistra mangiava mezzo schermo e le tabelle uscivano dai bordi.
 */

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

@media (max-width: 1080px) {
  .grid.k4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.k3, .grid.k2 { grid-template-columns: 1fr; }
  .main { padding: var(--s5) var(--s5) var(--s8); }
}

/* Colonna di sinistra stretta: restano le icone e un'etichetta corta. */
@media (max-width: 900px) {
  .app { grid-template-columns: 172px minmax(0, 1fr); }
  .sidebar { padding: var(--s4) 10px; }
  .brand img { width: 34px; height: 34px; }
  .brand b { font-size: 15px; }
  .brand span { font-size: 9.5px; }
  .main { padding: var(--s4) var(--s4) var(--s8); }
  .page-head h1 { font-size: 23px; }
  th, td { padding-left: var(--s3); padding-right: var(--s3); }
}

/* Telefono: la navigazione scende in fondo, come una app. */
@media (max-width: 700px) {
  html, body { font-size: 15.5px; }

  .app { display: block; }

  .sidebar {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto;
    height: auto; flex-direction: row; gap: 0; overflow: visible;
    padding: 5px 4px calc(5px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #ffffff1a; z-index: 40;
  }
  .brand, .nav-foot, .nav-sep { display: none; }
  .nav-item {
    flex: 1 1 0; min-width: 0;
    flex-direction: column; gap: 2px;
    padding: 6px 2px; font-size: 10px; text-align: center;
    border-radius: var(--radius-sm);
  }
  .nav-item .ico { width: auto; font-size: 17px; }
  .nav-item.on { background: transparent; color: var(--accent); }
  .nav-item .badge {
    position: absolute; top: 2px; right: 50%; margin-right: -20px;
    font-size: 9px; padding: 0 4px; background: var(--danger); color: #fff;
  }

  /* Spazio perché l'ultima riga non finisca sotto la barra. */
  .main { padding: var(--s4) var(--s3) calc(84px + env(safe-area-inset-bottom, 0px)); max-width: none; }

  .page-head { align-items: stretch; gap: var(--s3); margin-bottom: var(--s4); }
  .page-head h1 { font-size: 21px; }
  .head-actions .btn { flex: 1 1 auto; }
  .search { width: 100%; }
  .date-input { width: auto; flex: 1 1 120px; min-width: 0; }

  .grid.k4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .grid { gap: var(--s3); }
  .stat { padding: var(--s3); }
  .stat .value { font-size: 24px; }
  .stat .value.sm { font-size: 19px; }

  .card-head { padding: var(--s3); min-height: 46px; }
  .card-body { padding: var(--s3); }
  th { padding: 9px var(--s3); font-size: 10px; }
  td { padding: 10px var(--s3); }

  /* Colonne di contorno: su un telefono rubano solo spazio a quelle che
     servono davvero per capire chi è chi. */
  .hide-sm { display: none !important; }

  /* Le finestre partono da sotto e occupano lo schermo, come un foglio che
     sale: a metà pagina, su un telefono, non si capirebbe dove sono. */
  .backdrop { padding: 0; align-items: flex-end; }
  .palette-wrap { align-items: flex-start; padding-top: 0; }
  .modal, .modal.wide, .modal.narrow {
    max-width: none; width: 100%; margin: 0;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0; max-height: 94vh;
    display: flex; flex-direction: column; border-bottom: 0;
  }
  .palette { border-radius: 0 0 var(--radius-xl) var(--radius-xl); }
  .modal-body { max-height: none; flex: 1 1 auto; padding: var(--s4) var(--s3); }
  .modal-head { padding: var(--s3); }
  .modal-foot { padding: var(--s3) var(--s3) calc(var(--s3) + env(safe-area-inset-bottom, 0px)); }
  .modal-foot .btn { flex: 1 1 auto; }
  .modal-foot .left { margin-right: 0; flex-basis: 100%; }

  /* Due campi affiancati non ci stanno: vanno uno sotto l'altro. */
  .row { flex-direction: column; gap: 0; }
  .row .row { flex-direction: row; gap: 10px; }

  .plan-pick { grid-template-columns: 1fr; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { white-space: nowrap; }
  .sub-actions .btn { flex: 1 1 auto; }
  td.actions .btn { opacity: 1; }

  #toasts { left: var(--s3); right: var(--s3); bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
  .toast { max-width: none; }
}

/* Il dito non ha la punta del mouse: bersagli più generosi. */
@media (pointer: coarse) {
  .btn { padding: 10px 15px; }
  .btn.sm { padding: 8px 12px; }
  input[type=text], input[type=number], input[type=date], input[type=email],
  input[type=tel], input[type=search], input[type=password], select, textarea { padding: 11px 12px; }
  .x { font-size: 23px; padding: 9px 11px; }
  .list-row { padding-top: 13px; padding-bottom: 13px; }
}

/* ================================================================== */
/* 8. stampa                                                          */
/* ================================================================== */

.tessera {
  width: 330px; padding: var(--s6) var(--s5); border-radius: 18px; text-align: center;
  background: var(--night); color: var(--night-ink); margin: 0 auto;
}
.tessera img { width: 92px; height: 92px; border-radius: 50%; background: #fff; padding: 5px; }
.tessera .name { font-family: var(--serif); font-size: 19px; margin: 13px 0 2px; }
.tessera .lbl {
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--night-faint); margin-top: var(--s4);
}
.tessera .code { font-family: var(--mono); font-size: 32px; letter-spacing: .2em; margin: 5px 0 0; }
.tessera .code.activation { font-size: 20px; letter-spacing: .12em; line-height: 1.6; word-spacing: .3em; }
.tessera-foot {
  margin-top: var(--s4); padding-top: var(--s3);
  border-top: 1px solid #ffffff1f; font-size: 11.5px; color: var(--night-faint);
}
.tessera-foot b { font-family: var(--mono); letter-spacing: .12em; color: var(--night-muted); }
.tessera .hint { font-size: 11.5px; color: var(--night-faint); margin-top: var(--s4); line-height: 1.65; }

/* ---- il tesserino cartaceo ---- */

/*
 * Un biglietto da visita vero: 85×55 mm, il formato che entra nel portafogli
 * e nella tasca di una borsa da palestra. Le misure sono in millimetri e non
 * in pixel perché questo pezzo esiste per uscire da una stampante: in pixel
 * andrebbe bene a schermo e uscirebbe della dimensione sbagliata sulla carta,
 * che per un QR vuol dire un varco che fatica a leggerlo.
 */
.card-sheet {
  display: grid;
  grid-template-columns: repeat(2, 85mm);
  gap: 4mm;
  justify-content: center;
}
.card-sheet.single { grid-template-columns: 85mm; }

.tesserino {
  width: 85mm;
  height: 55mm;
  display: flex;
  align-items: stretch;
  gap: 3mm;
  padding: 4mm;
  box-sizing: border-box;
  background: #fff;
  color: #14140f;
  border: 1px dashed var(--line-strong);
  border-radius: 3mm;
  overflow: hidden;
  break-inside: avoid;
  page-break-inside: avoid;
}
.tess-side { display: flex; flex-direction: column; justify-content: center; min-width: 0; flex: 1; }
.tess-logo { width: 9mm; height: 9mm; border-radius: 50%; }
.tess-gym {
  font-family: var(--serif); font-size: 3.6mm; font-weight: 600;
  margin-top: 1.4mm; letter-spacing: .01em; color: #14140f;
}
.tess-name {
  font-size: 4.4mm; font-weight: 700; line-height: 1.15; margin-top: 2mm;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tess-line { height: 1px; background: #ddd7cb; margin: 2.2mm 0 2mm; }
.tess-lbl {
  font-size: 2.3mm; letter-spacing: .18em; text-transform: uppercase; color: #8b8579;
}
.tess-code {
  font-family: var(--mono); font-size: 5mm; letter-spacing: .16em;
  font-weight: 600; margin-top: .6mm;
}
.tess-sum {
  font-size: 2.6mm; color: #8b8579; margin-top: 1.6mm; line-height: 1.35;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.tess-qr { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; }
.tess-qr svg { width: 34mm; height: 34mm; display: block; }
.tess-hint {
  font-size: 2.3mm; color: #8b8579; margin-top: 1.4mm;
  letter-spacing: .08em; text-transform: uppercase;
}

/* ---- il codice di accoppiamento del varco ---- */

.pair-box {
  display: flex; align-items: center; gap: var(--s5); flex-wrap: wrap;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: var(--s5);
}
.pair-qr { background: #fff; padding: 10px; border-radius: var(--radius); line-height: 0; }
.pair-qr svg { display: block; }
.pair-box .lbl {
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 600;
}
.pair-code {
  font-family: var(--mono); font-size: 40px; letter-spacing: .18em;
  font-weight: 600; line-height: 1.2; margin: 4px 0 6px;
}

.steps { margin: 0 0 var(--s5); padding-left: 20px; color: var(--ink-2); font-size: 14px; line-height: 1.75; }
.steps li { margin-bottom: 4px; }

/* ---- righe scelte, nei tesserini ---- */

tbody tr.picked { background: var(--accent-soft); }
tbody tr.picked:hover { background: var(--accent-soft); }
tbody tr.picked td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
td input[type=checkbox], th input[type=checkbox] {
  width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; vertical-align: middle;
}

@media print {
  @page { size: A4; margin: 10mm; }
  :root { --paper: #fff; --surface: #fff; --ink: #000; --line: #ccc; }
  .sidebar, .page-head, .modal-head, .modal-foot, .no-print, #toasts { display: none !important; }
  .backdrop { position: static; background: none; padding: 0; backdrop-filter: none; animation: none; overflow: visible; }
  .modal { box-shadow: none; max-width: none; border: 0; animation: none; }
  .modal-body { max-height: none; overflow: visible; padding: 0; }
  .app { display: block; }
  body { background: #fff; }
  .card { break-inside: avoid; box-shadow: none; }
  table { font-size: 11px; }
  /* La tessera e i tesserini vanno stampati con i loro colori, o escono
     rettangoli bianchi con sopra scritto niente. */
  .tessera, .tesserino {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  /* Sulla carta i bordi tratteggiati servono davvero: sono le linee di taglio. */
  .tesserino { border-color: #bbb; }
  .card-sheet { gap: 6mm 4mm; }
}

/* ================================================================== */
/* accesso                                                            */
/* ================================================================== */

/*
 * La schermata d'accesso è la prima cosa che si vede da internet, e per
 * chiunque non abbia le credenziali è anche l'ultima. Deve essere bella —
 * è la faccia della palestra — e non deve raccontare niente: nessun elenco di
 * utenti, nessun «questo nome non esiste», nessun indizio.
 */
.gate-screen {
  min-height: 100vh; min-height: 100dvh;
  display: grid; place-items: center;
  padding: var(--s5);
  background:
    radial-gradient(1100px 620px at 15% -10%, rgba(var(--accent-rgb), .16), transparent 60%),
    radial-gradient(900px 520px at 105% 110%, rgba(var(--accent-rgb), .12), transparent 55%),
    var(--paper);
}
.gate-card {
  width: 380px; max-width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-3);
  padding: var(--s7) var(--s6) var(--s6);
  text-align: center;
  animation: rise .3s cubic-bezier(.2, .8, .3, 1);
}
.gate-logo {
  width: 82px; height: 82px; border-radius: 50%;
  background: var(--night); padding: 6px; margin-bottom: var(--s4);
}
.gate-card h1 { font-family: var(--serif); font-size: 25px; letter-spacing: -.2px; }
.gate-sub {
  color: var(--muted); font-size: 13px; margin: 4px 0 var(--s6);
  letter-spacing: .04em;
}
.gate-card .field { text-align: left; margin-bottom: var(--s4); }
.gate-card .btn { margin-top: var(--s2); }
.gate-err {
  color: var(--danger); font-size: 13px; margin-top: var(--s3);
  min-height: 1.4em; line-height: 1.5;
}
.gate-foot {
  color: var(--faint); font-size: 12px; line-height: 1.7;
  margin: var(--s5) 0 0; padding-top: var(--s4); border-top: 1px solid var(--line);
}

/* Il campo password con l'occhio: chi digita una password lunga su un
   telefono ha bisogno di poterla rileggere, o la sbaglia e non sa dove. */
.pw { position: relative; display: block; }
.pw input { padding-right: 42px; }
.pw-eye {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  border: 0; background: none; color: var(--faint); cursor: pointer;
  font-size: 16px; padding: 8px 10px; border-radius: var(--radius-sm); line-height: 1;
}
.pw-eye:hover { color: var(--ink); background: var(--surface-3); }

/* ---- chi è entrato, in fondo alla colonna ---- */

.nav-foot .who {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 9px 8px; border: 0; background: none; cursor: pointer;
  border-radius: var(--radius-sm); color: var(--night-ink); text-align: left;
  transition: background .13s;
}
.nav-foot .who:hover { background: var(--night-2); }
.who-badge {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  background: var(--accent); color: #fff;
  display: grid; place-items: center; font-size: 11.5px; font-weight: 700;
}
.nav-foot .who b { display: block; font-size: 12.5px; font-weight: 600; line-height: 1.25;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-foot .who span span { font-size: 10.5px; color: var(--night-faint); }
.nav-foot .who .dot-live { margin: 0; flex: none; }
