/* ==========================================
   1. IMPORT GOOGLE FONTS
   ========================================== */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500&family=JetBrains+Mono:wght@400;500&display=swap');

/* ==========================================
   2. RESET CSS MINIMALE E MODERNO
   ========================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  width: 100%;
  background-color: var(--bg-primary);
  color: var(--black-matte);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ==========================================
   3. DESIGN TOKENS (:root)
   ========================================== */
:root {
  /* ─── BACKGROUNDS ─────────────────────────────── */
  --bg-primary:       #DDE8E4;   /* menta ghiaccio — sfondo pagina principale */
  --bg-secondary:     #C8C4BE;   /* grigio caldo — sfondo sezioni alternate */
  --bg-surface:       #F5F0EC;   /* bianco avorio — cards, modali, navbar */
  --bg-dark:          #1A1A1A;   /* nero matte — sezioni dark, footer, hero dark */

  /* ─── VERDE (colore primario) ─────────────────── */
  --green-900:        #2E4228;   /* testi su sfondo chiaro, massima enfasi */
  --green-700:        #4A6741;   /* colore primario — bottoni, link, accenti */
  --green-500:        #5C9A3C;   /* hover states, icone, highlights */
  --green-300:        #7A9175;   /* bordi verdi, testi secondari su dark */
  --green-100:        #B8D4C0;   /* sfondo badge verde, fills leggeri */
  --green-55:         #DDE8E4;   /* alias di --bg-primary */

  /* ─── ACCENT FLOREALE ─────────────────────────── */
  --blush:            #E8B4B8;   /* rosa cipria — accento delicato, tags */
  --rose:             #D4849A;   /* rosa saturo — hover su blush, links */
  --lavender:         #C4A8D4;   /* lavanda — accent secondario, sezioni 3 */
  --violet:           #8B6BA8;   /* viola — testi su lavanda, icone accent */

  /* ─── METALLICO (accent premium) ─────────────── */
  --gold:             #C8952A;   /* oro — CTA premium, bordi card dark */
  --gold-dark:        #9A6E1A;   /* oro scuro — gradient, hover su gold */
  --gold-light:       #D4A840;   /* oro chiaro — highlights, luci */
  --steel:            #8A9098;   /* acciaio — testi muted, bordi neutri */
  --steel-dark:       #6A7580;   /* acciaio scuro — testi secondari */
  --chrome:           #9EA8B0;   /* cromato — superfici metalliche, dividers */

  /* ─── ORGANICO / NEUTRI CALDI ─────────────────── */
  --skin-light:       #E8D5C0;   /* beige caldo — card surface alternativa */
  --skin-mid:         #D9B99B;   /* beige medio — ombre, gradient warm */
  --skin-dark:        #C4A882;   /* beige scuro — bordi warm, testi su skin */

  /* ─── ASSOLUTI ────────────────────────────────── */
  --white-pearl:      #F5EDE0;   /* bianco caldo — testi su dark bg */
  --white-pure:       #FFFFFF;   /* bianco puro — fills, bordi glass */
  --black-matte:      #1A1A1A;   /* nero — testo principale su sfondo chiaro */

  /* ─── SEMANTICI ───────────────────────────────── */
  --color-success:    #4A6741;   /* usa --green-700 */
  --color-warning:    #C8952A;   /* usa --gold */
  --color-error:      #A8464A;   /* rosso desaturato — coerente col mood */
  --color-info:       #5A7A9A;   /* blu-grigio neutro */

  /* ─── FONTS ───────────────────────────────────── */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;

  /* ─── SPACING SCALE (base 8px) ────────────────── */
  --space-1:   4px;
  --space-2:   8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;  /* padding sezioni standard */
  --space-40: 160px;  /* padding hero */

  /* ─── ELEVAZIONE & OMBRE ──────────────────────── */
  --shadow-0: none;
  --border-subtle: 1px solid rgba(138, 144, 152, 0.15);
  --shadow-1: 0 2px 12px rgba(74, 103, 65, 0.06);
  --shadow-2: 0 8px 32px rgba(74, 103, 65, 0.10);
  --shadow-3: 0 24px 64px rgba(26, 26, 26, 0.18);
  --shadow-dark: 0 8px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(200, 149, 42, 0.08);
  --focus-ring: 0 0 0 3px rgba(74, 103, 65, 0.20);

  /* ─── BORDER RADIUS ───────────────────────────── */
  --radius-sm:   8px;    /* input, badge, elementi piccoli */
  --radius-md:  14px;    /* input grandi, bottoni square */
  --radius-lg:  20px;    /* card meccanica */
  --radius-xl:  28px;    /* card organica e neurale */
  --radius-2xl: 40px;    /* sezioni hero con immagini */
  --radius-full: 100px;  /* bottoni pill, badge */

  /* ─── EASING CURVES ───────────────────────────── */
  --ease-smooth:  cubic-bezier(0.25, 0.46, 0.45, 0.94);  /* default */
  --ease-spring:  cubic-bezier(0.34, 1.56, 0.64, 1.00);  /* bounce lieve */
  --ease-in-soft: cubic-bezier(0.55, 0.00, 1.00, 0.45);  /* exit */
  --ease-linear:  linear;                                  /* rotazioni */
}

/* ==========================================
   4. TIPOGRAFIA ED UTILITÀ TESTO
   ========================================== */
.text-hero {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 6.5vw, 6.8rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 0.92;
  color: var(--black-matte);
}

.text-h1 {
  font-family: var(--font-display);
  font-size: clamp(2.0rem, 3.8vw, 3.8rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--black-matte);
}

.text-h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.3vw, 2.6rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.1;
  color: var(--black-matte);
}

.text-h3 {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--black-matte);
}

.text-body {
  font-family: var(--font-body);
  font-size: 1.0rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--steel-dark);
}

.text-body-md {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--black-matte);
}

.text-label {
  font-family: var(--font-mono);
  font-size: 0.70rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-700);
}

.text-caption {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--steel);
  line-height: 1.5;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.italic { font-style: italic; }

