/* ==========================================================================
   Castel - Portale Gallery Eventi
   Design system: token, base, componenti, pattern.
   Mobile first. Nessuna dipendenza esterna. Contrasti WCAG AA verificati sui token.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Token
   -------------------------------------------------------------------------- */
:root {
  color-scheme: dark;

  /* Colore (cap. 7.3) */
  --c-bg: #000A18;
  --c-surface: #00132D;
  --c-surface-2: #0A2142;
  --c-line: #1B3358;
  --c-line-soft: rgba(27, 51, 88, 0.55);
  --c-line-glow: rgba(98, 198, 255, 0.35);
  --c-brand: #0571B8;
  --c-brand-hover: #1A82CA;
  --c-brand-active: #05609E;
  --c-accent: #2E9BE6;
  --c-glow: #62C6FF;
  --c-text: #E8EEF7;
  --c-text-2: #8A9BB5;
  --c-text-3: #5C6E8C;
  --c-success: #3DDC97;
  --c-danger: #FF5A6E;
  --c-warning: #F5B942;
  --c-on-brand: #FFFFFF;

  /* Bagliori e ombre: il glow e' riservato a focus, selezione, avanzamento */
  --glow-sm: 0 0 0 1px var(--c-line-glow), 0 0 14px rgba(98, 198, 255, 0.22);
  --glow-md: 0 0 0 1px rgba(98, 198, 255, 0.55), 0 0 28px rgba(98, 198, 255, 0.35);
  --glow-brand: 0 0 22px rgba(5, 113, 184, 0.45);
  --shadow-1: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-2: 0 24px 60px rgba(0, 0, 0, 0.6);
  --ring: 0 0 0 3px rgba(98, 198, 255, 0.45);

  /* Raggi: ogni livello ha il suo (controlli, contenitori, pannelli flottanti) */
  --r-1: 4px;
  --r-2: 10px;
  --r-3: 18px;
  --r-pill: 999px;

  /* Tipografia (cap. 7.4) */
  --font-display: "Instrument Sans", "Avenir Next", "Segoe UI", sans-serif;
  --font-text: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --t-xs: 0.75rem;
  --t-sm: 0.875rem;
  --t-md: 1rem;
  --t-lg: 1.125rem;
  --t-xl: clamp(1.375rem, 1.1rem + 1.2vw, 1.75rem);
  --t-2xl: clamp(1.75rem, 1.2rem + 2.4vw, 2.5rem);
  --t-3xl: clamp(2.25rem, 1.4rem + 3.6vw, 3.5rem);

  /* Spaziature */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;

  /* Movimento (cap. 7.6) */
  --dur-1: 150ms;
  --dur-2: 250ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* Aree sicure dei dispositivi */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  /* Griglia di riferimento e grana (cap. 7.1) */
  --grid-size: 64px;
  --grid-line: rgba(27, 51, 88, 0.28);
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--safe-top);
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-text);
  font-size: var(--t-md);
  line-height: 1.55;
  font-weight: 450;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
}

/* Grana leggera su tutto il portale, mai sopra i contenuti */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.045;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
}

body > * {
  position: relative;
  z-index: 1;
}

/* Sfondo con griglia di riferimento: solo dove ha senso (accesso, dashboard) */
.has-grid {
  background-image:
    radial-gradient(60% 45% at 50% 0%, rgba(5, 113, 184, 0.22), transparent 70%),
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 100% 100%, var(--grid-size) var(--grid-size), var(--grid-size) var(--grid-size);
  background-position: 0 0, center top, center top;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 var(--s-3);
  text-wrap: balance;
}

h1 { font-size: var(--t-2xl); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: var(--t-xl); }
h3 { font-size: var(--t-lg); }
h4 { font-size: var(--t-md); }

p {
  margin: 0 0 var(--s-4);
  max-width: 68ch;
}

.text-2 { color: var(--c-text-2); }
.text-3 { color: var(--c-text-3); }
.text-sm { font-size: var(--t-sm); }
.text-xs { font-size: var(--t-xs); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.display { font-family: var(--font-display); }

a {
  color: var(--c-accent);
  text-decoration: none;
  text-underline-offset: 3px;
}
a:hover { text-decoration: underline; color: var(--c-glow); }

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--r-1);
}

img, video, svg { max-width: 100%; height: auto; display: block; }

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: currentColor;
}
.icon-sm { width: 1em; height: 1em; }
.icon-lg { width: 1.75em; height: 1.75em; }
.icon-spin { animation: spin 1s linear infinite; }

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

hr.rule {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c-line), transparent);
  margin: var(--s-5) 0;
}

/* Contenitori */
.centered-page {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  gap: var(--s-3);
  padding: var(--s-6) var(--s-4);
}
.centered-page p { margin: 0; }
.centered-page img { margin-bottom: var(--s-4); }
.status-code { letter-spacing: 0.3em; font-size: var(--t-sm); color: var(--c-accent); }
.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--s-4); }
.container-narrow { max-width: 480px; }
.stack > * + * { margin-top: var(--s-4); }
.stack-sm > * + * { margin-top: var(--s-2); }
.row { display: flex; gap: var(--s-3); align-items: center; flex-wrap: wrap; }
.row-between { justify-content: space-between; }
.grow { flex: 1 1 auto; }

