/* ==========================================================================
   PROGRAMMA 10 GIORNI — GLOBAL.CSS
   Single Source of Truth per l'Architettura Visiva dell'Applicazione:
   - Design System unificato (Plus Jakarta Sans, Palette Smeraldo & Ardesia)
   - Zero stili o paradigmi di Call to Action commerciali
   - Tipografia Flat ad altissima definizione e leggibilità
   - Tutte le sezioni dell'app strutturate e coerenti a livello globale:
       1. Top App Bar & Identity (Avatar, Goal, Kit, Day Counter)
       2. Day Selector Slider (Giorni 1-10)
       3. Today's Pulse & Punteggio (Score Radial, Peso Autosave, Mood Strip)
       4. Coach Focus Card — The Action Bridge (Insight, Live Dot, Audio)
       5. Checklist 5 Abitudini (Card Full Bleed 4K Dark Glass & HUD)
       6. Guida Pasti & Carosello Ricette
       7. Bottom Navigation Bar & FAB Scanner Piatto Sano AI
       8. Modali (Scanner AI, Obiettivi, Kit Programma, Video Vimeo, Coach)
       9. Quick Drawer & Toast Notifiche
   ========================================================================== */

/* ==========================================================================
   1. DESIGN TOKENS & VARIABILI GLOBALI
   ========================================================================== */
:root {
  /* Sfondi e Superfici */
  --vm-bg-base: #F8FAFC;
  --vm-app-bg: rgba(248, 250, 252, 0.85);
  --vm-surface-glass: rgba(255, 255, 255, 0.90);
  --vm-surface-solid: #FFFFFF;
  --vm-surface-active: rgba(240, 253, 244, 0.95);
  --vm-surface-card: #FFFFFF;

  /* Bordi e Divisori */
  --vm-border: rgba(226, 232, 240, 0.85);
  --vm-border-light: #E2E8F0;
  --vm-border-glass: rgba(255, 255, 255, 0.95);
  --vm-border-emerald: rgba(16, 185, 129, 0.45);

  /* Inchiostri & Tipografia (Palette Ardesia Profonda) */
  --vm-ink-primary: #0F172A;
  --vm-ink-secondary: #475569;
  --vm-ink-tertiary: #94A3B8;
  --vm-ink-white: #FFFFFF;

  /* Accenti Funzionali (Smeraldo Nobile Herbalife) */
  --vm-emerald-primary: #059669;
  --vm-emerald-dark: #064E3B;
  --vm-emerald-light: #ECFDF5;
  --vm-emerald-border: #A7F3D0;
  --vm-emerald-glow: rgba(5, 150, 105, 0.25);

  /* Accenti Specifici per Telemetria & Pasticceria/Sport */
  --vm-cyan-primary: #0284C7;
  --vm-cyan-light: #E0F2FE;
  --vm-cyan-border: #BAE6FD;

  --vm-amber-primary: #D97706;
  --vm-amber-light: #FEF3C7;
  --vm-amber-border: #FDE68A;

  --vm-gold-primary: #B45309;
  --vm-gold-light: #FFFBEB;
  --vm-gold-border: #FCD34D;

  --vm-red-primary: #DC2626;
  --vm-red-light: #FEF2F2;
  --vm-red-border: #FECACA;

  /* Icone Ardesia */
  --vm-slate-icon-bg: #F1F5F9;
  --vm-slate-icon-color: #334155;
  --vm-slate-icon-border: #E2E8F0;

  /* Gradienti Funzionali di Superficie */
  --vm-pulse-gradient: linear-gradient(135deg, #064E3B 0%, #0F766E 50%, #047857 100%);
  --vm-fab-gradient: linear-gradient(135deg, #059669 0%, #0284C7 100%);

  /* Raggi di Curvatura */
  --vm-radius-xs: 8px;
  --vm-radius-sm: 12px;
  --vm-radius-md: 18px;
  --vm-radius-lg: 26px;
  --vm-radius-full: 9999px;

  /* Ombreggiature Morbide & Profondità */
  --vm-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --vm-shadow-glass: 0 8px 28px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.03);
  --vm-shadow-elevated: 0 16px 36px rgba(15, 23, 42, 0.08);
  --vm-shadow-modal: 0 24px 60px rgba(0, 0, 0, 0.35);

  /* Font Unificato */
  --vm-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ==========================================================================
   2. RESET GLOBALE & FONDAMENTA TIPOGRAFICHE
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  background-color: var(--vm-bg-base);
  background-image: 
    radial-gradient(at 0% 0%, rgba(16, 185, 129, 0.10) 0px, transparent 50%),
    radial-gradient(at 100% 10%, rgba(6, 182, 212, 0.10) 0px, transparent 50%),
    radial-gradient(at 50% 60%, rgba(15, 23, 42, 0.03) 0px, transparent 60%);
  background-attachment: fixed;
  color: var(--vm-ink-primary);
  font-family: var(--vm-font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Regola Globale: Tipografia Flat (Zero Ombre di Testo in tutta l'applicazione) */
h1, h2, h3, h4, p, span, div, button, label, input, select {
  text-shadow: none !important;
}

button {
  font-family: var(--vm-font);
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

input, select {
  font-family: var(--vm-font);
  outline: none;
}

/* Icone Vettoriali Monocromatiche SVG */
.svg-icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.svg-icon-sm {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.svg-icon-lg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ==========================================================================
   3. LAYOUT CONTAINER & SWITCHER BAR
   ========================================================================== */
.proto-switcher-bar {
  background: #0F172A;
  color: #F8FAFC;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
}
.proto-title {
  color: #34D399;
  letter-spacing: -0.01em;
}
.proto-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.proto-btn {
  color: #CBD5E1;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: var(--vm-radius-full);
  background: rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
  font-size: 11px;
}
.proto-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #FFF;
}
.proto-btn.active-dark {
  background: #059669;
  color: #FFF;
  box-shadow: 0 0 10px rgba(5, 150, 105, 0.5);
}

.app-container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 12px 14px 110px;
  position: relative;
  transition: max-width 0.25s ease;
}

.app-container.dashboard-wide-mode {
  max-width: 480px !important;
}

.app-container.dashboard-wide-mode #app-bottom-nav,
.app-container.dashboard-wide-mode .native-bottom-nav,
body.dashboard-wide-mode #app-bottom-nav,
body.dashboard-wide-mode .native-bottom-nav,
body.dashboard-wide-mode #sheet-backdrop,
body.dashboard-wide-mode #sheet-panel,
.app-container.dashboard-wide-mode ~ #sheet-backdrop,
.app-container.dashboard-wide-mode ~ #sheet-panel {
  display: none !important;
}

/* ==========================================================================
   4. TOP APP BAR & USER IDENTITY
   ========================================================================== */
.top-app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px 14px;
  gap: 10px 12px;
  flex-wrap: wrap;
}
.user-identity-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 200px;
  min-width: 190px;
}
.user-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--vm-emerald-primary);
  background: #E2E8F0;
  display: block;
}
.user-streak-badge {
  position: absolute;
  bottom: -3px;
  right: -3px;
  background: #0F172A;
  color: #FBBF24;
  border-radius: var(--vm-radius-full);
  padding: 1px 5px;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 2px;
  border: 1.5px solid #FFFFFF;
}
.streak-icon {
  width: 10px;
  height: 10px;
  stroke: #F59E0B;
}

.user-text-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.user-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.user-title-row h1 {
  font-size: 17px;
  font-weight: 800;
  color: var(--vm-ink-primary);
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-badges-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Badge Interattivi Utente */
.user-goal-pill,
.user-kit-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--vm-radius-full);
  font-size: 11px;
  font-weight: 700;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--vm-shadow-sm);
  white-space: nowrap;
}
.user-goal-pill {
  background: var(--vm-red-light);
  color: #B91C1C;
  border: 1px solid var(--vm-red-border);
}
.user-goal-pill:hover {
  background: #FEE2E2;
  transform: translateY(-1px);
}
.goal-pill-icon {
  font-size: 11px;
  line-height: 1;
}

.user-kit-pill {
  background: var(--vm-surface-solid);
  color: var(--vm-ink-primary);
  border: 1px solid var(--vm-border);
}
.user-kit-pill:hover {
  background: #F1F5F9;
  transform: translateY(-1px);
}
.kit-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #64748B;
}
.user-kit-pill.bronze .kit-pill-dot {
  background: #CD7F32;
  box-shadow: 0 0 6px rgba(205, 127, 50, 0.6);
}
.user-kit-pill.silver .kit-pill-dot {
  background: #94A3B8;
  box-shadow: 0 0 6px rgba(148, 163, 184, 0.6);
}
.user-kit-pill.gold .kit-pill-dot {
  background: #F59E0B;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.6);
}

.user-measures-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--vm-radius-full);
  font-size: 11px;
  font-weight: 800;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--vm-shadow-sm);
  white-space: nowrap;
  background: #F0F9FF;
  color: #0369A1;
  border: 1.5px solid #0284C7;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.35;
}
.user-measures-pill:hover {
  background: #E0F2FE;
  border-color: #0369A1;
  color: #0284C7;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
}
.user-measures-pill:active {
  transform: translateY(0);
}

.day-count-badge {
  display: inline-flex;
  align-items: center;
  padding: 2.5px 7px;
  border-radius: var(--vm-radius-full);
  background: #F1F5F9;
  color: var(--vm-ink-secondary);
  font-size: 10.5px;
  font-weight: 700;
  border: 1px solid var(--vm-border);
}

.user-logout-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--vm-radius-full);
  background: #FEF2F2;
  color: #B91C1C;
  border: 1px solid #FECACA;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--vm-shadow-sm);
  white-space: nowrap;
  font-family: inherit;
  line-height: 1.35;
}
.user-logout-pill:hover {
  background: #FEE2E2;
  border-color: #F87171;
  color: #991B1B;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}
.user-logout-pill:active {
  transform: translateY(0);
}
.logout-pill-icon {
  font-size: 11px;
  line-height: 1;
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
}
.icon-circle-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--vm-surface-solid);
  color: var(--vm-slate-icon-color);
  border: 1px solid var(--vm-border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: var(--vm-shadow-sm);
}
.icon-circle-btn:hover {
  background: #F8FAFC;
  color: var(--vm-ink-primary);
  border-color: #CBD5E1;
  transform: translateY(-1px);
}

/* ==========================================================================
   5. DAY SELECTOR SLIDER (GIORNI 1-10)
   ========================================================================== */
.day-slider-section {
  margin-bottom: 16px;
}
.day-slider-track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.day-slider-track::-webkit-scrollbar {
  display: none;
}
.day-step-btn {
  flex: 0 0 54px;
  height: 64px;
  border-radius: var(--vm-radius-md);
  background: var(--vm-surface-solid);
  border: 1px solid var(--vm-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--vm-shadow-sm);
}
.day-step-btn:hover {
  border-color: #CBD5E1;
  background: #F8FAFC;
}
.day-step-btn.active {
  background: var(--vm-emerald-primary);
  border-color: var(--vm-emerald-primary);
  box-shadow: 0 8px 18px var(--vm-emerald-glow);
  transform: translateY(-2px);
}
.day-step-sub {
  font-size: 10px;
  font-weight: 700;
  color: var(--vm-ink-tertiary);
  text-transform: uppercase;
}
.day-step-btn.active .day-step-sub {
  color: #A7F3D0;
}
.day-step-num {
  font-size: 16px;
  font-weight: 800;
  color: var(--vm-ink-primary);
  line-height: 1.1;
}
.day-step-btn.active .day-step-num {
  color: #FFFFFF;
}
.day-status-pip {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: transparent;
}
.day-step-btn.active .day-status-pip {
  background: #FFFFFF;
}

/* ==========================================================================
   6. TODAY'S PULSE & SCORE TELEMETRY
   ========================================================================== */
.todays-pulse-card {
  background: var(--vm-pulse-gradient);
  color: #FFFFFF;
  border-radius: var(--vm-radius-lg);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 16px 36px rgba(4, 120, 87, 0.25);
  position: relative;
  overflow: hidden;
}
.todays-pulse-card::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.pulse-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.pulse-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #FFFFFF;
}
.pulse-badge {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 3px 8px;
  border-radius: var(--vm-radius-full);
  font-size: 10.5px;
  font-weight: 700;
  color: #ECFDF5;
}

.score-telemetry-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}
.score-radial-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}
.score-svg {
  width: 80px;
  height: 80px;
  transform: rotate(-90deg);
}
.score-bg-ring {
  fill: none;
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 7;
}
.score-fg-ring {
  fill: none;
  stroke: #34D399;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 213.6;
  stroke-dashoffset: 111;
  transition: stroke-dashoffset 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.score-center-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 80px;
  height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.score-num-big {
  font-size: 22px;
  font-weight: 900;
  color: #FFFFFF;
  line-height: 1;
}
.score-num-unit {
  font-size: 9px;
  font-weight: 700;
  color: #A7F3D0;
}

.score-details-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.score-feedback-callout {
  font-size: 12.5px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.25;
}
.calorie-compact-line {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: #D1FAE5;
  margin-top: 2px;
}
.calorie-val-highlight {
  font-weight: 800;
  color: #FFFFFF;
}
.cal-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--vm-radius-full);
  overflow: hidden;
  margin-top: 2px;
}
.cal-progress-fill {
  height: 100%;
  background: #34D399;
  border-radius: var(--vm-radius-full);
  transition: width 0.4s ease;
}
.pulse-water-val {
  font-size: 11px;
  color: #A7F3D0;
  font-weight: 600;
  margin-top: 4px;
}

/* Stepper Peso Mattutino & Autosave */
.weight-stepper-widget {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--vm-radius-md);
  padding: 10px 12px;
  margin-bottom: 12px;
  backdrop-filter: blur(8px);
}
.weight-widget-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.weight-widget-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.weight-icon-badge {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #34D399;
}
.weight-widget-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #FFFFFF;
}
.weight-autosave-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #A7F3D0;
  background: rgba(6, 78, 59, 0.4);
  padding: 2px 8px;
  border-radius: var(--vm-radius-full);
  border: 1px solid rgba(52, 211, 153, 0.3);
  transition: all 0.3s ease;
}
.weight-autosave-badge.saved-pulse {
  background: #34D399;
  color: #064E3B;
  transform: scale(1.05);
}
.autosave-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34D399;
}

.weight-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.weight-delta-pill {
  font-size: 11.5px;
  color: #D1FAE5;
  font-weight: 600;
}
.weight-stepper-cluster {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px;
  border-radius: var(--vm-radius-sm);
}
.btn-stepper-touch {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.btn-stepper-touch:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.35);
}
.weight-value-box {
  min-width: 68px;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  color: #FFFFFF;
}

/* Mood Tracker Strip */
.mood-tracker-strip {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 10px;
}
.mood-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: #D1FAE5;
  margin-bottom: 6px;
}
.mood-status-label {
  font-size: 10px;
  color: #A7F3D0;
}
.mood-chips-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.mood-chips-row::-webkit-scrollbar {
  display: none;
}
.mood-chip-btn {
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  padding: 4px 10px;
  border-radius: var(--vm-radius-full);
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}
.mood-chip-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}
.mood-chip-btn.selected {
  background: #FFFFFF;
  color: #064E3B;
  border-color: #FFFFFF;
  font-weight: 800;
}
.mood-bullet {
  font-size: 8px;
  opacity: 0.8;
}

/* ==========================================================================
   7. COACH FOCUS CARD — THE ACTION BRIDGE
   ========================================================================== */
.coach-focus-card {
  background: var(--vm-surface-solid);
  border: 1px solid var(--vm-border);
  border-radius: var(--vm-radius-lg);
  padding: 14px 16px;
  margin-bottom: 20px;
  box-shadow: var(--vm-shadow-glass);
  display: flex;
  gap: 14px;
  align-items: flex-start;
  position: relative;
}
.coach-avatar-box {
  position: relative;
  flex-shrink: 0;
}
.coach-avatar-img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--vm-emerald-primary);
  background: #E2E8F0;
  display: block;
}
.coach-online-dot {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #10B981;
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 8px #10B981;
  animation: coachPulse 2s infinite ease-in-out;
}
@keyframes coachPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.8; }
}

.coach-focus-body {
  flex: 1;
  min-width: 0;
}
.coach-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.coach-tag-pill {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--vm-emerald-primary);
  background: var(--vm-emerald-light);
  padding: 2px 7px;
  border-radius: var(--vm-radius-full);
  border: 1px solid var(--vm-emerald-border);
}
.coach-read-link {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--vm-emerald-primary);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 3px 6px;
  border-radius: var(--vm-radius-sm);
  font-family: inherit;
  transition: all 0.15s ease;
  user-select: none;
}
.coach-read-link:hover {
  color: var(--vm-emerald-dark);
  background: rgba(16, 185, 129, 0.08);
}
.coach-read-link:active {
  transform: scale(0.97);
}

.coach-focus-title {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--vm-ink-primary);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.coach-focus-quote {
  font-size: 12px;
  font-weight: 500;
  color: var(--vm-ink-secondary);
  line-height: 1.45;
  font-style: italic;
  margin-bottom: 8px;
}
.coach-micro-action-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
}
.coach-audio-btn {
  display: none;
}
.coach-signature-name {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--vm-ink-tertiary);
}

.coach-tip-check-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.08);
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  color: #047857;
  padding: 6px 16px;
  border-radius: var(--vm-radius-full);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}
.coach-tip-check-btn:hover {
  background: rgba(16, 185, 129, 0.16);
  border-color: #10B981;
}
.coach-tip-check-btn.completed {
  background: #10B981;
  color: #FFFFFF;
  border-color: #059669;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}
.coach-tip-check-square {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1.5px solid currentColor;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
  flex-shrink: 0;
  line-height: 1;
}
.coach-tip-check-btn.completed .coach-tip-check-square {
  background: #FFFFFF;
  color: #059669;
  border-color: #FFFFFF;
}
.coach-focus-card.completed {
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.12);
}

/* Modale Guida Strategica Giornaliera Coach */
.guide-day-strategy-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.guide-summary-lead {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--vm-ink-primary);
  font-weight: 600;
  padding: 10px 12px;
  background: rgba(16, 185, 129, 0.08);
  border-left: 3px solid #10B981;
  border-radius: 6px;
  margin-bottom: 6px;
}
.guide-phase-item {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 10px 12px;
}
.guide-phase-badge {
  font-size: 11px;
  font-weight: 800;
  color: #0F766E;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}
.guide-phase-desc {
  font-size: 12.5px;
  line-height: 1.5;
  color: #334155;
  margin: 0;
}

/* ==========================================================================
   8. SECTION HEADER COMPONENT
   ========================================================================== */
.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 0 4px;
}
.section-header-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--vm-ink-primary);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0;
}
.section-subtext {
  font-size: 12px;
  font-weight: 500;
  color: var(--vm-ink-secondary);
  line-height: 1.35;
  display: block;
}