/* ==========================================
   5. BOTTONI
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 13px 28px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.35s var(--ease-smooth);
  user-select: none;
}

.btn-primary {
  background: var(--green-700);
  color: var(--white-pure);
}
.btn-primary:hover:not(:disabled) {
  background: var(--green-900);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(74, 103, 65, 0.22);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-outline {
  border: 1.5px solid var(--green-700);
  background: transparent;
  color: var(--green-700);
}
.btn-outline:hover:not(:disabled) {
  background: rgba(74, 103, 65, 0.06);
  transform: translateY(-2px);
}
.btn-outline:active:not(:disabled) { transform: translateY(0); }
.btn-outline:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--black-matte);
}
.btn-gold:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(200, 149, 42, 0.28);
}
.btn-gold:active:not(:disabled) { transform: translateY(0); }
.btn-gold:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-ghost {
  border: 1px solid rgba(245, 237, 224, 0.3);
  background: rgba(255, 255, 255, 0.05);
  color: var(--white-pearl);
}
.btn-ghost:hover:not(:disabled) {
  border-color: rgba(245, 237, 224, 0.6);
  background: rgba(255, 255, 255, 0.1);
}
.btn-ghost:disabled { opacity: 0.4; cursor: not-allowed; }

/* Dimensioni Bottoni */
.btn-lg {
  padding: 16px 36px;
  font-size: 1rem;
}
.btn-sm {
  padding: 8px 18px;
  font-size: 0.8rem;
}

/* ==========================================
   6. CARDS
   ========================================== */
.card {
  transition: transform 0.4s var(--ease-smooth),
              box-shadow 0.4s var(--ease-smooth),
              border-color 0.4s ease;
}

/* ── CARD ORGANICA — superficie menta/glass ── */
.card-organic {
  background: rgba(221, 232, 228, 0.55);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow:
    0 8px 32px rgba(74, 103, 65, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.card-organic:hover {
  transform: translateY(-6px);
  box-shadow:
    0 20px 48px rgba(74, 103, 65, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* ── CARD MECCANICA — superficie dark/oro ── */
.card-mechanical {
  background: rgba(26, 26, 26, 0.94);
  border: 1px solid rgba(200, 149, 42, 0.28);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(200, 149, 42, 0.08);
}
.card-mechanical:hover {
  transform: translateY(-6px);
  border-color: rgba(200, 149, 42, 0.55);
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.40),
    inset 0 1px 0 rgba(200, 149, 42, 0.12);
}

/* ── CARD NEURALE — superficie beige/avorio ── */
.card-neural {
  background: var(--skin-light);
  border: 1px solid rgba(196, 168, 130, 0.28);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: 0 4px 24px rgba(196, 164, 130, 0.12);
}
.card-neural:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(196, 164, 130, 0.20);
}

/* ==========================================
   7. BADGES & TAGS
   ========================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge-green {
  background: rgba(74, 103, 65, 0.11);
  color: var(--green-700);
  border: 1px solid rgba(74, 103, 65, 0.20);
}

.badge-gold {
  background: rgba(200, 149, 42, 0.11);
  color: var(--gold-dark);
  border: 1px solid rgba(200, 149, 42, 0.22);
}

.badge-lavender {
  background: rgba(139, 107, 168, 0.11);
  color: var(--violet);
  border: 1px solid rgba(139, 107, 168, 0.22);
}

.badge-rose {
  background: rgba(212, 132, 154, 0.11);
  color: #903458;
  border: 1px solid rgba(212, 132, 154, 0.22);
}

.badge-steel {
  background: rgba(106, 117, 128, 0.09);
  color: var(--steel-dark);
  border: 1px solid rgba(106, 117, 128, 0.18);
}

.badge-dark {
  background: var(--black-matte);
  color: var(--white-pearl);
  border: none;
}

/* ==========================================
   8. FORM / INPUT
   ========================================== */
.input {
  width: 100%;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(74, 103, 65, 0.18);
  border-radius: var(--radius-md);
  padding: 13px 18px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--black-matte);
  outline: none;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.input::placeholder { color: var(--steel); }

.input:focus {
  border-color: var(--green-700);
  background: rgba(255, 255, 255, 0.80);
  box-shadow: 0 0 0 3px rgba(74, 103, 65, 0.10);
}

.input:hover:not(:focus) {
  border-color: rgba(74, 103, 65, 0.30);
}

.input-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--green-700);
  margin-bottom: 8px;
}

.select {
  width: 100%;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(74, 103, 65, 0.18);
  border-radius: var(--radius-md);
  padding: 13px 18px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--black-matte);
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%234A6741' stroke-width='1.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.select:focus {
  border-color: var(--green-700);
  background-color: rgba(255, 255, 255, 0.80);
  box-shadow: 0 0 0 3px rgba(74, 103, 65, 0.10);
}

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

/* ==========================================
   9. NAVBAR (PUBBLICA)
   ========================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: rgba(245, 240, 236, 0.75);
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  transition: background 0.3s ease;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--green-900);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--steel-dark);
  transition: color 0.25s ease;
}
.nav-link:hover { color: var(--green-700); }
.nav-link.active { color: var(--green-700); font-weight: 500; }

/* Con 4 voci in navbar (Home, Prenota, Area Dipendente, Area Titolare)
   su schermi stretti compattiamo logo e link per evitare l'overflow */
@media (max-width: 560px) {
  .nav-logo span { display: none; }
  .nav-links { gap: 14px; }
  .nav-link { font-size: 0.8rem; }
}

/* ==========================================
   10. DIVIDERS
   ========================================== */
.divider-gold {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 64px 0;
}
.divider-gold::before,
.divider-gold::after {
  content: '';
  flex: 1;
  max-width: 120px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
}

.divider-thin {
  border: none;
  border-top: 1px solid rgba(138, 144, 152, 0.15);
  margin: 48px 0;
}

/* ==========================================
   11. LAYOUT & GRID SYSTEM
   ========================================== */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
}

.main-content {
  margin-top: 64px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 32px;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================
   12. ANIMAZIONI & KEYFRAMES
   ========================================== */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.animate-in {
  animation: fade-up 0.6s var(--ease-smooth) both;
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}
.float { animation: float 5s ease-in-out infinite; }

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.spin-slow { animation: spin-slow 12s linear infinite; }

@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.55; }
}
.pulse { animation: pulse-soft 2.5s ease-in-out infinite; }

.stagger-1 { animation-delay: 0ms; }
.stagger-2 { animation-delay: 80ms; }
.stagger-3 { animation-delay: 160ms; }
.stagger-4 { animation-delay: 240ms; }

