/* ============================================
   GLOBAL.CSS — Sinopsya
   Design System FASE 16: "Dark Premium / Light SaaS"
   ─────────────────────────────────────────────
   STYLE GUIDE (i token sono la documentazione):
   - Tema DARK (default): navy profondo + accenti neon
     desaturati, glow discreti. Mood: premium, tecnico.
   - Tema LIGHT: bianco/grigio-blu pulito stile SaaS
     moderno, accenti scuriti per contrasto AA (≥4.5:1).
   - Il tema è governato da data-theme="dark|light" su
     <html> (js/theme.js: localStorage 'crm_theme',
     primo accesso = prefers-color-scheme, default dark).
   - REGOLA: mai colori hardcoded nei CSS delle pagine,
     sempre var(--token) — così il tema chiaro è gratis.
   - Tipografia: Inter (testo) + Space Grotesk (display/
     cifre) — 2 famiglie Google Fonts, display=swap.
   - Spacing: griglia 4px (--sp-*). Radius: 6→20px.
   - Animazioni: 150-300ms, easing naturali, disattivate
     con prefers-reduced-motion.
============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

/* === TOKEN — TEMA DARK (default) === */
:root {
  color-scheme: dark;

  /* --- SFONDO: profondi, neutri --- */
  --bg-base:        #0a0e1a;   /* quasi nero navy */
  --bg-card:        #111827;   /* cards */
  --bg-secondary:   #1a2234;   /* input, sidebar, thead */
  --bg-hover:       #1e2a40;   /* hover state */
  --bg-overlay:     rgba(10, 14, 26, 0.85);  /* scrim modali */
  --bg-glass:       rgba(10, 14, 26, 0.85);  /* topbar blur */
  --bg-card-2:      rgba(255, 255, 255, 0.04); /* card annidate */
  --row-alt:        rgba(255, 255, 255, 0.015); /* righe alternate */
  --grid-line:      rgba(0, 229, 255, 0.03);  /* griglia decorativa */

  /* --- ACCENTI: neon desaturati, eleganti --- */
  --neon-cyan:      #00d4ff;   /* accent principale */
  --neon-cyan-dim:  rgba(0, 212, 255, 0.12);
  --neon-green:     #00e699;   /* successo / attivo */
  --neon-green-dim: rgba(0, 230, 153, 0.12);
  --neon-orange:    #ff6b35;   /* attenzione */
  --neon-purple:    #a855f7;   /* gamba dx / networker */
  --neon-red:       #f43f5e;   /* errore / pericolo */
  --danger-dim:     rgba(244, 63, 94, 0.10);
  --warning:        #ffc800;   /* badge 2+2 / scadenze */
  --warning-dim:    rgba(255, 200, 0, 0.12);
  --medal-silver:   #c0c0c0;
  --medal-bronze:   #cd7f32;

  /* --- BOTTONE PRIMARIO (gradiente accent) --- */
  --accent-grad-a:  #00d4ff;
  --accent-grad-b:  #0099cc;
  --on-accent:      #001018;   /* testo sopra l'accent */

  /* --- TESTO --- */
  --text-primary:   #f0f4ff;
  --text-secondary: #94a3b8;
  --text-muted:     #8899b0;   /* più chiaro per contrasto/leggibilità */

  /* --- BORDI --- */
  --border-card:    rgba(255, 255, 255, 0.07);
  --border-subtle:  rgba(255, 255, 255, 0.04);
  --border-active:  rgba(0, 212, 255, 0.40);

  /* --- OMBRE --- */
  --shadow-card:    0 4px 24px rgba(0, 0, 0, 0.40);
  --shadow-glow:    0 0 20px rgba(0, 212, 255, 0.15);

  /* --- ALBERO (FASE 12 D) --- */
  --node-builder:     #8b5cf6;                    /* viola: builder (>=1 iscritto) */
  --node-builder-dim: rgba(139, 92, 246, 0.12);

  /* --- TIPOGRAFIA --- */
  --font-base: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Mono', 'Consolas', monospace;

  --text-xs:   0.72rem;
  --text-sm:   0.82rem;
  --text-base: 0.9rem;
  --text-md:   1rem;
  --text-lg:   1.1rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  2rem;

  /* --- SPACING (grid 4px) --- */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px;  --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px;  --sp-10: 40px;

  /* --- RADIUS --- */
  --radius-sm: 6px;   --radius-md: 10px;
  --radius-lg: 14px;  --radius-xl: 20px;
  --radius-pill: 999px;

  /* --- SIDEBAR --- */
  --sidebar-width-collapsed: 64px;
  --sidebar-width-expanded: 220px;

  /* --- TRANSIZIONI (150-300ms, easing naturali) --- */
  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* ============================================
     ALIAS LEGACY — mantengono compatibili le regole
     esistenti che usano i vecchi nomi delle variabili
  ============================================ */
  --bg-primary:     var(--bg-base);
  --bg-card-hover:  var(--bg-hover);
  --bg-sidebar:     #131a29;
  --neon-cyan-glow: var(--shadow-glow);
  --shadow-neon:    var(--shadow-glow);
  --neon-glow:      var(--shadow-glow);
  --text-accent:    var(--neon-cyan);
}