/* Header Left Group (Icon Box + Title/Subtitle Column on 2 Rows) */
.card-header-left,
.card-header-title-wrap {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

/* Polished Graphic Icon Box */
.card-header-icon-box {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  border-radius: 12px !important;
  background: #F8FAFC !important;
  border: 1.5px solid #E2E8F0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 20px !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
  user-select: none !important;
}

/* Contextual Soft Accent Tints */
.card-header-icon-box.tint-emerald {
  background: #F0FDF4 !important;
  border-color: #DCFCE7 !important;
}

.card-header-icon-box.tint-blue {
  background: #F0F9FF !important;
  border-color: #E0F2FE !important;
}

.card-header-icon-box.tint-amber {
  background: #FEFCE8 !important;
  border-color: #FEF08A !important;
}

.card-header-icon-box.tint-purple {
  background: #FAF5FF !important;
  border-color: #F3E8FF !important;
}

.card-header-icon-box.tint-rose {
  background: #FFF1F2 !important;
  border-color: #FFE4E6 !important;
}

/* Title and Subtitle Stacking Group (Strictly 2 Rows) */
.card-title-group,
.header-title-group {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 2px !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

/* ==========================================================================
   9. CHECKLIST 5 ABITUDINI (FULL BLEED 4K DARK GLASS CARDS & HUD)
   ========================================================================== */
.habits-touch-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 24px;
}

.habit-dark-card {
  position: relative;
  border-radius: var(--vm-radius-lg);
  overflow: hidden;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  border: none;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
  height: 360px;
  min-height: 360px;
  max-height: 360px;
  box-sizing: border-box;
  display: flex;
}
.habit-dark-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.45), 0 4px 12px rgba(0, 0, 0, 0.25);
}
.habit-dark-card.completed {
  box-shadow: 0 16px 42px rgba(16, 185, 129, 0.35), 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Backgrounds 4K */
.card-bg-formula1 { background-image: url('assets/card_bg_formula1.jpg'); }
.card-bg-aloe-tea { background-image: url('assets/card_bg_aloe_tea.jpg'); }
.card-bg-protein-bar { background-image: url('assets/card_bg_protein_bar.jpg'); }
.card-bg-balanced-meal { background-image: url('assets/card_bg_balanced_meal.jpg'); }
.card-bg-sport-h24 { background-image: url('assets/card_bg_sport_h24.jpg'); }

.habit-dark-scrim {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  height: 360px;
  min-height: 360px;
  max-height: 360px;
  box-sizing: border-box;
  padding: 16px;
  background: linear-gradient(180deg, 
    rgba(0, 0, 0, 0.65) 0%, 
    rgba(0, 0, 0, 0.20) 22%, 
    rgba(0, 0, 0, 0.42) 48%, 
    rgba(0, 0, 0, 0.80) 72%, 
    rgba(0, 0, 0, 0.94) 100%);
  position: relative;
  z-index: 1;
}

/* Top Hero Bar della Card */
.dark-card-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dark-product-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 3px 9px;
  border-radius: var(--vm-radius-full);
  color: #FFFFFF;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  backdrop-filter: blur(6px);
}
.p-brand-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
}
.p-brand-dot.cyan { background: #0284C7; box-shadow: 0 0 8px #0284C7; }
.p-brand-dot.amber { background: #D97706; box-shadow: 0 0 8px #D97706; }
.p-brand-dot.emerald { background: #10B981; box-shadow: 0 0 8px #10B981; }
.p-brand-dot.gold { background: #F59E0B; box-shadow: 0 0 8px #F59E0B; }

.dark-pts-badge {
  background: rgba(16, 185, 129, 0.35);
  border: 1px solid rgba(52, 211, 153, 0.6);
  color: #A7F3D0;
  padding: 3px 9px;
  border-radius: var(--vm-radius-full);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  backdrop-filter: blur(6px);
}

/* Product Spotlight centrale */
.dark-card-spotlight {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: auto;
  margin-bottom: 8px;
}
.dark-product-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.dark-product-title {
  font-size: 14.5px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.01em;
}
.dark-product-pill {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: var(--vm-radius-full);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #E2E8F0;
  backdrop-filter: blur(4px);
  white-space: nowrap;
}
.dark-product-pill.cyan { border-color: #38BDF8; color: #BAE6FD; }
.dark-product-pill.amber { border-color: #F59E0B; color: #FDE68A; }
.dark-product-pill.emerald { border-color: #10B981; color: #A7F3D0; }
.dark-product-pill.gold { border-color: #F59E0B; color: #FDE68A; }

.dark-product-sub {
  font-size: 11.5px;
  color: #CBD5E1;
  font-weight: 500;
  line-height: 1.35;
}

/* Controls Dock fluttuante */
.dark-card-controls-dock {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--vm-radius-md);
  padding: 10px 12px;
  backdrop-filter: blur(10px);
}
.dark-instruction-text {
  font-size: 11px;
  color: #94A3B8;
  font-weight: 600;
  margin-bottom: 6px;
}

/* 1. Shakes Segmented Control */
.shakes-segmented-control {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 6px;
}
.shake-segment-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--vm-radius-sm);
  padding: 6px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #CBD5E1;
  transition: all 0.2s ease;
}
.shake-segment-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}
.shake-segment-btn.active {
  background: rgba(16, 185, 129, 0.35);
  border-color: #10B981;
  color: #FFFFFF;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.4);
}
.shake-icons-cluster {
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.shake-unit-svg {
  width: 13px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}
.shake-zero-circle {
  font-size: 11px;
  font-weight: 800;
  color: #94A3B8;
}
.shake-plus-badge {
  font-size: 10px;
  font-weight: 800;
  color: #34D399;
}
.shake-btn-label {
  font-size: 10px;
  font-weight: 700;
}
.shake-pts-mini {
  font-size: 8.5px;
  font-weight: 700;
  color: #94A3B8;
}
.shake-segment-btn.active .shake-pts-mini {
  color: #34D399;
}
.shakes-protocol-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: #A7F3D0;
  font-weight: 600;
  margin-top: 4px;
}
.shakes-protocol-note.empty {
  color: #94A3B8;
}

/* 2. Water Flasks Grid */
.water-telemetry-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.water-curr-liters {
  font-size: 13px;
  font-weight: 800;
  color: #38BDF8;
}
.water-target-info {
  font-size: 11px;
  color: #94A3B8;
  font-weight: 600;
}
.water-flasks-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}
.water-flask-tile {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--vm-radius-sm);
  padding: 6px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #CBD5E1;
  cursor: pointer;
  transition: all 0.2s ease;
}
.water-flask-tile:hover {
  background: rgba(255, 255, 255, 0.15);
}
.water-flask-tile.filled {
  background: rgba(2, 132, 199, 0.3);
  border-color: #0284C7;
  color: #FFFFFF;
  box-shadow: 0 0 12px rgba(2, 132, 199, 0.35);
}
.flask-visual-wrap {
  position: relative;
}
.flask-graphic-svg {
  width: 18px;
  height: 26px;
}
.flask-cap-part { fill: currentColor; }
.flask-neck-part { fill: currentColor; }
.flask-body-outline { fill: none; }
.flask-liquid-level {
  fill: transparent;
  transition: fill 0.2s ease;
}
.water-flask-tile.filled .flask-liquid-level {
  fill: #38BDF8;
}
.flask-check-pip {
  position: absolute;
  top: -2px;
  right: -5px;
  font-size: 8px;
  font-weight: 900;
  color: #38BDF8;
  display: none;
}
.water-flask-tile.filled .flask-check-pip {
  display: block;
}
.flask-vol-tag {
  font-size: 9.5px;
  font-weight: 800;
}
.flask-routine-tag {
  font-size: 8px;
  color: #94A3B8;
  font-weight: 600;
}
.water-flask-tile.filled .flask-routine-tag {
  color: #BAE6FD;
}

.water-quick-stepper-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.btn-water-step {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  padding: 4px 8px;
  border-radius: var(--vm-radius-sm);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
  transition: all 0.15s ease;
}
.btn-water-step:hover {
  background: rgba(255, 255, 255, 0.2);
}
.water-bar-track-wrap {
  flex: 1;
  min-width: 0;
}
.water-bar-track-card {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--vm-radius-full);
  overflow: hidden;
}
.water-bar-fill-card {
  height: 100%;
  background: #38BDF8;
  border-radius: var(--vm-radius-full);
  transition: width 0.3s ease;
}
.water-bar-milestones {
  display: flex;
  justify-content: space-between;
  font-size: 8px;
  color: #94A3B8;
  margin-top: 2px;
}
.water-protocol-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: #BAE6FD;
  font-weight: 600;
  margin-top: 4px;
}

/* 3. Simple Habit Row & Movement Telemetry */
.habit-simple-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}
.habit-row-content {
  display: flex;
  align-items: center;
  gap: 10px;
}
.habit-check-square {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 900;
  color: transparent;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.habit-dark-card.completed .habit-check-square {
  background: #10B981;
  border-color: #10B981;
  color: #FFFFFF;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}
.habit-row-title {
  color: #FFFFFF;
  font-weight: 800;
  font-size: 13px;
}
.habit-row-sub {
  color: #94A3B8;
  font-size: 11px;
}

/* Pulsante Scansione Piatto Inline nella Card 4 */
.btn-scan-meal-inline {
  width: 100%;
  background: rgba(16, 185, 129, 0.25);
  border: 1px solid rgba(52, 211, 153, 0.5);
  color: #A7F3D0;
  padding: 8px 12px;
  border-radius: var(--vm-radius-sm);
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
}
.btn-scan-meal-inline:hover {
  background: rgba(16, 185, 129, 0.4);
  color: #FFFFFF;
}

/* Panel Telemetria Movimento */
.movement-telemetry-panel {
  display: none;
  margin-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 10px;
}
.movement-telemetry-panel.open {
  display: block;
}
.telemetry-inputs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.telemetry-input-field label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: #CBD5E1;
  margin-bottom: 2px;
}
.telemetry-input-field input,
.telemetry-input-field select {
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 600;
}
.telemetry-save-row {
  display: flex;
  gap: 8px;
}
.btn-telemetry-save {
  flex: 1;
  background: #059669;
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 700;
  padding: 7px;
  border-radius: 6px;
  transition: all 0.15s ease;
}
.btn-telemetry-save:hover {
  background: #047857;
}
.btn-telemetry-workouts {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #CBD5E1;
  font-size: 11px;
  font-weight: 700;
  padding: 7px 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}
.btn-telemetry-workouts:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
}

/* ==========================================================================
   10. MEALS CAROUSEL & RECIPE CARDS
   ========================================================================== */
.meals-carousel-wrap {
  margin-bottom: 24px;
}
.meals-carousel-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scrollbar-width: none;
}
.meals-carousel-track::-webkit-scrollbar {
  display: none;
}

.meal-gourmet-card {
  flex: 0 0 220px;
  background: var(--vm-surface-solid);
  border: 1px solid var(--vm-border);
  border-radius: var(--vm-radius-md);
  overflow: hidden;
  box-shadow: var(--vm-shadow-glass);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
.meal-gourmet-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--vm-shadow-elevated);
}

.meal-card-img-box {
  position: relative;
  width: 100%;
  height: 125px;
  background: #E2E8F0;
  overflow: hidden;
}
.meal-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.meal-gourmet-card:hover .meal-card-img {
  transform: scale(1.04);
}
.meal-card-slot-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(15, 23, 42, 0.75);
  color: #FFFFFF;
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2.5px 7px;
  border-radius: var(--vm-radius-full);
  backdrop-filter: blur(4px);
}

.meal-card-body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.meal-card-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--vm-ink-primary);
  line-height: 1.25;
}
.meal-card-desc {
  font-size: 11px;
  font-weight: 500;
  color: var(--vm-ink-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.meal-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid #F1F5F9;
  font-size: 11px;
}
.meal-card-time {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--vm-ink-tertiary);
  font-weight: 600;
}
.meal-card-kcal {
  color: var(--vm-emerald-primary);
  font-weight: 800;
}
.meal-card-prot {
  color: var(--vm-cyan-primary);
  font-weight: 800;
}

/* ==========================================================================
   11. BOTTOM NAVIGATION BAR & FAB MEAL SCAN
   ========================================================================== */
.native-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
  height: 64px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--vm-border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 10px;
  z-index: 900;
}
.nav-tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--vm-ink-tertiary);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.15s ease;
  flex: 1;
}
.nav-tab-item:hover,
.nav-tab-item.active {
  color: var(--vm-emerald-primary);
}

.fab-meal-scan {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--vm-fab-gradient);
  border: 3px solid #FFFFFF;
  box-shadow: 0 8px 20px rgba(5, 150, 105, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -24px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  flex-shrink: 0;
}
.fab-meal-scan:hover {
  transform: translateY(-3px) scale(1.05);
}
.fab-meal-scan:active {
  transform: translateY(0) scale(0.95);
}
.fab-scan-svg {
  width: 24px;
  height: 24px;
  stroke: #FFFFFF;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ==========================================================================
   12. SISTEMA MODALI GLOBALI (STANDARD ENTERPRISE / PWA)
   ========================================================================== */
.program-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.program-modal-backdrop.open {
  display: flex;
}

.program-modal-box {
  background: var(--vm-surface-solid);
  border: 1px solid var(--vm-border);
  border-radius: var(--vm-radius-lg);
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 18px;
  box-shadow: var(--vm-shadow-modal);
  position: relative;
  display: flex;
  flex-direction: column;
}

.modal-top-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}

.modal-header-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--vm-emerald-primary);
  background: var(--vm-emerald-light);
  border: 1px solid var(--vm-emerald-border);
  padding: 2px 7px;
  border-radius: var(--vm-radius-full);
  margin-bottom: 4px;
}
.modal-header-tag.red {
  background: var(--vm-red-light);
  color: var(--vm-red-primary);
  border-color: var(--vm-red-border);
}
.modal-heading {
  font-size: 16px;
  font-weight: 800;
  color: var(--vm-ink-primary);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.modal-copy {
  font-size: 12px;
  color: var(--vm-ink-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}
.modal-close-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--vm-ink-secondary);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}
.modal-close-btn.light {
  color: #94A3B8;
}
.modal-actions-footer {
  margin-top: 12px;
}
.goal-tier-select-hint {
  font-size: 11px;
  color: var(--vm-ink-tertiary);
  font-weight: 700;
}
.habit-simple-row.mb-sm {
  margin-bottom: 10px;
}

/* Pulsanti Funzionali Standard PWA (Zero Marketing CTA) */
.btn-primary-green {
  width: 100%;
  background: var(--vm-emerald-primary);
  color: #FFFFFF;
  padding: 11px 16px;
  border-radius: var(--vm-radius-sm);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.25);
}
.btn-primary-green:hover {
  background: var(--vm-emerald-dark);
}
.btn-primary-green:active {
  transform: translateY(1px);
}

.btn-secondary-clean {
  width: 100%;
  background: #F1F5F9;
  border: 1px solid var(--vm-border);
  color: var(--vm-ink-secondary);
  padding: 9px 16px;
  border-radius: var(--vm-radius-sm);
  font-size: 12.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.btn-secondary-clean:hover {
  background: #E2E8F0;
  color: var(--vm-ink-primary);
}

/* 1. Modal Scanner AI del Piatto Sano (Live & Funzionante) */
.meal-scanner-modal-box {
  max-width: 480px;
  width: 100%;
  box-sizing: border-box;
  max-height: 92vh;
  overflow-y: auto;
  overflow-x: hidden !important;
}
.scanner-viewport-wrap {
  position: relative;
  width: 100%;
  height: 220px;
  min-height: 200px;
  flex-shrink: 0 !important;
  box-sizing: border-box;
  border-radius: var(--vm-radius-md);
  overflow: hidden;
  margin-bottom: 12px;
  background: #090D16;
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}
.scanner-viewport-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}
#scanner-video-feed {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.scanner-laser-beam {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #10B981, #34D399, transparent);
  box-shadow: 0 0 14px #34D399, 0 0 24px rgba(16, 185, 129, 0.6);
  animation: scannerSweep 2s infinite ease-in-out;
  z-index: 5;
}
@keyframes scannerSweep {
  0% { top: 0%; opacity: 0.3; }
  50% { top: 96%; opacity: 1; }
  100% { top: 0%; opacity: 0.3; }
}

.scanner-shutter-flash {
  position: absolute;
  inset: 0;
  background: #FFFFFF;
  opacity: 0;
  pointer-events: none;
  z-index: 10;
}
.scanner-shutter-flash.flash {
  animation: shutterFlash 0.35s ease-out;
}
@keyframes shutterFlash {
  0% { opacity: 0.9; }
  100% { opacity: 0; }
}

.scanner-hud-reticle {
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(52, 211, 153, 0.3);
  border-radius: var(--vm-radius-sm);
  pointer-events: none;
  z-index: 4;
}
.scanner-hud-corners {
  position: absolute;
  inset: 0;
}
.hud-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: #10B981;
  border-style: solid;
}
.hud-corner.top-left { top: 0; left: 0; border-width: 2.5px 0 0 2.5px; border-top-left-radius: 4px; }
.hud-corner.top-right { top: 0; right: 0; border-width: 2.5px 2.5px 0 0; border-top-right-radius: 4px; }
.hud-corner.bottom-left { bottom: 0; left: 0; border-width: 0 0 2.5px 2.5px; border-bottom-left-radius: 4px; }
.hud-corner.bottom-right { bottom: 0; right: 0; border-width: 0 2.5px 2.5px 0; border-bottom-right-radius: 4px; }

.scanner-hud-target-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border: 1px solid rgba(52, 211, 153, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hud-crosshair {
  width: 8px;
  height: 8px;
  background: #10B981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10B981;
}

.scanner-hud-meta-row {
  position: absolute;
  top: 6px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
}
.scanner-hud-tag-left {
  font-size: 8.5px;
  color: #34D399;
  font-family: monospace;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.scanner-hud-tag-right {
  font-size: 8.5px;
  color: rgba(255, 255, 255, 0.8);
  font-family: monospace;
  font-weight: 600;
}

.scanner-live-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(15, 23, 42, 0.85);
  padding: 4px 10px;
  border-radius: var(--vm-radius-full);
  color: #FFFFFF;
  font-size: 10.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(52, 211, 153, 0.3);
  z-index: 6;
}
.scanner-reticle-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
  animation: coachPulse 1.4s infinite ease-in-out;
}

/* Scanner Controls Bar */
.scanner-controls-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  width: 100%;
  box-sizing: border-box;
}
.btn-scanner-ctrl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 8px;
  border-radius: 12px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
  box-sizing: border-box;
  min-height: 42px;
}
.btn-scanner-ctrl.primary {
  flex: 1.25;
  min-width: 0;
  background: linear-gradient(135deg, #059669, #10B981);
  color: #FFFFFF;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
  white-space: nowrap;
}
.btn-scanner-ctrl.primary:hover {
  background: linear-gradient(135deg, #047857, #059669);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.45);
}
.btn-scanner-ctrl.secondary {
  flex: 1;
  min-width: 0;
  background: #F8FAFC;
  color: #334155;
  border: 1.5px solid #CBD5E1;
  white-space: nowrap;
}
.btn-scanner-ctrl.secondary:hover {
  background: #F1F5F9;
  border-color: #94A3B8;
  color: #0F172A;
}
.btn-scanner-ctrl.icon-only {
  width: 38px;
  min-width: 38px;
  background: #F8FAFC;
  color: #334155;
  border: 1.5px solid #CBD5E1;
  padding: 0;
  font-size: 16px;
  flex-shrink: 0;
}
.btn-scanner-ctrl.icon-only:hover {
  background: #E2E8F0;
}
.btn-scanner-ctrl.icon-only.active {
  background: #ECFDF5;
  border-color: #10B981;
  color: #059669;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

#scanner-file-input,
#scanner-camera-input {
  display: none !important;
  position: absolute !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  pointer-events: none !important;
}

/* Preset Dishes Bar */
.scanner-presets-wrapper {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.presets-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.presets-title {
  font-size: 11px;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.presets-badge {
  font-size: 9.5px;
  font-weight: 700;
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
  padding: 2px 7px;
  border-radius: 9999px;
}
.scanner-presets-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.scanner-presets-scroll::-webkit-scrollbar {
  display: none;
}
.preset-dish-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  padding: 5px 10px 5px 6px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  text-align: left;
}
.preset-dish-pill:hover {
  border-color: #10B981;
  background: #F0FDF4;
  transform: translateY(-1px);
}
.preset-dish-pill.active {
  border-color: #059669;
  background: #ECFDF5;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}
.preset-pill-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}
.preset-pill-title {
  font-size: 11.5px;
  font-weight: 800;
  color: #0F172A;
  white-space: nowrap;
}
.preset-pill-kcal {
  font-size: 10px;
  font-weight: 700;
  color: #059669;
}

/* Telemetry Step Animation Bar */
.scanner-telemetry-box {
  background: #090D16;
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
.telemetry-step-text {
  font-size: 11.5px;
  font-weight: 700;
  color: #34D399;
  font-family: monospace;
  margin-bottom: 6px;
}
.telemetry-step-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  overflow: hidden;
}
.telemetry-step-fill {
  height: 100%;
  width: 30%;
  background: linear-gradient(90deg, #10B981, #34D399);
  transition: width 0.3s ease;
}

/* Analysis Results Card */
.scanner-analysis-card {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: var(--vm-radius-md);
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.scanner-dish-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}
.scanner-dish-pill-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
  flex-wrap: wrap;
}
.scanner-dish-label {
  font-size: 10px;
  font-weight: 800;
  color: #059669;
  text-transform: uppercase;
}
.scanner-quality-badge {
  font-size: 9.5px;
  font-weight: 800;
  color: #065F46;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  padding: 2px 6px;
  border-radius: 9999px;
}
.scanner-dish-name {
  font-size: 14.5px;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.3;
  outline: none;
  border-bottom: 1px dashed transparent;
  transition: border-color 0.2s;
}
.scanner-dish-name:hover,
.scanner-dish-name:focus {
  border-bottom-color: #10B981;
}
.scanner-dish-kcal-box {
  background: #F0FDF4;
  border: 1.5px solid #A7F3D0;
  border-radius: 12px;
  padding: 6px 12px;
  text-align: center;
  flex-shrink: 0;
}
.scanner-dish-kcal {
  font-size: 18px;
  font-weight: 900;
  color: #059669;
  display: block;
  line-height: 1;
}
.scanner-dish-kcal-unit {
  font-size: 9.5px;
  font-weight: 800;
  color: #047857;
  text-transform: uppercase;
}

/* Scanner Ingredients Identified Pills */
.scanner-ingredients-wrap {
  margin-bottom: 12px;
  padding: 10px 12px;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  box-sizing: border-box;
}
.scanner-ingredients-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 7px;
}
.scanner-ingredients-title {
  font-size: 11.5px;
  font-weight: 800;
  color: #1E293B;
  display: flex;
  align-items: center;
  gap: 4px;
}
.scanner-ingredients-count {
  font-size: 10px;
  font-weight: 700;
  color: #059669;
  background: #ECFDF5;
  padding: 2px 7px;
  border-radius: 9999px;
  border: 1px solid #A7F3D0;
}
.scanner-ingredients-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.ingr-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  padding: 4px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s ease;
}
.ingr-pill:hover {
  border-color: #94A3B8;
  transform: translateY(-1px);
}
.ingr-pill .ingr-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10B981;
  flex-shrink: 0;
}

/* Herbalife 50/25/25 Plate Formula Progress Bar */
.scanner-plate-formula-wrap {
  margin-bottom: 12px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 8px 10px;
}
.formula-legend-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 700;
  color: #475569;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.legend-dot.green { background: #10B981; }
