/* =============================================================
   LIQUID DESIGN SYSTEM v1.0.0 — Production
   Foundation per migrazione 114 pagine Razor verso unified design
   Benchmark: Stripe + Active Theory + MasterClass + Vercel
   ============================================================= */

/* =============================================================
   1. DESIGN TOKENS
   ============================================================= */
:root {
  /* Surface */
  --lp-bg: #06090D; /* reference liquid-portal exact color */
  --lp-bg-elevated: #0a0e1a;
  --lp-surface: rgba(8, 12, 24, 0.72);
  --lp-surface-strong: rgba(10, 15, 30, 0.88);
  --lp-surface-overlay: rgba(15, 20, 38, 0.94);
  --lp-border: rgba(255, 255, 255, 0.12);
  --lp-border-strong: rgba(255, 255, 255, 0.22);
  --lp-border-active: rgba(124, 92, 255, 0.55);

  /* Text */
  --lp-text: #f6f8ff;
  --lp-muted: rgba(246, 248, 255, 0.68);
  --lp-faint: rgba(246, 248, 255, 0.47); /* 4.52:1 su --lp-bg: soglia WCAG AA per testo normale (0.42 dava 3.87:1) */
  --lp-inverse: #05070d;

  /* Accent palette (brand demo) */
  --lp-accent: #7c5cff;
  --lp-accent-2: #00d4ff;
  --lp-accent-warm: #ff7a3d;
  --lp-accent-success: #34d399;
  --lp-accent-danger: #f87171;
  --lp-accent-warning: #fbbf24;

  /* Glow */
  --lp-glow: rgba(124, 92, 255, 0.34);
  --lp-glow-warm: rgba(255, 122, 61, 0.42);
  --lp-glow-cyan: rgba(0, 212, 255, 0.32);

  /* Spacing scale */
  --lp-space-1: 4px;
  --lp-space-2: 8px;
  --lp-space-3: 12px;
  --lp-space-4: 16px;
  --lp-space-5: 24px;
  --lp-space-6: 32px;
  --lp-space-7: 48px;
  --lp-space-8: 64px;
  --lp-space-9: 96px;
  --lp-space-10: 128px;

  /* Radius */
  --lp-radius-sm: 8px;
  --lp-radius: 14px;
  --lp-radius-lg: 20px;
  --lp-radius-xl: 28px;
  --lp-radius-pill: 999px;

  /* Typography */
  --lp-font-display: 'Inter Display', 'Inter', system-ui, -apple-system, sans-serif;
  --lp-font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --lp-font-display: 'Outfit', 'Inter', system-ui, sans-serif; /* reference heading font */
  --lp-font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;
  --lp-leading-tight: 1.15;
  --lp-leading-snug: 1.35;
  --lp-leading-body: 1.6;
  --lp-leading-loose: 1.75;

  /* Type scale (clamp responsive) */
  --lp-text-xs: 12px;
  --lp-text-sm: 14px;
  --lp-text-base: 16px;
  --lp-text-lg: 18px;
  --lp-text-xl: clamp(20px, 2vw, 24px);
  --lp-text-2xl: clamp(24px, 2.5vw, 32px);
  --lp-text-3xl: clamp(32px, 3.5vw, 44px);
  --lp-text-display: clamp(40px, 5vw, 64px);
  --lp-text-hero: clamp(48px, 7vw, 88px);

  /* Motion policy */
  --lp-motion-fast: 160ms;
  --lp-motion-base: 280ms;
  --lp-motion-slow: 600ms;
  --lp-motion-shader: 12s;
  --lp-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --lp-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --lp-ease-glide: cubic-bezier(0.65, 0, 0.35, 1);

  /* Z-index scale */
  --lp-z-bg: -4;
  --lp-z-photo: -3;
  --lp-z-mesh: -2;
  --lp-z-canvas: 2;   /* canvas davanti al content (come reference liquid-portal) */
  --lp-z-content: 10; /* content sopra canvas */
  --lp-z-floating: 40;
  --lp-z-navbar: 50;
  --lp-z-overlay: 100;
  --lp-z-modal: 1000;
  --lp-z-toast: 9999;

  /* Shadows (glow-aware) */
  --lp-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --lp-shadow: 0 4px 12px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--lp-border);
  --lp-shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--lp-border-strong);
  --lp-shadow-glow: 0 0 30px var(--lp-glow), 0 4px 18px rgba(0, 0, 0, 0.5);
  --lp-shadow-glow-warm: 0 0 30px var(--lp-glow-warm), 0 4px 18px rgba(0, 0, 0, 0.5);

  /* Container max-widths */
  --lp-container-sm: 640px;
  --lp-container: 1080px;
  --lp-container-lg: 1280px;
  --lp-container-xl: 1440px;
}

/* prefers-reduced-motion: kill all motion-driven tokens */
@media (prefers-reduced-motion: reduce) {
  :root {
    --lp-motion-fast: 0ms;
    --lp-motion-base: 0ms;
    --lp-motion-slow: 0ms;
    --lp-motion-shader: 0s;
  }
}

/* =============================================================
   2. RESET / BASE (scoped to lp-shell-unified)
   ============================================================= */