/* ==========================================
   13. ICONE (LUCIDE OVERRIDE)
   ========================================== */
.icon {
  stroke-width: 1.5px;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: inline-block;
}
.icon-sm  { width: 16px; height: 16px; }
.icon-md  { width: 20px; height: 20px; }
.icon-lg  { width: 24px; height: 24px; }
.icon-xl  { width: 32px; height: 32px; }

/* ==========================================
   14. IMMAGINI UTILITIES
   ========================================== */
.img-card {
  border-radius: var(--radius-xl);
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.img-overlay {
  position: relative;
}
.img-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    to bottom,
    transparent 40%,
    rgba(26, 26, 26, 0.6) 100%
  );
}

/* ==========================================
   14b. CAROSELLO NEGOZIO (card selezione + banner prenotazione)
   ========================================== */
.negozio-card {
  position: relative;
  overflow: hidden;
  height: 260px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: var(--shadow-1, 0 4px 16px rgba(26, 26, 26, 0.08));
  transition: transform 0.4s var(--ease-smooth, cubic-bezier(0.4, 0, 0.2, 1)),
              box-shadow 0.4s var(--ease-smooth, cubic-bezier(0.4, 0, 0.2, 1));
}
.negozio-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-2, 0 12px 32px rgba(26, 26, 26, 0.16));
}

/* Banner a carosello riutilizzabile */
.carousel-banner {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  user-select: none;
}
.carousel-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.carousel-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(26, 26, 26, 0.15) 0%,
    rgba(26, 26, 26, 0.45) 50%,
    rgba(26, 26, 26, 0.85) 100%
  );
}
.carousel-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--space-2, 8px);
  padding: var(--space-6, 24px);
  pointer-events: none;
}
.carousel-dots {
  position: absolute;
  bottom: 12px;
  right: 16px;
  z-index: 3;
  display: flex;
  gap: 6px;
}
.carousel-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.45);
  transition: background 0.2s ease, transform 0.2s ease;
}
.carousel-dot.active {
  background: var(--white-pure);
  transform: scale(1.25);
}

.negozio-carousel-fallback {
  background: radial-gradient(circle at 30% 20%, var(--green-700) 0%, var(--bg-dark) 100%);
}
.negozio-carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  z-index: 0;
  transition: opacity 1.2s ease-in-out,
              transform 6s var(--ease-smooth, cubic-bezier(0.4, 0, 0.2, 1));
}
.negozio-carousel-slide.active {
  opacity: 1;
  z-index: 1;
}
.negozio-card:hover .negozio-carousel-slide.active {
  transform: scale(1.06);
}

.negozio-nome {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--white-pure);
  line-height: 1.15;
}
.negozio-indirizzo {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: rgba(245, 237, 224, 0.85);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Banner col nome negozio durante il flusso di prenotazione.
   L'indicatore "Passo X di 6" NON va qui: vive nell'intestazione di ogni step,
   accanto al tasto indietro (`.step-container`). */
.negozio-banner {
  position: relative;
  width: 100%;
  height: 220px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-1, 0 4px 16px rgba(26, 26, 26, 0.08));
}
.negozio-banner .carousel-content {
  padding: 20px 26px;
  gap: 6px;
}
.negozio-banner-name {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 400;
  color: var(--white-pure);
  line-height: 1.1;
}

@media (max-width: 768px) {
  .negozio-banner {
    height: 180px;
  }
  .negozio-banner .carousel-content {
    padding: 16px 20px;
  }
  .negozio-banner-name {
    font-size: 1.6rem;
  }
}

/* ==========================================
   14c. LIGHTBOX FOTO NEGOZIO (carosello a schermo intero)
   ========================================== */
/* z-index 950: sopra navbar (100) e modali (900), sotto il cookie banner (1100) */
.foto-lightbox {
  position: fixed;
  inset: 0;
  z-index: 950;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(16, 16, 16, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fade-in 0.3s var(--ease-smooth) both;
  user-select: none;
}
.foto-lightbox-stage {
  position: relative;
  max-width: 92vw;
  max-height: 86vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.foto-lightbox-img {
  max-width: 92vw;
  max-height: 86vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  animation: fade-in 0.4s var(--ease-smooth) both;
}
.foto-lightbox-close,
.foto-lightbox-nav {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.12);
  color: var(--white-pure);
  cursor: pointer;
  transition: background 0.25s var(--ease-smooth), transform 0.25s var(--ease-smooth);
}
.foto-lightbox-close:hover,
.foto-lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.24);
}
.foto-lightbox-close {
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
}
.foto-lightbox-nav {
  top: 50%;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
}
.foto-lightbox-nav.prev { left: 20px; }
.foto-lightbox-nav.next { right: 20px; }
.foto-lightbox-nav:hover { transform: translateY(-50%) scale(1.06); }
.foto-lightbox-counter {
  position: absolute;
  top: 28px;
  left: 24px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.85);
}
.foto-lightbox-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

@media (max-width: 768px) {
  .foto-lightbox {
    padding: 12px;
  }
  /* Su smartphone si scorre con lo swipe: le frecce ruberebbero spazio alla foto */
  .foto-lightbox-nav {
    display: none;
  }
  .foto-lightbox-img {
    max-width: 96vw;
    max-height: 78vh;
  }
}

/* ==========================================
   14b. FUNNEL PRENOTAZIONE — LAYOUT STEP
   ========================================== */
/* Griglia asimmetrica: intestazione + scheda riassunto nella colonna sinistra,
   scelte nella colonna destra. Su mobile i tre blocchi si impilano nell'ordine
   intestazione → scelte → riassunto (la scheda va SOTTO le scelte). */
.booking-layout {
  display: grid;
  gap: 32px;
  align-items: start;
  margin-top: 24px;
  grid-template-columns: 4fr 8fr;
  grid-template-areas:
    "head    content"
    "summary content";
}
.booking-head {
  grid-area: head;
}
.booking-content {
  grid-area: content;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.booking-summary {
  grid-area: summary;
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Intestazione step: tasto indietro accanto alla label "Passo X di 6" */
.step-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.btn-step-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--green-700);
  background: transparent;
  color: var(--green-700);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.3s var(--ease-smooth);
}
.btn-step-back:hover {
  background: rgba(74, 103, 65, 0.08);
  transform: translateX(-3px);
}