/* === TOKEN — TEMA LIGHT (SaaS pulito) ===
   Stessi nomi, valori ricalibrati: testo scuro su fondi
   chiari, accenti scuriti per AA su bianco (≥4.5:1).
   Niente grigio chiaro su bianco: --text-muted ≈ 5:1. */
:root[data-theme="light"] {
  color-scheme: light;

  --bg-base:        #f4f6fb;
  --bg-card:        #ffffff;
  --bg-secondary:   #eaeef6;
  --bg-hover:       #e1e8f2;
  --bg-overlay:     rgba(15, 23, 42, 0.45);
  --bg-glass:       rgba(255, 255, 255, 0.85);
  --bg-card-2:      rgba(15, 23, 42, 0.04);
  --row-alt:        rgba(15, 23, 42, 0.02);
  --grid-line:      rgba(3, 105, 161, 0.05);

  --neon-cyan:      #0369a1;   /* 5.9:1 su bianco */
  --neon-cyan-dim:  rgba(3, 105, 161, 0.08);
  --neon-green:     #047857;   /* 5.0:1 */
  --neon-green-dim: rgba(4, 120, 87, 0.08);
  --neon-orange:    #c2410c;   /* 4.9:1 */
  --neon-purple:    #6d28d9;   /* 6.6:1 */
  --neon-red:       #be123c;   /* 6.6:1 */
  --danger-dim:     rgba(190, 18, 60, 0.08);
  --warning:        #92400e;   /* ambra scura, 5.5:1 */
  --warning-dim:    rgba(180, 83, 9, 0.10);
  --medal-silver:   #6b7280;
  --medal-bronze:   #92400e;

  --accent-grad-a:  #0284c7;
  --accent-grad-b:  #0369a1;
  --on-accent:      #ffffff;

  --text-primary:   #0f172a;
  --text-secondary: #3f4d63;
  --text-muted:     #57657b;

  --border-card:    rgba(15, 23, 42, 0.10);
  --border-subtle:  rgba(15, 23, 42, 0.06);
  --border-active:  rgba(3, 105, 161, 0.45);

  --shadow-card:    0 1px 2px rgba(15, 23, 42, 0.05), 0 10px 28px rgba(15, 23, 42, 0.07);
  --shadow-glow:    0 4px 18px rgba(3, 105, 161, 0.14);

  --node-builder:     #6d28d9;
  --node-builder-dim: rgba(109, 40, 217, 0.10);

  --bg-sidebar:     #ffffff;
}

/* === RESET === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-base);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color var(--transition-slow), color var(--transition-slow);
}

/* === SCROLLBAR CUSTOM === */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-hover);
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--border-active);
}
* {
  scrollbar-width: thin;
  scrollbar-color: var(--bg-hover) var(--bg-base);
}

/* === SELEZIONE TESTO === */
::selection {
  background: var(--neon-cyan-dim);
  color: var(--text-primary);
}

/* === TIPOGRAFIA ===
   Display: Space Grotesk per titoli e cifre (carattere
   geometrico, premium); Inter per il corpo. */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-md); }

p {
  color: var(--text-secondary);
  font-size: var(--text-base);
  line-height: 1.7;
}

a {
  color: var(--neon-cyan);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { filter: brightness(1.2); }

/* === UTILITY === */
.neon-text {
  color: var(--neon-cyan);
}

.neon-border {
  border: 1px solid var(--border-active);
  box-shadow: var(--shadow-glow);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition-base), box-shadow var(--transition-base),
              transform var(--transition-base), background-color var(--transition-slow);
}
.card:hover {
  border-color: var(--border-active);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--neon-cyan-dim);
  color: var(--neon-cyan);
  border: 1px solid var(--border-active);
}

