/* Font ospitati sul sito (niente Google Fonts: nessun IP dei visitatori inviato a terzi). Licenza: assets/fonts/OFL.txt */
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/bricolage-grotesque-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/bricolage-grotesque-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 800; font-display: swap; src: url('../fonts/bricolage-grotesque-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/jetbrains-mono-latin-700-normal.woff2') format('woff2'); }

/* =========================================================
   Flashlyn — tema
   Cambia questi colori per ridisegnare tutto il sito.
   ========================================================= */
:root {
  color-scheme: dark;
  --bg: #08070e;
  --bg-2: #0f0d18;
  --ink: #f6f4ff;
  --ink-2: #d9d5ea;
  --muted: #a7a2bf;
  --card: rgba(255, 255, 255, .05);
  --glass: linear-gradient(rgba(255, 255, 255, .055), rgba(255, 255, 255, .03)), rgba(13, 11, 22, .62);   /* vetro senza backdrop-filter: molto più leggero da disegnare */
  --card-2: rgba(255, 255, 255, .08);
  --card-solid: #14121f;
  --field: rgba(0, 0, 0, .38);
  --line: rgba(255, 255, 255, .1);
  --line-2: rgba(255, 255, 255, .18);
  --accent: #ffe14d;     /* giallo fulmine */
  --accent-2: #ff4fd8;   /* magenta */
  --accent-3: #6a5cff;   /* viola elettrico */
  --accent-4: #2de1ff;   /* ciano */
  --accent-ink: #120f00;
  --grad: linear-gradient(110deg, var(--accent) 0%, #ff9d4d 30%, var(--accent-2) 65%, var(--accent-3) 100%);
  --err: #ff6b8a;
  --ok: #4dffb0;
  --warn: #ffb84d;
  --info: #7fb2ff;
  --radius: 22px;
  --shadow: 0 40px 90px -40px rgba(0, 0, 0, .9), 0 0 0 1px var(--line) inset;
}

@property --angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@property --p     { syntax: '<percentage>'; inherits: false; initial-value: 0%; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16.5px/1.55 'Bricolage Grotesque', system-ui, sans-serif;
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  overflow-x: hidden; position: relative; -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
a:hover { color: var(--accent); }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.opt { color: var(--muted); font-weight: 400; font-size: .86rem; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 10px; }
.skip:focus { left: 8px; }
h1, h2, h3, h4 { letter-spacing: -.03em; line-height: 1.15; }
.h2 { font-size: clamp(1.5rem, 4.5vw, 2rem); margin: 0 0 8px; }
.h3 { font-size: 1.25rem; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.h4 { font-size: 1rem; margin: 0 0 12px; }
.ic { flex-shrink: 0; vertical-align: -.15em; }

/* ---------- Sfondo: aurora + griglia + grana ---------- */
body::before {
  content: ''; position: fixed; inset: -20vmax; z-index: -3; pointer-events: none;
  background:
    radial-gradient(38vmax 38vmax at 15% 10%, rgba(106, 92, 255, .46), rgba(106, 92, 255, .14) 38%, transparent 66%),
    radial-gradient(33vmax 33vmax at 90% 85%, rgba(255, 79, 216, .34), rgba(255, 79, 216, .1) 38%, transparent 66%),
    radial-gradient(28vmax 28vmax at 80% 5%, rgba(45, 225, 255, .16), transparent 66%),
    radial-gradient(25vmax 25vmax at 5% 90%, rgba(255, 225, 77, .11), transparent 66%);
  transform: translate(1vmax, 1.5vmax) rotate(3deg) scale(1.04);   /* fermo: prima si muoveva piano e costava un ridisegno a ogni fotogramma */
}
html::before {
  content: ''; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 15%, transparent 65%);
          mask-image: radial-gradient(ellipse at 50% 0%, #000 15%, transparent 65%);
}
html::after {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* iPhone con il sito aggiunto alla schermata Home: la barra di stato (ora, batteria) sta sopra la pagina.
   Questa fascia fissa, alta quanto la barra, ha il colore dello sfondo: niente testo che scorre sotto l'orologio.
   Nel browser normale l'altezza è 0 e non si vede. */
body::after {
  content: ''; position: fixed; top: 0; left: 0; right: 0; height: env(safe-area-inset-top, 0px); z-index: 1000; pointer-events: none;
  background: var(--bg);
}
@keyframes aurora {
  0%   { transform: translate(0, 0) rotate(0deg) scale(1); }
  50%  { transform: translate(4vmax, 3vmax) rotate(8deg) scale(1.08); }
  100% { transform: translate(-3vmax, 5vmax) rotate(-6deg) scale(1.02); }
}

/* ---------- Struttura ---------- */
main { flex: 1; width: 100%; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-right, 0px)) 64px max(16px, env(safe-area-inset-left, 0px)); min-width: 0; }
.wrap { max-width: 780px; }
.wrap-wide { max-width: 1200px; }
main, .card, .card * { overflow-wrap: anywhere; }
.card, .copy-row > *, .alias-row > *, .stat-tiles > *, .row-actions > *, .grid-2 > *, .grid-3 > *, .grid-4 > * { min-width: 0; }

/* ---------- Header ---------- */
.top { max-width: 780px; margin: 0 auto; width: 100%; padding: calc(18px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 18px max(16px, env(safe-area-inset-left, 0px)); display: flex; align-items: center; justify-content: space-between; gap: 12px; position: relative; z-index: 20; }
.top-wide { max-width: 1200px; }
.brand { font-weight: 800; font-size: 1.4rem; text-decoration: none; letter-spacing: -.035em; display: inline-flex; align-items: center; flex-shrink: 0; }
.brand:hover { color: var(--ink); }
.bolt {
  display: inline-grid; place-items: center; width: 38px; height: 38px; margin-right: 10px;
  background: linear-gradient(135deg, #ffe14d, #ffa64d); color: var(--accent-ink); border-radius: 12px; transform: rotate(-8deg);
  box-shadow: 0 0 0 4px rgba(255, 225, 77, .12), 0 10px 34px -6px rgba(255, 225, 77, .7);
  transition: transform .45s cubic-bezier(.34, 1.56, .64, 1);
}
.brand:hover .bolt { transform: rotate(10deg) scale(1.12); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav-link { text-decoration: none; padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: .95rem; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.nav-link:hover { background: var(--card-2); color: var(--ink); }
.count { background: var(--err); color: #1a0008; font-size: .72rem; font-weight: 800; border-radius: 999px; padding: 1px 7px; }
.menu { position: relative; margin-left: 4px; }
.menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--card); box-shadow: 0 0 0 1px var(--line) inset; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary:hover { background: var(--card-2); }
.menu-name { font-weight: 600; font-size: .92rem; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.star { color: var(--accent); display: inline-flex; }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px; padding: 6px; border-radius: 16px;
  background: rgba(20, 18, 31, .96); box-shadow: 0 20px 60px -10px rgba(0,0,0,.8), 0 0 0 1px var(--line-2) inset;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); animation: pop .25s cubic-bezier(.2, .8, .2, 1) both;
}
.menu-panel a, .menu-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px; text-decoration: none;
  font: inherit; font-size: .94rem; color: var(--ink-2); background: none; border: 0; margin: 0; cursor: pointer; box-shadow: none; text-align: left;
}
.menu-panel a:hover, .menu-btn:hover { background: var(--card-2); color: var(--ink); transform: none; }
.menu-panel form { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.menu-btn::after { display: none; }
.avatar {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-weight: 800; font-size: .9rem;
  background: var(--grad); color: var(--accent-ink); flex-shrink: 0;
}
.avatar-sm { width: 26px; height: 26px; font-size: .8rem; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.6rem; border-radius: 20px; }
.announce { max-width: 1200px; margin: 0 auto 14px; width: calc(100% - 32px); padding: 10px 16px; border-radius: 14px; font-size: .92rem; font-weight: 600;
  background: rgba(127, 178, 255, .1); box-shadow: 0 0 0 1px rgba(127, 178, 255, .3) inset; text-align: center; }
.announce.warn { background: rgba(255, 184, 77, .1); box-shadow: 0 0 0 1px rgba(255, 184, 77, .35) inset; }
.announce a { color: var(--accent); }

/* ---------- Messaggi ---------- */
.flash { margin: 0 0 16px; padding: 12px 16px; border-radius: 14px; font-weight: 600; font-size: .95rem; }
.flash.ok   { color: var(--ok);   background: rgba(77, 255, 176, .08);  box-shadow: 0 0 0 1px rgba(77, 255, 176, .28) inset; }
.flash.err  { color: var(--err);  background: rgba(255, 107, 138, .1);  box-shadow: 0 0 0 1px rgba(255, 107, 138, .3) inset; }
.flash.info { color: var(--info); background: rgba(127, 178, 255, .08); box-shadow: 0 0 0 1px rgba(127, 178, 255, .28) inset; }
.flash.warn { color: var(--warn); background: rgba(255, 184, 77, .08); box-shadow: 0 0 0 1px rgba(255, 184, 77, .3) inset; }
.flash a { color: inherit; }
.err { color: var(--err); margin: 14px 0 0; font-weight: 600; padding: 12px 14px; border-radius: 12px; background: rgba(255, 107, 138, .1); box-shadow: 0 0 0 1px rgba(255, 107, 138, .28) inset; }
.label { text-transform: uppercase; font-size: .72rem; letter-spacing: .16em; color: var(--muted); margin: 0 0 10px; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ---------- Hero ---------- */
.hero-pill {
  display: inline-flex; align-items: center; gap: 10px; margin: 14px 0 0; padding: 7px 14px 7px 12px;
  border-radius: 999px; font-size: .85rem; font-weight: 600; background: rgba(255, 255, 255, .06); box-shadow: 0 0 0 1px var(--line) inset;
  background: rgba(30, 27, 44, .7);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(77, 255, 176, .7); } 70%, 100% { box-shadow: 0 0 0 10px rgba(77, 255, 176, 0); } }
.hero h1 {
  font-size: clamp(2.8rem, 11vw, 5.4rem); line-height: .92; letter-spacing: -.055em; margin: 20px 0 16px; font-weight: 800;
  text-shadow: 0 10px 60px rgba(106, 92, 255, .35);
}
.hero-sm h1 { font-size: clamp(2.4rem, 9vw, 4.2rem); }
.hero h1 em {
  font-style: normal; background: var(--grad); background-size: 220% auto; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 5s linear infinite; text-shadow: none;
}
@keyframes shine { to { background-position: 220% center; } }
.sub { color: var(--muted); font-size: 1.15rem; margin: 0 0 30px; max-width: 40ch; }

/* ---------- Card ---------- */
.card {
  position: relative; isolation: isolate; background: var(--card); border-radius: var(--radius); padding: 26px; margin-bottom: 18px;
  box-shadow: var(--shadow); background: var(--glass);
}
.card::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, -40%), rgba(255, 255, 255, .06), transparent 45%);
}
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.99); } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.95); } }
.narrow-card, .auth-card { max-width: 520px; margin-left: auto; margin-right: auto; }
.auth-card { margin-top: 24px; }
.center { text-align: center; }
.center-row { justify-content: center; }
.err-code { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 3.4rem; margin: 0; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.prose h1 { font-size: clamp(1.8rem, 6vw, 2.4rem); margin: 0 0 8px; }
.prose h2 { font-size: 1.2rem; margin: 26px 0 8px; }
.prose p, .prose li { color: var(--ink-2); }
.prose a { color: var(--accent); }
.prose ul { padding-left: 1.2em; }
.cards-grid { gap: 18px; }
.cards-grid > .card { margin-bottom: 0; }
.cards-grid + .card, .cards-grid + section, .cards-grid + .cards-grid { margin-top: 18px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.section-head h2, .section-head h3 { margin: 0; }
.danger-zone { box-shadow: 0 0 0 1px rgba(255, 107, 138, .25) inset, var(--shadow); }
.crumbs { color: var(--muted); font-size: .9rem; margin: 4px 0 16px; }
.crumbs a { text-decoration: none; }

/* Bordo a gradiente che ruota attorno al modulo principale */
.form::before, .result::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--angle), transparent 0 55%, var(--accent) 68%, var(--accent-2) 80%, var(--accent-3) 90%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.form:hover::before, .form:focus-within::before { animation: spin 5s linear infinite; }
.result::before { background: var(--grad); animation: none; padding: 2px; }
@keyframes spin { to { --angle: 360deg; } }

/* ---------- Campi ---------- */
label { display: block; font-weight: 600; font-size: .93rem; }
label > small, .form-grid small { display: block; font-weight: 400; color: var(--muted); font-size: .82rem; margin-top: 6px; }
input[type=text], input[type=search], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=url], input:not([type]), select, textarea {
  width: 100%; min-width: 0; font: inherit; font-size: 1rem; font-weight: 400; padding: 13px 15px; border-radius: 13px; margin-top: 7px;
  border: 1.5px solid var(--line); background: var(--field); color: var(--ink); outline: none; text-overflow: ellipsis;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
select { appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23a7a2bf' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }
select option, select optgroup { background: var(--card-solid); color: var(--ink); }
textarea { resize: vertical; min-height: 90px; }
input::placeholder, textarea::placeholder { color: #6c6688; }
input:hover, select:hover, textarea:hover { border-color: var(--line-2); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); background: rgba(0, 0, 0, .5); box-shadow: 0 0 0 4px rgba(255, 225, 77, .14); }
input[type=datetime-local]::-webkit-calendar-picker-indicator, input[type=date]::-webkit-calendar-picker-indicator { filter: invert(1); opacity: .6; }
.form label { margin: 16px 0 0; }
.form label:first-of-type { margin-top: 0; }
.form-grid { display: grid; gap: 16px; }
.form-grid > button, .form-grid > .btn, .form-grid > .btn-ghost, .form-grid > .btn-danger { justify-self: start; margin: 0; }
.form-grid > .btn-block { justify-self: stretch; }
.form-note { color: var(--muted); font-size: .86rem; margin: 12px 0 0; text-align: center; }
.form-note a { color: var(--accent); }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form .grid-2 { margin-top: 16px; }
.form .grid-2 label { margin: 0; }
.alias-row { display: flex; align-items: stretch; margin-top: 7px; }
.alias-row input { margin-top: 0; border-radius: 0 13px 13px 0; flex: 1; }
.prefix {
  display: flex; align-items: center; padding: 0 12px; border: 1.5px solid var(--line); border-right: 0; border-radius: 13px 0 0 13px;
  color: var(--accent); background: rgba(255, 225, 77, .06); font-family: 'JetBrains Mono', monospace; font-size: .8rem; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%;
}
.hp { position: absolute !important; left: -9999px !important; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; flex-shrink: 0; }
.check a { color: var(--accent); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 600; font-size: .93rem; margin-bottom: 8px; padding: 0; }
.radios { display: grid; gap: 8px; }
.radios.inline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.radios.inline legend { width: 100%; }
.radios.inline input[type=password], .radios.inline input[type=date] { flex: 1 1 200px; margin-top: 0; }
.form-inline { display: flex; gap: 8px; flex-wrap: wrap; }
.form-inline input { flex: 1 1 200px; margin-top: 0; }
.form-inline button { margin: 0; }
.input-xs { padding: 6px 9px !important; font-size: .8rem !important; border-radius: 8px !important; margin: 0 !important; width: 110px !important; }

/* interruttore */
.switch { position: relative; display: inline-block; width: 50px; height: 28px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--card-2); box-shadow: 0 0 0 1px var(--line-2) inset; transition: background .2s; cursor: pointer; }
.switch span::before { content: ''; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; border-radius: 50%; background: var(--ink-2); transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), background .2s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::before { transform: translateX(22px); background: var(--accent-ink); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* colori cartella */
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { cursor: pointer; }
.swatch input { position: absolute; opacity: 0; }
.swatch span { display: block; width: 28px; height: 28px; border-radius: 9px; background: var(--c); box-shadow: 0 0 0 2px transparent; transition: transform .2s, box-shadow .2s; }
.swatch input:checked + span { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--c); transform: scale(1.05); }
.swatch input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 3px; }
.fdot { display: inline-block; width: 10px; height: 10px; border-radius: 4px; background: var(--c); box-shadow: 0 0 10px -1px var(--c); flex-shrink: 0; }

