/* Cridget admin — service-specific rules on top of glass.css (the shared
   *LiveService design system). Generic components (shell, cards, pills,
   buttons, switches, stat panels, tables, settings rows) live in glass.css;
   keep this file to things only this dashboard draws. */

/* ---- Shell, auth, tabs -------------------------------------------------- */
/* While the initial auth check is in flight the splash shows instead of the
   login form, so a valid session never flashes the sign-in card on reload. */
body.auth-checking #app, body.auth-checking #authOverlay { display: none !important; }
body.auth-locked #app { display: none; }
.auth-hidden { display: none !important; }
#loginError, #mfaError { display: none; color: var(--bad); font-size: 12px; min-height: 16px; }
#mfaInfo { display: none; color: var(--good); font-size: 12px; }
#mfaCode { font-size: 20px; letter-spacing: 4px; text-align: center; }
.auth-card label.mfa-remember { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--g-text); }
.mfa-links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 12px; }
.unavailable-status { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--g-muted); }
.unavailable-status .spinner { width: 14px; height: 14px; border-width: 2px; flex: none; }
.mfa-qr { background: #fff; padding: 8px; border-radius: 10px; width: 188px; height: 188px; flex: none; }
.mfa-qr svg { width: 100%; height: 100%; display: block; }
.mfa-codes { display: grid; grid-template-columns: repeat(2, max-content); gap: 4px 24px; padding: 10px 14px; background: var(--g-well); border: 1px solid var(--g-line); border-radius: var(--r-sm); font-size: 14px; font-family: var(--font-mono); }

/* Top-left background wash. glass.css mixes a fixed share of --accent, but
   Cridget's green (#308527) is darker and less chromatic than Reader's orange
   (OKLab C .15 vs .21), so the same share reads fainter. Scale it up
   (dark 28%, tuned by eye; light 22%) so the glow sits at Reader's level. */
:root { --wash-1: color-mix(in oklab, var(--accent) 28%, transparent); }
:root[data-theme="light"] { --wash-1: color-mix(in oklab, var(--accent) 22%, transparent); }

/* Provider calls switched off: the status light pulses red. */
.status-dot.pulse { animation: cr-pulse 1.5s ease-in-out infinite; }
@keyframes cr-pulse { 50% { opacity: .55; box-shadow: 0 0 0 7px var(--bad-soft); } }

/* Open-issue count beside the Issues nav item. */
.nav-count:not(:empty) { margin-left: 6px; padding: 0 6px; border-radius: var(--r-pill); font-size: 10.5px; font-weight: 600; line-height: 16px; background: var(--bad-soft); color: var(--bad); }

/* Top bar: the auto-refresh picker sits with the Refresh button. */
.auto-refresh { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--g-muted); }

/* The renderers were written against a zero-margin reset; headings, paragraphs
   and preformatted blocks state any spacing they want inline. */
#app :is(h1, h2, h3, h4, p, pre, figure) { margin: 0; }
/* Wide tables (Devices, Usage by Match, API Log, By Endpoint…) scroll inside
   their card rather than running past its edge beside the sidebar. */
.card-body:has(table) { overflow-x: auto; }

.tab-section { display: none; }
.tab-section.active { display: block; }
.full-width { grid-column: 1 / -1; }
.pill:empty { display: none; }
.empty { color: var(--g-muted); text-align: center; padding: 20px; }
.section-heading { font-size: 11px; color: var(--g-muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; margin-bottom: 8px; }
.error-banner { display: none; }
.scroll-body { height: calc(100vh - 260px); height: calc(100dvh - 260px); overflow-y: auto; }
/* Top API Log summary cards size naturally, not full viewport height. */
.compact-scroll-body { max-height: 320px; overflow-y: auto; }
.card-header .hdr-note { font-size: var(--fs-xs); color: var(--g-muted); font-weight: 400; }
/* A column of cards beside a taller one in the same grid row. */
.card-stack { display: flex; flex-direction: column; gap: var(--gutter); min-width: 0; }
.card-stack .card { margin-bottom: 0; }

/* ---- Label / value rows (statRow) --------------------------------------- */
/* Long detail lists — the Service card, Workers, Push Worker Stats — read as
   label on the left, value on the right; the headline numbers each tab opens
   with are Glass .stat-row panels instead. */
.kv-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--g-line); }
.kv-row:last-child { border-bottom: none; }
.stat-label { color: var(--g-muted); font-size: var(--fs-md); }
.stat-value { font-weight: 500; font-variant-numeric: tabular-nums; }
.stat-value.green { color: var(--good); } .stat-value.red { color: var(--bad); }
.stat-value.yellow { color: var(--warn); } .stat-value.orange { color: var(--caution); }
.stat-value.accent { color: var(--accent-ink); }
/* A tab's headline panel carries up to a dozen cells; trim the padding so it
   stays on one line at a ~1220px window instead of wrapping a lone cell. */