/* Scheda riassunto (BookingSummary + card info-negozio dello step 1) */
.booking-summary-card {
  padding: 24px;
}
.booking-summary-card h4 {
  font-family: var(--font-display);
  font-weight: 400;
  border-bottom: var(--border-subtle);
  padding-bottom: 8px;
  margin-bottom: 16px;
}
.booking-summary-block {
  margin-bottom: 16px;
}

/* Orari di apertura del negozio (sotto la scheda riassunto, solo Step 1) */
.orari-card {
  padding: 24px;
}
.orari-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 400;
  border-bottom: var(--border-subtle);
  padding-bottom: 8px;
  margin-bottom: 12px;
}
.orari-riga {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  font-size: 0.86rem;
}
.orari-giorno {
  color: var(--steel-dark);
  text-transform: capitalize;
}
.orari-valore {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--black-matte);
  text-align: right;
  white-space: nowrap;
}
.orari-valore.chiuso {
  color: var(--steel);
  font-style: italic;
}
.orari-riga.oggi .orari-giorno,
.orari-riga.oggi .orari-valore {
  color: var(--green-700);
  font-weight: 600;
}

@media (max-width: 768px) {
  .booking-layout {
    grid-template-columns: 1fr;
    gap: 16px;
    grid-template-areas:
      "head"
      "content"
      "summary";
  }
  .booking-summary {
    position: static;
  }
  /* Scheda più compatta su smartphone */
  .booking-summary-card {
    padding: 14px 16px;
  }
  .booking-summary-card h4 {
    font-size: 1rem;
    margin-bottom: 10px;
    padding-bottom: 6px;
  }
  .booking-summary-block {
    margin-bottom: 10px;
  }
  .orari-card {
    padding: 14px 16px;
  }
  .orari-card-title {
    font-size: 1rem;
    margin-bottom: 8px;
    padding-bottom: 6px;
  }
  .orari-riga {
    padding: 3px 0;
  }
}

/* ==========================================
   15. DASHBOARD LAYOUT & SIDEBAR
   ========================================== */
.dash-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background: var(--bg-surface);
}

.dash-sidebar {
  width: 280px;
  background: var(--bg-dark);
  color: var(--white-pearl);
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: 32px 24px;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
}

.dash-content {
  flex: 1;
  margin-left: 280px;
  padding: 40px;
  background: var(--bg-primary);
  min-height: 100vh;
  overflow-y: auto;
  transition: margin-left 0.3s ease;
}

/* Tasto menu + collasso sidebar (aree dipendente/titolare) */
.dash-sidebar { transition: transform 0.3s ease; }
.dash-layout.menu-active .dash-sidebar { transform: translateX(-100%); }
.dash-layout.menu-active .dash-content { margin-left: 0; }

.dash-topbar {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}
.sidebar-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 100px;
  border: 1px solid rgba(138, 144, 152, 0.25);
  background: var(--white-pure);
  color: var(--steel-dark);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: var(--shadow-sm, 0 2px 8px rgba(26, 26, 26, 0.06));
  transition: all 0.2s ease;
}
.sidebar-toggle:hover {
  border-color: rgba(138, 144, 152, 0.45);
  color: var(--black-matte);
}
.sidebar-backdrop { display: none; }

/* Sidebar Branding */
.dash-brand {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--white-pure);
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

/* Sidebar link base */
.nav-link-dash {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--steel);
  transition: all 0.3s var(--ease-smooth);
}
.nav-link-dash:hover {
  color: var(--white-pure);
  background: rgba(255, 255, 255, 0.05);
}

/* Dipendente (Accento Lavanda/Viola) */
.role-dipendente .nav-link-dash.active {
  color: var(--white-pure);
  background: rgba(196, 168, 212, 0.15);
  border-left: 3px solid var(--lavender);
}

/* Titolare (Accento Oro) */
.role-titolare .nav-link-dash.active {
  color: var(--white-pure);
  background: rgba(200, 149, 42, 0.15);
  border-left: 3px solid var(--gold);
}

.dash-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ==========================================
   16. CALENDARIO COMPONENT
   ========================================== */
.calendar-wrapper {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  border: var(--border-subtle);
  padding: 32px;
  box-shadow: var(--shadow-1);
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.calendar-month {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--green-900);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.calendar-day-header {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--steel-dark);
  text-align: center;
  padding: 8px 0;
  letter-spacing: 0.08em;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 0.95rem;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  transition: all 0.25s var(--ease-smooth);
}

.calendar-day.disabled {
  color: rgba(138, 144, 152, 0.35);
  cursor: not-allowed;
}

.calendar-day.available {
  background: rgba(74, 103, 65, 0.05);
  color: var(--green-900);
  font-weight: 500;
}
.calendar-day.available:hover {
  background: var(--green-100);
  transform: scale(1.05);
}

.calendar-day.selected {
  background: var(--green-700) !important;
  color: var(--white-pure) !important;
  box-shadow: 0 4px 12px rgba(74, 103, 65, 0.3);
}

.calendar-day.today::after {
  content: '';
  position: absolute;
  bottom: 6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

/* ==========================================
   17. SLOT E VISTA ORARIA
   ========================================== */
/* Wrapper verticale: etichetta + griglia degli slot.
   ⚠️ NON deve essere una griglia: lo era, e `.slots-grid` finiva dentro una cella da ~118px
   collassando a una sola colonna (tutti gli orari incolonnati). */
.slots-container {
  margin-top: 16px;
}

/* Griglia degli orari selezionabili: sempre 4 per riga (step 4 del funnel e modifica
   prenotazione da link email). La larghezza massima tiene i bottoni a ~130px invece di
   allargarli su tutta la colonna. */
.slots-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-width: 560px;
}

@media (max-width: 768px) {
  .slots-grid {
    max-width: none;
    gap: 8px;
  }
  /* Su schermi stretti il padding di default (14px per lato) farebbe traboccare "00:00" */
  .slots-grid .slot-btn {
    padding-left: 4px;
    padding-right: 4px;
    font-size: 0.85rem;
  }
}