/* ---------- Bottoni ---------- */
button, .btn, .btn-ghost, .btn-danger {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; font-size: .98rem; cursor: pointer; text-decoration: none; text-align: center; line-height: 1.2;
  border: 0; border-radius: 13px; padding: 13px 22px; margin-top: 18px; color: var(--accent-ink);
  background: var(--grad); background-size: 200% auto;
  box-shadow: 0 14px 40px -14px rgba(255, 79, 216, .75), 0 0 0 1px rgba(255, 255, 255, .15) inset;
  transition: transform .18s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s, background-position .5s, border-color .2s;
}
button:hover, .btn:hover { transform: translateY(-2px); background-position: 100% center; color: var(--accent-ink); box-shadow: 0 18px 50px -12px rgba(255, 79, 216, .9), 0 0 0 1px rgba(255, 255, 255, .25) inset; }
button:active, .btn:active, .btn-ghost:active, .btn-danger:active { transform: translateY(0) scale(.97); }
button::after, .btn::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .5) 50%, transparent 65%); transform: translateX(-120%); transition: transform .7s ease;
}
button:hover::after, .btn:hover::after { transform: translateX(120%); }
.btn-ghost { background: var(--card); color: var(--ink); box-shadow: 0 0 0 1.5px var(--line) inset; }
.btn-ghost:hover { background: var(--card-2); color: var(--ink); transform: translateY(-1px); box-shadow: 0 0 0 1.5px var(--line-2) inset; }
.btn-ghost::after, .btn-danger::after { display: none; }
.btn-danger { background: rgba(255, 107, 138, .08); color: var(--err); box-shadow: 0 0 0 1.5px rgba(255, 107, 138, .35) inset; }
.btn-danger:hover { background: rgba(255, 107, 138, .16); color: var(--err); transform: translateY(-1px); }
.btn-sm { padding: 9px 15px; font-size: .88rem; border-radius: 11px; margin: 0; }
.btn-xs { padding: 6px 9px; font-size: .78rem; border-radius: 9px; margin: 0; gap: 5px; }
.btn-block { width: 100%; }
.form > button[type=submit] { width: 100%; font-size: 1.1rem; padding: 17px; }
button.done, .btn-ghost.done { background: var(--ok) !important; color: #00160b !important; box-shadow: none !important; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; }
.row-actions > form { display: contents; }
.row-actions button, .row-actions .btn, .row-actions .btn-ghost { margin: 0; }

/* ---------- Risultato ---------- */
.result { overflow: hidden; animation: pop-in .5s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes pop-in { from { transform: scale(.97); } }   /* il riquadro del nuovo link non parte mai invisibile */
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; font-family: 'JetBrains Mono', monospace; font-size: .92rem; margin: 0; }
#short { color: var(--accent); font-weight: 700; font-size: 1.02rem; }
.copy-row button { margin: 0; flex-shrink: 0; background: var(--accent); box-shadow: 0 10px 30px -10px rgba(255, 225, 77, .7); }
.dest { color: var(--muted); margin: 12px 0 0; font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dest a { text-decoration: none; }
.manage { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--line); font-size: .92rem; color: var(--muted); }
.manage strong { color: var(--ink); }
.manage p { margin: 0 0 10px; }
.manage .copy-row button { background: var(--ink); }
.upsell { margin-top: 14px !important; display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.upsell a, .upsell .ic { color: var(--accent); }
.confetti { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; pointer-events: none; z-index: 2; animation: fall 1.8s cubic-bezier(.2, .6, .4, 1) forwards; }
@keyframes fall { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(var(--dx), 340px) rotate(var(--rot)); opacity: 0; } }

/* ---------- Home ---------- */
.recent { margin: 30px 0 0; }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 40px 0 20px; }
.features > div {
  position: relative; padding: 20px; border-radius: 20px; background: var(--card); box-shadow: 0 0 0 1px var(--line) inset;
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), box-shadow .3s;
}
.features > div:hover { transform: translateY(-5px); box-shadow: 0 0 0 1px rgba(255, 225, 77, .4) inset, 0 20px 50px -20px rgba(255, 225, 77, .4); }
.f-ic { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--grad); color: var(--accent-ink); box-shadow: 0 10px 30px -10px rgba(255, 79, 216, .8); }
.features h3 { margin: 14px 0 4px; font-size: 1.05rem; }
.features p { margin: 0; color: var(--muted); font-size: .9rem; }
.premium-teaser { display: flex; align-items: center; gap: 24px; justify-content: space-between; }
.premium-teaser h2 { margin-bottom: 6px; }
.premium-teaser p.muted { margin: 0; }
.premium-teaser .btn { margin: 0; flex-shrink: 0; }

