:root {
  --bg: #121212;
  --card: #1f1f1f;
  --text: #e0e0e0;
  --header: #0d47a1;
  --accent: #4fc3f7;
  --good: #388e3c; /* verde soft */
  --ok: #fbc02d; /* giallo soft */
  --bad: #d32f2f; /* rosso soft */
  --day: #4fc3f7;
  --night: #757575;
}

/* Corpo principale */
body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* Header */
header {
  background: var(--header);
  padding: 1rem;
  text-align: center;
  font-weight: 600;
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 16px;
}

/* Badge giornaliero professionale */
.badge {
  margin: 0 1rem 1rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  text-align: center;
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.badge.good {
  background: rgba(56, 142, 60, 0.85);
}
.badge.bad {
  background: rgba(211, 47, 47, 0.85);
}

/* Card giorno */
.card {
  background: var(--card);
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
.card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
}

/* Fasce orarie professionali */
.slot {
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  margin-bottom: 0.4rem;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-left: 4px solid transparent;
  transition: background 0.2s ease;
}
.slot.good {
  border-color: var(--good);
  background: rgba(56, 142, 60, 0.08);
}
.slot.ok {
  border-color: var(--ok);
  background: rgba(251, 192, 42, 0.08);
}
.slot.bad {
  border-color: var(--bad);
  background: rgba(211, 47, 47, 0.08);
}

/* Giorno/notte con badge discreto */
.slot.day::before {
  content: "☀";
  margin-right: 0.3rem;
}
.slot.night::before {
  content: "🌙";
  margin-right: 0.3rem;
  opacity: 0.7;
}

/* Header slot e range ore */
.slot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
}
.slot-time {
  font-weight: 600;
  font-size: 1.3rem;
  margin-block: 4px;
}

/* Pulsante “Perché?” */
.why-btn {
  background: none;
  border: 1px solid #888;
  color: var(--text);
  border-radius: 8px;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  cursor: pointer;
}

/* Tooltip */
.tooltip {
  margin-top: 0.4rem;
  padding: 0.5rem;
  background: #2a2a2a;
  border-radius: 8px;
  font-size: 0.8rem;
  line-height: 1.3;
}
.hidden {
  display: none;
}

/* Legenda */
.legend {
  display: flex;
  justify-content: space-around;
  margin: 0 1rem 1rem;
  font-size: 0.85rem;
  opacity: 0.85;
}
.legend div {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot.good {
  background: var(--good);
}
.dot.ok {
  background: var(--ok);
}
.dot.bad {
  background: var(--bad);
}
.toggle{margin: 16px;}