/* === BOTTONI === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-base);
  font-size: var(--text-base);
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.btn:active { transform: translateY(0) scale(0.98); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent-grad-a) 0%, var(--accent-grad-b) 100%);
  color: var(--on-accent);
  font-weight: 700;
}
.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-card);
}
.btn-ghost:hover {
  border-color: var(--border-active);
  color: var(--text-primary);
}

.btn-danger {
  background: transparent;
  color: var(--neon-red);
  border: 1px solid var(--neon-red);
}
.btn-danger:hover {
  background: var(--danger-dim);
}

.btn-sm {
  padding: 7px 14px;
  font-size: var(--text-sm);
}

/* === INPUT === */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.input-field {
  width: 100%;
  padding: 9px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-base);
  font-size: var(--text-base);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast),
              background-color var(--transition-slow);
  outline: none;
}

.input-field:focus {
  border-color: var(--border-active);
  box-shadow: 0 0 0 3px var(--neon-cyan-dim);
}

.input-field::placeholder {
  color: var(--text-muted);
}

/* === THEME TOGGLE (FASE 16) ===
   Bottone sole/luna: .theme-toggle è l'hook JS comune
   (js/theme.js); .theme-toggle-btn la variante rotonda
   per topbar/header; nel CRM è un .nav-item in sidebar.
   Sole visibile in dark ("passa al chiaro"), luna in light. */
.theme-toggle { cursor: pointer; }

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  transition: border-color var(--transition-fast), color var(--transition-fast),
              box-shadow var(--transition-fast), transform var(--transition-fast);
}
.theme-toggle-btn:hover {
  border-color: var(--border-active);
  color: var(--neon-cyan);
  box-shadow: var(--shadow-glow);
}
.theme-toggle-btn:active { transform: scale(0.92); }

.theme-toggle .tt-sun,
.theme-toggle .tt-moon { display: none; }
:root:not([data-theme="light"]) .theme-toggle .tt-sun { display: block; }
:root[data-theme="light"] .theme-toggle .tt-moon { display: block; }

/* Variante per la pagina di login (angolo in alto a destra) */
.theme-toggle-fixed {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 50;
  background: var(--bg-card);
}

/* === ACCESSIBILITÀ — focus visibile per tastiera === */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.nav-item:focus-visible,
.action-btn:focus-visible,
.step-mini:focus-visible,
[tabindex]:focus-visible,
.input-field:focus-visible,
.select-field:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* === ANIMAZIONI (150-300ms, mai invadenti) === */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes pulseNeon {
  0%, 100% { box-shadow: 0 0 8px rgba(0, 212, 255, 0.15); }
  50%       { box-shadow: 0 0 20px rgba(0, 212, 255, 0.35); }
}

/* Shake discreto per gli stati di errore dei form */
@keyframes shakeX {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-5px); }
  75%      { transform: translateX(5px); }
}

/* Shimmer per skeleton/caricamenti */
@keyframes shimmer {
  from { background-position: -200% 0; }
  to   { background-position: 200% 0; }
}

.animate-in {
  animation: fadeInUp 0.4s ease forwards;
}

.skeleton {
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-hover) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease infinite;
  color: transparent;
}

/* === ACCESSIBILITÀ — rispetta prefers-reduced-motion === */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* === RESPONSIVE BASE === */
@media (max-width: 767px) {
  :root {
    --sidebar-width-collapsed: 0px;
  }
}

img, svg, video, canvas {
  max-width: 100%;
}

.hidden { display: none !important; }

