/* =========================================================
   CALENDARIO LUNARE PURO 12026 HE
   Calendar View Styles — calendar.css
   ========================================================= */

/* Hero Banner & Moon Navigator */
.calendar-hero {
  margin-bottom: 1.5rem;
}

.calendar-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.season-selector {
  display: flex;
  justify-content: flex-start;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.btn-goto-today {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.18) 0%, rgba(212, 175, 55, 0.08) 100%);
  border: 1px solid var(--gold-primary);
  border-radius: var(--radius-full);
  padding: 0.45rem 0.95rem;
  color: var(--gold-light);
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 10px rgba(212, 175, 55, 0.2);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-goto-today:hover {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.35) 0%, rgba(212, 175, 55, 0.2) 100%);
  border-color: #ffe082;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.4);
  transform: translateY(-1px) scale(1.02);
  color: #ffffff;
}

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

.goto-today-icon {
  font-size: 1rem;
}

.goto-today-badge {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(212, 175, 55, 0.4);
  padding: 0.1rem 0.45rem;
  border-radius: 10px;
  font-size: 0.75rem;
  color: #ffe082;
  font-weight: 700;
}

.season-btn {
  background: rgba(14, 21, 31, 0.7);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.season-btn[data-season="primavera"]:hover, .season-btn[data-season="primavera"].active {
  color: #fff;
  background: rgba(76, 175, 80, 0.25);
  border-color: var(--primavera-color);
  box-shadow: 0 0 12px rgba(76, 175, 80, 0.3);
}

.season-btn[data-season="dovizia"]:hover, .season-btn[data-season="dovizia"].active {
  color: #fff;
  background: rgba(251, 192, 45, 0.25);
  border-color: var(--dovizia-color);
  box-shadow: 0 0 12px rgba(251, 192, 45, 0.3);
}

.season-btn[data-season="inverno"]:hover, .season-btn[data-season="inverno"].active {
  color: #fff;
  background: rgba(100, 181, 246, 0.25);
  border-color: var(--inverno-color);
  box-shadow: 0 0 12px rgba(100, 181, 246, 0.3);
}

.season-btn[data-season="liminale"]:hover, .season-btn[data-season="liminale"].active {
  color: #fff;
  background: rgba(171, 71, 188, 0.25);
  border-color: var(--liminale-color);
  box-shadow: 0 0 12px rgba(171, 71, 188, 0.3);
}

/* Moon Strip Carousel */
.moon-strip {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding: 0.5rem 0.2rem 1rem 0.2rem;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-dark) transparent;
}

.moon-strip::-webkit-scrollbar {
  height: 6px;
}
.moon-strip::-webkit-scrollbar-thumb {
  background: var(--gold-dark);
  border-radius: 4px;
}

.moon-card-btn {
  flex: 0 0 auto;
  min-width: 140px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.85rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  color: inherit;
}

.moon-card-btn:hover {
  border-color: var(--gold-primary);
  transform: translateY(-2px);
  background: var(--bg-card-hover);
}

.moon-card-btn.active {
  border-color: var(--gold-light);
  background: linear-gradient(145deg, rgba(26, 38, 54, 0.95), rgba(40, 30, 15, 0.9));
  box-shadow: 0 0 18px var(--gold-glow);
}

.moon-card-btn .moon-num {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.moon-card-btn .moon-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold-light);
  margin: 0.2rem 0;
}

.moon-card-btn .moon-greg-span {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* Active Moon Header Banner */
.active-moon-banner {
  background: linear-gradient(135deg, #111822 0%, #1c2738 50%, #151d27 100%);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.25rem;
  margin-bottom: 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.active-moon-banner::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
}

.moon-banner-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.nav-arrow-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--gold-light);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 1.2rem;
}

.nav-arrow-btn:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--gold-primary);
  transform: scale(1.08);
}

.moon-banner-title h2 {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--gold-light);
  text-shadow: 0 0 12px rgba(212, 175, 55, 0.3);
}

.moon-banner-season-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.2rem 0.75rem;
  border-radius: var(--radius-full);
  margin-top: 0.3rem;
  letter-spacing: 0.5px;
}

.season-badge-primavera { background: rgba(76, 175, 80, 0.2); color: var(--primavera-color); border: 1px solid var(--primavera-color); }
.season-badge-dovizia { background: rgba(251, 192, 45, 0.2); color: var(--dovizia-color); border: 1px solid var(--dovizia-color); }
.season-badge-inverno { background: rgba(100, 181, 246, 0.2); color: var(--inverno-color); border: 1px solid var(--inverno-color); }
.season-badge-liminale { background: rgba(171, 71, 188, 0.2); color: var(--liminale-color); border: 1px solid var(--liminale-color); }

