/* Performance, habits, goals, budget and reports. Loaded after styles.css; uses its design tokens only. */

.section-title { font-size: 1rem; margin: 0 0 0.6rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.stack { display: grid; gap: 1rem; }
.row.space { justify-content: space-between; }
.right { text-align: right; }
.num { font-variant-numeric: tabular-nums; }
.neg-text { color: var(--danger); }
.plain-list { margin: 0.35rem 0 0; padding-left: 1.1rem; font-weight: 400; }

/* Performance */
.course-card { display: grid; gap: 0.55rem; align-content: start; }
.course-card h3 { margin: 0; font-size: 1.05rem; }
.course-card h3 a { color: inherit; text-decoration: none; }
.course-card h3 a:hover { color: var(--accent-strong); text-decoration: underline; }
.cat-row progress { width: 100%; }
.possible { display: grid; gap: 0.5rem; }
.calc-cat { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin: 0 0 1rem; min-width: 0; }
.calc-cat legend { padding: 0 0.4rem; font-weight: 700; font-size: 0.85rem; color: var(--muted); }
.calc-item { display: grid; grid-template-columns: minmax(130px, 1.2fr) 1fr 1fr auto; gap: 0 0.75rem; align-items: end; }
.calc-item .calc-remove { margin-bottom: 1rem; }

/* Habits */
.habit-card { display: grid; gap: 0.9rem; }
.habit-card h3 { margin: 0; }
.week-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.35rem; max-width: 420px; }
.week-day { display: grid; justify-items: center; gap: 0.25rem; }
.week-day .dow { font-size: 0.7rem; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.daybtn { min-width: 36px; min-height: 36px; }
.heat-wrap { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.heat-strip { display: grid; grid-template-columns: repeat(14, 14px); grid-auto-rows: 14px; gap: 3px; }
.heat-cell { border-radius: 3px; background: var(--surface-2); border: 1px solid var(--border); }
.heat-cell.on { background: var(--accent-strong); border-color: var(--accent-strong); }

/* Goals */
.goal-card { display: grid; gap: 0.6rem; align-content: start; }
.goal-card h3 { margin: 0; }
.goal-desc { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.goal-progress { display: flex; align-items: center; gap: 0.6rem; }
.goal-progress progress { flex: 1; }
.milestones { list-style: none; margin: 0; padding: 0; }
.milestones li { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; padding: 0.2rem 0; }
.strike { text-decoration: line-through; color: var(--muted); }

/* Budget */
.month-picker input[type='month'] { width: auto; min-height: 34px; }
.month-name { min-width: 9ch; text-align: center; }
.budget-cat { display: grid; gap: 0.3rem; padding: 0.7rem 0; border-top: 1px solid var(--border); }
.budget-cat:first-of-type { border-top: 0; }
progress { height: 10px; border-radius: 999px; border: 0; overflow: hidden; background: var(--surface-2); accent-color: var(--accent-strong); }
progress::-webkit-progress-bar { background: var(--surface-2); }
progress::-webkit-progress-value { background: var(--accent-strong); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--accent-strong); border-radius: 999px; }
progress.over::-webkit-progress-value { background: var(--danger); }
progress.over::-moz-progress-bar { background: var(--danger); }
.tx-income { color: var(--ok); font-weight: 600; }
.tx-expense { color: var(--text); }

/* Reports */
.range-bar { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: flex-end; justify-content: space-between; }
.range-bar .inline-form { flex: 1 1 320px; }
.card h3 { font-size: 0.95rem; margin: 0.75rem 0 0.25rem; }

@media (max-width: 800px) {
  .calc-item { grid-template-columns: 1fr 1fr; }
  .calc-item .calc-remove { grid-column: 1 / -1; justify-self: start; margin-bottom: 0.5rem; }
  .heat-strip { grid-template-columns: repeat(14, 12px); grid-auto-rows: 12px; }
  .week-row { max-width: none; }
}