/* === FONT CIFRE MONETARIE === */
.cifra-money {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* === SELECT — freccia custom (hotfix) === */
.select-field,
.select-inline {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300d4ff' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  /* FASE 19 B — padding-right ampio: la freccia cade nell'area vuota, non copre il testo */
  padding-right: 2rem;
}

:root[data-theme="light"] .select-field,
:root[data-theme="light"] .select-inline {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230369a1' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

.select-inline {
  background-position: right 8px center;
  /* FASE 19 B — vedi sopra */
  padding-right: 2rem;
}

/* FASE 29.8 — tendine native leggibili OVUNQUE, in entrambi i temi.
   Il popup delle <option> è disegnato dal browser: color-scheme (dichiarato
   sui :root dei due temi, qui sopra) ne detta la base chiara/scura, e lo
   stile esplicito a token qui sotto blinda sfondo e testo anche quando la
   <select> ha uno sfondo trasparente o custom (Chromium su Windows deriva
   il popup dal background-color della select — era il "Sì bianco su bianco"
   della colonna Builder in dark, v35). Vale per TUTTI i select del CRM:
   filtri, celle inline, modali, bulk, import; admin.html ha la sua copia
   inline (è autocontenuto). */
select option {
  background-color: var(--bg-card);
  color: var(--text-primary);
}

/* === UTILITY (hotfix) === */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.text-center  { text-align: center; }
.text-muted   { color: var(--text-muted); }
.text-success { color: var(--neon-green); }
.text-danger  { color: var(--neon-red); }
.text-accent  { color: var(--neon-cyan); }
.mt-auto { margin-top: auto; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.gap-2 { gap: var(--sp-2); }
.gap-4 { gap: var(--sp-4); }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }

/* ═══ FASE 9 — Bandierine SVG (sostituiscono le emoji, invisibili su Windows) ═══ */
.flag-img {
  width: 20px;
  height: 15px;
  border-radius: 2px;
  vertical-align: -2px;
  object-fit: cover;
  flex-shrink: 0;
}

/* ═══ FASE 22.8a — CAMPANELLA NOTIFICHE IN-APP ═══
   Condivisa tra crm.html (variante fixed) e dashboard.html (variante topbar).
   Markup generato da js/notifiche-ui.js. */
.notif-wrap { position: relative; }

/* CRM: nessuna topbar → pulsante flottante in alto a destra
   (simmetrico all'hamburger mobile; sotto sidebar mobile z1100 e overlay z1050) */
.notif-wrap-fixed {
  position: fixed;
  top: 14px;
  right: 20px;
  z-index: 950;
}

.notif-bell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.notif-bell:hover {
  color: var(--neon-cyan);
  border-color: var(--border-active);
}
.notif-bell:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 2px;
}

.notif-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-grad-a) 0%, var(--accent-grad-b) 100%);
  color: var(--on-accent);
  font-size: 0.66rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  border-radius: var(--radius-pill);
  border: 2px solid var(--bg-primary);
  pointer-events: none;
}
/* il display:flex sopra vincerebbe sull'UA style dell'attributo hidden */
.notif-badge[hidden] { display: none; }

.notif-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  max-width: min(340px, calc(100vw - 28px));
  background: var(--bg-card);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 951;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* visibility (non display/hidden): transiziona, esce dal tab order
     e dall'albero accessibilità quando chiuso */
  visibility: hidden;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
}
.notif-panel.open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.notif-panel:focus-visible { outline: none; }

.notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.notif-panel-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.notif-panel-body {
  overflow-y: auto;
  max-height: 380px;
}

.notif-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.notif-list li + li { border-top: 1px solid var(--border-subtle); }

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  background: none;
  border: none;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.notif-item:hover { background: var(--bg-card-2); }
.notif-item:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: -2px;
}

/* Non letta: evidenziata da fondo tinto + puntino accent (non solo colore) */
.notif-item .notif-item-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: transparent;
  margin-top: 5px;
  flex-shrink: 0;
}
.notif-item.unread { background: var(--neon-cyan-dim); }
.notif-item.unread:hover { background: var(--bg-card-2); }
.notif-item.unread .notif-item-dot { background: var(--neon-cyan); }
.notif-item.unread .notif-item-title { font-weight: 700; }

.notif-item-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.notif-item-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-2);
}
.notif-item-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}
.notif-item-time {
  font-size: var(--text-xs);
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.notif-item-body {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Empty state */
.notif-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  padding: 32px 20px;
  text-align: center;
  color: var(--text-muted);
}
.notif-empty-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0;
}
.notif-empty-sub {
  font-size: var(--text-xs);
  margin: 0;
}

/* Flash sull'entità raggiunta da una notifica (crm.js) */
.notif-target-flash {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
  transition: outline-color 0.3s ease;
}

@media (max-width: 767px) {
  .notif-wrap-fixed { top: 12px; right: 12px; }
}

/* ═══ FASE 22.9 → 23 — ANNULLAMENTO ABBONAMENTO + DIRITTO DI RECESSO ═══
   Spostato qui da dashboard.html: ora serve anche il CRM (sezione account).
   Regole INVARIATE (commit d4141fd). */