.moon-banner-quote {
  font-style: italic;
  font-size: 0.92rem;
  color: #cfd9e5;
  margin-top: 0.5rem;
}

/* Quarters Legend */
.quarters-legend {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  font-size: 0.78rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-secondary);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.legend-dot.q1 { background: #43a047; box-shadow: 0 0 6px #43a047; }
.legend-dot.q2 { background: #fbc02d; box-shadow: 0 0 6px #fbc02d; }
.legend-dot.q3 { background: #1e88e5; box-shadow: 0 0 6px #1e88e5; }
.legend-dot.q4 { background: #8e24aa; box-shadow: 0 0 6px #8e24aa; }
.legend-dot.reset { background: #616161; }

/* Calendar 28-Day Grid */
.calendar-table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  box-shadow: var(--shadow-md);
  -webkit-overflow-scrolling: touch;
}

.calendar-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 820px;
}

.calendar-table th {
  background: #151f2c;
  color: var(--gold-light);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--border-glass);
  white-space: nowrap;
}

.calendar-table td {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.88rem;
  vertical-align: middle;
  transition: background-color var(--transition-fast);
}

.calendar-row {
  cursor: pointer;
}

.calendar-row:hover td {
  filter: brightness(1.2);
}

/* Quarters Row Tinting */
.row-q1 { background: var(--q1-semina-bg); }
.row-q2 { background: var(--q2-azione-bg); }
.row-q3 { background: var(--q3-apice-bg); }
.row-q4 { background: var(--q4-detox-bg); }
.row-reset { background: var(--reset-bg); }

/* Today Row Styling & Pulsing Highlight */
.calendar-row.is-today-row {
  position: relative;
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.22) 0%, rgba(212, 175, 55, 0.08) 40%, rgba(255, 255, 255, 0.02) 100%) !important;
  border-left: 4px solid var(--gold-primary) !important;
}

.calendar-row.is-today-row td {
  border-bottom: 1px solid rgba(212, 175, 55, 0.3) !important;
  color: #ffffff;
}

.calendar-row.is-today-row .weekday-cell {
  font-weight: 700;
  color: var(--gold-light);
}

.today-tag-badge {
  display: inline-block;
  background: var(--gold-gradient);
  color: #080c14;
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 0.3rem;
  letter-spacing: 0.6px;
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
  vertical-align: middle;
}

/* Animazione di messa in primo piano al click di 'Vai a Oggi' */
@keyframes todayRowPulse {
  0% {
    background-color: rgba(212, 175, 55, 0.65) !important;
    box-shadow: inset 0 0 25px rgba(212, 175, 55, 0.9), 0 0 20px rgba(212, 175, 55, 0.7);
    transform: scale(1.008);
  }
  30% {
    background-color: rgba(255, 215, 0, 0.5) !important;
    box-shadow: inset 0 0 35px rgba(255, 215, 0, 0.95), 0 0 30px rgba(255, 215, 0, 0.8);
    transform: scale(1.01);
  }
  70% {
    background-color: rgba(212, 175, 55, 0.3) !important;
    box-shadow: inset 0 0 20px rgba(212, 175, 55, 0.5), 0 0 15px rgba(212, 175, 55, 0.4);
    transform: scale(1);
  }
  100% {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.22) 0%, rgba(212, 175, 55, 0.08) 40%, rgba(255, 255, 255, 0.02) 100%) !important;
    box-shadow: none;
    transform: scale(1);
  }
}

.calendar-row.today-pulse-highlight {
  animation: todayRowPulse 3.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  z-index: 10;
}

/* Day Number / Età & Phase Badges */
.day-num-cell {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.05rem;
  text-align: center;
  width: 55px;
  color: var(--text-primary);
}

.weekday-cell {
  font-family: var(--font-display);
  font-weight: 500;
  white-space: nowrap;
  color: var(--text-primary);
}

.phase-cell {
  font-weight: 600;
  white-space: nowrap;
}

.phase-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(212, 175, 55, 0.25);
  color: var(--gold-light);
}

.phase-pct {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #cfd9e5;
}

/* Gregorian Date & Red Days */
.greg-date-cell {
  font-family: var(--font-display);
  font-weight: 500;
  white-space: nowrap;
}