.slot-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid rgba(74, 103, 65, 0.15);
  background: rgba(255, 255, 255, 0.7);
  color: var(--green-900);
  cursor: pointer;
  transition: all 0.25s var(--ease-smooth);
}
.slot-btn:hover:not(.disabled) {
  border-color: var(--green-700);
  background: var(--green-700);
  color: var(--white-pure);
  transform: translateY(-2px);
}
.slot-btn.selected {
  background: var(--green-700);
  border-color: var(--green-700);
  color: var(--white-pure);
  box-shadow: 0 4px 12px rgba(74, 103, 65, 0.2);
}
.slot-btn.disabled {
  opacity: 0.35;
  background: rgba(138, 144, 152, 0.08);
  border-color: transparent;
  color: var(--steel);
  cursor: not-allowed;
}

/* Slot occupati / liberi dashboard */
.time-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid rgba(138, 144, 152, 0.12);
}
.time-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--steel-dark);
}
.slot-occupied {
  background: rgba(139, 107, 168, 0.08);
  border: 1px solid rgba(139, 107, 168, 0.2);
  color: var(--violet);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.9rem;
}
.slot-free {
  background: rgba(74, 103, 65, 0.04);
  border: 1px dashed rgba(74, 103, 65, 0.2);
  color: var(--green-700);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ==========================================
   18. TOGGLE SWITCH
   ========================================== */
.toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.toggle-switch {
  width: 46px;
  height: 24px;
  background: var(--steel);
  border-radius: 100px;
  padding: 2px;
  position: relative;
  transition: background 0.3s ease;
}
.toggle-switch::after {
  content: '';
  width: 20px;
  height: 20px;
  background: var(--white-pure);
  border-radius: 50%;
  position: absolute;
  left: 2px;
  top: 2px;
  transition: transform 0.3s var(--ease-spring);
}

.toggle-switch.on {
  background: var(--green-700);
}
.toggle-switch.on::after {
  transform: translateX(22px);
}

.toggle-label {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--black-matte);
}

/* ==========================================
   19. TOAST NOTIFICATION
   ========================================== */
.toast-container {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-radius: var(--radius-md);
  background: var(--bg-dark);
  color: var(--white-pearl);
  box-shadow: var(--shadow-3);
  font-family: var(--font-body);
  font-size: 0.9rem;
  border-left: 4px solid var(--steel);
  animation: fade-up 0.4s var(--ease-smooth) both;
}

.toast-success {
  border-left-color: var(--green-700);
}

.toast-error {
  border-left-color: var(--color-error);
}

/* ==========================================
   20. MODAL
   ========================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 26, 0.45);
  backdrop-filter: blur(8px);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-content {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  border: var(--border-subtle);
  width: 100%;
  max-width: 540px;
  padding: 40px;
  box-shadow: var(--shadow-3);
  position: relative;
  animation: fade-up 0.5s var(--ease-smooth) both;
}

.modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  cursor: pointer;
  color: var(--steel-dark);
  transition: color 0.2s ease;
}
.modal-close:hover { color: var(--black-matte); }

/* ==========================================
   22. HOME SCREEN AND ROLE SELECTOR
   ========================================== */
.home-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  width: 100vw;
  padding: 24px;
  background: radial-gradient(
    ellipse at 35% 45%,
    rgba(196, 168, 212, 0.22) 0%,
    rgba(221, 232, 228, 0.95) 50%,
    rgba(200, 196, 190, 0.60) 100%
  );
  overflow: hidden;
  position: relative;
}

.hero-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 480px;
  margin-bottom: 40px;
  animation: fade-up 0.6s var(--ease-smooth) both;
}

.logo-container {
  margin-bottom: 24px;
  color: var(--green-700);
}

.role-buttons-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 320px;
  margin-bottom: 48px;
}

.role-button {
  width: 100%;
  padding: 18px 24px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(221, 232, 228, 0.55);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  transition: transform 0.35s var(--ease-smooth),
              box-shadow 0.35s var(--ease-smooth),
              border-color 0.3s ease,
              background 0.3s ease;
}

.role-button:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(245, 240, 236, 0.75);
}

.role-button:active {
  transform: translateY(-1px);
  transition-duration: 0.1s;
}

.role-button-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.3s ease;
}

.role-button-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.role-button-label {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--black-matte);
  line-height: 1.2;
}

.role-button-sublabel {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel-dark);
  margin-top: 2px;
}

/* Hover behaviors for different roles */
.role-button.cliente {
  animation: fade-up 0.6s 0.15s var(--ease-smooth) both;
}
.role-button.cliente:hover {
  border-color: rgba(74, 103, 65, 0.35);
  box-shadow: 0 16px 40px rgba(74, 103, 65, 0.14);
}

.role-button.prenotazioni {
  animation: fade-up 0.6s 0.2s var(--ease-smooth) both;
}
.role-button.prenotazioni:hover {
  border-color: rgba(200, 149, 42, 0.40);
  box-shadow: 0 16px 40px rgba(200, 149, 42, 0.14);
}

.role-button.dipendente {
  animation: fade-up 0.6s 0.25s var(--ease-smooth) both;
}
.role-button.dipendente:hover {
  border-color: rgba(139, 107, 168, 0.30);
  box-shadow: 0 16px 40px rgba(139, 107, 168, 0.12);
}

.role-button.titolare {
  animation: fade-up 0.6s 0.35s var(--ease-smooth) both;
}
.role-button.titolare:hover {
  border-color: rgba(200, 149, 42, 0.40);
  box-shadow: 0 16px 40px rgba(200, 149, 42, 0.14);
}

/* Info button */
.btn-info {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(138, 144, 152, 0.25);
  background: rgba(245, 240, 236, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--steel-dark);
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  animation: fade-up 0.6s 0.55s var(--ease-smooth) both;
  z-index: 100;
}

.btn-info:hover {
  background: rgba(245, 240, 236, 0.85);
  color: var(--black-matte);
  border-color: rgba(138, 144, 152, 0.40);
}

/* Area Staff (home, in alto a destra) */
.staff-area {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  z-index: 50;
}
.staff-area-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel-dark);
}
.staff-area-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.staff-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 100px;
  border: 1px solid rgba(138, 144, 152, 0.25);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--steel-dark);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}