.lp-shell-unified {
  position: relative;
  min-height: 100dvh;
  min-height: 100vh; /* fallback non-dvh browsers */
  background: radial-gradient(ellipse at 50% 30%, #1a2540 0%, var(--lp-bg) 70%);
  color: var(--lp-text);
  font-family: var(--lp-font-body);
  font-size: var(--lp-text-base);
  line-height: var(--lp-leading-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  /* Freeze --gray-* to light values: shell owns its darkness via --lp-* vars.
     OS dark-mode (site.css @media) would invert these, making text on white
     backgrounds invisible across all 30+ legacy pages. */
  --white: #ffffff;
  --gray-50:  #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e4e8eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #1c1d1f;
}

.lp-shell-unified *,
.lp-shell-unified *::before,
.lp-shell-unified *::after {
  box-sizing: border-box;
}

.lp-shell-unified h1,
.lp-shell-unified h2,
.lp-shell-unified h3,
.lp-shell-unified h4,
.lp-shell-unified h5,
.lp-shell-unified h6 {
  font-family: var(--lp-font-display);
  font-weight: 600;
  line-height: var(--lp-leading-tight);
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--lp-text);
}

.lp-shell-unified p {
  margin: 0;
  color: var(--lp-text);
}

.lp-shell-unified a {
  color: var(--lp-accent);
  text-decoration: none;
  transition: color var(--lp-motion-fast) var(--lp-ease-out);
}

.lp-shell-unified a:hover {
  color: var(--lp-accent-2);
}

/* Skip link */
.lp-skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: var(--lp-z-toast);
}
.lp-skip-link:focus {
  left: 0;
  top: 0;
  width: auto;
  height: auto;
  overflow: visible;
  padding: var(--lp-space-3) var(--lp-space-4);
  background: var(--lp-accent);
  color: var(--lp-inverse);
  border-radius: 0 0 var(--lp-radius-sm) 0;
  font-weight: 600;
}

/* =============================================================
   3. BACKGROUND LAYERS (z=-4 -3 -2 -1)
   ============================================================= */
.lp-shell-unified .liquid-mesh-bg-layer {
  position: fixed;
  inset: 0;
  z-index: var(--lp-z-mesh);
  background:
    radial-gradient(ellipse 80% 60% at 20% 30%, var(--lp-glow) 0%, transparent 50%),
    radial-gradient(ellipse 70% 50% at 80% 70%, var(--lp-glow-cyan) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 50%, var(--lp-glow-warm) 0%, transparent 60%);
  opacity: 0.55;
  filter: blur(80px) saturate(1.2);
  animation: lp-mesh-drift var(--lp-motion-shader) ease-in-out infinite alternate;
  pointer-events: none;
  will-change: transform;
}

@keyframes lp-mesh-drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(2%, -2%) scale(1.05); }
  100% { transform: translate(-2%, 2%) scale(0.95); }
}

.lp-shell-unified .liquid-hero-photo {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: var(--lp-z-photo);
  object-fit: cover;
  opacity: 0.32;
  pointer-events: none;
  filter: saturate(0.8) contrast(1.1);
}

.lp-shell-unified .liquid-hero-vignette {
  position: fixed;
  inset: 0;
  z-index: -2.5;
  background:
    radial-gradient(ellipse at center, transparent 0%, transparent 40%, var(--lp-bg) 100%),
    linear-gradient(180deg, transparent 0%, transparent 60%, var(--lp-bg) 100%);
  pointer-events: none;
}

.lp-shell-unified #bg-canvas {
  position: fixed;
  inset: 0;
  z-index: var(--lp-z-canvas); /* 2 — davanti al content, pointer-events none */
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.30; /* allineato al reference liquid-portal (0.30) */
  mix-blend-mode: screen;
  display: block;
}

/* =============================================================
   4. ROUTE-KIND VARIANTS (intensity modulation)
   ============================================================= */
/* marketing — default full motion */
.lp-shell-unified[data-route-kind="marketing"] {
  /* full-strength tokens */
}

/* legal — MasterClass-grade typography focus */
.lp-shell-unified[data-route-kind="legal"] #bg-canvas         { opacity: 0.18; }
.lp-shell-unified[data-route-kind="legal"] .liquid-hero-photo { opacity: 0.12; }
.lp-shell-unified[data-route-kind="legal"] .liquid-mesh-bg-layer { opacity: 0.32; }
.lp-shell-unified[data-route-kind="legal"] .lp-page          {
  max-width: 760px;
  line-height: var(--lp-leading-loose);
}

/* support — typography focus + slight motion */
.lp-shell-unified[data-route-kind="support"] #bg-canvas       { opacity: 0.28; }
.lp-shell-unified[data-route-kind="support"] .liquid-hero-photo { opacity: 0.18; }
.lp-shell-unified[data-route-kind="support"] .lp-page         {
  max-width: 880px;
}

/* auth — Vercel-style glow on form */
.lp-shell-unified[data-route-kind="auth"] .liquid-mesh-bg-layer { opacity: 0.75; }
.lp-shell-unified[data-route-kind="auth"] .liquid-hero-photo  { opacity: 0.18; }
.lp-shell-unified[data-route-kind="auth"] .lp-main-content    {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  min-height: 100vh; /* fallback non-dvh browsers */
  padding: var(--lp-space-6) var(--lp-space-4);
}
.lp-shell-unified[data-route-kind="auth"] .lp-page            {
  max-width: 440px;
  width: 100%;
}

/* commerce — stable for trust */
.lp-shell-unified[data-route-kind="commerce"] #bg-canvas      { opacity: 0.22; }
.lp-shell-unified[data-route-kind="commerce"] .liquid-hero-photo { opacity: 0.14; }
.lp-shell-unified[data-route-kind="commerce"] .lp-page        {
  max-width: 1080px;
}

/* account — stable, content-density focused */
.lp-shell-unified[data-route-kind="account"] #bg-canvas       { opacity: 0.18; }
.lp-shell-unified[data-route-kind="account"] .liquid-hero-photo { opacity: 0.10; }
.lp-shell-unified[data-route-kind="account"] .lp-page         {
  max-width: 1120px;
}

/* app — dashboards (motion ridotta) */
.lp-shell-unified[data-route-kind="app"] .liquid-hero-photo   { opacity: 0.08; }
.lp-shell-unified[data-route-kind="app"] #bg-canvas           { opacity: 0.22; }
.lp-shell-unified[data-route-kind="app"] .liquid-mesh-bg-layer { opacity: 0.38; }
.lp-shell-unified[data-route-kind="app"] .lp-page             {
  max-width: 1320px;
}

