/* ── Color tokens ──
   Primary:  #F97316 (orange-500)  → main accent
   Dark:     #C2410C (orange-700)  → hover / dark states
   Deeper:   #7C2D12 (orange-900)  → fasting banner bg
   Light:    #FFF7ED (orange-50)   → tinted backgrounds
   Success:  #10B981 (emerald-500) → on-target
   Warning:  #F59E0B (amber-500)   → slightly off
   Danger:   #F43F5E (rose-500)    → off-target
*/

/* Card styles */
.card {
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  padding: 1rem;
}

.card-inner {
  border-radius: 12px;
}

.pill {
  border-radius: 999px;
}

/* Day counter hero */
.day-number {
  font-size: clamp(72px, 20vw, 96px);
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, #F97316, #C2410C);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Progress bar */
.progress-bar {
  height: 6px;
  border-radius: 999px;
  background: #E5E7EB;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #F97316, #C2410C);
  transition: width 0.5s ease;
}

/* Metric cards */
.metric-card {
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  text-align: center;
}

/* Heatmap */
.heatmap-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
}

.heatmap-dot.complete { background: #F97316; color: white; }
.heatmap-dot.partial  { background: #FDBA74; color: #7C2D12; }
.heatmap-dot.missed   { background: #F43F5E; color: white; }
.heatmap-dot.future   { background: #E5E7EB; color: #9CA3AF; }

/* Fasting banner */
.fasting-banner-closed {
  background: linear-gradient(135deg, #7C2D12, #431407);
  color: white;
}

.fasting-banner-open {
  background: white;
  border: 2px solid #10B981;
}

/* Intensity badges */
.badge-easy     { background: #D1FAE5; color: #065F46; }
.badge-moderate { background: #FFEDD5; color: #7C2D12; }
.badge-hard     { background: #FFE4E6; color: #9F1239; }

/* Segmented control */
.seg-control {
  display: flex;
  gap: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #E5E7EB;
}

.seg-control label {
  flex: 1;
  text-align: center;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  background: white;
  color: #6B7280;
}

.seg-control input[type="radio"] {
  display: none;
}

.seg-control input[type="radio"]:checked + label,
.seg-control label:has(input[type="radio"]:checked) {
  background: #F97316;
  color: white;
}

/* Form inputs */
input[type="number"],
input[type="text"],
input[type="date"],
input[type="time"],
select,
textarea {
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 0.625rem 0.875rem;
  font-size: 15px;
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
  background: white;
}

input:focus, select:focus, textarea:focus {
  border-color: #F97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}

/* Button */
.btn-primary {
  background: linear-gradient(135deg, #F97316, #EA580C);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 0.75rem 1.5rem;
  font-size: 15px;
  font-weight: 600;
  width: 100%;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-primary:active {
  opacity: 0.8;
}

.btn-danger {
  background: #F43F5E;
  color: white;
  border: none;
  border-radius: 12px;
  padding: 0.75rem 1.5rem;
  font-size: 15px;
  font-weight: 600;
  width: 100%;
  cursor: pointer;
}

.btn-danger:hover {
  background: #E11D48;
}

/* Color helpers */
.text-on-target  { color: #10B981; }
.text-warn       { color: #F59E0B; }
.text-danger     { color: #F43F5E; }
.text-secondary  { color: #6B7280; }