/* --------------------------------------------------------------------------
   3. Pulsanti
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--c-text);
  --btn-line: var(--c-line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 44px;
  padding: 0 var(--s-4);
  border: 1px solid var(--btn-line);
  border-radius: var(--r-1);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-weight: 600;
  font-size: var(--t-sm);
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  transition: background-color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.btn:hover { --btn-line: var(--c-accent); text-decoration: none; color: var(--c-text); box-shadow: var(--glow-sm); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

.btn-primary { --btn-bg: var(--c-brand); --btn-fg: var(--c-on-brand); --btn-line: var(--c-brand); }
.btn-primary:hover { --btn-bg: var(--c-brand-hover); --btn-line: var(--c-brand-hover); box-shadow: var(--glow-brand); color: var(--c-on-brand); }
.btn-primary:active { --btn-bg: var(--c-brand-active); }

.btn-ghost { --btn-line: transparent; --btn-fg: var(--c-text-2); }
.btn-ghost:hover { --btn-line: transparent; --btn-bg: var(--c-surface-2); box-shadow: none; }

.btn-danger { --btn-line: rgba(255, 90, 110, 0.5); --btn-fg: var(--c-danger); }
.btn-danger:hover { --btn-bg: rgba(255, 90, 110, 0.12); --btn-line: var(--c-danger); box-shadow: 0 0 14px rgba(255, 90, 110, 0.25); color: var(--c-danger); }

.btn-sm { min-height: 36px; padding-inline: var(--s-3); font-size: var(--t-xs); }
.btn-lg { min-height: 52px; padding-inline: var(--s-5); font-size: var(--t-md); }
.btn-block { width: 100%; }
.btn-icon { width: 44px; padding: 0; }
.btn-icon.btn-sm { width: 36px; }

.btn.is-loading { color: transparent; pointer-events: none; position: relative; }
.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: var(--c-glow);
  animation: spin 0.8s linear infinite;
}

/* --------------------------------------------------------------------------
   4. Campi
   -------------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: var(--s-2); }
.field-label { font-size: var(--t-sm); font-weight: 600; color: var(--c-text); }
.field-hint { font-size: var(--t-xs); color: var(--c-text-2); }
.field-error { font-size: var(--t-xs); color: var(--c-danger); display: flex; gap: var(--s-1); align-items: center; }

.input, .select, .textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px var(--s-3);
  border: 1px solid var(--c-line);
  border-radius: var(--r-1);
  background: var(--c-surface);
  color: var(--c-text);
  font: inherit;
  font-size: var(--t-md);
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--c-text-3); }
.input:hover, .select:hover, .textarea:hover { border-color: rgba(46, 155, 230, 0.6); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--c-accent); box-shadow: var(--glow-sm); }
.input[aria-invalid="true"] { border-color: var(--c-danger); }
.input:disabled { opacity: 0.5; }
.textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%238A9BB5'><path d='M212.24 100.24l-80 80a6 6 0 0 1-8.48 0l-80-80a6 6 0 0 1 8.48-8.48L128 167.51l75.76-75.75a6 6 0 0 1 8.48 8.48Z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
}

/* Campo con pulsante integrato (mostra/nascondi, copia) */
.input-group { position: relative; display: flex; }
.input-group .input { padding-right: 48px; }
.input-group .btn-icon { position: absolute; right: 2px; top: 2px; bottom: 2px; height: auto; width: 42px; border: 0; --btn-fg: var(--c-text-2); }
.input-group .btn-icon:hover { --btn-bg: var(--c-surface-2); box-shadow: none; --btn-fg: var(--c-text); }

/* Campo password evento: il protagonista della pagina di accesso (cap. 7.6, 7.7) */
.keyfield { position: relative; }
.keyfield .input {
  min-height: 60px;
  font-family: var(--font-mono);
  font-size: 1.25rem;
  letter-spacing: 0.12em;
  text-align: center;
  padding-inline: 52px;
  border-color: rgba(27, 51, 88, 0.9);
  background: linear-gradient(180deg, var(--c-surface), rgba(0, 19, 45, 0.6));
}
.keyfield .input:focus { box-shadow: var(--glow-md); }
.keyfield::after {
  content: "";
  position: absolute;
  left: 8px; right: 8px; top: 8px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--c-glow), transparent);
  opacity: 0;
  pointer-events: none;
}
.keyfield.is-verifying::after { opacity: 0.9; animation: scan 1.1s var(--ease) infinite; }
.keyfield.is-verifying .input { color: var(--c-text-2); }

/* Pulsante che si comporta come link o voce di menu (form di logout) */
.btn-reset { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; width: 100%; text-align: left; }
.rail .rail-link.btn-reset { padding: 10px var(--s-3); }
.tabbar .tabbar-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 6px; color: var(--c-text-2); font-size: 11px; font-weight: 600; width: 100%; }
.tabbar form { display: contents; }