.red-text,
.greg-red-day {
  color: #ff6b6b !important;
  font-weight: 700;
}

.astro-cell {
  color: var(--gold-light);
  font-size: 0.82rem;
}

.astro-tag {
  display: inline-block;
  background: rgba(100, 181, 246, 0.12);
  border: 1px solid rgba(100, 181, 246, 0.3);
  color: #90caf9;
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
  font-size: 0.8rem;
  transition: all var(--transition-fast);
}

.clickable-event-tag {
  cursor: pointer;
}

.astro-tag.clickable-event-tag:hover {
  background: rgba(100, 181, 246, 0.28);
  border-color: #64b5f6;
  box-shadow: 0 0 10px rgba(100, 181, 246, 0.5);
  transform: translateY(-1px);
  color: #ffffff;
}

.ancient-rites-cell {
  font-size: 0.82rem;
}

.ancient-rite-tag {
  display: inline-block;
  background: rgba(186, 104, 200, 0.12);
  border: 1px solid rgba(186, 104, 200, 0.3);
  color: #e1bee7;
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
  font-size: 0.8rem;
  line-height: 1.3;
  transition: all var(--transition-fast);
}

.ancient-rite-tag.clickable-event-tag:hover {
  background: rgba(186, 104, 200, 0.3);
  border-color: #ba68c8;
  box-shadow: 0 0 10px rgba(186, 104, 200, 0.5);
  transform: translateY(-1px);
  color: #ffffff;
}

.holiday-cell {
  font-size: 0.82rem;
}

.holiday-tag {
  display: inline-block;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.22);
  color: var(--gold-light);
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
  font-size: 0.8rem;
  line-height: 1.3;
}

.holiday-official .holiday-tag {
  background: rgba(255, 107, 107, 0.12);
  border: 1px solid #ff6b6b;
  color: #ff8a80;
  font-weight: 600;
}

/* User Note Indicator Dot */
.note-indicator {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold-light);
  box-shadow: 0 0 6px var(--gold-primary);
  margin-left: 0.4rem;
}

/* Reset Day Styles */
.row-reset td {
  color: #e0e0e0;
}
.row-reset .day-num-cell {
  color: #ff9800;
}
.row-reset .red-text,
.row-reset .greg-red-day {
  color: #ff8a80 !important;
}

/* Responsive Table */
@media (max-width: 768px) {
  .calendar-table th, .calendar-table td {
    padding: 0.55rem 0.45rem;
    font-size: 0.78rem;
  }

  .moon-banner-title h2 {
    font-size: 1.15rem;
  }
}

/* =========================================================
   BIORITMO & BUSSOLA DELLE DECISIONI (LA SCATOLA DELLE EMOZIONI)
   ========================================================= */

/* Quick Check-in Bar in Calendar */
.quick-checkin-bar {
  margin-bottom: 1.25rem;
}

.quick-checkin-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.12) 0%, rgba(26, 38, 57, 0.6) 100%);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.quick-checkin-btn:hover {
  border-color: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.2);
}

.quick-checkin-arrow {
  color: var(--gold-light);
  font-weight: 600;
}

.row-mood-badge {
  display: inline-block;
  font-size: 0.85rem;
  margin-left: 0.3rem;
  vertical-align: middle;
}

/* Biorhythm Header Card */
.biorhythm-header-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
}

.biorhythm-header-title h2 {
  font-family: var(--font-serif);
  color: var(--gold-light);
  font-size: 1.6rem;
  margin: 0.35rem 0 0.5rem;
}

.biorhythm-pill {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.2rem 0.6rem;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: var(--radius-full);
  color: var(--gold-light);
}

.biorhythm-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 700px;
}

.today-lunar-badge {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: rgba(10, 14, 22, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  white-space: nowrap;
}

.badge-phase {
  font-size: 2rem;
}

.badge-text {
  display: flex;
  flex-direction: column;
}

.badge-text strong {
  font-family: var(--font-display);
  color: var(--text-primary);
  font-size: 0.95rem;
}

.badge-text span {
  font-size: 0.8rem;
  color: var(--gold-light);
}

/* Emotion Box (La Scatola delle Emozioni) */
.emotion-box-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
}

.emotion-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1rem;
}

.period-switcher {
  display: flex;
  gap: 0.5rem;
}