.staff-btn:hover {
  border-color: rgba(138, 144, 152, 0.45);
  background: rgba(255, 255, 255, 0.9);
  color: var(--black-matte);
  transform: translateY(-2px);
}
@media (max-width: 480px) {
  .staff-area { top: 12px; right: 12px; }
  .staff-btn { padding: 7px 10px; font-size: 0.75rem; }
}

/* ==========================================
   21. RESPONSIVE MEDIA QUERIES (MOBILE ADJUSTMENTS)
   ========================================== */
@media (max-width: 768px) {
  .navbar {
    padding: 0 20px;
  }
  .nav-links {
    gap: 16px;
  }
  .dash-sidebar {
    width: min(280px, 82vw);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: none;
    padding: 24px 20px;
    overflow-y: auto;
    z-index: 1000;
  }
  .dash-layout.menu-active .dash-sidebar {
    transform: translateX(0);
  }
  .dash-content {
    margin-left: 0;
    padding: 20px 16px;
  }
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(26, 26, 26, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .dash-layout.menu-active .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
  .grid-12 {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .modal-content {
    padding: 24px;
  }
  .container {
    padding: 0 20px;
  }
}

/* ==========================================
   23. VISTA SETTIMANALE CALENDARIO
   ========================================== */
.calendar-view-mode-toggle {
  display: flex;
  background: rgba(138, 144, 152, 0.08);
  border-radius: var(--radius-full);
  padding: 3px;
  border: 1px solid rgba(138, 144, 152, 0.15);
}

.calendar-toggle-btn {
  border: none;
  background: transparent;
  padding: 6px 16px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--steel-dark);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.25s var(--ease-smooth);
}

.calendar-toggle-btn.active {
  background: var(--white-pure);
  color: var(--green-900);
  box-shadow: var(--shadow-1);
}

/* Griglia Settimana */
.week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.week-day-col {
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(138, 144, 152, 0.12);
  border-radius: var(--radius-lg);
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.3s var(--ease-smooth);
  position: relative;
  min-height: 220px;
}

.week-day-col:hover:not(.disabled) {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--green-300);
  transform: translateY(-4px);
  box-shadow: var(--shadow-1);
}

.week-day-col.selected {
  background: rgba(74, 103, 65, 0.05);
  border-color: var(--green-700);
  box-shadow: 0 4px 12px rgba(74, 103, 65, 0.08);
}

.week-day-col.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: rgba(138, 144, 152, 0.04);
}

.week-day-name {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--steel-dark);
}

.week-day-number {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--black-matte);
}

.week-day-col.selected .week-day-number {
  color: var(--green-700);
  font-weight: 600;
}

/* Timeline ad alta densità */
.week-timeline-bar {
  width: 100%;
  max-width: 32px;
  height: 100px;
  background: rgba(138, 144, 152, 0.08);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 2px;
  overflow: hidden;
  justify-content: stretch;
}

.week-timeline-tick {
  width: 100%;
  flex: 1;
  border-radius: 1px;
}

.week-timeline-tick.free {
  background: var(--green-500);
}

.week-timeline-tick.occupied {
  background: var(--color-error);
}

.week-timeline-tick.closed {
  background: var(--steel);
  opacity: 0.4;
}

.week-day-status-label {
  font-family: var(--font-body);
  font-size: 0.65rem;
  color: var(--steel-dark);
  text-align: center;
}

/* Media Query per visualizzazione settimana su piccoli schermi */
@media (max-width: 768px) {
  .week-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 480px) {
  .week-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Card interattive titolare dipendente hub */
.hover-card-titolare {
  transition: all 0.25s var(--ease-smooth) !important;
}
.hover-card-titolare:hover {
  border-color: var(--gold) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(200, 149, 42, 0.08) !important;
}

/* Ottimizzazione layout e responsiveness per visualizzazione settimana in dashboard/titolare su tablet */
@media (max-width: 1200px) {
  .dash-content .grid-12 {
    grid-template-columns: 1fr;
  }
  .dash-content .grid-12 > div {
    grid-column: span 12 / span 12 !important;
  }
}

@media (max-width: 1024px) {
  .dash-content .week-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 550px) {
  .dash-content .week-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================
   24. COOKIE BANNER & PUBLIC FOOTER
   ========================================== */
/* Sticky footer: il footer resta sempre in fondo alla pagina */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
.app-main {
  flex: 1 0 auto;
}

/* Banner cookie: barra fissa in basso (prima azione richiesta per il consenso) */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  width: 100%;
  background: rgba(26, 26, 26, 0.97);
  backdrop-filter: blur(6px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.25);
  padding: 20px 24px;
  animation: fade-up 0.4s var(--ease-smooth) both;
}
.cookie-banner-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
}
.cookie-banner-title,
.cookie-banner-text {
  max-width: 760px;
}

.cookie-banner-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--white-pure);
}

.cookie-banner-text {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

.cookie-banner-link {
  color: var(--green-300);
  text-decoration: underline;
  transition: color 0.2s ease;
}

.cookie-banner-link:hover {
  color: var(--white-pure);
}

.cookie-banner-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 4px;
}

/* Public Footer Styles */
.public-footer {
  width: 100%;
  padding: 32px 24px;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  border-top: 1px solid rgba(138, 144, 152, 0.1);
  margin-top: 60px;
}

.public-footer-text {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--steel-dark);
  text-align: center;
}

.public-footer-links {
  display: flex;
  gap: 16px;
}

.public-footer-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--steel-dark);
  text-decoration: none;
  transition: color 0.2s ease;
}

.public-footer-link:hover {
  color: var(--green-700);
}

/* "Preferenze cookie": bottone reso identico a un link del footer */
.public-footer-link-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

/* ==========================================
   COOKIE CONSENT — bottoni, modale, categorie
   ========================================== */