/* ---------- Liste di link ---------- */
.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.link-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 16px;
  border-radius: 16px; background: var(--card); box-shadow: 0 0 0 1px var(--line) inset; transition: box-shadow .2s, background .2s;
}
.compact .link-row, .link-row:not(:has(> input)) { grid-template-columns: minmax(0, 1fr) auto; }
.link-row:hover { background: var(--card-2); box-shadow: 0 0 0 1px var(--line-2) inset; }
.link-row > input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.link-row.is-new { box-shadow: 0 0 0 1.5px var(--accent) inset, 0 0 40px -10px rgba(255, 225, 77, .5); }
.link-row.is-off .link-code { opacity: .55; text-decoration: line-through; }
.link-main { min-width: 0; display: grid; gap: 2px; }
.link-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.link-code { font-weight: 700; color: var(--accent); text-decoration: none; font-size: .95rem; }
.link-code:hover { text-decoration: underline; }
.link-title-sm { font-weight: 600; font-size: .92rem; }
.link-dest { color: var(--muted); font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-meta { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; flex-wrap: wrap; justify-content: flex-end; }
.link-meta .row-actions { margin: 0; gap: 4px; }
.clicks { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.chips .chip { max-width: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; background: var(--card-2); font-size: .78rem; font-weight: 600; color: var(--ink-2); text-decoration: none; white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 700; background: var(--card-2); color: var(--ink-2); white-space: nowrap; }
.b-nowait { background: rgba(255, 225, 77, .14); color: var(--accent); }
.b-disabled { background: rgba(255, 107, 138, .14); color: var(--err); }
.b-paused { background: rgba(127, 178, 255, .14); color: var(--info); }
.b-expired, .b-limit { background: rgba(255, 184, 77, .14); color: var(--warn); }
.link-line .badges { margin: 0; }

/* ---------- Dashboard ---------- */
.dash { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 22px; align-items: start; }
.sidebar { position: sticky; top: 16px; display: grid; gap: 2px; padding: 10px; border-radius: 20px; background: var(--glass); box-shadow: 0 0 0 1px var(--line) inset; }
.side-link { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 11px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .93rem; }
.side-link > span:last-child { margin-left: auto; color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.side-link:hover { background: var(--card-2); color: var(--ink); }
.side-link.on { background: rgba(255, 225, 77, .12); color: var(--accent); box-shadow: 0 0 0 1px rgba(255, 225, 77, .25) inset; }
.side-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-head { margin: 12px 11px 4px; font-size: .7rem; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); font-weight: 700; }
.side-add { color: var(--muted); }
.side-foot { display: grid; gap: 2px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.side-foot a { display: flex; align-items: center; gap: 8px; padding: 7px 11px; font-size: .85rem; color: var(--muted); text-decoration: none; border-radius: 10px; }
.side-foot a:hover { background: var(--card-2); color: var(--ink); }
.stat-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 18px; }
.stat-tiles.tiles-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.stat-tiles > div { background: var(--card); border-radius: 18px; padding: 16px 14px; box-shadow: 0 0 0 1px var(--line) inset; }
.stat-tiles strong { display: flex; align-items: center; gap: 6px; font-size: clamp(1.25rem, 3vw, 1.7rem); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat-tiles span { color: var(--muted); font-size: .8rem; }
.stat-tiles span a { color: var(--accent); }
.tile-prem { background: linear-gradient(135deg, rgba(255, 225, 77, .16), rgba(255, 79, 216, .12)) !important; }
.tile-prem strong { color: var(--accent); }
.tile-alert { background: rgba(255, 107, 138, .1) !important; box-shadow: 0 0 0 1px rgba(255, 107, 138, .35) inset !important; }
.tile-alert strong { color: var(--err); }
.card.new-link { padding: 0; }
.new-link > summary { list-style: none; cursor: pointer; padding: 14px 18px; display: flex; align-items: center; gap: 14px; }
.new-link > summary .muted { font-size: .88rem; }
.new-link[open] > summary .muted { display: none; }
.new-link > summary::-webkit-details-marker { display: none; }
.new-link > summary .btn { margin: 0; pointer-events: none; }
.new-link[open] > summary { padding-bottom: 6px; }
.new-link > form, .new-link > .flash { margin: 0 20px 20px; }
.new-link > .flash { margin-top: 10px; }
.list-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 12px; }
.list-head h1 { margin: 0; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.list-head .filters { margin: 0; }
.filters select, .filters input { margin: 0; padding: 9px 36px 9px 12px; font-size: .88rem; border-radius: 11px; width: auto; }
.filters .search-box input { padding-left: 36px; }
.filters button { margin: 0; }
.filters-wide .search-box { flex: 1 1 260px; }
.search-box { position: relative; display: flex; align-items: center; flex: 1 1 200px; font-weight: 400; }
.search-box .ic { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.search-box input { width: 100%; }
.bulk-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px 8px 16px; margin-bottom: 8px; border-radius: 14px; background: var(--card); box-shadow: 0 0 0 1px var(--line) inset; }
.bulk-bar select { width: auto; margin: 0; padding: 7px 34px 7px 11px; font-size: .86rem; border-radius: 10px; }
.bulk-bar .check { font-size: .88rem; margin-right: auto; }
#bulk.has-selection .bulk-bar { box-shadow: 0 0 0 1.5px var(--accent) inset; position: sticky; top: 8px; z-index: 5; background: rgba(20, 18, 31, .92); }
.empty { text-align: center; color: var(--muted); }
.empty a { color: var(--accent); }
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 20px 0; color: var(--muted); font-size: .9rem; }
.pager a { color: var(--accent); text-decoration: none; font-weight: 700; padding: 8px 12px; border-radius: 10px; background: var(--card); box-shadow: 0 0 0 1px var(--line) inset; }

/* ---------- Pagina link ---------- */
.link-hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.link-hero > div:first-child { flex: 1 1 360px; min-width: 0; }
.link-hero .row-actions { margin: 0; }
.link-title { font-size: clamp(1.15rem, 4.6vw, 1.9rem); line-height: 1.25; margin: 0; letter-spacing: -.02em; background: linear-gradient(90deg, var(--ink), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.link-sub { margin: 6px 0 0; font-weight: 600; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--field); box-shadow: 0 0 0 1px var(--line) inset; }
.seg a { padding: 6px 12px; border-radius: 9px; text-decoration: none; font-size: .85rem; font-weight: 700; color: var(--muted); }
.seg a.on { background: var(--accent); color: var(--accent-ink); }
.seg-lg { margin-bottom: 16px; }
.seg-lg a { padding: 8px 16px; font-size: .92rem; }

/* grafico a barre (HTML puro) */
.chart { margin: 0; }
.chart-plot { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; height: 190px; }
.chart-y { display: flex; flex-direction: column; justify-content: space-between; font-size: .72rem; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; padding: 0 0 0; }
.chart-y span { transform: translateY(-50%); }
.chart-y span:last-child { transform: translateY(50%); }
.chart-bars {
  display: flex; align-items: flex-end; gap: 2px; height: 100%; position: relative;
  background: linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 50%; border-bottom: 1px solid var(--line-2);
}
.chart-col { flex: 1 1 0; height: 100%; display: flex; align-items: flex-end; cursor: crosshair; border-radius: 4px 4px 0 0; }
.chart-col span { display: block; width: 100%; min-height: 2px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--accent), #ff9d4d); transition: filter .15s, transform .15s; transform-origin: bottom; animation: grow .7s cubic-bezier(.2, .8, .2, 1) both; }
.chart-col span.zero { background: var(--line); min-height: 2px; height: 2px !important; }
.chart-col:hover span, .chart-col.hover span { filter: brightness(1.2) drop-shadow(0 0 10px rgba(255, 225, 77, .6)); }
.chart-col:hover, .chart-col.hover { background: rgba(255, 255, 255, .04); }
@keyframes grow { from { transform: scaleY(0); } }
.chart-x { display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); margin: 6px 0 0 34px; }
.chart-empty { text-align: center; color: var(--muted); font-size: .9rem; margin: 10px 0 0; }
.chart-table { margin-top: 10px; font-size: .85rem; }
.chart-table summary { cursor: pointer; color: var(--muted); font-size: .82rem; }
.chart-table table { margin-top: 8px; max-height: 260px; display: block; overflow: auto; }
.tip { position: absolute; z-index: 60; pointer-events: none; padding: 6px 10px; border-radius: 9px; font-size: .8rem; font-weight: 600; white-space: nowrap;
  background: rgba(10, 9, 16, .95); color: var(--ink); box-shadow: 0 10px 30px -6px rgba(0,0,0,.8), 0 0 0 1px var(--line-2) inset; }

/* classifiche orizzontali */
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hbar-top { display: flex; justify-content: space-between; gap: 10px; font-size: .88rem; margin-bottom: 5px; }
.hbar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.hbar-n { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hbar-n small { color: var(--muted); font-weight: 500; margin-left: 4px; }
.hbar-track { height: 6px; border-radius: 6px; background: var(--card-2); overflow: hidden; }
.hbar-track span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent-3), var(--accent-2)); animation: grow-x .8s cubic-bezier(.2, .8, .2, 1) both; transform-origin: left; }
@keyframes grow-x { from { transform: scaleX(0); } }