.period-tab-btn {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.period-tab-btn.active {
  background: var(--gold-primary);
  color: #090d13;
  font-weight: 700;
  border-color: var(--gold-primary);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

.period-status-tag {
  font-size: 0.82rem;
  color: var(--gold-light);
}

/* Griglia Archetipi Emotivi (Layout 4x2 Bilanciato) */
.mood-archetypes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.archetype-tile {
  background: rgba(26, 38, 57, 0.45);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 0.75rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  user-select: none;
}

.archetype-tile:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--gold-light);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.archetype-tile.selected {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.25) 0%, rgba(26, 38, 57, 0.8) 100%);
  border: 2px solid var(--gold-primary);
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.4);
  transform: translateY(-2px);
}

.tile-icon {
  font-size: 2.2rem;
  margin-bottom: 0.4rem;
  transition: transform var(--transition-fast);
}

.archetype-tile:hover .tile-icon {
  transform: scale(1.15);
}

.tile-label {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.tile-desc {
  font-size: 0.7rem;
  color: var(--text-secondary);
  line-height: 1.25;
}

/* Check-in Form Inputs */
.checkin-details-form {
  background: rgba(10, 14, 22, 0.45);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  border: 1px solid var(--border-glass);
}

.form-row {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.flex-1 { flex: 1; }

.energy-slider-wrapper {
  margin-top: 0.5rem;
}

.energy-slider {
  width: 100%;
  accent-color: var(--gold-primary);
  cursor: pointer;
}

.energy-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: 0.35rem;
}

.save-feedback {
  margin-left: 1rem;
  font-size: 0.85rem;
  color: var(--gold-light);
  font-weight: 600;
  animation: fadeIn 0.3s ease;
}

/* Decision Compass Card */
.decision-compass-grid {
  margin-bottom: 1.5rem;
}

.decision-compass-card {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(26, 38, 57, 0.7) 0%, rgba(15, 23, 42, 0.85) 100%);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.compass-icon {
  font-size: 2.5rem;
  align-self: flex-start;
}

.compass-content {
  flex: 1;
}

.compass-content h3 {
  font-family: var(--font-serif);
  color: var(--gold-light);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.compass-advice {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.compass-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
}

.stat-box {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: rgba(10, 14, 22, 0.5);
  display: flex;
  flex-direction: column;
}

.stat-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.stat-box strong {
  font-family: var(--font-display);
  font-size: 0.95rem;
}

.stat-box.favorable strong { color: #81c784; }
.stat-box.caution strong { color: #ffb74d; }
.stat-box.total strong { color: var(--gold-light); }

/* Weeks Energy Map */
.weeks-energy-map-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

.weeks-energy-map-card h3 {
  font-family: var(--font-serif);
  color: var(--gold-light);
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.section-subtext {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.weeks-progress-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.week-energy-row {
  display: grid;
  grid-template-columns: 200px 1fr 160px;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0.75rem;
  background: rgba(10, 14, 22, 0.35);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
}

.week-name-col {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.week-bar-col {
  width: 100%;
}

.progress-track {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-fill.q1-color { background: linear-gradient(90deg, #4caf50, #81c784); }
.progress-fill.q2-color { background: linear-gradient(90deg, #fbc02d, #fff176); }
.progress-fill.q3-color { background: linear-gradient(90deg, #1e88e5, #64b5f6); }
.progress-fill.q4-color { background: linear-gradient(90deg, #8e24aa, #ba68c8); }
.progress-fill.reset-color { background: linear-gradient(90deg, #ff9800, #ffb74d); }

.week-stats-col {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  font-size: 0.82rem;
}

.energy-score {
  font-weight: 700;
  color: var(--text-primary);
}

.top-mood-badge {
  font-size: 1.1rem;
}

.checkin-count {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* Modal Check-in Section Styles */
.modal-checkin-section {
  background: rgba(10, 14, 22, 0.5);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  margin-bottom: 0.75rem;
}

.modal-checkins-dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.modal-checkin-box {
  background: rgba(26, 38, 57, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.65rem;
}

.checkin-box-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  margin-bottom: 0.4rem;
}

.mini-archetypes-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.mini-mood-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  font-size: 1rem;
  padding: 0.15rem 0.35rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.mini-mood-btn:hover {
  transform: scale(1.2);
  border-color: var(--gold-light);
}

.mini-mood-btn.active {
  background: rgba(212, 175, 55, 0.3);
  border-color: var(--gold-primary);
  box-shadow: 0 0 6px rgba(212, 175, 55, 0.5);
  transform: scale(1.15);
}

@media (max-width: 768px) {
  .biorhythm-header-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .mood-archetypes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .form-row {
    flex-direction: column;
  }
  .week-energy-row {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
  .modal-checkins-dual-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   BARRA SELEZIONE DATA RETROATTIVA
   ========================================================= */
.checkin-date-picker-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 17, 30, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.65rem 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.date-preset-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.date-preset-btn {
  background: rgba(26, 38, 57, 0.7);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: 20px;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.date-preset-btn:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold-light);
  color: var(--gold-light);
}

.date-preset-btn.active {
  background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold-primary) 100%);
  border-color: var(--gold-light);
  color: var(--night-deep);
  font-weight: 700;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

.custom-date-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.date-input-sm {
  padding: 0.3rem 0.6rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
  background: rgba(18, 28, 45, 0.8);
  border: 1px solid var(--border-subtle);
  color: var(--gold-light);
}

/* =========================================================
   ERBARIO SPONTANEO DELLA LUNA
   ========================================================= */
.wild-plants-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-card);
}

.wild-plants-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.wild-plants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.plant-card {
  background: rgba(13, 22, 38, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-fast);
}

.plant-card:hover {
  border-color: rgba(46, 204, 113, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.plant-card-head h4 {
  margin: 0;
  font-size: 1.05rem;
  color: #a8e6cf;
}

.plant-latin {
  font-size: 0.8rem;
  color: var(--gold-light);
  display: block;
  margin-bottom: 0.75rem;
}

.plant-card-body {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.plant-card-body strong {
  color: var(--text-primary);
}

.plant-card-actions {
  display: flex;
  justify-content: flex-end;
}

.plant-action-btn {
  background: rgba(46, 204, 113, 0.1);
  border: 1px solid rgba(46, 204, 113, 0.3);
  color: #a8e6cf;
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.75rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.plant-action-btn:hover {
  background: rgba(46, 204, 113, 0.25);
  border-color: #2ecc71;
}

/* =========================================================
   DIARIO CRONOLOGICO & STORICO CHECK-IN
   ========================================================= */
.history-entries-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-card);
}

.history-card-header {
  margin-bottom: 1.25rem;
}

.history-list-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.history-item-row {
  display: grid;
  grid-template-columns: 180px 240px 1fr auto;
  align-items: center;
  gap: 1rem;
  background: rgba(13, 22, 38, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  transition: all var(--transition-fast);
}

.history-item-row:hover {
  background: rgba(26, 38, 57, 0.7);
  border-color: var(--gold-primary);
}

.history-item-date {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.history-phase-icon {
  font-size: 1.4rem;
}

.history-greg-date {
  font-size: 0.76rem;
  color: var(--text-secondary);
  display: block;
}

.history-item-checkins {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.history-checkin-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
}

.history-checkin-pill.morning {
  background: rgba(230, 126, 34, 0.15);
  border: 1px solid rgba(230, 126, 34, 0.3);
  color: #f39c12;
}

.history-checkin-pill.evening {
  background: rgba(52, 152, 219, 0.15);
  border: 1px solid rgba(52, 152, 219, 0.3);
  color: #70a1ff;
}

.history-energy-tag {
  font-weight: 700;
}

.history-empty-period {
  font-size: 0.75rem;
  color: var(--text-disabled);
  padding-left: 0.4rem;
}

.history-item-notes {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.history-event-tag {
  display: inline-block;
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-light);
  border-radius: var(--radius-sm);
  padding: 0.15rem 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.history-note-preview {
  margin: 0.2rem 0;
  font-style: italic;
}

.decision-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 12px;
  margin-top: 0.25rem;
}

.decision-badge.favorable {
  background: rgba(46, 204, 113, 0.2);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.4);
}

.decision-badge.caution {
  background: rgba(231, 76, 60, 0.2);
  color: #e74c3c;
  border: 1px solid rgba(231, 76, 60, 0.4);
}

.empty-history-box {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-secondary);
}

@media (max-width: 900px) {
  .history-item-row {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }
}

/* =========================================================
   SCHEDE DI DETTAGLIO NODI ASTRONOMICI & RITI
   ========================================================= */
.astro-detail-block {
  background: rgba(13, 22, 38, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  margin-top: 0.75rem;
}

.astro-detail-block h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
}

.modal-event-clickable {
  transition: all var(--transition-fast);
}

.modal-event-clickable:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

@media (max-width: 680px) {
  .calendar-top-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }
  .season-selector {
    justify-content: center;
  }
  .btn-goto-today {
    justify-content: center;
    width: 100%;
  }
}


