/* owns: loy-n- (Tests/Loyalty/LoyaltyCenterPortalTests reads this line - every rule here leads with it, and no other stylesheet
   styles it).
   THE LOYALTY CENTER'S NUMBERS (docs/claude/LOYALTY.md 5.13) - the window picker, the Overview's numbers panel (the tiles, the deal
   sniffers, wallet health), an offer's funnel, a circular's numbers and the Activity report (/loyalty/activity), and their components
   (Components/Loyalty/Numbers). This stylesheet owns every loy-n-* class; loyalty-center.css owns the rest of loy-* (the frame, cards,
   rows, fields, notes - reused here, never restyled). A token-only door, whole (Tests/ShellTokensOnlyTests): colours are --theme-* /
   --wf-* tokens only, so light, dark and every tenant theme read the same. Nothing scrolls sideways at 320px: the tables scroll in their
   own wrapper. */

/* ---- The window picker ---- */
.loy-n-picker { display: grid; gap: 8px; min-width: 0; }
.loy-n-ranges { display: flex; flex-wrap: wrap; gap: 6px; }
.loy-n-days { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.loy-n-apply { margin-bottom: 4px; }
.loy-n-window { margin: 0; font-size: .85rem; color: var(--theme-text-secondary); }

/* ---- The numbers panel ---- */
.loy-n-panel { min-width: 0; }
.loy-n-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; }
.loy-n-kpis { margin-top: 12px; }
.loy-n-note { margin: 12px 0 0; font-size: .85rem; color: var(--theme-text-secondary); display: flex; gap: 6px; align-items: baseline; }
.loy-n-skel { height: 120px; border-radius: var(--wf-radius-md); }
.loy-n-skel-list { height: 160px; border-radius: var(--wf-radius-md); }

/* ---- Wallet health ---- */
.loy-n-health { padding: 10px 0; border-top: 1px solid var(--wf-line); }
.loy-n-health:first-of-type { border-top: 0; }
.loy-n-health-title { margin: 0 0 6px; font-weight: 600; color: var(--theme-text-emphasis); }
.loy-n-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 0; }
.loy-n-facts div { min-width: 0; }
.loy-n-facts dt { font-size: .8rem; font-weight: 400; color: var(--theme-text-secondary); }
.loy-n-facts dd { margin: 0; font-size: 1.15rem; font-weight: 600; color: var(--theme-text-emphasis); font-variant-numeric: tabular-nums; }

/* ---- The funnel ---- */
.loy-n-funnel { min-width: 0; }
.loy-n-steps { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 10px; }
.loy-n-step { display: grid; grid-template-columns: minmax(120px, 220px) 1fr auto; grid-template-rows: auto auto; column-gap: 12px; row-gap: 2px; align-items: center; }
.loy-n-step-label { font-weight: 600; color: var(--theme-text-emphasis); }
.loy-n-bar { height: 12px; border-radius: 6px; background: var(--wf-neutral-soft); overflow: hidden; }
.loy-n-bar-fill { display: block; height: 100%; border-radius: 6px; background: var(--wf-primary-ink); }
.loy-n-step-figure { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--theme-text-emphasis); }
.loy-n-step-sub { grid-column: 2 / 4; font-size: .82rem; color: var(--theme-text-secondary); display: flex; flex-wrap: wrap; gap: 8px; }
.loy-n-drop { color: var(--theme-text-emphasis); }

/* ---- Tables (the circular's pages, the Activity report) ---- */
.loy-n-table-wrap { overflow-x: auto; margin-top: 12px; }
.loy-n-table { width: 100%; margin: 0; }
.loy-n-table th, .loy-n-table td { vertical-align: top; }
.loy-n-activity td:first-child { white-space: nowrap; }
.loy-n-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.loy-n-when { white-space: nowrap; }
.loy-n-what { display: block; color: var(--theme-text-emphasis); }
.loy-n-what-sub { display: block; font-size: .82rem; color: var(--theme-text-secondary); }
.loy-n-visitor { color: var(--theme-text-secondary); }
.loy-n-more { display: flex; justify-content: center; margin-top: 12px; }

/* ---- The Activity report's filters and download ---- */
.loy-n-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.loy-n-filter { width: auto; max-width: 100%; min-width: 0; }
.loy-n-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.loy-n-download { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.loy-n-download-label { font-size: .85rem; color: var(--theme-text-secondary); }
.loy-n-download-status { margin: 6px 0 0; min-height: 1em; font-size: .85rem; color: var(--theme-text-secondary); }

@media (max-width: 640px) {
    .loy-n-step { grid-template-columns: 1fr auto; }
    .loy-n-bar { grid-column: 1 / 3; grid-row: 2; }
    .loy-n-step-sub { grid-column: 1 / 3; }
}

@media (pointer: coarse) {
    .loy-n-ranges .wf-chip-toggle, .loy-n-download .btn, .loy-n-more .btn { min-height: 44px; }
}