/* Griglia a due colonne per le card del backend */
.cards-2 { display: grid; grid-template-columns: 1fr; gap: var(--s-4); }
@media (min-width: 900px) { .cards-2 { grid-template-columns: 1fr 1fr; } }

/* Pagine del backend: testata, filtri, form */
.page-head { margin-bottom: var(--s-5); }
.page-head h1 { margin-bottom: var(--s-2); }
.page-head p { margin: 0 0 var(--s-2); }
.head-row { align-items: flex-start; }
.filters { margin-bottom: var(--s-4); }
.filters-search { max-width: 320px; }
.fields-2 { gap: var(--s-3); }
.card-span { grid-column: 1 / -1; }
.form-actions { margin-top: var(--s-2); }
.is-hidden { display: none !important; }
.password-modes .field { margin-left: 28px; }
.qr-row { align-items: flex-start; }
.qr-image { width: 132px; height: 132px; background: #fff; padding: 6px; border-radius: var(--r-1); flex: none; }
.settings-list > .row { padding: 6px 0; border-bottom: 1px solid var(--c-line-soft); }
.settings-list > .row:last-child { border-bottom: 0; }
.count-hint { font-weight: 400; font-size: 0.8em; margin-left: var(--s-2); }
.danger-zone { border-color: rgba(255, 90, 110, 0.25); }
.trash-actions { margin-top: var(--s-4); justify-content: flex-end; }

/* Statistiche */
.stat-sub { font-family: var(--font-text); font-size: 0.45em; font-weight: 600; color: var(--c-text-2); margin-left: var(--s-2); vertical-align: middle; }
.chart { display: grid; gap: var(--s-2); }
.chart-bars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; height: 160px; align-items: end; padding-bottom: 1px; border-bottom: 1px solid var(--c-line-soft); }
.chart-day { display: grid; grid-auto-flow: column; gap: 1px; height: 100%; align-items: end; }
.chart-bar { border-radius: 2px 2px 0 0; min-height: 2px; transition: height var(--dur-2) var(--ease); }
.chart-bar-a { background: var(--c-accent); box-shadow: 0 0 8px rgba(98, 198, 255, 0.25); }
.chart-bar-d { background: var(--c-success); opacity: 0.85; }
.chart-axis { display: flex; justify-content: space-between; font-size: var(--t-xs); color: var(--c-text-2); }
.chart-legend { display: flex; gap: var(--s-4); font-size: var(--t-xs); color: var(--c-text-2); flex-wrap: wrap; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 2px; }
.top-files { list-style: none; margin: 0; padding: var(--s-2) var(--s-4); }
.top-files li { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2) 0; border-bottom: 1px solid var(--c-line-soft); }
.top-files li:last-child { border-bottom: 0; }
.top-rank { width: 24px; font-family: var(--font-mono); color: var(--c-text-3); font-size: var(--t-sm); text-align: right; }
.top-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: var(--r-1); background: var(--c-surface-2); flex: none; }
.top-thumb-icon { display: grid; place-items: center; color: var(--c-accent); }
.top-name { flex: 1; min-width: 0; display: grid; font-size: var(--t-sm); }
.top-name > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-count { font-family: var(--font-display); font-size: var(--t-lg); font-weight: 700; }

/* Dashboard e impostazioni */
.table-scroll { max-height: 420px; overflow-y: auto; }
.table-scroll thead th { position: sticky; top: 0; z-index: 1; }
.media-toolbar { margin-bottom: var(--s-2); }
.media-toolbar p { margin: 0; }
.dash-cards { margin-bottom: var(--s-4); }
.stat-with-action { position: relative; }
.stat-action { position: absolute; top: 8px; right: 8px; }
.stat-action .btn { --btn-fg: var(--c-text-3); }
.stat-action .btn:hover { --btn-fg: var(--c-text); }
.sendfile-results { list-style: none; margin: 0; padding: 0; }
.sendfile-results li { display: flex; align-items: flex-start; gap: var(--s-2); padding: 4px 0; }
.sendfile-results .icon { margin-top: 2px; flex: none; }
.sendfile-ok .icon { color: var(--c-success); }
.sendfile-ko .icon { color: var(--c-danger); }

/* Messaggio flash in testa alla pagina */
.flash { margin-bottom: var(--s-5); }

