/* RealPlay staff workspace. Design rules: 02_Projects/Data/Both/Player_Capability_Model/01_Brief_Research/2026-09-27_Staff_Site_UI_UX_Research.md
   Light, positive polarity; RealPlay navy #0F1742 is the single brand and action color; body text 7:1+; Inter self-hosted.
   Inter (c) 2016 The Inter Project Authors, SIL Open Font License 1.1 (https://github.com/rsms/inter). */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/InterVariable.woff2") format("woff2");
}
:root {
  --canvas: #f4f6fa; --surface: #ffffff; --sub: #f8f9fc; --line: #e3e6ee; --line-2: #d5d9e4; --ctl: #858ba3;
  --text: #141a33; --text-2: #4f5775; --text-3: #6b7290;
  --navy: #0f1742; --navy-hover: #1c2766; --navy-soft: #e8eaf3; --link-line: #0f174266; --row-hover: #f3f4f9;
  --violet: #5b21d1; --violet-soft: #f3edff;
  --pos: #16794a; --pos-dot: #25a567; --neg: #c0342a; --bad-bg: #fcefed; --bad-line: #f0c9c4;
  --warn: #8a5300; --warn-bg: #fdf5e6; --warn-line: #efd9ae; --warn-dot: #d98a10;
  --r-ctl: 8px; --r-card: 10px; --shadow: 0 1px 2px #141a330d; --pop-shadow: 0 10px 30px #141a3326;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --sidebar: 232px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; }
body { margin: 0; color: var(--text); background: var(--canvas); font: 14px/20px var(--font); font-feature-settings: "cv05" 1, "calt" 1; -webkit-font-smoothing: antialiased; }
::selection { background: #d9ddf0; color: var(--text); }
button, input, select { font: inherit; color: inherit; }
button, input, select, summary, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--navy); text-decoration: underline; text-decoration-color: var(--link-line); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--navy); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
h1[tabindex="-1"]:focus, [tabindex="-1"]:focus { outline: none; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { margin: 0; font-size: 22px; line-height: 28px; font-weight: 600; letter-spacing: -.015em; }
h2 { margin: 0; font-size: 16px; line-height: 22px; font-weight: 600; letter-spacing: -.01em; }
h3 { margin: 0; font-size: 14px; line-height: 20px; font-weight: 600; }
.skip-link { position: fixed; left: 12px; top: -100px; z-index: 10; padding: 10px 16px; background: var(--surface); border: 1px solid var(--navy); border-radius: var(--r-ctl); font-weight: 600; }
.skip-link:focus { top: 10px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.num, td.num, th.num { font-variant-numeric: tabular-nums; }

/* Shell */
.app-shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.app-shell:has(> .sidebar[hidden]) { grid-template-columns: minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 22px; padding: 18px 12px; background: var(--canvas); border-right: 1px solid var(--line); overflow-y: auto; }
.brand-plate { display: inline-flex; padding: 10px 12px; border-radius: 10px; background: var(--navy); }
.brand-plate img { display: block; width: 116px; height: auto; }
.sidebar-brand { display: grid; justify-items: start; gap: 6px; padding: 2px 6px; }
.brand-sub { padding-left: 2px; font-size: 12px; font-weight: 500; color: var(--text-3); }
.sidebar-nav { display: grid; gap: 2px; }
.nav-label { margin: 14px 0 6px; padding: 0 10px; font-size: 12px; font-weight: 500; color: var(--text-3); }
.nav-label:first-child { margin-top: 0; }
.nav-item { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 10px; border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--text-2); text-align: left; font-weight: 500; text-decoration: none; cursor: pointer; }
.nav-item svg { width: 16px; height: 16px; flex: 0 0 16px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-item:hover { background: #e9ecf3; color: var(--text); }
.nav-item[aria-current="page"] { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 0 0 1px var(--line), var(--shadow); }
.nav-item[aria-current="page"] svg { color: var(--navy); }
.sidebar-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid var(--line); }
.avatar { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: 50%; background: var(--navy); color: #fff; font-size: 12px; font-weight: 600; }
.avatar:empty { display: none; }
.session { display: grid; min-width: 0; }
#session-status { font-size: 12.5px; line-height: 16px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#sign-out { font-size: 12.5px; line-height: 18px; font-weight: 500; color: var(--text-2); }

.workspace { min-width: 0; width: 100%; max-width: 1440px; margin: 0 auto; padding: 24px 28px 48px; }
.workspace:focus { outline: none; }
.workspace > section { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; }
#player-result, #vip-result, #vip-summary, #vip-coverage, .record-main, .tab-panel, .body, .group, .query-bar, .vip-filter-card { min-width: 0; }
#player-result, #vip-result, #vip-summary, #vip-coverage, .tab-panel, .body { grid-template-columns: minmax(0, 1fr); }
.workspace > section[hidden] { display: none; }
.page-heading { display: grid; gap: 4px; }
.page-title { font-size: 22px; line-height: 28px; }
.intro { margin: 0; color: var(--text-2); max-width: 70ch; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.crumb-link { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; padding: 0 8px 0 2px; border: 0; border-radius: 6px; background: transparent; color: var(--text-2); font-weight: 500; cursor: pointer; }
.crumb-link svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.crumb-link:hover { color: var(--text); background: #e9ecf3; }
.eyebrow { margin: 0 0 6px; font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.card { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); }
.query-bar, .member-card, #staff-access-editor, .record-rail, .signin-card, .dialog-content, .more .inner, .metric-guide .inner, .vip-definitions .body { grid-template-columns: minmax(0, 1fr); }

/* Forms and buttons */
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field label, .field-label { font-size: 12.5px; line-height: 16px; font-weight: 500; color: var(--text-2); }
.profile-brand { display: grid; gap: 10px; margin-top: 4px; padding-top: 20px; border-top: 1px solid var(--line); }
.brand-choices { display: grid; gap: 8px; }
.brand-choice { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; padding: 14px; text-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.brand-choice:hover { background: var(--sub); border-color: var(--line-2); }
.brand-choice-mark { width: 18px; height: 18px; border: 1.5px solid var(--ctl); border-radius: 50%; background: var(--surface); }
.brand-choice-name { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.brand-choice-state { color: var(--text-3); font-size: 12px; font-weight: 600; }
.brand-choice.brand-lonestar.is-selected { border-color: #0f6b43; background: #e7f6ee; box-shadow: inset 0 0 0 1px #0f6b43; }
.brand-choice.brand-lonestar.is-selected .brand-choice-mark { border-color: #0f6b43; background: radial-gradient(circle, #0f6b43 0 5px, #fff 6px); }
.brand-choice.brand-lonestar.is-selected .brand-choice-state { color: #0f6b43; }
.brand-choice.brand-realprize.is-selected { border-color: #26286d; background: #ecedf7; box-shadow: inset 0 0 0 1px #26286d; }
.brand-choice.brand-realprize.is-selected .brand-choice-mark { border-color: #26286d; background: radial-gradient(circle, #26286d 0 5px, #fff 6px); }
.brand-choice.brand-realprize.is-selected .brand-choice-state { color: #26286d; }
input, select { width: 100%; min-width: 0; height: 38px; padding: 0 11px; border: 1px solid var(--ctl); border-radius: var(--r-ctl); background: var(--surface); color: var(--text); font-size: 14px; font-variant-numeric: tabular-nums; }
select { padding-right: 30px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7290' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 14px; }
input::placeholder { color: var(--text-3); }
input:hover:not(:disabled), select:hover:not(:disabled) { border-color: #6b7290; }
input:focus-visible, select:focus-visible { outline: 2px solid var(--navy); outline-offset: 1px; border-color: var(--navy); }
input:disabled, select:disabled, button:disabled, a.btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--neg); }
.input-icon { position: relative; display: block; }
.input-icon svg { position: absolute; left: 11px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); stroke: var(--text-3); fill: none; stroke-width: 2; pointer-events: none; }
.input-icon input { padding-left: 34px; }
.hint { margin: 0; font-size: 12.5px; line-height: 18px; color: var(--text-2); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 14px; border: 1px solid var(--ctl); border-radius: var(--r-ctl); background: var(--surface); color: var(--text); font-size: 14px; font-weight: 500; line-height: 1; white-space: nowrap; text-decoration: none; cursor: pointer; }
.btn:hover:not(:disabled) { background: var(--sub); border-color: #6b7290; }
.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600; }
.btn.primary:hover:not(:disabled) { background: var(--navy-hover); border-color: var(--navy-hover); }
.btn.danger { background: var(--neg); border-color: var(--neg); color: #fff; }
.btn.danger:hover:not(:disabled) { background: #a32b22; }
.icon-btn { width: 34px; height: 34px; padding: 0; }
.lookup-actions { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }

/* User lookup */
.query-bar { padding: 14px 16px 12px; display: grid; gap: 10px; }
.lookup { display: grid; grid-template-columns: minmax(130px, 170px) minmax(200px, 1.4fr) auto; gap: 10px; align-items: end; }
.range-preview { margin: 0; font-size: 12.5px; line-height: 18px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.status { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; color: var(--text-2); background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--r-card); }
.status:empty { display: none; }
.status strong { display: block; color: var(--text); font-size: 15px; line-height: 22px; font-weight: 600; }
.status p { margin: 2px 0 0; }
.status-mark { flex: 0 0 22px; width: 22px; height: 22px; display: grid; place-items: center; color: var(--navy); font-weight: 700; }
.status.ready .status-mark { color: var(--text-3); }
.status.error, .status.forbidden, .status.unauthorized { background: var(--bad-bg); border: 1px solid var(--bad-line); }
.status.error .status-mark, .status.forbidden .status-mark { color: var(--neg); }
.status.compact { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.spinner { display: block; width: 18px; height: 18px; border: 2px solid var(--line-2); border-top-color: var(--navy); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.selection-note { margin: 0; padding: 10px 14px; color: var(--text); background: var(--navy-soft); border-radius: var(--r-ctl); font-size: 13px; line-height: 18px; }
.selection-note:empty { display: none; }
.result-context { margin: 0; color: var(--text-2); font-size: 13px; line-height: 18px; overflow-wrap: anywhere; }

/* Player record */
#player-result { display: grid; gap: 16px; }
#player-result[hidden] { display: none; }
.record-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 24px; padding: 20px 24px; }
.record-identity:focus-visible { outline: 2px solid var(--navy); outline-offset: 6px; border-radius: 6px; }
.brand-tag { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--navy-soft); color: var(--navy); }
.brand-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.brand-tag.brand-lonestar { background: #e7f6ee; color: #0f6b43; }
.brand-tag.brand-realprize { background: #ecedf7; color: #26286d; }
.identity-row { display: flex; align-items: center; gap: 14px; }
/* Saved users: a folding card between the search bar and the record. */
.saved-users { padding: 0; }
.saved-users > summary { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 16px; list-style: none; cursor: pointer; }
.saved-users > summary::-webkit-details-marker { display: none; }
.saved-users > summary::before { content: ""; width: 7px; height: 7px; margin: 0 3px 0 1px; border-right: 1.8px solid var(--text-3); border-bottom: 1.8px solid var(--text-3); transform: rotate(-45deg); transition: transform .12s; }
.saved-users[open] > summary::before { transform: rotate(45deg); }
.saved-users[open] > summary { border-bottom: 1px solid var(--line); }
.saved-title { font-weight: 600; }
.saved-users > summary .hint { margin-left: auto; }
.saved-users-body { padding: 12px 16px 16px; display: grid; gap: 10px; }
.saved-empty { margin: 0; }
.saved-user { display: inline-flex; align-items: center; gap: 8px; }
.saved-table td, .saved-table th { white-space: nowrap; }
.saved-table .saved-tier { color: var(--violet); font-weight: 600; }
.saved-label { padding: 2px 6px; border: 1px dashed transparent; border-radius: 6px; background: none; color: var(--text); font: inherit; cursor: text; text-align: left; }
.saved-label:hover { border-color: var(--line-2); }
.saved-label.is-empty { color: var(--text-3); }
.saved-label-input { width: 160px; height: 30px; padding: 0 8px; font: inherit; }
.saved-player-name { min-width: 9rem; max-width: 15rem; white-space: normal; overflow-wrap: anywhere; }
.saved-actions { width: 40px; }
.window-label .window-k { font-weight: 600; color: var(--text-2); }
.window-label .link { color: var(--navy); }
/* Tab groups: family sections stacked under an in-tab sub-nav. */
.tab-group[hidden] { display: none; }
.subnav { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--sub); position: sticky; top: 0; z-index: 2; }
.subnav a { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 14px; color: var(--text-2); font-size: 13px; font-weight: 500; text-decoration: none; }
.subnav a:hover { background: var(--row-hover); color: var(--navy); }
.subnav a[aria-current="true"] { background: var(--surface); color: var(--navy); box-shadow: var(--shadow); font-weight: 600; }
.copy-summary { height: 28px; padding: 0 10px; font-size: 12px; border-color: var(--line-2); }
.tab-group .folder + .folder { border-top: 1px solid var(--line); }
/* Detection-list badges: the first thing after the ID. Abuser is red-bordered, VIP is violet. */
.list-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 2px; }
.list-badge { display: inline-grid; grid-template-columns: auto auto; gap: 1px 10px; align-items: baseline; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--sub); font-size: 12.5px; line-height: 16px; color: var(--text); }
.list-badge strong { font-weight: 600; }
.list-badge-detail { font-weight: 600; }
.list-badge-state, .list-badge-date { color: var(--text-2); font-size: 12px; }
.list-badge-abuser { border-color: var(--bad-line); background: var(--bad-bg); }
.list-badge-abuser strong, .list-badge-abuser .list-badge-detail { color: var(--neg); }
.list-badge-vip { border-color: #d9ccff; background: var(--violet-soft); }
.list-badge-vip strong, .list-badge-vip .list-badge-detail { color: var(--violet); }
.list-badge.is-handled .list-badge-state { color: var(--pos); font-weight: 600; }
.brand-mark { flex: 0 0 auto; width: 44px; height: 44px; object-fit: contain; }
.brand-mark-lonestar { filter: drop-shadow(0 1px 1px #0f6b4333); }
.identity-text { min-width: 0; }
.who { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0 4px; }
.identity-row .who { margin: 4px 0 0; }
.favorite-toggle { width: 28px; height: 28px; border-color: var(--line-2); color: var(--text-3); }
.favorite-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.favorite-toggle.is-saved { color: #b7791f; border-color: #e9d4a3; background: #fff8e6; }
.favorite-toggle.is-saved svg { fill: currentColor; }
/* Personal alerts: the preference and service availability are separate states. */
.profile-notifications { min-width: 0; max-width: 420px; }
.notification-control { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 6px 10px; max-width: 100%; font-size: 13px; line-height: 18px; }
.notification-state { font-weight: 600; }
.notification-toggle { min-height: 44px; height: auto; padding-block: 8px; white-space: normal; text-align: left; line-height: 18px; }
.notification-toggle svg { flex: 0 0 16px; }
.notification-toggle.is-on { background: var(--navy-soft); border-color: var(--navy); color: var(--navy); }
.notification-coverage, .notification-paused, .notification-feedback, .notification-details { grid-column: 1 / -1; margin: 0; }
.notification-coverage, .notification-paused { color: var(--warn); }
.notification-details > summary { min-height: 32px; padding: 4px 0; cursor: pointer; color: var(--navy); }
.notification-details > div { padding: 8px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--sub); }
.notification-details p { margin: 0 0 6px; overflow-wrap: anywhere; }
.notification-feedback:empty { display: none; }
.notification-feedback.error { color: var(--neg); }
.saved-table .saved-notifications { min-width: 260px; max-width: 340px; white-space: normal; }
.notification-control.is-compact { width: 260px; }
.saved-scroll-hint { display: none; }
@media (max-width: 680px) {
  .saved-scroll-hint { display: block; }
  .profile-notifications { flex-basis: 100%; max-width: 100%; }
  .profile-notifications .notification-control { grid-template-columns: auto minmax(0, 1fr); }
  .identity-text { width: 100%; }
  .identity-row { align-items: flex-start; gap: 8px; }
  .who h2 { max-width: 100%; overflow-wrap: anywhere; }
}
/* Saved and recent users under the search field. */
.player-field { position: relative; }
.lookup-shortcuts { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 7; display: grid; gap: 0; max-height: 420px; overflow-y: auto; padding: 4px 0; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); box-shadow: var(--pop-shadow); }
.shortcut-group { padding: 8px 10px 6px; }
.shortcut-group + .shortcut-group { border-top: 1px solid var(--line); }
.shortcut-group h3 { margin: 0 4px 4px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.shortcut-head { display: flex; align-items: center; justify-content: space-between; margin-right: 4px; }
.shortcut-head .link-button { font-size: 12px; }
.shortcut-group ul { list-style: none; margin: 0; padding: 0; }
.shortcut-group li { display: flex; align-items: center; gap: 4px; }
.shortcut-group .hint { margin: 2px 4px 4px; }
.shortcut { flex: 1 1 auto; display: grid; grid-template-columns: 18px auto 1fr; align-items: center; gap: 10px; min-height: 36px; padding: 4px 8px; border: 0; border-radius: 6px; background: none; color: var(--text); font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
a.shortcut:visited { color: var(--text); }
.shortcut:hover, .shortcut:focus-visible { background: var(--row-hover); outline: none; }
.shortcut:focus-visible { box-shadow: inset 0 0 0 2px var(--navy); }
.shortcut:disabled { color: var(--text-3); cursor: not-allowed; }
.shortcut-mark { width: 18px; height: 18px; object-fit: contain; }
.shortcut-id { font-weight: 600; font-variant-numeric: tabular-nums; }
.shortcut-meta { font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shortcut-remove { flex: 0 0 auto; width: 28px; height: 28px; border: 0; border-radius: 6px; background: none; color: var(--text-3); font-size: 16px; cursor: pointer; }
.shortcut-remove:hover { color: var(--neg); background: var(--bad-bg); }
.who h2 { font-size: 26px; line-height: 32px; font-weight: 600; letter-spacing: -.02em; }
.copy-id { width: 28px; height: 28px; border-color: var(--line-2); }
.copy-id { background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234f5775' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='8' width='12' height='12' rx='2'/%3E%3Cpath d='M16 8V5a1 1 0 0 0-1-1H5a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h3'/%3E%3C/svg%3E") center / 14px no-repeat; }
.meta { margin: 0; color: var(--text-2); }
.current-state { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 2px 9px; border-radius: 6px; font-size: 12.5px; line-height: 18px; font-weight: 500; background: var(--sub); border: 1px solid var(--line); color: var(--text); }
.chip::before { content: ""; width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: #9aa0b8; }
.chip.ok::before { background: var(--pos-dot); }
.chip.warn::before { background: var(--warn-dot); }
.chip.bad { background: var(--bad-bg); border-color: var(--bad-line); color: var(--neg); }
.chip.bad::before { background: var(--neg); }
.chip.tier { background: var(--violet-soft); border-color: transparent; color: var(--violet); font-weight: 600; }
.chip.tier::before { display: none; }
.window-label { margin: 12px 0 0; font-size: 12.5px; line-height: 18px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.record-actions { display: grid; justify-items: end; align-content: start; gap: 6px; text-align: right; }
.record-range { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.record-actions .hint { max-width: 36ch; }
.record-tools { display: flex; align-items: flex-start; justify-content: flex-end; gap: 10px; }
.header-review { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.header-review-group { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: flex-end; gap: 8px; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--sub); text-align: left; }
.header-review-abuser { border-color: var(--bad-line); }
.header-review-vip { border-color: #d9ccff; }
.header-review-title { align-self: center; margin-right: auto; font-size: 12.5px; font-weight: 600; }
.header-review-field { display: grid; gap: 2px; }
.header-review-field label { font-size: 12px; line-height: 16px; color: var(--text-2); }
.header-review-field select { width: auto; min-width: 128px; max-width: 190px; height: 32px; padding-left: 8px; font-size: 13px; }
.header-review-na { align-self: center; font-size: 12.5px; color: var(--text-2); }
.header-review-status { max-width: 52ch; }

.highlights { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1280px) and (min-width: 901px) { .highlights { grid-template-columns: repeat(3, minmax(0, 1fr)); } .highlights .average:nth-child(3n+1) { border-left: 0; } .highlights .average:nth-child(n+4) { border-top: 1px solid var(--line); } }
.highlights .average { display: grid; grid-template-rows: auto 1fr auto; gap: 2px; align-content: start; padding: 14px 18px 14px; min-width: 0; }
/* The number stays on one line, shrinks before it clips, and is never cut off with an ellipsis. */
.highlights .average .v { font-size: clamp(17px, 1.5vw, 26px); line-height: 32px; white-space: nowrap; overflow: visible; }
.highlights .average .denominator { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
/* Small input line under Redeemable Playthrough only. It takes an implicit fourth row, wraps freely and is
   never clamped or hidden, so the shared card height grows and nothing clips at narrow widths. */
.highlights .average .sub { grid-row: 4; margin-top: 2px; font-size: 11.5px; line-height: 16px; color: var(--text-3); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.highlights .average + .average { border-left: 1px solid var(--line); }
.average .k { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--text-2); }
.average .v { font-size: 28px; line-height: 36px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.average .v.pos { color: var(--pos); }
.average .v.neg { color: var(--neg); }
.average.unavailable .v { color: var(--text-3); }
.average .denominator { font-size: 12.5px; line-height: 18px; color: var(--text-2); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.term { position: relative; text-decoration: underline dotted var(--ctl); text-decoration-thickness: 1.5px; text-underline-offset: 4px; cursor: help; }
.term .tip { display: none; position: absolute; left: 0; top: calc(100% + 8px); z-index: 20; width: min(272px, 80vw); padding: 10px 12px; border-radius: 8px; background: var(--text); color: #fff; font-size: 12.5px; line-height: 18px; font-weight: 400; box-shadow: var(--pop-shadow); }
.term:hover .tip, .term:focus .tip { display: block; }
.highlights .average:nth-child(n+3) .term .tip { left: auto; right: 0; }
.term:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; border-radius: 3px; }
table.kv th .term { text-decoration-color: var(--line-strong, var(--ctl)); }
table.kv th { position: relative; }
table.kv th .term .tip { left: 0; }

.record-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.record-main { min-width: 0; overflow: clip; }
.tabs { display: flex; flex-wrap: wrap; gap: 2px; padding: 0 12px; border-bottom: 1px solid var(--line); }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 13px 10px 12px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--text-2); font-weight: 500; text-decoration: none; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: var(--text); font-weight: 600; border-bottom-color: var(--navy); }
.tab-panel, #folders > .folder, .tab-group > .folder { padding: 20px 24px 24px; }
.tab-panel { display: grid; gap: 24px; }
.overview-block h3 { margin-bottom: 12px; }
/* Overview is a grid of identical tiles under small section headings. */
.overview-heading { margin: 0 0 8px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
/* Overview as a statement: lead sentence, then three ruled columns. No boxes. */
.statement-lead { margin: 0 0 20px; font-size: 16px; line-height: 25px; max-width: 96ch; }
.statement { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 0 32px; }
.st-col { min-width: 0; }
.st-col + .st-col { border-left: 1px solid var(--line); padding-left: 28px; }
.st-col dl { margin: 0; }
/* Label left (at least 45% of the row), value right; the note is a full-width third cell under both. */
.st-row { display: grid; grid-template-columns: minmax(45%, 1fr) minmax(0, auto); gap: 0 14px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line); }
.st-row .st-note { grid-column: 1 / -1; margin: 0; padding-top: 1px; font-size: 12px; line-height: 16px; color: var(--text-3); text-align: right; }
.st-row:first-child { border-top: 0; }
.st-row dt { color: var(--text-2); line-height: 22px; }
.st-row dt .term { position: static; }
.st-row dt .term .tip { left: 0; top: auto; }
.st-row { position: relative; }
.st-row dd { margin: 0; text-align: right; min-width: 0; }
.st-v { display: block; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 22px; overflow-wrap: normal; }
.st-v.pos { color: var(--pos); }
.st-v.neg { color: var(--neg); }
.st-row.unavailable .st-v { color: var(--text-3); font-weight: 500; }
@media (max-width: 1100px) { .statement { grid-template-columns: 1fr 1fr; } .st-col:nth-child(3) { grid-column: 1 / -1; border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 6px; } }
@media (max-width: 760px) { .statement { grid-template-columns: 1fr; } .st-col + .st-col { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 6px; } }
/* Lead tier: one sentence and three status pills, read before anything else. */
.overview-lead { display: grid; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--sub); }
.lead-sentence { margin: 0; font-size: 15px; line-height: 22px; color: var(--text); max-width: 90ch; }
.lead-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.lead-pill { display: inline-grid; grid-template-columns: auto auto; gap: 0 8px; align-items: baseline; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); font-size: 12.5px; line-height: 16px; }
.lead-pill-k { color: var(--text-2); }
.lead-pill strong { font-weight: 600; }
.lead-pill-note { grid-column: 1 / -1; font-size: 12px; color: var(--text-3); }
.lead-pill.tone-ok strong { color: var(--pos); }
.lead-pill.tone-warn strong { color: #b7791f; }
.lead-pill.tone-bad strong { color: var(--neg); }
/* The same heading voice inside every tab, so Money and Play read like Overview. */
.group h3, .panel-head .ftitle { letter-spacing: 0; }
.group h3 { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.tiles { display: grid; gap: 10px; margin: 0; }
.tiles-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tab-panel .overview-lead + .overview-block { margin-top: 4px; }
.tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tile { display: grid; grid-template-rows: auto 1fr auto; gap: 2px; min-width: 0; min-height: 84px; margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); }
.tile-k { font-size: 12px; line-height: 16px; color: var(--text-2); }
.tile-v { margin: 0; font-size: 18px; line-height: 24px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-d { margin: 0; font-size: 12px; line-height: 16px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile.is-red .tile-v { color: var(--neg); }
.tile.unavailable .tile-v { color: var(--text-3); font-weight: 500; }
.tab-panel .overview-block + .overview-block { margin-top: 4px; }
.section-list { display: grid; }
.section-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) 16px; gap: 14px; align-items: center; margin: 0 -8px; padding: 11px 8px; border-radius: 8px; color: inherit; text-decoration: none; }
.section-row + .section-row { box-shadow: 0 -1px 0 var(--line); }
.section-row:hover { background: var(--row-hover); }
.section-row:hover .section-name { text-decoration: underline; text-underline-offset: 3px; }
.section-name { font-weight: 600; }
.section-sum { color: var(--text-2); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.section-row::after { content: ""; justify-self: center; width: 7px; height: 7px; border-right: 1.8px solid var(--text-3); border-bottom: 1.8px solid var(--text-3); transform: rotate(-45deg); }
.overview-notes { display: grid; gap: 10px; }
.overview-notes > .note { margin: 0; }

.panel-head { display: grid; gap: 2px; margin-bottom: 18px; }
.ftitle { font-size: 18px; line-height: 24px; font-weight: 600; letter-spacing: -.015em; }
.fsum { margin: 0; color: var(--text-2); font-variant-numeric: tabular-nums; }
.body { display: grid; gap: 20px; }
.group { display: grid; gap: 10px; min-width: 0; }
.group + .group { padding-top: 20px; border-top: 1px solid var(--line); }
.group h3 { font-size: 14px; }
.account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 28px; align-items: start; }
.account-grid > .group { padding-top: 0; border-top: 0; }
/* Linked accounts: a full-width block under the four Account groups, two sub-blocks with their own tables. */
.linked-accounts { grid-column: 1 / -1; padding-top: 20px; border-top: 1px solid var(--line); }
.linked-block { display: grid; gap: 10px; min-width: 0; }
.linked-block + .linked-block { padding-top: 16px; border-top: 1px solid var(--line); }
.linked-block h4 { margin: 0; font-size: 13px; line-height: 18px; font-weight: 600; }
.linked-chooser { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.linked-chooser .field { flex: 1 1 240px; max-width: 440px; margin: 0; }
.linked-table th[scope="row"] .user-link { white-space: nowrap; }
.leaf { margin: 0; line-height: 22px; font-variant-numeric: tabular-nums; }
.note { margin: 0; color: var(--text-2); font-size: 12.5px; line-height: 18px; overflow-wrap: anywhere; }
.muted { color: var(--text-2); font-weight: 400; }
.empty-line { margin: 0; padding: 14px 16px; border: 1px dashed var(--line-2); border-radius: var(--r-ctl); color: var(--text-2); font-size: 13px; }
.family-status { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border: 1px dashed var(--line-2); border-radius: var(--r-ctl); color: var(--text-2); }
.family-status p { margin: 0; }
.family-status[aria-busy="true"] p::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px; border: 2px solid var(--line-2); border-top-color: var(--navy); border-radius: 50%; animation: spin .9s linear infinite; }

/* Tables */
.table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); overscroll-behavior-x: contain; }
.table-scroll-hint { margin: 0; font-size: 12.5px; color: var(--text-2); }
table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; font-variant-numeric: tabular-nums; }
caption { padding: 10px 14px; text-align: left; font-size: 13px; line-height: 18px; font-weight: 500; color: var(--text-2); border-bottom: 1px solid var(--line); }
th, td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { position: sticky; top: 0; z-index: 1; padding-block: 8px; background: var(--sub); font-size: 12.5px; line-height: 18px; font-weight: 500; color: var(--text-2); white-space: nowrap; }
tbody tr:last-child > * { border-bottom: 0; }
tbody tr:hover { background: var(--row-hover); }
td.num, th.num { text-align: right; white-space: nowrap; }
table.data-table tbody th[scope="row"] { font-weight: 500; }
table.kv { table-layout: fixed; }
table.kv th { width: 42%; font-weight: 400; color: var(--text-2); }
table.kv th .kv-suffix { display: block; font-size: 11px; line-height: 14px; color: var(--text-3); }
.account-grid table.kv th { width: 46%; }
table.kv td { font-weight: 500; }
table.kv tbody tr:hover { background: transparent; }
table.kv th, table.kv td { overflow-wrap: anywhere; }
details.more, details.metric-guide, .vip-coverage, .vip-more-filters { border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); }
details.more > summary, details.metric-guide > summary, .vip-coverage > summary, .vip-more-filters > summary { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px; list-style: none; cursor: pointer; color: var(--text); font-weight: 500; }
details > summary::-webkit-details-marker { display: none; }
details.more > summary::before, details.metric-guide > summary::before, .vip-coverage > summary::before, .vip-more-filters > summary::before { content: ""; width: 7px; height: 7px; margin: 0 3px 0 1px; border-right: 1.8px solid var(--text-3); border-bottom: 1.8px solid var(--text-3); transform: rotate(-45deg); transition: transform .12s; }
details[open].more > summary::before, details[open].metric-guide > summary::before, details[open].vip-coverage > summary::before, details[open].vip-more-filters > summary::before { transform: rotate(45deg); }
details.more > summary:hover, details.metric-guide > summary:hover { background: var(--sub); }
details[open].more > summary, details[open].metric-guide > summary { border-bottom: 1px solid var(--line); }
.more .inner, .metric-guide .inner { display: grid; gap: 12px; padding: 14px; }
.data-warnings { display: grid; gap: 4px; padding: 10px 14px; border: 1px solid var(--warn-line); border-radius: var(--r-ctl); background: var(--warn-bg); color: var(--warn); font-size: 13px; line-height: 18px; }
.data-warnings strong { font-weight: 600; }
.data-warnings .note { color: var(--warn); }
.data-warnings ul { margin: 0; padding-left: 18px; }

/* Right rail */
.record-rail { position: sticky; top: 16px; display: grid; gap: 20px; padding: 18px 20px; }
.record-rail h3 { margin-bottom: 8px; }
.record-rail dl { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); }
.record-rail dt, .record-rail dd { padding: 8px 0; border-top: 1px solid var(--line); }
.record-rail dt:first-of-type, .record-rail dd:first-of-type { padding-top: 0; border-top: 0; }
.record-rail dt { color: var(--text-2); padding-right: 16px; }
.record-rail dd { margin: 0; text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.record-rail dd small { display: block; font-size: 12.5px; line-height: 16px; font-weight: 400; color: var(--text-2); }
.link { font-weight: 600; }

/* Sign-in and account screens */
.signin-main { width: 100%; max-width: 480px; margin: 8vh auto 48px; }
.signin-card { display: grid; gap: 12px; padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 4px 18px #141a330d; }
.signin-card > .brand-plate { justify-self: start; margin-bottom: 8px; }
.signin-card h1 { font-size: 24px; line-height: 30px; }
.signin-card > p { margin: 0; color: var(--text-2); }
.signin-card > .btn { justify-self: start; }
.auth-form { display: grid; gap: 16px; margin-top: 8px; }
.auth-form > .btn { width: 100%; }
.auth-help { margin: 12px 0 0 !important; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12.5px; line-height: 18px; }
.form-status { margin: 0; font-size: 13px; line-height: 18px; color: var(--text-2); }
.form-status:empty { display: none; }
.form-status.error { color: var(--neg); }
.form-status.success { color: var(--pos); }
.member-layout { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 16px; align-items: start; }
.member-card { display: grid; gap: 12px; min-width: 0; padding: 20px 24px; }
.panel-heading { display: flex; flex-wrap: wrap; gap: 10px 16px; justify-content: space-between; align-items: flex-end; }
.panel-heading h2 { margin: 0; }
.staff-member { display: grid; gap: 8px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.staff-member:first-child { padding-top: 4px; }
.staff-member:last-child { border-bottom: 0; padding-bottom: 0; }
.member-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.member-email { font-weight: 600; overflow-wrap: anywhere; }
.member-meta { margin: 0; color: var(--text-2); font-size: 12.5px; }
.member-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.member-actions .btn { height: 32px; font-size: 13px; }
.flag { display: inline-flex; align-items: center; min-height: 22px; padding: 1px 8px; border-radius: 6px; font-size: 12px; font-weight: 500; background: var(--sub); border: 1px solid var(--line); color: var(--text-2); }
.flag.bad { background: var(--bad-bg); border-color: var(--bad-line); color: var(--neg); }
.staff-access-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.staff-access-grid > section { min-width: 0; display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.staff-access-grid h3 { margin: 0; }
.staff-access-grid .agent-mappings { grid-column: 1 / -1; }
.mapping-list { margin: 0; padding: 0; list-style: none; }
.mapping-list li { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
#staff-access-editor { display: grid; gap: 14px; padding: 20px 24px; scroll-margin-top: 20px; }
dialog { width: 520px; max-width: calc(100vw - 32px); padding: 0; border: 1px solid var(--line); border-radius: 14px; color: var(--text); background: var(--surface); box-shadow: var(--pop-shadow); }
dialog::backdrop { background: #141a3366; }
.dialog-content { display: grid; gap: 10px; padding: 24px; }
.dialog-content > p { margin: 0; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.dialog-actions .primary { margin-left: auto; }
.temporary-field input { font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.credential-email { font-weight: 600; overflow-wrap: anywhere; }

/* VIP overview */
.vip-filter-card { padding: 14px 16px; }
#vip-filter-form { display: grid; gap: 12px; }
.vip-filters { display: grid; grid-template-columns: minmax(130px, 160px) repeat(2, minmax(160px, 1fr)) minmax(140px, 170px) minmax(140px, 170px) auto; gap: 10px; align-items: end; }
.vip-filters:has(#vip-start-field:not([hidden])) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.vip-filter-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.vip-more-filters > summary { font-size: 13px; }
.vip-more-filters[open] { padding-bottom: 12px; }
.vip-more-filters > .hint { padding: 0 14px; }
.vip-secondary-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 4px 14px 12px; }
.vip-options-notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; color: var(--text-2); font-size: 13px; }
.vip-options-notice p { margin: 0; flex: 1 1 260px; }
.vip-options-notice.error { padding: 10px 12px; background: var(--bad-bg); color: var(--neg); border: 1px solid var(--bad-line); border-radius: var(--r-ctl); }
.vip-multiselect { position: relative; min-width: 0; }
.vip-multiselect > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 38px; padding: 0 11px; border: 1px solid var(--ctl); border-radius: var(--r-ctl); background: var(--surface); list-style: none; cursor: pointer; white-space: nowrap; overflow: hidden; }
.vip-multiselect > summary span { overflow: hidden; text-overflow: ellipsis; }
.vip-multiselect > summary::after { content: ""; flex: 0 0 7px; width: 7px; height: 7px; margin-top: -3px; border-right: 1.8px solid var(--text-3); border-bottom: 1.8px solid var(--text-3); transform: rotate(45deg); }
.vip-multiselect > summary[aria-disabled="true"] { background: var(--sub); color: var(--text-3); cursor: not-allowed; }
.vip-multiselect[open] > summary { border-color: var(--navy); outline: 2px solid var(--navy); outline-offset: 1px; }
.vip-choice-menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 15; min-width: 240px; max-height: 340px; overflow-y: auto; display: grid; gap: 6px; padding: 12px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: var(--pop-shadow); }
.vip-choice-menu > .btn { justify-self: start; height: 32px; font-size: 13px; }
.vip-choice-menu fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.vip-choice-menu > .vip-choice-done { position: sticky; bottom: -12px; justify-self: stretch; margin: 4px -12px -12px; border-radius: 0 0 10px 10px; border-width: 1px 0 0; }
.vip-check-option { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 6px 6px; border-radius: 6px; cursor: pointer; }
.vip-check-option:hover { background: var(--row-hover); }
.vip-check-option input[type="checkbox"] { width: 16px; height: 16px; min-height: 0; flex: 0 0 16px; margin: 0; padding: 0; accent-color: var(--navy); }
.vip-check-option .hint { margin-left: auto; font-variant-numeric: tabular-nums; }
.vip-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); }
.vip-metrics .average { display: grid; gap: 2px; align-content: start; padding: 14px 20px 16px; min-width: 0; }
.vip-metrics .average + .average { border-left: 1px solid var(--line); }
.vip-metrics .k, .vip-secondary-metrics .k { margin: 0; font-size: 13px; line-height: 18px; font-weight: 500; color: var(--text-2); }
.vip-metrics .v { font-size: 22px; line-height: 30px; }
#vip-summary { display: grid; gap: 12px; }
details.vip-definitions { border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
details.vip-definitions > summary { display: grid; grid-template-columns: 24px minmax(0, 1fr) 12px; gap: 10px; align-items: center; min-height: 44px; padding: 8px 14px; list-style: none; cursor: pointer; }
details.vip-definitions > summary::after { content: ""; width: 7px; height: 7px; border-right: 1.8px solid var(--text-3); border-bottom: 1.8px solid var(--text-3); transform: rotate(-45deg); transition: transform .12s; }
details[open].vip-definitions > summary::after { transform: rotate(45deg); }
details[open].vip-definitions > summary { border-bottom: 1px solid var(--line); }
.vip-definitions .mark { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--navy-soft); color: var(--navy); font-size: 12px; font-weight: 700; }
.vip-definitions .ftitle { display: block; font-size: 14px; line-height: 20px; }
.vip-definitions .fsum { display: block; font-size: 12.5px; line-height: 18px; }
.vip-definitions .body { padding: 14px; gap: 12px; }
.vip-secondary-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.vip-secondary-metrics .average { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-ctl); }
.vip-secondary-metrics .v { font-size: 18px; line-height: 26px; }
#vip-coverage { display: grid; gap: 10px; }
#vip-coverage ul { margin: 0; padding: 0 14px 12px 32px; }
#vip-coverage li + li { margin-top: 4px; }
#vip-coverage .table-wrap { margin: 0 14px 14px; }
#vip-result { display: grid; gap: 16px; }
#vip-result[hidden] { display: none; }
#vip-result > .card { padding: 18px 20px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; }
#vip-trend-section .field { min-width: 180px; }
.vip-trend-figure { margin: 0; }
.vip-trend-figure svg { display: block; width: 100%; height: auto; max-height: 260px; overflow: visible; }
.vip-trend-figure text { fill: var(--text-3); font-size: 12px; font-family: var(--font); }
.vip-trend-figure figcaption { margin-top: 8px; color: var(--text-2); font-size: 12.5px; }
.trend-axis { stroke: #cdd2de; stroke-width: 1; }
.trend-line { fill: none; stroke: var(--navy); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.trend-point { fill: var(--surface); stroke: var(--navy); stroke-width: 1.5; }
.vip-table-card .panel-heading .field { flex: 0 0 160px; }
.vip-members-table .table-sort { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.vip-members-table .table-sort:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.vip-members-table th[aria-sort] { color: var(--text); font-weight: 600; }
.vip-members-table tbody th[scope="row"], .vip-members-table thead th:first-child { position: sticky; left: 0; z-index: 2; background: var(--surface); box-shadow: 1px 0 var(--line); }
.vip-members-table thead th:first-child { background: var(--sub); }
.vip-members-table tbody tr:hover th[scope="row"] { background: var(--row-hover); }
.vip-members-table tbody td { vertical-align: middle; }
.table-subline { display: block; margin-top: 2px; font-size: 12.5px; line-height: 16px; color: var(--text-2); }
.user-link { display: inline-flex; align-items: center; min-height: 28px; padding: 0; border: 0; background: transparent; color: var(--navy); font: inherit; font-weight: 600; text-decoration: underline; text-decoration-color: var(--link-line); text-underline-offset: 3px; cursor: pointer; }
.user-link:hover { text-decoration-color: var(--navy); text-decoration-thickness: 2px; }
a.user-link, a.user-link:visited { color: var(--navy); }
.user-link.is-blocked { color: var(--text-3); text-decoration: none; cursor: not-allowed; }
.vip-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.vip-pagination .btn { height: 34px; }
.vip-wins-actions { display: flex; align-items: flex-end; gap: 8px; }
.vip-wins-actions select { min-width: 110px; }
.vip-actions { align-self: end; }

/* Detection lists */
.detection-toolbar { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: end; justify-content: space-between; margin-bottom: 8px; }
.detection-brand { display: inline-flex; padding: 3px; border: 1px solid var(--ctl); border-radius: 999px; background: var(--sub); }
.brand-choice { border: 0; background: transparent; border-radius: 999px; min-height: 34px; padding: 0 16px; color: var(--navy); font: inherit; font-weight: 650; cursor: pointer; }
.detection-brand .brand-choice { display: block; width: auto; }
.brand-choice[aria-checked="true"] { background: var(--navy); color: #fff; }
.brand-choice:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.brand-choice[hidden] { display: none; }
.detection-tracks { display: flex; flex-wrap: wrap; gap: 8px; }
.detection-toolbar .field { flex: 0 1 180px; margin: 0; }
.detection-filters { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: end; }
.detection-filters .field { flex: 1 1 140px; max-width: 200px; margin: 0; }
.detection-filters .btn { height: 38px; }
/* Column picker: a control-sized summary that opens a popover, so the filter row keeps its height. */
.abuser-column-picker { position: relative; flex: 0 0 auto; }
.abuser-column-picker > summary { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--ctl); border-radius: var(--r-ctl); background: var(--surface); list-style: none; cursor: pointer; font-size: 14px; font-weight: 500; white-space: nowrap; }
.abuser-column-picker > summary::-webkit-details-marker { display: none; }
.abuser-column-picker > summary::after { content: ""; width: 7px; height: 7px; margin-left: 2px; border-right: 1.8px solid var(--text-3); border-bottom: 1.8px solid var(--text-3); transform: translateY(-2px) rotate(45deg); transition: transform .12s; }
.abuser-column-picker[open] > summary { border-color: var(--navy); outline: 2px solid var(--navy); outline-offset: 1px; }
.abuser-column-picker[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.abuser-column-badge { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 10px; background: var(--navy-soft); color: var(--navy); font-size: 12px; font-weight: 600; }
.abuser-column-choices { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; width: min(520px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); box-shadow: var(--pop-shadow); }
.abuser-column-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.abuser-column-head .link-button:disabled { color: var(--text-3); text-decoration: none; cursor: default; }
.abuser-column-group { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 16px; margin: 0; padding: 8px 14px 10px; border: 0; border-bottom: 1px solid var(--line); min-width: 0; }
.abuser-column-group legend { grid-column: 1 / -1; padding: 0; margin-bottom: 4px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.abuser-column-group label { display: flex; gap: 8px; align-items: center; min-height: 26px; font-size: 13px; line-height: 18px; cursor: pointer; }
.abuser-column-group label:hover span { color: var(--navy); }
.abuser-column-group input { margin: 0; width: 15px; height: 15px; accent-color: var(--navy); }
.abuser-column-footer { margin: 0; padding: 8px 14px 10px; font-size: 12px; line-height: 16px; color: var(--text-3); }
.link-button { padding: 0; border: 0; background: none; color: var(--navy); font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

/* Agent-chosen filters: the picker and the column picker sit together at the end of the row;
   each chosen filter is a labelled control with its own remove button. */
.detection-filter-bar { align-items: end; }
.detection-filter-bar > .field { flex: 0 1 160px; }
.abuser-active-filters { display: contents; }
.abuser-filter-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin-left: auto; max-width: 100%; }
.abuser-filter { flex: 0 1 auto !important; max-width: none !important; }
.abuser-filter .field-label { display: block; margin-bottom: 6px; font-size: 12.5px; line-height: 16px; color: var(--text-2); font-weight: 500; }
.abuser-range { display: flex; align-items: center; gap: 6px; }
.abuser-range input[type="number"] { width: 88px; }
.abuser-range > span { color: var(--text-3); }
.abuser-filter-remove { flex: 0 0 auto; width: 26px; height: 26px; padding: 0; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--text-3); font-size: 16px; line-height: 1; cursor: pointer; }
.abuser-filter-remove:hover { color: var(--neg); border-color: var(--bad-line); background: var(--bad-bg); }
.abuser-values { min-width: 150px; max-width: 240px; }
.abuser-values-list { position: absolute; left: 0; top: calc(100% + 6px); z-index: 6; display: grid; gap: 2px; min-width: 100%; width: max-content; max-width: 320px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); box-shadow: var(--pop-shadow); }
.abuser-values-list label { display: flex; gap: 8px; align-items: center; min-height: 26px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.abuser-values-list input { margin: 0; width: 15px; height: 15px; accent-color: var(--navy); }
.detection-table .table-sort { display: inline-flex; align-items: center; min-height: 32px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 600; text-align: inherit; cursor: pointer; }
.detection-table .table-sort:hover { text-decoration: underline; text-underline-offset: 3px; }
.detection-table th[aria-sort="ascending"] .table-sort,
.detection-table th[aria-sort="descending"] .table-sort { color: var(--navy); }
#detection-result, #abuser-detection-result { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 12px; }
#abuser-detection-screen { width: 100%; max-width: 100%; min-width: 0; overflow-x: hidden; }
#abuser-detection-table, #abuser-detection-table .table-wrap { min-width: 0; max-width: 100%; }
#detection-result[hidden], #abuser-detection-result[hidden] { display: none; }
.detection-table th[scope="row"] { position: sticky; left: 0; z-index: 2; background: var(--surface); box-shadow: 1px 0 var(--line); }
.detection-table thead th:first-child { position: sticky; left: 0; z-index: 3; background: var(--sub); }
.detection-table tbody tr:hover th[scope="row"] { background: var(--row-hover); }
.detection-wins { max-width: 240px; }
.detection-note { width: 8.5rem; max-width: 8.5rem; }
.detection-table .note-link { display: block; max-width: 8.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0; border: 0; background: none; color: var(--navy); font: inherit; text-align: left; cursor: pointer; }
.detection-table .note-link.has-note { font-weight: 650; }
.detection-table .note-link:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.detection-action { position: relative; }
.detection-action select { width: 9.5rem; height: 32px; }
.detection-note-panel { display: none; gap: 8px; max-width: 36rem; margin: 0 0 12px; padding: 12px; border: 1px solid var(--ctl); border-radius: var(--r-ctl); background: var(--surface); }
.detection-note-panel:not([hidden]) { display: grid; }
.detection-note-head, .detection-note-actions { display: flex; align-items: center; gap: 10px; }
.detection-note-head p { margin: 0; font-weight: 650; }
.detection-note-panel textarea { width: 100%; min-height: 72px; padding: 8px 10px; border: 1px solid var(--ctl); border-radius: var(--r-ctl); background: var(--surface); color: var(--text); font: inherit; resize: vertical; }
.detection-note-panel textarea:focus-visible { outline: 2px solid var(--navy); outline-offset: 1px; border-color: var(--navy); }

/* Responsive */
@media (max-width: 1280px) {
  .vip-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vip-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vip-metrics .average:nth-child(4) { border-left: 0; }
  .vip-metrics .average:nth-child(n+4) { border-top: 1px solid var(--line); }
}
@media (max-width: 1180px) {
  .record-body { grid-template-columns: minmax(0, 1fr); }
  .record-rail { position: static; }
  .lookup { grid-template-columns: minmax(130px, 170px) minmax(0, 1fr) auto; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-layout { grid-template-columns: minmax(0, 1fr); }
  .vip-secondary-filters, .vip-secondary-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .highlights .average:nth-child(odd) .term .tip { left: 0; right: auto; }
  .highlights .average:nth-child(even) .term .tip { left: auto; right: 0; }
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-brand { padding: 0; } .brand-sub, .nav-label, .sidebar-foot .session { display: none; }
  .sidebar-nav { display: flex; flex-wrap: wrap; gap: 4px; flex: 1 1 auto; }
  .sidebar-foot { margin: 0; padding: 0; border: 0; }
  .workspace { padding: 16px 16px 40px; }
  .moments { grid-template-columns: minmax(0, 1fr); }
  .highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .highlights .average:nth-child(odd) { border-left: 0; }
  .highlights .average:nth-child(n+3) { border-top: 1px solid var(--line); }
  .record-header { grid-template-columns: minmax(0, 1fr); }
  .record-actions { justify-items: start; text-align: left; }
  .record-tools { justify-content: flex-start; }
  .header-review { align-items: flex-start; }
  .account-grid, .staff-access-grid { grid-template-columns: minmax(0, 1fr); }
  .staff-access-grid .agent-mappings { grid-column: auto; }
}
@media (max-width: 680px) {
  .lookup, .vip-filters, .vip-filters:has(#vip-start-field:not([hidden])) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lookup .player-field { grid-column: 1 / -1; }
  .lookup-actions { grid-column: 1 / -1; } .lookup-actions .btn { flex: 1; }
  .vip-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vip-metrics .average:nth-child(odd) { border-left: 0; }
  .vip-metrics .average:nth-child(4) { border-left: 1px solid var(--line); }
  .vip-metrics .average:nth-child(n+3) { border-top: 1px solid var(--line); }
  .tab-panel, #folders > .folder, .record-header, .record-rail { padding-inline: 16px; }
  .highlights .average { padding-inline: 16px; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .subnav { position: static; }
  .trends-tools { width: 100%; }
  .trend-custom { flex-wrap: wrap; }
  .trend-milestone { width: 100%; }
  .trend-milestone select { min-width: 0; width: 100%; }
  .section-row { grid-template-columns: minmax(0, 1fr) 16px; }
  .section-row .section-sum { grid-column: 1 / 2; grid-row: 2; }
  .vip-pagination .btn { flex: 1; }
  .vip-pagination .hint { order: -1; flex-basis: 100%; }
  .vip-wins-actions { width: 100%; flex-wrap: wrap; }
  .vip-choice-menu { position: static; box-shadow: none; }
  .signin-card { padding: 24px; }
}
/* With review controls the tools column is wide (review groups beside Refresh), so below 1280px the header
   stacks: identity on top at full width, the tools wrapping underneath, left-aligned. The identity keeps a floor. */
.record-identity { min-width: min(100%, 16rem); }
@media (max-width: 1279px) {
  .record-header:has(#header-review:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
  .record-header:has(#header-review:not([hidden])) .record-actions { justify-items: start; text-align: left; }
  .record-header:has(#header-review:not([hidden])) .record-tools { justify-content: flex-start; flex-wrap: wrap; }
  .record-header:has(#header-review:not([hidden])) .header-review { align-items: flex-start; }
}
@media (max-width: 480px) {
  .lookup, .vip-filters, .vip-filters:has(#vip-start-field:not([hidden])), .facts, .vip-secondary-filters, .vip-secondary-metrics { grid-template-columns: minmax(0, 1fr); }
  .average .v { font-size: 24px; line-height: 32px; }
  .highlights .average .sub { font-size: 11px; }
  table.kv tr { display: grid; }
  table.kv th, table.kv td { width: 100%; border: 0; padding-block: 4px; }
  table.kv tr { border-bottom: 1px solid var(--line); padding-block: 6px; }
}
@media (prefers-contrast: more) { :root { --line: #9aa0b8; --line-2: #6b7290; --ctl: #4f5775; --text-2: #3a4160; } }
@media (forced-colors: active) {
  .nav-item[aria-current="page"], .tabs a[aria-current="page"] { outline: 2px solid Highlight; }
  .card, .chip, .btn, .brand-tag, details { border: 1px solid CanvasText; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .spinner, .family-status[aria-busy="true"] p::before { animation: none; } details > summary::before, details > summary::after { transition: none; } }
@media print {
  .sidebar, .query-bar, .page-heading, .status, .tabs, .record-actions, .selection-note, dialog { display: none !important; }
  .app-shell { display: block; } .workspace { max-width: none; padding: 0; }
  body { background: #fff; } .card { box-shadow: none; break-inside: avoid; }
  #folders > .folder[hidden] { display: block !important; }
}

.viz-stack { display: grid; gap: 14px; }
.viz-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.viz-stat { padding: 10px 12px; border-radius: 8px; background: var(--sub); }
.viz-stat span { display: block; color: var(--text-2); font-size: 12px; line-height: 16px; }
.viz-stat strong { font-size: 16px; font-variant-numeric: tabular-nums; }
.viz-canvas { height: 380px; width: 100%; }
.viz-canvas[data-chart-state="empty"]::after { content: 'No GGR or NGR recorded in the selected dates.'; display: grid; place-items: center; height: 100%; color: var(--text-2); }
.viz-canvas[data-chart-state="unavailable"]::after { content: 'The chart library did not load. Reload the page to retry.'; display: grid; place-items: center; height: 100%; color: var(--text-2); }
@media (max-width: 900px) { .viz-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .viz-canvas { height: 360px; } }
/* Charts tab: a sub-tab bar (one chart per registry entry) under the shared period chips; the chips reuse the Trends rules. */
.charts { display: grid; gap: 12px; }
.chart-tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line); }
.chart-tab { border: 0; background: transparent; padding: 9px 12px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--text-2); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.chart-tab[aria-selected="true"] { color: var(--navy); border-bottom-color: var(--navy); }
.chart-tab:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.chart-panel { display: grid; gap: 14px; }
.chart-panel[hidden] { display: none; }
@media (max-width: 900px) { .charts-head .trends-tools { width: 100%; } }

/* Trends under the Overview statement: period chips, a metric picker, one comparison table. */
.trends { display: grid; gap: 12px; }
.trends:empty { display: none; }
.trends-movers { margin: 0; }
.trends-movers strong { font-weight: 600; }
.trend-copy { margin-left: 4px; }
.trends-head { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-start; justify-content: space-between; }
.trends-head .note { margin: 4px 0 0; }
.trends-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.trend-periods { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 10px; background: var(--sub); }
.trend-period { border: 0; background: transparent; padding: 7px 12px; border-radius: 8px; color: var(--text-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.trend-period[aria-pressed="true"] { background: var(--surface); color: var(--navy); box-shadow: var(--shadow); }
.trend-custom { display: flex; flex-direction: row; gap: 8px; align-items: center; }
.trend-custom input { height: 38px; }
.trend-picker .abuser-column-choices { width: min(360px, calc(100vw - 32px)); }
.trend-picker .abuser-column-group { grid-template-columns: 1fr 1fr; }
.trends-wrap { overflow: visible; }
.trends-table { table-layout: fixed; width: 100%; }
.trends-table th, .trends-table td { white-space: normal; overflow-wrap: normal; vertical-align: top; }
.trends-table th:first-child { width: 22%; }
.trends-table td.num, .trends-table th.num { text-align: right; }
.trends-table th[scope="col"] small { display: block; font-weight: 400; color: var(--text-3); font-size: 11px; line-height: 14px; }
.trends-table td.trend-change { color: var(--text-2); }
.trends-table th[scope="row"] { font-weight: 500; }
/* "Since…": a disabled chip points at a visible note with the reason; the milestone picker sits beside the chips. */
.trend-period[disabled], .trend-period[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.trend-milestone { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; align-items: center; }
.trend-milestone select { height: 38px; min-width: 260px; max-width: 100%; font: inherit; }
.trend-milestone-note, .trend-since-note { margin: 0; font-size: 12px; color: var(--text-3); }
@media (max-width: 760px) {
  .trends-head { flex-direction: column; }
  .trends-wrap { overflow-x: auto; }
  .trends-table { min-width: 560px; }
}

/* Loading skeleton: a calm shimmer in the shape of the record while data is gathered. */
.sk-line { display: block; height: 14px; border-radius: 6px; background: linear-gradient(100deg, var(--line) 35%, var(--sub) 50%, var(--line) 65%); background-size: 240% 100%; animation: sk-shimmer 1.4s ease-in-out infinite; color: transparent; }
.highlights .v.sk-line { height: 24px; margin: 4px 0; }
.highlights .k.sk-line, .highlights .denominator.sk-line { height: 12px; }
.sk-w40 { width: 40%; } .sk-w65 { width: 65%; } .sk-w90 { width: 90%; }
.skeleton-identity { display: flex; align-items: center; gap: 14px; padding: 6px 0; }
.skeleton-identity .sk-dot { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%; background: var(--line); animation: sk-shimmer 1.4s ease-in-out infinite; background-image: linear-gradient(100deg, var(--line) 35%, var(--sub) 50%, var(--line) 65%); background-size: 240% 100%; }
.skeleton-identity .skeleton-lines { flex: 1 1 auto; display: grid; gap: 8px; max-width: 420px; }
.skeleton-stack { display: grid; gap: 12px; padding: 6px 0; }
.skeleton-stack .sk-line:nth-child(odd) { width: 92%; }
.skeleton-stack .sk-line:nth-child(even) { width: 78%; }
@keyframes sk-shimmer { 0% { background-position: 120% 0; } 100% { background-position: -120% 0; } }
@media (prefers-reduced-motion: reduce) { .sk-line, .skeleton-identity .sk-dot { animation: none; } }
/* Skeleton inside a loading status card (lookup, VIP portfolio, both Detection lists). */
.status .status-grow { flex: 1 1 auto; display: grid; gap: 12px; min-width: 0; }
.status .skeleton-stack { padding: 2px 0 4px; }
.status .skeleton-stack .sk-line:nth-child(odd) { width: 88%; }
.status .skeleton-stack .sk-line:nth-child(even) { width: 64%; }
/* In-place reloads (sorting, refresh) dim the rows they are about to replace. */
#vip-members[aria-busy="true"] { opacity: .55; transition: opacity .2s; }

/* Independent, explicit Game search inside Play. */
.win-search { display: grid; gap: 12px; min-width: 0; margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.win-search-heading { display: grid; gap: 5px; }
.win-search-heading h3 { margin: 0; font-size: 16px; }
#win-search-form, #win-search-results { display: grid; gap: 12px; min-width: 0; }
.win-search-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 12px; align-items: start; }
.win-search-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.win-search-status { margin: 0; color: var(--text-2); font-size: 13px; line-height: 19px; }
.win-search-status[data-kind="error"], .win-search-status[data-kind="budget"] { color: var(--neg); }
.win-result-context { margin: 0; font-size: 13px; line-height: 20px; font-weight: 600; overflow-wrap: anywhere; }
#win-search-changes { padding: 9px 12px; border-left: 3px solid var(--navy); background: var(--sub); }
@media (max-width: 600px) { .win-search-fields { grid-template-columns: minmax(0, 1fr); } }

/* Local Pending / Handled view of the current Detection list. */
.detection-handling-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.detection-tab-count { min-width: 1.5em; padding: 2px 6px; border-radius: 999px; background: var(--sub); color: var(--text-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.detection-handling-tabs .primary .detection-tab-count { background: rgba(255, 255, 255, .18); color: inherit; }

/* VIP portfolio exploration follows the existing card and control system. */
.vip-chart-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
#vip-trend-section .vip-chart-controls .field { min-width: 120px; }
.vip-overlay-choice { display: flex; align-items: center; gap: 7px; min-height: 38px; font-size: 13px; }
.vip-chart-canvas { width: 100%; height: 340px; min-width: 0; border-radius: 8px; }
.vip-chart-canvas:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.vip-chart-readout { min-height: 20px; margin: 6px 0; color: var(--text-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.vip-chart-inspect { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.vip-chart-inspect .field { min-width: 240px; }
.vip-trend-values { margin-top: 12px; }
.vip-trend-values > summary { cursor: pointer; font-size: 13px; color: var(--text-2); }
.vip-day-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.vip-day-metrics .average { padding: 12px; background: var(--sub); border-radius: 8px; }
.vip-day-metrics .k { margin: 0 0 5px; font-size: 12px; font-weight: 500; color: var(--text-2); }
.vip-day-metrics .v { display: block; font-size: 19px; }
.vip-day-metrics .denominator { font-size: 11px; }
.vip-reconciliation { padding: 12px; background: var(--sub); border-left: 3px solid var(--line); font-size: 13px; line-height: 1.6; }
.vip-day-section > .field { max-width: 240px; }
.vip-account-flags { display: inline-block; vertical-align: middle; margin-left: 6px; max-width: 230px; font-weight: 400; }
.vip-account-flags > summary { list-style: none; cursor: pointer; padding: 4px; color: var(--text-2); font-size: 14px; }
.vip-account-flags > summary::-webkit-details-marker { display: none; }
.vip-flag-details { display: grid; gap: 5px; padding: 10px; margin: 4px 0; white-space: normal; background: var(--sub); border: 1px solid var(--line); border-radius: 6px; font-size: 12px; }
.vip-choice-menu input[type="search"] { width: 100%; margin-top: 6px; }
#vip-members-status:empty, #vip-day-status:empty { display: none; }
@media (max-width: 640px) {
  .vip-metrics { grid-template-columns: 1fr; }
  .vip-metrics .average + .average { border-left: 0; border-top: 1px solid var(--line); }
  .vip-chart-canvas { height: 280px; }
  .vip-chart-controls { width: 100%; }
  .vip-day-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vip-chart-inspect .field { min-width: 0; flex: 1 1 200px; }
}

.vip-chart-signs { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12px; color: var(--text-2); }
.vip-sign-positive::before, .vip-sign-negative::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 2px; background: #25385f; }
.vip-sign-negative::before { background: #b8403a; }

.vip-overlay-choice { padding: 0 4px; white-space: nowrap; }
.vip-overlay-choice input[type="checkbox"] { width: 16px; height: 16px; min-height: 0; flex: 0 0 16px; margin: 0; padding: 0; accent-color: var(--navy); }

/* Abuser Detection keeps evidence neutral; violet is reserved for VIP status. */
.evidence-chip, .abuser-vip-chip { display: inline-block; padding: 3px 7px; border-radius: 5px; background: var(--sub); color: var(--text-2); font-size: 12px; font-weight: 600; }
.abuser-vip-chip { background: var(--violet-soft); color: var(--violet); }
.abuser-negative-profit { color: var(--neg); }
/* Tell cells are hints, not verdicts: red text on a soft tint, with the reason in the tooltip. */
#abuser-detection-table td.abuser-tell-red { color: var(--neg); font-weight: 600; }
#abuser-detection-table .abuser-fixed-table td.abuser-tell-lines { white-space: nowrap; overflow-wrap: normal; }
#abuser-detection-table .abuser-tell-red-line { color: var(--neg); font-weight: 600; }
.abuser-tell-legend { max-width: 110ch; }
.abuser-tell-legend-mark { color: var(--neg); font-weight: 600; }
/* Tell columns: two-line header (what it shows / the unit), text tells left-aligned, numbers right. */
#abuser-detection-table .abuser-tell-column .table-sort { width: 100%; white-space: normal; text-align: left; }
#abuser-detection-table .abuser-tell-column.num .table-sort { justify-content: flex-end; text-align: right; }
#abuser-detection-table .abuser-tell-column .abuser-column-period { display: block; font-weight: 400; color: var(--text-2); }
#abuser-detection-screen .detection-tracks { flex: 1 1 100%; }
#abuser-detection-screen .detection-tracks .btn { font-variant-numeric: tabular-nums; white-space: normal; text-align: left; }

/* Compact Abuser metrics; VIP Detection retains its existing column layout. */
/* Fixed column widths keep long headers and expanded details from stretching Playthrough. */
#abuser-detection-table .abuser-fixed-table, #detection-table .abuser-fixed-table { table-layout: fixed; width: 1px; }
.abuser-fixed-table col { width: 132px; }
.abuser-fixed-table .abuser-width-player_id { width: 136px; }
.abuser-fixed-table .abuser-width-qualification_reason { width: 240px; }
.abuser-fixed-table .abuser-width-status_current, .abuser-fixed-table .abuser-width-status_at_pull { width: 140px; }
.abuser-fixed-table .abuser-width-sheet_action { width: 150px; }
.abuser-fixed-table .abuser-width-metric_details { width: 240px; }
.abuser-fixed-table .abuser-width-classification { width: 156px; }
.abuser-fixed-table .abuser-width-tell_payment_flags { width: 168px; }
.abuser-fixed-table .abuser-width-tell_cross_platform { width: 180px; }
.abuser-fixed-table .abuser-width-action { width: 176px; }
.abuser-fixed-table .abuser-width-note { width: 160px; }
#abuser-detection-table .abuser-fixed-table th, #abuser-detection-table .abuser-fixed-table td, #detection-table .abuser-fixed-table th, #detection-table .abuser-fixed-table td { box-sizing: border-box; white-space: normal; overflow-wrap: anywhere; }

#abuser-detection-table .abuser-compact-column, #detection-table .abuser-compact-column { width: 132px; min-width: 132px; max-width: 132px; box-sizing: border-box; white-space: normal; overflow-wrap: anywhere; text-align: right; }
#abuser-detection-table .abuser-compact-column .table-sort, #detection-table .abuser-compact-column .table-sort { width: 100%; justify-content: flex-end; white-space: normal; }
.detection-table .abuser-text-column .table-sort { width: 100%; white-space: normal; text-align: left; }
#abuser-detection-table .abuser-column-period, #detection-table .abuser-column-period { display: block; font-weight: 400; color: var(--text-2); }

/* The risk decision and review workflow are separate controls. */
#abuser-detection-screen .detection-tracks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
#abuser-detection-screen .detection-tracks .btn { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; height: auto; padding: 12px; }
.abuser-tier-title { font-weight: 700; }
.abuser-tier-rule { font-size: 12px; font-weight: 400; line-height: 1.5; }
.abuser-tier-counts { font-size: 11px; margin-top: auto; }
.abuser-reason { min-width: 0; max-width: 240px; white-space: normal; line-height: 1.5; }
.abuser-quality-warning { display: block; margin-top: 6px; color: var(--text-2); font-size: 12px; }
.abuser-metric-details { width: 100%; white-space: normal; font-size: 12px; }
.abuser-metric-details[open] { width: 100%; }
.abuser-metric-details summary { color: var(--navy); cursor: pointer; padding: 8px 0; }
.abuser-metric-details dl { margin: 8px 0; }
.abuser-metric-details dl div { border-bottom: 1px solid var(--line); padding: 6px 0; }
.abuser-metric-details dt { color: var(--text-2); }
.abuser-metric-details dd { margin: 3px 0 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
#abuser-detection-filters .field[hidden] { display: none; }
@media (max-width: 700px) { #abuser-detection-screen .detection-tracks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.detection-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin-block: 16px; }
.detection-pagination span { font-size: 13px; color: var(--muted); }

/* Tilt uses the same controls and treatment cells as Detection. */
.tilt-filter-card, .tilt-list, .tilt-details { padding: 18px 20px; margin-bottom: 18px; min-width: 0; }
.tilt-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.tilt-toolbar .detection-handling-tabs { margin: 0 auto 0 0; align-self: center; }
.tilt-tier-field { width: 220px; }
.tilt-toolbar-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tilt-history-fields, .tilt-date-fields { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; margin-top: 14px; }
.tilt-history-fields > .field { flex: 1 1 220px; }
.tilt-date-fields { margin-top: 0; }
.tilt-date-fields .field { flex: 1 1 140px; }
.tilt-history-fields[hidden] { display: none; }
.tilt-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tilt-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.tilt-metrics .average { padding: 12px; background: var(--sub); border-radius: var(--r-ctl); min-width: 0; }
.tilt-metrics .k { font-size: 12px; color: var(--text-2); margin: 0 0 6px; }
.tilt-metrics .v { display: block; font-size: 21px; }
.tilt-metrics .denominator { font-size: 12px; }
.tilt-badge { padding: 4px 9px; border-radius: 12px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.tilt-strict { color: #8b302b; background: #fce8e5; }
.tilt-watch { color: #765416; background: #fff0cd; }
.tilt-evidence-update { padding: 10px 12px; background: #fff0cd; color: #634615; border-left: 3px solid #b98526; }
.tilt-details .hint, .tilt-list .hint, .tilt-review { overflow-wrap: anywhere; }
.tilt-data-details { margin-bottom: 14px; }
.tilt-sequence { padding-left: 24px; }
.tilt-sequence li { margin-bottom: 14px; }
.tilt-sequence li p { margin: 6px 0; font-size: 13px; }
.tilt-review { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 14px; }
.tilt-detail-action { max-width: 240px; margin: 12px 0; }
.tilt-review textarea { width: 100%; padding: 10px; margin-top: 6px; border: 1px solid var(--ctl); border-radius: var(--r-ctl); font: inherit; resize: vertical; }
.tilt-table { width: 1px; table-layout: fixed; }
.tilt-table .tilt-width-user { width: 220px; }
.tilt-table .tilt-width-brand, .tilt-table .tilt-width-loss { width: 110px; }
.tilt-table .tilt-width-agent { width: 142px; }
.tilt-table .tilt-width-tier { width: 100px; }
.tilt-table .tilt-width-severity { width: 82px; }
.tilt-table .tilt-width-purchases { width: 122px; }
.tilt-table .tilt-width-play, .tilt-table .tilt-width-first, .tilt-table .tilt-width-handled { width: 150px; }
.tilt-table .tilt-width-by { width: 210px; }
.tilt-table .tilt-width-action { width: 176px; }
.tilt-table .tilt-width-note { width: 170px; }
.tilt-table .tilt-width-evidence { width: 136px; }
.tilt-table th, .tilt-table td { box-sizing: border-box; white-space: normal; overflow-wrap: anywhere; vertical-align: top; }
.tilt-table .user-link { white-space: nowrap; }
.tilt-table .detection-action select { width: 100%; }
.tilt-header { display: inline-block; cursor: help; }
.tilt-header > span { display: block; color: var(--text-3); font-weight: 400; font-size: 12px; margin-top: 4px; }
@media (max-width: 900px) { .tilt-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .tilt-toolbar .detection-handling-tabs { width: 100%; } .tilt-tier-field { flex: 1 1 100%; width: auto; } .tilt-toolbar-actions { width: 100%; } }
@media (max-width: 480px) { .tilt-metrics { grid-template-columns: minmax(0, 1fr); } .tilt-filter-card, .tilt-list, .tilt-details { padding: 14px; } }

/* Events: the SC timeline with a pager that never refetches. Derived balances are italic (and say so to screen readers). */
.events { grid-template-columns: minmax(0, 1fr); }
.events #events-body > .table-wrap { overflow-x: auto; max-width: 100%; }
.events-table td.derived { font-style: italic; color: var(--text-2); position: relative; }
.events-table td:last-child { white-space: normal; overflow-wrap: anywhere; min-width: 12rem; }
.events-table td:nth-child(2) { white-space: nowrap; }
/* While Events is open it spans the whole record width: the Account facts rail steps aside so Details can wrap. */
.record-body:has(#events:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
.record-body:has(#events:not([hidden])) > .record-rail { display: none; }
.events-data-notes { margin: 0; padding-left: 18px; font-size: 12px; color: var(--text-2); }
.events-table th[scope="row"] { font-weight: 500; white-space: nowrap; }
.events-pager { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.events-pager label { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--text-2); }
.events-pager input { width: 6em; height: 34px; font: inherit; }
.events-pager select { height: 34px; font: inherit; }
.events-page-of { font-weight: 600; }
.events-total { margin: 0; }
.events-limitations { margin: 0; font-size: 12px; color: var(--text-3); }
.events .trend-custom label { font-size: 13px; color: var(--text-2); }

/* Game, Deposit and Redeem results are paged (100 rows by default, public/pager.mjs) instead of one long scroll.
   On desktop the table box does not scroll, so the column header sticks to the top of the window, just under the
   tab's sticky sub-navigation, while a page is read. Narrow screens keep the sideways-scrolling box. */
.pager-note { margin: 0; }
@media (min-width: 900px) {
  #win-search-results .table-wrap, [id$="-money-search-results"] .table-wrap { overflow: visible; }
  #win-search-results thead th, [id$="-money-search-results"] thead th { top: var(--result-head-top, 49px); z-index: 1; }
}