/* ---------- Pagina d'attesa e anteprima ---------- */
.wait { padding: 50px 24px 30px; margin-top: 26px; }
.host { font-size: clamp(1.5rem, 7vw, 2.6rem); margin: 0; letter-spacing: -.03em; line-height: 1.15; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wait-title { font-weight: 600; margin: 8px 0 0; }
.ring {
  --size: 132px; width: var(--size); height: var(--size); margin: 0 auto 30px; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: conic-gradient(from -90deg, var(--accent), var(--accent-2) calc(var(--p) * .6), var(--accent-3) var(--p), rgba(255, 255, 255, .07) 0);
  animation: fill var(--t) linear forwards;
}
.ring::before { content: ''; position: absolute; inset: 9px; border-radius: 50%; background: radial-gradient(circle at 50% 30%, #1f1b30, var(--card-solid)); }
.ring::after { content: ''; position: absolute; inset: -14px; border-radius: 50%; z-index: -1; background: conic-gradient(from 0deg, var(--accent), var(--accent-2), var(--accent-3), var(--accent)); filter: blur(22px); opacity: .5; animation: spin-r 3s linear infinite; }
@keyframes spin-r { to { transform: rotate(360deg); } }
.ring span { position: relative; font-weight: 800; font-size: 2.8rem; font-family: 'JetBrains Mono', monospace; animation: tick 1s ease-out infinite; }
@keyframes fill { to { --p: 100%; } }
@keyframes tick { 0% { transform: scale(1.18); } 30% { transform: scale(1); } }
.wait .btn { margin-top: 18px; }
.wait-promo {
  display: flex; align-items: center; justify-content: center; gap: 10px; margin: 26px auto 0; max-width: 460px; padding: 12px 16px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 225, 77, .1), rgba(255, 79, 216, .08)); box-shadow: 0 0 0 1px rgba(255, 225, 77, .25) inset;
  text-decoration: none; font-size: .88rem; color: var(--ink-2); text-align: left;
}
.wait-promo .ic { color: var(--accent); }
.wait-promo strong { color: var(--accent); }
.wait-promo:hover { color: var(--ink); box-shadow: 0 0 0 1px rgba(255, 225, 77, .5) inset; }
.wait .opt { margin-top: 22px; font-size: .84rem; }
.wait .opt a { color: var(--accent); }
.lock-ic { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 22px; margin-bottom: 14px; background: var(--grad); color: var(--accent-ink); box-shadow: 0 16px 40px -12px rgba(255, 79, 216, .8); }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 18px; margin: 18px 0; font-size: .93rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.url-full { font-family: 'JetBrains Mono', monospace; font-size: .85rem; color: var(--ink-2); word-break: break-all; }

/* ---------- Finestra QR ---------- */
.dialog { border: 0; padding: 26px; border-radius: 24px; background: rgba(20, 18, 31, .97); color: var(--ink); width: min(380px, calc(100% - 32px)); text-align: center;
  box-shadow: 0 40px 120px -20px rgba(0,0,0,.9), 0 0 0 1px var(--line-2) inset; animation: pop .3s cubic-bezier(.2, .8, .2, 1); }
.dialog::backdrop { background: rgba(5, 4, 10, .7); backdrop-filter: blur(4px); }
.dialog-close { position: absolute; top: 12px; right: 12px; }
.dialog-close button { margin: 0; padding: 6px 10px; background: var(--card-2); color: var(--ink); box-shadow: none; border-radius: 10px; font-size: .9rem; }
.dialog-close button::after { display: none; }
.qr-url { font-size: .85rem; color: var(--accent); margin: 0 0 14px; }
.qr-box { background: #fff; border-radius: 16px; padding: 10px; display: grid; place-items: center; }
.qr-box svg { width: 100%; height: auto; max-width: 280px; }
#qr-box { background: transparent; padding: 0; }
#qr-box svg { max-width: 300px; filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .45)); }
.qr-sample svg { filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .4)); }

/* ---------- Accesso e account ---------- */
.code-input { font-family: 'JetBrains Mono', monospace; font-size: 1.4rem !important; letter-spacing: .25em; text-align: center; }
.totp-setup { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 22px; align-items: start; }
.qr-inline { width: 200px; aspect-ratio: 1; }
.qr-inline svg { width: 100%; height: auto; }
.secret-key { display: inline-block; color: var(--accent); background: var(--field); padding: 2px 8px; border-radius: 8px; margin-top: 4px; word-break: break-all; }
@media (max-width: 600px) { .totp-setup { grid-template-columns: 1fr; } .qr-inline { margin: 0 auto; } }
.perks { list-style: none; padding: 0; margin: 4px 0 20px; display: grid; gap: 8px; color: var(--ink-2); font-size: .93rem; }
.perks li { display: flex; align-items: center; gap: 10px; }
.perks .ic { color: var(--accent); }
.auth-alt { color: var(--muted); font-size: .88rem; margin: 18px 0 0; text-align: center; line-height: 1.7; }
.auth-alt a { color: var(--accent); }
.recovery-key { font-size: clamp(1rem, 4.4vw, 1.35rem); font-weight: 700; letter-spacing: .06em; padding: 18px; border-radius: 16px; margin: 20px 0 6px;
  background: var(--field); box-shadow: 0 0 0 1.5px rgba(255, 225, 77, .4) inset; color: var(--accent); user-select: all; }
.recovery-inline { color: var(--ink); font-weight: 700; letter-spacing: .05em; }
.profile { display: flex; align-items: center; gap: 18px; }
.profile h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile p { margin: 0; }
.role { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; vertical-align: middle; white-space: nowrap; }
.role-user { background: var(--card-2); color: var(--ink-2); }
.role-helper { background: rgba(45, 225, 255, .14); color: var(--accent-4); }
.role-moderator { background: rgba(127, 178, 255, .16); color: var(--info); }
.role-admin { background: rgba(255, 79, 216, .16); color: var(--accent-2); }
.role-owner { background: var(--grad); color: var(--accent-ink); }

/* ---------- Livelli ---------- */
.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.compare .card { margin: 0; }
.plan .price { font-size: 2.2rem; font-weight: 800; letter-spacing: -.04em; margin: 0 0 14px; }
.plan .price small { font-size: .9rem; color: var(--muted); font-weight: 500; letter-spacing: 0; margin-left: 6px; }
.plan-hot { box-shadow: 0 0 0 1.5px rgba(255, 225, 77, .45) inset, 0 30px 80px -30px rgba(255, 79, 216, .6); background: linear-gradient(160deg, rgba(255, 225, 77, .08), rgba(255, 79, 216, .06)); }
.ticks { list-style: none; padding: 0; margin: 0 0 6px; display: grid; gap: 10px; }
.ticks li { padding-left: 28px; position: relative; color: var(--ink-2); }
.ticks li::before { content: '✓'; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: .75rem; font-weight: 800; background: rgba(77, 255, 176, .15); color: var(--ok); }
.ticks li.no { color: var(--muted); }
.ticks li.no::before { content: '–'; background: var(--card-2); color: var(--muted); }
.steps { padding-left: 1.3em; display: grid; gap: 10px; color: var(--ink-2); }
.steps a { color: var(--accent); }
.donate-box { position: relative; overflow: hidden; background: var(--grad); background-size: 200% 200%; color: var(--accent-ink); border-radius: 22px; padding: 26px; margin-bottom: 18px;
  box-shadow: 0 24px 70px -24px rgba(255, 79, 216, .85); animation: drift-bg 8s ease-in-out infinite alternate; }
@keyframes drift-bg { to { background-position: 100% 100%; } }
.donate-box::after { content: '⚡'; position: absolute; right: -10px; top: -26px; font-size: 140px; opacity: .14; transform: rotate(14deg); pointer-events: none; }
.donate-box h2 { margin: 0 0 6px; font-size: 1.6rem; }
.donate-box p { margin: 0; position: relative; }
.donate-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; position: relative; z-index: 1; }
.donate-actions .btn { margin: 0; background: var(--accent-ink); color: var(--accent); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .7); }
.donate-actions .btn.alt { background: rgba(255, 255, 255, .28); color: var(--accent-ink); box-shadow: 0 0 0 1.5px rgba(18, 15, 0, .35) inset; }
.donate-box .opt { color: var(--accent-ink); opacity: .85; margin-top: 14px; font-size: .88rem; }

/* ---------- Cartelle ---------- */
.folder-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.folder-card { margin: 0; padding: 20px; }
.folder-form { display: grid; gap: 14px; }
.folder-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.folder-top input { flex: 1 1 160px; margin: 0; font-weight: 700; }
.folder-top a { color: var(--muted); text-decoration: none; width: 100%; }
.folder-form .row-actions { margin: 0; }