/* Elenco dei codici di recupero */
.code-list { list-style: none; margin: var(--s-5) 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); text-align: center; }
.code-list li { padding: 10px; background: var(--c-bg); border: 1px solid var(--c-line); border-radius: var(--r-1); font-size: var(--t-md); letter-spacing: 0.08em; color: var(--c-glow); }
.recovery-codes-panel { width: min(100%, 520px); }
@media print { .code-list li { color: #000; border-color: #999; } .recovery-codes-panel { background: #fff; box-shadow: none; border: 0; } }

/* Pannello di accesso (cap. 7.7): logo, titolo, campo, un solo pulsante */
.access-panel {
  width: min(100%, 440px);
  padding: var(--s-6) var(--s-5);
  text-align: center;
}
.access-panel img { height: 40px; width: auto; margin: 0 auto var(--s-5); }
.access-panel h1 { font-size: var(--t-xl); }
.access-panel form { display: grid; gap: var(--s-3); margin-top: var(--s-5); text-align: left; }
.access-panel .foot { margin-top: var(--s-5); font-size: var(--t-xs); color: var(--c-text-2); }
.access-panel .foot a { color: var(--c-accent); }
@media (min-width: 720px) { .access-panel { padding: var(--s-7) var(--s-6); } }

.lang-switch { display: inline-flex; gap: var(--s-3); font-size: var(--t-sm); color: var(--c-text-3); }
.lang-switch a { color: var(--c-text-2); }
.lang-switch [aria-current="true"] { color: var(--c-text); font-weight: 600; }

/* Caselle e interruttori */
.check {
  display: inline-flex; align-items: center; gap: var(--s-2);
  cursor: pointer; font-size: var(--t-sm);
}
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check .check-box {
  width: 20px; height: 20px; flex: none;
  border: 1px solid var(--c-line); border-radius: var(--r-1);
  background: var(--c-surface);
  display: grid; place-items: center;
  transition: border-color var(--dur-1), background-color var(--dur-1), box-shadow var(--dur-1);
}
.check .check-box .icon { width: 14px; height: 14px; opacity: 0; color: var(--c-on-brand); }
.check input:checked + .check-box { background: var(--c-brand); border-color: var(--c-brand); box-shadow: var(--glow-sm); }
.check input:checked + .check-box .icon { opacity: 1; }
.check input:focus-visible + .check-box { box-shadow: var(--ring); }

.switch { display: inline-flex; align-items: center; gap: var(--s-3); cursor: pointer; font-size: var(--t-sm); }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .switch-track {
  width: 44px; height: 26px; flex: none; border-radius: var(--r-pill);
  background: var(--c-surface-2); border: 1px solid var(--c-line); position: relative;
  transition: background-color var(--dur-2) var(--ease), border-color var(--dur-2);
}
.switch .switch-track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--c-text-2); transition: transform var(--dur-2) var(--ease), background-color var(--dur-2);
}
.switch input:checked + .switch-track { background: var(--c-brand); border-color: var(--c-brand); }
.switch input:checked + .switch-track::after { transform: translateX(18px); background: #fff; }
.switch input:focus-visible + .switch-track { box-shadow: var(--ring); }

/* --------------------------------------------------------------------------
   5. Contenitori: card, pannelli, badge
   -------------------------------------------------------------------------- */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-line-soft);
  border-radius: var(--r-2);
}
.card-body { padding: var(--s-4); }
.card-header { padding: var(--s-4); border-bottom: 1px solid var(--c-line-soft); display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.card-header h2, .card-header h3 { margin: 0; }
.card-footer { padding: var(--s-3) var(--s-4); border-top: 1px solid var(--c-line-soft); }
@media (min-width: 720px) {
  .card-body, .card-header { padding: var(--s-5); }
}

/* Pannello luminoso: un solo elemento per pagina puo' usarlo */
.panel-glow {
  position: relative;
  background: linear-gradient(180deg, rgba(10, 33, 66, 0.7), rgba(0, 19, 45, 0.95));
  border: 1px solid var(--c-line-glow);
  border-radius: var(--r-3);
  box-shadow: var(--shadow-2), inset 0 1px 0 rgba(98, 198, 255, 0.12);
}

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 24px; padding: 0 10px;
  border-radius: var(--r-pill);
  font-size: var(--t-xs); font-weight: 600; line-height: 1;
  border: 1px solid var(--c-line);
  color: var(--c-text-2);
  background: rgba(10, 33, 66, 0.6);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-live { color: var(--c-success); border-color: rgba(61, 220, 151, 0.4); }
.badge-draft { color: var(--c-warning); border-color: rgba(245, 185, 66, 0.4); }
.badge-archived { color: var(--c-text-3); }
.badge-danger { color: var(--c-danger); border-color: rgba(255, 90, 110, 0.4); }
.badge-info { color: var(--c-accent); border-color: rgba(46, 155, 230, 0.4); }

/* Valore da copiare (password, link): mono, con pulsante */
.copyable {
  display: flex; align-items: center; gap: var(--s-2);
  padding: var(--s-2) var(--s-2) var(--s-2) var(--s-3);
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-radius: var(--r-1);
  font-family: var(--font-mono);
  font-size: var(--t-sm);
  min-width: 0;
}
.copyable .copyable-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copyable .copyable-value.is-secret { letter-spacing: 0.14em; color: var(--c-glow); font-weight: 600; }

/* --------------------------------------------------------------------------
   6. Avanzamento
   -------------------------------------------------------------------------- */
.progress {
  --value: 0%;
  position: relative;
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--c-surface-2);
  overflow: hidden;
}
.progress-bar {
  position: absolute; inset: 0 auto 0 0;
  width: var(--value);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--c-brand), var(--c-glow));
  box-shadow: 0 0 12px rgba(98, 198, 255, 0.55);
  transition: width var(--dur-2) var(--ease);
}
.progress-indeterminate .progress-bar { width: 35%; animation: indeterminate 1.4s var(--ease) infinite; }
.progress-danger .progress-bar { background: var(--c-danger); box-shadow: none; }
.progress-success .progress-bar { background: var(--c-success); box-shadow: 0 0 12px rgba(61, 220, 151, 0.4); }
.progress-lg { height: 10px; }

