/* ═══════════════════════════════════════════════════════════════════════════
   GymSpotter OS · Reports module — styles for the Reports screens (reports.html)
   Scoped under .gsr (the module's page region and its dialog) and drawn from the
   GymSpotter OS tokens in global-styles.css, so fonts, light / dark theme, focus
   rings and component shapes match the rest of the OS. Sizes are rem on the OS's
   16px root. The views (app/js/views/*.js) keep their original class names.
═══════════════════════════════════════════════════════════════════════════ */
.gsr {
  --bg:var(--gymspotter-bg); --surface:var(--gymspotter-surface); --surface-2:var(--gymspotter-surface2); --surface-3:var(--gymspotter-surface3);
  --border:var(--gymspotter-border-lt); --border-strong:var(--gymspotter-border);
  --ink:var(--gymspotter-text); --ink-2:var(--gymspotter-text-sec); --ink-3:var(--gymspotter-muted); --ink-4:var(--gymspotter-muted-lt); --line-4:#94A3B8;
  --navy:#1B2A4A; --accent:var(--gymspotter-blue); --accent-ink:var(--gymspotter-blue-dk); --accent-soft:var(--gymspotter-blue-lt); --accent-dim:var(--gymspotter-blue-dim);
  --focus:var(--gymspotter-blue);
  --good:var(--gymspotter-green); --good-soft:var(--gymspotter-green-lt); --bad:var(--gymspotter-red); --bad-soft:var(--gymspotter-red-lt);
  --warn:var(--gymspotter-amber); --warn-soft:var(--gymspotter-amber-lt);
  --row-line:#EEF2F7; --hover:#F1F6FF; --sel:#EEF4FF; --cur:#F5F8FF; --on-accent:#fff;
  /* series (validated colorblind-safe sets, same as the printed reports) */
  --c-calls:#2563EB; --c-forms:#EA580C; --c-sms:#0D9488; --c-google:#6250D6; --c-meta:#E87BA4; --c-missed:#D03B3B; --c-neutral:#94A3B8;
  --radius:var(--gymspotter-radius); --shadow:var(--gymspotter-shadow-xs);
  color:var(--ink);
}
.gymspotter-dark .gsr {
  --ink-4:var(--gymspotter-muted); --line-4:#64748B; --navy:#93C5FD; --accent-ink:#93C5FD;
  --row-line:#1D2436; --hover:rgba(96,165,250,.08); --sel:rgba(96,165,250,.14); --cur:rgba(96,165,250,.06); --on-accent:#0B1120;
}