/* admin — minimal motion, dense */
.lp-shell-unified[data-route-kind="admin"] .liquid-hero-photo { opacity: 0.04; }
.lp-shell-unified[data-route-kind="admin"] #bg-canvas         { opacity: 0.14; }
.lp-shell-unified[data-route-kind="admin"] .liquid-mesh-bg-layer { opacity: 0.28; }
.lp-shell-unified[data-route-kind="admin"] .lp-page           {
  max-width: none;
  padding-inline: var(--lp-space-5);
}
/* admin uses its own AdminTopbar (sticky) — drop the LiquidNavbar offset and
   hide the global navbar so no dark band stacks above the admin shell. */
.lp-shell-unified[data-route-kind="admin"] .lp-main-content   { padding-top: 0 !important; }
.lp-shell-unified[data-route-kind="admin"] .lp-navbar         { display: none !important; }

/* learning — distraction-free */
.lp-shell-unified[data-route-kind="learning"] .liquid-hero-photo { opacity: 0; }
.lp-shell-unified[data-route-kind="learning"] #bg-canvas      { opacity: 0.08; }
.lp-shell-unified[data-route-kind="learning"] .liquid-mesh-bg-layer { opacity: 0.20; }

/* =============================================================
   5. MAIN CONTENT WRAPPER
   ============================================================= */
.lp-main-content {
  position: relative;
  z-index: var(--lp-z-content);
  padding-top: 80px; /* navbar offset */
  padding-bottom: 64px; /* fixed footer clearance */
}

/* =============================================================
   6. PAGE PRIMITIVES
   ============================================================= */
.lp-page {
  max-width: var(--lp-container);
  margin: 0 auto;
  padding: var(--lp-space-6) var(--lp-space-5);
}

@media (max-width: 768px) {
  .lp-page {
    padding: var(--lp-space-5) var(--lp-space-4);
  }
}

.lp-page-hero {
  padding: var(--lp-space-8) 0 var(--lp-space-7) 0;
  text-align: left;
  max-width: 880px;
}

.lp-page-hero--center {
  text-align: center;
  margin: 0 auto;
}

.lp-page-kicker {
  display: inline-block;
  font-size: var(--lp-text-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lp-accent-2);
  margin-bottom: var(--lp-space-4);
}

.lp-page-title {
  font-size: var(--lp-text-display);
  font-weight: 700;
  line-height: var(--lp-leading-tight);
  letter-spacing: -0.025em;
  margin-bottom: var(--lp-space-4);
  background: linear-gradient(135deg, var(--lp-text) 0%, var(--lp-accent-2) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lp-page-title--warm {
  background: linear-gradient(135deg, var(--lp-accent-warm) 0%, var(--lp-accent) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lp-page-lede {
  font-size: var(--lp-text-xl);
  line-height: var(--lp-leading-snug);
  color: var(--lp-muted);
  max-width: 640px;
  margin-bottom: var(--lp-space-6);
}

.lp-page-section {
  padding-block: var(--lp-space-7);
}

.lp-page-section--tight {
  padding-block: var(--lp-space-5);
}

.lp-page-section--loose {
  padding-block: var(--lp-space-9);
}

.lp-page-section-title {
  font-size: var(--lp-text-2xl);
  font-weight: 600;
  margin-bottom: var(--lp-space-4);
}

.lp-page-section-lede {
  font-size: var(--lp-text-lg);
  color: var(--lp-muted);
  margin-bottom: var(--lp-space-6);
  max-width: 720px;
}

/* =============================================================
   7. CONTENT PANELS (glass surfaces)
   ============================================================= */
.lp-content-panel {
  background: var(--lp-surface);
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius-lg);
  padding: var(--lp-space-6);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  transition: border-color var(--lp-motion-base) var(--lp-ease-out),
              transform var(--lp-motion-base) var(--lp-ease-out);
}

.lp-content-panel--strong {
  background: var(--lp-surface-strong);
  border-color: var(--lp-border-strong);
}

.lp-content-panel--interactive:hover {
  border-color: var(--lp-border-active);
  transform: translateY(-2px);
  box-shadow: var(--lp-shadow-glow);
}

.lp-content-panel--padded {
  padding: var(--lp-space-7);
}

.lp-content-panel--tight {
  padding: var(--lp-space-4);
}

/* =============================================================
   8. LAYOUT PRIMITIVES (grid + stack)
   ============================================================= */
.lp-content-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--lp-space-5);
}

.lp-content-grid--auto {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.lp-content-grid--2col {
  grid-template-columns: repeat(2, 1fr);
}

.lp-content-grid--3col {
  grid-template-columns: repeat(3, 1fr);
}

.lp-content-grid--4col {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
  .lp-content-grid--3col,
  .lp-content-grid--4col {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .lp-content-grid--2col,
  .lp-content-grid--3col,
  .lp-content-grid--4col {
    grid-template-columns: 1fr;
  }
}

.lp-content-stack {
  display: flex;
  flex-direction: column;
  gap: var(--lp-space-4);
}

.lp-content-stack--lg {
  gap: var(--lp-space-6);
}

.lp-content-stack--sm {
  gap: var(--lp-space-2);
}

/* =============================================================
   9. LEGAL CONTENT (MasterClass-grade typography)
   ============================================================= */
.lp-legal-content {
  font-size: var(--lp-text-base);
  line-height: var(--lp-leading-loose);
  color: var(--lp-text);
}

.lp-legal-content h2 {
  font-size: var(--lp-text-2xl);
  margin-top: var(--lp-space-7);
  margin-bottom: var(--lp-space-4);
  color: var(--lp-text);
}

.lp-legal-content h3 {
  font-size: var(--lp-text-xl);
  margin-top: var(--lp-space-6);
  margin-bottom: var(--lp-space-3);
  color: var(--lp-text);
}

.lp-legal-content h4 {
  font-size: var(--lp-text-lg);
  margin-top: var(--lp-space-5);
  margin-bottom: var(--lp-space-2);
  font-weight: 600;
}

.lp-legal-content p {
  margin-bottom: var(--lp-space-4);
  color: var(--lp-text);
}

.lp-legal-content ul,
.lp-legal-content ol {
  margin-bottom: var(--lp-space-4);
  padding-left: var(--lp-space-6);
  color: var(--lp-text);
}

.lp-legal-content li {
  margin-bottom: var(--lp-space-2);
}

.lp-legal-content a {
  color: var(--lp-accent-2);
  text-decoration: underline;
  text-decoration-color: rgba(0, 212, 255, 0.4);
  text-underline-offset: 3px;
}

.lp-legal-content a:hover {
  text-decoration-color: var(--lp-accent-2);
}

.lp-legal-content blockquote {
  border-left: 3px solid var(--lp-accent);
  padding-left: var(--lp-space-4);
  margin: var(--lp-space-5) 0;
  color: var(--lp-muted);
  font-style: italic;
}

.lp-legal-content code {
  background: var(--lp-surface-strong);
  border: 1px solid var(--lp-border);
  padding: 2px 6px;
  border-radius: var(--lp-radius-sm);
  font-family: var(--lp-font-mono);
  font-size: 0.9em;
}

/* =============================================================
   10. ACTIONS / BUTTONS
   ============================================================= */
.lp-action-row {
  display: flex;
  gap: var(--lp-space-3);
  align-items: center;
  flex-wrap: wrap;
  margin-top: var(--lp-space-5);
}

.lp-action-row--center {
  justify-content: center;
}

.lp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--lp-space-2);
  padding: var(--lp-space-3) var(--lp-space-5);
  border-radius: var(--lp-radius-pill);
  border: 1px solid transparent;
  font-family: var(--lp-font-body);
  font-size: var(--lp-text-base);
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: all var(--lp-motion-fast) var(--lp-ease-out);
  text-decoration: none;
  white-space: nowrap;
}

.lp-button:focus-visible {
  outline: 2px solid var(--lp-accent-2);
  outline-offset: 2px;
}

.lp-button--primary {
  background: linear-gradient(135deg, var(--lp-accent-warm) 0%, var(--lp-accent) 100%);
  color: var(--lp-text);
  box-shadow: var(--lp-shadow-glow-warm);
}

.lp-button--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 40px var(--lp-glow-warm), 0 6px 20px rgba(0, 0, 0, 0.6);
  color: var(--lp-text);
}

