/* Owner stats page. One series, one hue (the accent); text stays in ink tokens. */
.stats { display: grid; gap: 1rem; }
.stats__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem; }
.stats__range { display: flex; gap: .25rem; background: var(--surface-2); padding: .25rem; border-radius: 999px; }
.stats__range-btn { padding: .35rem .8rem; border-radius: 999px; font-size: .85rem; color: var(--ink-soft); }
.stats__range-btn:hover { text-decoration: none; color: var(--ink); }
.stats__range-btn.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 600; }

.stats__tiles { display: grid; gap: .75rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .stats__tiles { grid-template-columns: repeat(5, 1fr); } }
.stat-tile { padding: 1rem 1.1rem; }
.stat-tile__value { font-size: 1.9rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-tile__label { font-size: .82rem; color: var(--ink-soft); margin-top: .2rem; }

.stats__panel { padding: 1.2rem 1.3rem; }
.stats__h { font-size: 1rem; font-weight: 700; margin-bottom: .9rem; }
.stats__two { display: grid; gap: 1rem; }
@media (min-width: 860px) { .stats__two { grid-template-columns: 1fr 1fr; } }
.stats__note, .stats__foot { font-size: .8rem; color: var(--ink-faint); margin-top: .6rem; }
.stats__path { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }

.stats-chart { position: relative; padding-left: 2rem; }
.stats-chart__svg { width: 100%; height: 180px; display: block; overflow: visible; }
.stats-chart__bar { fill: var(--accent); }
.stats-chart__hit { fill: transparent; }
.stats-chart__col:hover .stats-chart__bar { fill: color-mix(in srgb, var(--accent) 75%, black); }
.stats-chart__col:hover .stats-chart__hit { fill: color-mix(in srgb, var(--accent) 7%, transparent); }
.stats-chart__base { stroke: var(--line-strong); stroke-width: .3; vector-effect: non-scaling-stroke; }
.stats-chart__max { position: absolute; left: 0; top: 0; font-size: .75rem; color: var(--ink-faint); }
.stats-chart__axis { display: flex; justify-content: space-between; font-size: .75rem; color: var(--ink-faint); margin-top: .35rem; }
.stats__table-toggle { margin-top: .75rem; font-size: .85rem; }
.stats__table-toggle summary { cursor: pointer; color: var(--accent); }

.funnel { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; }
.funnel__row { display: flex; justify-content: space-between; gap: 1rem; font-size: .92rem; margin-bottom: .3rem; }
.funnel__value { font-weight: 700; font-variant-numeric: tabular-nums; }
.funnel__value small { font-weight: 500; color: var(--ink-soft); margin-left: .4rem; }
.funnel__track { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.funnel__bar { height: 100%; border-radius: 999px; background: var(--accent); min-width: 2px; }

/* Owner: schools and codes. */
.school-codes__forms { display: grid; gap: 1rem; margin-top: .75rem; }
@media (min-width: 760px) { .school-codes__forms { grid-template-columns: 1fr 1fr; } }
.school-codes__row { display: grid; grid-template-columns: 1fr 5rem auto; gap: .5rem; align-items: center; }
.school-codes__pct { text-align: right; }
.school-codes__row--promo { grid-template-columns: 1fr 5rem 2fr auto; }
@media (max-width: 640px) { .school-codes__row--promo { grid-template-columns: 1fr 5rem; } }
.promo-codes { width: 100%; margin-top: 1rem; font-size: .9rem; }
.promo-codes th { text-align: left; }
.promo-codes td { padding: .4rem .5rem .4rem 0; vertical-align: middle; }
.promo-codes .is-off { opacity: .5; }

.cleanup__list { list-style: none; padding: 0; margin: .75rem 0; display: grid; gap: .4rem; max-height: 22rem; overflow: auto; }
.cleanup__list label, .cleanup__buyers { display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; font-size: .9rem; }
.cleanup__buyers { margin: .5rem 0 1rem; }