/* ---------- base (inside the OS reset) ---------- */
.gsr h1, .gsr h2, .gsr h3 { font-family:'Manrope','Inter',system-ui,sans-serif; letter-spacing:-.01em; line-height:1.2; color:var(--ink); }
.gymspotter-app .gsr a { color:var(--accent-ink); }
.gsr a:hover { text-decoration:underline; }
.gsr p a, .gsr .card-sub a, .gsr .small a, .gsr .tbl td a, .gsr .tbl tbody th a { text-decoration:underline; text-underline-offset:2px; } /* links inside text are not told apart by color alone */
.gsr code { font-family:ui-monospace,SFMono-Regular,Consolas,monospace; font-size:.85em; background:var(--accent-dim); color:var(--accent-ink); border-radius:4px; padding:0 .3em; }
.gsr code.plain { background:transparent; color:inherit; padding:0; }
.gsr :focus-visible { outline:var(--gymspotter-focus-outline); outline-offset:2px; box-shadow:var(--gymspotter-focus-ring); }
/* programmatic focus after navigation (for screen readers); keyboard focus still shows on every control. Beats the OS's global :focus-visible !important. */
.gymspotter-app .gsr h1[tabindex="-1"]:focus, .gymspotter-app .gsr h1[tabindex="-1"]:focus-visible, .gymspotter-app .gsr .gsr-view:focus-visible { outline:none !important; box-shadow:none !important; }
.gsr .sr-only { position:absolute !important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.gsr [hidden] { display:none !important; }
.gsr select, .gsr input[type=search], .gsr input[type=text], .gsr input[type=month], .gsr input[type=number], .gsr textarea:not(.code) {
  font:inherit; font-size:.8125rem; color:var(--ink); background:var(--surface); border:1px solid var(--border-strong); border-radius:var(--gymspotter-radius-xs);
  padding:6px 10px; min-height:36px; box-shadow:var(--gymspotter-shadow-xs);
}
.gsr select { padding-right:28px; }
.gsr select:disabled, .gsr input:disabled { opacity:.6; cursor:not-allowed; }
.gsr .loading, .gsr .empty { color:var(--ink-3); padding:40px 0; text-align:center; }
.gsr .empty h1 { font-size:1.25rem; margin-bottom:8px; }
.gsr .empty p { margin-top:6px; }

/* ---------- module toolbar (company, privacy, refresh) ---------- */
.gsr-toolbar { gap:10px 14px; }
.gsr-toolbar-left { display:flex; align-items:center; gap:10px; min-width:0; flex-wrap:wrap; }
.gsr-crumbs { font-size:.8125rem; color:var(--ink-3); display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
.gsr-crumbs b { color:var(--ink); font-weight:700; }
.gsr-toolbar-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.gsr-toolbar-actions .gymspotter-select { margin-bottom:0; min-height:36px; padding-top:6px; padding-bottom:6px; width:auto; max-width:240px; font-size:.8125rem; }
.gsr-company-label { font-size:.6875rem; font-weight:700; text-transform:uppercase; letter-spacing:.4px; color:var(--ink-3); }
.gsr-privacy { display:inline-flex; align-items:center; gap:8px; font-size:.8125rem; font-weight:600; color:var(--ink-2); cursor:pointer; min-height:36px; }
.gsr-engine-pill { display:inline-flex; align-items:center; gap:6px; font-size:.75rem; font-weight:700; padding:4px 10px; border-radius:20px; border:1px solid var(--border); background:var(--surface-2); color:var(--ink-3); }
.gsr-engine-pill i { font-size:.5rem; }
.gsr-engine-pill[data-state="ok"] i { color:var(--good); }
.gsr-engine-pill[data-state="down"] { color:var(--bad); border-color:var(--bad); }
.gsr-engine-pill[data-state="busy"] i { color:var(--warn); }
.gsr-view { min-height:50vh; }

/* ---------- view header ---------- */
.gsr .view-head { display:flex; justify-content:space-between; align-items:flex-end; gap:16px; flex-wrap:wrap; margin-bottom:16px; }
.gsr .view-head h1 { font-size:1.375rem; font-weight:800; letter-spacing:-.3px; }
.gsr .view-head p { color:var(--ink-3); margin-top:4px; font-size:.8125rem; }
.gsr .controls { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.gsr .controls label.inline, .gsr label.inline { font-size:.75rem; font-weight:600; color:var(--ink-3); display:flex; align-items:center; gap:6px; }
.gsr .chips { display:flex; gap:6px; flex-wrap:wrap; }
.gsr .chip { border:1px solid var(--border-strong); background:var(--surface); color:var(--ink-2); border-radius:999px; padding:4px 12px; font-size:.75rem; font-weight:700; display:inline-flex; align-items:center; gap:6px; min-height:30px; cursor:pointer; }
.gsr .chip:hover { border-color:var(--accent); background:var(--accent-dim); color:var(--accent-ink); }
.gsr .chip.active { background:var(--accent); border-color:var(--accent); color:var(--on-accent); }
.gsr .chip .dot { width:8px; height:8px; border-radius:2px; display:inline-block; }
.gsr .chip .n { font-weight:500; opacity:.8; }

/* ---------- buttons (GymSpotter OS button shapes) ---------- */
.gsr .btn { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:36px; padding:6px 12px; border-radius:var(--gymspotter-radius-sm);
  border:1px solid var(--border-strong); background:var(--surface); color:var(--ink-2); font-size:.8125rem; font-weight:600; white-space:nowrap; text-decoration:none;
  box-shadow:var(--gymspotter-shadow-xs); cursor:pointer; line-height:1.4; transition:background var(--gymspotter-t-fast),color var(--gymspotter-t-fast),border-color var(--gymspotter-t-fast); }
.gsr .btn:hover { border-color:var(--accent); background:var(--accent-dim); color:var(--accent-ink); text-decoration:none; }
.gymspotter-app .gsr a.btn { color:var(--ink-2); }
.gymspotter-app .gsr a.btn:hover { color:var(--accent-ink); }
.gsr .btn.primary, .gymspotter-app .gsr a.btn.primary { background:var(--accent); border-color:var(--accent); color:var(--on-accent); box-shadow:0 2px 8px var(--gymspotter-blue-glow); }
.gsr .btn.primary:hover { background:var(--gymspotter-blue-dk); border-color:var(--gymspotter-blue-dk); color:#fff; }
.gymspotter-dark .gsr .btn.primary:hover { background:#93C5FD; border-color:#93C5FD; color:#0B1120; }
.gsr .btn.ghost { background:transparent; box-shadow:none; }
/* the OS underlines links in the main area unless they are .gymspotter-btn: links styled as buttons, tabs or chips are not */
.gymspotter-app .gymspotter-main .gsr a.btn, .gymspotter-app .gymspotter-main .gsr .tabs a, .gymspotter-app .gymspotter-main .gsr a.chip { text-decoration:none; }
.gsr .btn.danger { color:var(--bad); }
.gsr .btn[disabled] { opacity:.5; cursor:not-allowed; }
.gsr .icon-btn { border:none; background:transparent; width:36px; height:36px; border-radius:8px; color:var(--ink-2); font-size:1rem; cursor:pointer; }
.gsr .icon-btn:hover { background:var(--accent-dim); color:var(--accent-ink); }

/* ---------- cards & grids (GymSpotter OS panels and tiles) ---------- */
.gsr .grid { display:grid; gap:12px; }
.gsr .kpis { grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); margin-bottom:16px; }
.gsr .cols-2 { grid-template-columns:repeat(2,minmax(0,1fr)); }
.gsr .cols-3 { grid-template-columns:repeat(3,minmax(0,1fr)); }
.gsr .card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow); padding:16px; min-width:0; }
.gsr .section { margin-top:16px; }
.gsr .card-head { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; margin-bottom:12px; }
.gsr .card-title { font:800 .875rem 'Manrope','Inter',sans-serif; color:var(--ink); }
.gsr .card-sub { font-size:.75rem; color:var(--ink-3); margin-top:2px; line-height:1.5; }
.gsr .kpi { position:relative; overflow:hidden; }
.gsr .kpi .lbl { font:700 .6875rem 'Manrope','Inter',sans-serif; text-transform:uppercase; letter-spacing:.6px; color:var(--ink-3); }
.gsr .kpi .val { font:900 1.5rem 'Manrope','Inter',sans-serif; letter-spacing:-.8px; color:var(--ink); margin-top:4px; line-height:1.1; }
.gsr .kpi .deltas { display:flex; flex-direction:column; gap:2px; margin-top:6px; font-size:.6875rem; }
.gsr .kpi .note { font-size:.6875rem; color:var(--ink-3); margin-top:4px; }
.gsr .kpi .val-row { display:flex; align-items:flex-end; justify-content:space-between; gap:8px; flex-wrap:wrap; }
.gsr .kpi .spark { flex-shrink:0; margin-bottom:2px; }
.gsr .kpi .bar { position:absolute; left:0; top:0; height:3px; width:100%; }
.gsr .delta { font-weight:700; white-space:nowrap; }
.gsr .delta.up { color:var(--good); } .gsr .delta.down { color:var(--bad); } .gsr .delta.flat, .gsr .delta.na { color:var(--ink-3); font-weight:500; }
.gsr .delta .vs { color:var(--ink-3); font-weight:500; }
.gsr .chart-box { position:relative; height:260px; }
.gsr .chart-box.tall { height:320px; } .gsr .chart-box.short { height:200px; } .gsr .chart-box.xs { height:150px; }
.gsr .callout { border-radius:var(--gymspotter-radius-sm); padding:12px 14px; background:var(--surface-2); color:var(--ink-2); font-size:.8125rem; line-height:1.6; margin-bottom:16px;
  border:1px solid var(--border-strong); border-left:4px solid var(--accent); }
.gsr .callout.warn { background:var(--warn-soft); border-left-color:var(--warn); }
.gsr .callout.good { background:var(--good-soft); border-left-color:var(--good); }
.gsr .callout b { color:var(--ink); }
.gymspotter-app .gsr .callout a { color:var(--accent-ink); font-weight:700; text-decoration:underline; text-underline-offset:2px; }
.gsr .callout .t { font-weight:800; margin-bottom:2px; color:var(--ink); }
.gsr .insights { list-style:none; display:grid; gap:8px; }
.gsr .insights li { display:flex; gap:8px; font-size:.8125rem; color:var(--ink-2); }
.gsr .insights li .i { width:20px; height:20px; border-radius:6px; display:flex; align-items:center; justify-content:center; font-size:.625rem; font-weight:800; flex-shrink:0; }
.gsr .insights li .i.up { background:var(--good-soft); color:var(--good); } .gsr .insights li .i.down { background:var(--bad-soft); color:var(--bad); } .gsr .insights li .i.flat { background:var(--surface-2); color:var(--ink-3); }
.gsr .legend { display:flex; gap:14px; flex-wrap:wrap; font-size:.75rem; color:var(--ink-2); margin-top:8px; }
.gsr .legend i { display:inline-block; width:10px; height:10px; border-radius:2px; margin-right:5px; vertical-align:-1px; }
.gsr .muted { color:var(--ink-3); } .gsr .small { font-size:.75rem; }
.gsr .pill { display:inline-block; font-size:.6875rem; font-weight:700; padding:2px 9px; border-radius:20px; background:var(--surface-2); border:1px solid var(--border); color:var(--ink-2); white-space:nowrap; }
.gsr .pill.good { background:var(--good-soft); border-color:transparent; color:var(--good); }
.gsr .pill.bad { background:var(--bad-soft); border-color:transparent; color:var(--bad); }
.gsr .pill.warn { background:var(--warn-soft); border-color:transparent; color:var(--warn); }
.gsr .pill.blue { background:var(--accent-dim); border-color:transparent; color:var(--accent-ink); }
.gsr .tag { font-size:.5625rem; font-weight:800; letter-spacing:.04em; padding:1px 5px; border-radius:4px; background:var(--surface-2); color:var(--ink-3); border:1px solid var(--border); }
.gsr .tag.on { background:var(--accent-dim); color:var(--accent-ink); border-color:transparent; }

/* ---------- tables (GymSpotter OS table look) ---------- */
.gsr .tbl-toolbar { display:flex; gap:8px; align-items:center; justify-content:space-between; flex-wrap:wrap; margin-bottom:10px; }
.gsr .tbl-toolbar .left { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.gsr .tbl-wrap { overflow:auto; border:1px solid var(--border); border-radius:var(--gymspotter-radius-sm); max-height:640px; background:var(--surface); }
.gsr table.tbl { width:100%; border-collapse:separate; border-spacing:0; font-size:.8125rem; }
.gsr .tbl th { position:sticky; top:0; z-index:1; background:var(--surface-2); color:var(--ink-3); font:700 .6875rem 'Inter',sans-serif; text-transform:uppercase; letter-spacing:.5px; text-align:left; padding:9px 12px; border-bottom:1px solid var(--border); white-space:nowrap; }
.gsr .tbl tbody th { position:static; background:inherit; text-transform:none; letter-spacing:normal; font-size:inherit; color:var(--ink); border-bottom:1px solid var(--row-line); white-space:nowrap; }
.gsr .tbl th:has(> .th-sort) { padding:0; }
.gsr .th-sort { all:unset; box-sizing:border-box; display:flex; align-items:center; gap:4px; width:100%; min-height:36px; padding:9px 12px; cursor:pointer; font:inherit; color:inherit; text-transform:inherit; letter-spacing:inherit; }
.gsr .tbl th.num .th-sort { justify-content:flex-end; }
.gsr .th-sort:hover { color:var(--ink); background:var(--accent-dim); }
.gsr .th-sort:focus-visible { outline:var(--gymspotter-focus-outline); outline-offset:-3px; }
.gsr .tbl th .arrow { color:var(--ink-4); min-width:.8em; }
.gsr .tbl td { padding:8px 12px; border-bottom:1px solid var(--row-line); vertical-align:top; color:var(--ink-2); }
.gsr .tbl tr:last-child td { border-bottom:none; }
.gsr .tbl tr.click, .gsr .tbl tr.row-link { cursor:pointer; }
.gsr .tbl tr.click:hover td, .gsr .tbl tr.row-link:hover td, .gsr .tbl tr.click:focus-visible td { background:var(--hover); }
.gsr .tbl tr:focus-visible { outline-offset:-3px; }
.gsr .tbl tr.sel td, .gsr .tbl tr.sel th { background:var(--sel); }
.gsr .tbl td.num, .gsr .tbl th.num { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.gsr .tbl td.strong { color:var(--ink); font-weight:600; }
.gsr .tbl td .sub, .gsr .tbl th .sub { display:block; color:var(--ink-3); font-size:.6875rem; font-weight:500; }
.gsr .tbl td.wrap { white-space:normal; min-width:220px; max-width:460px; }
.gsr .tbl.matrix td, .gsr .tbl.matrix th { white-space:nowrap; }
.gsr .tbl.matrix td:first-child, .gsr .tbl.matrix th:first-child { position:sticky; left:0; background:inherit; z-index:2; }
.gsr .tbl.matrix th:first-child { background:var(--surface-2); z-index:3; }
.gsr .tbl.matrix tbody td:first-child, .gsr .tbl.matrix tbody th:first-child { background:var(--surface); }
.gsr .tbl.matrix tr.metric-row.sel td:first-child { background:var(--sel); }
.gsr .tbl .chg { display:block; font-size:.625rem; font-weight:700; }
.gsr .tbl .chg.up { color:var(--good); } .gsr .tbl .chg.down { color:var(--bad); } .gsr .tbl .chg.flat { color:var(--ink-4); }
.gsr .tbl td.cur, .gsr .tbl th.cur { background:var(--cur); }
.gsr .cov { display:inline-block; min-width:34px; text-align:center; padding:2px 6px; border-radius:6px; font-size:.6875rem; font-weight:700; }
.gsr .cov.l0 { color:var(--ink-4); } .gsr .cov.l1 { background:#DBEAFE; color:#1E40AF; } .gsr .cov.l2 { background:#93C5FD; color:#1E3A8A; } .gsr .cov.l3 { background:#2563EB; color:#fff; }
.gsr .cov.typed { background:var(--warn-soft); color:var(--warn); }
.gsr .pager { display:flex; gap:6px; align-items:center; justify-content:flex-end; margin-top:10px; font-size:.75rem; color:var(--ink-3); }
.gsr .pager button { border:1px solid var(--border-strong); background:var(--surface); color:var(--ink-2); border-radius:6px; padding:4px 12px; min-height:32px; font-weight:600; }
.gsr .pager button:hover:not([disabled]) { border-color:var(--accent); color:var(--accent-ink); }
.gsr .pager button[disabled] { opacity:.55; cursor:default; }
.gsr .dotc { display:inline-block; width:8px; height:8px; border-radius:2px; margin-right:6px; vertical-align:0; }

/* ---------- tabs ---------- */
.gsr .tabs { display:flex; gap:4px; border-bottom:1px solid var(--border); margin-bottom:14px; flex-wrap:wrap; }
.gymspotter-app .gsr .tabs a { padding:9px 14px; color:var(--ink-3); font-weight:700; font-size:.8125rem; border-bottom:2px solid transparent; margin-bottom:-1px; text-decoration:none; }
.gymspotter-app .gsr .tabs a:hover { color:var(--ink); }
.gymspotter-app .gsr .tabs a.active { color:var(--accent-ink); border-bottom-color:var(--accent); }
.gsr .tabs a .n { font-weight:500; color:var(--ink-4); margin-left:4px; }

/* ---------- report viewer & files ---------- */
.gsr .doc-frame { width:100%; height:calc(100vh - 300px); min-height:560px; border:1px solid var(--border); border-radius:var(--gymspotter-radius-sm); background:#E2E8F0; }
.gsr .files { display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:12px; }
.gsr .file { background:var(--surface); border:1px solid var(--border); border-radius:var(--gymspotter-radius-sm); overflow:hidden; display:flex; flex-direction:column; cursor:pointer; text-align:left; padding:0; color:inherit; box-shadow:var(--shadow); }
.gsr .file:hover { border-color:var(--accent); box-shadow:0 2px 10px var(--gymspotter-blue-glow); }
.gsr .file .thumb { height:130px; background:var(--surface-3); display:flex; align-items:center; justify-content:center; font:800 1rem 'Manrope',sans-serif; color:var(--ink-4); border-bottom:1px solid var(--border); overflow:hidden; }
.gsr .file .thumb img { width:100%; height:100%; object-fit:cover; object-position:top; display:block; }
.gsr .file .meta { padding:8px 10px; }
.gsr .file .nm { font-size:.75rem; font-weight:700; color:var(--ink); word-break:break-word; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.gsr .file .sz { font-size:.6875rem; color:var(--ink-3); margin-top:2px; }

/* ---------- dialog / toast (GymSpotter OS modal look) ---------- */
.gsr.gsr-modal { position:fixed; inset:0; z-index:1100; background:rgba(15,23,42,.55); backdrop-filter:blur(2px); display:flex; align-items:center; justify-content:center; padding:24px;
  font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; font-size:.875rem; line-height:1.55; }
.gsr.gsr-modal[hidden] { display:none; }
.gsr .modal-box { position:relative; background:var(--surface); color:var(--ink); border:1px solid var(--border); border-radius:var(--gymspotter-radius-xl); max-width:min(1200px,96vw); max-height:92vh; overflow:auto;
  padding:22px; box-shadow:var(--gymspotter-shadow-xl); min-width:min(480px,92vw); }
.gsr .modal-box * { box-sizing:border-box; }
.gsr .modal-box.wide { width:min(1200px,96vw); }
.gsr .modal-close { position:absolute; top:10px; right:10px; }
.gsr .modal-box h2 { font-size:1.125rem; margin-bottom:6px; }
.gsr .modal-box img.full { max-width:100%; height:auto; display:block; border-radius:8px; border:1px solid var(--border); }
.gsr .modal-box pre, .gsr pre.gsr-log { background:#0F172A; color:#E2E8F0; padding:12px; border-radius:8px; font:12px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace; max-height:50vh; overflow:auto; white-space:pre-wrap; word-break:break-word; margin-top:8px; }
.gsr .modal-box p { margin-bottom:8px; }
.gsr .timeline { list-style:none; border-left:2px solid var(--border); margin-left:6px; padding-left:16px; display:grid; gap:12px; }
.gsr .timeline li { position:relative; font-size:.8125rem; }
.gsr .timeline li::before { content:''; position:absolute; left:-22px; top:4px; width:10px; height:10px; border-radius:3px; background:var(--dot,var(--line-4)); }
.gsr .timeline .when { font-size:.6875rem; color:var(--ink-3); }
.gsr .masked { filter:blur(4px); user-select:none; }

.gsr .missed-row { grid-template-columns:minmax(0,2fr) minmax(0,1fr); }
/* the month in progress (overview band + This month page) */
.gsr .now-card { margin-bottom:16px; border-left:4px solid var(--accent); }
.gsr .now-stats { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:10px; }
.gsr .now-stats > div { position:relative; background:var(--surface-2); border:1px solid var(--border); border-radius:var(--gymspotter-radius-sm); padding:10px 12px 10px 16px; }
.gsr .now-stats .bar { position:absolute; left:0; top:8px; bottom:8px; width:4px; border-radius:2px; }
.gsr .now-stats .lbl { font:700 .6875rem 'Manrope','Inter',sans-serif; text-transform:uppercase; letter-spacing:.5px; color:var(--ink-3); }
.gsr .now-stats .val { font:900 1.1875rem 'Manrope','Inter',sans-serif; color:var(--ink); }
.gsr .now-stats .note { font-size:.6875rem; color:var(--ink-3); }
.gsr .feed { list-style:none; display:grid; gap:2px; }
.gsr .feed li { display:grid; grid-template-columns:110px 92px minmax(0,1fr); gap:10px; padding:8px 6px; border-bottom:1px solid var(--row-line); font-size:.8125rem; align-items:start; }
.gsr .feed li:last-child { border-bottom:none; }
.gsr .feed .when { color:var(--ink-3); font-size:.75rem; }
.gsr .feed .ch { font-weight:700; color:var(--ink-2); }
.gsr .feed button.lead { all:unset; cursor:pointer; color:var(--ink-2); display:block; min-height:24px; }
.gsr .feed button.lead:focus-visible { outline:var(--gymspotter-focus-outline); outline-offset:2px; }
.gsr .feed button.lead:hover { color:var(--ink); text-decoration:underline; }

/* ---------- lead map ---------- */
.gsr .map-layout { display:grid; grid-template-columns:minmax(0,1fr) 340px; gap:14px; }
.gsr .map-box { height:640px; border-radius:var(--gymspotter-radius-sm); overflow:hidden; border:1px solid var(--border); background:#EEF3F8; }
.gsr .map-side .card + .card { margin-top:12px; }
.gsr .map-legend { display:flex; gap:10px; flex-wrap:wrap; align-items:center; font-size:.6875rem; color:var(--ink-2); margin-top:8px; }
.gsr .map-legend .ramp { display:inline-flex; } .gsr .map-legend .ramp i { width:22px; height:10px; display:inline-block; }
.gsr .map-legend .ring { width:14px; height:14px; border-radius:50%; display:inline-block; vertical-align:-2px; margin-right:4px; }
.gsr .leaflet-container { font-family:'Inter',system-ui,sans-serif; }
/* the OS caps img / canvas at 100% width; Leaflet's renderer canvas is deliberately wider than the map and offset, so lift the cap */
.gsr .leaflet-container canvas, .gsr .leaflet-container img, .gsr .leaflet-container svg { max-width:none !important; max-height:none !important; }
.gsr .leaflet-container a { color:#1D4ED8; }
.gsr .leaflet-popup-content-wrapper, .gsr .leaflet-popup-tip { color:#0F172A; }
.gsr .map-label span { position:absolute; transform:translate(-50%,-50%); white-space:nowrap; font:500 10.5px 'Inter',system-ui,sans-serif; color:#475163; text-shadow:0 0 2px #fff,0 0 2px #fff,0 0 3px #fff,0 0 4px #fff; pointer-events:none; }
.gsr .map-label.city span { font-weight:600; font-size:11.5px; color:#273241; }
.gsr .map-label.state span { font-weight:700; font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:#6b7686; }
.gsr .leaflet-popup-content { margin:10px 12px; } .gsr .leaflet-popup-content a { text-decoration:underline; font-weight:600; }
.gsr .geo-controls select { max-width:260px; }
.gsr .map-side .tbl th, .gsr .map-side .tbl td { white-space:normal; }
.gsr .map-side .tbl tbody th { font-weight:600; }
.gsr .map-side .card { min-width:0; overflow:hidden; }
.gsr .leaflet-container :focus-visible { outline:3px solid #1D4ED8; outline-offset:2px; }
.gsr .map-tip { font-size:.75rem; line-height:1.4; color:#0F172A; }
.gsr .map-tip b { color:#0F172A; }

/* lead sources: state color key under the location charts, full tables behind "All …" */
.gsr .legend-row { display:flex; flex-wrap:wrap; gap:4px 14px; font-size:.6875rem; color:var(--ink-2); margin-top:8px; }
.gsr .legend-row i { display:inline-block; width:10px; height:10px; border-radius:2px; margin-right:5px; vertical-align:-1px; }
.gsr details.more { margin-top:12px; border-top:1px solid var(--border); padding-top:10px; }
.gsr details.more > summary { cursor:pointer; font-weight:700; font-size:.75rem; color:var(--accent-ink); min-height:24px; }
.gsr details.more[open] > summary { margin-bottom:8px; }

/* forms: code editor beside a live preview */
.gsr .form-editor { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:16px; align-items:start; }
.gsr .form-editor .card { min-width:0; }
.gsr .form-editor .card-head { flex-wrap:wrap; }
.gsr textarea.code { display:block; width:100%; min-height:640px; resize:vertical; padding:12px 14px; border:1px solid #475569; border-radius:8px; background:#0F172A; color:#E2E8F0;
  font:12.5px/1.55 ui-monospace,SFMono-Regular,Consolas,'Liberation Mono',monospace; tab-size:2; white-space:pre; overflow:auto; }
.gsr .preview-box { overflow:auto; background:var(--surface-2); border:1px solid var(--border); border-radius:8px; padding:10px; }
.gsr .preview-box iframe { display:block; width:100%; height:640px; margin:0 auto; border:1px solid var(--border-strong); border-radius:6px; background:#fff; }
.gsr .plain-list { list-style:none; margin:10px 0 0; padding:0; }
.gsr .plain-list li { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:8px 0; border-top:1px solid var(--border); font-size:.8125rem; }
.gsr table.kv { width:100%; border-collapse:collapse; margin-top:10px; font-size:.8125rem; }
.gsr table.kv th { text-align:left; font-weight:700; color:var(--ink-2); padding:6px 12px 6px 0; vertical-align:top; white-space:nowrap; width:1%; border-top:1px solid var(--border); }
.gsr table.kv td { padding:6px 0; border-top:1px solid var(--border); color:var(--ink-2); }
.gsr table.kv td a { text-decoration:underline; text-underline-offset:2px; word-break:break-all; }
.gsr details.add-form { margin-top:14px; border-top:1px solid var(--border); padding-top:10px; }
.gsr details.add-form > summary { cursor:pointer; font-weight:700; font-size:.8125rem; min-height:24px; }
.gsr kbd { font:600 .78em ui-monospace,Consolas,monospace; border:1px solid var(--border-strong); border-bottom-width:2px; border-radius:4px; padding:0 4px; background:var(--surface); color:var(--ink); }

/* ---------- module views added in GymSpotter OS: Monthly reports, Import & sync ---------- */
.gsr .month-cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:12px; }
.gsr .month-card { display:flex; flex-direction:column; gap:8px; }
.gsr .month-card .mc-top { display:flex; justify-content:space-between; align-items:flex-start; gap:8px; }
.gsr .month-card .mc-name { font:800 1rem 'Manrope','Inter',sans-serif; color:var(--ink); }
.gsr .month-card .mc-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
.gsr .month-card .mc-stats div { background:var(--surface-2); border:1px solid var(--border); border-radius:6px; padding:6px 8px; }
.gsr .month-card .mc-stats b { display:block; font:800 .9375rem 'Manrope','Inter',sans-serif; color:var(--ink); }
.gsr .month-card .mc-stats span { font-size:.625rem; font-weight:700; text-transform:uppercase; letter-spacing:.4px; color:var(--ink-3); }
.gsr .month-card .controls { margin-top:auto; }
.gsr .year-head { font:800 .75rem 'Manrope','Inter',sans-serif; text-transform:uppercase; letter-spacing:.8px; color:var(--ink-3); margin:18px 0 8px; }
.gsr .form-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:12px; align-items:end; }
.gsr .field { display:flex; flex-direction:column; gap:5px; min-width:0; }
.gsr .field > span { font-size:.6875rem; font-weight:700; text-transform:uppercase; letter-spacing:.4px; color:var(--ink-3); }
.gsr .field select, .gsr .field input { width:100%; }
.gsr .dropzone { border:2px dashed var(--border-strong); border-radius:var(--gymspotter-radius); background:var(--surface-2); padding:22px; text-align:center; color:var(--ink-3); transition:border-color var(--gymspotter-t-fast),background var(--gymspotter-t-fast); }
.gsr .dropzone.over { border-color:var(--accent); background:var(--accent-dim); color:var(--accent-ink); }
.gsr .dropzone i { font-size:1.5rem; color:var(--accent); display:block; margin-bottom:6px; }
.gsr .dropzone label { cursor:pointer; color:var(--accent-ink); font-weight:700; text-decoration:underline; text-underline-offset:2px; }
.gsr .file-list { list-style:none; margin-top:10px; display:grid; gap:6px; }
.gsr .file-list li { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:8px 10px; border:1px solid var(--border); border-radius:8px; background:var(--surface); font-size:.8125rem; }
.gsr .file-list li .nm { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--ink); font-weight:600; }
.gsr .progress { height:6px; border-radius:99px; background:var(--surface-3); overflow:hidden; min-width:80px; }
.gsr .progress > i { display:block; height:100%; width:0; background:var(--accent); transition:width .2s; }
.gsr .how { font-size:.75rem; color:var(--ink-3); line-height:1.6; margin-top:8px; }
.gsr .src-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:10px; }
.gsr .src { display:flex; gap:10px; align-items:flex-start; padding:12px; border:1px solid var(--border); border-radius:var(--gymspotter-radius-sm); background:var(--surface); text-align:left; cursor:pointer; color:inherit; font:inherit; }
.gsr .src:hover { border-color:var(--accent); background:var(--accent-dim); }
.gsr .src[aria-pressed="true"] { border-color:var(--accent); box-shadow:0 0 0 2px var(--accent) inset; }
.gsr .src .ic { width:34px; height:34px; border-radius:8px; background:var(--surface-2); display:flex; align-items:center; justify-content:center; flex-shrink:0; font-size:1rem; }
.gsr .src b { display:block; color:var(--ink); font-size:.8125rem; }
.gsr .src small { display:block; color:var(--ink-3); font-size:.6875rem; line-height:1.45; margin-top:2px; }
.gsr .job-row { display:flex; align-items:center; gap:10px; justify-content:space-between; flex-wrap:wrap; }
.gsr .state-dot { display:inline-block; width:8px; height:8px; border-radius:50%; background:var(--line-4); margin-right:6px; vertical-align:1px; }
.gsr .state-dot.ok { background:var(--good); } .gsr .state-dot.warn { background:var(--warn); } .gsr .state-dot.bad { background:var(--bad); } .gsr .state-dot.run { background:var(--accent); animation:gsrPulse 1s ease-in-out infinite; }
@keyframes gsrPulse { 50% { opacity:.35; } }

/* ---------- user preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  .gsr *, .gsr *::before, .gsr *::after { transition:none !important; animation:none !important; scroll-behavior:auto !important; }
}
@media (forced-colors: active) { /* Windows High Contrast: keep states visible without colour */
  .gsr .chip.active, .gsr .tabs a.active, .gsr .src[aria-pressed="true"] { outline:2px solid CanvasText; }
  .gsr .kpi .bar, .gsr .spark { forced-color-adjust:auto; }
  .gsr :focus-visible { outline-color:Highlight; }
}

/* ---------- responsive ---------- */
@media (max-width:1200px) { .gsr .form-editor { grid-template-columns:1fr; } .gsr textarea.code { min-height:420px; } }
@media (max-width:1100px) { .gsr .cols-3 { grid-template-columns:repeat(2,minmax(0,1fr)); } .gsr .map-layout { grid-template-columns:1fr; } .gsr .map-box { height:520px; } }
@media (max-width:860px) {
  .gsr .cols-2, .gsr .cols-3, .gsr .missed-row { grid-template-columns:1fr; }
  .gsr .kpis { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .gsr .kpi .val { font-size:1.25rem; }
  .gsr .doc-frame { height:70vh; min-height:420px; }
  .gsr-toolbar-actions .gymspotter-select { max-width:180px; }
}
@media (max-width:640px) { .gsr .feed li { grid-template-columns:1fr; gap:2px; } .gsr-privacy .gsr-privacy-text { display:none; } }