.lp-button--ghost {
  background: var(--lp-surface);
  color: var(--lp-text);
  border-color: var(--lp-border-strong);
  backdrop-filter: blur(12px);
}

.lp-button--ghost:hover {
  background: var(--lp-surface-strong);
  border-color: var(--lp-border-active);
  color: var(--lp-text);
}

.lp-button--accent {
  background: var(--lp-accent);
  color: var(--lp-text);
  box-shadow: var(--lp-shadow-glow);
}

.lp-button--accent:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 40px var(--lp-glow), 0 6px 20px rgba(0, 0, 0, 0.6);
  color: var(--lp-text);
}

.lp-button--danger {
  background: var(--lp-accent-danger);
  color: var(--lp-text);
}

.lp-button--lg {
  padding: var(--lp-space-4) var(--lp-space-7);
  font-size: var(--lp-text-lg);
}

.lp-button--sm {
  padding: var(--lp-space-2) var(--lp-space-4);
  font-size: var(--lp-text-sm);
}

.lp-button--icon-only {
  padding: var(--lp-space-3);
  width: 44px;
  height: 44px;
}

/* =============================================================
   11. FORMS
   ============================================================= */
.lp-form {
  display: flex;
  flex-direction: column;
  gap: var(--lp-space-4);
}

.lp-form-group {
  display: flex;
  flex-direction: column;
  gap: var(--lp-space-2);
}

.lp-form-label {
  font-size: var(--lp-text-sm);
  font-weight: 500;
  color: var(--lp-muted);
}

.lp-input,
.lp-textarea,
.lp-select {
  width: 100%;
  padding: var(--lp-space-3) var(--lp-space-4);
  background: var(--lp-surface);
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  color: var(--lp-text);
  font-family: var(--lp-font-body);
  font-size: var(--lp-text-base);
  line-height: 1.4;
  transition: border-color var(--lp-motion-fast) var(--lp-ease-out),
              background var(--lp-motion-fast) var(--lp-ease-out);
  backdrop-filter: blur(8px);
}

.lp-input:focus,
.lp-textarea:focus,
.lp-select:focus {
  outline: none;
  border-color: var(--lp-accent);
  background: var(--lp-surface-strong);
  box-shadow: 0 0 0 3px var(--lp-glow);
}

.lp-input::placeholder,
.lp-textarea::placeholder {
  color: var(--lp-faint);
}

.lp-textarea {
  min-height: 120px;
  resize: vertical;
}

.lp-form-help {
  font-size: var(--lp-text-xs);
  color: var(--lp-faint);
}

.lp-form-error {
  font-size: var(--lp-text-sm);
  color: var(--lp-accent-danger);
}

/* =============================================================
   12. BADGES / PILLS
   ============================================================= */
.lp-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--lp-space-1);
  padding: 4px 10px;
  background: var(--lp-surface);
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius-pill);
  font-size: var(--lp-text-xs);
  font-weight: 500;
  color: var(--lp-muted);
}

.lp-badge--accent {
  background: rgba(124, 92, 255, 0.15);
  border-color: rgba(124, 92, 255, 0.3);
  color: var(--lp-accent);
}

.lp-badge--warm {
  background: rgba(255, 122, 61, 0.15);
  border-color: rgba(255, 122, 61, 0.3);
  color: var(--lp-accent-warm);
}

.lp-badge--success {
  background: rgba(52, 211, 153, 0.15);
  border-color: rgba(52, 211, 153, 0.3);
  color: var(--lp-accent-success);
}

.lp-badge--danger {
  background: rgba(248, 113, 113, 0.15);
  border-color: rgba(248, 113, 113, 0.3);
  color: var(--lp-accent-danger);
}

/* =============================================================
   13. UTILITY
   ============================================================= */
.lp-divider {
  height: 1px;
  background: var(--lp-border);
  margin: var(--lp-space-6) 0;
  border: 0;
}