.stat-row > .stat { padding: 10px 9px 9px; }
.stat-row .stat .l { font-size: 10.5px; }
/* .v is a flex box, which drops the space between a number and its trailing
   note ("3 (0.2%)", "15 79%"); the gap puts it back. */
.stat .v { column-gap: .3em; }
.stat-row + .seg { margin-top: 12px; }
/* Server tile: both rows on one five-column grid so every divider lines up —
   Version | Node | Uptime | vCPUs | Memory over Provider (spanning 1–2) | Poll
   interval | Discovery | Pre-match lead. Cells may shrink below their content
   (Glass rows don't), so a long label truncates instead of overflowing.
   Columns 4–5 are uneven: vCPUs is a single digit, so it lends a quarter of
   its width to Memory's "Memory · of 3.7 GB" label (which truncated on iPad).
   Both rows use this template, so Discovery and Pre-match lead follow. */
.stat-row.server-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 0.75fr) minmax(0, 1.25fr); }
.stat-row.server-grid > * { min-width: 0; }
.server-grid .l { overflow: hidden; text-overflow: ellipsis; }
.server-grid > .provider { grid-column: 1 / 3; }
.host-tag { font: 500 var(--fs-xs)/1 var(--font); color: var(--g-muted); letter-spacing: 0; }
/* The card sits in a two-column pair, so its width — not the viewport's —
   decides when five columns stop fitting. Below that, three columns: Memory
   (the long label) spans two, and Provider takes a line of its own. */
.card-body:has(> .server-grid) { container-type: inline-size; }
@container (max-width: 560px) {
    .stat-row.server-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .server-grid > .provider { grid-column: 1 / -1; }
    .server-grid > .memory { grid-column: span 2; }
}

/* ---- Buttons ------------------------------------------------------------ */
/* trigger-btn: the accent action pill used by worker "Run" buttons and Test
   pushes, pushed to the right of its row. */
.trigger-btn { margin-left: auto; color: var(--accent-ink); }
.action-btn.ok, .trigger-btn.ok { color: var(--good); border-color: color-mix(in oklab, var(--good) 45%, transparent); }
.action-btn.orange { color: var(--caution); }
/* Small pills inside list rows. */
.intent-btn, .reg-delete { min-height: 22px; padding: 2px 9px; font-size: 11px; }
.reg-delete { color: var(--bad); }
.reg-delete:hover:not(:disabled) { background: var(--bad-soft); border-color: color-mix(in oklab, var(--bad) 45%, transparent); color: var(--bad); }
.intent-btn { color: var(--g-muted); }
.intent-btn.danger { color: var(--bad); }
.intent-btn.danger:hover:not(:disabled) { background: var(--bad-soft); border-color: color-mix(in oklab, var(--bad) 45%, transparent); color: var(--bad); }

/* ---- Tab bars and filter pills ------------------------------------------ */
.tab-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 0 18px; border-bottom: 1px solid var(--g-line); }
.tab-bar button { background: none; border: none; color: var(--g-muted); padding: 8px 10px; font: 500 var(--fs-sm)/1.2 var(--font); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab-bar button.active { color: var(--accent-ink); border-bottom-color: var(--accent); }
.tab-bar button:hover { color: var(--g-text); }
.filter-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: var(--gutter); }
.filter-bar button { background: var(--g-well); border: 1px solid var(--g-line); color: var(--g-muted); height: 28px; padding: 0 12px; border-radius: var(--r-pill); font: 500 var(--fs-sm)/1 var(--font); cursor: pointer; }
.filter-bar button:hover { color: var(--g-text); }
.filter-bar button.active { background: var(--accent-soft); border-color: var(--accent-ring); color: var(--accent-ink); }
/* Page-level filter row above a tab's cards (Performance, API Log). */
.page-filters { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: var(--gutter); }

