/* ─── DATA PAGE ─── */
.data-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 90px 1.25rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

/* HEADER */
.data-header {
  text-align: center;
  position: relative;
  padding: 1.5rem 0 1rem;
}

.data-date {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.data-title {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 600;
  background: linear-gradient(135deg, #7dd3fc 0%, #38bdf8 50%, #0ea5e9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.data-sub {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 1.25rem;
}

.helix-score-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  background: rgba(14,165,233,0.08);
  border: 1px solid rgba(14,165,233,0.2);
  transition: all 0.4s ease;
}

.helix-score-pill.glow {
  box-shadow: 0 0 25px rgba(56,189,248,0.25);
  border-color: rgba(56,189,248,0.5);
}

.hs-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}
.hs-val {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--blue-2);
  font-variant-numeric: tabular-nums;
  transition: color 0.3s;
}
.hs-max {
  font-size: 0.8rem;
  color: var(--muted);
}

/* SECTIONS */
.data-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.section-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--blue-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.25rem;
}

.section-num {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border: 1px solid rgba(14,165,233,0.3);
  border-radius: 4px;
  color: var(--blue-2);
  background: rgba(14,165,233,0.05);
}

.optional {
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: lowercase;
  letter-spacing: 0.05em;
  margin-left: auto;
  font-weight: 400;
}

/* CARD */
.card {
  background: rgba(7,21,37,0.7);
  border: 1px solid rgba(14,165,233,0.12);
  border-radius: 14px;
  padding: 1.25rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.card:focus-within,
.card:hover {
  border-color: rgba(14,165,233,0.3);
  box-shadow: 0 0 30px rgba(14,165,233,0.06);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.card-label {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.card-hint {
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}
.card-emoji {
  font-size: 1.5rem;
  transition: transform 0.3s;
  display: inline-block;
}

/* SLIDER */
.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background: rgba(14,165,233,0.1);
  outline: none;
  cursor: pointer;
  margin: 0.5rem 0 0.25rem;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--blue-2);
  cursor: pointer;
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px rgba(56,189,248,0.5),
              0 0 20px rgba(56,189,248,0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}
.slider::-webkit-slider-thumb:hover { transform: scale(1.15); }
.slider::-webkit-slider-thumb:active { transform: scale(1.25); }

.slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--blue-2);
  cursor: pointer;
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px rgba(56,189,248,0.5);
}