.btn-annulla-abb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;              /* ≥44px di area cliccabile col line-height */
  border-radius: 8px;
  border: 1px solid rgba(255, 122, 146, 0.55);
  background: transparent;
  color: #ff8fa3;                 /* AA su sfondo scuro */
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn-annulla-abb:hover {
  background: rgba(255, 77, 109, 0.14);
  border-color: #ff8fa3;
}
.btn-annulla-abb:focus-visible {
  outline: 2px solid #ff8fa3;
  outline-offset: 2px;
}
.btn-annulla-abb:disabled { opacity: 0.6; cursor: wait; }
[data-theme="light"] .btn-annulla-abb {
  color: #be123c;                 /* rose-700: 6.6:1 su bianco */
  border-color: rgba(190, 18, 60, 0.5);
}
[data-theme="light"] .btn-annulla-abb:hover {
  background: rgba(190, 18, 60, 0.08);
  border-color: #be123c;
}
[data-theme="light"] .btn-annulla-abb:focus-visible { outline-color: #be123c; }

.recesso-info { margin-top: 12px; font-size: 0.8rem; }
.recesso-info summary {
  cursor: pointer;
  color: var(--text-secondary, #aab4c4);
  font-weight: 600;
  padding: 6px 2px;               /* target tocco più generoso */
  border-radius: 6px;
  list-style-position: inside;
  transition: color 0.2s ease;
}
.recesso-info summary:hover { color: var(--text-primary, #e8eef7); }
.recesso-info summary:focus-visible {
  outline: 2px solid var(--neon-cyan, #00d4ff);
  outline-offset: 2px;
}
.recesso-info p {
  margin: 8px 0 0;
  color: var(--text-muted, #8b95a7);
  line-height: 1.6;
}

/* Dialog di conferma annullamento (accessibile) */
.annulla-dialog-overlay {
  position: fixed; inset: 0; z-index: 9500;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.annulla-dialog-overlay.active { opacity: 1; }
.annulla-dialog {
  background: var(--bg-card, #15191f);
  border: 1px solid var(--border-subtle, #2a3344);
  border-radius: 16px;
  padding: 24px;
  max-width: 460px; width: 100%;
  display: flex; flex-direction: column; gap: 12px;
  transform: translateY(8px);
  transition: transform 0.2s ease;
}
.annulla-dialog-overlay.active .annulla-dialog { transform: translateY(0); }
.annulla-dialog h2 {
  margin: 0; font-size: 1.1rem;
  color: var(--text-primary, #e8eef7);
}
.annulla-dialog p {
  margin: 0; font-size: 0.88rem; line-height: 1.6;
  color: var(--text-secondary, #aab4c4);
}
.annulla-dialog .dialog-recesso-note {
  font-size: 0.78rem; color: var(--text-muted, #8b95a7);
}
.annulla-dialog .dialog-error {
  display: none;
  padding: 10px 12px; border-radius: 8px; font-size: 0.82rem;
  background: rgba(255, 77, 109, 0.12);
  border: 1px solid rgba(255, 77, 109, 0.5);
  color: #ff9bb0;
}
[data-theme="light"] .annulla-dialog .dialog-error { color: #be123c; }
.annulla-dialog .dialog-actions {
  display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; flex-wrap: wrap;
}
.annulla-dialog .btn-dialog-back {
  padding: 10px 16px; border-radius: 8px;
  border: 1px solid var(--border-subtle, #2a3344);
  background: transparent;
  color: var(--text-primary, #e8eef7);
  font-size: 0.85rem; font-weight: 600; cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.annulla-dialog .btn-dialog-back:hover { border-color: var(--text-muted, #8b95a7); }
.annulla-dialog .btn-dialog-back:focus-visible {
  outline: 2px solid var(--neon-cyan, #00d4ff); outline-offset: 2px;
}
.annulla-dialog .btn-dialog-confirm {
  padding: 10px 16px; border-radius: 8px; border: none;
  background: #e11d48; color: #ffffff;
  font-size: 0.85rem; font-weight: 700; cursor: pointer;
  transition: background-color 0.2s ease;
}
.annulla-dialog .btn-dialog-confirm:hover { background: #be123c; }
.annulla-dialog .btn-dialog-confirm:focus-visible {
  outline: 2px solid #ff8fa3; outline-offset: 2px;
}
.annulla-dialog .btn-dialog-confirm:disabled { opacity: 0.6; cursor: wait; }

@media (prefers-reduced-motion: reduce) {
  .annulla-dialog-overlay, .annulla-dialog,
  .btn-annulla-abb, .recesso-info summary { transition: none; }
}

/* ═══ FASE 23 — MENU UTENTE "ACCOUNT E ABBONAMENTO" ═══
   Condiviso tra dashboard.html (variante topbar, vicino alla campanella) e
   crm.html (variante fixed, accanto alla campanella flottante).
   Markup generato da js/account-ui.js. */
.account-wrap { position: relative; }

/* CRM: nessuna topbar → pulsante flottante accanto alla campanella */
.account-wrap-fixed {
  position: fixed;
  top: 14px;
  right: 68px;   /* campanella a right:20px + 40px di larghezza + 8px di gap */
  z-index: 950;
}

.account-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.account-btn:hover { border-color: var(--border-active); }
.account-btn:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 2px;
}

.account-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-pill);
  background: var(--neon-cyan-dim);
  border: 1px solid var(--border-active);
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--neon-cyan);
  flex-shrink: 0;
}
.account-avatar-lg {
  width: 44px;
  height: 44px;
  font-size: 0.95rem;
  border-radius: 12px;
}

.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  max-width: min(300px, calc(100vw - 28px));
  background: var(--bg-card);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 951;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
}
.account-menu.open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.account-menu-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
}
.account-menu-nome {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-menu-email {
  font-size: var(--text-xs);
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;               /* target tocco */
  padding: 11px 14px;
  background: none;
  border: none;
  text-align: left;
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.account-menu-item:hover { background: var(--bg-card-2); color: var(--neon-cyan); }
.account-menu-item:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: -2px;
}
.account-menu-item svg { flex-shrink: 0; color: var(--text-muted); }
.account-menu-item:hover svg { color: var(--neon-cyan); }

/* Sezione "Account e abbonamento" (dialog accessibile) */
.account-panel-overlay {
  position: fixed; inset: 0; z-index: 9400;   /* sotto il dialog annulla (9500) */
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.account-panel-overlay.active { opacity: 1; }

.account-panel {
  background: var(--bg-card, #15191f);
  border: 1px solid var(--border-subtle, #2a3344);
  border-radius: 16px;
  padding: 24px;
  max-width: 480px; width: 100%;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 18px;
  transform: translateY(8px);
  transition: transform 0.2s ease;
}
.account-panel-overlay.active .account-panel { transform: translateY(0); }

.account-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.account-panel-head h2 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--text-primary);
}
.account-panel-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}
.account-panel-close:hover { color: var(--text-primary); border-color: var(--border-active); }
.account-panel-close:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 2px;
}

.account-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
}
.account-section-title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.account-profile-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.account-profile-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.account-profile-nome {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}
.account-profile-email {
  font-size: 0.8rem;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.account-sub-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.account-sub-piano {
  font-size: 0.88rem;
  color: var(--text-secondary);
}
.account-sub-piano strong { color: var(--text-primary); }
.account-sub-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  width: fit-content;
}
.account-sub-scadenza {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.account-sub-scadenza strong { color: var(--text-secondary); }
.account-sub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

@media (max-width: 767px) {
  .account-wrap-fixed { top: 12px; right: 60px; }
}
@media (prefers-reduced-motion: reduce) {
  .account-menu, .account-panel-overlay, .account-panel { transition: none; }
}

/* ═══ FASE 23 — FOOTER LEGALE (index, dashboard, crm) ═══ */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 18px 24px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;               /* target tocco più generoso */
  padding: 0 4px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 6px;
  transition: color var(--transition-fast);
}
.site-footer a:hover { color: var(--text-primary); text-decoration: underline; }
.site-footer a:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 2px;
}

@media print {
  .notif-wrap, .account-wrap, .site-footer { display: none !important; }
}

/* === STAMPA — tema chiaro su sfondo bianco ===
   In coda al file: a parità di specificità vince sulle
   regole tema (anche con data-theme attivo). */
@media print {
  :root, :root[data-theme] {
    --bg-base: #ffffff;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f8f8;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f0f0;
    --bg-hover: #f0f0f0;
    --bg-sidebar: #ffffff;
    --bg-glass: #ffffff;
    --neon-cyan: #0077aa;
    --neon-cyan-dim: rgba(0, 119, 170, 0.08);
    --neon-cyan-glow: none;
    --shadow-glow: none;
    --shadow-card: none;
    --neon-green: #006633;
    --neon-green-dim: rgba(0, 102, 51, 0.08);
    --neon-orange: #cc4400;
    --neon-purple: #660099;
    --neon-red: #cc0033;
    --warning: #8a5a00;
    --text-primary: #000000;
    --text-secondary: #222222;
    --text-muted: #555555;
    --border-subtle: rgba(0, 0, 0, 0.12);
    --border-active: rgba(0, 0, 0, 0.3);
    --border-card: rgba(0, 0, 0, 0.1);
  }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ============================================================
   FASE 36B — GATING UI PIANI (Base / Pro)
   Lucchetti + overlay upgrade. Tutto token-based → tema-aware
   (dark/light gratis). Classi condivise da crm.html e dashboard.html
   (per questo vivono in global.css). Nessun checkout: la CTA è testuale
   ("contatta il tuo leader"). Gli override usano selettori composti per
   vincere su crm.css a prescindere dall'ordine di caricamento.
============================================================ */
.lucchetto-svg { width: 1em; height: 1em; flex-shrink: 0; vertical-align: -0.15em; }

/* --- Overlay upgrade (modale + pannello inline) --- */
.upgrade-pro {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: var(--sp-3); padding: var(--sp-4) var(--sp-2); max-width: 460px; margin: 0 auto;
}
.upgrade-pro-lucchetto {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: var(--radius-pill);
  background: var(--neon-cyan-dim); color: var(--neon-cyan);
}
.upgrade-pro-lucchetto .lucchetto-svg { width: 26px; height: 26px; }
.upgrade-pro-titolo {
  margin: 0; font-family: var(--font-display); font-size: 1.35rem; color: var(--text-primary);
}
.upgrade-pro-desc { margin: 0; color: var(--text-secondary); font-size: 0.95rem; line-height: 1.5; }
.upgrade-pro-prezzi {
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-3);
  width: 100%; margin: var(--sp-2) 0;
}
.upgrade-prezzo {
  flex: 1 1 150px; max-width: 200px; display: flex; flex-direction: column;
  align-items: center; gap: 2px; padding: var(--sp-4) var(--sp-3);
  border: 1px solid var(--border-card); border-radius: var(--radius-lg); background: var(--bg-card-2);
}
.upgrade-prezzo-best { border-color: var(--border-active); box-shadow: var(--shadow-glow); }
.upgrade-prezzo-val {
  font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: var(--text-primary);
}
.upgrade-prezzo-label { font-size: 0.85rem; color: var(--text-secondary); }
.upgrade-prezzo-nota { margin-top: 4px; font-size: 0.72rem; font-weight: 600; color: var(--neon-green); }
/* --- Pannello di sezione bloccata (non pagina bianca, 36B.5) --- */
.sezione-bloccata {
  display: flex; align-items: center; justify-content: center; min-height: 320px;
  padding: var(--sp-6) var(--sp-4); border: 1px dashed var(--border-card);
  border-radius: var(--radius-lg); background: var(--bg-card);
}

/* --- Sidebar: voci Pro col lucchetto per il Base (badge d'angolo,
       visibile anche a sidebar collassata: la nav-label è opacity:0) --- */
.nav-item-bloccato { position: relative; opacity: 0.78; }
.nav-item-bloccato .nav-lock { position: absolute; top: 4px; right: 6px; display: inline-flex; color: var(--warning); }
.nav-item-bloccato .nav-lock .lucchetto-svg { width: 13px; height: 13px; }

/* --- KPI card bloccata (Home ridotta Base): eredita .kpi-card, resetta il
       chrome del <button>. Override del valore con selettore composto. --- */
.kpi-bloccata { width: 100%; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.kpi-bloccata .kpi-icon { color: var(--warning); }
.kpi-bloccata .kpi-icon .lucchetto-svg { width: 16px; height: 16px; }
.kpi-bloccata .kpi-lock { font-size: 0.9rem; font-weight: 700; color: var(--warning); letter-spacing: 0; }

/* --- Card di rete bloccate (spazio upsell, restano visibili) --- */
.rete-bloccata-wrap { cursor: pointer; }
.rete-bloccata .rete-lock { display: inline-flex; align-items: center; color: var(--warning); }
.rete-bloccata .rete-lock .lucchetto-svg { width: 22px; height: 22px; }
.badge-pro {
  padding: 2px 8px; border-radius: var(--radius-pill); background: var(--neon-cyan-dim);
  color: var(--neon-cyan); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em;
}

/* --- Tab Clienti Pro bloccata --- */
.piano-tab-bloccata { opacity: 0.78; }
.piano-tab-bloccata .lucchetto-svg { width: 14px; height: 14px; color: var(--warning); }

/* --- Focus da tastiera sugli elementi bloccati cliccabili --- */
.rete-bloccata-wrap:focus-visible,
.kpi-bloccata:focus-visible { outline: 2px solid var(--border-active); outline-offset: 2px; }

/* ============================================================
   FASE 37B — Concessioni dati: chip picker. Stili CONDIVISI qui (non in
   crm.css) perché il pannello vive in crm.html e il passaggio onboarding in
   dashboard.html, che carica global.css ma NON crm.css.
============================================================ */
.concessioni-body { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.concessioni-sez { display: flex; flex-direction: column; gap: 6px; }
.concessioni-sez-nome {
  font-size: var(--text-sm); font-weight: 600; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.concessioni-grantees { display: flex; flex-wrap: wrap; gap: 8px; }
.concessioni-chip {
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 6px 12px; border: 1px solid var(--border-card);
  border-radius: var(--radius-md); background: var(--bg-card);
  color: var(--text-secondary); cursor: pointer; text-align: left;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.concessioni-chip:hover:not(:disabled) { border-color: var(--border-active); color: var(--text-primary); }
.concessioni-chip:disabled { opacity: 0.5; cursor: default; }
.concessioni-chip.on {
  border-color: var(--neon-green); background: var(--neon-green-dim); color: var(--text-primary);
}
.concessioni-chip-nome { font-size: var(--text-sm); font-weight: 600; }
.concessioni-chip-lv { font-size: var(--text-xs); color: var(--text-muted); }
.concessioni-chip.on .concessioni-chip-lv { color: var(--neon-green); }

/* ============================================================
   MOBILE M3 D — BANNER DI CONSENSO IUBENDA: IN FONDO ALLA PAGINA
   Decisione Mirko 27/07/2026: forzarlo a fine pagina invece che fisso, così
   non copre il contenuto mentre si scorre. L'impostazione non esiste nel
   pannello iubenda (cercata), quindi si procede via CSS.

   ⚠️ È UN WIDGET DI TERZE PARTI. Non lo emettiamo noi: lo inietta a runtime
   lo script embeds.iubenda.com, dopo i nostri fogli di stile. Di conseguenza:
   · la forzatura è agganciata a un id/classi che decide IUBENDA. Se cambiano
     il markup (o l'id) la forzatura salta SENZA PREAVVISO e il banner torna
     fisso a coprire lo schermo → va ricontrollata dopo ogni loro
     aggiornamento, non è una modifica "una volta e via";
   · serve `!important` + una specificità più alta della loro (`body >`),
     perché il loro CSS arriva dopo il nostro e usa a sua volta !important.

   ⚠️ È IL BANNER DI CONSENSO (cookie/privacy). Renderlo meno visibile ha
   implicazioni di CONFORMITÀ: l'utente potrebbe non vederlo senza scorrere
   fino in fondo. Scelta consapevole e documentata di Mirko, da rivedere —
   l'obiettivo dichiarato è toglierlo del tutto più avanti.

   Misurato prima della modifica (360×640): il banner era `position: fixed`
   ancorato in alto e la sua card nera occupava i primi 417,7px di schermo,
   cioè il 65% del telefono in verticale.

   NB: qui il banner torna nel FLUSSO, quindi finisce in fondo al documento.
   Vale per index/dashboard/privacy/termini, che hanno il body in flusso
   normale. crm.html NO: lì il body è `display:flex; height:100vh` e un figlio
   statico diventerebbe un flex item che ruba la riga a .crm-main (misurato:
   .crm-main a 0px di larghezza, stesso difetto già chiuso in FASE 25 per
   .iub__us-widget). Il caso crm.html è gestito a parte in crm.css.
============================================================ */
body > #iubenda-cs-banner {
  /* `relative`, NON `static`: in flusso stanno alla stessa identica posizione
     (nessun offset), ma `static` toglierebbe al banner ogni livello di
     impilamento e lo lascerebbe DIETRO a qualunque elemento posizionato della
     pagina. Trovato misurando su index.html: da statico la «×» del banner
     finiva sotto `.auth-panel`. Con `relative` lo z-index che iubenda mette
     inline (`z-index: 99999998 !important` sull'elemento, quindi NON
     sovrascrivibile da un foglio di stile) torna a valere e i pulsanti
     restano cliccabili. Verificato: «Rifiuta» e «Accetta» raggiungibili su
     index e dashboard dopo aver scorso fino in fondo. */
  position: relative !important;
  /* la loro regola lo stira a tutto schermo per centrare la card: senza
     questi, in flusso, lascerebbe 640px di vuoto in fondo alla pagina */
  height: auto !important;
  min-height: 0 !important;
}