.legend-dot.blue { background: #0284C7; }
.legend-dot.amber { background: #F59E0B; }
.formula-progress-bar {
  height: 7px;
  border-radius: 9999px;
  display: flex;
  overflow: hidden;
  background: #E2E8F0;
}
.formula-seg {
  height: 100%;
  transition: width 0.3s ease;
}
.formula-seg.green { background: #10B981; }
.formula-seg.blue { background: #0284C7; }
.formula-seg.amber { background: #F59E0B; }

/* Macros Grid */
.scanner-macros-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}
.scanner-macro-cell {
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  padding: 8px 4px;
  text-align: center;
  transition: transform 0.2s;
}
.scanner-macro-val {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 2px;
}
.scanner-macro-val.prot { color: #0284C7; }
.scanner-macro-val.carb { color: #D97706; }
.scanner-macro-val.fat { color: #059669; }
.scanner-macro-val.fiber { color: #7C3AED; }
.scanner-macro-lbl {
  font-size: 9px;
  font-weight: 800;
  color: #64748B;
  text-transform: uppercase;
}

/* Portion Selector */
.scanner-portion-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 12px;
  background: #F1F5F9;
  border-radius: 12px;
  padding: 10px 12px;
  box-sizing: border-box;
  width: 100%;
}
.portion-lbl {
  font-size: 11.5px;
  font-weight: 800;
  color: #475569;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.portion-chips-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
}
.portion-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6px 4px;
  border-radius: 9999px;
  border: 1.5px solid #CBD5E1;
  background: #FFFFFF;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
  min-height: 38px;
  min-width: 0;
  line-height: 1.15;
}
.portion-chip-label {
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.portion-chip-scale {
  font-size: 9.5px;
  font-weight: 600;
  opacity: 0.85;
  white-space: nowrap;
}
.portion-chip:hover {
  border-color: #94A3B8;
  background: #F8FAFC;
}
.portion-chip.active {
  background: #059669;
  color: #FFFFFF;
  border-color: #059669;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3);
}

/* Coach Verdict */
.scanner-coach-verdict {
  font-size: 11.5px;
  color: #334155;
  line-height: 1.5;
  background: #F0FDF4;
  padding: 10px 12px;
  border-radius: 10px;
  border-left: 3.5px solid #10B981;
}
.scanner-coach-verdict strong {
  color: #065F46;
  font-weight: 800;
}

/* Save Scanned Meal Button */
.btn-save-scanned-meal {
  width: 100%;
  background: linear-gradient(135deg, #059669 0%, #10B981 100%);
  color: #FFFFFF;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  transition: all 0.2s ease;
}
.btn-save-scanned-meal:hover {
  background: linear-gradient(135deg, #047857 0%, #059669 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
}

/* 2. Modal Selettore 3 Obiettivi di Benessere */
.goal-selector-modal-box {
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  scrollbar-width: thin;
}
.goal-tier-cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 14px 0;
}
.goal-tier-item {
  border: 1.5px solid var(--vm-border);
  border-radius: 16px;
  padding: 14px;
  background: #FFFFFF;
  transition: all 0.2s ease;
  position: relative;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.goal-tier-item:hover {
  border-color: #059669;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}
.goal-tier-item.active-goal {
  border-color: #DC2626;
  background: #FEF2F2;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}
.goal-tier-item.active-goal.energy {
  border-color: #D97706;
  background: #FFFBEB;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}
.goal-tier-item.active-goal.sport {
  border-color: #2563EB;
  background: #EFF6FF;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.goal-tier-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.goal-tier-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.goal-tier-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: rgba(15, 23, 42, 0.05);
}
.goal-tier-item-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--vm-ink-primary);
}
.goal-tier-check-badge {
  font-size: 11px;
  font-weight: 800;
  color: #059669;
}
.goal-tier-select-hint {
  font-size: 11px;
  font-weight: 700;
  color: var(--vm-ink-tertiary);
}
.goal-tier-tagline {
  font-size: 11.5px;
  color: var(--vm-ink-secondary);
  margin-bottom: 8px;
  line-height: 1.4;
}
.goal-tier-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}
.goal-tier-tag-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.05);
  color: var(--vm-ink-primary);
}

/* 3. Modal Selettore Kit Programma 10 Giorni */
.kit-selector-modal-box {
  max-width: 500px;
  max-height: 88vh;
  overflow-y: auto;
  scrollbar-width: thin;
}
.kit-tier-cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 14px 0;
}
.kit-tier-item {
  background: #F8FAFC;
  border: 1.5px solid var(--vm-border);
  border-radius: 16px;
  padding: 14px 16px;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.kit-tier-item.active-kit {
  background: #F0FDF4;
  border-color: #059669;
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.12);
}
.kit-tier-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.kit-tier-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.kit-tier-chip {
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 9999px;
}
.kit-tier-chip.bronze { background: #FEF3C7; color: #B45309; }
.kit-tier-chip.silver { background: #E2E8F0; color: #334155; }
.kit-tier-chip.gold { background: #FEF3C7; color: #D97706; }

.kit-tier-item-name {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--vm-ink-primary);
}
.kit-tier-price {
  font-size: 14px;
  font-weight: 900;
  color: #059669;
}
.kit-tier-tagline {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--vm-ink-secondary);
  margin-bottom: 8px;
}
.kit-tier-products {
  font-size: 11.5px;
  color: var(--vm-ink-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.kit-tier-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
}
.btn-kit-video-preview {
  flex: 1;
  background: #FFFFFF;
  border: 1px solid var(--vm-border);
  color: var(--vm-ink-secondary);
  font-size: 11.5px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
  cursor: pointer;
}
.btn-kit-video-preview:hover {
  background: #F8FAFC;
  color: var(--vm-ink-primary);
}
.btn-kit-select-action {
  flex: 1.2;
  background: #059669;
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 800;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.15s ease;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
}
.btn-kit-select-action:hover {
  background: #047857;
}
.btn-kit-select-action.already-active {
  background: #E2E8F0;
  color: #059669;
  box-shadow: none;
  cursor: default;
}

/* 4. Modal Player Video Vimeo */
.video-modal-box {
  background: #0F172A;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.15);
  max-width: 440px;
}
.video-modal-title {
  font-size: 14.5px;
  font-weight: 800;
  color: #FFFFFF;
  margin-top: 4px;
}
.video-modal-sub {
  font-size: 11px;
  color: #A7F3D0;
  margin: 0;
}
.video-frame-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: var(--vm-radius-sm);
  overflow: hidden;
  margin: 8px 0;
}
.video-frame-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}
.video-modal-actions-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.btn-video-close {
  flex: 0 0 90px;
  background: #1E293B;
  color: #CBD5E1;
  border: 1px solid #334155;
  border-radius: var(--vm-radius-sm);
  font-size: 12px;
  font-weight: 700;
}

/* 5. Modal Guida Coach & Recipe Modal */
.coach-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.coach-modal-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--vm-emerald-primary);
}
.coach-modal-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--vm-ink-primary);
}
.coach-modal-sub {
  font-size: 11px;
  color: var(--vm-emerald-primary);
  font-weight: 600;
}

.modal-hero-cover {
  width: 100%;
  height: 150px;
  border-radius: var(--vm-radius-md);
  overflow: hidden;
  margin-bottom: 12px;
  background: #E2E8F0;
}
.modal-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* =====================================================
   MODAL DETTAGLIO RICETTA PREMIUM (SCOPRI DI PIÙ)
   ===================================================== */
#recipe-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10050;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
#recipe-modal.open {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.recipe-detail-modal-box {
  background: #FFFFFF !important;
  border-radius: 24px !important;
  width: 100% !important;
  max-width: 520px !important;
  max-height: 90vh !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(226, 232, 240, 0.8) !important;
  position: relative !important;
  box-sizing: border-box !important;
  animation: recipeModalPopIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
  padding: 0 !important;
}

@keyframes recipeModalPopIn {
  0% { transform: scale(0.94) translateY(12px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* Hero Cover */
.recipe-modal-hero {
  position: relative;
  height: 220px;
  width: 100%;
  flex-shrink: 0;
  overflow: hidden;
  background: #0F172A;
}
.recipe-modal-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.recipe-modal-hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, transparent 40%, rgba(0,0,0,0.85) 100%);
  pointer-events: none;
}
.recipe-modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  z-index: 10;
  transition: transform 0.2s ease, background 0.2s ease;
}
.recipe-modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.85);
  transform: scale(1.08);
}
.recipe-modal-hero-badges {
  position: absolute;
  bottom: 12px;
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  z-index: 5;
}
.recipe-badge-slot {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #FFFFFF;
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4px;
}
.recipe-badge-goal {
  background: rgba(5, 150, 105, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #FFFFFF;
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 800;
}
.recipe-badge-goal.goal-massa { background: rgba(124, 58, 237, 0.95); }
.recipe-badge-goal.goal-energia { background: rgba(2, 132, 199, 0.95); }
.recipe-badge-goal.goal-deficit { background: rgba(234, 88, 12, 0.95); }

/* Scrollable Container */
.recipe-modal-content-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 18px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-sizing: border-box;
}

.recipe-modal-header-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.recipe-modal-title {
  font-size: 20px;
  font-weight: 900;
  color: #0F172A;
  line-height: 1.3;
  margin: 0;
}
.recipe-modal-desc {
  font-size: 13.5px;
  color: #475569;
  line-height: 1.5;
  margin: 0;
}

/* 4-Grid Macros */
.recipe-modal-macros-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.macro-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 6px;
  border-radius: 12px;
  text-align: center;
}
.macro-cell-icon {
  font-size: 16px;
  margin-bottom: 2px;
}
.macro-cell-val {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}
.macro-cell-lbl {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  opacity: 0.85;
  margin-top: 2px;
}

.macro-cell-cal { background: #FEF2F2; color: #DC2626; border: 1px solid #FEE2E2; }
.macro-cell-prot { background: #ECFDF5; color: #059669; border: 1px solid #D1FAE5; }
.macro-cell-carbs { background: #FFFBEB; color: #D97706; border: 1px solid #FEF3C7; }
.macro-cell-fats { background: #F5F3FF; color: #7C3AED; border: 1px solid #EDE9FE; }

/* Submeta row */
.recipe-modal-submeta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.recipe-submeta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #F1F5F9;
  color: #334155;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
}
.recipe-submeta-item.formula-indicator {
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #DBEAFE;
}

/* Section Card (Ingredients, Products) */
.recipe-modal-section-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 14px 16px;
}
.recipe-modal-section-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: #059669;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}
.recipe-modal-ingredients-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.modal-ingr-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: #1E293B;
  line-height: 1.4;
}
.modal-ingr-check {
  color: #059669;
  font-weight: 900;
  flex-shrink: 0;
  margin-top: 1px;
}
.modal-ingr-text {
  flex: 1;
}

/* Coach Tip */
.recipe-modal-coach-tip {
  background: #FFFBEB;
  border: 1.5px solid #FDE68A;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.coach-tip-avatar-wrap {
  position: relative;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}
.coach-tip-mini-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #F59E0B;
}
.coach-tip-lamp {
  position: absolute;
  bottom: -4px;
  right: -4px;
  font-size: 13px;
  background: #FFFFFF;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.coach-tip-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.coach-tip-title {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  color: #92400E;
  letter-spacing: 0.4px;
}
.coach-tip-text {
  font-size: 13px;
  color: #78350F;
  line-height: 1.45;
  font-weight: 500;
}

/* Products in Modal */
.recipe-modal-products-card {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 14px;
  padding: 14px 16px;
}
.recipe-modal-products-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Modal Actions */
.recipe-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.btn-log-recipe {
  width: 100%;
  background: #059669;
  color: #FFFFFF;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 800;
  padding: 13px 16px;
  text-align: center;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.28);
  transition: all 0.2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn-log-recipe:hover {
  background: #047857;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(5, 150, 105, 0.35);
}
.btn-log-recipe:active {
  transform: scale(0.98);
}
.btn-log-recipe.logged-success {
  background: #047857 !important;
  pointer-events: none;
}
.btn-close-recipe {
  width: 100%;
  background: #F1F5F9;
  color: #475569;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 16px;
  text-align: center;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}
.btn-close-recipe:hover {
  background: #E2E8F0;
  color: #1E293B;
}

/* 6. Modal Modifica Profilo Dati Personali */
.profile-edit-modal-box {
  background: var(--vm-surface-solid);
  border: 1px solid var(--vm-border);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
  padding: 22px 20px;
  max-width: 520px;
  width: 94%;
  max-height: 90vh;
  overflow-y: auto;
  box-sizing: border-box;
}
.profile-edit-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

/* Avatar & Foto Profilo Studio */
.profile-avatar-studio-card {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.avatar-studio-top {
  display: flex;
  align-items: center;
  gap: 16px;
}
.avatar-preview-wrapper {
  position: relative;
  width: 68px;
  height: 68px;
  flex-shrink: 0;
  cursor: pointer;
  border-radius: 50%;
  transition: transform 0.2s ease;
}
.avatar-preview-wrapper:hover {
  transform: scale(1.04);
}
.avatar-preview-img {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #10B981;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.22);
  display: block;
  background: #F1F5F9;
}
.avatar-camera-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 24px;
  height: 24px;
  background: #0F172A;
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #FFFFFF;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
}
.svg-icon-camera {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: #FFFFFF;
  stroke-width: 2;
}

.avatar-studio-controls {
  flex: 1;
  min-width: 0;
}
.avatar-studio-title {
  font-size: 13px;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 2px;
}
.avatar-studio-desc {
  font-size: 11px;
  color: #64748B;
  margin-bottom: 8px;
  line-height: 1.35;
}
.avatar-upload-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.btn-avatar-upload {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #10B981;
  color: #FFFFFF;
  border: none;
  border-radius: 9999px;
  padding: 6px 13px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
}
.btn-avatar-upload:hover {
  background: #059669;
  transform: translateY(-1px);
}
.svg-icon-upload {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: #FFFFFF;
  stroke-width: 2;
}
.btn-avatar-reset {
  display: inline-flex;
  align-items: center;
  background: #F1F5F9;
  color: #64748B;
  border: 1px solid #CBD5E1;
  border-radius: 9999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-avatar-reset:hover {
  background: #E2E8F0;
  color: #334155;
}

.avatar-presets-tray {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #E2E8F0;
}
.avatar-presets-label {
  font-size: 10.5px;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 8px;
}
.avatar-presets-list {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.avatar-preset-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #E2E8F0;
  padding: 0;
  background: #FFFFFF;
  cursor: pointer;
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  overflow: hidden;
}
.avatar-preset-btn img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.avatar-preset-btn:hover {
  border-color: #10B981;
  transform: translateY(-2px);
}
.avatar-preset-btn.active {
  border-color: #10B981;
  border-width: 2.5px;
  transform: scale(1.1);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.profile-modal-section {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 14px 14px 6px;
  margin-bottom: 2px;
}
.profile-section-heading {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.profile-section-heading.theme-slate {
  color: #334155;
}
.profile-section-heading.theme-emerald {
  color: #059669;
}
.profile-section-heading.theme-sky {
  color: #0284C7;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}
.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}
.form-grid-1 {
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
}

.form-group-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.profile-field-label {
  font-size: 10.5px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  height: 16px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-field-unit {
  font-size: 9.5px;
  font-weight: 700;
  color: #94A3B8;
  text-transform: none;
  letter-spacing: normal;
  flex-shrink: 0;
}

.profile-field-input,
.profile-field-select {
  width: 100%;
  height: 42px;
  line-height: 42px;
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  border-radius: 10px;
  padding: 0 10px;
  color: #0F172A;
  font-size: 13.5px;
  font-weight: 600;
  font-family: var(--vm-font, inherit);
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.02);
  box-sizing: border-box;
}
.profile-field-select {
  appearance: none;
  background-color: #FFFFFF;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
  cursor: pointer;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-field-input:focus,
.profile-field-select:focus {
  background: #FFFFFF;
  border-color: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18), inset 0 1px 2px rgba(15, 23, 42, 0.01);
}
.profile-field-input::placeholder {
  color: #94A3B8;
  font-weight: 400;
  font-size: 13px;
}

.btn-save-profile-action {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 800;
  height: 46px;
  padding: 0 20px;
  border-radius: 12px;
  width: 100%;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.3);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  margin-top: 4px;
}
.btn-save-profile-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(5, 150, 105, 0.4);
}
.btn-save-profile-action:active {
  transform: translateY(0);
}

/* 7. Quick Action Drawer (Bottom Sheet) */
.bottom-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 950;
  display: none;
}
.bottom-sheet-backdrop.open {
  display: block;
}
.bottom-sheet-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
  background: var(--vm-surface-solid);
  border-top-left-radius: var(--vm-radius-lg);
  border-top-right-radius: var(--vm-radius-lg);
  border-top: 1px solid var(--vm-border);
  padding: 12px 16px 80px;
  box-shadow: var(--vm-shadow-modal);
  transform: translateY(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 960;
}
.bottom-sheet-panel.open {
  transform: translateY(0);
}
.sheet-drag-handle {
  width: 36px;
  height: 4px;
  background: #CBD5E1;
  border-radius: var(--vm-radius-full);
  margin: 0 auto 12px;
}
.sheet-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--vm-ink-primary);
  margin-bottom: 12px;
}
.sheet-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.sheet-action-tile {
  background: #F8FAFC;
  border: 1px solid var(--vm-border);
  border-radius: var(--vm-radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.sheet-action-tile:hover {
  background: #F1F5F9;
  border-color: #CBD5E1;
}
.sheet-tile-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1px solid var(--vm-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--vm-emerald-primary);
  margin-bottom: 2px;
}
.sheet-tile-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--vm-ink-primary);
}
.sheet-tile-sub {
  font-size: 10px;
  color: var(--vm-ink-secondary);
}

/* 7. Toast Notifiche */
.toast-notification {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #0F172A;
  color: #FFFFFF;
  padding: 10px 18px;
  border-radius: var(--vm-radius-full);
  font-size: 12px;
  font-weight: 700;
  box-shadow: var(--vm-shadow-elevated);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2500;
  white-space: nowrap;
}
.toast-notification.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   14. APP VIEW ROUTING & CONTAINER
   ========================================================================== */
.app-page-view {
  display: none;
  animation: appViewFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.app-page-view.active {
  display: block;
}
@keyframes appViewFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Header di Sezione con Torna a Oggi */
.view-back-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  padding: 4px 2px;
}
.view-back-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.view-back-title-group > div {
  flex: 1;
  min-width: 0;
}
.btn-view-back {
  background: var(--vm-bg-surface);
  border: 1px solid var(--vm-border);
  color: var(--vm-ink-primary);
  width: 36px;
  height: 36px;
  border-radius: var(--vm-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.btn-view-back:hover {
  background: var(--vm-bg-elevated);
  border-color: rgba(255, 255, 255, 0.2);
}
.view-main-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--vm-ink-primary);
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.25;
}
.view-main-subtitle {
  font-size: 11.5px;
  color: var(--vm-ink-secondary);
  font-weight: 600;
  display: block;
  margin-top: 2px;
  line-height: 1.3;
}
.admin-header-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  flex-wrap: wrap;
}
.btn-refresh-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 9999px;
  background: #FFFFFF;
  color: #334155;
  border: 1px solid #CBD5E1;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.btn-refresh-pill:hover {
  background: #F1F5F9;
  color: #0F172A;
  border-color: #94A3B8;
}

/* ==========================================================================
   15. SEZIONE PROGRESSI & BIO-METRICHE (DARK GLASS)
   ========================================================================== */
.stats-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.stat-kpi-card {
  background: var(--vm-bg-surface);
  border: 1px solid var(--vm-border);
  border-radius: var(--vm-radius-md);
  padding: 12px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  box-shadow: var(--vm-shadow-glass);
}
.stat-kpi-val {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.stat-kpi-val.emerald { color: #34D399; }
.stat-kpi-val.cyan { color: #38BDF8; }
.stat-kpi-val.amber { color: #FBBF24; }
.stat-kpi-lbl {
  font-size: 10px;
  font-weight: 700;
  color: var(--vm-ink-secondary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-top: 2px;
}

/* Dossier Bio-metriche */
.bio-dossier-card {
  background: var(--vm-bg-surface);
  border: 1px solid var(--vm-border);
  border-radius: var(--vm-radius-lg);
  padding: 16px;
  margin-bottom: 18px;
  box-shadow: var(--vm-shadow-glass);
}
.dossier-top-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.dossier-tag-pill {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: #34D399;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.3);
  padding: 2.5px 8px;
  border-radius: var(--vm-radius-full);
}
.dossier-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.dossier-profile-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.dossier-avatar-box {
  position: relative;
}
.dossier-avatar-img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--vm-emerald-primary);
}
.dossier-user-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.dossier-user-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--vm-ink-primary);
}
.dossier-badges-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.dossier-badge-item {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--vm-radius-full);
  background: var(--vm-bg-elevated);
  border: 1px solid var(--vm-border);
  color: var(--vm-ink-secondary);
}
.dossier-badge-item.active-day {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(52, 211, 153, 0.4);
  color: #A7F3D0;
}
.dossier-subtitle-text {
  font-size: 11px;
  color: var(--vm-ink-tertiary);
  font-weight: 500;
}

/* Griglia 2x3 Parametri Bio-metrici */
.bio-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.bio-metric-item {
  background: var(--vm-bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--vm-radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bio-metric-lbl {
  font-size: 10px;
  font-weight: 700;
  color: var(--vm-ink-tertiary);
  text-transform: uppercase;
}
.bio-metric-val {
  font-size: 14px;
  font-weight: 800;
  color: var(--vm-ink-primary);
}
.bio-metric-val.highlight {
  color: #34D399;
}
.bio-metric-diff {
  font-size: 10px;
  font-weight: 700;
  color: #34D399;
}

/* Grafico di Andamento (Dark Glass SVG Visualizer) */
.progress-chart-card {
  background: var(--vm-bg-surface);
  border: 1px solid var(--vm-border);
  border-radius: var(--vm-radius-lg);
  padding: 16px;
  margin-bottom: 18px;
  box-shadow: var(--vm-shadow-glass);
}
.chart-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.chart-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--vm-ink-primary);
  line-height: 1.25;
}
.chart-subtitle {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--vm-ink-secondary);
  line-height: 1.35;
  display: block;
}
.chart-period-tag {
  font-size: 10.5px;
  font-weight: 700;
  color: #34D399;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.3);
  padding: 2px 7px;
  border-radius: var(--vm-radius-full);
  white-space: nowrap;
}
.svg-chart-container {
  width: 100%;
  height: 140px;
  margin: 6px 0;
}
.chart-days-axis {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 700;
  color: var(--vm-ink-tertiary);
  padding: 0 4px;
}