/* slider color variants */
.mood-slider::-webkit-slider-thumb     { background: #38bdf8; box-shadow: 0 0 0 1px rgba(56,189,248,0.5),  0 0 20px rgba(56,189,248,0.4); }
.energy-slider::-webkit-slider-thumb   { background: #fbbf24; box-shadow: 0 0 0 1px rgba(251,191,36,0.5),  0 0 20px rgba(251,191,36,0.4); }
.sleep-slider::-webkit-slider-thumb    { background: #a78bfa; box-shadow: 0 0 0 1px rgba(167,139,250,0.5), 0 0 20px rgba(167,139,250,0.4); }
.urge-slider::-webkit-slider-thumb     { background: #f87171; box-shadow: 0 0 0 1px rgba(248,113,113,0.5), 0 0 20px rgba(248,113,113,0.4); }
.intensity-slider::-webkit-slider-thumb{ background: #ef4444; box-shadow: 0 0 0 1px rgba(239,68,68,0.5),   0 0 20px rgba(239,68,68,0.4); }
.quran-slider::-webkit-slider-thumb    { background: #34d399; box-shadow: 0 0 0 1px rgba(52,211,153,0.5),  0 0 20px rgba(52,211,153,0.4); }

.slider-track-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-top: 0.4rem;
}

.slider-val {
  color: var(--blue-2);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
}

/* TOGGLE BUTTONS */
.toggle-row {
  display: flex;
  gap: 0.75rem;
}

.toggle-btn {
  flex: 1;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(14,165,233,0.18);
  background: rgba(14,165,233,0.04);
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.toggle-btn:hover {
  background: rgba(14,165,233,0.08);
  color: var(--text);
}
.toggle-btn.active {
  background: rgba(14,165,233,0.18);
  border-color: var(--blue-2);
  color: var(--blue-2);
  box-shadow: 0 0 20px rgba(14,165,233,0.15);
}
.toggle-btn[data-val="yes"][data-field="relapse"].active {
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.6);
  color: #ef4444;
  box-shadow: 0 0 20px rgba(239,68,68,0.12);
}
.toggle-btn[data-val="no"][data-field="relapse"].active {
  background: rgba(52,211,153,0.12);
  border-color: rgba(52,211,153,0.6);
  color: #34d399;
  box-shadow: 0 0 20px rgba(52,211,153,0.12);
}

/* PICK ROW (0-5 numeric) */
.pick-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.pick-btn {
  flex: 1;
  min-width: 44px;
  padding: 0.7rem 0;
  border-radius: 10px;
  border: 1px solid rgba(14,165,233,0.18);
  background: rgba(14,165,233,0.04);
  color: var(--muted);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-variant-numeric: tabular-nums;
  font-family: inherit;
}
.pick-btn:hover { background: rgba(14,165,233,0.08); color: var(--text); }
.pick-btn.active {
  background: rgba(14,165,233,0.18);
  border-color: var(--blue-2);
  color: var(--blue-2);
}

/* CHIPS */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.chip {
  padding: 0.55rem 1rem;
  border-radius: 50px;
  border: 1px solid rgba(14,165,233,0.18);
  background: rgba(14,165,233,0.04);
  color: var(--muted);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  letter-spacing: 0.02em;
}
.chip:hover { background: rgba(14,165,233,0.1); color: var(--text); }
.chip.active {
  background: rgba(248,113,113,0.12);
  border-color: rgba(248,113,113,0.5);
  color: #f87171;
}
.helper-chip.active {
  background: rgba(52,211,153,0.12);
  border-color: rgba(52,211,153,0.5);
  color: #34d399;
}

/* MINI INPUT (number) */
.conditional {
  margin-top: 1rem;
  animation: revealDown 0.3s ease;
}
@keyframes revealDown {
  from { opacity:0; transform: translateY(-6px); }
  to   { opacity:1; transform: translateY(0); }
}
.mini-label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
  letter-spacing: 0.05em;
}
.mini-input {
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(14,165,233,0.18);
  background: rgba(14,165,233,0.04);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: all 0.2s;
}
.mini-input:focus {
  border-color: var(--blue-2);
  background: rgba(14,165,233,0.08);
}

/* NOTES */
.notes {
  width: 100%;
  min-height: 100px;
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid rgba(14,165,233,0.18);
  background: rgba(14,165,233,0.04);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
  outline: none;
  transition: all 0.2s;
  line-height: 1.6;
}
.notes:focus {
  border-color: var(--blue-2);
  background: rgba(14,165,233,0.08);
}
.notes::placeholder {
  color: var(--muted);
  font-style: italic;
}

/* SAVE INDICATOR (sticky bottom) */
.save-indicator {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  background: rgba(7,21,37,0.95);
  border: 1px solid rgba(52,211,153,0.3);
  border-radius: 50px;
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  backdrop-filter: blur(10px);
  z-index: 50;
  transition: all 0.3s;
}
.save-indicator.saving {
  border-color: rgba(251,191,36,0.4);
}
.save-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px rgba(52,211,153,0.5);
}
.save-indicator.saving .save-dot {
  background: #fbbf24;
  box-shadow: 0 0 8px rgba(251,191,36,0.5);
  animation: pulseSave 1s ease-in-out infinite;
}
@keyframes pulseSave {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* FOOTER */
.data-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  opacity: 0.6;
}

/* mobile tweaks */
@media (max-width: 640px) {
  .tabs { padding: 0 1rem; }
  .tab-links { gap: 0; }
  .tab { padding: 0.4rem 0.6rem; font-size: 0.75rem; }
  .data-main { padding: 80px 1rem 5rem; gap: 1.75rem; }
  .pick-btn { min-width: 36px; padding: 0.55rem 0; font-size: 0.9rem; }
  .chip { padding: 0.45rem 0.85rem; font-size: 0.75rem; }
}