/* ---- Charts ------------------------------------------------------------- */
.api-chart { width: 100%; height: 80px; margin: 8px 0; position: relative; }
.api-chart svg { width: 100%; height: 100%; }
.api-chart-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: var(--fs-xs); color: var(--g-muted); margin-bottom: 12px; }
.api-chart-legend span { display: flex; align-items: center; gap: 5px; }
.api-chart-legend .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
/* One invisible column per bucket, covering the gaps as well as the bars, so
   nowhere in the plot area reads as "no bucket". */
.chart-hit { fill: transparent; pointer-events: all; cursor: pointer; }
.chart-hit:hover, .chart-hit.pinned { fill: color-mix(in oklab, var(--g-muted) 14%, transparent); }
.chart-tooltip {
  position: fixed; z-index: 500; pointer-events: none; left: 0; top: 0;
  padding: 6px 10px; border-radius: var(--r-sm); font-size: var(--fs-xs); line-height: 1.45; white-space: pre-line; max-width: 260px;
  color: var(--g-text); background: var(--g-glass-strong); border: 1px solid var(--g-line); box-shadow: var(--g-shadow-lg);
  -webkit-backdrop-filter: blur(var(--blur)); backdrop-filter: blur(var(--blur));
  opacity: 0; transition: opacity .08s ease;
}
.chart-tooltip.show { opacity: 1; }