.progress-meta {
  display: flex; justify-content: space-between; gap: var(--s-3);
  font-size: var(--t-xs); color: var(--c-text-2);
  font-variant-numeric: tabular-nums;
  margin-top: var(--s-2);
}
.progress-meta strong { color: var(--c-text); font-weight: 600; }

/* --------------------------------------------------------------------------
   7. Modale e toast
   -------------------------------------------------------------------------- */
dialog.modal {
  width: min(92vw, 520px);
  padding: 0;
  border: 1px solid var(--c-line-glow);
  border-radius: var(--r-3);
  background: var(--c-surface);
  color: var(--c-text);
  box-shadow: var(--shadow-2);
  margin: auto;
}
dialog.modal::backdrop { background: rgba(0, 5, 14, 0.7); backdrop-filter: blur(6px); }
dialog.modal[open] { animation: rise var(--dur-2) var(--ease); }
.modal-header { padding: var(--s-5) var(--s-5) 0; display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); }
.modal-header h2 { margin: 0; font-size: var(--t-lg); }
.modal-body { padding: var(--s-4) var(--s-5); }
.modal-footer { padding: 0 var(--s-5) var(--s-5); display: flex; gap: var(--s-2); justify-content: flex-end; flex-wrap: wrap; }

.toast-stack {
  position: fixed;
  left: 50%; bottom: calc(var(--s-4) + var(--safe-bottom));
  transform: translateX(-50%);
  display: flex; flex-direction: column; gap: var(--s-2);
  width: min(92vw, 420px);
  z-index: 60;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex; align-items: flex-start; gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-2);
  background: var(--c-surface-2);
  border: 1px solid var(--c-line-glow);
  box-shadow: var(--shadow-1);
  font-size: var(--t-sm);
  animation: rise var(--dur-2) var(--ease);
}
.toast .icon { margin-top: 2px; color: var(--c-accent); }
.toast-success .icon { color: var(--c-success); }
.toast-danger { border-color: rgba(255, 90, 110, 0.5); }
.toast-danger .icon { color: var(--c-danger); }
.toast-warning .icon { color: var(--c-warning); }
.toast .btn-icon { margin: -6px -8px -6px auto; }

/* --------------------------------------------------------------------------
   8. Navigazione: barra superiore, rail admin, segmentato
   -------------------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: var(--s-3);
  min-height: 60px;
  padding: 0 var(--s-4);
  padding-top: var(--safe-top);
  background: rgba(0, 10, 24, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-line-soft);
}
.topbar .brand { display: inline-flex; align-items: center; gap: var(--s-3); color: var(--c-text); text-decoration: none; }
.topbar .brand img { height: 26px; width: auto; }

.segmented {
  display: inline-flex; padding: 3px;
  border: 1px solid var(--c-line); border-radius: var(--r-pill);
  background: var(--c-surface);
}
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.segmented span {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 34px; padding: 0 14px; border-radius: var(--r-pill);
  font-size: var(--t-sm); font-weight: 600; color: var(--c-text-2);
  transition: background-color var(--dur-1), color var(--dur-1);
}
.segmented input:checked + span { background: var(--c-surface-2); color: var(--c-text); box-shadow: inset 0 0 0 1px var(--c-line-glow); }
.segmented input:focus-visible + span { box-shadow: var(--ring); }

.admin-shell { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
.rail {
  display: none;
  flex-direction: column; gap: var(--s-1);
  padding: var(--s-5) var(--s-3);
  border-right: 1px solid var(--c-line-soft);
  background: var(--c-surface);
  position: sticky; top: 0; height: 100vh;
}
.rail .brand { padding: 0 var(--s-3) var(--s-5); }
.rail .brand img { height: 28px; width: auto; }
.rail-link {
  display: flex; align-items: center; gap: var(--s-3);
  padding: 10px var(--s-3); border-radius: var(--r-1);
  color: var(--c-text-2); font-size: var(--t-sm); font-weight: 600; text-decoration: none;
  border-left: 2px solid transparent;
}
.rail-link:hover { background: var(--c-surface-2); color: var(--c-text); text-decoration: none; }
.rail-link[aria-current="page"] { color: var(--c-text); background: var(--c-surface-2); border-left-color: var(--c-glow); }
.rail .rail-bottom { margin-top: auto; }
.admin-main { padding: var(--s-4); padding-bottom: calc(var(--s-8) + var(--safe-bottom)); }
@media (min-width: 1024px) {
  .admin-shell { grid-template-columns: 240px 1fr; }
  .rail { display: flex; }
  .admin-main { padding: var(--s-6); }
}

/* Barra di navigazione mobile del backend */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding-bottom: var(--safe-bottom);
  background: rgba(0, 10, 24, 0.9); backdrop-filter: blur(12px);
  border-top: 1px solid var(--c-line-soft);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 6px; color: var(--c-text-2); font-size: 11px; font-weight: 600; text-decoration: none; }
