/* ═══════════════════════════════════════════════════════
   NOVA Support Pool — Progress Visualization Components
   ═══════════════════════════════════════════════════════ */

/* ── Progress Ring ──────────────────────────────────────── */
.prog-ring {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.prog-ring svg {
  position: absolute;
  inset: 0;
}

.prog-ring__arc {
  transition: stroke-dasharray 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.prog-ring__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  z-index: 1;
}

.prog-ring__val {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text-primary);
}

.prog-ring__label {
  font-size: 0.6rem;
  color: var(--text-tertiary);
  text-align: center;
  line-height: 1.1;
}

/* ── Circular Timer ─────────────────────────────────────── */
.circ-timer {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.circ-timer svg {
  position: absolute;
  inset: 0;
}

.circ-timer__arc {
  /* animation done via rAF in JS */
}

.circ-timer__text {
  position: relative;
  z-index: 1;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-warning, #f59e0b);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* ── Streak Flames ──────────────────────────────────────── */
.streak-flames {
  display: flex;
  gap: var(--space-xs, 4px);
  justify-content: center;
  align-items: flex-end;
}

.streak-flame {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
  max-width: 40px;
}

.streak-flame__icon {
  font-size: 1.25rem;
  line-height: 1;
  filter: grayscale(1) opacity(0.35);
  transition: filter 0.2s, transform 0.2s;
}

.streak-flame--active .streak-flame__icon {
  filter: none;
  transform: scale(1.15);
}

.streak-flame--today.streak-flame--active .streak-flame__icon {
  animation: flame-pulse 1.6s ease-in-out infinite;
}

@keyframes flame-pulse {
  0%, 100% { transform: scale(1.15); }
  50%       { transform: scale(1.3); }
}

.streak-flame__label {
  font-size: 0.6rem;
  color: var(--text-tertiary);
  text-align: center;
  font-weight: 500;
}

.streak-flame--today .streak-flame__label {
  color: var(--accent-primary);
  font-weight: 700;
}

/* ── Balance Meter ──────────────────────────────────────── */
.bal-meter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.bal-meter__val {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  letter-spacing: -0.04em;
}

.bal-meter__val--positive { color: var(--success, #10b981); }
.bal-meter__val--negative { color: var(--danger,  #ef4444); }
.bal-meter__val--neutral  { color: var(--text-secondary); }

.bal-meter__track {
  position: relative;
  height: 8px;
  background: var(--bg-elevated);
  border-radius: 99px;
  overflow: hidden;
}

.bal-meter__fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 100%;
}

.bal-meter__fill--positive {
  background: linear-gradient(90deg, var(--bg-elevated) 0%, var(--success, #10b981) 100%);
}
.bal-meter__fill--negative {
  background: linear-gradient(90deg, var(--danger, #ef4444) 0%, var(--bg-elevated) 100%);
}
.bal-meter__fill--neutral {
  background: var(--text-tertiary);
}

.bal-meter__zero {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--bg-base);
  transform: translateX(-50%);
}

.bal-meter__labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.6rem;
  color: var(--text-tertiary);
  padding: 0 2px;
}

/* ── Goal Pill ──────────────────────────────────────────── */
.goal-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 20px;
  min-width: 72px;
  border-radius: 99px;
  background: var(--bg-elevated);
  overflow: hidden;
  border: 1px solid var(--border-subtle, transparent);
}

.goal-pill__bar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  border-radius: 99px;
  background: var(--accent-primary);
  opacity: 0.25;
  transition: width 0.4s ease;
}

.goal-pill--done .goal-pill__bar {
  background: var(--success, #10b981);
  opacity: 0.35;
}

.goal-pill--urgent .goal-pill__bar {
  background: var(--accent-danger, #ef4444);
  opacity: 0.3;
}

.goal-pill__text {
  position: relative;
  z-index: 1;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-primary);
  padding: 0 8px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.goal-pill__sep {
  opacity: 0.45;
  margin: 0 1px;
}