/* Bottoni del consenso (usati sia nel banner scuro sia nella modale chiara) */
.cookie-btn {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.cookie-btn-primary {
  background: var(--green-700);
  color: var(--white-pure);
  border-color: var(--green-700);
}
.cookie-btn-primary:hover {
  background: var(--green-900);
  border-color: var(--green-900);
}
.cookie-btn-outline {
  background: transparent;
  color: var(--green-700);
  border-color: var(--green-700);
}
.cookie-btn-outline:hover {
  background: rgba(74, 103, 65, 0.08);
}
.cookie-btn-ghost {
  background: transparent;
  color: var(--steel-dark);
  border-color: rgba(138, 144, 152, 0.4);
}
.cookie-btn-ghost:hover {
  color: var(--black-matte);
  border-color: var(--steel-dark);
}

/* Nel banner scuro i bottoni outline/ghost usano toni chiari per contrasto */
.cookie-banner .cookie-btn-outline {
  color: var(--green-300);
  border-color: var(--green-300);
}
.cookie-banner .cookie-btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white-pure);
}
.cookie-banner .cookie-btn-ghost {
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.35);
}
.cookie-banner .cookie-btn-ghost:hover {
  color: var(--white-pure);
  border-color: rgba(255, 255, 255, 0.7);
}

/* Overlay + modale delle preferenze */
@keyframes cookie-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.cookie-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(20, 20, 20, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: cookie-fade-in 0.25s var(--ease-smooth) both;
}
.cookie-modal {
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  padding: 28px;
  animation: fade-up 0.3s var(--ease-smooth) both;
}
.cookie-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.cookie-modal-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--green-900);
}
.cookie-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--steel-dark);
  display: flex;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease, background 0.2s ease;
}
.cookie-modal-close:hover {
  color: var(--black-matte);
  background: rgba(138, 144, 152, 0.12);
}
.cookie-modal-intro {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--steel-dark);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Elenco categorie */
.cookie-cat-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}
.cookie-cat {
  border: 1px solid rgba(138, 144, 152, 0.2);
  border-radius: var(--radius-md);
  padding: 16px;
  background: rgba(255, 255, 255, 0.5);
}
.cookie-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.cookie-cat-titles {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.cookie-cat-title {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--black-matte);
}
.cookie-cat-badge {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--steel-dark);
  background: rgba(138, 144, 152, 0.14);
  padding: 3px 8px;
  border-radius: 100px;
}
.cookie-cat-badge.is-locked {
  color: var(--green-900);
  background: rgba(74, 103, 65, 0.14);
}
.cookie-cat-desc {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--steel-dark);
  line-height: 1.55;
}

/* Toggle come <button> nel contesto cookie: reset e stato bloccato */
.cookie-cat .toggle-switch {
  border: none;
  flex-shrink: 0;
  cursor: pointer;
}
.cookie-cat .toggle-switch.is-disabled {
  cursor: not-allowed;
  opacity: 0.85;
}

.cookie-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

/* Responsive: su mobile i bottoni occupano tutta la larghezza */
@media (max-width: 560px) {
  .cookie-banner-buttons,
  .cookie-modal-actions {
    flex-direction: column;
  }
  .cookie-banner-buttons .cookie-btn,
  .cookie-modal-actions .cookie-btn {
    width: 100%;
  }
}

/* ==========================================
   28. ANALYTICS — GRIGLIA E RIQUADRI METRICA
   ========================================== */
/* Griglia predisposta per crescere: le metriche future si aggiungono come
   nuove .stat-card senza toccare il layout. L'accento cromatico arriva dal
   colore inline del riquadro (viola area dipendente / oro area titolare). */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.stat-card {
  background: var(--white-pure);
  border: var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.3s var(--ease-smooth),
              box-shadow 0.3s var(--ease-smooth);
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-1);
}

.stat-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.stat-card-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel);
}

/* Pastiglia icona piena: eredita l'accento del ruolo dal `color` inline */
.stat-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
/* L'icona resta leggibile in negativo sulla pastiglia piena */
.stat-card-icon > * {
  color: var(--white-pure);
}

.stat-card-value {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 300;
  line-height: 1.05;
  color: var(--black-matte);
  min-height: 44px;
  display: flex;
  align-items: center;
}

.stat-card-hint {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--steel-dark);
  line-height: 1.4;
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .stat-card {
    padding: 20px;
  }
  .stat-card-value {
    font-size: 2.2rem;
  }
}

/* ==========================================
   29. ANALYTICS — GRAFICI
   ========================================== */
/* Rampe sequenziali a tinta unica, una per area. Sono state VALIDATE con lo
   script della guida dataviz (luminosità monotona, distacco fra i passi,
   estremo chiaro che stacca dal bianco della card): non modificare i valori
   a occhio, ri-validarli. I grafici usano sempre var(--seq-N), quindi la
   tinta segue l'area senza che i componenti sappiano quale sia. */
.role-dipendente {
  --seq-1: #C09CD3;
  --seq-2: #A87BC0;
  --seq-3: #8B6BA8;
  --seq-4: #71538D;
  --seq-5: #573E6E;
  --seq-accent: var(--violet);
}
.role-titolare {
  --seq-1: #D2AC42;
  --seq-2: #BC8B24;
  --seq-3: #9C701C;
  --seq-4: #7C5715;
  --seq-5: #5C3F0E;
  --seq-accent: var(--gold);
}

/* ── Intestazioni di sezione (zona fissa vs zona del periodo) ── */
.analytics-section {
  margin-top: 28px;
}
.analytics-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: var(--border-subtle);
}
.analytics-section-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--seq-accent);
}
.analytics-section-nota {
  font-size: 0.78rem;
  color: var(--steel);
}

/* ── Selettore di periodo (mesi / settimane, selezione a intervallo) ── */
/* ── Selettore di periodo: scorciatoie + calendario a giorni in una tendina ── */
.period-picker {
  background: var(--white-pure);
  border: var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
}

/* Scorciatoie: sempre visibili, coprono il caso più frequente senza aprire nulla */
.period-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.period-shortcut {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: var(--border-subtle);
  background: var(--white-pure);
  color: var(--steel-dark);
  cursor: pointer;
  transition: all 0.25s var(--ease-smooth);
}
.period-shortcut:hover {
  border-color: var(--seq-accent);
  color: var(--seq-accent);
}
.period-shortcut.active {
  background: var(--seq-accent);
  border-color: var(--seq-accent);
  color: var(--white-pure);
}

/* Tendina */
.period-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(138, 144, 152, 0.3);
  background: transparent;
  color: var(--steel-dark);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s var(--ease-smooth);
}
.period-toggle:hover {
  border-color: var(--seq-accent);
  color: var(--seq-accent);
}
.period-toggle.aperta {
  color: var(--seq-accent);
  border-color: var(--seq-accent);
}
.period-toggle-freccia {
  margin-left: auto;
  transition: transform 0.2s var(--ease-smooth);
}
.period-toggle.aperta .period-toggle-freccia {
  transform: rotate(180deg);
}