.tabbar a[aria-current="page"] { color: var(--c-glow); }
@media (min-width: 1024px) { .tabbar { display: none; } }

/* --------------------------------------------------------------------------
   9. Gallery: griglia, tessere, selezione, barra azioni
   -------------------------------------------------------------------------- */
.gallery-head {
  position: relative; overflow: hidden;
  padding: var(--s-6) 0 var(--s-5);
  border-bottom: 1px solid var(--c-line-soft);
}
.gallery-head .cover {
  position: absolute; inset: 0; z-index: -1;
  background-size: cover; background-position: center;
  opacity: 0.22; filter: saturate(0.7) blur(2px); transform: scale(1.05);
}
.gallery-head::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0, 10, 24, 0.2), var(--c-bg)); }
.gallery-meta { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5); color: var(--c-text-2); font-size: var(--t-sm); }
.gallery-meta span { display: inline-flex; align-items: center; gap: 6px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 4px;
  padding: 4px;
}
@media (min-width: 720px) { .grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; padding: 6px; } }
@media (min-width: 1280px) { .grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); } }

.tile {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--r-1);
  background: var(--tile-color, var(--c-surface-2));
  cursor: pointer;
  outline: 0;
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-2) var(--ease), opacity var(--dur-2); }
.tile:focus-visible { box-shadow: var(--ring); }
.tile .tile-check {
  position: absolute; top: 8px; left: 8px;
  width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid rgba(232, 238, 247, 0.85);
  background: rgba(0, 10, 24, 0.45);
  display: grid; place-items: center;
  color: #fff; opacity: 0;
  transition: opacity var(--dur-1), background-color var(--dur-1), transform var(--dur-1) var(--ease);
}
.tile .tile-check .icon { width: 15px; height: 15px; opacity: 0; }
.tile .tile-badge {
  position: absolute; right: 8px; bottom: 8px;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 7px; border-radius: var(--r-1);
  background: rgba(0, 10, 24, 0.7); color: var(--c-text);
  font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.tile:hover .tile-check, .is-selecting .tile .tile-check { opacity: 1; }
.tile.is-selected { box-shadow: 0 0 0 2px var(--c-glow), var(--glow-brand); }
.tile.is-selected img { transform: scale(0.94); opacity: 0.85; }
.tile.is-selected .tile-check { opacity: 1; background: var(--c-brand); border-color: var(--c-brand); }
.tile.is-selected .tile-check .icon { opacity: 1; }

.action-bar {
  position: fixed; left: 50%; bottom: calc(var(--s-4) + var(--safe-bottom));
  transform: translateX(-50%) translateY(120%);
  width: min(94vw, 640px);
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-3) var(--s-3) var(--s-4);
  background: rgba(10, 33, 66, 0.92); backdrop-filter: blur(14px);
  border: 1px solid var(--c-line-glow);
  border-radius: var(--r-3);
  box-shadow: var(--shadow-2), var(--glow-sm);
  z-index: 40;
  transition: transform var(--dur-2) var(--ease);
}
.action-bar.is-visible { transform: translateX(-50%) translateY(0); }
.action-bar .count { font-family: var(--font-display); font-size: var(--t-xl); font-weight: 700; line-height: 1; }
.action-bar .count-label { font-size: var(--t-xs); color: var(--c-text-2); }

/* --------------------------------------------------------------------------
   10. Lightbox
   -------------------------------------------------------------------------- */
.lightbox {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0, 5, 14, 0.96);
  display: grid; grid-template-rows: auto 1fr auto;
}
.lightbox-bar { display: flex; align-items: center; gap: var(--s-2); padding: calc(var(--s-2) + var(--safe-top)) var(--s-3) var(--s-2); }
.lightbox-bar .lightbox-title { font-size: var(--t-sm); color: var(--c-text-2); font-variant-numeric: tabular-nums; }
.lightbox-stage { position: relative; display: grid; place-items: center; overflow: hidden; }
.lightbox-stage > img, .lightbox-stage > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 64px; border: 0; border-radius: var(--r-1);
  background: rgba(0, 19, 45, 0.6); color: var(--c-text); cursor: pointer;
  display: grid; place-items: center;
}
.lightbox-nav:hover { background: var(--c-surface-2); box-shadow: var(--glow-sm); }
.lightbox-nav.prev { left: 8px; }
.lightbox-nav.next { right: 8px; }
.lightbox-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-2) var(--s-3) calc(var(--s-3) + var(--safe-bottom)); color: var(--c-text-2); font-size: var(--t-sm); }
.lightbox .btn { --btn-bg: rgba(0, 19, 45, 0.6); }
@media (max-width: 719px) { .lightbox-nav { display: none; } }