/* Misure e Circonferenze */
.circumference-card {
  background: var(--vm-bg-surface);
  border: 1px solid var(--vm-border);
  border-radius: var(--vm-radius-lg);
  padding: 16px;
  margin-bottom: 24px;
  box-shadow: var(--vm-shadow-glass);
}
.circumference-table {
  width: 100%;
  border-collapse: collapse;
}
.circumference-table th {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--vm-ink-tertiary);
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--vm-border);
}
.circumference-table td {
  font-size: 12px;
  font-weight: 600;
  color: var(--vm-ink-primary);
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.circumference-diff-pill {
  font-size: 10.5px;
  font-weight: 800;
  color: #34D399;
  background: rgba(16, 185, 129, 0.15);
  padding: 2px 6px;
  border-radius: var(--vm-radius-sm);
  display: inline-block;
}

/* ==========================================================================
   16. SEZIONE REPORT & CONFRONTO GRUPPO / CLASSIFICA (TRIBE PODIUM)
   ========================================================================== */
.tribe-podium-card {
  background: var(--vm-bg-surface);
  border: 1px solid var(--vm-border);
  border-radius: var(--vm-radius-lg);
  padding: 18px 14px 14px;
  margin-bottom: 18px;
  box-shadow: var(--vm-shadow-glass);
}
.podium-title-row {
  text-align: center;
  margin-bottom: 16px;
}
.podium-heading {
  font-size: 15px;
  font-weight: 800;
  color: var(--vm-ink-primary);
  margin-bottom: 2px;
}
.podium-sub {
  font-size: 11px;
  color: var(--vm-ink-secondary);
}

/* I 3 Gradini del Podio */
.podium-blocks-row {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}
.podium-slot {
  flex: 1;
  max-width: 105px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.podium-avatar-wrap {
  position: relative;
  margin-bottom: 6px;
}
.podium-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #CBD5E1;
}
.podium-slot.gold .podium-avatar {
  width: 54px;
  height: 54px;
  border-color: #F59E0B;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.35);
}
.podium-slot.silver .podium-avatar { border-color: #94A3B8; }
.podium-slot.bronze .podium-avatar { border-color: #D97706; }

.podium-avatar-initials {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: #FFFFFF;
  border: 2px solid #CBD5E1;
  background: #1E293B;
}
.podium-slot.gold .podium-avatar-initials {
  width: 54px;
  height: 54px;
  border-color: #F59E0B;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.35);
  background: #78350F;
  color: #FDE68A;
}
.podium-slot.silver .podium-avatar-initials {
  border-color: #94A3B8;
  background: #334155;
  color: #F1F5F9;
}
.podium-slot.bronze .podium-avatar-initials {
  border-color: #D97706;
  background: #451A03;
  color: #FCD34D;
}
.leader-avatar-initials {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 11.5px;
  color: #FFFFFF;
  background: #1E293B;
  border: 1.5px solid var(--vm-border);
}

.podium-medal-badge {
  position: absolute;
  bottom: -4px;
  right: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}
.podium-slot.gold .podium-medal-badge { background: #F59E0B; color: #000; }
.podium-slot.silver .podium-medal-badge { background: #94A3B8; color: #000; }
.podium-slot.bronze .podium-medal-badge { background: #D97706; color: #FFF; }

.podium-user-name {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--vm-ink-primary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90px;
}
.podium-pts-val {
  font-size: 11px;
  font-weight: 800;
  color: #34D399;
}
.podium-step-box {
  width: 100%;
  border-top-left-radius: var(--vm-radius-md);
  border-top-right-radius: var(--vm-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
  margin-top: 6px;
}
.podium-slot.gold .podium-step-box {
  height: 80px;
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.3) 0%, rgba(245, 158, 11, 0.1) 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-bottom: none;
  color: #FBBF24;
}
.podium-slot.silver .podium-step-box {
  height: 60px;
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.25) 0%, rgba(148, 163, 184, 0.08) 100%);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-bottom: none;
  color: #CBD5E1;
}
.podium-slot.bronze .podium-step-box {
  height: 48px;
  background: linear-gradient(180deg, rgba(217, 119, 6, 0.25) 0%, rgba(217, 119, 6, 0.08) 100%);
  border: 1px solid rgba(217, 119, 6, 0.3);
  border-bottom: none;
  color: #FCD34D;
}

/* Lista Classifica Partecipanti */
.leaderboard-list-card {
  background: var(--vm-bg-surface);
  border: 1px solid var(--vm-border);
  border-radius: var(--vm-radius-lg);
  padding: 12px;
  margin-bottom: 24px;
  box-shadow: var(--vm-shadow-glass);
}
.leaderboard-table {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.leaderboard-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--vm-radius-md);
  background: var(--vm-bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s ease;
}
.leaderboard-row-item.current-user {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(52, 211, 153, 0.4);
}
.leader-left-col {
  display: flex;
  align-items: center;
  gap: 10px;
}
.leader-rank-num {
  font-size: 13px;
  font-weight: 800;
  color: var(--vm-ink-secondary);
  min-width: 20px;
}
.leader-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--vm-border);
}
.leader-name-block {
  display: flex;
  flex-direction: column;
}
.leader-user-name {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--vm-ink-primary);
}
.leader-streak-sub {
  font-size: 10px;
  color: var(--vm-ink-tertiary);
  font-weight: 600;
}
.leader-right-col {
  text-align: right;
}
.leader-pts-badge {
  font-size: 13px;
  font-weight: 900;
  color: #34D399;
}
.leader-kg-lost {
  font-size: 10px;
  font-weight: 700;
  color: var(--vm-ink-tertiary);
}

/* ==========================================================================
   17. SEZIONE COMMUNITY & COACH HUB (WHATSAPP-STYLE & AI CHAT)
   ========================================================================== */
.community-subnav-strip {
  display: flex;
  background: var(--vm-bg-surface);
  border: 1px solid var(--vm-border);
  border-radius: var(--vm-radius-full);
  padding: 3px;
  gap: 3px;
  margin-bottom: 14px;
}
.community-subnav-btn {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: var(--vm-radius-full);
  padding: 8px 12px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--vm-ink-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.community-subnav-btn.active {
  background: var(--vm-emerald-primary);
  color: #FFFFFF;
  font-weight: 800;
}

/* Canali Rapidi Tribe */
.channels-chip-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 12px;
}
.channels-chip-row::-webkit-scrollbar { display: none; }
.channel-pill-btn {
  flex: 0 0 auto;
  background: var(--vm-bg-surface);
  border: 1px solid var(--vm-border);
  color: var(--vm-ink-secondary);
  padding: 5px 11px;
  border-radius: var(--vm-radius-full);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.channel-pill-btn.active {
  background: var(--vm-bg-elevated);
  border-color: var(--vm-emerald-primary);
  color: #34D399;
}

/* Finestra Chat Celestial Light Canvas — Header Compatto Salva-Spazio */
.chat-window-card {
  background: #FFFFFF;
  border: 1px solid var(--vm-border);
  border-radius: var(--vm-radius-xl) var(--vm-radius-xl) 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  margin-top: 2px;
  margin-bottom: 0;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

/* Modalità Chat Immobile Senza Spazio Vuoto Inferiore */
body.view-community-mode,
body:has(#view-community.active) {
  overflow: hidden !important;
  height: 100vh !important;
  height: 100dvh !important;
  position: fixed !important;
  width: 100% !important;
  top: 0 !important;
  left: 0 !important;
}

body.view-community-mode .app-container,
body:has(#view-community.active) .app-container {
  height: 100% !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  min-height: 0 !important;
  padding: 6px 12px 64px 12px !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

body.view-community-mode .top-app-bar,
body:has(#view-community.active) .top-app-bar {
  flex-shrink: 0 !important;
  padding: 4px 4px 6px !important;
  margin: 0 !important;
}

body.view-community-mode #view-community,
body:has(#view-community.active) #view-community {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 100% !important;
}

body.view-community-mode #pane-community-chat,
body:has(#view-community.active) #pane-community-chat {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  overflow: hidden !important;
}

body.view-community-mode .chat-window-card,
body:has(#view-community.active) .chat-window-card {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  height: 100% !important;
  margin: 0 !important;
  margin-top: 2px !important;
  margin-bottom: 0 !important;
  border-radius: var(--vm-radius-xl) var(--vm-radius-xl) 0 0 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

body.view-community-mode .chat-window-header,
body:has(#view-community.active) .chat-window-header {
  flex-shrink: 0 !important;
  padding: 8px 12px !important;
  gap: 6px !important;
}

body.view-community-mode .chat-stream-box,
body:has(#view-community.active) .chat-stream-box {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  overscroll-behavior-y: contain !important;
  padding: 12px 14px !important;
}

body.view-community-mode #pane-community-chat-body,
body:has(#view-community.active) #pane-community-chat-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.view-community-mode #pane-community-chat-body[style*="display: none"],
body:has(#view-community.active) #pane-community-chat-body[style*="display: none"] {
  display: none !important;
}

body.view-community-mode #pane-community-partecipanti,
body:has(#view-community.active) #pane-community-partecipanti {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  overscroll-behavior-y: contain !important;
  padding: 14px 14px 70px 14px !important;
}

body.view-community-mode #pane-community-partecipanti[style*="display: none"],
body:has(#view-community.active) #pane-community-partecipanti[style*="display: none"] {
  display: none !important;
}

body.view-community-mode .chat-suggestion-chips-bar,
body:has(#view-community.active) .chat-suggestion-chips-bar {
  flex-shrink: 0 !important;
  padding: 6px 12px !important;
  background: #F8FAFC !important;
}

body.view-community-mode .chat-input-bar,
body:has(#view-community.active) .chat-input-bar {
  flex-shrink: 0 !important;
  margin: 0 !important;
  padding: 8px 12px !important;
  background: #FFFFFF !important;
  border-top: 1px solid #E2E8F0 !important;
  border-bottom: none !important;
  border-radius: 0 !important;
}
.chat-window-header {
  padding: 10px 14px 10px 14px;
  background: #FFFFFF;
  border-bottom: 1px solid #E2E8F0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.chat-header-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.btn-chat-nav-back {
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  color: #1E293B;
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.btn-chat-nav-back:hover {
  background: #E2E8F0;
}

.chat-header-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.chat-header-avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #06B6D4;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(6, 182, 212, 0.25);
}

.chat-header-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.chat-header-name {
  font-size: 13px;
  font-weight: 800;
  color: #0F172A;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}

#chat-current-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}

.chat-header-status {
  font-size: 11px;
  font-weight: 600;
  color: #059669;
  display: flex;
  align-items: center;
  gap: 5px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-indicator-dot {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 6px #10B981;
  flex-shrink: 0;
}

.btn-chat-channels-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ECFDF5;
  color: #047857;
  border: 1.5px solid #A7F3D0;
  padding: 5px 11px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-chat-channels-toggle:hover {
  background: #D1FAE5;
  border-color: #6EE7B7;
  transform: translateY(-1px);
}

.chat-compact-mode-pills {
  display: flex;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: var(--vm-radius-full);
  padding: 3px;
  gap: 3px;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.chat-compact-mode-pills::-webkit-scrollbar {
  display: none;
}

.chat-mode-pill-btn {
  flex: 1 0 auto;
  text-align: center;
  background: transparent;
  border: none;
  border-radius: var(--vm-radius-full);
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #64748B;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.chat-mode-pill-btn.active {
  background: #059669;
  color: #FFFFFF;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
}

/* ==========================================================================
   DRAWER CANALI & DESTINATARI CHAT (#community-channels-sidebar)
   ========================================================================== */
.community-channels-sidebar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  bottom: 0 !important;
  width: 88% !important;
  max-width: 360px !important;
  height: 100vh !important;
  height: 100dvh !important;
  background: #FFFFFF !important;
  border-right: 1.5px solid #E2E8F0 !important;
  box-shadow: 16px 0 50px rgba(0, 0, 0, 0.45) !important;
  z-index: 1000001 !important;
  transform: translateX(-105%) !important;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.community-channels-sidebar.mobile-open {
  transform: translateX(0) !important;
}

.channels-backdrop,
#channels-backdrop {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(15, 23, 42, 0.65) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 1000000 !important;
  animation: channelsBackdropFadeIn 0.25s ease-out forwards !important;
}

@keyframes channelsBackdropFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.channels-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
}

.close-channels-sidebar-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  color: #475569;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.close-channels-sidebar-btn:hover {
  background: #F1F5F9;
  color: #0F172A;
  transform: scale(1.05);
}

.channel-items-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px 30px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.channel-group-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.channel-group-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748B;
  padding: 2px 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.channel-item-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  color: #1E293B;
  text-decoration: none;
}

.channel-item-card:hover {
  background: #F1F5F9;
  border-color: #CBD5E1;
  transform: translateX(3px);
}

.channel-item-card.active {
  background: #ECFDF5 !important;
  border-color: #10B981 !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.12);
}

.channel-avatar-wrap {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  overflow: hidden;
  flex-shrink: 0;
}

.channel-avatar-community { background: #ECFDF5; border: 1.5px solid #A7F3D0; }
.channel-avatar-upline { background: #EFF6FF; border: 1.5px solid #BFDBFE; }
.channel-avatar-broadcast { background: #FEF9C3; border: 1.5px solid #FDE047; }
.channel-avatar-client { background: #F0FDFA; border: 1.5px solid #99F6E4; }
.channel-avatar-admin { background: #FDF2F8; border: 1.5px solid #FBCFE8; }

.channel-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.channel-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.channel-card-name {
  font-size: 13px;
  font-weight: 700;
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-card-sub {
  font-size: 11px;
  color: #64748B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-badge-unread {
  font-size: 10px;
  font-weight: 800;
  background: #00873D;
  color: #FFFFFF;
  padding: 2px 7px;
  border-radius: 12px;
  margin-left: auto;
}


/* Canvas Stream Sfondo Sfumato Etereo */
.chat-stream-box {
  flex: 1;
  padding: 18px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: linear-gradient(180deg, #F1F5F9 0%, #E8EEF5 45%, #DFE7F2 100%);
  position: relative;
}

/* Fila Messaggio con Avatar Esterno */
.chat-bubble-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  max-width: 92%;
  position: relative;
}
.chat-bubble-row.inbound {
  align-self: flex-start;
}
.chat-bubble-row.outbound {
  align-self: flex-end;
  flex-direction: row-reverse;
}

/* Avatar Esterni */
.chat-msg-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  margin-bottom: 2px;
}
.chat-msg-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.chat-msg-avatar.ai-coach {
  border: 2px solid #06B6D4;
  box-shadow: 0 2px 10px rgba(6, 182, 212, 0.4);
  background: #0F172A;
}
.chat-msg-avatar.user-person {
  border: 2px solid #FFFFFF;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
}

/* Bolla Bianca Pura con Ombra Morbida */
.chat-bubble-card {
  background: #FFFFFF;
  color: #1E293B;
  padding: 14px 18px;
  border-radius: 22px 22px 22px 4px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02);
  font-size: 13.5px;
  line-height: 1.5;
  font-weight: 500;
  position: relative;
  word-break: break-word;
}
.chat-bubble-row.outbound .chat-bubble-card {
  border-radius: 22px 22px 4px 22px;
  background: #FFFFFF;
  color: #1E293B;
}

/* Card Piatto/Media interna alla bolla */
.chat-media-dish-card {
  display: flex;
  flex-direction: column;
}
.chat-dish-photo {
  width: 100%;
  max-width: 280px;
  height: 175px;
  border-radius: 16px;
  object-fit: cover;
  display: block;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.chat-dish-title {
  font-size: 14.5px;
  font-weight: 800;
  color: #0F172A;
  margin-top: 10px;
  letter-spacing: -0.01em;
}
.chat-dish-sub {
  font-size: 12.5px;
  color: #64748B;
  font-weight: 500;
  margin-top: 3px;
  line-height: 1.4;
}

/* Typing Indicator Bubble con 3 Dot */
.chat-typing-row {
  display: flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  margin-top: 2px;
}
.chat-typing-bubble {
  background: #FFFFFF;
  border-radius: 18px 18px 18px 4px;
  padding: 10px 16px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.chat-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #06B6D4;
  opacity: 0.5;
  animation: typingBounce 1.4s infinite ease-in-out;
}
.chat-typing-dot:nth-child(1) { animation-delay: 0s; }
.chat-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.chat-typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(-4px); opacity: 1; }
}

/* Barra di Domande Rapide & Suggestion Chips */
.chat-suggestion-chips-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #F8FAFC;
  border-top: 1px solid #E2E8F0;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.chat-suggestion-chips-bar::-webkit-scrollbar {
  display: none;
}
.chat-suggestion-chip {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 11.5px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  font-family: inherit;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.chat-suggestion-chip:hover {
  background: #F0FDF4;
  border-color: #10B981;
  color: #065F46;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(16, 185, 129, 0.15);
}
.chat-suggestion-chip:active {
  transform: scale(0.97);
}

/* Input Bar Inferiore */
.chat-input-bar {
  padding: 12px 16px;
  background: #FFFFFF;
  border-top: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.btn-chat-photo-touch {
  background: #F8FAFC;
  border: 1.5px solid #CBD5E1;
  color: #475569;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.btn-chat-photo-touch svg {
  color: #475569;
  transform: rotate(-45deg);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease;
}
.btn-chat-photo-touch:hover {
  background: #F0FDF4;
  border-color: #A7F3D0;
  color: #059669;
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 3px 8px rgba(5, 150, 105, 0.15);
}
.btn-chat-photo-touch:hover svg {
  color: #059669;
  transform: rotate(0deg) scale(1.1);
}
.chat-text-input {
  flex: 1;
  background: #F8FAFC;
  border: 1.5px solid #CBD5E1;
  border-radius: var(--vm-radius-full);
  padding: 10px 16px;
  color: #0F172A;
  font-size: 13px;
  font-weight: 500;
  height: 40px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.chat-text-input:focus {
  border-color: #059669;
  background: #FFFFFF;
}
.btn-chat-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #059669;
  border: none;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}
.btn-chat-send:hover {
  background: #047857;
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4);
}

/* ==========================================================================
   18. SEZIONE PROFILO & SETUP
   ========================================================================== */
.profile-card-section {
  background: var(--vm-bg-surface);
  border: 1px solid var(--vm-border);
  border-radius: var(--vm-radius-lg);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--vm-shadow-glass);
}
.profile-hero-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.profile-large-avatar {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--vm-emerald-primary);
}
.profile-name-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--vm-ink-primary);
  margin-bottom: 2px;
}
.profile-email-sub {
  font-size: 11.5px;
  color: var(--vm-ink-secondary);
}

.profile-stats-pill-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.profile-badge-pill {
  flex: 1;
  background: var(--vm-bg-elevated);
  border: 1px solid var(--vm-border);
  border-radius: var(--vm-radius-md);
  padding: 8px;
  text-align: center;
}
.profile-badge-lbl {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--vm-ink-tertiary);
  display: block;
}
.profile-badge-val {
  font-size: 13px;
  font-weight: 800;
  color: #34D399;
}

.profile-settings-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.profile-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--vm-bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--vm-radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
}
.profile-setting-row:hover {
  background: rgba(255, 255, 255, 0.08);
}
.profile-setting-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.profile-setting-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--vm-ink-primary);
}
.profile-setting-value {
  font-size: 11px;
  font-weight: 600;
  color: var(--vm-ink-tertiary);
}

/* Box Disclaimer Herbalife Ufficiale */
.official-compliance-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--vm-radius-md);
  padding: 12px 14px;
  margin-top: 14px;
}
.compliance-box-title {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--vm-ink-secondary);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.compliance-box-text {
  font-size: 10px;
  line-height: 1.45;
  color: var(--vm-ink-tertiary);
  margin: 0;
}

/* ==========================================================================
   19. LE 5 CARD ABITUDINI FULL BLEED 4K DARK HUD (FLOATING HUD DESIGN)
   ========================================================================== */

.habit-dark-card,
.habit-dark-card * {
  text-shadow: none !important;
}

.habit-dark-card {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  margin-bottom: 24px;
  border: none;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, background-image 0.4s ease-in-out;
  min-height: 360px;
  height: auto;
  box-sizing: border-box;
  display: flex;
}

.habit-dark-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.45), 0 4px 12px rgba(0, 0, 0, 0.25);
}

.habit-dark-card.completed {
  border: none;
  box-shadow: 0 16px 42px rgba(16, 185, 129, 0.35), 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Sfondi 4K Ufficiali */
.card-bg-formula1 {
  background-image: url('assets/card_bg_formula1.jpg');
}
.card-bg-aloe-tea {
  background-image: url('assets/card_bg_aloe_tea.jpg');
}
.card-bg-protein-bar {
  background-image: url('assets/card_bg_protein_bar.jpg');
}
.card-bg-balanced-meal {
  background-image: url('assets/card_bg_balanced_meal.jpg');
}
.card-bg-sport-h24 {
  background-image: url('assets/card_bg_sport_h24.jpg');
}

.habit-dark-scrim {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  min-height: 360px;
  height: auto;
  box-sizing: border-box;
  padding: 16px;
  background: linear-gradient(180deg, 
    rgba(0, 0, 0, 0.65) 0%, 
    rgba(0, 0, 0, 0.20) 22%, 
    rgba(0, 0, 0, 0.42) 48%, 
    rgba(0, 0, 0, 0.80) 72%, 
    rgba(0, 0, 0, 0.94) 100%);
  position: relative;
  z-index: 1;
}

/* Top Bar Card */
.dark-card-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 70px;
  z-index: 2;
  transition: margin-bottom 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

#habit-f1-card .dark-card-top-bar {
  margin-bottom: 12px;
}

.btn-card-recipe-info {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  border-radius: 9999px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-card-recipe-info:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.btn-card-recipe-info:active {
  transform: translateY(0);
}

.dark-product-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 4px 11px;
  border-radius: 9999px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.dark-product-chip .p-brand-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 10px #10B981;
  flex-shrink: 0;
}

.dark-pts-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #A7F3D0;
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 11px;
  border-radius: 9999px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  transition: all 0.2s ease;
}

.habit-dark-card.completed .dark-pts-badge {
  background: #10B981;
  color: #FFFFFF;
  border-color: #34D399;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.6);
}