/* ---- Tables ------------------------------------------------------------- */
.analytics-table, .dev-table { font-size: var(--fs-sm); }
.analytics-table th, .analytics-table td, .dev-table th, .dev-table td { padding: 6px 8px; font-size: var(--fs-sm); }
.dev-table th, .analytics-table th { font-size: var(--fs-xs); white-space: nowrap; }
.analytics-table td { font-variant-numeric: tabular-nums; }
.dev-table td { vertical-align: top; }
.analytics-table .num { text-align: right; }
.analytics-table .path { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.full-width .analytics-table .path { max-width: 400px; }
/* Match Usage carries more numeric columns, so its Match cell is tighter. */
#matchUsageBody .analytics-table .path { max-width: 340px; }

/* ---- Matches ------------------------------------------------------------ */
.match-row { cursor: pointer; }
/* Beside the sidebar the auto-sized Next Poll / Start columns (nowrap) took the
   width first and squeezed the match name into a three-line column. */
#matchesBody .analytics-table > tbody > tr:not(.match-detail) > td:first-child { min-width: 220px; }
.match-status { font-size: 11px; padding: 2px 8px; border-radius: var(--r-pill); font-weight: 600; white-space: nowrap; min-width: 90px; text-align: center; display: inline-block; background: var(--neutral-soft); color: var(--g-muted); }
.match-status.in_play, .match-status.toss, .match-status.super_over { background: var(--good-soft); color: var(--good); }
.match-status.scheduled { background: var(--info-soft); color: var(--info); }
.match-status.stumps, .match-status.lunch, .match-status.tea, .match-status.drinks,
.match-status.innings_break, .match-status.rain_delay, .match-status.delay,
.match-status.strategic_timeout { background: var(--warn-soft); color: var(--warn); }
.match-status.abandoned, .match-status.no_result { background: var(--bad-soft); color: var(--bad); }
/* Server gave up fetching — not a cricket outcome, so deliberately not styled like abandoned. */
.match-status.unavailable { box-shadow: inset 0 0 0 1px var(--g-line-strong); }
.match-status.simulated { background: color-mix(in oklab, var(--violet) 15%, transparent); color: var(--violet); }
.match-name { flex: 1; min-width: 0; }
.match-name .title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match-name .score { font-size: 12px; color: var(--g-muted); }
.match-updated { font-size: 11px; color: var(--g-muted); white-space: nowrap; }
/* Format beside a match title, wherever a match is named. */
.format-tag { font-weight: 500; color: var(--g-muted); text-transform: uppercase; font-size: 11px; margin-left: 5px; letter-spacing: .03em; }

/* Expandable detail row. It MUST stay a table-row (not display:block): a block
   inside a tbody splits the table into separate anonymous tables that size
   their columns independently, which made the columns shift on expand. */
.match-detail { display: none; font-size: 12px; }
.match-detail.open { display: table-row; }
tbody tr.match-detail:hover { background: none; }
.match-detail > td { background: var(--g-well); border-top: 1px solid var(--g-line); padding: 12px 16px; }
.match-detail .detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
/* Grid children may shrink below their content so wide values scroll in their own box. */
.match-detail .detail-grid > * { min-width: 0; }
.match-detail .detail-section { margin-bottom: 10px; }
.match-detail .detail-section:last-child { margin-bottom: 0; }
/* Action bar across the top of an expanded match (poll interval, Stop Tracking /
   Reactivate). Controls come from the design system's .field-bar; this only
   lays it out: status on the left, actions pushed right. */
.match-detail .detail-actions { padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid var(--g-line); }
.match-detail .detail-actions .detail-heading { margin-bottom: 0; }
.match-detail .detail-actions-status { color: var(--g-muted); }
.match-detail .detail-actions-override { color: var(--accent-ink); font-weight: 600; }
.match-detail .detail-actions-spacer { flex: 1; }
.match-detail .detail-actions-divider { width: 1px; align-self: stretch; margin: 4px 2px; background: var(--g-line); }
.match-detail .detail-heading { font-size: 11px; font-weight: 600; color: var(--g-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.match-detail .detail-row { display: flex; justify-content: space-between; padding: 3px 0; }
.match-detail .detail-label { color: var(--g-muted); }
.match-detail .detail-value { font-weight: 500; text-align: right; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-detail .team-score { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.match-detail .team-name { font-weight: 500; min-width: 40px; }
.match-detail .innings-scores { color: var(--g-muted); }
.match-detail .player-row { display: flex; gap: 8px; padding: 2px 0; font-variant-numeric: tabular-nums; }
.match-detail .player-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-detail .player-stat { color: var(--g-muted); min-width: 30px; text-align: right; }
.match-detail .player-stat.bold { font-weight: 600; color: var(--g-text); }
.match-detail .balls-row { display: flex; gap: 3px; flex-wrap: wrap; margin-top: 4px; }
.match-detail .ball { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; font-size: 10px; font-weight: 600; background: var(--g-glass-strong); border: 1px solid var(--g-line); }
.match-detail .ball.w { background: var(--bad-soft); color: var(--bad); border-color: var(--bad); }
.match-detail .ball.four { background: var(--info-soft); color: var(--info); border-color: var(--info); }
.match-detail .ball.six { background: var(--good-soft); color: var(--good); border-color: var(--good); }

/* ---- Events ------------------------------------------------------------- */
.event-row { padding: 6px 0; border-bottom: 1px solid var(--g-line); font-size: 12px; display: flex; gap: 8px; align-items: baseline; }
.event-row:last-child { border-bottom: none; }
.event-time { color: var(--g-muted); white-space: nowrap; min-width: 65px; }
.event-level { font-size: 10px; padding: 1px 7px; border-radius: var(--r-pill); font-weight: 600; text-transform: uppercase; }
.event-level.info { background: var(--info-soft); color: var(--info); }
.event-level.warn { background: var(--warn-soft); color: var(--warn); }
.event-level.error { background: var(--bad-soft); color: var(--bad); }
.event-source { color: var(--g-muted); min-width: 70px; }
.event-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Registrations, intents, recent starts ------------------------------ */
/* Indented: a row is always the content *under* a grouping heading — the
   devices watching a match, or the matches on a device. */
.reg-row { padding: 8px 0 8px 14px; border-bottom: 1px solid var(--g-line); font-size: 12px; }
.reg-row:last-child { border-bottom: none; }
.reg-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.reg-match { font-weight: 600; color: var(--g-text); }
.reg-detail { color: var(--g-muted); }
/* Three levels of detail line, shared by Registrations and the Live Activities
   Tools panel: a primary line, a lighter one for hardware and network, and a
   de-emphasised one for raw identifiers (tabular, so IDs line up). */
.detail-line { color: var(--g-muted); font-size: 12px; line-height: 1.55; }
.detail-meta { color: var(--g-muted); font-size: 11px; line-height: 1.55; opacity: .8; }
.detail-id { color: var(--g-muted); font-size: 11px; line-height: 1.55; opacity: .6; font-variant-numeric: tabular-nums; }
.detail-id-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.detail-block { margin-top: 3px; }
.detail-block + .detail-block { margin-top: 5px; }
/* Grouping heading: the heavy rule sits *above* it, separating groups; the
   light rule under it only divides a heading from its own rows. */
.reg-group { margin-top: 14px; padding: 14px 0 6px; border-top: 1px solid var(--g-line-strong); border-bottom: 1px solid var(--g-line); }
.reg-group:first-child { margin-top: 0; padding-top: 2px; border-top: none; }
.reg-row:has(+ .reg-group) { border-bottom: none; }
.push-start-row { padding: 3px 0; border-bottom: 1px solid var(--g-line); }
.push-start-row:last-child { border-bottom: none; }
/* Intents: same three-line structure as a registration, flush left (no nesting). */
.intent-row { padding: 8px 0; border-bottom: 1px solid var(--g-line); font-size: 12px; }
.intent-row:last-child { border-bottom: none; }

/* ---- Devices ------------------------------------------------------------ */
.heatmap-grid { display: flex; flex-wrap: wrap; gap: 3px; }
.heat-cell { width: 15px; height: 15px; border-radius: 4px; cursor: default; border: 1px solid var(--g-line); }
.heatmap-legend { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 11px; color: var(--g-muted); }
.heatmap-legend .scale { display: flex; gap: 2px; }
.heatmap-legend .scale span { width: 13px; height: 13px; border-radius: 3px; }
.dev-group-heading { font-size: 11px; color: var(--g-muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; margin: 14px 0 6px; display: flex; align-items: center; gap: 8px; }
.dev-group-heading:first-child { margin-top: 0; }
.dev-group-heading .count { background: var(--g-well); border: 1px solid var(--g-line); border-radius: var(--r-pill); padding: 1px 8px; font-size: 10px; }
/* Group headings live inside the single devices table so every group shares
   one set of column widths; the heading cell spans the row with no rule. */
.dev-table td.dev-group-cell { padding: 0; border-bottom: none; }
tbody tr:has(> td.dev-group-cell):hover { background: none; }
.dev-table .dev-group-heading { margin-top: 14px; }
.dev-table tr:first-child .dev-group-heading { margin-top: 0; }
.dev-model { font-weight: 500; font-size: 12px; }
.dev-sub { font-size: 11px; color: var(--g-muted); margin-top: 1px; }
.dev-id { display: flex; align-items: center; gap: 5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.copy-glyph { cursor: pointer; opacity: .55; font-size: 11px; line-height: 1; user-select: none; }
.copy-glyph:hover { opacity: 1; color: var(--accent-ink); }
.copy-glyph.copied { opacity: 1; color: var(--good); }
.dev-table th.dev-sortable { cursor: pointer; user-select: none; }
.dev-table th.dev-sortable:hover { color: var(--g-text); }
.dev-table th.sorted { color: var(--accent-ink); }
.dev-sort-reset { margin-left: auto; background: var(--g-well); border: 1px solid var(--g-line); color: var(--g-muted); border-radius: var(--r-pill); padding: 2px 10px; font-size: 10px; cursor: pointer; text-transform: none; letter-spacing: 0; }
.dev-sort-reset:hover { border-color: var(--accent-ring); color: var(--accent-ink); }
/* Per-device Admin drilldown, kept out of the row until its Admin button is
   pressed. A hidden row must not swallow the rule of the row above it. */
.dev-table tr.dev-admin-row { display: none; }
.dev-table tr.dev-admin-row.open { display: table-row; }
.dev-table tr:has(+ tr.dev-admin-row:last-child) td { border-bottom: none; }
.dev-admin-panel { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--g-well); border: 1px solid var(--g-line); border-radius: var(--r-sm); padding: 8px 10px; }
.dev-pill { display: inline-block; font-size: 10px; padding: 1px 7px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.dev-pill.env-prod { background: var(--good-soft); color: var(--good); }
.dev-pill.env-sandbox { background: var(--warn-soft); color: var(--warn); }
.dev-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---- Settings ----------------------------------------------------------- */
/* One section visible at a time; every section stays in the DOM so the save
   bar's Save collects every field. */
.settings-section { display: none; }
.settings-section.active { display: block; }
.setting-row > div:first-child { flex: 1 1 auto; }
.setting-input.setting-input-textarea { width: min(440px, 100%); min-width: 0; min-height: 120px; text-align: left; resize: vertical; line-height: 1.35; flex-shrink: 1; }
.setting-input.setting-input-datetime { width: 220px; min-width: 220px; text-align: left; }
select.setting-input { text-align: left; }
/* Danger zone: the destructive actions sit in a red-tinted group. */
.group.danger { background: var(--bad-soft); border-color: color-mix(in oklab, var(--bad) 30%, transparent); }
.group.danger .setting-label { color: var(--bad); font-weight: 600; }
/* A group title carrying an ⓘ. */
.group-title.setting-title { display: flex; }
/* The renderers' in-card groups ("Live Poller", "Discovery"…) read as Glass
   group titles. */
.settings-group + .settings-group { margin-top: var(--sp-4); }
.settings-group-title { font-size: var(--fs-sm); font-weight: 600; color: var(--g-muted); margin: 0 0 2px; }

/* Explorer: response panes. */
.explorer-pre { background: var(--g-well); border: 1px solid var(--g-line); border-radius: var(--r-sm); padding: 12px; font: 12px/1.5 var(--font-mono); overflow: auto; max-height: 600px; white-space: pre-wrap; word-break: break-word; color: var(--g-text); margin: 0; }
.explorer-meta { display: none; margin-bottom: 8px; font-size: 12px; color: var(--g-muted); font-family: var(--font-mono); gap: 16px; flex-wrap: wrap; }

/* Forecast history: a modal over the page. */
.modal-overlay { display: none; position: fixed; inset: 0; z-index: 1000; align-items: flex-start; justify-content: center; padding: 40px 12px; overflow: auto; background: rgba(0,0,0,.45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.modal-overlay > .card { width: min(880px, 96vw); background: var(--g-glass-strong); }

/* App Management: URLs and versions are longer than the 84px number box. */
#set_appStoreUrl { width: 240px; text-align: left; }
#set_availableAppVersion { width: 96px; }

/* ---- Touch screens --------------------------------------------------------
   iPhone Duo's inner screen, iPad, a phone on its side. Gated on input, never
   width: a 1000px desktop window is the same viewport as the Duo, and a mouse
   or trackpad must see no change at any size. */
@media (pointer: coarse) {
  /* API Log filter pills are Cridget's own, so Glass's touch sizes miss them. */
  .filter-bar button { height: 34px; }
  /* The ⧉ copy glyph keeps its look; only the hit area grows. */
  .copy-glyph { position: relative; }
  .copy-glyph::after { content: ""; position: absolute; inset: -11px; }
}
@media (pointer: coarse) and (orientation: landscape) {
  /* Room for the Match column without forcing the table into a scroll. */
  #matchesBody .analytics-table > tbody > tr:not(.match-detail) > td:first-child { min-width: 140px; }
  /* Glass's .pin-first, for tables with full-width rows (group headings,
     detail and payload rows): those span every column, so they're skipped. */
  .pin-rows tr > :first-child:not([colspan]) {
    position: sticky; left: 0; z-index: 1; background: var(--g-field-solid);
    box-shadow: inset -1px 0 0 var(--g-line);
  }
  .pin-rows tbody tr:hover > :first-child:not([colspan]) { background: color-mix(in oklab, var(--accent) 8%, var(--g-field-solid)); }
  /* Devices: the group heading stays in view while the rows scroll. */
  .pin-rows .dev-group-heading { position: sticky; left: 0; width: max-content; }
  /* Performance › Endpoints: the label is Method + Endpoint, so both pin. */
  .pin-two tr > :nth-child(-n+2) { position: sticky; z-index: 1; background: var(--g-field-solid); }
  .pin-two tr > :first-child { left: 0; width: 64px; min-width: 64px; max-width: 64px; }
  .pin-two tr > :nth-child(2) { left: 64px; box-shadow: inset -1px 0 0 var(--g-line); }
  .pin-two tbody tr:hover > :nth-child(-n+2) { background: color-mix(in oklab, var(--accent) 8%, var(--g-field-solid)); }
}