/* --------------------------------------------------------------------------
   11. Backend: statistiche, drop zone, tabelle, coda di upload
   -------------------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-3); }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: var(--s-4); background: var(--c-surface); border: 1px solid var(--c-line-soft); border-radius: var(--r-2); }
.stat-value { font-family: var(--font-display); font-size: var(--t-2xl); font-weight: 700; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-label { font-size: var(--t-sm); color: var(--c-text-2); margin-top: var(--s-2); }
.stat .progress { margin-top: var(--s-3); }

.dropzone {
  display: grid; place-items: center; text-align: center; gap: var(--s-2);
  padding: var(--s-6) var(--s-4);
  border: 1.5px dashed var(--c-line);
  border-radius: var(--r-2);
  background: rgba(0, 19, 45, 0.5);
  color: var(--c-text-2);
  transition: border-color var(--dur-1), background-color var(--dur-1), box-shadow var(--dur-1);
}
.dropzone .icon-lg { color: var(--c-accent); }
.dropzone.is-active { border-color: var(--c-glow); border-style: solid; background: rgba(5, 113, 184, 0.12); box-shadow: var(--glow-md); color: var(--c-text); }
.dropzone-fullpage {
  position: fixed; inset: var(--s-3); z-index: 55;
  border: 2px solid var(--c-glow); border-radius: var(--r-3);
  background: rgba(0, 10, 24, 0.85); backdrop-filter: blur(6px);
  display: none; place-items: center; box-shadow: var(--glow-md);
  font-family: var(--font-display); font-size: var(--t-xl); font-weight: 700;
}
.dropzone-fullpage.is-active { display: grid; }

.table-wrap { overflow-x: auto; border: 1px solid var(--c-line-soft); border-radius: var(--r-2); }
.table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.table th, .table td { padding: 12px var(--s-4); text-align: left; border-bottom: 1px solid var(--c-line-soft); white-space: nowrap; }
.table th { color: var(--c-text-2); font-weight: 600; background: rgba(0, 19, 45, 0.6); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(10, 33, 66, 0.4); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* Pannello flottante della coda di upload (cap. 6.3) */
.upload-panel {
  position: fixed; right: var(--s-3); bottom: calc(var(--s-3) + var(--safe-bottom)); z-index: 45;
  width: min(94vw, 400px);
  background: var(--c-surface); border: 1px solid var(--c-line-glow); border-radius: var(--r-3);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}
.upload-panel-head { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-3) var(--s-3) var(--s-3) var(--s-4); border-bottom: 1px solid var(--c-line-soft); }
.upload-panel-head strong { font-family: var(--font-display); font-size: var(--t-md); }
.upload-panel-body { padding: var(--s-4); }
.upload-panel.is-collapsed .upload-panel-body { display: none; }
.upload-list { list-style: none; margin: var(--s-3) 0 0; padding: 0; max-height: 240px; overflow-y: auto; }
.upload-item { display: grid; grid-template-columns: 1fr auto; gap: 2px var(--s-3); padding: var(--s-2) 0; border-top: 1px solid var(--c-line-soft); font-size: var(--t-xs); }
.upload-item .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--c-text); font-size: var(--t-sm); }
.upload-item .state { color: var(--c-text-2); font-variant-numeric: tabular-nums; }
.upload-item .progress { grid-column: 1 / -1; height: 3px; margin-top: 4px; }
.upload-item.is-error .state { color: var(--c-danger); }
.upload-item.is-done .state { color: var(--c-success); }

/* Tessere con anteprima: il colore dominante fa da segnaposto finche' l'immagine arriva */
.tile.has-preview img { background: var(--tile-color, var(--c-surface-2)); }
.tile.has-preview .tile-badge { pointer-events: none; }

/* Griglia del backend: selezione, riordino, copertina, nascosti */
#upload-app.is-selecting .tile .tile-check { opacity: 1; }
#upload-app .tile.is-dragging { opacity: 0.4; }
#upload-app .tile[draggable="true"] { cursor: grab; }
#upload-app.is-selecting .tile { cursor: pointer; }
.tile.is-hidden-media img, .tile.is-hidden-media .tile-file-inner { opacity: 0.35; }
.tile-cover-badge { left: 8px; right: auto; top: auto; bottom: 8px; color: var(--c-warning); }
.tile-hidden-badge { color: var(--c-text-2); }
.tile.is-hidden-media .tile-check { border-color: rgba(232, 238, 247, 0.85); }

/* Tessere dei file senza anteprima: icona, nome, formato e peso */
.tile-file { cursor: default; }
.tile-file-inner { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 4px; padding: 10px; text-align: center; color: var(--c-text-2); font-size: 11px; }
.tile-file-inner .icon-lg { color: var(--c-accent); margin-bottom: 4px; }
.tile-file-name { color: var(--c-text); font-size: 12px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-delete { position: absolute; top: 4px; right: 4px; opacity: 0; --btn-bg: rgba(0, 10, 24, 0.6); }
.tile-file:hover .tile-delete, .tile-file:focus-within .tile-delete { opacity: 1; }
.upload-resume .row { align-items: center; }
.upload-panel .up-actions { margin-top: var(--s-3); }
.upload-panel .up-notice { margin-bottom: var(--s-3); }
.upload-panel .upload-item .state .btn { min-height: 26px; padding-inline: 8px; }

/* Cestino dei file nella scheda evento */
.media-trash { border-top: 1px solid var(--c-line-soft); padding-top: var(--s-4); }
.media-trash h3 { margin: 0; }
.media-trash-list { list-style: none; margin: var(--s-3) 0 0; padding: 0; }
.media-trash-list li { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2) 0; border-bottom: 1px solid var(--c-line-soft); font-size: var(--t-sm); }
.media-trash-list li:last-child { border-bottom: 0; }
.media-trash-list .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-trash-list .meta { color: var(--c-text-2); font-size: var(--t-xs); white-space: nowrap; }