/* ---------- Admin ---------- */
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin: 6px 0 14px; }
.admin-head h1 { margin: 0; display: flex; align-items: center; gap: 10px; }
.admin-head p { margin: 0; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; padding: 4px; margin-bottom: 18px; border-radius: 16px; background: var(--card); box-shadow: 0 0 0 1px var(--line) inset; }
.tabs a { padding: 9px 14px; border-radius: 12px; text-decoration: none; font-weight: 700; font-size: .9rem; color: var(--muted); }
.tabs a:hover { color: var(--ink); background: var(--card-2); }
.tabs a.on { background: var(--accent); color: var(--accent-ink); }
.table-wrap { overflow-x: auto; padding: 0; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th { color: var(--muted); font-weight: 700; text-transform: uppercase; font-size: .7rem; letter-spacing: .12em; text-align: left; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255, 255, 255, .025); }
td a { text-decoration: none; }
td a:not(.btn):not(.btn-ghost) { color: var(--accent); }
.row-off td { opacity: .55; }
.url-cell { max-width: 320px; color: var(--muted); font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wrap-cell { max-width: 380px; }
.mod-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.mod-actions input { flex: 1 1 220px; margin: 0; padding: 9px 12px; font-size: .88rem; border-radius: 11px; }
.mod-actions.compact { margin: 0; gap: 5px; flex-wrap: nowrap; }
.mod-actions.compact input { flex: none; }
.report-card .report-top { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.report-card h2 { margin: 0 0 4px; }
.report-card h2 a { color: var(--accent); text-decoration: none; }
.report-card .url-full { margin: 0 0 6px; }
.report-card p { margin: 0 0 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }
.chip-phishing, .chip-malware, .chip-scam, .chip-illegal { background: rgba(255, 107, 138, .14); color: var(--err); }
.report-notes { margin: 12px 0 0; padding: 12px 16px; border-radius: 14px; background: var(--field); list-style: none; display: grid; gap: 6px; font-size: .9rem; color: var(--ink-2); }
.mini-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.mini-list li { display: flex; align-items: center; gap: 8px; font-size: .9rem; min-width: 0; }
.mini-list li > .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.mini-list a { color: var(--accent); text-decoration: none; }
.pill-n, .mini-list .small { margin-left: auto; flex-shrink: 0; }
.pill-n { background: var(--card-2); border-radius: 999px; padding: 1px 9px; font-weight: 700; font-size: .78rem; font-variant-numeric: tabular-nums; }
.roles-legend { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.roles-legend li { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.user-cell { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink) !important; }
.role-pick { display: grid; gap: 8px; }
.role-opt { padding: 10px 12px; border-radius: 12px; background: var(--field); box-shadow: 0 0 0 1px var(--line) inset; flex-wrap: wrap; }
.role-opt small { width: 100%; margin: 2px 0 0 28px !important; }
.role-opt:has(input:checked) { box-shadow: 0 0 0 1.5px var(--accent) inset; }
.audit-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .88rem; }
.audit-list .when { color: var(--muted); margin-right: 6px; }
code { font-family: 'JetBrains Mono', monospace; font-size: .82em; background: var(--card-2); padding: 1px 6px; border-radius: 6px; }
.kvp { display: inline-block; margin-right: 8px; }
.settings-form { display: grid; gap: 0; }
.setting-row { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 20px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.setting-row small { display: block; color: var(--muted); font-size: .84rem; margin-top: 2px; }
.setting-row input { margin: 0; }
.setting-row > div:last-child { display: flex; justify-content: flex-end; }
.settings-form > .btn, .settings-form > button { justify-self: start; }
.checklist { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 8px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--field); }
.checklist li > span { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-weight: 800; font-size: .8rem; flex-shrink: 0; }
.checklist li.ok > span { background: rgba(77, 255, 176, .15); color: var(--ok); }
.checklist li.bad > span { background: rgba(255, 107, 138, .18); color: var(--err); }
.checklist li.warn > span { background: rgba(255, 184, 77, .18); color: var(--warn); }
.checklist small { display: block; color: var(--muted); font-size: .82rem; }
.step { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.api-docs pre { background: var(--field); border-radius: 14px; padding: 14px 16px; overflow-x: auto; box-shadow: 0 0 0 1px var(--line) inset; }
.api-docs pre code { background: none; padding: 0; font-size: .82rem; color: var(--ink-2); white-space: pre; }
pre.debug { text-align: left; white-space: pre-wrap; font-size: .8rem; background: var(--field); padding: 12px; border-radius: 12px; color: var(--err); }

/* ---------- Footer ---------- */
.foot { text-align: center; color: var(--muted); font-size: .85rem; padding: 28px 16px calc(28px + env(safe-area-inset-bottom)); }
.foot nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 8px; }
.foot a { text-decoration: none; transition: color .2s; }
.foot p { margin: 0; opacity: .7; }

/* ---------- Tablet ---------- */
@media (max-width: 960px) {
  .dash { grid-template-columns: minmax(0, 1fr); }
  .dash > * { min-width: 0; }
  .sidebar { position: static; display: flex; overflow-x: auto; gap: 6px; padding: 8px; scrollbar-width: none; }
  .sidebar::-webkit-scrollbar { display: none; }
  .side-link { flex-shrink: 0; white-space: nowrap; padding: 8px 12px; }
  .side-head, .side-foot { display: none; }
  .stat-tiles.tiles-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Telefono ---------- */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .top { padding: calc(14px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 14px max(16px, env(safe-area-inset-left, 0px)); }
  .brand { font-size: 1.2rem; }
  .bolt { width: 34px; height: 34px; margin-right: 8px; }
  .nav-link { padding: 8px 8px; font-size: .9rem; }
  .nav > a.nav-link[href="/levels/"] { display: none; }
  .menu-name { display: none; }
  .nav { gap: 2px; }
  .nav-link .nl-admin { display: none; }
  .menu summary .star { display: none; }
  .menu summary { padding: 3px; }
  .card { padding: 20px; border-radius: 20px; }
  .card.new-link { padding: 0; }
  .new-link > summary .muted { display: none; }
  .prefix { display: none; }
  .alias-row input { border-radius: 13px; }
  .copy-row { flex-direction: column; }
  .features { grid-template-columns: 1fr; gap: 10px; }
  .features > div { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; align-items: center; padding: 16px; }
  .features > div .f-ic { grid-row: span 2; }
  .features h3 { margin: 0; }
  .premium-teaser { flex-direction: column; align-items: stretch; }
  .grid-2, .grid-3, .grid-4, .compare, .folder-list { grid-template-columns: 1fr; }
  .stat-tiles, .stat-tiles.tiles-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat-tiles > div { padding: 13px 12px; }
  .link-row { grid-template-columns: auto minmax(0, 1fr); padding: 12px 14px; gap: 10px 12px; }
  .compact .link-row, .link-row:not(:has(> input)) { grid-template-columns: minmax(0, 1fr); }
  .link-meta { grid-column: 1 / -1; justify-content: flex-start; gap: 10px; }
  .link-row > input + .link-main + .link-meta { grid-column: 2; }
  .link-meta .row-actions { margin-left: auto; }
  .list-head .filters { width: 100%; }
  .filters select { flex: 1 1 auto; }
  .chart-plot { height: 150px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 10px; }
  .profile { flex-direction: column; align-items: flex-start; }
  .setting-row { grid-template-columns: 1fr; gap: 8px; }
  .setting-row > div:last-child { justify-content: flex-start; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tabs a { white-space: nowrap; }
  .donate-actions .btn { flex: 1 1 100%; }
  .mod-actions .btn-sm, .mod-actions .btn-ghost { flex: 1 1 auto; }
  th, td { padding: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
  .ring { animation: fill var(--t) linear forwards !important; }
}

/* ---------- Titoli di sezione e domande frequenti ---------- */
.section-title { font-size: clamp(1.3rem, 4vw, 1.7rem); margin: 44px 0 0; }
.section-title + .features { margin-top: 16px; }
.faq { margin: 40px 0 10px; }
.faq h2 { margin-bottom: 14px; }
.faq-item { background: var(--card); border-radius: 16px; box-shadow: 0 0 0 1px var(--line) inset; margin-bottom: 8px; transition: background .2s; }
.faq-item[open] { background: var(--card-2); }
.faq-item summary { cursor: pointer; list-style: none; padding: 16px 48px 16px 18px; font-weight: 700; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; font-weight: 400; color: var(--accent); transition: transform .25s; }
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item p { margin: 0; padding: 0 18px 16px; color: var(--ink-2); }

/* ---------------------------------------------------------------- webhook Discord (admin) */

.wh-off { opacity: .72; }
.wh-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.wh-title { min-width: 0; }
.wh-title h2 { margin: 0 0 4px; overflow-wrap: anywhere; }
.wh-title p { margin: 0; overflow-wrap: anywhere; }
.b-on { background: rgba(77, 255, 176, .12); color: var(--ok); }
.kv-tight { margin: 12px 0 0; gap: 6px 16px; }
.kv-tight dd { overflow-wrap: anywhere; }
.err-text { color: var(--err); }
.wh-edit, .wh-help { margin-top: 14px; }
.wh-edit > summary, .wh-help > summary { cursor: pointer; color: var(--accent); font-weight: 700; font-size: .9rem; display: inline-flex; align-items: center; gap: 6px; }
.wh-edit[open] > summary, .wh-help[open] > summary { margin-bottom: 12px; }
.wh-help { margin-bottom: 18px; }
.wh-queue p { margin: 0; }
.wh-queue .row-actions { margin-top: 12px; }
.ev-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px 22px; }
.ev-groups legend { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; flex-wrap: wrap; }
.ev-all { font-weight: 600; font-size: .86rem; color: var(--muted); }
.ev-group { display: grid; gap: 8px; align-content: start; padding: 14px; border-radius: 14px; background: var(--card-2); }
.ev-group .label { margin-bottom: 2px; }
.ev-group .check { font-size: .9rem; align-items: flex-start; }
.ev-group .check span { min-width: 0; }

/* ---------------------------------------------------------------- pagina di supporto */
.support-hero { text-align: center; }
.support-hero h1 { margin: 6px 0 8px; }
.support-hero .sub { margin-left: auto; margin-right: auto; }
.support-grid > .card { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.support-grid h2 { margin: 0; display: flex; align-items: center; gap: 8px; }
.support-grid p { margin: 0; color: var(--ink-2); }
.support-grid a { overflow-wrap: anywhere; max-width: 100%; }
.support-grid .btn, .support-grid .btn-ghost { margin-top: auto; align-self: flex-start; white-space: nowrap; }
.discord-card { box-shadow: 0 0 0 1px rgba(106, 92, 255, .45) inset, 0 18px 50px -20px rgba(106, 92, 255, .55); }
.btn-discord { background: #5865F2; color: #fff; box-shadow: 0 14px 40px -14px rgba(88, 101, 242, .85), 0 0 0 1px rgba(255, 255, 255, .15) inset; }
.btn-discord:hover { background: #4752c4; color: #fff; box-shadow: 0 18px 50px -12px rgba(88, 101, 242, .95), 0 0 0 1px rgba(255, 255, 255, .25) inset; }

/* ======================================================================
   Livelli dei sostenitori: badge, vantaggi, piani, muro, colori dei QR
   ====================================================================== */
.b-tier { letter-spacing: .02em; }
.b-tier1 { background: rgba(255, 225, 77, .14); color: var(--accent); }
.b-tier2 { background: linear-gradient(110deg, rgba(255, 225, 77, .18), rgba(255, 157, 77, .2)); color: #ffc46b; }
.b-tier3 { background: linear-gradient(110deg, #ff4fd8, #6a5cff); color: #fff; box-shadow: 0 6px 18px -8px rgba(255, 79, 216, .8); }
.menu summary .star { display: inline-flex; gap: 0; }
.perks { list-style: none; padding: 0; margin: 12px 0 4px; display: grid; gap: 7px; font-size: .92rem; }
.perks li { display: flex; align-items: center; gap: 8px; }
.perks li.ok .ic { color: var(--ok); }
.perks li.no { color: var(--muted); }
.locked { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: var(--card-2); color: var(--ink-2); margin: 8px 0 0; }
.locked a { color: var(--accent); }
.wall-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 14px; background: var(--card); margin-top: 12px; }

.compare-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.plan-tier .label { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.plan-t1 .label { color: var(--accent); }
.plan-t2 .label { color: #ffc46b; }
.plan-mine { outline: 2px solid var(--ok); outline-offset: -2px; }
.plan .btn-block { margin-top: 14px; }

.wall .wall-tier { padding: 14px 0; border-top: 1px solid var(--line); }
.wall .wall-tier:first-of-type { border-top: 0; }
.wall-head { margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.wall-names { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.wall-names li { padding: 6px 12px; border-radius: 999px; background: var(--card-2); font-weight: 600; font-size: .92rem; }
.wall-t3 .wall-names li { font-size: 1.05rem; padding: 8px 14px; background: linear-gradient(110deg, rgba(255, 225, 77, .16), rgba(255, 79, 216, .16)); box-shadow: 0 0 0 1px rgba(255, 225, 77, .3) inset; }
.wall-t2 .wall-names li { background: rgba(255, 196, 107, .12); }

.qr-colors { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; align-items: start; }
.qr-sample { width: 150px; background: transparent; padding: 0; aspect-ratio: auto; }
input[type=color] { width: 100%; height: 44px; padding: 4px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--field); cursor: pointer; }

/* ======================================================================
   Pagina personalizzata dei sostenitori (al posto della pagina d'attesa)
   ====================================================================== */
.cpage { max-width: 560px; margin: 26px auto 0; padding: 40px 28px 26px; border-radius: var(--radius); text-align: center;
  background: var(--card); box-shadow: var(--shadow), 0 0 0 1.5px color-mix(in srgb, var(--accent) 45%, transparent) inset; }
.cpage-emoji { font-size: 3.2rem; line-height: 1; margin-bottom: 12px; }
.cpage-title { font-size: clamp(1.7rem, 5vw, 2.3rem); line-height: 1.1; letter-spacing: -.03em; margin: 0 0 12px; overflow-wrap: anywhere; }
.cpage-msg { color: var(--ink-2); margin: 0 0 12px; overflow-wrap: anywhere; }
.cpage-dest { margin: 20px 0 18px; padding: 14px 16px; border-radius: 16px; background: var(--card-2); display: grid; gap: 3px; text-align: left; }
.cpage-dest strong { font-size: 1.05rem; overflow-wrap: anywhere; }
.cpage-dtitle { color: var(--ink-2); font-size: .92rem; }
.cpage-dest .dest { color: var(--muted); overflow-wrap: anywhere; }
.cpage-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 28px; border-radius: 16px;
  background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 1.05rem; text-decoration: none; width: 100%; max-width: 360px;
  box-shadow: 0 14px 34px -14px var(--accent); transition: transform .15s ease; }
.cpage-btn:hover { color: var(--on-accent); transform: translateY(-1px); }
.cpage-auto { color: var(--muted); margin: 12px 0 0; }
.cpage-by { margin: 18px 0 0; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.cpage-foot { margin-top: 14px; font-size: .82rem; }
.cpage-foot a { color: var(--accent); }
/* tema chiaro */
body.cpage-body-light { background: #f6f5fb; color: #17151f; }
body.cpage-body-light::before { display: none; }
body.cpage-body-light .brand, body.cpage-body-light .foot, body.cpage-body-light .foot a { color: #3b3850; }
.cpage-light { background: #fff; color: #17151f; box-shadow: 0 30px 70px -40px rgba(30, 20, 60, .45), 0 0 0 1.5px color-mix(in srgb, var(--accent) 55%, transparent) inset; }
.cpage-light .cpage-msg, .cpage-light .cpage-dtitle { color: #3b3850; }
.cpage-light .cpage-dest { background: #f1eff8; }
.cpage-light .cpage-dest .dest, .cpage-light .cpage-auto, .cpage-light .cpage-by, .cpage-light .opt, .cpage-light .label { color: #6b6782; }
.cpage-light .cpage-foot a { color: #5b4bd6; }
body.is-preview .top, body.is-preview .foot { display: none; }
body.is-preview .cpage { margin-top: 12px; }
/* editor */
.cpage-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.cpage-editor > .card { margin: 0; }
.cpage-editor textarea { min-height: 120px; }
.cpage-preview { position: sticky; top: 16px; }
.cpage-preview iframe { width: 100%; height: 640px; border: 0; border-radius: var(--radius); background: var(--bg-2); box-shadow: var(--shadow); }
.cpage-staff { padding: 12px 14px; border-radius: 14px; background: var(--card); margin: 8px 0 12px; overflow-wrap: anywhere; }
.cpage-staff p { margin: 0 0 6px; }

@media (max-width: 960px) {
  .compare-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cpage-editor { grid-template-columns: minmax(0, 1fr); }
  .cpage-preview { position: static; }
}
@media (max-width: 600px) {
  .compare-4, .qr-colors { grid-template-columns: 1fr; }
  .qr-sample { margin: 0 auto; }
  .cpage { padding: 30px 18px 20px; }
  .cpage-preview iframe { height: 560px; }
}

/* ======================================================================
   Moderazione degli utenti
   ====================================================================== */
.b-warn { background: rgba(255, 184, 77, .16); color: var(--warn); }
.mod-notice { border-radius: 18px; padding: 16px 18px; margin-bottom: 16px; background: rgba(255, 184, 77, .09); box-shadow: 0 0 0 1.5px rgba(255, 184, 77, .45) inset; }
.mod-notice-title { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-weight: 800; color: var(--warn); }
.mod-notice-reason { margin: 0 0 6px; font-size: 1.02rem; overflow-wrap: anywhere; }
.mod-notice form { margin-top: 10px; }
.warn-list, .note-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.warn-list li, .note-list li { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--card); overflow-wrap: anywhere; }
.warn-list li.off { opacity: .55; }
.warn-list li .badge { margin-left: 6px; }
.note-list li { display: block; }
.note-list li p { margin: 0 0 4px; }
.note-list li form { margin-top: 4px; }
.force-wait { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.bulk-users { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px; margin-bottom: 12px; }
.bulk-users select, .bulk-users input[name=bulk_reason] { width: auto; margin: 0; padding: 7px 34px 7px 11px; font-size: .86rem; border-radius: 10px; }
.bulk-users input[name=bulk_reason] { padding-right: 11px; min-width: 180px; flex: 1; }
th.cb, td.cb { width: 34px; padding-right: 0; }
@media (max-width: 600px) { .bulk-users > * { flex: 1 1 100%; } .bulk-users select, .bulk-users input[name=bulk_reason] { width: 100%; } }
.warn-list li form, .warn-list li .btn-xs { flex-shrink: 0; white-space: nowrap; }
#qr-dialog .qr-url { display: none; }   /* l'indirizzo è già sotto il QR, dentro la cartolina */

/* ---------- Livelli: avanzamento, impostazioni, pagina "redirect sospesi" ---------- */
.level-me-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; flex-wrap: wrap; margin-bottom: 10px; }
.level-big { font-size: 1.3rem; margin: 4px 0 6px; }
.level-big .badge { font-size: 1rem; padding: 6px 12px; }
.level-me-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.level-me-stats > div { background: var(--card-2); border-radius: 14px; padding: 10px 14px; min-width: 110px; }
.level-me-stats strong { display: block; font-size: 1.25rem; }
.level-me-stats span { color: var(--muted); font-size: .8rem; }
.progress-list { display: grid; gap: 12px; margin: 10px 0 16px; }
.progress-top { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; margin-bottom: 6px; }
.progress { height: 10px; border-radius: 999px; background: var(--card-2); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--grad); background-size: 200% 100%; transition: width .4s ease; }
.progress-row.done .progress > span { background: var(--ok); }
.progress-row.done .progress-top span:first-child::after { content: ' ✓'; color: var(--ok); }
.plan .ticks.reqs { margin-bottom: 14px; }
.plan .ticks.reqs li { color: var(--ink); }
.plan p.label.small { margin: 6px 0 8px; font-size: .72rem; }
.setting-head { padding: 22px 0 6px; border-bottom: 1px solid var(--line); }
.setting-head:first-of-type { padding-top: 0; }
.setting-head h2 { margin: 0; }
.setting-head small { display: block; color: var(--muted); margin-top: 4px; }
.setting-alert { background: rgba(255, 107, 138, .08); border-radius: 12px; padding-left: 10px; padding-right: 10px; }
.invite-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.invite-list li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.paused-page .lock-ic { color: var(--accent); }
@media (max-width: 600px) {
  .level-me-stats > div { min-width: 0; flex: 1 1 30%; }
}

/* ---------- Toast (in alto a destra) ---------- */
.toasts { position: fixed; z-index: 2000; top: calc(14px + env(safe-area-inset-top, 0px)); right: max(14px, env(safe-area-inset-right, 0px));
  width: min(380px, calc(100vw - 28px)); display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 12px; padding: 14px 14px 14px 16px; border-radius: 16px;
  background: rgba(20, 18, 31, .97); color: var(--ink);
  box-shadow: 0 0 0 1px var(--line-2) inset, 0 24px 60px -18px rgba(0, 0, 0, .9); position: relative; overflow: hidden;
  animation: toast-in .45s cubic-bezier(.34, 1.56, .64, 1) both; }
.toast::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--tc); }
.toast-ok { --tc: var(--ok); } .toast-err { --tc: var(--err); } .toast-info { --tc: var(--info); } .toast-warn { --tc: var(--warn); }
.toast-ic { flex-shrink: 0; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; color: var(--tc);
  background: color-mix(in srgb, var(--tc) 14%, transparent); }
.toast-msg { margin: 4px 0 0; flex: 1; font-size: .92rem; font-weight: 600; line-height: 1.4; min-width: 0; overflow-wrap: anywhere; }
.toast-x { all: unset; flex-shrink: 0; cursor: pointer; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; color: var(--muted); }
.toast-x:hover { background: var(--card-2); color: var(--ink); }
.toast-x:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.toast-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--tc); opacity: .5; transform-origin: left; }
.toast.out { animation: toast-out .3s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateX(40px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(40px); } }
@media (max-width: 600px) {
  .toasts { left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); width: auto; }
  @keyframes toast-in { from { opacity: 0; transform: translateY(-20px) scale(.97); } to { opacity: 1; transform: none; } }
  @keyframes toast-out { to { opacity: 0; transform: translateY(-20px); } }
}

/* ---------- Conferma (al centro dello schermo) ---------- */
.confirm-dialog { width: min(420px, calc(100% - 32px)); padding: 28px 26px 24px; text-align: center; }
.confirm-dialog[open] { animation: pop .35s cubic-bezier(.34, 1.56, .64, 1) both; }
.confirm-ic { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 18px; display: grid; place-items: center;
  color: var(--accent); background: rgba(255, 225, 77, .12); }
.confirm-dialog.danger .confirm-ic { color: var(--err); background: rgba(255, 107, 138, .12); }
.confirm-title { margin: 0 0 8px; font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; }
.confirm-msg { margin: 0; color: var(--ink-2); line-height: 1.5; overflow-wrap: anywhere; }
.confirm-actions { display: flex; gap: 10px; margin-top: 24px; }
.confirm-actions > * { flex: 1; margin: 0; }
.confirm-dialog.danger .confirm-ok { background: var(--err); color: #1a0008; box-shadow: 0 14px 40px -14px rgba(255, 107, 138, .8); }

/* ---------- Spaziature: nessun bottone o blocco attaccato a quello sopra o sotto ---------- */
.stat-tiles { margin: 18px 0; }
.stat-tiles:first-child { margin-top: 0; }
.card > .stat-tiles:last-child { margin-bottom: 0; }
.card > .h4:not(:first-child), .card > h3:not(:first-child) { margin-top: 22px; }
.auth-card .perks { margin: 14px 0 22px; }
.prose a.btn, .center a.btn { color: var(--accent-ink); }
.prose a.btn-ghost { color: var(--ink); }
.check-text { min-width: 0; }
.check-text a { color: var(--accent); }
.upsell { align-items: flex-start; }
.upsell > span { flex: 1; min-width: 0; }
.upsell .ic { margin-top: 3px; flex-shrink: 0; }
.guest-note { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--card);
  box-shadow: 0 0 0 1px var(--line) inset; color: var(--ink-2); font-size: .88rem; line-height: 1.45; text-align: left; }
.guest-note .ic { flex-shrink: 0; margin-top: 2px; color: var(--accent); }
.guest-note a { color: var(--accent); font-weight: 700; }
.cpage-by { flex-wrap: wrap; justify-content: center; }

/* ---------- Telefoni piccoli (≤ 380 px): la barra in alto non deve uscire dallo schermo ---------- */
@media (max-width: 380px) {
  .top { gap: 6px; padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); }
  .brand { font-size: 1.08rem; }
  .bolt { width: 30px; height: 30px; margin-right: 6px; }
  .nav-link { padding: 8px 6px; }
  .nav .btn-sm { padding: 8px 11px; }
  header .menu summary .star { display: none; }
  main { padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); }
  .card { padding: 18px 16px; }
  .hero-pill { font-size: .78rem; }
}

/* ---------- Tabelle su telefono: scorrono di lato invece di schiacciare le colonne ---------- */
.table-wrap table { min-width: 640px; }
.user-cell { white-space: nowrap; }
td .badge, th { white-space: nowrap; }
.table-wrap table.table-links { min-width: 860px; }
.table-wrap td > a.mono:first-child { white-space: nowrap; }

/* ---------------------------------------------------------------- impostazioni admin a riquadri */
.setting-group-head { display: flex; gap: 14px; align-items: flex-start; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.setting-group-head h2 { margin: 0; }
.setting-group-head p { margin: 4px 0 0; }
.setting-group-ic { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--card-2); color: var(--accent); box-shadow: 0 0 0 1px var(--line) inset; }
.setting-group .setting-row:last-child { border-bottom: 0; padding-bottom: 0; }
.setting-group > .guest-note { margin: 14px 0 0; }
.level-grid { display: grid; gap: 0; padding: 6px 0 4px; border-bottom: 1px solid var(--line); }
.level-grid-row { display: grid; grid-template-columns: 110px repeat(3, minmax(0, 1fr)); gap: 14px; align-items: center; padding: 10px 0; }
.level-grid-row + .level-grid-row { border-top: 1px solid var(--line); }
.level-grid-head { color: var(--muted); font-size: .8rem; font-weight: 600; padding-bottom: 4px; }
.level-grid label { margin: 0; }
.level-grid input { margin: 0; width: 100%; }
.level-grid-lab { display: none; }
.level-grid > p { margin: 8px 0 6px; }
@media (max-width: 720px) {
  .level-grid-head { display: none; }
  .level-grid-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .level-grid-row > span[role="rowheader"] { grid-column: 1 / -1; }
  .level-grid-lab { display: block; font-size: .74rem; color: var(--muted); margin-bottom: 4px; line-height: 1.25; }
}
@media (max-width: 420px) {
  .level-grid-row { grid-template-columns: 1fr; }
  .setting-group-ic { width: 32px; height: 32px; }
}

/* ---------------------------------------------------------------- account: collegamento Discord */
.discord-card h2 .badge { vertical-align: middle; margin-left: 6px; font-family: inherit; }
.discord-card .ticks { margin: 4px 0 16px; gap: 8px; }
.discord-card .label { margin: 16px 0 8px; }
.discord-card .steps { margin: 0 0 16px; gap: 6px; }
.discord-card .copy-row { margin: 10px 0 12px; }
.discord-card .row-actions { margin-top: 4px; }
.audit-act { display: block; font-weight: 600; color: var(--ink); white-space: nowrap; }
.discord-card .copy-row { flex-wrap: wrap; }
.discord-card .copy-row input { flex: 1 1 210px; }

/* ---------------------------------------------------------------- menù laterale con schede (account, admin) */
.account-dash, .admin-dash { grid-template-columns: 240px minmax(0, 1fr); }
.tab-panel[hidden] { display: none !important; }
.tab-panel > .card:last-child { margin-bottom: 0; }
.side-head-top { margin-top: 4px; }
.side-link .side-name { flex: 1 1 auto; min-width: 0; }
.side-extra { margin-left: auto; padding: 1px 7px; border-radius: 999px; background: var(--card-2); color: var(--muted); font-size: .72rem; font-weight: 700; text-transform: none; }
.side-extra.is-on { background: rgba(77, 255, 176, .12); color: var(--ok); }
.side-extra.is-alert { background: rgba(255, 107, 138, .16); color: var(--err); }
.side-link.side-danger { color: var(--muted); }
.side-link.side-danger:hover, .side-link.side-danger.on { color: var(--err); background: rgba(255, 107, 138, .08); box-shadow: 0 0 0 1px rgba(255, 107, 138, .25) inset; }
.side-subs { display: grid; gap: 1px; margin: 2px 0 6px 18px; padding-left: 10px; border-left: 1px solid var(--line-2); }
.side-sub { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 9px; font-size: .84rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.side-sub:hover { color: var(--ink); background: var(--card-2); }
.side-sub.on { color: var(--accent); background: rgba(255, 225, 77, .08); }
.dash-main > .admin-head:first-child, .dash-main > .crumbs:first-child { margin-top: 0; }
.settings-nav { display: none; }
.setting-group { margin: 0; }
.setting-save { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.setting-save .btn { margin: 0; }
.setting-save.is-dirty [data-unsaved-text] { color: var(--accent); font-weight: 600; }
.setting-save.is-dirty .btn { box-shadow: 0 0 0 2px var(--accent), 0 10px 30px -10px rgba(255, 225, 77, .7); }
.account-shortcuts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.account-shortcut { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 18px; background: var(--card); box-shadow: 0 0 0 1px var(--line) inset; text-decoration: none; color: var(--ink); transition: box-shadow .2s, transform .2s; }
.account-shortcut:hover { box-shadow: 0 0 0 1px var(--line-2) inset; transform: translateY(-1px); }
.account-shortcut strong { display: block; }
.account-shortcut small { display: block; color: var(--muted); font-size: .84rem; }
.account-dash .profile { margin-bottom: 14px; }
@media (max-width: 960px) {
  .account-dash, .admin-dash { grid-template-columns: minmax(0, 1fr); }
  .side-subs, .side-head-top { display: none; }
  .side-link .side-name { flex: none; }
  .settings-nav { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 14px; padding: 2px; scrollbar-width: none; }
  .settings-nav::-webkit-scrollbar { display: none; }
  .settings-nav .chip { flex-shrink: 0; max-width: none; padding: 7px 12px; font-size: .82rem; box-shadow: 0 0 0 1px var(--line) inset; }
  .settings-nav .chip.on { background: rgba(255, 225, 77, .12); color: var(--accent); box-shadow: 0 0 0 1px rgba(255, 225, 77, .25) inset; }
}
@media (max-width: 600px) {
  .account-shortcuts { grid-template-columns: minmax(0, 1fr); }
  .setting-save .btn { width: 100%; }
}

/* ---------------------------------------------------------------- pagina di supporto (da computer per esteso) */
.support-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.support-grid.support-n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.support-email { grid-column: 1 / -1; flex-direction: row !important; align-items: center; justify-content: space-between; gap: 24px !important; flex-wrap: wrap; }
.support-email > div:first-child { flex: 1 1 320px; display: grid; gap: 8px; }
.support-email-box { flex: 0 1 460px; display: grid; gap: 10px; justify-items: start; }
.support-email-box .copy-row { width: 100%; }
.support-email-box .btn-ghost { margin-top: 0 !important; }
.support-faq { max-width: 860px; margin: 0 auto; }
@media (max-width: 1000px) { .support-grid, .support-grid.support-n3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .support-grid, .support-grid.support-n3 { grid-template-columns: minmax(0, 1fr); } .support-email-box { flex-basis: 100%; } }
.side-link > .side-name:last-child { margin-left: 0; color: inherit; font-size: inherit; font-variant-numeric: normal; }
.side-extra { flex: none; white-space: nowrap; }
.side-link .side-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- menù laterale: grafica rifinita (dashboard, account, admin) */
.sidebar { padding: 10px; gap: 1px; }
.side-link { position: relative; padding: 9px 12px; border-radius: 12px; font-size: .9rem; transition: background .15s, color .15s; }
.side-link > .ic { flex: none; color: var(--muted); transition: color .15s; }
.side-link:hover > .ic { color: var(--ink-2); }
.side-link.on { background: rgba(255, 225, 77, .1); color: var(--accent); box-shadow: none; }
.side-link.on > .ic { color: var(--accent); }
.side-link.on::before { content: ''; position: absolute; left: -10px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.side-head { margin: 8px 12px 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.side-head:first-child, .side-head-top { margin-top: 4px; padding-top: 0; border-top: 0; }
.side-link.side-danger { margin-top: 6px; color: var(--ink-2); }
.side-link.side-danger > .ic { color: var(--err); }
.side-link.side-danger.on { color: var(--err); background: rgba(255, 107, 138, .1); box-shadow: none; }
.side-link.side-danger.on::before { background: var(--err); }
.side-extra { padding: 2px 8px; font-size: .7rem; line-height: 1.4; }
@media (max-width: 960px) {
  .side-link.on::before { display: none; }
  .side-link.side-danger { margin-top: 0; }
}

/* ---------------------------------------------------------------- menù che scorrono in orizzontale (telefono) */
.hscroll { display: contents; }
.hs-btn { display: none; }
@media (max-width: 960px) {
  .hscroll { display: block; position: relative; min-width: 0; }
  .hscroll > .sidebar, .hscroll > .settings-nav { scroll-behavior: smooth; }
  .hs-btn { display: grid; place-items: center; position: absolute; top: 50%; z-index: 3; width: 30px; height: 30px; margin: -15px 0 0; padding: 0; border: 0; border-radius: 50%;
    background: #1d1a2b; color: var(--ink); box-shadow: 0 6px 18px rgba(0, 0, 0, .7), 0 0 0 1px var(--line-2) inset; opacity: 0; pointer-events: none; transition: opacity .2s; cursor: pointer; }
  .hscroll.hs-nav .hs-btn { margin-top: -22px; }
  .hs-l { left: 2px; }
  .hs-l svg { transform: rotate(180deg); }
  .hs-r { right: 2px; }
  .hscroll.can-l .hs-l, .hscroll.can-r .hs-r { opacity: 1; pointer-events: auto; }
  .hscroll.can-r > .sidebar, .hscroll.can-r > .settings-nav { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 64px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 64px), transparent); }
  .hscroll.can-l > .sidebar, .hscroll.can-l > .settings-nav { -webkit-mask-image: linear-gradient(to right, transparent, #000 64px); mask-image: linear-gradient(to right, transparent, #000 64px); }
  .hscroll.can-l.can-r > .sidebar, .hscroll.can-l.can-r > .settings-nav { -webkit-mask-image: linear-gradient(to right, transparent, #000 64px, #000 calc(100% - 64px), transparent); mask-image: linear-gradient(to right, transparent, #000 64px, #000 calc(100% - 64px), transparent); }
}

/* ---------------------------------------------------------------- elenco link dell'admin */
.alist { padding: 4px 0; }
.alist-row { display: flex; align-items: center; gap: 18px; padding: 16px 24px; border-top: 1px solid var(--line); }
.alist-row:first-child { border-top: 0; }
.alist-row:hover { background: rgba(255, 255, 255, .02); }
.alist-row.is-off .alist-code { color: var(--muted); }
.alist-main { flex: 1 1 auto; min-width: 0; display: grid; gap: 5px; }
.alist-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.alist-top .badges { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.alist-top .badges a.badge { text-decoration: none; }
.alist-code { font-weight: 700; font-size: 1rem; color: var(--accent); text-decoration: none; overflow-wrap: anywhere; }
.alist-code:hover { text-decoration: underline; }
.alist-copy { padding: 3px 8px; }
.alist-url { display: flex; align-items: center; gap: 6px; margin: 0; min-width: 0; color: var(--ink-2); font-size: .9rem; }
.alist-url > .ic { flex: none; color: var(--muted); }
.alist-url > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alist-title, .alist-reason { margin: 0; color: var(--muted); }
.alist-reason { color: var(--err); display: flex; align-items: center; gap: 6px; }
.alist-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 2px 0 0; color: var(--muted); }
.alist-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.alist-actions { flex: none; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; margin: 0; }
.alist-actions button { margin: 0; display: inline-flex; align-items: center; gap: 5px; }
.alist-danger:hover { color: var(--err); box-shadow: 0 0 0 1px rgba(255, 107, 138, .45) inset; }
.alist-empty { margin: 0; padding: 18px 24px; }
@media (max-width: 760px) {
  .alist-row { flex-direction: column; align-items: stretch; gap: 12px; padding: 14px 16px; }
  .alist-actions { justify-content: flex-start; }
}

/* ---------------------------------------------------------------- paginazione con righe per pagina */
.pager-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 16px 0; }
.pager-bar .pager { margin: 0; }
.pager-per { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0; }
.pager-per label { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--ink-2); font-weight: 600; }
.pager-per input { width: 78px; margin: 0; padding: 6px 10px; }
.pager-per button { margin: 0; }
@media (max-width: 600px) { .pager-bar { justify-content: center; } .pager-per { justify-content: center; } }

/* ---------------------------------------------------------------- finestra di conferma con un campo */
.confirm-input { width: 100%; margin: 14px 0 0; }

/* ---------------------------------------------------------------- editor della pagina personalizzata dentro l'account */
.account-dash .cpage-editor .cpage-preview iframe { height: 600px; }
@media (max-width: 1150px) {
  .account-dash .cpage-editor { grid-template-columns: minmax(0, 1fr); }
  .account-dash .cpage-preview { position: static; }
}
.sidebar > * { min-width: 0; }

/* ---------------------------------------------------------------- sottovoci del menù admin (Settings) */
.side-link.on.has-subs { background: none; }
.side-link.on.has-subs::before { display: none; }
.side-link.on.has-subs:hover { background: var(--card-2); }
.side-subs { position: relative; display: grid; gap: 1px; margin: 0 4px 8px 19px; padding: 2px 0 2px 0; border-left: 1px solid var(--line-2); }
.side-subs > * { min-width: 0; }
.side-sub { position: relative; margin-left: 10px; padding: 6px 10px; border-radius: 9px; font-size: .84rem; font-weight: 600; color: var(--muted); }
.side-sub > .ic { flex: none; opacity: .8; }
.side-sub .side-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.side-sub:hover { background: var(--card-2); color: var(--ink); }
.side-sub.on { background: rgba(255, 225, 77, .08); color: var(--accent); }
.side-sub.on > .ic { opacity: 1; }
.side-sub.on::before { content: ''; position: absolute; left: -11px; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: var(--accent); }

/* ---------------------------------------------------------------- correzioni da telefono (iPhone/Safari) */
/* Data e ora: Safari su iPhone dà al campo una larghezza propria e lo fa uscire dal riquadro */
input[type=date], input[type=datetime-local], input[type=time] {
  -webkit-appearance: none; appearance: none; display: block; max-width: 100%; min-width: 0;
  height: 53px; text-align: left;
}
input[type=date]::-webkit-date-and-time-value, input[type=datetime-local]::-webkit-date-and-time-value, input[type=time]::-webkit-date-and-time-value { text-align: left; margin: 0; min-height: 1.2em; }
input[type=datetime-local]::-webkit-calendar-picker-indicator, input[type=date]::-webkit-calendar-picker-indicator { filter: invert(.8); cursor: pointer; }
/* Modulo "New link" della dashboard: il margine sotto usciva dal riquadro e il pulsante toccava il bordo */
.new-link > form { margin: 0; padding: 4px 20px 22px; }
.new-link > .flash { margin: 10px 20px 0; }
/* Da telefono le sottovoci di Settings stanno nella riga sotto il titolo, non nel menù in alto */
@media (max-width: 960px) {
  .side-subs { display: none; }
  .side-link.on.has-subs { background: rgba(255, 225, 77, .1); }
}
/* Anteprima della pagina personalizzata (dentro un riquadro): con il sito aperto dalla Home dell'iPhone
   lo spazio della barra di stato veniva applicato anche qui e copriva la parte alta. Nell'anteprima non serve. */
body.is-preview::after { display: none; }
body.is-preview .toasts { top: 14px; }

/* ---------------------------------------------------------------- scelta del fuso orario (account) */
.tz-picker { display: grid; gap: 12px; }
.tz-now { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: 16px; background: var(--card-2); box-shadow: 0 0 0 1px var(--line) inset; }
.tz-now > div { display: grid; gap: 2px; min-width: 0; }
.tz-now .label { margin: 0; }
.tz-now-name { font-size: 1.1rem; overflow-wrap: anywhere; }
.tz-now .btn-ghost { margin: 0; }
.tz-search { margin: 0; }
.tz-list { position: relative; max-height: 340px; overflow-y: auto; display: grid; gap: 2px; padding: 6px; border-radius: 16px; background: var(--field); box-shadow: 0 0 0 1px var(--line) inset; overscroll-behavior: contain; }
.tz-opt { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 11px; cursor: pointer; font-weight: 600; font-size: .92rem; margin: 0; }
.tz-opt[hidden] { display: none; }
.tz-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.tz-opt:hover { background: var(--card-2); }
.tz-opt.on { background: rgba(255, 225, 77, .12); color: var(--accent); box-shadow: 0 0 0 1px rgba(255, 225, 77, .3) inset; }
.tz-opt:focus-within { outline: 2px solid var(--accent); outline-offset: -2px; }
.tz-city { flex: 1 1 auto; min-width: 0; display: grid; }
.tz-city small, .tz-off small { font-weight: 500; color: var(--muted); font-size: .78rem; }
.tz-off { flex: none; text-align: right; display: grid; font-family: 'JetBrains Mono', monospace; font-size: .8rem; color: var(--ink-2); }
.tz-opt.on .tz-off { color: var(--accent); }
.tz-empty { padding: 10px 12px; margin: 0; }
.flag-link { text-decoration: none; margin-left: 4px; }
input[type=search] { -webkit-appearance: none; appearance: none; }
input[type=search]::-webkit-search-decoration { -webkit-appearance: none; }
.tz-detect { text-align: left; justify-content: flex-start; max-width: 100%; }
.tz-detect span { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) { .tz-now .tz-detect { width: 100%; } }
.tz-search input { padding-left: 40px; margin: 0; }
.b-scheduled { background: rgba(106, 92, 255, .2); color: #b7afff; }
/* Link programmato: pagina "coming soon" */
.soon .label { justify-content: center; }
.soon .soon-at { font-size: 1.08rem; font-weight: 600; margin: 4px 0 18px; }
.soon-count { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 auto 18px; max-width: 380px; }
.soon-count > div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 4px 10px; }
.soon-count b { display: block; font-size: 1.6rem; font-variant-numeric: tabular-nums; line-height: 1.1; }
.soon-count span { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