.lp-muted-link {
  color: var(--lp-muted);
  text-decoration: none;
  transition: color var(--lp-motion-fast) var(--lp-ease-out);
}

.lp-muted-link:hover {
  color: var(--lp-accent-2);
}

.lp-text-muted   { color: var(--lp-muted); }
.lp-text-faint   { color: var(--lp-faint); }
.lp-text-accent  { color: var(--lp-accent); }
.lp-text-warm    { color: var(--lp-accent-warm); }
.lp-text-cyan    { color: var(--lp-accent-2); }

/* =============================================================
   14. TABLE OF CONTENTS (for legal pages)
   ============================================================= */
.lp-toc {
  position: sticky;
  top: 100px;
  padding: var(--lp-space-5);
  background: var(--lp-surface);
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius-lg);
  backdrop-filter: blur(16px);
}

.lp-toc-title {
  font-size: var(--lp-text-xs);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--lp-faint);
  margin-bottom: var(--lp-space-3);
  font-weight: 600;
}

.lp-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--lp-space-2);
}

.lp-toc-list a {
  color: var(--lp-muted);
  font-size: var(--lp-text-sm);
  padding: var(--lp-space-2) var(--lp-space-3);
  border-radius: var(--lp-radius-sm);
  display: block;
  transition: all var(--lp-motion-fast) var(--lp-ease-out);
}

.lp-toc-list a:hover,
.lp-toc-list a.active {
  background: rgba(124, 92, 255, 0.12);
  color: var(--lp-text);
  border-left: 2px solid var(--lp-accent);
  padding-left: calc(var(--lp-space-3) - 2px);
}

/* =============================================================
   15. BREADCRUMB
   ============================================================= */
.lp-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--lp-space-2);
  font-size: var(--lp-text-sm);
  color: var(--lp-muted);
  margin-bottom: var(--lp-space-5);
}

.lp-breadcrumb a {
  color: var(--lp-muted);
}

.lp-breadcrumb a:hover {
  color: var(--lp-text);
}

.lp-breadcrumb-separator {
  color: var(--lp-faint);
}

/* =============================================================
   16. ACCESSIBILITY
   ============================================================= */
.lp-shell-unified [aria-hidden="true"] {
  pointer-events: none;
}

.lp-shell-unified :focus-visible {
  outline: 2px solid var(--lp-accent-2);
  outline-offset: 2px;
  border-radius: var(--lp-radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  .lp-shell-unified .liquid-mesh-bg-layer {
    animation: none;
  }
  .lp-shell-unified * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* =============================================================
   17. RESPONSIVE
   ============================================================= */
@media (max-width: 768px) {
  .lp-page-hero {
    padding: var(--lp-space-6) 0 var(--lp-space-5) 0;
  }
  .lp-action-row {
    flex-direction: column;
    align-items: stretch;
  }
  .lp-button {
    justify-content: center;
  }
  .lp-toc {
    position: static;
  }
}

/* =============================================================
   18. AUTH TEMPLATE PRIMITIVES (v1.5.0)
   AuthFormTemplate dedicated classes — no inline styles, brand tokens only
   ============================================================= */
.lp-auth-panel {
  box-shadow: var(--lp-shadow-glow, 0 24px 80px -20px rgba(124, 92, 255, 0.35));
  width: 100%;
}
.lp-auth-header {
  text-align: center;
  margin-bottom: var(--lp-space-6);
}
.lp-auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--lp-space-5);
  color: var(--lp-text);
  text-decoration: none;
  transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.lp-auth-logo:hover {
  transform: translateY(-2px);
}
.lp-auth-title {
  font-size: var(--lp-text-2xl) !important;
  margin-bottom: var(--lp-space-2) !important;
}
.lp-auth-social {
  margin-bottom: var(--lp-space-5);
}
.lp-auth-alt {
  text-align: center;
  font-size: var(--lp-text-sm);
  color: var(--lp-muted);
}

/* Divider with inline label (e.g. "oppure") — replaces fragile top:-10px hack */
.lp-divider--label {
  position: relative;
  text-align: center;
  margin-block: var(--lp-space-5);
  border: 0;
  border-top: 1px solid var(--lp-border);
  height: 0;
}
.lp-divider-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--lp-surface-strong, var(--lp-surface));
  padding: 0 var(--lp-space-3);
  color: var(--lp-faint);
  font-size: var(--lp-text-xs);
  letter-spacing: 0.08em;
  text-transform: lowercase;
  font-variant: small-caps;
}

/* =============================================================
   19. LOADING STATES (skeleton primitive — taste-skill: shimmer)
   ============================================================= */
.lp-skeleton {
  position: relative;
  overflow: hidden;
  background: var(--lp-surface);
  border-radius: var(--lp-radius-md, 12px);
  isolation: isolate;
}
.lp-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.06) 50%,
    transparent 100%
  );
  animation: lp-shimmer 1.6s ease-in-out infinite;
  z-index: 1;
}
.lp-skeleton--text   { height: 1em; width: 100%; border-radius: 4px; }
.lp-skeleton--title  { height: 1.6em; width: 70%; border-radius: 6px; }
.lp-skeleton--card   { height: 220px; }
.lp-skeleton--avatar { height: 48px; width: 48px; border-radius: 50%; }
@keyframes lp-shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
@media (prefers-reduced-motion: reduce) {
  .lp-skeleton::after { animation: none; opacity: 0.4; }
}

/* =============================================================
   20. EMPTY STATES (composed "getting started" primitive)
   ============================================================= */
.lp-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--lp-space-8) var(--lp-space-5);
  gap: var(--lp-space-4);
  max-width: 520px;
  margin: 0 auto;
}
.lp-empty-state-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--lp-surface);
  color: var(--lp-accent-warm);
  border: 1px solid var(--lp-border);
}
.lp-empty-state-title {
  font-size: var(--lp-text-xl);
  font-weight: 600;
  color: var(--lp-text);
  text-wrap: balance;
}
.lp-empty-state-desc {
  font-size: var(--lp-text-base);
  color: var(--lp-muted);
  line-height: var(--lp-leading-body);
  text-wrap: pretty;
  max-width: 42ch;
}
.lp-empty-state-actions {
  display: flex;
  gap: var(--lp-space-3);
  flex-wrap: wrap;
  justify-content: center;
  margin-top: var(--lp-space-2);
}