/* Spotlight Titolo Prodotto */
.dark-card-spotlight {
  margin-bottom: 12px;
  z-index: 2;
  transition: margin-bottom 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.dark-product-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.dark-product-title {
  color: #FFFFFF;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.dark-product-pill {
  font-size: 10px;
  font-weight: 800;
  color: #FFFFFF;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 2.5px 8.5px;
  border-radius: 6px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.dark-product-sub {
  color: #F8FAFC;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
}

/* Controls Dock Fluttuante */
.dark-card-controls-dock {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
  z-index: 2;
}

.dark-instruction-text {
  font-size: 11px;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Segmented Control Shakes */
.habit-dark-card .shakes-segmented-control {
  display: flex;
  gap: 5px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin-bottom: 10px;
}

.habit-dark-card .shake-segment-btn {
  flex: 1;
  min-width: 0;
  padding: 6px 2px 7px 2px;
  border-radius: 12px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
  position: relative;
}

.habit-dark-card .shake-segment-btn:hover {
  transform: translateY(-2px);
}

.habit-dark-card .shake-segment-btn .shake-unit-svg {
  width: 17px;
  height: 22px;
  stroke: #FFFFFF;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.95));
  transition: all 0.2s ease;
}

.habit-dark-card .shake-segment-btn .shake-zero-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  color: #FFFFFF;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.95));
  transition: all 0.2s ease;
}

.habit-dark-card .shake-segment-btn.active .shake-unit-svg {
  stroke: #10B981;
  filter: drop-shadow(0 0 10px #10B981) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.95));
  transform: scale(1.08);
}

.habit-dark-card .shake-segment-btn.active .shake-zero-circle {
  border-color: #10B981;
  color: #10B981;
  filter: drop-shadow(0 0 10px #10B981) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.95));
  transform: scale(1.08);
}

.habit-dark-card .shake-btn-label {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  color: #FFFFFF;
  white-space: nowrap;
  text-align: center;
}

.habit-dark-card .shake-segment-btn.active .shake-btn-label {
  color: #34D399;
}

.habit-dark-card .shake-pts-mini {
  font-size: 9.5px;
  font-weight: 800;
  color: #CBD5E1;
  white-space: nowrap;
  text-align: center;
  letter-spacing: -0.2px;
  line-height: 1.1;
}

.habit-dark-card .shake-segment-btn.active .shake-pts-mini {
  color: #A7F3D0;
}

.habit-dark-card .shake-segment-btn.active::after {
  content: "";
  position: absolute;
  bottom: 1px;
  left: 15%;
  right: 15%;
  height: 2.5px;
  background: #10B981;
  border-radius: 9999px;
  box-shadow: 0 0 10px #10B981;
}

.habit-dark-card .shakes-protocol-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #A7F3D0;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  margin-top: 4px;
}

.habit-dark-card .shakes-protocol-note svg {
  width: 14px;
  height: 14px;
  stroke: #10B981;
  filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.7));
  flex-shrink: 0;
  margin-top: 1px;
}

.habit-dark-card .water-protocol-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #BAE6FD;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  margin-top: 6px;
}

.habit-dark-card .water-protocol-note svg {
  width: 14px;
  height: 14px;
  stroke: #38BDF8;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.7));
  flex-shrink: 0;
  margin-top: 1px;
}

.habit-dark-card.completed .shakes-protocol-note {
  color: #A7F3D0;
  border-color: rgba(16, 185, 129, 0.5);
}

.habit-dark-card.completed .water-protocol-note {
  color: #BAE6FD;
  border-color: rgba(56, 189, 248, 0.5);
}

/* Card 2 Idratazione */
#habit-water-card .dark-card-top-bar {
  margin-bottom: 12px;
}
#habit-water-card .dark-card-spotlight {
  margin-bottom: 6px;
}
#habit-water-card .water-telemetry-meta {
  margin-bottom: 6px;
}
#habit-water-card .water-flasks-grid {
  margin-bottom: 8px;
}
#habit-water-card .water-quick-stepper-row {
  margin-bottom: 6px;
}
#habit-water-card .water-protocol-note {
  margin-top: 4px;
  margin-bottom: 2px;
}

.habit-dark-card .water-telemetry-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.habit-dark-card .water-curr-liters {
  font-size: 16px;
  font-weight: 900;
  color: #38BDF8;
}

.habit-dark-card .water-target-info {
  font-size: 11.5px;
  font-weight: 800;
  color: #FFFFFF;
}

.habit-dark-card .water-flasks-grid {
  display: flex;
  gap: 5px;
  margin-bottom: 10px;
}

.habit-dark-card .water-flask-tile {
  flex: 1;
  min-width: 0;
  background: transparent !important;
  border: none !important;
  padding: 4px 1px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  transition: transform 0.15s ease;
  position: relative;
}

.habit-dark-card .water-flask-tile:hover {
  transform: translateY(-2px);
}

.habit-dark-card .flask-graphic-svg {
  width: 24px;
  height: 38px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.95));
  transition: all 0.2s ease;
}

.habit-dark-card .water-flask-tile .flask-body-outline {
  stroke: #FFFFFF;
  stroke-width: 2;
}

.habit-dark-card .water-flask-tile .flask-cap-part {
  fill: #FFFFFF;
}

.habit-dark-card .water-flask-tile.filled .flask-graphic-svg {
  filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.85)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.95));
  transform: scale(1.06);
}

.habit-dark-card .water-flask-tile.filled .flask-body-outline {
  stroke: #38BDF8;
}

.habit-dark-card .water-flask-tile.filled .flask-cap-part {
  fill: #38BDF8;
}

.habit-dark-card .water-flask-tile.filled .flask-liquid-level {
  fill: #38BDF8;
}

.habit-dark-card .flask-check-pip {
  position: absolute;
  top: 0px;
  right: 4px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #38BDF8;
  color: #0F172A;
  font-size: 8.5px;
  font-weight: 900;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px #38BDF8;
}

.habit-dark-card .water-flask-tile.filled .flask-check-pip {
  display: flex;
}

.habit-dark-card .flask-vol-tag {
  font-size: 11px;
  font-weight: 800;
  color: #FFFFFF;
  white-space: nowrap;
}

.habit-dark-card .flask-routine-tag {
  font-size: 9px;
  font-weight: 800;
  color: #E2E8F0;
  white-space: nowrap;
}

.habit-dark-card .water-flask-tile.filled .flask-routine-tag {
  color: #BAE6FD;
}

.habit-dark-card .water-quick-stepper-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.habit-dark-card .btn-water-step {
  padding: 5px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.6) !important;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

.habit-dark-card .btn-water-step:hover {
  border-color: #38BDF8 !important;
  color: #38BDF8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
}

.habit-dark-card .water-bar-track-wrap {
  flex: 1;
  min-width: 0;
}

.habit-dark-card .water-bar-track-card {
  height: 5px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.habit-dark-card .water-bar-fill-card {
  height: 100%;
  background: linear-gradient(90deg, #0284C7 0%, #38BDF8 100%);
  border-radius: 9999px;
  box-shadow: 0 0 12px #38BDF8;
}

.habit-dark-card .water-bar-milestones {
  display: flex;
  justify-content: space-between;
  font-size: 8.5px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.2px;
}

.habit-dark-card .water-bar-milestones span {
  white-space: nowrap;
}

/* Card 3, 4, 5 (Righe Semplici) */
.habit-dark-card .habit-simple-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 4px 0;
  transition: transform 0.15s ease;
}

.habit-dark-card .habit-simple-row:hover {
  transform: translateX(2px);
}

.habit-dark-card .habit-simple-row div > div:first-child {
  color: #FFFFFF;
}

.habit-dark-card .habit-simple-row div > div:last-child {
  color: #E2E8F0 !important;
}

.habit-dark-card .habit-check-square {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 2px solid #FFFFFF;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFF;
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
  transition: all 0.2s ease;
}

.habit-dark-card.completed .habit-check-square {
  background: #10B981;
  border-color: #34D399;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.7), 0 2px 6px rgba(0, 0, 0, 0.9);
}

.habit-dark-card.completed .habit-check-square::after {
  content: "✓";
  color: #FFFFFF;
}

.habit-dark-card .btn-scan-meal-inline {
  margin-top: 10px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #FFFFFF;
  font-size: 12.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.habit-dark-card .btn-scan-meal-inline:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.8);
}

/* Telemetria Movimento */
#habit-movement-card.telemetry-open .dark-card-top-bar {
  margin-bottom: 6px;
}
#habit-movement-card.telemetry-open .dark-card-spotlight {
  margin-bottom: 4px;
}
#habit-movement-card.telemetry-open .habit-simple-row {
  margin-bottom: 4px !important;
}

.habit-dark-card .movement-telemetry-panel {
  display: none;
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.habit-dark-card .movement-telemetry-panel.open {
  display: block;
}

.habit-dark-card .telemetry-inputs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 6px;
}

.habit-dark-card .telemetry-input-field label {
  font-size: 9.5px;
  font-weight: 800;
  color: #FFFFFF;
  display: block;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.habit-dark-card .telemetry-input-field input,
.habit-dark-card .telemetry-input-field select {
  width: 100%;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 800;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
}

.habit-dark-card .telemetry-save-row {
  display: flex;
  gap: 6px;
}

.habit-dark-card .btn-telemetry-save {
  flex: 1;
  padding: 7px 10px;
  border-radius: 8px;
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  border: none;
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.5);
  transition: transform 0.15s ease;
}

.habit-dark-card .btn-telemetry-save:hover {
  transform: translateY(-1px);
}

.habit-dark-card .btn-telemetry-workouts {
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: transform 0.15s ease;
}

.habit-dark-card .btn-telemetry-workouts:hover {
  transform: translateY(-1px);
}

/* ==========================================================================
   MODAL LINGUA & REGIONE + PROMEMORIA NOTIFICHE (ALTA DEFINIZIONE)
   ========================================================================== */
.language-modal-box,
.notifications-modal-box {
  max-width: 480px;
  width: 92%;
  background: #FFFFFF;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
}

/* Opzioni Lingua */
.language-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0;
}

.lang-option-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.lang-option-card:hover {
  border-color: #10B981;
  background: #F0FDF4;
  transform: translateY(-1px);
}

.lang-option-card.active {
  border-color: #10B981;
  background: #ECFDF5;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.15);
}

.lang-flag {
  font-size: 26px;
  line-height: 1;
}

.lang-info {
  flex: 1;
}

.lang-title {
  font-weight: 700;
  font-size: 13.5px;
  color: #0F172A;
  letter-spacing: -0.01em;
}

.lang-sub {
  font-size: 11.5px;
  color: #64748B;
  margin-top: 1px;
}

.lang-check {
  font-size: 14px;
  font-weight: 800;
  color: #10B981;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.2s ease;
}

.lang-option-card.active .lang-check {
  opacity: 1;
  transform: scale(1);
}

/* Promemoria Notifiche */
.notif-master-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #F0FDF4;
  border: 1.5px solid #A7F3D0;
  border-radius: 16px;
  margin: 16px 0 14px 0;
}

.notif-master-title {
  font-weight: 800;
  font-size: 13.5px;
  color: #065F46;
}

.notif-master-sub {
  font-size: 11.5px;
  color: #047857;
  margin-top: 1px;
}

.notif-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.notif-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  transition: background 0.15s ease;
}

.notif-item-row:hover {
  background: #F1F5F9;
}

.notif-item-icon {
  font-size: 20px;
  line-height: 1;
}

.notif-item-meta {
  flex: 1;
}

.notif-item-name {
  font-weight: 700;
  font-size: 12.5px;
  color: #1E293B;
}

.notif-item-desc {
  font-size: 11px;
  color: #64748B;
  margin-top: 1px;
}

.notif-time-input {
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  color: #0F172A;
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  border-radius: 8px;
  padding: 4px 6px;
  outline: none;
  transition: border-color 0.15s;
}

.notif-time-input:focus {
  border-color: #10B981;
}

/* Master Toggle Switch */
.toggle-switch-custom {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch-custom input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #CBD5E1;
  transition: .25s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .25s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch-custom input:checked + .toggle-slider {
  background-color: #10B981;
}

.toggle-switch-custom input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

/* Mini Toggle Switch */
.toggle-switch-mini {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}

.toggle-switch-mini input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider-mini {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #CBD5E1;
  transition: .25s;
  border-radius: 20px;
}

.toggle-slider-mini:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .25s;
  border-radius: 50%;
}

.toggle-switch-mini input:checked + .toggle-slider-mini {
  background-color: #10B981;
}

.toggle-switch-mini input:checked + .toggle-slider-mini:before {
  transform: translateX(16px);
}

/* ==========================================================================
   SETUP DISTRIBUTORE INDIPENDENTE, DASHBOARD COACH & SUPER ADMIN STYLES
   ========================================================================== */

/* Distributor Setup Card */
.distributor-setup-card {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 18px 20px;
  margin-top: 14px;
  border: 1.5px solid #E2E8F0;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.card-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.card-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-header-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.card-header-icon-box.tint-emerald {
  background: #ECFDF5;
  color: #059669;
}

.card-header-icon-box.tint-blue {
  background: #EFF6FF;
  color: #2563EB;
}

.card-header-icon-box.tint-amber {
  background: #FFFBEB;
  color: #D97706;
}

.distributor-card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #0F172A;
}

.distributor-card-sub {
  display: block;
  font-size: 12px;
  color: #64748B;
  margin-top: 2px;
}

.badge-status-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  background: #F1F5F9;
  color: #475569;
  white-space: nowrap;
}

/* Custom Toggle */
.distributor-toggle-row {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #F1F5F9;
}

.custom-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.custom-toggle-label input {
  display: none;
}

.custom-toggle-slider {
  width: 40px;
  height: 22px;
  background: #CBD5E1;
  border-radius: 20px;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.custom-toggle-slider:before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #FFFFFF;
  top: 3px;
  left: 3px;
  transition: all 0.2s ease;
}

.custom-toggle-label input:checked + .custom-toggle-slider {
  background: #059669;
}

.custom-toggle-label input:checked + .custom-toggle-slider:before {
  transform: translateX(18px);
}

.custom-toggle-text {
  font-size: 13px;
  font-weight: 700;
  color: #1E293B;
}

/* Input ID and Action */
.distributor-id-input-group {
  margin-top: 12px;
}

.distributor-id-input-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}

.riga-input-azione {
  display: flex;
  gap: 10px;
  align-items: center;
  max-width: 100%;
  box-sizing: border-box;
}

.clean-text-input {
  flex: 1;
  padding: 9px 12px;
  font-size: 13px;
  border: 1.5px solid #CBD5E1;
  border-radius: 10px;
  background: #F8FAFC;
  color: #0F172A;
  outline: none;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.distributor-id-capsule,
#set-my-distributor-id {
  flex: 0 0 148px;
  width: 148px;
  max-width: 155px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

@media (max-width: 380px) {
  .distributor-id-capsule,
  #set-my-distributor-id {
    flex: 0 1 135px;
    width: 135px;
    max-width: 140px;
  }
}

.clean-text-input:focus {
  border-color: #059669;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}

.btn-primary-action {
  padding: 9px 16px;
  background: #059669;
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
  box-sizing: border-box;
}

.btn-primary-action:hover {
  background: #047857;
  transform: translateY(-1px);
}

.input-hint-txt {
  display: block;
  font-size: 11px;
  color: #64748B;
  margin-top: 4px;
}

/* Personal Referral Box */
.personal-referral-box {
  margin-top: 14px;
  background: #F0FDF4;
  border: 1.5px solid #BBF7D0;
  border-radius: 14px;
  padding: 14px 16px;
}

.referral-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 800;
  color: #166534;
}

.referral-badge-hint {
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 12px;
  background: #DCFCE7;
  color: #15803D;
  font-weight: 700;
}

.referral-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.referral-link-input {
  flex: 1;
  min-width: 180px;
  padding: 8px 12px;
  font-size: 12px;
  border: 1px solid #A7F3D0;
  background: #FFFFFF;
  border-radius: 8px;
  color: #166534;
  font-weight: 600;
}

.btn-copy-action {
  padding: 8px 14px;
  background: #059669;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-copy-action:hover {
  background: #047857;
}

.btn-wa-action {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  background: #25D366;
  color: #FFFFFF;
  text-decoration: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  transition: all 0.15s ease;
}

.btn-wa-action:hover {
  background: #1EBE5D;
}

.referral-expl-txt {
  font-size: 11.5px;
  color: #15803D;
  line-height: 1.4;
  margin: 8px 0 0;
}