.period-manual {
  margin-top: 14px;
  padding-top: 14px;
  border-top: var(--border-subtle);
}

/* Calendario a giorni. Classi proprie e non `.calendar-*`: quelle sono legate
   al tema verde delle prenotazioni e alla semantica disponibile/non disponibile. */
.daypicker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.daypicker-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: var(--border-subtle);
  background: var(--white-pure);
  color: var(--steel-dark);
  cursor: pointer;
  transition: all 0.2s var(--ease-smooth);
}
.daypicker-nav:hover {
  border-color: var(--seq-accent);
  color: var(--seq-accent);
}
.daypicker-titolo {
  display: flex;
  align-items: center;
  gap: 8px;
}
.daypicker-mese {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--black-matte);
}
.daypicker-anno {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 3px 6px;
  border-radius: var(--radius-sm, 8px);
  border: var(--border-subtle);
  background: var(--white-pure);
  color: var(--black-matte);
  cursor: pointer;
}

.daypicker-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.daypicker-intestazione {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--steel);
  text-align: center;
  padding-bottom: 4px;
}
.daypicker-giorno {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 0.85rem;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--steel-dark);
  cursor: pointer;
  transition: background 0.15s var(--ease-smooth), color 0.15s var(--ease-smooth);
}
.daypicker-giorno:hover {
  border-color: var(--seq-accent);
  color: var(--seq-accent);
}
/* Oggi resta riconoscibile anche quando non è selezionato */
.daypicker-giorno.oggi {
  font-weight: 600;
  color: var(--black-matte);
  box-shadow: inset 0 0 0 1px rgba(138, 144, 152, 0.35);
}
/* Estremi in accento pieno, giorni interni in tinta tenue: si vede subito
   dove inizia e dove finisce l'intervallo. */
.daypicker-giorno.estremo {
  background: var(--seq-accent);
  color: var(--white-pure);
  box-shadow: none;
}
.daypicker-giorno.intervallo {
  background: var(--seq-1);
  color: var(--black-matte);
  border-radius: 8px;
  box-shadow: none;
}

.period-picker-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.period-picker-stato {
  font-size: 0.82rem;
  color: var(--steel-dark);
}
.period-calcola:disabled {
  opacity: 0.45;
  cursor: default;
}

/* ── Contenitore grafico ── */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.chart-card {
  background: var(--white-pure);
  border: var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  min-width: 0; /* consente al contenuto di restringersi dentro la griglia */
}
.chart-card.wide {
  grid-column: 1 / -1;
}
.chart-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.chart-card-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel);
}
.chart-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--steel-dark);
  font-size: 0.88rem;
  border: 1px dashed rgba(138, 144, 152, 0.25);
  border-radius: var(--radius-md);
}

/* ── Mappa di calore giorno × ora ── */
.heatmap {
  display: grid;
  gap: 2px; /* il distacco fra celle è parte della leggibilità, non decorazione */
  overflow-x: auto;
}
.heatmap-row {
  display: grid;
  gap: 2px;
  align-items: center;
}
/* Didascalia che spiega come si legge un grafico: sta sopra al grafico stesso,
   perché una legenda letta dopo arriva tardi. */
.chart-descrizione {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--steel-dark);
  margin: -6px 0 16px;
}
.chart-descrizione strong {
  font-weight: 500;
  color: var(--black-matte);
}

.heatmap-giorno,
.heatmap-ora,
.heatmap-angolo {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--steel);
  text-align: center;
}
/* Etichetta dell'asse orizzontale, nell'angolo della griglia */
.heatmap-angolo {
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--steel-dark);
}
.heatmap-giorno {
  text-align: left;
  padding-right: 6px;
}
.heatmap-cella {
  aspect-ratio: 1;
  min-width: 22px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  background: rgba(138, 144, 152, 0.07);
  color: var(--steel);
}
/* Celle con dati: il numero resta leggibile passando a testo chiaro sui passi scuri */
.heatmap-cella[data-livello="1"] { background: var(--seq-1); color: var(--black-matte); }
.heatmap-cella[data-livello="2"] { background: var(--seq-2); color: var(--white-pure); }
.heatmap-cella[data-livello="3"] { background: var(--seq-3); color: var(--white-pure); }
.heatmap-cella[data-livello="4"] { background: var(--seq-4); color: var(--white-pure); }
.heatmap-cella[data-livello="5"] { background: var(--seq-5); color: var(--white-pure); }

.heatmap-legenda {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--steel);
}
.heatmap-legenda-step {
  width: 16px;
  height: 10px;
  border-radius: 2px;
}

/* ── Barre orizzontali ── */
.bar-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.bar-row-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 5px;
}
.bar-label {
  font-size: 0.88rem;
  color: var(--black-matte);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bar-valore {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--steel-dark);
  flex-shrink: 0;
}
.bar-track {
  height: 8px;
  border-radius: var(--radius-full);
  background: rgba(138, 144, 152, 0.1);
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--seq-3);
  transition: width 0.4s var(--ease-smooth);
}

/* ── Toggle a due stati (usato dal flag Mesi / Settimane del selettore) ── */
.metric-toggle {
  display: inline-flex;
  border: var(--border-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.metric-toggle button {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 12px;
  border: none;
  background: var(--white-pure);
  color: var(--steel-dark);
  cursor: pointer;
  transition: all 0.2s var(--ease-smooth);
}
.metric-toggle button.active {
  background: var(--seq-accent);
  color: var(--white-pure);
}

@media (max-width: 768px) {
  .charts-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .chart-card {
    padding: 18px;
  }
  .heatmap-cella {
    min-width: 18px;
    font-size: 0.55rem;
  }
  .period-picker {
    padding: 14px;
  }
  /* Le scorciatoie restano su una riga sola finché ci stanno, poi vanno a capo */
  .period-shortcut {
    padding: 8px 12px;
    font-size: 0.68rem;
  }
  .daypicker-giorno {
    font-size: 0.8rem;
  }
  .period-picker-bottom {
    align-items: stretch;
    flex-direction: column;
  }
  .period-calcola {
    width: 100%;
  }
}