/* Gallery visitatori (Fase 8) */
.gallery-tools { margin-top: var(--s-5); }
.gallery-grid { min-height: 40vh; }
.gallery-sentinel { display: grid; place-items: center; padding: var(--s-5); }
.gallery-sentinel .skeleton { width: 120px; height: 6px; border-radius: var(--r-pill); opacity: 0; }
.gallery-sentinel.is-loading .skeleton { opacity: 1; }
body.has-lightbox { overflow: hidden; }

/* Lightbox come <dialog> a schermo intero */
dialog.lightbox { position: fixed; inset: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; color: var(--c-text); }
dialog.lightbox::backdrop { background: rgba(0, 5, 14, 0.96); }
dialog.lightbox:not([open]) { display: none; }
.lightbox-stage { touch-action: none; user-select: none; }
.lightbox-stage img { background-size: contain; background-repeat: no-repeat; background-position: center; transition: transform var(--dur-2) var(--ease); will-change: transform; }
.lightbox.is-zoomed .lightbox-stage img { cursor: grab; }
.lightbox.is-zoomed .lightbox-nav { display: none; }
.lightbox-file { display: grid; justify-items: center; gap: var(--s-2); text-align: center; padding: var(--s-6); color: var(--c-text); }
.lightbox-file .icon-lg { color: var(--c-accent); }
.lightbox-file p { margin: 0; }
.zip-parts { list-style: none; margin: 0; padding: 0; }
.zip-parts li { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2) 0; border-bottom: 1px solid var(--c-line-soft); font-size: var(--t-sm); }
.zip-parts li:last-child { border-bottom: 0; }
@media (prefers-reduced-motion: reduce) { .lightbox-stage img { transition: none; } }

/* Pagine dei visitatori */
.privacy-page { padding: var(--s-6) var(--s-4) var(--s-8); }
.gallery-welcome { color: var(--c-text-2); margin-top: var(--s-4); }
.gallery-body { padding-top: var(--s-5); padding-bottom: var(--s-8); }
.select-sm { min-height: 36px; padding: 6px 36px 6px 12px; font-size: var(--t-sm); max-width: 220px; }
.access-status { min-height: 1.2em; text-align: center; }

/* Segnaposto durante il caricamento */
.skeleton {
  background: linear-gradient(90deg, var(--c-surface) 25%, var(--c-surface-2) 37%, var(--c-surface) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.6s linear infinite;
  border-radius: var(--r-1);
}

/* Stato vuoto: un invito ad agire, tutto centrato */
.empty { display: grid; justify-items: center; text-align: center; padding: var(--s-7) var(--s-4); color: var(--c-text-2); gap: var(--s-2); }
.empty .icon-lg { color: var(--c-accent); margin-bottom: var(--s-1); }
.empty h3, .empty .empty-title { color: var(--c-text); margin: 0; font-family: var(--font-display); font-size: var(--t-lg); font-weight: 700; }
.empty p { margin: 0; max-width: 48ch; }
.empty .btn { margin-top: var(--s-2); }

/* Avviso in linea */
.notice {
  display: flex; gap: var(--s-3); align-items: flex-start;
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-2);
  border: 1px solid var(--c-line);
  background: rgba(0, 19, 45, 0.7);
  font-size: var(--t-sm);
}
.notice .icon { margin-top: 2px; color: var(--c-accent); }
.notice-danger { border-color: rgba(255, 90, 110, 0.45); }
.notice-danger .icon { color: var(--c-danger); }
.notice-warning { border-color: rgba(245, 185, 66, 0.45); }
.notice-warning .icon { color: var(--c-warning); }
.notice-success { border-color: rgba(61, 220, 151, 0.45); }
.notice-success .icon { color: var(--c-success); }

/* --------------------------------------------------------------------------
   12. Animazioni
   -------------------------------------------------------------------------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes scan { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 0.9; } 85% { opacity: 0.9; } 100% { transform: translateY(42px); opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes indeterminate { 0% { left: -35%; } 100% { left: 100%; } }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .keyfield.is-verifying::after { opacity: 0.9; transform: none; }
  .progress-indeterminate .progress-bar { width: 100%; left: 0; opacity: 0.5; }
  .skeleton { animation: none; background: var(--c-surface-2); }
}

/* --------------------------------------------------------------------------
   13. Stampa: scheda evento (logo, QR, link, password)
   -------------------------------------------------------------------------- */
@media print {
  body { background: #fff; color: #000; }
  body::before, .topbar, .rail, .tabbar, .toast-stack, .action-bar, .upload-panel { display: none !important; }
  .print-sheet { display: block; }
}