/* Reserved Areas Buttons Row */
.reserved-areas-buttons-row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.btn-workspace-coach {
  flex: 1;
  min-width: 200px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #0F172A;
  color: #FFFFFF;
  border: none;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.btn-workspace-coach:hover {
  background: #1E293B;
  transform: translateY(-1px);
}

.btn-workspace-admin {
  flex: 1;
  min-width: 200px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #FFFFFF;
  border: none;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.btn-workspace-admin:hover {
  background: linear-gradient(135deg, #D97706, #B45309);
  transform: translateY(-1px);
}

.btn-workspace-branch-admin {
  flex: 1;
  min-width: 200px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #059669, #0D9488);
  color: #FFFFFF;
  border: none;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

.btn-workspace-branch-admin:hover {
  background: linear-gradient(135deg, #047857, #0F766E);
  transform: translateY(-1px);
}

.badge-branch-admin-emerald {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
  color: #065F46;
  border: 1px solid #10B981;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.2px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

/* ==========================================================================
   VISTA COACH & SUPER ADMIN — LUMINOUS CRYSTAL DESIGN & COACHING MONITOR
   ========================================================================== */

/* Header Role Navigation Pills (Ultra-Legible Luxury White Pills) */
.header-role-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 0.2px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
}

.header-role-pill.admin-pill {
  border-color: #F59E0B;
  color: #92400E;
  background: #FFFDF5;
}
.header-role-pill.admin-pill:hover {
  background: #FEF3C7;
  color: #78350F;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.header-role-pill.branch-admin-pill {
  border-color: #059669;
  color: #065F46;
  background: linear-gradient(135deg, #ECFDF5 0%, #FFFBEB 100%);
  border: 1.5px solid #059669;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}
.header-role-pill.branch-admin-pill:hover {
  background: linear-gradient(135deg, #D1FAE5 0%, #FEF3C7 100%);
  color: #047857;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

.header-role-pill.coach-pill {
  border-color: #10B981;
  color: #065F46;
  background: #F0FDF4;
}
.header-role-pill.coach-pill:hover {
  background: #D1FAE5;
  color: #047857;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.header-role-pill.profile-pill {
  border-color: #0284C7;
  color: #075985;
  background: #F0F9FF;
}
.header-role-pill.profile-pill:hover {
  background: #E0F2FE;
  color: #0369A1;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.2);
}
.header-role-pill.logout-pill {
  border-color: #EF4444;
  color: #B91C1C;
  background: #FEF2F2;
}
.header-role-pill.logout-pill:hover {
  background: #FEE2E2;
  color: #991B1B;
  border-color: #DC2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.btn-account-logout-card:hover {
  background: #B91C1C !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(185, 28, 28, 0.45) !important;
}

/* Luminous Crystal Shared Cards (Harmonious with Web App Light Luxury Aesthetic) */
.coach-quick-referral-card,
.coach-store-card,
.coach-clients-sidebar-card,
.coach-dossier-main-card,
.admin-code-generator-card,
.admin-stat-card,
.admin-pending-box,
.admin-users-table-card {
  margin-bottom: 16px;
  background: #FFFFFF;
  border-radius: 18px;
  padding: 20px 22px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  color: #0F172A;
}

.admin-code-generator-card {
  border: 1.5px solid #FDE68A;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFFDF5 100%);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.08);
}

/* Code Generator Controls */
.admin-code-control-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 16px 0;
}

@media (max-width: 800px) {
  .admin-code-control-grid {
    grid-template-columns: 1fr;
  }
}

.admin-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-form-label {
  font-size: 11.5px;
  font-weight: 800;
  color: #475569;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.admin-role-select,
.clean-text-input,
.referral-link-input,
.admin-code-input {
  background: #F8FAFC;
  border: 1.5px solid #CBD5E1;
  color: #0F172A;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.admin-role-select:focus,
.clean-text-input:focus,
.referral-link-input:focus,
.admin-code-input:focus {
  border-color: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
  background: #FFFFFF;
}

.admin-role-select option {
  background: #FFFFFF;
  color: #0F172A;
}

.select-full-width {
  width: 100%;
}

.admin-input-action-row {
  display: flex !important;
  gap: 8px !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  width: 100% !important;
}

.admin-code-input {
  width: 100% !important;
  flex: 1 1 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #B45309;
  background: #FEF3C7;
  border-color: #FCD34D;
  padding: 10px 12px;
  border-radius: 10px;
}

.admin-input-action-row .btn-action-gold,
.admin-input-action-row .btn-action-green {
  flex: 1 1 0 !important;
  min-width: 120px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  padding: 10px 8px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  border-radius: 10px !important;
  white-space: nowrap !important;
}

/* Tabs for Share Flow: Clienti vs Downline (Sleek Symmetrical 2-Column Cards) */
.share-flow-tabs-wrapper {
  margin: 16px 0;
  border-radius: 16px;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  padding: 14px;
}

.share-flow-tabs {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
  padding-bottom: 14px !important;
  border-bottom: 1px solid #E2E8F0 !important;
  margin-bottom: 14px !important;
}

.share-tab-btn {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  gap: 4px !important;
  padding: 12px 8px !important;
  border-radius: 14px !important;
  background: #FFFFFF !important;
  border: 1.5px solid #CBD5E1 !important;
  color: #475569 !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  min-height: 76px !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04) !important;
  box-sizing: border-box !important;
}

.share-tab-btn:hover {
  color: #0F172A !important;
  background: #F1F5F9 !important;
  border-color: #94A3B8 !important;
  transform: translateY(-1px) !important;
}

.share-tab-btn.active {
  background: #ECFDF5 !important;
  border-color: #00873D !important;
  box-shadow: 0 4px 14px rgba(0, 135, 61, 0.16) !important;
}

.share-tab-icon {
  font-size: 24px !important;
  line-height: 1 !important;
  margin-bottom: 2px !important;
  display: inline-block !important;
}

.share-tab-text-group {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 2px !important;
  width: 100% !important;
}

.share-tab-title {
  font-size: 13px !important;
  font-weight: 800 !important;
  color: #0F172A !important;
  line-height: 1.25 !important;
  display: block !important;
}

.share-tab-btn.active .share-tab-title {
  color: #00873D !important;
}

.share-tab-subtitle {
  font-size: 10.5px !important;
  font-weight: 600 !important;
  color: #64748B !important;
  line-height: 1.2 !important;
  display: block !important;
}

.share-tab-btn.active .share-tab-subtitle {
  color: #065F46 !important;
}

.share-panel-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.share-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.share-panel-info strong {
  display: block;
  font-size: 13.5px;
  color: #0F172A;
  margin-bottom: 2px;
}

.share-panel-info span {
  font-size: 11.5px;
  color: #64748B;
}

.badge-role-tag {
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 6px;
  text-transform: uppercase;
}

.badge-role-tag.client-tag {
  background: #E0F2FE;
  color: #0369A1;
  border: 1px solid #BAE6FD;
}

.badge-role-tag.downline-tag {
  background: #FEF3C7;
  color: #B45309;
  border: 1px solid #FDE68A;
}

/* Share Link Row: Input Full Width, Buttons Paired 50%-50% */
.share-link-row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.share-link-row .referral-link-input {
  width: 100% !important;
  flex: 1 1 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  background: #F8FAFC !important;
  border: 1.5px solid #CBD5E1 !important;
  color: #0F172A !important;
  font-size: 12px !important;
  padding: 9px 12px !important;
  border-radius: 10px !important;
}

.share-link-row .btn-copy-action,
.share-link-row .btn-wa-action {
  flex: 1 1 0 !important;
  min-width: 110px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  padding: 10px 8px !important;
  border-radius: 10px !important;
  box-sizing: border-box !important;
  font-size: 12.5px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  text-decoration: none !important;
}

.share-msg-textarea {
  width: 100%;
  box-sizing: border-box;
  background: #F8FAFC;
  border: 1.5px solid #CBD5E1;
  color: #0F172A;
  font-family: inherit;
  font-size: 12.5px;
  padding: 10px 12px;
  border-radius: 10px;
  resize: vertical;
  line-height: 1.45;
  outline: none;
}

.share-msg-textarea:focus {
  border-color: #10B981;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.message-preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  gap: 10px;
}

.preview-hint {
  font-size: 11px;
  color: #64748B;
}

/* Action Buttons */
.btn-action-gold {
  padding: 8px 14px;
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 800;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-action-gold:hover {
  background: linear-gradient(135deg, #D97706, #B45309);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.btn-action-green {
  padding: 8px 14px;
  background: linear-gradient(135deg, #10B981, #059669);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 800;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-action-green:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-copy-action {
  padding: 9px 14px;
  background: #E0F2FE;
  color: #0284C7;
  border: 1.5px solid #BAE6FD;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-copy-action:hover {
  background: #0284C7;
  color: #FFFFFF;
  transform: translateY(-1px);
}

.btn-wa-action {
  padding: 9px 16px;
  background: #25D366;
  color: #FFFFFF;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
  border: none;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.25);
}

.btn-wa-action:hover {
  background: #1EBE5D;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
  transform: translateY(-1px);
}

.btn-secondary-pill {
  padding: 6px 12px;
  background: #F1F5F9;
  color: #334155;
  border: 1.5px solid #CBD5E1;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-secondary-pill:hover {
  background: #E2E8F0;
  color: #0F172A;
}

/* Quick Coaches Table */
.admin-coaches-summary-table-box {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #E2E8F0;
}

.table-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.table-box-header strong {
  font-size: 13.5px;
  color: #0F172A;
}

.table-responsive-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.table-scroll-hint-mobile {
  display: none;
  font-size: 10.5px;
  font-weight: 700;
  color: #10B981;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  border-radius: 9999px;
  padding: 2px 7px;
  letter-spacing: 0.3px;
}

@media (max-width: 640px) {
  .table-scroll-hint-mobile {
    display: inline-block;
  }
}

.dark-data-table {
  width: 100%;
  min-width: 670px;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.dark-data-table th {
  background: #F8FAFC;
  padding: 10px 14px;
  color: #64748B;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 10.5px;
  letter-spacing: 0.5px;
  border-bottom: 1.5px solid #E2E8F0;
  white-space: nowrap !important;
}

.dark-data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #F1F5F9;
  color: #334155;
  vertical-align: middle;
}

.dark-data-table tr:hover td {
  background: #F8FAFC;
}

/* Colonne e pillole Registro Rapido Coach */
.dark-data-table th.col-coach-name,
.dark-data-table td.col-coach-name {
  min-width: 180px;
}

.coach-row-name {
  display: block;
  color: #0F172A;
  font-weight: 800;
  font-size: 13.5px;
  line-height: 1.3;
}

.coach-row-email {
  display: block;
  font-size: 11.5px;
  color: #64748B;
  margin-top: 2px;
}

.dark-data-table th.col-coach-code,
.dark-data-table td.col-coach-code {
  min-width: 135px;
  text-align: center;
  white-space: nowrap !important;
}

.coach-code-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #92400E;
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  border-radius: 8px;
  padding: 5px 12px;
  white-space: nowrap !important;
  box-shadow: 0 1px 2px rgba(245, 158, 11, 0.08);
  line-height: 1.2;
}

.coach-code-missing {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #D97706;
  background: #FFFBEB;
  border: 1px dashed #FCD34D;
  border-radius: 8px;
  padding: 4px 10px;
  white-space: nowrap !important;
}

.dark-data-table th.col-coach-status,
.dark-data-table td.col-coach-status {
  min-width: 115px;
  white-space: nowrap !important;
}

.coach-status-tag {
  font-size: 11.5px;
  font-weight: 700;
  color: #1E293B;
  white-space: nowrap;
}

.dark-data-table th.col-coach-clients,
.dark-data-table td.col-coach-clients,
.dark-data-table th.col-coach-downline,
.dark-data-table td.col-coach-downline {
  min-width: 70px;
  text-align: center;
  white-space: nowrap !important;
}

.dark-data-table th.col-coach-actions,
.dark-data-table td.col-coach-actions {
  min-width: 215px;
  text-align: right;
  white-space: nowrap !important;
}

/* Coach Two Columns Layout */
.coach-main-two-col-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  align-items: start;
}

@media (max-width: 900px) {
  .coach-main-two-col-layout {
    grid-template-columns: 1fr;
  }
}

.sidebar-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid #F1F5F9;
  margin-bottom: 12px;
}

.badge-counter-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 20px;
  background: #E0F2FE;
  color: #0369A1;
  border: 1px solid #BAE6FD;
}

/* Client Filters Bar */
.client-filters-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.client-filter-pill {
  padding: 5px 10px;
  border-radius: 8px;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  color: #475569;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.client-filter-pill:hover {
  background: #E2E8F0;
  color: #0F172A;
}

.client-filter-pill.active {
  background: #ECFDF5;
  border-color: #10B981;
  color: #047857;
  font-weight: 800;
}

.coach-clients-scroll-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 580px;
  overflow-y: auto;
}

.client-card-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  cursor: pointer;
  transition: all 0.2s ease;
  gap: 10px;
}

.client-card-item:hover {
  background: #F1F5F9;
  border-color: #CBD5E1;
}

.client-card-item.active {
  background: #ECFDF5;
  border-color: #10B981;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

.client-avatar-mini {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  overflow: hidden;
}

.client-info-mini {
  flex: 1;
  min-width: 0;
}

.client-name-mini {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-dist-pill {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FCD34D;
}

.client-email-mini {
  display: block;
  font-size: 11px;
  color: #64748B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-compliance-mini {
  font-size: 12.5px;
  font-weight: 900;
  color: #059669;
  flex-shrink: 0;
}

/* Dossier Components — Monitoring Station */
.dossier-top-identity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1.5px solid #F1F5F9;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.dossier-identity-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.client-large-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #F0FDF4;
  border: 2px solid #10B981;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  overflow: hidden;
}

.dossier-touchpoint-btns {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-dossier-wa {
  padding: 8px 14px;
  background: #25D366;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-dossier-call {
  padding: 8px 14px;
  background: #EFF6FF;
  color: #2563EB;
  border: 1px solid #BFDBFE;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  border-radius: 8px;
}

.btn-dossier-pdf {
  padding: 8px 14px;
  background: #F8FAFC;
  color: #475569;
  border: 1px solid #CBD5E1;
  font-size: 12px;
  font-weight: 800;
  border-radius: 8px;
  cursor: pointer;
}

/* Challenge Day Progress Bar in Dossier */
.dossier-challenge-bar-card {
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.dossier-challenge-bar-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 800;
  color: #0F172A;
}

.challenge-bar-track {
  width: 100%;
  height: 10px;
  background: #E2E8F0;
  border-radius: 20px;
  margin-top: 8px;
  overflow: hidden;
}

.challenge-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10B981, #059669);
  border-radius: 20px;
  transition: width 0.3s ease;
}

/* Dossier KPI Grid */
.dossier-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.dossier-kpi-card {
  background: #F8FAFC;
  border-radius: 12px;
  padding: 12px;
  border: 1.5px solid #E2E8F0;
  text-align: center;
}

.dossier-kpi-lbl {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #64748B;
  margin-bottom: 4px;
}

.dossier-kpi-val {
  display: block;
  font-size: 16px;
  font-weight: 900;
  color: #0F172A;
}

.dossier-kpi-sub {
  display: block;
  font-size: 10.5px;
  color: #94A3B8;
  margin-top: 2px;
}

.dossier-section-box {
  background: #F8FAFC;
  border-radius: 12px;
  padding: 14px 16px;
  border: 1.5px solid #E2E8F0;
  margin-bottom: 12px;
}

.dossier-section-heading {
  margin: 0 0 10px;
  font-size: 13.5px;
  font-weight: 800;
  color: #0F172A;
}

.dossier-biometrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.biometric-mini-box {
  background: #FFFFFF;
  border-radius: 8px;
  padding: 8px;
  text-align: center;
  border: 1px solid #E2E8F0;
}

.biometric-mini-lbl {
  display: block;
  font-size: 10.5px;
  color: #64748B;
}

.biometric-mini-val {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: #0F172A;
  margin-top: 2px;
}

.dossier-measurements-row {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: #334155;
  flex-wrap: wrap;
}

/* Dossier Checklist for Today's Habits */
.dossier-checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.dossier-check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #FFFFFF;
  border-radius: 8px;
  border: 1.5px solid #E2E8F0;
  font-size: 11.5px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.dossier-check-item.done {
  border-color: #A7F3D0;
  background: #F0FDF4;
  color: #065F46;
}

.dossier-check-item.pending {
  border-color: #E2E8F0;
  background: #F8FAFC;
  color: #64748B;
}

.dossier-check-icon {
  font-size: 14px;
}

.dossier-actions-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.btn-coach-action-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}

.btn-coach-action-pill.green {
  background: #ECFDF5;
  color: #047857;
  border: 1px solid #A7F3D0;
}

.btn-coach-action-pill.green:hover {
  background: #10B981;
  color: #FFFFFF;
  transform: translateY(-1px);
}

.btn-coach-action-pill.gold {
  background: #FFFBEB;
  color: #B45309;
  border: 1px solid #FDE68A;
}

.btn-coach-action-pill.gold:hover {
  background: #F59E0B;
  color: #FFFFFF;
  transform: translateY(-1px);
}

.btn-coach-action-pill.blue {
  background: #F0F9FF;
  color: #0369A1;
  border: 1px solid #BAE6FD;
}

.btn-coach-action-pill.blue:hover {
  background: #0284C7;
  color: #FFFFFF;
  transform: translateY(-1px);
}

/* Super Admin KPI Summary Grid */
.admin-stats-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.admin-stat-card {
  padding: 16px;
  text-align: left;
}

.admin-stat-lbl {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: #64748B;
  margin-bottom: 6px;
}

.admin-stat-val {
  margin: 0;
  font-size: 26px;
  font-weight: 900;
  color: #0F172A;
}

.admin-stat-sub {
  display: block;
  font-size: 11px;
  color: #94A3B8;
  margin-top: 2px;
}

.badge-superadmin-gold {
  display: inline-flex !important;
  align-items: center !important;
  white-space: nowrap !important;
  font-size: 11.5px !important;
  font-weight: 800 !important;
  padding: 5px 12px !important;
  border-radius: 9999px !important;
  background: #FEF3C7 !important;
  color: #92400E !important;
  border: 1.5px solid #FCD34D !important;
  line-height: 1.2 !important;
  box-sizing: border-box !important;
}

.admin-pending-box {
  border-left: 4px solid #F59E0B;
}

.admin-pending-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #FFFDF5;
  border: 1.5px solid #FDE68A;
  border-radius: 12px;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.btn-action-amber {
  padding: 6px 12px;
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FCD34D;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
}

.btn-action-red {
  padding: 6px 12px;
  background: #FEE2E2;
  color: #DC2626;
  border: 1px solid #FECACA;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
}

.btn-action-red:hover {
  background: #EF4444;
  color: #FFFFFF;
}

.admin-search-filter-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.admin-search-wrap {
  flex: 1;
  min-width: 220px;
  position: relative;
  display: flex;
  align-items: center;
}

.admin-search-icon {
  position: absolute;
  left: 12px;
  font-size: 14px;
}

.admin-search-input {
  width: 100%;
  padding: 10px 12px 10px 36px;
  font-size: 13px;
  border: 1.5px solid #CBD5E1;
  border-radius: 10px;
  background: #F8FAFC;
  color: #0F172A;
  outline: none;
}

.admin-search-input:focus {
  border-color: #10B981;
  background: #FFFFFF;
}

.admin-users-list-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-user-card-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 12px;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  gap: 14px;
  flex-wrap: wrap;
}

.admin-user-info-group {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
  flex: 1;
}

.admin-user-data-pills {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-user-action-buttons {
  display: flex;
  gap: 6px;
  align-items: center;
}

.text-muted-center {
  text-align: center;
  padding: 30px;
  font-size: 13px;
  color: #64748B;
  margin: 0;
}

/* ==========================================================================
   CARD PROFILO PERSONALE & MISURE CORPOREE (view-profilo)
   ========================================================================== */

.profile-measures-summary-card {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 20px;
  border: 1.5px solid #E2E8F0;
  margin: 16px 0;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.profile-measures-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(95px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.profile-measure-item {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
}

.profile-measure-lbl {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.profile-measure-val {
  display: block;
  font-size: 15px;
  font-weight: 900;
  color: #0F172A;
}

.habits-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.habit-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
}

.habit-status-chip.chip-gold {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FCD34D;
}

.habit-status-chip.chip-green {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}

.habit-status-chip.chip-gray {
  background: #F1F5F9;
  color: #475569;
  border: 1px solid #E2E8F0;
}

.habit-status-chip.chip-rose {
  background: #FEE2E2;
  color: #991B1B;
  border: 1px solid #FCA5A5;
}

/* ==========================================================================
   ACADEMY BENESSERE: RICETTE, VIDEO ALLENAMENTI & GUIDE DEL COACH
   ========================================================================== */

/* Bottone scorciatoia nell'header del ricettario in Oggi */
.btn-goto-academy-header {
  background: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  border-radius: 9999px;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-goto-academy-header:hover {
  background: #059669;
  color: #FFFFFF;
  border-color: #059669;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

/* Academy Container & Search Filter Bar */
#view-academy {
  width: 100%;
  box-sizing: border-box;
}

.recipes-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  width: 100%;
}

.search-box {
  width: 100% !important;
  position: relative !important;
  box-sizing: border-box !important;
}

.search-box input,
#recipe-search {
  width: 100% !important;
  height: 46px !important;
  background: #FFFFFF !important;
  border: 1.5px solid #E2E8F0 !important;
  border-radius: 12px !important;
  padding: 0 16px 0 42px !important;
  font-family: inherit !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: #0F172A !important;
  box-sizing: border-box !important;
  outline: none !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
  transition: all 0.2s ease !important;
}

.search-box input:focus,
#recipe-search:focus {
  border-color: #059669 !important;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12) !important;
}

.search-box .search-icon {
  position: absolute !important;
  top: 50% !important;
  left: 14px !important;
  transform: translateY(-50%) !important;
  font-size: 15px !important;
  pointer-events: none !important;
  opacity: 0.6 !important;
}

/* Categorie Academy Tabs */
.filter-categories,
#recipes-categories-tabs {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  overflow-x: auto !important;
  padding: 4px 2px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  scrollbar-width: none !important;
  -webkit-overflow-scrolling: touch !important;
}
.filter-categories::-webkit-scrollbar,
#recipes-categories-tabs::-webkit-scrollbar {
  display: none !important;
}

.filter-categories .tab-btn {
  background: #FFFFFF !important;
  border: 1.5px solid #E2E8F0 !important;
  color: #475569 !important;
  border-radius: 9999px !important;
  padding: 7px 16px !important;
  font-family: inherit !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  cursor: pointer !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
  transition: all 0.2s ease !important;
  outline: none !important;
}

.filter-categories .tab-btn:hover {
  background: #F8FAFC !important;
  border-color: #CBD5E1 !important;
  color: #0F172A !important;
}

.filter-categories .tab-btn.active {
  background: #059669 !important;
  border-color: #059669 !important;
  color: #FFFFFF !important;
  font-weight: 800 !important;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.28) !important;
}

/* Subfiltri (Pasti & Workout) */
.meals-subfilters-bar,
.workout-subfilters-bar {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  overflow-x: auto !important;
  padding: 2px 2px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  scrollbar-width: none !important;
  -webkit-overflow-scrolling: touch !important;
}
.meals-subfilters-bar::-webkit-scrollbar,
.workout-subfilters-bar::-webkit-scrollbar {
  display: none !important;
}

.meal-subtab-btn,
.workout-subtab-btn {
  background: #F1F5F9 !important;
  border: 1px solid #E2E8F0 !important;
  color: #64748B !important;
  border-radius: 9999px !important;
  padding: 5px 12px !important;
  font-family: inherit !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  outline: none !important;
}

.meal-subtab-btn:hover,
.workout-subtab-btn:hover {
  background: #E2E8F0 !important;
  color: #0F172A !important;
}

.meal-subtab-btn.active,
.workout-subtab-btn.active {
  background: #0F172A !important;
  border-color: #0F172A !important;
  color: #FFFFFF !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2) !important;
}

/* Griglia Card Academy */
.recipes-grid,
#recipes-list-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
  gap: 16px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin-bottom: 40px !important;
}

@media (max-width: 640px) {
  .recipes-grid,
  #recipes-list-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
}

/* Card Ricetta */
.recipe-card {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
  display: flex !important;
  flex-direction: column !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
  box-sizing: border-box !important;
}
.recipe-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08) !important;
  border-color: #CBD5E1 !important;
}

.recipe-thumbnail-wrap {
  width: 100% !important;
  height: 180px !important;
  position: relative !important;
  overflow: hidden !important;
  background: #F1F5F9 !important;
}
.recipe-thumbnail-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  transition: transform 0.35s ease !important;
}
.recipe-card:hover .recipe-thumbnail-img {
  transform: scale(1.04) !important;
}

.recipe-thumbnail-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, transparent 40%, rgba(0,0,0,0.65) 100%);
}

.recipe-top-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  z-index: 2;
}

.recipe-pill-slot {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.recipe-pill-goal {
  background: rgba(5, 150, 105, 0.9);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 800;
}
.recipe-pill-goal.goal-massa { background: rgba(124, 58, 237, 0.9); }
.recipe-pill-goal.goal-energia { background: rgba(2, 132, 199, 0.9); }

.recipe-bottom-meta-overlay {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 2;
}
.recipe-pill-meta {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  color: #FFFFFF;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

.recipe-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.recipe-title {
  font-size: 16px;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.35;
  margin-bottom: 6px;
}

.recipe-desc {
  font-size: 13px;
  color: #64748B;
  line-height: 1.45;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 38px;
}

.recipe-ingredients-box {
  background: #F8FAFC;
  border: 1px solid #F1F5F9;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.ingr-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: #059669;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}
.ingr-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ingr-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #334155;
  line-height: 1.35;
}
.ingr-bullet {
  color: #059669;
  font-weight: 800;
}

.recipe-tip {
  background: #FFFBEB;
  border: 1px solid #FEF3C7;
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 12px;
  display: flex;
  gap: 8px;
  font-size: 11.5px;
  color: #92400E;
  line-height: 1.4;
}

.recipe-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid #F1F5F9;
}
.macro-badge {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: #F1F5F9;
  color: #475569;
}
.macro-cal { background: #FEF2F2; color: #DC2626; }
.macro-protein { background: #ECFDF5; color: #059669; }
.macro-carbs { background: #FFFBEB; color: #D97706; }
.macro-fats { background: #F5F3FF; color: #7C3AED; }

/* Tasto 'Scopri di più' compatto e d'impatto */
.recipe-card-action {
  margin-top: 12px;
  display: flex;
  width: 100%;
}
.btn-recipe-scopri {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  background: #F0FDF4;
  color: #059669;
  border: 1.5px solid #A7F3D0;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(5, 150, 105, 0.08);
  text-align: center;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn-recipe-scopri:hover,
.recipe-card:hover .btn-recipe-scopri {
  background: #059669;
  color: #FFFFFF;
  border-color: #059669;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.28);
  transform: translateY(-1px);
}
.btn-recipe-scopri:active {
  transform: scale(0.98);
}
.scopri-arrow {
  font-size: 18px;
  line-height: 1;
  font-weight: 900;
  transition: transform 0.2s ease;
}
.btn-recipe-scopri:hover .scopri-arrow,
.recipe-card:hover .btn-recipe-scopri .scopri-arrow {
  transform: translateX(3px);
}

/* Prodotti Herbalife consigliati nella ricetta */
.recipe-products-box {
  background: #F0FDF4;
  border: 1px solid #DCFCE7;
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 10px;
}
.recipe-products-title {
  font-size: 11px;
  font-weight: 800;
  color: #166534;
  margin-bottom: 6px;
}
.recipe-products-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.recipe-prod-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #FFFFFF;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #E2E8F0;
}
.prod-tag {
  font-size: 11.5px;
  font-weight: 700;
  color: #15803D;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prod-buy-btn {
  font-size: 11px;
  font-weight: 800;
  color: #FFFFFF;
  background: #059669;
  padding: 2px 8px;
  border-radius: 4px;
  text-decoration: none;
  white-space: nowrap;
}

/* Card Video Allenamento */
.workout-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}
.workout-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  border-color: #CBD5E1;
}

.workout-thumbnail-wrap {
  width: 100%;
  height: 180px;
  position: relative;
  overflow: hidden;
  background: #0F172A;
}
.workout-thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: transform 0.35s ease, opacity 0.35s ease;
}
.workout-card:hover .workout-thumbnail-img {
  transform: scale(1.05);
  opacity: 0.95;
}

.workout-play-btn-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(5, 150, 105, 0.9);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, background 0.2s ease;
}
.workout-card:hover .workout-play-btn-overlay {
  transform: translate(-50%, -50%) scale(1.1);
  background: #059669;
}

.workout-duration-pill {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  color: #FFFFFF;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

.workout-category-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  color: #FFFFFF;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.workout-card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.workout-card-title {
  font-size: 16px;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.35;
  margin-bottom: 6px;
}
.workout-card-desc {
  font-size: 12.5px;
  color: #64748B;
  line-height: 1.45;
  margin-bottom: 12px;
}
.workout-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid #F1F5F9;
  font-size: 12px;
  font-weight: 700;
}
.testo-avviso { color: #D97706; }
.testo-oro-forte { color: #DC2626; }

/* Card Guida del Coach (Perché è Importante) */
.coach-guide-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}
.coach-guide-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  border-color: #CBD5E1;
}