/* =============================================================
   21. KPI CARD (DashboardShell primitive)
   ============================================================= */
.lp-kpi-card {
  display: flex;
  flex-direction: column;
  gap: var(--lp-space-2);
  padding: var(--lp-space-5);
  background: var(--lp-surface);
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius-lg, 16px);
  backdrop-filter: blur(24px) saturate(1.2);
  transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1),
              border-color 200ms ease;
}
.lp-kpi-card:hover {
  transform: translateY(-2px);
  border-color: var(--lp-accent);
}
.lp-kpi-label {
  font-size: var(--lp-text-xs);
  font-weight: 500;
  color: var(--lp-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.lp-kpi-value {
  font-size: var(--lp-text-3xl);
  font-weight: 600;
  color: var(--lp-text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.lp-kpi-delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--lp-text-sm);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.lp-kpi-delta--up   { color: var(--lp-success, #4ade80); }
.lp-kpi-delta--down { color: var(--lp-danger, #f87171); }
.lp-kpi-delta--flat { color: var(--lp-muted); }

/* =============================================================
   22. CODE BLOCK (DocsTemplate primitive — copy button + lang badge)
   ============================================================= */
.lp-code-block {
  position: relative;
  background: var(--lp-surface-strong, rgba(0, 0, 0, 0.35));
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius-md, 12px);
  padding: var(--lp-space-4) var(--lp-space-5);
  margin-block: var(--lp-space-5);
  overflow-x: auto;
  font-family: var(--lp-font-mono, ui-monospace, "SF Mono", Menlo, Consolas, monospace);
  font-size: var(--lp-text-sm);
  line-height: 1.6;
}
.lp-code-block pre,
.lp-code-block code {
  margin: 0;
  background: transparent;
  border: 0;
  padding: 0;
  white-space: pre;
  color: var(--lp-text);
}
.lp-code-lang {
  position: absolute;
  top: var(--lp-space-2);
  right: var(--lp-space-3);
  font-size: var(--lp-text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--lp-faint);
  pointer-events: none;
}
.lp-code-copy {
  position: absolute;
  top: var(--lp-space-2);
  right: var(--lp-space-2);
  padding: 4px 8px;
  font-size: var(--lp-text-xs);
  border: 1px solid var(--lp-border);
  border-radius: 6px;
  background: var(--lp-surface);
  color: var(--lp-muted);
  cursor: pointer;
  opacity: 0;
  transition: opacity 200ms ease, color 200ms ease, border-color 200ms ease;
}
.lp-code-block:hover .lp-code-copy,
.lp-code-copy:focus-visible {
  opacity: 1;
}
.lp-code-copy:hover {
  color: var(--lp-accent-warm);
  border-color: var(--lp-accent-warm);
}

/* =============================================================
   23. STAGGERED REVEAL (CSS-only stagger, no Framer/JS)
   Apply --stagger-index inline; respects prefers-reduced-motion
   ============================================================= */
.lp-stagger-item {
  opacity: 0;
  transform: translateY(12px);
  animation: lp-stagger-in 600ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--stagger-index, 0) * 80ms);
}
@keyframes lp-stagger-in {
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .lp-stagger-item { animation: none; opacity: 1; transform: none; }
}

/* =============================================================
   24. BENCHMARK ALIGNMENT (Stripe + ActiveTheory + Masterclass + Vercel)
   ============================================================= */

/* --- text utilities (replaces inline font-size hacks) --- */
.lp-text-meta {
  font-size: var(--lp-text-sm);
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

/* --- Inline-style replacements for templates --- */
.lp-content-panel--cta {
  text-align: center;
  padding: var(--lp-space-8) var(--lp-space-6);
}
.lp-listing-results-header {
  margin-bottom: var(--lp-space-5);
}
.lp-listing-pagination {
  text-align: center;
}
.lp-page--dashboard {
  max-width: none;
  padding-inline: var(--lp-space-5);
}
.lp-dashboard-heading { display: contents; }
.lp-dashboard-title {
  font-size: var(--lp-text-2xl) !important;
  margin-bottom: var(--lp-space-1) !important;
}
.lp-dashboard-lede {
  font-size: var(--lp-text-sm);
}
.lp-dashboard-actions {
  margin: 0 !important;
}
.lp-page--docs {
  max-width: var(--lp-container-lg);
}
.lp-docs-header {
  margin-bottom: var(--lp-space-6);
}
.lp-docs-title {
  font-size: var(--lp-text-3xl) !important;
  margin-bottom: var(--lp-space-3) !important;
}

/* --- STRIPE: Mesh gradient drift (slow, professional, never overpowering) --- */
.lp-shell-unified .liquid-mesh-bg-layer {
  /* Enhance mesh gradient — subtle, slow drift, low saturation */
  filter: saturate(0.78);
}
@media (prefers-reduced-motion: no-preference) {
  /* Override default mesh-drift duration to slower 28s — Stripe-like calm */
  .lp-shell-unified[data-route-kind="marketing"] .liquid-mesh-bg-layer,
  .lp-shell-unified[data-route-kind="legal"] .liquid-mesh-bg-layer,
  .lp-shell-unified[data-route-kind="support"] .liquid-mesh-bg-layer {
    animation-duration: 28s;
  }
}

/* --- MASTERCLASS: Display typography hero (text is the hero) --- */
.lp-page-title--display {
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  letter-spacing: -0.045em;
  line-height: 0.98;
  font-weight: 600;
  text-wrap: balance;
  max-width: 18ch;
}
.lp-page-title--editorial {
  /* Sentence case + slight italics for editorial feel */
  text-transform: none;
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.lp-page-lede--wide {
  font-size: var(--lp-text-lg);
  max-width: 60ch;
  text-wrap: pretty;
  color: var(--lp-muted);
  line-height: 1.6;
}
.lp-prose {
  /* Body content: readable line-length per Masterclass */
  max-width: 65ch;
  font-size: var(--lp-text-base);
  line-height: 1.72;
  color: var(--lp-text);
}
.lp-prose p { margin-block: var(--lp-space-4); text-wrap: pretty; }
.lp-prose h2 {
  margin-block: var(--lp-space-7) var(--lp-space-3);
  font-size: var(--lp-text-2xl);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.lp-prose h3 {
  margin-block: var(--lp-space-5) var(--lp-space-2);
  font-size: var(--lp-text-xl);
  letter-spacing: -0.015em;
}

/* --- VERCEL: Tinted glow shadows + z-axis stratification --- */
.lp-glow-warm   { box-shadow: 0 24px 80px -16px rgba(255, 122, 61, 0.30), 0 0 0 1px var(--lp-border); }
.lp-glow-accent { box-shadow: 0 24px 80px -16px rgba(124, 92, 255, 0.30), 0 0 0 1px var(--lp-border); }
.lp-glow-cool   { box-shadow: 0 24px 80px -16px rgba(0, 212, 255, 0.25), 0 0 0 1px var(--lp-border); }

.lp-elevation-1 { box-shadow: 0 1px 2px rgba(0,0,0,0.10), 0 4px 12px -4px rgba(0,0,0,0.18); }
.lp-elevation-2 { box-shadow: 0 4px 8px -2px rgba(0,0,0,0.14), 0 12px 32px -8px rgba(0,0,0,0.22); }
.lp-elevation-3 { box-shadow: 0 8px 16px -4px rgba(0,0,0,0.18), 0 24px 64px -16px rgba(0,0,0,0.30); }

/* Vercel-style hover lift on cards and panels */
.lp-content-panel--interactive {
  transition: transform 240ms cubic-bezier(0.34, 1.56, 0.64, 1),
              border-color 240ms ease,
              box-shadow 240ms ease;
}
.lp-content-panel--interactive:hover {
  transform: translateY(-3px);
  border-color: var(--lp-accent-warm);
  box-shadow: 0 24px 80px -20px rgba(255, 122, 61, 0.28),
              0 0 0 1px var(--lp-border);
}

/* Spotlight border (cursor-following accent on cards — taste-skill premium) */
.lp-content-panel--spotlight {
  position: relative;
  isolation: isolate;
}
.lp-content-panel--spotlight::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(
    600px circle at var(--lp-mouse-x, 50%) var(--lp-mouse-y, 50%),
    var(--lp-accent-warm, #ff7a3d) 0%,
    transparent 40%
  );
  mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  -webkit-mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 200ms ease;
  pointer-events: none;
  z-index: 1;
}
.lp-content-panel--spotlight:hover::before { opacity: 1; }

/* --- ACTIVE THEORY: Magnetic interaction (CSS-driven, JS-augmented) --- */
.lp-magnetic {
  --magnet-x: 0;
  --magnet-y: 0;
  transform: translate3d(calc(var(--magnet-x) * 1px), calc(var(--magnet-y) * 1px), 0);
  transition: transform 400ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.lp-magnetic--active {
  transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Grain overlay (taste-skill: break digital flatness) */
.lp-shell-unified::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
}
@media (prefers-reduced-motion: reduce) {
  .lp-shell-unified::after { display: none; }
}

/* =============================================================
   25. READING PROGRESS (scroll-driven, CSS-only with JS fallback)
   Apply <div class="lp-reading-progress" data-target="article"></div>
   ============================================================= */
.lp-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  z-index: var(--lp-z-toolbar, 100);
  pointer-events: none;
}
.lp-reading-progress::after {
  content: "";
  display: block;
  height: 100%;
  width: var(--lp-progress, 0%);
  background: linear-gradient(90deg,
    var(--lp-accent-warm) 0%,
    var(--lp-accent) 50%,
    var(--lp-accent-2) 100%
  );
  transform-origin: 0 50%;
  transition: width 80ms linear;
}

/* Scroll-driven progress for browsers that support it (Chrome 115+, Safari TP) */
@supports (animation-timeline: scroll()) {
  @keyframes lp-progress-grow {
    from { width: 0%; }
    to   { width: 100%; }
  }
  .lp-reading-progress::after {
    animation: lp-progress-grow linear forwards;
    animation-timeline: scroll(root);
    animation-range: 0 100%;
    width: 0%;
    transition: none;
  }
}

/* =============================================================
   26. TOC ACTIVE STATE (scroll-driven on supporting browsers)
   ============================================================= */
@supports (animation-timeline: scroll()) {
  /* Falls back gracefully — JS may also toggle .active for legacy browsers */
}
.lp-toc-list a {
  position: relative;
  transition: color 200ms ease, border-color 200ms ease, background 200ms ease;
}
.lp-toc-list a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--lp-accent);
  transform: scaleY(0);
  transform-origin: 50% 50%;
  transition: transform 240ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.lp-toc-list a.active::before,
.lp-toc-list a:hover::before { transform: scaleY(1); }

/* =============================================================
   27. MOBILE OPTIMIZATIONS (Active Theory - safe-area + hover-suppress)
   ============================================================= */
@media (max-width: 768px) {
  .lp-page,
  .lp-page--dashboard,
  .lp-page--docs {
    padding-inline: max(var(--lp-space-4), env(safe-area-inset-left));
  }
  .lp-shell-unified::after { opacity: 0.018; } /* less grain on mobile */
}
@media (hover: none) {
  /* Touch devices — disable hover lift to avoid sticky :hover artifacts */
  .lp-content-panel--interactive:hover { transform: none; }
  .lp-magnetic { transform: none !important; }
}

/* =============================================================
   AUTH COOKIE NOTICE — lightweight non-blocking banner
   ============================================================= */
.lp-cookie-notice {
  position: fixed;
  bottom: 64px; /* above footer */
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(15,18,28,0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  font-size: 0.82rem;
  color: rgba(240,236,228,0.7);
  white-space: nowrap;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}

.lp-cookie-notice a {
  color: rgba(138,96,235,0.9);
  text-decoration: underline;
}

.lp-cookie-notice button {
  background: none;
  border: none;
  color: rgba(240,236,228,0.4);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0 2px;
  line-height: 1;
}

.lp-cookie-notice button:hover {
  color: rgba(240,236,228,0.8);
}

/* =============================================================
   GDPR COOKIE WALL — Liquid dark v1.5.0 override
   bundle-gdpr-v339.css ha gradient blu→viola→rosa hardcoded
   inadatto al tema dark. Override completo qui.
   ============================================================= */

.cookie-wall-overlay {
  background: linear-gradient(180deg,
    rgba(6,9,13,0.85) 0%,
    rgba(15,20,38,0.92) 50%,
    rgba(6,9,13,0.95) 100%) !important;
  backdrop-filter: blur(24px) saturate(1.2) !important;
  -webkit-backdrop-filter: blur(24px) saturate(1.2) !important;
}

.cookie-wall-modal {
  background: rgba(15,20,38,0.94) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6),
              0 0 0 1px rgba(255,255,255,0.06) !important;
  color: #f6f8ff !important;
}

.cookie-wall-modal h1,
.cookie-wall-modal h2,
.cookie-wall-modal h3,
.cookie-wall-modal .cookie-wall-title {
  color: #f0ece4 !important;
}

.cookie-wall-modal p,
.cookie-wall-modal .cookie-wall-subtitle,
.cookie-wall-modal label,
.cookie-wall-modal span:not(.badge):not(.icon-wrap):not(.cookie-wall-title) {
  color: rgba(240,236,228,0.78) !important;
}

/* Settings cards (Strettamente necessari, Analisi, ecc.) */
.cookie-settings-card,
.cookie-category-card,
.cookie-preference-card,
.cookie-toggle-row,
.cookie-wall-modal .card,
.cookie-wall-modal [class*="cookie-category"],
.cookie-wall-modal [class*="preference"] {
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  border-radius: 14px !important;
  color: #f0ece4 !important;
}

/* AI avatar / branding section */
.ai-avatar-section {
  background: linear-gradient(135deg, rgba(124,92,255,0.15), rgba(0,212,255,0.08)) !important;
}

/* CTA buttons — warm accent invece di viola */
.cookie-wall-modal button[class*="accept"],
.cookie-wall-modal .btn-accept,
.cookie-wall-modal button.primary,
.cookie-wall-modal .accept-all {
  background: linear-gradient(135deg, #ff7a3d, #e87c2a) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 8px 24px rgba(255,122,61,0.35) !important;
}

.cookie-wall-modal button[class*="save"],
.cookie-wall-modal .btn-save {
  background: linear-gradient(135deg, #34d399, #10b981) !important;
  color: #062d20 !important;
  border: none !important;
}

.cookie-wall-modal button[class*="reject"],
.cookie-wall-modal button[class*="back"],
.cookie-wall-modal button[class*="indietro"],
.cookie-wall-modal .btn-reject {
  background: rgba(255,255,255,0.06) !important;
  color: #f0ece4 !important;
  border: 1px solid rgba(255,255,255,0.18) !important;
}

/* Sostituisci tutti i background viola hardcoded #6C3CE1 dentro la wall */
.cookie-wall-overlay [style*="6C3CE1"],
.cookie-wall-overlay [style*="6c3ce1"] {
  background: rgba(255,255,255,0.06) !important;
  background-image: none !important;
}

.cookie-wall-modal a,
.cookie-wall-modal .privacy-link {
  color: #7c5cff !important;
}

.cookie-wall-modal a:hover {
  color: #ff7a3d !important;
}

/* Toggle switches dark */
.cookie-wall-modal input[type="checkbox"]:checked + label,
.cookie-wall-modal .toggle-switch.active,
.cookie-wall-modal [class*="toggle"][class*="active"] {
  background: linear-gradient(135deg, #7c5cff, #00d4ff) !important;
}

/* Scrollbar styling per coerenza */
.cookie-settings-content::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15) !important;
}
.cookie-settings-content::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.2) !important;
}

/* GDPR sub-modali Privacy/Cookie policy — Liquid dark coerente */
.policy-modal-header,
.policy-modal-content,
[class*="policy-modal"] [class*="header"] {
  background: linear-gradient(135deg, rgba(124,92,255,0.15), rgba(0,212,255,0.08)) !important;
  color: #f0ece4 !important;
  border-bottom: 1px solid rgba(255,255,255,0.10) !important;
}

.policy-close-btn,
[class*="policy-close"] {
  background: rgba(255,255,255,0.10) !important;
  color: #f0ece4 !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
}
.policy-close-btn:hover,
[class*="policy-close"]:hover {
  background: rgba(255,122,61,0.25) !important;
  border-color: rgba(255,122,61,0.5) !important;
}

[class*="policy-modal-overlay"],
[class*="policy-overlay"] {
  background: rgba(6,9,13,0.85) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
}

[class*="policy-modal"] {
  background: rgba(15,20,38,0.96) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  color: #f0ece4 !important;
}

[class*="policy-modal"] h1,
[class*="policy-modal"] h2,
[class*="policy-modal"] h3 {
  color: #f0ece4 !important;
}

[class*="policy-modal"] p,
[class*="policy-modal"] li,
[class*="policy-modal"] td {
  color: rgba(240,236,228,0.78) !important;
}

/* GDPR toggle slider attivo + icone */
.cookie-wall-modal .switch-slider,
[class*="switch-slider"] {
  background: linear-gradient(135deg, #7c5cff, #00d4ff) !important;
}

.cookie-wall-modal .btn-icon,
.cookie-wall-modal i.btn-icon {
  background: transparent !important;
  background-image: none !important;
  color: #f0ece4 !important;
}
