/* ============================================================================
   TRAINING PLANS - COMPACT VERSION 🚀
   ============================================================================ */

:root {
  /* Palette vibrante e moderna */
  --primary: #ff6b35;
  --primary-light: #ff8c61;
  --primary-dark: #e85a2a;
  --secondary: #004e89;
  --accent: #00d9ff;
  --success: #00f5a0;
  --warning: #ffd60a;
  --danger: #ff006e;

  /* Backgrounds con gradients */
  --bg-dark: #0a0e27;
  --bg-card: linear-gradient(135deg, #1a1f3a 0%, #151929 100%);
  --bg-elevated: linear-gradient(135deg, #232947 0%, #1d2236 100%);

  /* Testi */
  --text-primary: #ffffff;
  --text-secondary: #d8e6f3;
  --text-muted: #6b7280;

  /* Effetti */
  --glow-primary: 0 0 20px rgba(255, 107, 53, 0.5);
  --glow-accent: 0 0 30px rgba(0, 217, 255, 0.4);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 30px 80px rgba(0, 0, 0, 0.6);
}

* {
  box-sizing: border-box;
}

body {
  background: var(--bg-dark);
  background-image:
    radial-gradient(circle at 20% 50%, rgba(255, 107, 53, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(0, 217, 255, 0.1) 0%, transparent 50%);
  background-attachment: fixed;
  min-height: 100vh;
}

.training-plans-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 16px 80px; /* ✅ RIDOTTO da 40px a 20px */
  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================================
   PAGE HEADER - COMPACT
   ============================================================================ */

.page-header {
  text-align: center;
  margin-bottom: 30px; /* ✅ RIDOTTO da 60px a 30px */
  position: relative;
  padding: 30px 40px; /* ✅ AGGIUNTO PADDING */
  background: linear-gradient(135deg, rgba(255, 165, 0, 0.1) 0%, rgba(255, 107, 53, 0.1) 100%); /* ✅ SFONDO ARANCIONE */
  border: 2px solid #FFA500; /* ✅ BORDO ARANCIONE SOLIDO */
  border-radius: 20px; /* ✅ BORDI ARROTONDATI */
  box-shadow: 0 0 30px rgba(255, 165, 0, 0.3); /* ✅ GLOW ARANCIONE */
}

.page-header::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, #FFA500, var(--accent)); /* ✅ ARANCIONE */
  border-radius: 2px;
  display: none; /* ✅ NASCOSTO perché ora c'è il bordo */
}

.page-header h1 {
  font-size: clamp(2rem, 5vw, 3rem); /* ✅ PIÙ GRANDE */
  font-weight: 800;
  color: #FFA500 !important; /* ✅ ARANCIONE SOLIDO COME ANALISI IA */
  margin-bottom: 12px;
  letter-spacing: -1px;
  animation: slideDown 0.8s ease-out;
  text-shadow: 0 2px 10px rgba(255, 165, 0, 0.3);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-header .subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem; /* ✅ RIDOTTO da 1.25rem */
  font-weight: 300;
  animation: slideUp 0.8s ease-out 0.2s both;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================================
   SECTION HEADERS - COMPACT
   ============================================================================ */

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px; /* ✅ RIDOTTO da 32px */
  padding-bottom: 12px; /* ✅ RIDOTTO da 16px */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.section-header h2 {
  font-size: 1.4rem; /* ✅ RIDOTTO da 1.75rem */
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px; /* ✅ RIDOTTO da 12px */
}

.section-header .badge {
  background: linear-gradient(135deg, var(--danger) 0%, var(--warning) 100%);
  color: white;
  padding: 4px 12px; /* ✅ RIDOTTO da 6px 16px */
  border-radius: 16px; /* ✅ RIDOTTO da 20px */
  font-size: 0.85rem; /* ✅ RIDOTTO da 0.9rem */
  font-weight: 700;
  box-shadow: var(--glow-primary);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* ============================================================================
   PLAN CARDS - COMPACT
   ============================================================================ */

.plan-card {
  background: var(--bg-card);
  border-radius: 20px; /* ✅ RIDOTTO da 24px */
  padding: 20px; /* ✅ RIDOTTO da 32px */
  margin-bottom: 16px; /* ✅ RIDOTTO da 24px */
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

.plan-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px; /* ✅ RIDOTTO da 4px */
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity 0.3s;
}

.plan-card:hover {
  transform: translateY(-6px) scale(1.01); /* ✅ RIDOTTO movimento */
  box-shadow: var(--shadow-xl);
  border-color: rgba(255, 107, 53, 0.5);
}

.plan-card:hover::before {
  opacity: 1;
}

.plan-card.active {
  border: 2px solid var(--primary);
  box-shadow: var(--glow-primary), var(--shadow-lg);
  animation: cardGlow 3s ease-in-out infinite;
}

@keyframes cardGlow {
  0%, 100% { box-shadow: var(--glow-primary), var(--shadow-lg); }
  50% { box-shadow: 0 0 40px rgba(255, 107, 53, 0.8), var(--shadow-lg); }
}

.plan-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px; /* ✅ RIDOTTO da 28px */
  gap: 15px; /* ✅ RIDOTTO da 20px */
}

.plan-title {
  font-size: 1.3rem; /* ✅ RIDOTTO da 1.5rem */
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px; /* ✅ RIDOTTO da 12px */
  line-height: 1.3;
}

.plan-goal {
  color: var(--text-secondary);
  font-size: 0.95rem; /* ✅ RIDOTTO da 1rem */
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px; /* ✅ RIDOTTO da 8px */
}

.plan-goal::before {
  content: '🎯';
  font-size: 1.1em; /* ✅ RIDOTTO da 1.2em */
}

.plan-description {
  margin-top: 10px; /* ✅ RIDOTTO da 12px */
  color: var(--text-muted);
  font-size: 0.9rem; /* ✅ RIDOTTO da 0.95rem */
  line-height: 1.5; /* ✅ RIDOTTO da 1.6 */
  padding-left: 24px; /* ✅ RIDOTTO da 32px */
  border-left: 2px solid rgba(255, 107, 53, 0.3); /* ✅ RIDOTTO da 3px */
}

.plan-status {
  display: inline-flex;
  align-items: center;
  gap: 6px; /* ✅ RIDOTTO da 8px */
  padding: 8px 16px; /* ✅ RIDOTTO da 10px 20px */
  border-radius: 20px; /* ✅ RIDOTTO da 25px */
  font-size: 0.8rem; /* ✅ RIDOTTO da 0.875rem */
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.3s;
}

.plan-status::before {
  content: '';
  width: 6px; /* ✅ RIDOTTO da 8px */
  height: 6px;
  border-radius: 50%;
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.7; }
}

.plan-status.active {
  background: linear-gradient(135deg, var(--success) 0%, #00c48c 100%);
  color: white;
}

.plan-status.active::before {
  background: white;
}

.plan-status.paused {
  background: linear-gradient(135deg, var(--warning) 0%, #ffb700 100%);
  color: #000;
}

.plan-status.paused::before {
  background: #000;
}

.plan-status.completed {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
}

.plan-status.completed::before {
  background: white;
}

/* ============================================================================
   PROGRESS BARS - COMPACT
   ============================================================================ */

.plan-progress {
  margin: 20px 0; /* ✅ RIDOTTO da 32px */
  padding: 16px; /* ✅ RIDOTTO da 24px */
  background: var(--bg-elevated);
  border-radius: 12px; /* ✅ RIDOTTO da 16px */
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px; /* ✅ RIDOTTO da 12px */
  font-size: 0.9rem; /* ✅ RIDOTTO da 0.95rem */
}

.progress-label span:first-child {
  color: var(--text-secondary);
  font-weight: 500;
}

.progress-label span:last-child {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1rem; /* ✅ RIDOTTO da 1.1rem */
}

.progress-label strong {
  color: var(--primary);
}

.progress-bar-container {
  width: 100%;
  height: 12px; /* ✅ RIDOTTO da 16px */
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px; /* ✅ RIDOTTO da 8px */
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 6px;
  position: relative;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 20px rgba(255, 107, 53, 0.6);
}

.progress-bar-fill::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ============================================================================
   META CARDS - COMPACT
   ============================================================================ */

.plan-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); /* ✅ RIDOTTO da 150px */
  gap: 12px; /* ✅ RIDOTTO da 16px */
  margin-top: 20px; /* ✅ RIDOTTO da 28px */
}

.meta-item {
  text-align: center;
  padding: 14px 12px; /* ✅ RIDOTTO da 20px 16px */
  background: var(--bg-elevated);
  border-radius: 12px; /* ✅ RIDOTTO da 16px */
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.meta-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transition: transform 0.3s;
}

.meta-item:hover {
  transform: translateY(-3px); /* ✅ RIDOTTO da -4px */
  border-color: rgba(255, 107, 53, 0.5);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.meta-item:hover::before {
  transform: scaleX(1);
}

.meta-label {
  display: block;
  font-size: 0.8rem; /* ✅ RIDOTTO da 0.875rem */
  color: var(--text-secondary);
  margin-bottom: 6px; /* ✅ RIDOTTO da 8px */
  font-weight: 500;
}

.meta-value {
  display: block;
  font-size: 1.3rem; /* ✅ RIDOTTO da 1.5rem */
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pending-badge {
  background: linear-gradient(135deg, var(--warning) 0%, var(--danger) 100%);
  color: white;
  padding: 3px 10px; /* ✅ RIDOTTO da 4px 12px */
  border-radius: 10px; /* ✅ RIDOTTO da 12px */
  font-weight: 700;
  display: inline-block;
  box-shadow: 0 0 15px rgba(255, 214, 10, 0.5);
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* ============================================================================
   BUTTONS - COMPACT
   ============================================================================ */

.btn-primary, .btn-secondary {
  padding: 10px 20px; /* ✅ RIDOTTO da 14px 28px */
  border-radius: 10px; /* ✅ RIDOTTO da 12px */
  border: none;
  font-size: 0.95rem; /* ✅ RIDOTTO da 1rem */
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 8px; /* ✅ RIDOTTO da 10px */
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 25px rgba(255, 107, 53, 0.6), var(--glow-primary);
}

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

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: var(--bg-card);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-large {
  padding: 16px 32px; /* ✅ RIDOTTO da 20px 40px */
  font-size: 1.1rem; /* ✅ RIDOTTO da 1.2rem */
  border-radius: 14px; /* ✅ RIDOTTO da 16px */
}

.plan-actions {
  display: flex;
  gap: 10px; /* ✅ RIDOTTO da 12px */
  flex-wrap: wrap;
  margin-top: 18px; /* ✅ RIDOTTO da 24px */
}

/* ============================================================================
   DETECTED SESSIONS - COMPACT
   ============================================================================ */

.detected-sessions-section {
  animation: slideIn 0.6s ease-out;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.detected-sessions-list {
  display: grid;
  gap: 15px; /* ✅ RIDOTTO da 20px */
}

.detected-session-card {
  background: var(--bg-card);
  border: 2px solid var(--warning);
  border-radius: 16px; /* ✅ RIDOTTO da 20px */
  padding: 18px; /* ✅ RIDOTTO da 24px */
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
  animation: cardSlide 0.5s ease-out;
}

@keyframes cardSlide {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.detected-session-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px; /* ✅ RIDOTTO da 4px */
  background: linear-gradient(90deg, var(--warning), var(--danger));
  animation: slideProgress 2s ease-in-out infinite;
}

@keyframes slideProgress {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}

.detected-session-card:hover {
  transform: translateX(6px); /* ✅ RIDOTTO da 8px */
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.session-info {
  margin-bottom: 16px; /* ✅ RIDOTTO da 20px */
}

.session-date {
  font-size: 1.1rem; /* ✅ RIDOTTO da 1.2rem */
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 10px; /* ✅ RIDOTTO da 12px */
  display: flex;
  align-items: center;
  gap: 6px; /* ✅ RIDOTTO da 8px */
}

.session-details {
  color: var(--text-secondary);
  font-size: 0.95rem; /* ✅ RIDOTTO da 1rem */
  line-height: 1.5; /* ✅ RIDOTTO da 1.6 */
}

.session-details strong {
  color: var(--text-primary);
  font-weight: 700;
}

.match-score {
  margin: 16px 0; /* ✅ RIDOTTO da 20px */
  padding: 12px; /* ✅ RIDOTTO da 16px */
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px; /* ✅ RIDOTTO da 12px */
}

.match-score-label {
  font-size: 0.9rem; /* ✅ RIDOTTO da 0.95rem */
  color: var(--text-secondary);
  margin-bottom: 10px; /* ✅ RIDOTTO da 12px */
  font-weight: 600;
}

.match-bar {
  width: 100%;
  height: 10px; /* ✅ RIDOTTO da 12px */
  background: rgba(0, 0, 0, 0.3);
  border-radius: 5px; /* ✅ RIDOTTO da 6px */
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.match-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--success) 0%, var(--primary) 50%, var(--danger) 100%);
  border-radius: 5px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.match-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shimmer 2s infinite;
}

.match-details {
  display: flex;
  gap: 12px; /* ✅ RIDOTTO da 16px */
  flex-wrap: wrap;
  margin-top: 12px; /* ✅ RIDOTTO da 16px */
}

.match-detail {
  display: flex;
  align-items: center;
  gap: 6px; /* ✅ RIDOTTO da 8px */
  font-size: 0.85rem; /* ✅ RIDOTTO da 0.9rem */
  padding: 5px 10px; /* ✅ RIDOTTO da 6px 12px */
  border-radius: 6px; /* ✅ RIDOTTO da 8px */
  font-weight: 600;
  transition: all 0.2s;
}

.match-detail.matched {
  color: var(--success);
  background: rgba(0, 245, 160, 0.1);
  border: 1px solid rgba(0, 245, 160, 0.3);
}

.match-detail.not-matched {
  color: var(--text-muted);
  background: rgba(107, 114, 128, 0.1);
  border: 1px solid rgba(107, 114, 128, 0.2);
}

.session-actions {
  display: flex;
  gap: 10px; /* ✅ RIDOTTO da 12px */
  margin-top: 16px; /* ✅ RIDOTTO da 20px */
}

/* ============================================================================
   CTA SECTION - COMPACT
   ============================================================================ */

.create-plan-cta {
  text-align: center;
  padding: 50px 30px; /* ✅ RIDOTTO da 80px 40px */
  background: var(--bg-card);
  border-radius: 24px; /* ✅ RIDOTTO da 32px */
  margin: 40px 0; /* ✅ RIDOTTO da 60px */
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.create-plan-cta::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 107, 53, 0.15) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.cta-content {
  position: relative;
  z-index: 1;
}

.cta-icon {
  font-size: 4rem; /* ✅ RIDOTTO da 5rem */
  margin-bottom: 18px; /* ✅ RIDOTTO da 24px */
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 0 30px rgba(255, 107, 53, 0.6));
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.cta-content h2 {
  font-size: 2rem; /* ✅ RIDOTTO da 2.5rem */
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px; /* ✅ RIDOTTO da 16px */
  line-height: 1.2;
}

.cta-content p {
  color: var(--text-secondary);
  font-size: 1.1rem; /* ✅ RIDOTTO da 1.25rem */
  margin-bottom: 30px; /* ✅ RIDOTTO da 40px */
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================================
   MODAL - COMPACT
   ============================================================================ */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 14, 39, 0.95);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  overflow-y: auto;
  animation: modalFadeIn 0.3s ease-out;
}

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

.modal-content {
  background: var(--bg-card);
  border-radius: 20px; /* ✅ RIDOTTO da 24px */
  width: 100%;
  max-width: 1000px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 30px; /* ✅ RIDOTTO da 40px */
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-xl);
  animation: modalSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(50px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute;
  top: 16px; /* ✅ RIDOTTO da 20px */
  right: 16px;
  background: linear-gradient(135deg, var(--danger) 0%, #d90041 100%);
  color: white;
  border: none;
  width: 36px; /* ✅ RIDOTTO da 40px */
  height: 36px;
  border-radius: 50%;
  font-size: 1.3rem; /* ✅ RIDOTTO da 1.5rem */
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(255, 0, 110, 0.4);
}

.modal-close:hover {
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 6px 20px rgba(255, 0, 110, 0.6);
}

/* ============================================================================
   PLAN DETAIL SECTIONS - COMPACT
   ============================================================================ */

.plan-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px; /* ✅ RIDOTTO da 32px */
  padding-bottom: 18px; /* ✅ RIDOTTO da 24px */
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.plan-detail-header h2 {
  font-size: 1.75rem; /* ✅ RIDOTTO da 2rem */
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.plan-detail-section {
  margin-bottom: 30px; /* ✅ RIDOTTO da 40px */
  padding: 24px; /* ✅ RIDOTTO da 32px */
  background: var(--bg-elevated);
  border-radius: 16px; /* ✅ RIDOTTO da 20px */
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.plan-detail-section h3 {
  font-size: 1.3rem; /* ✅ RIDOTTO da 1.5rem */
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 18px; /* ✅ RIDOTTO da 24px */
  display: flex;
  align-items: center;
  gap: 10px; /* ✅ RIDOTTO da 12px */
}

.progress-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); /* ✅ RIDOTTO da 200px */
  gap: 15px; /* ✅ RIDOTTO da 20px */
  margin-top: 16px; /* ✅ RIDOTTO da 20px */
}

.stat-box {
  background: rgba(0, 0, 0, 0.2);
  padding: 18px; /* ✅ RIDOTTO da 24px */
  border-radius: 12px; /* ✅ RIDOTTO da 16px */
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s;
}

.stat-box:hover {
  transform: translateY(-3px); /* ✅ RIDOTTO da -4px */
  border-color: rgba(255, 107, 53, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.stat-label {
  font-size: 0.8rem; /* ✅ RIDOTTO da 0.875rem */
  color: var(--text-secondary);
  margin-bottom: 10px; /* ✅ RIDOTTO da 12px */
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 1.75rem; /* ✅ RIDOTTO da 2rem */
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.baseline-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* ✅ RIDOTTO da 220px */
  gap: 15px; /* ✅ RIDOTTO da 20px */
}

.baseline-stat-card {
  display: flex;
  align-items: center;
  gap: 16px; /* ✅ RIDOTTO da 20px */
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.2) 0%, rgba(0, 217, 255, 0.2) 100%);
  padding: 18px; /* ✅ RIDOTTO da 24px */
  border-radius: 12px; /* ✅ RIDOTTO da 16px */
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s;
}

.baseline-stat-card:hover {
  transform: translateY(-3px); /* ✅ RIDOTTO da -4px */
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.stat-icon {
  font-size: 2rem; /* ✅ RIDOTTO da 2.5rem */
  filter: drop-shadow(0 0 10px rgba(255, 107, 53, 0.5));
}

.stat-content {
  flex: 1;
}

.weekly-schedule-container {
  display: grid;
  gap: 18px; /* ✅ RIDOTTO da 24px */
}

.week-detail-card {
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px; /* ✅ RIDOTTO da 20px */
  padding: 18px; /* ✅ RIDOTTO da 24px */
  background: rgba(0, 0, 0, 0.2);
  transition: all 0.3s;
}

.week-detail-card:hover {
  border-color: var(--primary);
  transform: translateX(6px); /* ✅ RIDOTTO da 8px */
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.week-detail-card.completed {
  border-color: var(--success);
  background: rgba(0, 245, 160, 0.05);
}

.week-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px; /* ✅ RIDOTTO da 20px */
  padding-bottom: 16px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.week-title h4 {
  margin: 0 0 6px 0; /* ✅ RIDOTTO da 8px */
  color: var(--text-primary);
  font-size: 1.2rem; /* ✅ RIDOTTO da 1.3rem */
  font-weight: 700;
}

.week-progress {
  font-size: 0.9rem; /* ✅ RIDOTTO da 0.95rem */
  color: var(--text-secondary);
  font-weight: 600;
}

.week-theme {
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.2) 0%, rgba(0, 217, 255, 0.2) 100%);
  padding: 6px 16px; /* ✅ RIDOTTO da 8px 20px */
  border-radius: 16px; /* ✅ RIDOTTO da 20px */
  font-size: 0.9rem; /* ✅ RIDOTTO da 0.95rem */
  color: var(--text-primary);
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.week-sessions-list {
  display: grid;
  gap: 12px; /* ✅ RIDOTTO da 16px */
}

.session-detail-item {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px; /* ✅ RIDOTTO da 12px */
  padding: 16px; /* ✅ RIDOTTO da 20px */
  background: rgba(0, 0, 0, 0.2);
  transition: all 0.3s;
}

.session-detail-item:hover {
  transform: translateX(6px); /* ✅ RIDOTTO da 8px */
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.session-detail-item.completed {
  border-color: var(--success);
  background: rgba(0, 245, 160, 0.05);
}

.session-detail-item.detected {
  border-color: var(--warning);
  background: rgba(255, 214, 10, 0.05);
}

.session-detail-header {
  display: flex;
  align-items: center;
  gap: 10px; /* ✅ RIDOTTO da 12px */
  margin-bottom: 12px; /* ✅ RIDOTTO da 16px */
  flex-wrap: wrap;
}

.session-icon {
  font-size: 1.3rem; /* ✅ RIDOTTO da 1.5rem */
}

.session-day {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1rem; /* ✅ RIDOTTO da 1.1rem */
}

.session-date {
  color: var(--text-secondary);
  font-size: 0.9rem; /* ✅ RIDOTTO da 0.95rem */
  font-weight: 600;
}

.session-drills {
  margin-top: 12px; /* ✅ RIDOTTO da 16px */
  padding: 12px; /* ✅ RIDOTTO da 16px */
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px; /* ✅ RIDOTTO da 12px */
}

.session-drills strong {
  color: var(--primary);
  font-weight: 700;
  display: block;
  margin-bottom: 10px; /* ✅ RIDOTTO da 12px */
}

.session-drills ul {
  margin: 0;
  padding-left: 20px; /* ✅ RIDOTTO da 24px */
  color: var(--text-secondary);
}

.session-drills li {
  margin: 6px 0; /* ✅ RIDOTTO da 8px */
  line-height: 1.5;
}

.more-drills {
  color: var(--primary);
  font-style: italic;
  font-weight: 700;
}

.session-results {
  margin-top: 10px; /* ✅ RIDOTTO da 12px */
  padding: 10px 14px; /* ✅ RIDOTTO da 12px 16px */
  background: rgba(0, 245, 160, 0.1);
  border-radius: 8px;
  border-left: 3px solid var(--success);
  color: var(--text-secondary);
}

.session-results strong {
  color: var(--success);
}

.milestones-list {
  display: grid;
  gap: 12px; /* ✅ RIDOTTO da 16px */
}

.milestone-card {
  display: flex;
  align-items: flex-start;
  gap: 16px; /* ✅ RIDOTTO da 20px */
  padding: 16px; /* ✅ RIDOTTO da 20px */
  background: linear-gradient(135deg, rgba(255, 214, 10, 0.1) 0%, rgba(255, 107, 53, 0.1) 100%);
  border-left: 4px solid var(--warning);
  border-radius: 10px; /* ✅ RIDOTTO da 12px */
  transition: all 0.3s;
}

.milestone-card:hover {
  transform: translateX(6px); /* ✅ RIDOTTO da 8px */
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.milestone-week {
  font-weight: 800;
  color: var(--warning);
  min-width: 120px; /* ✅ RIDOTTO da 140px */
  font-size: 1rem; /* ✅ RIDOTTO da 1.1rem */
}

.milestone-check {
  color: var(--text-secondary);
  line-height: 1.6;
}

.plan-detail-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px; /* ✅ RIDOTTO da 16px */
  margin-top: 30px; /* ✅ RIDOTTO da 40px */
  padding-top: 24px; /* ✅ RIDOTTO da 32px */
  border-top: 2px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
}

/* ============================================================================
   SESSIONS TIMELINE - COMPACT
   ============================================================================ */

.timeline-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85em; /* ✅ RIDOTTO da 0.9em */
    margin-bottom: 16px; /* ✅ RIDOTTO da 20px */
}

.sessions-timeline {
    display: flex;
    flex-direction: column;
    gap: 10px; /* ✅ RIDOTTO da 12px */
    margin-bottom: 16px; /* ✅ RIDOTTO da 20px */
}

.timeline-item {
    display: flex;
    align-items: center;
    padding: 12px; /* ✅ RIDOTTO da 15px */
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px; /* ✅ RIDOTTO da 12px */
    border-left: 3px solid; /* ✅ RIDOTTO da 4px */
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.timeline-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px); /* ✅ RIDOTTO da 5px */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.timeline-item.confirmed {
    border-left-color: #28a745;
}

.timeline-item.detected {
    border-left-color: #ff9800;
}

.timeline-item.unlinked {
    border-left-color: #6c757d;
}

.timeline-item.planned {
    border-left-color: #007bff;
}

.timeline-date {
    min-width: 70px; /* ✅ RIDOTTO da 80px */
    font-weight: 600;
    color: #fff;
    font-size: 0.9em; /* ✅ RIDOTTO da 0.95em */
}

.timeline-content {
    flex: 1;
    margin: 0 12px; /* ✅ RIDOTTO da 15px */
}

.timeline-title {
    color: #fff;
    font-weight: 500;
    margin-bottom: 3px;
    font-size: 0.9em; /* ✅ RIDOTTO da 0.95em */
}

.timeline-details {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8em; /* ✅ RIDOTTO da 0.85em */
}

.timeline-action {
    display: flex;
    gap: 6px; /* ✅ RIDOTTO da 8px */
}

.btn-link-session,
.btn-confirm-session {
    padding: 6px 12px; /* ✅ RIDOTTO da 8px 16px */
    color: white;
    border: none;
    border-radius: 6px; /* ✅ RIDOTTO da 8px */
    font-size: 0.8em; /* ✅ RIDOTTO da 0.85em */
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-link-session {
    background: linear-gradient(135deg, #007bff, #0056b3);
}

.btn-link-session:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

.btn-confirm-session {
    background: linear-gradient(135deg, #28a745, #1e7e34);
}

.btn-confirm-session:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.timeline-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px; /* ✅ RIDOTTO da 20px */
    padding-top: 12px; /* ✅ RIDOTTO da 15px */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px; /* ✅ RIDOTTO da 8px */
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8em; /* ✅ RIDOTTO da 0.85em */
}

.badge-confirmed {
    color: #28a745;
    font-size: 1.1em; /* ✅ RIDOTTO da 1.2em */
}

.badge-detected {
    color: #ff9800;
    font-size: 1.1em;
}

.badge-unlinked {
    color: #6c757d;
    font-size: 1.1em;
}

.badge-planned {
    color: #007bff;
    font-size: 1.1em;
}

/* ============================================================================
   MANUAL LINK MODAL - COMPACT
   ============================================================================ */

.modal-link-session {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.modal-link-session.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-link-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 24px; /* ✅ RIDOTTO da 30px */
    border-radius: 14px; /* ✅ RIDOTTO da 16px */
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid rgba(0, 123, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.modal-link-content h3 {
    color: #fff;
    margin-bottom: 16px; /* ✅ RIDOTTO da 20px */
    font-size: 1.3em; /* ✅ RIDOTTO da 1.4em */
}

.planned-sessions-list {
    display: flex;
    flex-direction: column;
    gap: 10px; /* ✅ RIDOTTO da 12px */
    margin-bottom: 16px; /* ✅ RIDOTTO da 20px */
}

.planned-session-item {
    padding: 12px; /* ✅ RIDOTTO da 15px */
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px; /* ✅ RIDOTTO da 12px */
    border-left: 3px solid #007bff; /* ✅ RIDOTTO da 4px */
    cursor: pointer;
    transition: all 0.3s ease;
}

.planned-session-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px); /* ✅ RIDOTTO da 5px */
}

.planned-session-item.selected {
    background: rgba(0, 123, 255, 0.2);
    border-left-color: #28a745;
}

.planned-session-title {
    color: #fff;
    font-weight: 500;
    margin-bottom: 4px; /* ✅ RIDOTTO da 5px */
}

.planned-session-details {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8em; /* ✅ RIDOTTO da 0.85em */
}

.modal-actions {
    display: flex;
    gap: 10px; /* ✅ RIDOTTO da 12px */
    margin-top: 16px; /* ✅ RIDOTTO da 20px */
}

.btn-modal-link {
    flex: 1;
    padding: 10px; /* ✅ RIDOTTO da 12px */
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-modal-link:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.btn-modal-link:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-modal-cancel {
    flex: 1;
    padding: 10px; /* ✅ RIDOTTO da 12px */
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-modal-cancel:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
}

/* ============================================================================
   SCROLLBAR
   ============================================================================ */

::-webkit-scrollbar {
  width: 10px; /* ✅ RIDOTTO da 12px */
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 5px; /* ✅ RIDOTTO da 6px */
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
}

/* ============================================================================
   RESPONSIVE - COMPACT
   ============================================================================ */

@media (max-width: 768px) {
    .training-plans-container {
        padding: 16px 12px 70px; /* ✅ RIDOTTO */
    }

    .page-header h1 {
        font-size: 1.75rem;
    }

    .plan-card {
        padding: 16px; /* ✅ RIDOTTO */
    }

    .plan-header {
        flex-direction: column;
        gap: 12px; /* ✅ RIDOTTO */
    }

    .plan-meta {
        grid-template-columns: repeat(2, 1fr);
    }

    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px; /* ✅ RIDOTTO */
    }

    .timeline-date {
        min-width: auto;
    }

    .timeline-content {
        margin: 8px 0; /* ✅ RIDOTTO */
    }

    .timeline-action {
        width: 100%;
    }

    .btn-link-session,
    .btn-confirm-session {
        flex: 1;
        text-align: center;
    }

    .timeline-legend {
        gap: 12px; /* ✅ RIDOTTO */
    }

    .modal-link-content {
        width: 95%;
        padding: 16px; /* ✅ RIDOTTO */
    }

    .modal-actions {
        flex-direction: column;
    }

    .baseline-stats-grid,
    .progress-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .week-header {
        flex-direction: column;
        gap: 10px; /* ✅ RIDOTTO */
        align-items: flex-start;
    }

    .session-detail-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .plan-detail-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 1.5rem; /* ✅ RIDOTTO */
    }

    .plan-meta {
        grid-template-columns: 1fr;
    }
}

/* ============================================================================
   TIMELINE COMPATTA - COMPACT
   ============================================================================ */

.sessions-timeline-compact {
    display: flex;
    flex-direction: column;
    gap: 6px; /* ✅ RIDOTTO da 8px */
}

.timeline-item-compact {
    display: flex;
    align-items: center;
    padding: 10px; /* ✅ RIDOTTO da 12px */
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px; /* ✅ RIDOTTO da 10px */
    border-left: 2px solid; /* ✅ RIDOTTO da 3px */
    transition: all 0.3s ease;
}

.timeline-item-compact:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(2px); /* ✅ RIDOTTO da 3px */
}

.timeline-item-compact.confirmed { border-left-color: #28a745; }
.timeline-item-compact.detected { border-left-color: #ff9800; }
.timeline-item-compact.unlinked { border-left-color: #6c757d; }
.timeline-item-compact.planned { border-left-color: #007bff; }

.timeline-date-compact {
    min-width: 55px; /* ✅ RIDOTTO da 60px */
    font-weight: 600;
    color: #fff;
    font-size: 0.8em; /* ✅ RIDOTTO da 0.85em */
}

.timeline-content-compact {
    flex: 1;
    margin: 0 8px; /* ✅ RIDOTTO da 10px */
}

.timeline-title-compact {
    color: #fff;
    font-weight: 500;
    font-size: 0.85em; /* ✅ RIDOTTO da 0.9em */
    margin-bottom: 2px; /* ✅ RIDOTTO da 3px */
}

.timeline-details-compact {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.7em; /* ✅ RIDOTTO da 0.75em */
}

.timeline-action-compact {
    display: flex;
    gap: 5px; /* ✅ RIDOTTO da 6px */
}

.btn-link-session-mini,
.btn-confirm-session-mini {
    padding: 5px 10px; /* ✅ RIDOTTO da 6px 12px */
    color: white;
    border: none;
    border-radius: 5px; /* ✅ RIDOTTO da 6px */
    font-size: 0.75em; /* ✅ RIDOTTO da 0.8em */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-link-session-mini {
    background: linear-gradient(135deg, #007bff, #0056b3);
}

.btn-link-session-mini:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(0, 123, 255, 0.4);
}

.btn-confirm-session-mini {
    background: linear-gradient(135deg, #28a745, #1e7e34);
}

.btn-confirm-session-mini:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(40, 167, 69, 0.4);
}

@media (max-width: 768px) {
    .timeline-item-compact {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px; /* ✅ RIDOTTO */
    }

    .timeline-action-compact {
        width: 100%;
    }

    .btn-link-session-mini,
    .btn-confirm-session-mini {
        flex: 1;
    }
}

/* ============================================================================
   PLAN STATUS - PAUSED STATE
   ============================================================================ */

.plan-card.paused {
  opacity: 0.85;
  filter: grayscale(0.3);
}

.plan-card.paused::before {
  background: linear-gradient(90deg, var(--warning), var(--danger));
}

.plan-progress.paused {
  opacity: 0.7;
}

.plan-progress.paused .progress-bar-fill {
  background: linear-gradient(90deg, var(--warning) 0%, var(--danger) 100%);
  animation: pausedPulse 2s ease-in-out infinite;
}

@keyframes pausedPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.plan-status.paused::after {
  content: ' (in pausa)';
  font-size: 0.75em;
  opacity: 0.8;
}

/* ============================================================================
   WIZARD MODAL - COMPACT
   ============================================================================ */

#wizardModal {
    display: none;
}

#wizardModal.active {
    display: flex !important;
}

.wizard-content {
    max-width: 900px;
    width: 100%;
}

.wizard-progress {
    margin-bottom: 30px; /* ✅ RIDOTTO da 40px */
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px; /* ✅ RIDOTTO da 20px */
    position: relative;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 20px; /* ✅ RIDOTTO da 24px */
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px; /* ✅ RIDOTTO da 10px */
    flex: 1;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 42px; /* ✅ RIDOTTO da 48px */
    height: 42px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 2px solid rgba(255, 255, 255, 0.1); /* ✅ RIDOTTO da 3px */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem; /* ✅ RIDOTTO da 1.1rem */
    color: var(--text-muted);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step.active .step-number {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-color: var(--primary);
    color: white;
    box-shadow: var(--glow-primary);
    transform: scale(1.12); /* ✅ RIDOTTO da 1.15 */
}

.step.completed .step-number {
    background: linear-gradient(135deg, var(--success) 0%, #00c48c 100%);
    border-color: var(--success);
    color: white;
}

.step.completed .step-number::after {
    content: '✓';
    position: absolute;
    font-size: 1.3rem; /* ✅ RIDOTTO da 1.5rem */
}

.step-label {
    font-size: 0.8rem; /* ✅ RIDOTTO da 0.85rem */
    color: var(--text-muted);
    text-align: center;
    font-weight: 600;
    transition: all 0.3s;
}

.step.active .step-label {
    color: var(--primary);
    font-weight: 700;
}

.step.completed .step-label {
    color: var(--success);
}

.progress-bar {
    width: 100%;
    height: 8px; /* ✅ RIDOTTO da 10px */
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px; /* ✅ RIDOTTO da 5px */
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================================
   WIZARD STEPS - COMPACT
   ============================================================================ */

.wizard-step {
    display: none;
    animation: stepFadeIn 0.5s ease-out;
}

.wizard-step.active {
    display: block;
}

@keyframes stepFadeIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

.wizard-step h2 {
    font-size: 1.75rem; /* ✅ RIDOTTO da 2rem */
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 24px; /* ✅ RIDOTTO da 30px */
    text-align: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.step-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1rem; /* ✅ RIDOTTO da 1.1rem */
    margin-bottom: 24px; /* ✅ RIDOTTO da 30px */
}

/* ============================================================================
   GOAL OPTIONS - COMPACT
   ============================================================================ */

.goal-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); /* ✅ RIDOTTO da 260px */
    gap: 16px; /* ✅ RIDOTTO da 20px */
    margin-bottom: 24px; /* ✅ RIDOTTO da 30px */
}

.goal-card {
    cursor: pointer;
}

.goal-card input[type="radio"] {
    display: none;
}

.goal-content {
    background: var(--bg-elevated);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px; /* ✅ RIDOTTO da 20px */
    padding: 24px 16px; /* ✅ RIDOTTO da 30px 20px */
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}

.goal-card:hover .goal-content {
    border-color: var(--primary);
    transform: translateY(-6px); /* ✅ RIDOTTO da -8px */
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.goal-card input:checked + .goal-content {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.15) 0%, var(--bg-elevated) 100%);
    box-shadow: var(--glow-primary);
    transform: scale(1.03); /* ✅ RIDOTTO da 1.05 */
}

.goal-icon {
    font-size: 3rem; /* ✅ RIDOTTO da 3.5rem */
    margin-bottom: 16px; /* ✅ RIDOTTO da 20px */
    filter: drop-shadow(0 4px 12px rgba(255, 107, 53, 0.4));
}

.goal-title {
    font-size: 1.1rem; /* ✅ RIDOTTO da 1.2rem */
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px; /* ✅ RIDOTTO da 10px */
}

.goal-desc {
    font-size: 0.85rem; /* ✅ RIDOTTO da 0.9rem */
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ============================================================================
   DURATION & FREQUENCY OPTIONS - COMPACT
   ============================================================================ */

.duration-options, .frequency-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); /* ✅ RIDOTTO da 160px */
    gap: 16px; /* ✅ RIDOTTO da 20px */
    margin-bottom: 24px; /* ✅ RIDOTTO da 30px */
}

.duration-card, .frequency-card {
    cursor: pointer;
}

.duration-card input, .frequency-card input {
    display: none;
}

.duration-content, .frequency-content {
    background: var(--bg-elevated);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px; /* ✅ RIDOTTO da 16px */
    padding: 20px 16px; /* ✅ RIDOTTO da 25px 20px */
    text-align: center;
    transition: all 0.3s;
}

.duration-card:hover .duration-content,
.frequency-card:hover .frequency-content {
    border-color: var(--primary);
    transform: translateY(-3px); /* ✅ RIDOTTO da -4px */
}

.duration-card input:checked + .duration-content,
.frequency-card input:checked + .frequency-content {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.15) 0%, var(--bg-elevated) 100%);
    box-shadow: var(--glow-primary);
    transform: scale(1.03); /* ✅ RIDOTTO da 1.05 */
}

.duration-weeks, .frequency-number {
    font-size: 2.2rem; /* ✅ RIDOTTO da 2.5rem */
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px; /* ✅ RIDOTTO da 10px */
}

.duration-label, .frequency-label {
    font-size: 0.95rem; /* ✅ RIDOTTO da 1rem */
    color: var(--text-secondary);
    font-weight: 600;
}

.frequency-note {
    margin-top: 8px; /* ✅ RIDOTTO da 10px */
    padding: 6px 12px; /* ✅ RIDOTTO da 8px 16px */
    border-radius: 10px; /* ✅ RIDOTTO da 12px */
    font-size: 0.8rem; /* ✅ RIDOTTO da 0.85rem */
    font-weight: 700;
}

/* ============================================================================
   DAYS OPTIONS - COMPACT
   ============================================================================ */

.days-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); /* ✅ RIDOTTO da 130px */
    gap: 12px; /* ✅ RIDOTTO da 15px */
    margin-bottom: 24px; /* ✅ RIDOTTO da 30px */
}

.day-card {
    cursor: pointer;
}

.day-card input {
    display: none;
}

.day-content {
    background: var(--bg-elevated);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px; /* ✅ RIDOTTO da 12px */
    padding: 14px 10px; /* ✅ RIDOTTO da 18px 12px */
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem; /* ✅ RIDOTTO da 1rem */
    transition: all 0.3s;
    color: var(--text-secondary);
}

.day-card:hover .day-content {
    border-color: var(--primary);
    transform: translateY(-3px); /* ✅ RIDOTTO da -4px */
}

.day-card input:checked + .day-content {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: var(--glow-primary);
    transform: scale(1.03); /* ✅ RIDOTTO da 1.05 */
}

/* ============================================================================
   FORM GROUPS - COMPACT
   ============================================================================ */

.form-group {
    margin-bottom: 24px; /* ✅ RIDOTTO da 30px */
}

.form-group label {
    display: block;
    margin-bottom: 10px; /* ✅ RIDOTTO da 12px */
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1rem; /* ✅ RIDOTTO da 1.1rem */
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    padding: 12px 16px; /* ✅ RIDOTTO da 16px 20px */
    background: var(--bg-elevated);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px; /* ✅ RIDOTTO da 12px */
    color: var(--text-primary);
    font-size: 0.95rem; /* ✅ RIDOTTO da 1rem */
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
}

.form-group small {
    display: block;
    margin-top: 6px; /* ✅ RIDOTTO da 8px */
    color: var(--text-muted);
    font-size: 0.8rem; /* ✅ RIDOTTO da 0.85rem */
}

/* ============================================================================
   BASELINE INFO - COMPACT
   ============================================================================ */

.baseline-info {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, rgba(0, 217, 255, 0.1) 100%);
    border-left: 3px solid var(--primary); /* ✅ RIDOTTO da 4px */
    padding: 20px; /* ✅ RIDOTTO da 25px */
    border-radius: 12px; /* ✅ RIDOTTO da 16px */
    margin-bottom: 24px; /* ✅ RIDOTTO da 30px */
}

.baseline-info h4 {
    color: var(--primary);
    margin-bottom: 16px; /* ✅ RIDOTTO da 20px */
    font-size: 1.2rem; /* ✅ RIDOTTO da 1.3rem */
    font-weight: 700;
}

.baseline-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); /* ✅ RIDOTTO da 150px */
    gap: 12px; /* ✅ RIDOTTO da 15px */
}

.baseline-stat {
    text-align: center;
    padding: 12px; /* ✅ RIDOTTO da 15px */
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px; /* ✅ RIDOTTO da 12px */
}

.baseline-stat-label {
    font-size: 0.8rem; /* ✅ RIDOTTO da 0.85rem */
    color: var(--text-secondary);
    display: block;
    margin-bottom: 6px; /* ✅ RIDOTTO da 8px */
    font-weight: 600;
}

.baseline-stat-value {
    font-size: 1.4rem; /* ✅ RIDOTTO da 1.6rem */
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================================================
   SUMMARY CONTENT - COMPACT
   ============================================================================ */

.summary-content {
    background: var(--bg-elevated);
    border-radius: 16px; /* ✅ RIDOTTO da 20px */
    padding: 24px; /* ✅ RIDOTTO da 30px */
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-section {
    margin-bottom: 24px; /* ✅ RIDOTTO da 30px */
    padding-bottom: 24px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.summary-content p,
.summary-content div {
    color: var(--text-primary) !important;
}

.summary-content strong {
    color: var(--text-primary) !important;
    font-weight: 700;
}

.summary-content .detail-label {
    color: var(--text-secondary);
}

.summary-content .detail-value {
    color: var(--text-primary) !important;
    font-weight: 600;
}

.summary-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.summary-section h3 {
    color: var(--primary);
    margin-bottom: 16px; /* ✅ RIDOTTO da 20px */
    font-size: 1.3rem; /* ✅ RIDOTTO da 1.4rem */
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px; /* ✅ RIDOTTO da 12px */
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0; /* ✅ RIDOTTO da 12px */
    color: var(--text-secondary);
    font-size: 0.95rem; /* ✅ RIDOTTO da 1rem */
}

.summary-row strong {
    color: var(--text-primary);
    font-weight: 700;
}

/* ============================================================================
   WIZARD NAVIGATION - COMPACT
   ============================================================================ */

.wizard-navigation {
    display: flex;
    justify-content: space-between;
    gap: 12px; /* ✅ RIDOTTO da 15px */
    margin-top: 30px; /* ✅ RIDOTTO da 40px */
    padding-top: 24px; /* ✅ RIDOTTO da 30px */
    border-top: 2px solid rgba(255, 255, 255, 0.1);
}

#prevBtn, #nextBtn {
    flex: 1;
    max-width: 180px; /* ✅ RIDOTTO da 200px */
}

#nextBtn {
    margin-left: auto;
}

/* ============================================================================
   VALIDATION MESSAGE - COMPACT
   ============================================================================ */

.validation-message {
    display: none;
    background: rgba(255, 0, 110, 0.15);
    border-left: 3px solid var(--danger); /* ✅ RIDOTTO da 4px */
    padding: 12px 16px; /* ✅ RIDOTTO da 15px 20px */
    border-radius: 10px; /* ✅ RIDOTTO da 12px */
    color: var(--danger);
    margin-top: 16px; /* ✅ RIDOTTO da 20px */
    font-weight: 600;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* ============================================================================
   LOADING MODAL - COMPACT
   ============================================================================ */

.loading-modal {
    display: none;
}

.loading-modal.active {
    display: flex !important;
}

.loading-modal .modal-content {
    max-width: 450px; /* ✅ RIDOTTO da 500px */
    text-align: center;
    padding: 50px 30px; /* ✅ RIDOTTO da 60px 40px */
}

.spinner {
    width: 70px; /* ✅ RIDOTTO da 80px */
    height: 70px;
    border: 5px solid rgba(255, 255, 255, 0.1); /* ✅ RIDOTTO da 6px */
    border-top-color: var(--primary);
    border-right-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 24px; /* ✅ RIDOTTO da 30px */
    box-shadow: 0 0 30px rgba(255, 107, 53, 0.5);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-content h3 {
    color: var(--primary);
    margin-bottom: 12px; /* ✅ RIDOTTO da 15px */
    font-size: 1.4rem; /* ✅ RIDOTTO da 1.5rem */
    font-weight: 700;
}

.loading-content p {
    color: var(--text-secondary);
    font-size: 1rem; /* ✅ RIDOTTO da 1.1rem */
}

/* ============================================================================
   PLANS HISTORY - COMPACT
   ============================================================================ */

.plans-history-section {
    animation: fadeIn 0.6s ease-out 0.3s both;
    margin-top: 40px; /* ✅ RIDOTTO da 60px */
}

.plans-list {
    display: grid;
    gap: 16px; /* ✅ RIDOTTO da 20px */
}

/* ============================================================================
   RESPONSIVE MOBILE - COMPACT
   ============================================================================ */

@media (max-width: 768px) {
    .wizard-content {
        padding: 16px; /* ✅ RIDOTTO */
    }

    .wizard-step h2 {
        font-size: 1.4rem; /* ✅ RIDOTTO */
    }

    .goal-options,
    .duration-options,
    .frequency-options {
        grid-template-columns: 1fr;
    }

    .days-options {
        grid-template-columns: repeat(2, 1fr);
    }

    .progress-steps {
        gap: 6px; /* ✅ RIDOTTO */
    }

    .step-label {
        font-size: 0.7rem; /* ✅ RIDOTTO */
    }

    .step-number {
        width: 36px; /* ✅ RIDOTTO */
        height: 36px;
        font-size: 0.95rem; /* ✅ RIDOTTO */
    }

    .baseline-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .wizard-navigation {
        flex-direction: column-reverse;
    }

    .wizard-navigation button {
        width: 100%;
        max-width: 100%;
    }

    .modal-content {
        padding: 24px 16px; /* ✅ RIDOTTO */
        max-width: 95%;
    }
}

@media (max-width: 480px) {
    .wizard-step h2 {
        font-size: 1.2rem; /* ✅ RIDOTTO */
    }

    .goal-icon {
        font-size: 2.2rem; /* ✅ RIDOTTO */
    }

    .duration-weeks, .frequency-number {
        font-size: 1.8rem; /* ✅ RIDOTTO */
    }

    .baseline-stats {
        grid-template-columns: 1fr;
    }
}

/* ============================================================================
   WIZARD TEXT FIX - TESTO BIANCO FORZATO
   ============================================================================ */

/* FORZA BIANCO SU TUTTO IL WIZARD */
#wizardModal *:not(.progress-bar):not(.progress-bar-fill):not(.badge):not(.step-number) {
    color: rgba(255, 255, 255, 0.95) !important;
}

#wizardModal h1,
#wizardModal h2,
#wizardModal h3,
#wizardModal h4,
#wizardModal h5,
#wizardModal h6 {
    color: var(--text-primary) !important;
}

#wizardModal p,
#wizardModal div,
#wizardModal span,
#wizardModal label,
#wizardModal li,
#wizardModal td,
#wizardModal th {
    color: rgba(255, 255, 255, 0.95) !important;
}

/* Wizard steps */
.wizard-step p,
.wizard-step div,
.wizard-step span,
.wizard-step label {
    color: rgba(255, 255, 255, 0.95) !important;
}

/* Baseline info */
.baseline-info,
.baseline-info *,
.baseline-info p,
.baseline-info div {
    color: rgba(255, 255, 255, 0.95) !important;
}

.baseline-info h4 {
    color: var(--primary) !important;
}

/* Summary content */
.summary-content,
.summary-content *,
.summary-content p,
.summary-content div,
.summary-content span {
    color: rgba(255, 255, 255, 0.95) !important;
}

.summary-content h3 {
    color: var(--primary) !important;
}

/* Form groups */
.form-group label,
.form-group small,
.form-group p {
    color: rgba(255, 255, 255, 0.95) !important;
}

/* Goal cards */
.goal-title,
.goal-desc {
    color: rgba(255, 255, 255, 0.95) !important;
}

/* Duration/Frequency labels */
.duration-label,
.frequency-label,
.duration-weeks,
.frequency-number {
    color: rgba(255, 255, 255, 0.95) !important;
}

/* Days */
.day-content {
    color: rgba(255, 255, 255, 0.8) !important;
}

.day-card input:checked + .day-content {
    color: white !important;
}

/* Step subtitle */
.step-subtitle {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Validation messages */
.validation-message {
    color: var(--danger) !important;
}

/* FORZA BIANCO ANCHE NELLE CARD DEL PIANO */
.plan-card,
.plan-card *,
.plan-card p,
.plan-card div:not(.progress-bar-fill),
.plan-card span {
    color: rgba(255, 255, 255, 0.95) !important;
}

.plan-title {
    background: linear-gradient(135deg, var(--primary), var(--primary-light)) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

.plan-goal {
    color: rgba(255, 255, 255, 0.85) !important;
}

.plan-description {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* FORZA BIANCO NEL PLAN DETAIL MODAL */
.plan-detail-section,
.plan-detail-section *,
.plan-detail-section p,
.plan-detail-section div:not(.progress-bar-fill),
.plan-detail-section span {
    color: rgba(255, 255, 255, 0.95) !important;
}

.plan-detail-section h3 {
    color: var(--text-primary) !important;
}

/* Session details */
.session-details,
.session-details strong,
.session-day,
.session-date,
.session-drills,
.session-drills li {
    color: rgba(255, 255, 255, 0.95) !important;
}

/* Timeline */
.timeline-title,
.timeline-date,
.timeline-details {
    color: rgba(255, 255, 255, 0.95) !important;
}

/* Meta labels e values */
.meta-label {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Detected sessions */
.detected-session-card,
.detected-session-card *,
.session-info,
.session-info * {
    color: rgba(255, 255, 255, 0.95) !important;
}

.session-date {
    color: var(--primary) !important;
}

/* CTA Section */
.cta-content p {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* IMPORTANTE: Sovrascrivi qualsiasi inline style */
[style*="color"] {
    color: rgba(255, 255, 255, 0.95) !important;
}
/* ============================================================================
   TIMELINE MISTA 2-3 - STILI AGGIUNTIVI
   ============================================================================ */

/* Sessione completata (verde) */
.timeline-item-compact.confirmed {
    border-left-color: #28a745 !important;
    background: rgba(40, 167, 69, 0.08) !important;
}

.timeline-item-compact.confirmed:hover {
    background: rgba(40, 167, 69, 0.15) !important;
}

/* Sessione futura (blu) */
.timeline-item-compact.planned {
    border-left-color: #007bff !important;
    background: rgba(0, 123, 255, 0.08) !important;
}

.timeline-item-compact.planned:hover {
    background: rgba(0, 123, 255, 0.15) !important;
}

/* PROSSIMA SESSIONE - EVIDENZIATA */
.timeline-item-compact.next-session {
    border-left-width: 4px !important;
    border-left-color: var(--primary) !important;
    background: linear-gradient(90deg, rgba(255, 107, 53, 0.15) 0%, rgba(0, 123, 255, 0.08) 100%) !important;
    position: relative;
    animation: nextSessionPulse 3s ease-in-out infinite;
}

@keyframes nextSessionPulse {
    0%, 100% {
        box-shadow: 0 0 0 rgba(255, 107, 53, 0.4);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 107, 53, 0.6);
    }
}

.timeline-item-compact.next-session::after {
    content: '→ PROSSIMA';
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, var(--primary), var(--danger));
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.4);
}

.timeline-item-compact.next-session:hover {
    background: linear-gradient(90deg, rgba(255, 107, 53, 0.2) 0%, rgba(0, 123, 255, 0.12) 100%) !important;
    transform: translateX(4px) scale(1.02);
}

/* Separatore OGGI */
.today-separator {
    text-align: center;
    padding: 16px 0;
    margin: 12px 0;
    position: relative;
}

.today-separator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.today-separator span {
    position: relative;
    background: var(--bg-card);
    padding: 0 20px;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Countdown badge */
.timeline-title-compact span[style*="accent"] {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(0, 217, 255, 0.15);
    border-radius: 8px;
    font-weight: 700;
}

/* Bottoni azione nella timeline */
.timeline-action-compact .btn-link-session-mini {
    padding: 5px 10px;
    font-size: 0.85rem;
    min-width: 35px;
}

/* Vista vuota */
.timeline-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.timeline-empty::before {
    content: '📅';
    display: block;
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
    .timeline-item-compact.next-session::after {
        display: none; /* Nasconde badge PROSSIMA su mobile */
    }

    .today-separator span {
        font-size: 0.8rem;
        padding: 0 12px;
    }
}