.coach-guide-card-header {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #FFFFFF;
}
.coach-guide-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.coach-guide-tag-badge {
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(6px);
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.coach-guide-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.coach-guide-card-title {
  font-size: 16px;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.35;
  margin-bottom: 6px;
}
.coach-guide-card-desc {
  font-size: 12.5px;
  color: #64748B;
  line-height: 1.45;
  margin-bottom: 12px;
}
.coach-guide-key-points {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.coach-guide-key-points li {
  font-size: 12px;
  color: #334155;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.35;
}
.coach-guide-key-points li::before {
  content: '✓';
  color: #059669;
  font-weight: 800;
}
.btn-open-guide-card {
  width: 100%;
  height: 40px;
  background: #059669;
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: auto;
}
.btn-open-guide-card:hover {
  background: #047857;
  transform: translateY(-1px);
}

/* Modali Workout & Coach Guide */
.workout-modal-card,
.workout-modal-box {
  max-width: 580px;
  width: 92%;
}

.workout-video-embed-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 ratio */
  height: 0;
  background: #000000;
  border-radius: 12px;
  overflow: hidden;
  margin: 12px 0 16px;
}
.workout-video-embed-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.workout-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: #F8FAFC;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #E2E8F0;
  text-align: center;
}
.workout-stat-label {
  font-size: 11px;
  color: #64748B;
  display: block;
  margin-bottom: 3px;
  font-weight: 600;
}
.workout-stat-val {
  font-size: 13.5px;
  font-weight: 800;
  color: #0F172A;
}

.coach-guide-modal-box {
  max-width: 540px;
  width: 92%;
  max-height: 85vh;
  overflow-y: auto;
}
.guide-section-block {
  margin: 14px 0;
}
.guide-section-heading {
  font-size: 14px;
  font-weight: 800;
  color: #0F172A;
  margin: 0 0 8px;
}
.guide-bullets-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.guide-bullets-list li {
  font-size: 12.5px;
  color: #334155;
  line-height: 1.4;
}
.riquadro-tenue {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 8px 10px;
}





/* ==========================================================================
   RESTORED FULLSCREEN ACCOUNT AUTH MODAL & WALL (from index.css)
   ========================================================================== */
body.auth-locked .app-container,
html.auth-locked .app-container,
body.auth-locked .bottom-nav,
body.auth-locked .top-app-bar,
body.auth-locked .fab-meal-scan,
body.auth-locked .program-modal-backdrop {
  display: none !important;
}

body.auth-locked,
html.auth-locked {
  overflow: hidden !important;
  background: #F4F5F7 !important;
}

/* Defensiva assoluta: account-auth-modal NON deve mai comparire nel normale flusso o nel footer */
#account-auth-modal,
.modal-overlay.auth-wall-overlay {
  display: none !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: radial-gradient(ellipse at 50% 10%, rgba(0, 135, 61, 0.08) 0%, rgba(244, 245, 247, 0.96) 65%), #F4F5F7 !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  z-index: 99999999 !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 24px 16px !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
}

body.auth-locked #account-auth-modal,
html.auth-locked #account-auth-modal,
#account-auth-modal.open,
#account-auth-modal.active {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

body:not(.auth-locked) #account-auth-modal:not(.open):not(.active) {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

#account-auth-modal .nascosto,
#account-auth-modal [hidden],
#form-auth-signup.nascosto,
#view-auth-pending.nascosto,
#form-auth-otp.nascosto {
  display: none !important;
  visibility: hidden !important;
}


/* =============================================================================
   12. LOGIN & AUTH MODAL DESIGN SYSTEM OVERHAUL
   (Ultra-clean, modern luxury light theme, Plus Jakarta Sans, Herbalife Emerald CTA)
   ============================================================================= */

/* Modal Card Container */
#account-auth-modal .modal-card,
body.auth-locked #account-auth-modal .modal-card,
html.auth-locked #account-auth-modal .modal-card {
  max-width: 440px !important;
  width: 100% !important;
  background: #FFFFFF !important;
  border: 1px solid #E5E7EB !important;
  border-radius: 28px !important;
  padding: 34px 28px !important;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.03) !important;
  position: relative !important;
  box-sizing: border-box !important;
  color: #18181B !important;
  text-align: center !important;
}

/* Close button on modal when opened from active app */
#account-auth-modal #close-auth-modal-btn {
  position: absolute !important;
  top: 18px !important;
  right: 18px !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  background: #F1F5F9 !important;
  border: 1px solid #E2E8F0 !important;
  color: #64748B !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  transform: none !important;
  z-index: 10 !important;
}
#account-auth-modal #close-auth-modal-btn:hover {
  background: #E2E8F0 !important;
  color: #0F172A !important;
  transform: scale(1.05) !important;
}
body.auth-locked #account-auth-modal #close-auth-modal-btn,
html.auth-locked #account-auth-modal #close-auth-modal-btn,
body.auth-locked #close-auth-modal-btn,
html.auth-locked #close-auth-modal-btn {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Language switch bar inside Auth Modal */
#account-auth-modal .auth-wall-lang-bar {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  background: #F1F5F9 !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 9999px !important;
  padding: 3px !important;
  margin: 0 auto 18px auto !important;
  box-sizing: border-box !important;
}

#account-auth-modal button.auth-wall-lang-btn,
#account-auth-modal .auth-wall-lang-btn {
  background: transparent !important;
  border: none !important;
  border-radius: 9999px !important;
  padding: 5px 12px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif !important;
  color: #64748B !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  box-shadow: none !important;
  transform: none !important;
  outline: none !important;
  user-select: none !important;
  line-height: normal !important;
  height: auto !important;
}

#account-auth-modal button.auth-wall-lang-btn:hover:not(.active),
#account-auth-modal .auth-wall-lang-btn:hover:not(.active) {
  color: #0F172A !important;
  background: rgba(255, 255, 255, 0.7) !important;
  box-shadow: none !important;
  transform: none !important;
}

#account-auth-modal button.auth-wall-lang-btn.active,
#account-auth-modal .auth-wall-lang-btn.active {
  background: #FFFFFF !important;
  color: #00873D !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  transform: none !important;
}

/* Brand Emblem */
#account-auth-modal .auth-brand-emblem-wrap {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 auto 14px auto !important;
}

#account-auth-modal .auth-brand-emblem {
  width: 48px !important;
  height: 48px !important;
  border-radius: 16px !important;
  background: #EDF7EE !important;
  border: 1px solid rgba(0, 135, 61, 0.2) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 24px !important;
  box-shadow: 0 4px 12px rgba(0, 135, 61, 0.1) !important;
}

/* Title & Subtitle */
#account-auth-modal #auth-modal-header-title {
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif !important;
  font-size: 22px !important;
  font-weight: 800 !important;
  color: #0F172A !important;
  letter-spacing: -0.03em !important;
  text-align: center !important;
  margin: 0 0 6px 0 !important;
  line-height: 1.25 !important;
}

#account-auth-modal #auth-modal-header-subtitle {
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif !important;
  font-size: 13.5px !important;
  font-weight: 400 !important;
  color: #64748B !important;
  line-height: 1.48 !important;
  text-align: center !important;
  margin: 0 0 22px 0 !important;
  padding: 0 6px !important;
}

/* Auth Tabs Container */
#account-auth-modal #auth-tabs-container,
#account-auth-modal .auth-tab-group {
  display: flex;
  width: 100% !important;
  background: #F1F5F9 !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 9999px !important;
  padding: 4px !important;
  gap: 4px !important;
  margin-bottom: 22px !important;
  box-sizing: border-box !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

#account-auth-modal #auth-tabs-container[style*="display: none"],
#account-auth-modal .auth-tab-group[style*="display: none"],
#account-auth-modal #auth-tabs-container.nascosto {
  display: none !important;
}

#account-auth-modal button.auth-tab-btn,
#account-auth-modal .auth-tab-btn {
  flex: 1 1 50% !important;
  border-radius: 9999px !important;
  padding: 9px 14px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif !important;
  color: #64748B !important;
  background: transparent !important;
  border: none !important;
  cursor: pointer !important;
  text-align: center !important;
  justify-content: center !important;
  box-shadow: none !important;
  transform: none !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  outline: none !important;
  user-select: none !important;
  white-space: nowrap !important;
  height: auto !important;
  line-height: normal !important;
}

#account-auth-modal button.auth-tab-btn:hover:not(.active),
#account-auth-modal .auth-tab-btn:hover:not(.active) {
  color: #0F172A !important;
  background: rgba(255, 255, 255, 0.6) !important;
}

#account-auth-modal button.auth-tab-btn.active,
#account-auth-modal .auth-tab-btn.active {
  background: #FFFFFF !important;
  color: #0F172A !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

/* Feedback Alert Box */
#account-auth-modal #auth-feedback-box {
  border-radius: 12px !important;
  padding: 11px 16px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  margin-bottom: 18px !important;
  text-align: center !important;
  line-height: 1.45 !important;
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif !important;
}

/* Forms layout */
#account-auth-modal form {
  width: 100% !important;
  text-align: left !important;
}

#account-auth-modal .auth-field,
#account-auth-modal form > div:not(.auth-row):not(.auth-forgot-wrap):not(.fila-8):not(.auth-otp-row) {
  margin-bottom: 15px !important;
  display: flex !important;
  flex-direction: column !important;
  text-align: left !important;
}

/* Labels */
#account-auth-modal .etichetta-campo,
#account-auth-modal .auth-label {
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #475569 !important;
  letter-spacing: 0.02em !important;
  margin-bottom: 6px !important;
  display: block !important;
  text-transform: uppercase !important;
}

/* Text Inputs */
#account-auth-modal .campo-testo,
#account-auth-modal .auth-input,
#account-auth-modal input[type="email"],
#account-auth-modal input[type="password"],
#account-auth-modal input[type="text"],
#account-auth-modal input[type="tel"] {
  width: 100% !important;
  background: #F8FAFC !important;
  border: 1.5px solid #E2E8F0 !important;
  border-radius: 14px !important;
  padding: 12px 16px !important;
  font-size: 14px !important;
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif !important;
  color: #0F172A !important;
  box-sizing: border-box !important;
  transition: all 0.2s ease !important;
  outline: none !important;
  box-shadow: none !important;
}

#account-auth-modal .campo-testo:focus,
#account-auth-modal .auth-input:focus,
#account-auth-modal input:focus {
  background: #FFFFFF !important;
  border-color: #00873D !important;
  box-shadow: 0 0 0 3px rgba(0, 135, 61, 0.12) !important;
}

#account-auth-modal input::placeholder {
  color: #94A3B8 !important;
  font-weight: 400 !important;
}

#account-auth-modal .auth-hint {
  font-size: 12px !important;
  color: #64748B !important;
  margin-top: 5px !important;
  line-height: 1.4 !important;
  font-weight: 400 !important;
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif !important;
}

#account-auth-modal .auth-hint-center {
  text-align: center !important;
  margin-top: 10px !important;
}

/* Primary CTA Button (Herbalife Emerald Brand Green) */
#account-auth-modal button#btn-submit-signin,
#account-auth-modal button#btn-submit-signup,
#account-auth-modal button#btn-submit-otp,
#account-auth-modal button.btn-auth-primary,
#account-auth-modal .btn-auth-primary {
  width: 100% !important;
  background: #00873D !important;
  color: #FFFFFF !important;
  border: none !important;
  border-radius: 9999px !important;
  padding: 13.5px 24px !important;
  font-size: 14.5px !important;
  font-weight: 700 !important;
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif !important;
  letter-spacing: -0.01em !important;
  cursor: pointer !important;
  box-shadow: 0 4px 14px rgba(0, 135, 61, 0.25) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  margin-top: 8px !important;
  margin-bottom: 6px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
  outline: none !important;
}

#account-auth-modal button#btn-submit-signin:hover,
#account-auth-modal button#btn-submit-signup:hover,
#account-auth-modal button#btn-submit-otp:hover,
#account-auth-modal button.btn-auth-primary:hover,
#account-auth-modal .btn-auth-primary:hover {
  background: #007434 !important;
  color: #FFFFFF !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 18px rgba(0, 135, 61, 0.32) !important;
}

#account-auth-modal button#btn-submit-signin:active,
#account-auth-modal button#btn-submit-signup:active,
#account-auth-modal button#btn-submit-otp:active,
#account-auth-modal button.btn-auth-primary:active,
#account-auth-modal .btn-auth-primary:active {
  transform: translateY(0) !important;
  box-shadow: 0 2px 8px rgba(0, 135, 61, 0.22) !important;
}

/* Secondary CTA Button (Ghost / Outlined) */
.auth-forgot-wrap {
  text-align: center !important;
  margin-top: 6px !important;
  margin-bottom: 6px !important;
}

#account-auth-modal button#btn-switch-to-otp,
#account-auth-modal #btn-switch-to-otp {
  background: transparent !important;
  border: none !important;
  color: #475569 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif !important;
  padding: 8px 14px !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: none !important;
  transform: none !important;
  text-decoration: none !important;
  display: inline-block !important;
  width: auto !important;
  letter-spacing: normal !important;
}

#account-auth-modal button#btn-switch-to-otp:hover,
#account-auth-modal #btn-switch-to-otp:hover {
  color: #00873D !important;
  background: #EDF7EE !important;
  box-shadow: none !important;
  transform: none !important;
}

#account-auth-modal button#btn-back-from-otp,
#account-auth-modal button#btn-pending-back,
#account-auth-modal button.btn-auth-secondary,
#account-auth-modal .btn-auth-secondary {
  background: #F8FAFC !important;
  border: 1.5px solid #E2E8F0 !important;
  color: #475569 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif !important;
  padding: 11px 20px !important;
  border-radius: 9999px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: none !important;
  transform: none !important;
  width: 100% !important;
  margin-top: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#account-auth-modal button#btn-back-from-otp:hover,
#account-auth-modal button#btn-pending-back:hover,
#account-auth-modal button.btn-auth-secondary:hover,
#account-auth-modal .btn-auth-secondary:hover {
  background: #F1F5F9 !important;
  color: #0F172A !important;
  border-color: #CBD5E1 !important;
  transform: translateY(-1px) !important;
}

/* Guest Browse Outlined Pill Button */
.auth-guest-wrap {
  margin-top: 14px !important;
  padding-top: 14px !important;
  border-top: 1px solid #F1F5F9 !important;
  text-align: center !important;
  width: 100% !important;
}

#account-auth-modal button#btn-guest-browse,
#account-auth-modal #btn-guest-browse {
  width: 100% !important;
  background: #F8FAFC !important;
  border: 1.5px solid #E2E8F0 !important;
  color: #475569 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif !important;
  border-radius: 9999px !important;
  padding: 12px 18px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: none !important;
  transform: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  letter-spacing: normal !important;
}

#account-auth-modal button#btn-guest-browse:hover,
#account-auth-modal #btn-guest-browse:hover {
  background: #F1F5F9 !important;
  color: #0F172A !important;
  border-color: #CBD5E1 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

/* Sign Up Specific Layout */
#account-auth-modal .auth-row {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 12px !important;
}

@media (max-width: 440px) {
  #account-auth-modal .auth-row {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }
}

#account-auth-modal .auth-choice {
  display: flex !important;
  gap: 8px !important;
  margin-top: 4px !important;
}

#account-auth-modal button.auth-choice-btn,
#account-auth-modal .auth-choice-btn {
  flex: 1 !important;
  background: #F8FAFC !important;
  border: 1.5px solid #E2E8F0 !important;
  border-radius: 12px !important;
  padding: 10px 14px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif !important;
  color: #64748B !important;
  cursor: pointer !important;
  text-align: center !important;
  transition: all 0.2s ease !important;
  box-shadow: none !important;
  transform: none !important;
}

#account-auth-modal button.auth-choice-btn:hover:not(.active),
#account-auth-modal .auth-choice-btn:hover:not(.active) {
  background: #F1F5F9 !important;
  color: #0F172A !important;
  border-color: #CBD5E1 !important;
}

#account-auth-modal button.auth-choice-btn.active,
#account-auth-modal .auth-choice-btn.active {
  background: #EDF7EE !important;
  border-color: #00873D !important;
  color: #00873D !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 6px rgba(0, 135, 61, 0.1) !important;
}

#account-auth-modal .coach-check {
  display: block !important;
  margin-top: 6px !important;
  padding: 6px 12px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
}

#account-auth-modal .coach-check.wait {
  background: #F1F5F9 !important;
  color: #64748B !important;
  border: 1px solid #E2E8F0 !important;
}

#account-auth-modal .coach-check.ok {
  background: #EDF7EE !important;
  color: #15803D !important;
  border: 1px solid #86EFAC !important;
}

#account-auth-modal .coach-check.err {
  background: #FEF2F2 !important;
  color: #DC2626 !important;
  border: 1px solid #FCA5A5 !important;
}

/* OTP Specifics */
#account-auth-modal .auth-otp-row,
#account-auth-modal .fila-8 {
  display: flex !important;
  gap: 8px !important;
  align-items: stretch !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

#account-auth-modal .auth-otp-row input,
#account-auth-modal .fila-8 input {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

#account-auth-modal button#btn-send-otp-code,
#account-auth-modal #btn-send-otp-code,
#account-auth-modal .btn-send-otp-pill {
  width: auto !important;
  max-width: fit-content !important;
  white-space: nowrap !important;
  background: #00873D !important;
  color: #FFFFFF !important;
  border: none !important;
  border-radius: 14px !important;
  padding: 0 18px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif !important;
  cursor: pointer !important;
  box-shadow: 0 2px 8px rgba(0, 135, 61, 0.2) !important;
  transition: all 0.2s ease !important;
  flex: 0 0 auto !important;
  height: auto !important;
  align-self: stretch !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}

#account-auth-modal button#btn-send-otp-code:hover,
#account-auth-modal #btn-send-otp-code:hover,
#account-auth-modal .btn-send-otp-pill:hover {
  background: #007434 !important;
  color: #FFFFFF !important;
}

#account-auth-modal #otp-code,
#account-auth-modal .auth-otp-input {
  letter-spacing: 4px !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  text-align: center !important;
}

/* Chrome/Safari Autofill Styling Harmonization */
#account-auth-modal input:-webkit-autofill,
#account-auth-modal input:-webkit-autofill:hover,
#account-auth-modal input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #F8FAFC inset !important;
  -webkit-text-fill-color: #0F172A !important;
  border-color: #E2E8F0 !important;
  transition: background-color 5000s ease-in-out 0s;
}

#account-auth-modal input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #FFFFFF inset !important;
  border-color: #00873D !important;
}

/* Pending Request View */
#account-auth-modal .auth-pending {
  text-align: center !important;
  padding: 14px 0 !important;
}

#account-auth-modal .auth-pending-icon {
  font-size: 44px !important;
  margin-bottom: 12px !important;
}

#account-auth-modal .auth-pending-title {
  font-size: 19px !important;
  font-weight: 800 !important;
  color: #0F172A !important;
  margin-bottom: 8px !important;
}

#account-auth-modal .auth-pending-coach {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #00873D !important;
  background: #EDF7EE !important;
  border: 1px solid rgba(0, 135, 61, 0.15) !important;
  padding: 5px 14px !important;
  border-radius: 9999px !important;
  display: inline-block !important;
  margin-bottom: 14px !important;
}

#account-auth-modal .auth-pending-text {
  font-size: 13.5px !important;
  color: #64748B !important;
  line-height: 1.5 !important;
  margin-bottom: 18px !important;
}

/* =========================================================================
   ACADEMY GOAL HEADER & PERSONALIZED RECIPES STYLING (DEFICIT VS MASSA)
   ========================================================================= */
.academy-goal-header-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.9) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 20px !important;
  padding: 20px 22px !important;
  margin-bottom: 20px !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

.academy-goal-header-top {
  display: flex !important;
  align-items: flex-start !important;
  gap: 16px !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  margin-bottom: 16px !important;
}

.academy-goal-icon-badge {
  width: 48px !important;
  height: 48px !important;
  border-radius: 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 24px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  flex-shrink: 0 !important;
}

.academy-goal-text-group {
  flex: 1 !important;
  min-width: 240px !important;
}

.academy-goal-eyebrow {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  margin-bottom: 6px !important;
}

.eyebrow-main {
  font-size: 10.5px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.8px !important;
  color: #94A3B8 !important;
}

.academy-goal-tag-pill {
  font-size: 10px !important;
  font-weight: 800 !important;
  padding: 3px 10px !important;
  border-radius: 12px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.4px !important;
  background: #334155 !important;
  color: #F1F5F9 !important;
}

.academy-goal-tag-pill.goal-deficit {
  background: linear-gradient(135deg, #D97706 0%, #B45309 100%) !important;
  color: #FFFFFF !important;
}

.academy-goal-tag-pill.goal-massa {
  background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%) !important;
  color: #FFFFFF !important;
}

.academy-goal-tag-pill.goal-energia {
  background: linear-gradient(135deg, #0284C7 0%, #0369A1 100%) !important;
  color: #FFFFFF !important;
}

.academy-goal-heading {
  font-size: 18px !important;
  font-weight: 800 !important;
  color: #F8FAFC !important;
  margin: 0 0 6px 0 !important;
  letter-spacing: -0.2px !important;
}

.academy-goal-subtext {
  font-size: 13px !important;
  color: #94A3B8 !important;
  line-height: 1.45 !important;
  margin: 0 !important;
}

.btn-change-goal-profile {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #E2E8F0 !important;
  padding: 7px 14px !important;
  border-radius: 12px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.btn-change-goal-profile:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  color: #FFFFFF !important;
  transform: translateY(-1px) !important;
}

.academy-goal-switcher-row {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  padding-top: 14px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.switcher-label {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #CBD5E1 !important;
  white-space: nowrap !important;
}

.academy-goal-chips-group {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

.goal-chip-btn {
  font-size: 12px !important;
  font-weight: 700 !important;
  padding: 7px 14px !important;
  border-radius: 9999px !important;
  cursor: pointer !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  color: #CBD5E1 !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.goal-chip-btn:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #FFFFFF !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
}

.goal-chip-btn.active#chip-goal-deficit {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%) !important;
  color: #FFFFFF !important;
  border-color: transparent !important;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.4) !important;
}

.goal-chip-btn.active#chip-goal-massa {
  background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%) !important;
  color: #FFFFFF !important;
  border-color: transparent !important;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.4) !important;
}

.goal-chip-btn.active#chip-goal-energia {
  background: linear-gradient(135deg, #0EA5E9 0%, #0284C7 100%) !important;
  color: #FFFFFF !important;
  border-color: transparent !important;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.4) !important;
}

.goal-chip-btn.active#chip-goal-all {
  background: #00873D !important;
  color: #FFFFFF !important;
  border-color: transparent !important;
  box-shadow: 0 4px 14px rgba(0, 135, 61, 0.35) !important;
}

/* Light Mode Overrides */
body.light-theme .academy-goal-header-card {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06) !important;
}

body.light-theme .academy-goal-heading {
  color: #0F172A !important;
}

body.light-theme .academy-goal-subtext {
  color: #475569 !important;
}

body.light-theme .switcher-label {
  color: #334155 !important;
}

body.light-theme .goal-chip-btn {
  background: #F1F5F9 !important;
  color: #334155 !important;
  border-color: #CBD5E1 !important;
}

body.light-theme .btn-change-goal-profile {
  background: #F8FAFC !important;
  color: #1E293B !important;
  border-color: #CBD5E1 !important;
}

/* Recipe Badge Goal In Modal */
.recipe-badge-goal {
  font-size: 11.5px !important;
  font-weight: 800 !important;
  padding: 4px 12px !important;
  border-radius: 14px !important;
  text-transform: uppercase !important;
  display: inline-block !important;
  background: #334155 !important;
  color: #FFFFFF !important;
}

.recipe-badge-goal.goal-massa {
  background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%) !important;
  color: #FFFFFF !important;
}

.recipe-badge-goal.goal-deficit {
  background: linear-gradient(135deg, #D97706 0%, #B45309 100%) !important;
  color: #FFFFFF !important;
}

/* ==========================================================================
   COMMUNITY PARTECIPANTI & ANDAMENTO TRIBE (LIGHT PORCELAIN & EMERALD)
   ========================================================================== */
.community-participants-pane {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #F8FAFC;
  width: 100%;
}

.tribe-summary-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  width: 100%;
  box-sizing: border-box;
}

.tribe-summary-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.tribe-summary-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.tribe-badge-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  border-radius: 9999px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  color: #059669;
  width: fit-content;
}

.tribe-badge-live .status-indicator-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 6px #10B981;
  display: inline-block;
  animation: pulse-dot 2s infinite ease-in-out;
}

.tribe-participants-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.tribe-participants-sub {
  margin: 0;
  font-size: 12.5px;
  color: #64748B;
  line-height: 1.5;
  width: 100%;
}

.btn-refresh-tribe {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-refresh-tribe:hover {
  background: #E2E8F0;
  border-color: #94A3B8;
  color: #0F172A;
}

/* Podio Top 3 Tribe Champions */
.tribe-podium-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.podium-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.card-header-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.card-header-icon-box.tint-amber {
  background: #FEF3C7;
  border: 1px solid #FDE68A;
}

.card-header-icon-box.tint-emerald {
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
}

.card-header-icon-box.tint-cyan {
  background: #ECFEFF;
  border: 1px solid #A5F3FC;
}

.podium-heading {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #0F172A;
}

.podium-sub {
  font-size: 12px;
  color: #64748B;
  display: block;
}

.podium-blocks-row {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  padding-top: 10px;
  min-height: 165px;
}

.podium-slot {
  flex: 1;
  max-width: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.podium-slot:hover {
  transform: translateY(-2px);
}

.podium-avatar-wrap {
  position: relative;
  margin-bottom: 6px;
}

.podium-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid #CBD5E1;
  background: #F8FAFC;
}

.podium-avatar-initials {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  background: #F1F5F9;
  color: #334155;
  border: 2.5px solid #CBD5E1;
}

.podium-slot.gold .podium-avatar,
.podium-slot.gold .podium-avatar-initials {
  width: 58px;
  height: 58px;
  border-color: #F59E0B;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.4);
}

.podium-slot.silver .podium-avatar,
.podium-slot.silver .podium-avatar-initials {
  border-color: #94A3B8;
}

.podium-slot.bronze .podium-avatar,
.podium-slot.bronze .podium-avatar-initials {
  border-color: #D97706;
}

.podium-medal-badge {
  position: absolute;
  bottom: -4px;
  right: -2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  border: 2px solid #FFFFFF;
}

.podium-slot.gold .podium-medal-badge {
  background: #F59E0B;
  color: #FFFFFF;
}

.podium-slot.silver .podium-medal-badge {
  background: #94A3B8;
  color: #FFFFFF;
}

.podium-slot.bronze .podium-medal-badge {
  background: #D97706;
  color: #FFFFFF;
}

.podium-user-name {
  font-size: 12px;
  font-weight: 700;
  color: #1E293B;
  max-width: 95px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 2px;
}

.podium-pts-val {
  font-size: 11px;
  font-weight: 800;
  color: #059669;
  margin-bottom: 6px;
}

.podium-step-box {
  width: 100%;
  border-radius: 10px 10px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #FFFFFF;
}

.podium-slot.gold .podium-step-box {
  height: 66px;
  background: linear-gradient(180deg, #F59E0B 0%, #D97706 100%);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.podium-slot.silver .podium-step-box {
  height: 48px;
  background: linear-gradient(180deg, #94A3B8 0%, #64748B 100%);
}

.podium-slot.bronze .podium-step-box {
  height: 38px;
  background: linear-gradient(180deg, #B45309 0%, #92400E 100%);
}

/* Griglia Metriche Aggregate della Tribe */
.tribe-aggregate-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 640px) {
  .tribe-aggregate-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.tribe-aggregate-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.aggregate-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.aggregate-card-icon.tint-emerald {
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
}

.aggregate-card-icon.tint-cyan {
  background: #ECFEFF;
  border: 1px solid #A5F3FC;
}

.aggregate-card-icon.tint-amber {
  background: #FEF3C7;
  border: 1px solid #FDE68A;
}

.aggregate-card-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.aggregate-val {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.1;
}

.aggregate-val.emerald {
  color: #059669;
}

.aggregate-val.cyan {
  color: #0891B2;
}

.aggregate-val.amber {
  color: #D97706;
}

.aggregate-lbl {
  font-size: 11px;
  font-weight: 600;
  color: #64748B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* Card Lista Partecipanti & Andamento */
.leaderboard-list-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.card-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title-group {
  display: flex;
  flex-direction: column;
}

.section-header-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #0F172A;
}

.section-subtext {
  font-size: 12px;
  color: #64748B;
}

.live-pulse-badge {
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #059669;
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Barra di Ricerca */
.participant-search-box {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 14px;
}

.participant-search-box .search-icon {
  position: absolute;
  left: 12px;
  color: #94A3B8;
  pointer-events: none;
}

.participant-search-input {
  width: 100%;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 9px 36px 9px 36px;
  font-size: 13px;
  color: #0F172A;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.participant-search-input:focus {
  background: #FFFFFF;
  border-color: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.btn-clear-search {
  position: absolute;
  right: 10px;
  background: #E2E8F0;
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: #475569;
  cursor: pointer;
}

/* Tabella / Elenco Partecipanti */
.community-participants-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.leaderboard-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  transition: all 0.15s ease;
  cursor: pointer;
}

.leaderboard-row-item:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
  transform: translateY(-1px);
}

.leaderboard-row-item.current-user {
  background: #F0FDF4;
  border-color: #86EFAC;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.12);
}

.leader-left-col {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.leader-rank-num {
  font-size: 12px;
  font-weight: 800;
  color: #64748B;
  min-width: 22px;
  text-align: center;
}

.leader-rank-num.rank-gold,
.leader-rank-num.rank-silver,
.leader-rank-num.rank-bronze {
  font-size: 16px;
}

.leader-avatar-container {
  position: relative;
  flex-shrink: 0;
}

.leader-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #E2E8F0;
}

.leader-avatar-initials {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  background: #F1F5F9;
  color: #334155;
  border: 2px solid #E2E8F0;
}

.leader-avatar-initials.top-initials {
  background: #FEF3C7;
  color: #92400E;
  border-color: #F59E0B;
}

.avatar-online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10B981;
  border: 2px solid #FFFFFF;
}

.leader-name-block {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.leader-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.leader-user-name {
  font-size: 13px;
  font-weight: 700;
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge-you {
  background: #059669;
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 9999px;
}

.badge-leader {
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  color: #B45309;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 9999px;
}

.leader-progress-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #64748B;
  margin-top: 2px;
  flex-wrap: wrap;
}

.meta-dot {
  color: #CBD5E1;
}

.meta-icon {
  margin-right: 1px;
}

.leader-right-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
}

.leader-pts-badge {
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  color: #B45309;
  font-size: 12px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 8px;
  white-space: nowrap;
}

.leader-kg-lost {
  font-size: 11px;
  font-weight: 700;
}

.leader-kg-lost.loss-success {
  color: #059669;
}

.leader-kg-lost.loss-neutral {
  color: #64748B;
}

/* Disclaimer Informativo */
.tribe-disclaimer-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #FEF9C3;
  border: 1px solid #FEF08A;
  border-radius: 12px;
  padding: 12px 14px;
}

.disclaimer-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.disclaimer-text {
  margin: 0;
  font-size: 11.5px;
  color: #854D0E;
  line-height: 1.45;
}

/* Card Link Rapido in Vista Progressi */
.progress-community-link-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
  margin: 12px 0;
}

.progress-community-link-card:hover {
  border-color: #10B981;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.12);
  transform: translateY(-1px);
}

.nascosto,
[hidden] {
  display: none !important;
}

/* =========================================================================
   BANNER START PROGRAMMA & GESTIONE AVANZAMENTO A MEZZANOTTE (v159)
   ========================================================================= */

.program-start-banner-section {
  width: 100%;
  margin: 0 0 14px 0;
  box-sizing: border-box;
}

.program-start-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-radius: 18px;
  padding: 14px 18px;
  box-sizing: border-box;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
}

.program-start-card.unstarted {
  background: linear-gradient(135deg, #F0FDF4 0%, #ECFDF5 50%, #DCFCE7 100%);
  border: 1.5px solid #86EFAC;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.12);
}

.program-start-card.active {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.start-card-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.start-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #DCFCE7;
  border: 1px solid #86EFAC;
  border-radius: 9999px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 700;
  color: #047857;
  width: fit-content;
  margin-bottom: 2px;
}

.pulse-dot-green {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 6px #10B981;
  display: inline-block;
  animation: pulse-dot 2s infinite ease-in-out;
}

.start-card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #064E3B;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.start-card-sub {
  margin: 0;
  font-size: 12px;
  color: #065F46;
  line-height: 1.4;
  opacity: 0.9;
}

.btn-start-challenge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.03em;
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-start-challenge:hover {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
  transform: translateY(-1.5px) scale(1.02);
}

.btn-start-challenge:active {
  transform: translateY(0) scale(0.98);
}

.start-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.program-active-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  border-radius: 9999px;
  padding: 3px 10px;
  font-size: 12px;
  color: #059669;
  font-weight: 700;
}

.program-countdown-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 9999px;
  padding: 3px 9px;
  font-size: 11px;
  color: #64748B;
  font-weight: 600;
}

.start-card-info-text {
  margin: 4px 0 0 0;
  font-size: 12px;
  color: #475569;
  line-height: 1.4;
}

.start-card-right-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-program-settings {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-program-settings:hover {
  background: #E2E8F0;
  color: #0F172A;
  border-color: #94A3B8;
}

/* Banner giorno passato */
.past-day-editing-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
  border: 1px solid #93C5FD;
  border-radius: 14px;
  padding: 10px 14px;
  margin-top: 10px;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.08);
}

.past-day-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.past-day-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.past-day-left strong {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: #1E40AF;
  line-height: 1.25;
}

.past-day-left p {
  margin: 2px 0 0 0;
  font-size: 11.5px;
  color: #2563EB;
  line-height: 1.35;
}

.btn-return-today {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #2563EB;
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  padding: 7px 11px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
  transition: all 0.2s ease;
}

.btn-return-today:hover {
  background: #1D4ED8;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
}

/* Day step lock indicator */
.day-step-btn.locked {
  opacity: 0.6;
}

.day-step-btn.locked .day-step-sub {
  color: #94A3B8;
}

.day-step-btn.locked:hover {
  opacity: 0.85;
}

/* Modale Gestione Programma */
.program-schedule-modal-box {
  max-width: 460px;
  width: 92%;
}

.program-schedule-modal-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.schedule-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.schedule-field-group label {
  font-size: 13px;
  font-weight: 700;
  color: #1E293B;
}

.input-schedule-date {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #CBD5E1;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #0F172A;
  background: #F8FAFC;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s;
}

.input-schedule-date:focus {
  border-color: #10B981;
  background: #FFFFFF;
}

.schedule-field-hint {
  font-size: 11.5px;
  color: #64748B;
  line-height: 1.4;
}

.schedule-summary-box {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12.5px;
  color: #334155;
  line-height: 1.5;
}

.schedule-actions-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-restart-today {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #FFF1F2;
  border: 1px solid #FECDD3;
  color: #E11D48;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-restart-today:hover {
  background: #FFE4E6;
  border-color: #FDA4AF;
}

/* =========================================================================
   COMPLETAMENTO SEZIONI AUDIT (v160): PDF, IDRATAZIONE, MEDAGLIE, STRATEGIA
   ========================================================================= */

/* Pulsante Esporta PDF Dossier */
.btn-export-pdf-dossier {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFFFFF;
  border: 1.5px solid #059669;
  color: #059669;
  font-size: 12px;
  font-weight: 700;
  border-radius: 10px;
  padding: 7px 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.12);
}

.btn-export-pdf-dossier:hover {
  background: #ECFDF5;
  color: #047857;
  border-color: #047857;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.2);
}

/* Grafico Idratazione Card */
.progress-chart-card.water-chart-card {
  margin-top: 14px;
}

.chart-period-tag.water {
  background: #EFF6FF;
  color: #2563EB;
  border: 1px solid #BFDBFE;
}

.chart-period-tag.gold {
  background: #FFFBEB;
  color: #B45309;
  border: 1px solid #FDE68A;
}

/* Bacheca Traguardi & Medaglie */
.achievements-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 18px;
  padding: 16px;
  margin: 14px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}

@media (max-width: 480px) {
  .achievements-grid {
    grid-template-columns: 1fr;
  }
}

.achievement-item-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1.5px solid #E2E8F0;
  background: #F8FAFC;
  transition: all 0.25s ease;
  box-sizing: border-box;
}

.achievement-item-card.unlocked {
  background: linear-gradient(135deg, #FFFDF5 0%, #FEF3C7 100%);
  border-color: #FBBF24;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.18);
}

.achievement-icon-box {
  font-size: 26px;
  line-height: 1;
  flex-shrink: 0;
  padding-top: 2px;
}

.achievement-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.achievement-title {
  font-size: 13px;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.25;
}

.achievement-desc {
  font-size: 11.5px;
  color: #64748B;
  line-height: 1.35;
}

.achievement-badge-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  margin-top: 4px;
  color: #94A3B8;
}

.achievement-item-card.unlocked .achievement-badge-status {
  color: #B45309;
}

/* Scheda Strategia Nutrizionale & Scelte Consapevoli */
.nutrition-strategy-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 18px;
  padding: 16px;
  margin: 14px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
}

.strategy-boxes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 12px;
}

@media (min-width: 640px) {
  .strategy-boxes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.strategy-box {
  border-radius: 14px;
  padding: 14px;
  box-sizing: border-box;
}

.strategy-box.recommended {
  background: #F0FDF4;
  border: 1.5px solid #86EFAC;
}

.strategy-box.to-avoid {
  background: #FEF2F2;
  border: 1.5px solid #FECDD3;
}

.strategy-box-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.strategy-box-icon {
  font-size: 16px;
}

.strategy-box.recommended .strategy-box-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #065F46;
}

.strategy-box.to-avoid .strategy-box-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #991B1B;
}

.strategy-items-list {
  margin: 8px 0 0 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.5;
  color: #334155;
}

.strategy-items-list li {
  margin-bottom: 5px;
}

/* Regole Ottimizzate Stampa PDF (@media print) */
@media print {
  body {
    background: #FFFFFF !important;
    color: #000000 !important;
  }
  .top-app-bar,
  .bottom-nav,
  .btn-view-back,
  .btn-export-pdf-dossier,
  .progress-community-link-card,
  .program-start-banner-section,
  .program-modal-backdrop {
    display: none !important;
  }
  .app-container {
    max-width: 100% !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  #view-progressi {
    display: block !important;
  }
  .stat-kpi-card,
  .bio-dossier-card,
  .progress-chart-card,
  .circumference-card,
  .achievements-card,
  .nutrition-strategy-card {
    page-break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #CBD5E1 !important;
  }
}

/* ========================================================
   ONBOARDING BANNER & GOALS SELECTION IN PROFILE MODAL
   ======================================================== */
.profile-onboarding-banner {
  background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
  border: 1.5px solid #10B981;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.12);
}
.onboarding-banner-badge {
  display: inline-flex;
  align-items: center;
  background: #059669;
  color: #FFF;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 6px;
}
.onboarding-banner-title {
  font-size: 15px;
  font-weight: 800;
  color: #065F46;
  margin-bottom: 4px;
}
.onboarding-banner-text {
  font-size: 12px;
  color: #047857;
  font-weight: 500;
  line-height: 1.45;
}

.profile-section-subtext {
  font-size: 12px;
  color: var(--text-muted, #64748B);
  margin: 0 0 10px 0;
  font-weight: 500;
}

.profile-goals-selection-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-goal-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  padding: 11px 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.profile-goal-card:hover {
  border-color: #CBD5E1;
  transform: translateY(-1px);
}

.profile-goal-card.active {
  border-color: #059669;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.02) 100%);
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.12);
}

.profile-goal-card-icon-box {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  transition: all 0.2s ease;
}

.profile-goal-card.active .profile-goal-card-icon-box.weight-loss {
  background: #FEF2F2;
  border-color: #FCA5A5;
}

.profile-goal-card.active .profile-goal-card-icon-box.sport {
  background: #EFF6FF;
  border-color: #93C5FD;
}

.profile-goal-card.active .profile-goal-card-icon-box.energy {
  background: #FFFBEB;
  border-color: #FCD34D;
}

.profile-goal-card-info {
  flex: 1;
  min-width: 0;
}

.profile-goal-card-name {
  font-size: 13.5px;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 2px;
}

.profile-goal-card.active .profile-goal-card-name {
  color: #047857;
}

.profile-goal-card-detail {
  font-size: 11.5px;
  color: #64748B;
  font-weight: 500;
  line-height: 1.35;
}

.profile-goal-radio-circle {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 50%;
  border: 2px solid #CBD5E1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  background: #FFF;
}

.profile-goal-check-icon {
  font-size: 12px;
  font-weight: 900;
  color: transparent;
  transform: scale(0.6);
  transition: all 0.2s ease;
}

.profile-goal-card.active .profile-goal-radio-circle {
  border-color: #059669;
  background: #059669;
}

.profile-goal-card.active .profile-goal-check-icon {
  color: #FFFFFF;
  transform: scale(1);
}

/* ========================================================
   WIZARD STEPPER & SELECTED KIT SUMMARY (ONBOARDING)
   ======================================================== */
.profile-wizard-steps-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 8px 12px;
  margin: 10px 0 16px 0;
}

.profile-wizard-step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  opacity: 0.55;
  transition: all 0.2s ease;
}

.profile-wizard-step-item.active {
  opacity: 1;
}

.wizard-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #CBD5E1;
  color: #1E293B;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 800;
  transition: all 0.2s ease;
}

.profile-wizard-step-item.active .wizard-step-num {
  background: #059669;
  color: #FFFFFF;
}

.wizard-step-label {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}

.profile-wizard-step-item.active .wizard-step-label {
  color: #065F46;
}

.profile-wizard-step-divider {
  width: 28px;
  height: 2px;
  background: #E2E8F0;
  border-radius: 2px;
}

/* Card del SOLO kit selezionato (Step 2) */
.profile-selected-kit-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, #ECFDF5 0%, #F0FDF4 100%);
  border: 1.5px solid #10B981;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.08);
}

.selected-kit-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.selected-kit-details {
  min-width: 0;
}

.selected-kit-name {
  font-size: 13.5px;
  font-weight: 800;
  color: #065F46;
}

.selected-kit-subtitle {
  font-size: 11px;
  color: #047857;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.btn-change-selected-kit {
  background: #FFFFFF;
  color: #065F46;
  border: 1px solid #10B981;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.btn-change-selected-kit:hover {
  background: #059669;
  color: #FFFFFF;
}

/* Pulsante di selezione per le card nello Step 1 */
.btn-select-wizard-kit {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #059669;
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
}

.btn-select-wizard-kit:hover {
  background: #047857;
  transform: translateY(-1px);
}



