/* ============================================================
   PSP Backoffice — Design Tokens
   Dense pro data-tool (Stripe/Linear/Retool) with Softswiss-ish
   gambling-industry trust palette.
   ============================================================ */

:root {
  /* -- Neutrals (light) -- */
  --n-0:  #ffffff;
  --n-25: #fbfcfd;
  --n-50: #f6f8fa;
  --n-75: #f0f3f7;
  --n-100:#e7ecf2;
  --n-150:#dce3eb;
  --n-200:#cbd3dc;
  --n-300:#aab3bf;
  --n-400:#7c8593;
  --n-500:#5a626f;
  --n-600:#404954;
  --n-700:#2a323c;
  --n-800:#1b222b;
  --n-900:#11161d;
  --n-950:#0a0d12;

  /* -- Brand / primary (deep indigo-blue, trust + fintech) -- */
  --p-50:  #eef2ff;
  --p-100: #dbe3ff;
  --p-200: #b9c7ff;
  --p-300: #8da0ff;
  --p-400: #5e76ff;
  --p-500: #3b55f0;
  --p-600: #2b3fd1;
  --p-700: #1f30a6;
  --p-800: #182682;
  --p-900: #121c5e;

  /* -- Accent (warm gold, gambling-world nod, used sparingly for VIP / value) -- */
  --g-50:  #fef7e6;
  --g-100: #fceccb;
  --g-200: #f8d98e;
  --g-300: #f2c257;
  --g-400: #e6a82c;
  --g-500: #c48a14;
  --g-600: #9a6b0c;

  /* -- Semantic -- */
  --ok-50:  #e6f8ee;
  --ok-100: #c3eed4;
  --ok-300: #57c688;
  --ok-500: #1f9d57;
  --ok-600: #147a42;
  --ok-700: #0c5a30;

  --warn-50:  #fff6e5;
  --warn-100: #ffe4b0;
  --warn-300: #f5b441;
  --warn-500: #d48806;
  --warn-700: #8a5a00;

  --err-50:  #fdecec;
  --err-100: #fbd1d1;
  --err-300: #ef6b6b;
  --err-500: #d03c3c;
  --err-700: #8f2020;

  --info-50: #e6f3ff;
  --info-300:#5aa6ff;
  --info-500:#1f7fe3;

  --purple-500: #7a4ad6;
  --teal-500:   #0e9b8e;
  --pink-500:   #d6488f;

  /* -- Surfaces -- */
  --surface-canvas: var(--n-50);
  --surface-panel:  var(--n-0);
  --surface-raised: var(--n-0);
  --surface-sunken: var(--n-75);
  --surface-hover:  var(--n-75);
  --surface-active: var(--n-100);

  /* -- Text -- */
  --text-primary:   var(--n-900);
  --text-secondary: var(--n-600);
  --text-tertiary:  var(--n-400);
  --text-disabled:  var(--n-300);
  --text-on-primary:#ffffff;
  --text-on-dark:   #ffffff;
  --text-link:      var(--p-600);

  /* -- Borders -- */
  --border-subtle: var(--n-100);
  --border-default: var(--n-150);
  --border-strong: var(--n-200);
  --border-focus: var(--p-500);

  /* -- Sidebar (dark chrome) -- */
  --side-bg: #0f1420;
  --side-bg-2: #141a2a;
  --side-border: #1e2740;
  --side-text: #c3cadb;
  --side-text-dim: #7f88a0;
  --side-active-bg: #1f2a47;
  --side-active-text: #ffffff;
  --side-accent: var(--p-400);

  /* -- Topbar -- */
  --topbar-bg: var(--n-0);
  --topbar-border: var(--n-100);

  /* -- Radii -- */
  --r-xs: 3px;
  --r-sm: 5px;
  --r-md: 7px;
  --r-lg: 10px;
  --r-xl: 14px;
  --r-2xl: 20px;
  --r-pill: 999px;

  /* -- Shadows -- */
  --shadow-xs: 0 1px 1px rgba(15,20,32,.04), 0 1px 2px rgba(15,20,32,.04);
  --shadow-sm: 0 1px 2px rgba(15,20,32,.05), 0 2px 4px rgba(15,20,32,.04);
  --shadow-md: 0 2px 4px rgba(15,20,32,.06), 0 6px 14px rgba(15,20,32,.06);
  --shadow-lg: 0 8px 16px rgba(15,20,32,.08), 0 24px 40px rgba(15,20,32,.10);
  --shadow-popover: 0 4px 10px rgba(15,20,32,.08), 0 12px 28px rgba(15,20,32,.12);
  --ring-focus: 0 0 0 3px rgba(59,85,240,.22);

  /* -- Type -- */
  --font-sans: "Inter Tight", "InterTight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font-display: "Inter Tight", ui-sans-serif, system-ui, sans-serif;

  /* Type scale — dense data-tool */
  --fs-xxs: 10.5px;
  --fs-xs: 11.5px;
  --fs-sm: 12.5px;
  --fs-md: 13.5px;
  --fs-base: 14px;
  --fs-lg: 15.5px;
  --fs-xl: 18px;
  --fs-2xl: 22px;
  --fs-3xl: 28px;
  --fs-4xl: 34px;
  --fs-5xl: 44px;

  --lh-tight: 1.15;
  --lh-snug: 1.3;
  --lh-normal: 1.5;

  /* -- Spacing (4-based) -- */
  --s-0: 0;
  --s-1: 2px;
  --s-2: 4px;
  --s-3: 6px;
  --s-4: 8px;
  --s-5: 12px;
  --s-6: 16px;
  --s-7: 20px;
  --s-8: 24px;
  --s-9: 32px;
  --s-10: 40px;
  --s-11: 48px;
  --s-12: 64px;

  /* -- Layout -- */
  --nav-w: 232px;
  --nav-w-collapsed: 60px;
  --topbar-h: 52px;
  --subbar-h: 44px;

  --ease: cubic-bezier(.2,.8,.2,1);
}

/* Elevated panel / card utility */
.panel {
  background: var(--surface-panel);
  border: 1px solid var(--border-default);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
}

.hairline { border: 1px solid var(--border-default); }
.hairline-b { border-bottom: 1px solid var(--border-default); }
.hairline-t { border-top: 1px solid var(--border-default); }

/* Basic resets */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--text-primary);
  background: var(--surface-canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11","ss01","ss03","tnum" 1;
}

button { font-family: inherit; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: var(--n-150);
  border-radius: 999px;
  border: 2px solid var(--surface-canvas);
}
::-webkit-scrollbar-thumb:hover { background: var(--n-200); }
::-webkit-scrollbar-track { background: transparent; }

/* Tabular numbers for data */
.tnum { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* Table basics shared across screens */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--fs-md);
  font-variant-numeric: tabular-nums;
}
.data-table thead th {
  text-align: left;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  background: var(--n-50);
  border-bottom: 1px solid var(--border-default);
  padding: 8px 10px;
  position: sticky;
  top: 0;
  z-index: 2;
  white-space: nowrap;
}
.data-table tbody td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
  color: var(--text-primary);
  white-space: nowrap;
}
.data-table tbody tr.selected td { background: var(--p-50); }

/* Status chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.4;
  border: 1px solid transparent;
  white-space: nowrap;
}
.chip .dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; display: inline-block; }

.chip--ok     { background: var(--ok-50);   color: var(--ok-700);  border-color: var(--ok-100); }
.chip--warn   { background: var(--warn-50); color: var(--warn-700);border-color: var(--warn-100); }
.chip--err    { background: var(--err-50);  color: var(--err-700); border-color: var(--err-100); }
.chip--info   { background: var(--info-50); color: var(--info-500);border-color: #cfe3ff; }
.chip--neutral{ background: var(--n-75);    color: var(--n-700);   border-color: var(--n-150); }
.chip--gold   { background: var(--g-50);    color: var(--g-600);   border-color: var(--g-100); }
.chip--purple { background: #f1ebff;        color: #5b2db5;        border-color: #e0d2fb; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 550;
  font-size: var(--fs-md);
  line-height: 1;
  padding: 7px 12px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .12s var(--ease), border-color .12s var(--ease), color .12s var(--ease), box-shadow .12s var(--ease);
  white-space: nowrap;
  user-select: none;
}
.btn:focus-visible { outline: none; box-shadow: var(--ring-focus); }
.btn--primary { background: var(--p-600); color: #fff; border-color: var(--p-600); }
.btn--primary:hover { background: var(--p-700); border-color: var(--p-700); }
.btn--secondary { background: var(--n-0); color: var(--n-700); border-color: var(--border-default); }
.btn--secondary:hover { background: var(--n-50); }
.btn--ghost { background: transparent; color: var(--n-700); }
.btn--ghost:hover { background: var(--n-75); }
.btn--danger { background: var(--err-500); color: #fff; border-color: var(--err-500); }
.btn--danger:hover { background: var(--err-700); }
.btn--sm { padding: 5px 9px; font-size: var(--fs-sm); border-radius: var(--r-sm); }
.btn--xs { padding: 3px 7px; font-size: var(--fs-xs); border-radius: var(--r-sm); }
.btn--icon { padding: 6px; width: 30px; height: 30px; }
.btn--icon.btn--sm { width: 26px; height: 26px; padding: 4px; }

/* Inputs */
.input, .select {
  font-family: inherit;
  font-size: var(--fs-md);
  color: var(--text-primary);
  background: var(--n-0);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  padding: 6px 10px;
  line-height: 1.3;
  width: 100%;
  transition: border-color .12s, box-shadow .12s;
}
.input:focus, .select:focus { outline: none; border-color: var(--p-500); box-shadow: var(--ring-focus); }
.input::placeholder { color: var(--n-300); }
.input--sm { padding: 4px 8px; font-size: var(--fs-sm); }

/* Segmented control */
.segmented {
  display: inline-flex;
  background: var(--n-75);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  padding: 2px;
  gap: 2px;
}
.segmented button {
  font-family: inherit;
  background: transparent;
  border: 0;
  padding: 4px 10px;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--r-sm);
  cursor: pointer;
}
.segmented button.active {
  background: var(--n-0);
  color: var(--text-primary);
  box-shadow: var(--shadow-xs);
}

/* Cards */
.kpi {
  background: var(--surface-panel);
  border: 1px solid var(--border-default);
  border-radius: var(--r-lg);
  padding: 14px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 104px;
  position: relative;
  overflow: hidden;
}
.kpi__label { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; color: var(--text-tertiary); font-weight: 600; }
.kpi__value { font-size: 24px; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.kpi__delta { font-size: var(--fs-xs); font-weight: 600; }
.kpi__delta.up { color: var(--ok-600); }
.kpi__delta.down { color: var(--err-500); }

/* Avatar */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--p-100);
  color: var(--p-700);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .02em;
}
.avatar--lg { width: 56px; height: 56px; font-size: 20px; }
.avatar--md { width: 36px; height: 36px; font-size: 13px; }

/* Form label */
.form-label {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

/* Tab nav */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border-default); }
.tabs button {
  font-family: inherit;
  background: transparent;
  border: 0;
  padding: 10px 14px;
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tabs button:hover { color: var(--text-primary); }
.tabs button.active { color: var(--text-primary); border-bottom-color: var(--p-600); }

/* Scrollbars in dark sidebar */
.side ::-webkit-scrollbar-thumb { background: #1e2740; border-color: var(--side-bg); }

/* Utility */
.row { display: flex; align-items: center; }
.col { display: flex; flex-direction: column; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; }
.flex-1 { flex: 1 1 auto; }
.muted { color: var(--text-secondary); }
.dim { color: var(--text-tertiary); }
.strong { font-weight: 600; color: var(--text-primary); }
.mono-sm { font-family: var(--font-mono); font-size: var(--fs-sm); }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ============================================================
   Wave 0 — shared primitives (design-alignment plan §4).
   ADDITIVE ONLY. Tokens first, then the CSS for the shared
   components that live in src/ui.jsx (Pb*/PillTabs/ChartTip)
   and src/report-shell.jsx (HrsModal/HrsConfirm/HrsColsMenu/
   HrsRowActions/HrsSearchSelect/HrsNotice). Class prefixes are
   new and globally unique (hrsm-, hrscm-, hrs-rowact, hrs-ssel,
   hrs-notice, pbf-, ptab, charttip) — grep-verified against
   src/ and styles/ before landing.
   ============================================================ */

:root {
  /* Chart series colors — the ONLY sanctioned source for chart hexes.
     1/2 are the classic ui.jsx pair; 3–5 absorb HostDashboard's
     HD_CHART_COLORS (bet green = --ok-500, win deep-red, profit amber);
     6–8 extend the ramp for multi-series charts. Pages must use these
     instead of hex literals (canon §2.10). */
  --chart-1: var(--p-500);
  --chart-2: var(--g-400);
  --chart-3: var(--ok-500);
  --chart-4: #a3001b;   /* absorbed: HD_CHART_COLORS.win */
  --chart-5: #b7791f;   /* absorbed: HD_CHART_COLORS.profit */
  --chart-6: var(--info-500);
  --chart-7: var(--purple-500);
  --chart-8: var(--teal-500);

  /* Elevation additions — modal + scrim were the two cases the
     --shadow-* set did not cover (popover/tooltip use --shadow-popover). */
  --shadow-modal: 0 30px 70px -15px rgba(15,20,32,.4);
  --scrim: rgba(15,20,32,.5);
}

/* --- Disabled-button treatment (plan §4.10) ---------------------------
   THE one disabled rule. `disabled` attribute or `.is-disabled` class;
   never inline opacity/cursor hacks. pointer-events:none also suppresses
   hover restyles; tooltips on disabled controls need a wrapper anyway
   (see NoBackend in ui.jsx). Covers both button families (§2.4). */
.btn[disabled], .btn.is-disabled,
.hrs-btn[disabled], .hrs-btn.is-disabled,
.is-disabled {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
}

/* --- HrsModal / HrsConfirm (plan §4.1) --------------------------------
   The canonical hpx-modal chrome (HostPlayers.jsx page CSS) promoted to
   shared class names, tokenized. Full-screen ≤860px. */
.hrsm-scrim { position: fixed; inset: 0; z-index: 400; background: var(--scrim); backdrop-filter: blur(2px); display: grid; place-items: start center; padding: 30px 16px; overflow: auto; }
.hrsm { background: var(--surface-panel); border-radius: 12px; box-shadow: var(--shadow-modal); display: flex; flex-direction: column; max-height: calc(100vh - 60px); width: 100%; }
.hrsm--sm { max-width: 480px; }
.hrsm--md { max-width: 640px; }
.hrsm--lg { max-width: 860px; }
.hrsm-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border-subtle); font-size: 16px; font-weight: 700; color: var(--text-primary); }
.hrsm-x { border: 0; background: var(--n-75); color: var(--n-500); width: 30px; height: 30px; border-radius: 8px; cursor: pointer; display: inline-grid; place-items: center; flex-shrink: 0; }
.hrsm-x:hover { background: var(--n-100); color: var(--text-primary); }
.hrsm-body { padding: 16px 20px; overflow-y: auto; }
.hrsm-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border-subtle); background: var(--n-25); border-radius: 0 0 12px 12px; }
.hrsm-p { font-size: 13px; color: var(--n-600); line-height: 1.6; margin: 0 0 12px; }
.hrsm-p:last-child { margin-bottom: 0; }
.hrsm-p code { background: var(--p-50); color: var(--p-700); padding: 1px 5px; border-radius: 4px; font-size: 11.5px; }
.hrsm-typed { margin-top: 12px; }
.hrsm-typed label { display: block; font-size: 11.5px; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }
.hrsm-typed label code { background: var(--err-50); color: var(--err-700); padding: 1px 5px; border-radius: 4px; font-size: 11px; }

/* --- HrsColsMenu (plan §4.2) ------------------------------------------
   One column-visibility popover for all eight divergent pickers. */
.hrscm { position: relative; display: inline-block; }
.hrscm-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--border-default); border-radius: var(--r-md); background: var(--surface-panel); color: var(--text-secondary); font-family: inherit; font-size: var(--fs-sm); font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .12s, color .12s, border-color .12s; }
.hrscm-btn:hover { background: var(--n-50); color: var(--text-primary); }
.hrscm-btn:focus-visible { outline: none; box-shadow: var(--ring-focus); }
.hrscm-scrim { position: fixed; inset: 0; z-index: 60; }
.hrscm-pop { position: absolute; z-index: 61; top: calc(100% + 6px); right: 0; width: 260px; background: var(--surface-panel); border: 1px solid var(--border-default); border-radius: 12px; box-shadow: var(--shadow-popover); overflow: hidden; }
.hrscm-pop--left { right: auto; left: 0; }
.hrscm-head { padding: 10px 12px; border-bottom: 1px solid var(--border-subtle); display: flex; align-items: center; gap: 8px; background: var(--n-25); }
.hrscm-head-t { font-size: 12.5px; font-weight: 700; color: var(--text-primary); }
.hrscm-x { width: 22px; height: 22px; border-radius: 5px; background: transparent; }
.hrscm-head-s { font-size: 10.5px; color: var(--text-tertiary); }
.hrscm-list { padding: 6px 4px; max-height: 320px; overflow: auto; }
.hrscm-opt { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 6px; cursor: pointer; }
.hrscm-opt:hover { background: var(--n-25); }
.hrscm-opt input { accent-color: var(--p-500); margin: 0; }
.hrscm-opt--req { cursor: not-allowed; opacity: .7; }
.hrscm-opt--req:hover { background: transparent; }
.hrscm-opt-l { flex: 1; font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.hrscm-opt-l.on { font-weight: 600; color: var(--text-primary); }
.hrscm-req { font-size: 9.5px; font-weight: 700; padding: 2px 6px; border-radius: var(--r-pill); background: var(--n-75); color: var(--text-tertiary); text-transform: uppercase; letter-spacing: .05em; }
.hrscm-foot { padding: 8px 10px; border-top: 1px solid var(--border-subtle); background: var(--n-25); display: flex; gap: 6px; justify-content: space-between; align-items: center; }
.hrscm-reset { padding: 5px 10px; border: 1px solid var(--border-default); border-radius: 6px; background: var(--surface-panel); font-family: inherit; font-size: 11.5px; font-weight: 600; color: var(--text-secondary); cursor: pointer; }
.hrscm-reset:hover { background: var(--n-50); }
.hrscm-saved { font-size: 10.5px; color: var(--text-tertiary); font-weight: 600; }

/* --- HrsRowActions (plan §4.3) ----------------------------------------
   Row-action icon buttons; builds on the existing .btn--icon class. */
.hrs-rowact { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.hrs-rowact .btn--icon { color: var(--text-secondary); }
.hrs-rowact .btn--icon:hover { color: var(--text-primary); }
.hrs-rowact .hrs-rowact--danger { color: var(--err-500); }
.hrs-rowact .hrs-rowact--danger:hover { color: var(--err-700); background: var(--err-50); }
.hrs-rowact .hrs-rowact--primary { color: var(--p-600); }
.hrs-rowact .hrs-rowact--primary:hover { color: var(--p-700); background: var(--p-50); }

/* --- PbFilterBar / PbFilterPill (plan §4.4) ---------------------------
   PayBO hero filter strip; reuses the filter-hero__* card vocabulary
   (tweaks-extras.css) with a flex layout that fits any field count. */
.pbf { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; align-items: stretch; }
.pbf .filter-hero__card { flex: 1 1 150px; min-width: 150px; }
.pbf .filter-hero__card--search { flex: 2.2 1 260px; min-width: 240px; }
.pbf .filter-hero__card--result { flex: .8 1 110px; min-width: 110px; }
.pbf-btns { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.pbf-pills { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: -6px 0 12px; }
.pbf-pills__lab { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-tertiary); }
.pbf-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; background: var(--p-50); color: var(--p-700); border: 1px solid color-mix(in oklab, var(--p-500) 22%, transparent); border-radius: var(--r-pill); font-size: 11.5px; font-weight: 600; }
.pbf-pill__x { width: 16px; height: 16px; border-radius: var(--r-pill); border: none; background: color-mix(in oklab, var(--p-500) 18%, transparent); color: var(--p-700); cursor: pointer; display: inline-grid; place-items: center; padding: 0; }
.pbf-pill__x:hover { background: color-mix(in oklab, var(--p-500) 30%, transparent); }
.pbf-clearall { border: none; background: transparent; color: var(--text-link); font-family: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer; padding: 3px 6px; border-radius: 5px; }
.pbf-clearall:hover { background: var(--p-50); }
@media (max-width: 640px) {
  .pbf { gap: 8px; }
  .pbf .filter-hero__card--result { order: 99; }
  .pbf-btns { width: 100%; }
  .pbf-btns .btn { flex: 1; }
}

/* --- PillTabs (plan §4.5) ---------------------------------------------
   The hsk-tab pill-tab shape (HostSkinsUnified exemplar) under shared
   class names so pages stop borrowing another page's CSS scope. */
.ptabs { display: flex; gap: 4px; flex-wrap: wrap; }
.ptab { display: inline-flex; align-items: center; gap: 6px; position: relative; padding: 8px 12px; border-radius: 7px; white-space: nowrap; cursor: pointer; background: transparent; border: 1px solid transparent; color: var(--text-secondary); font-family: inherit; font-size: 12.5px; font-weight: 500; text-decoration: none; transition: background .12s, color .12s, border-color .12s; }
.ptab:hover { background: var(--n-50); color: var(--text-primary); }
.ptab.is-on { background: var(--p-50); border-color: var(--p-100); color: var(--p-700); font-weight: 700; }
.ptab:focus-visible { outline: none; box-shadow: var(--ring-focus); }
.ptab.is-pending { color: var(--text-tertiary); }
.ptab.is-pending:hover { color: var(--text-secondary); }
.ptab__count { font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: var(--r-pill); background: var(--n-100); color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.ptab.is-on .ptab__count { background: var(--p-100); color: var(--p-700); }
.ptab__dot { width: 5px; height: 5px; border-radius: var(--r-pill); background: var(--warn-500); flex-shrink: 0; }

/* --- ChartTip (plan §4.6) ---------------------------------------------
   The shared dark chart tooltip Dashboard used to hand-roll twice. */
.charttip { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--n-900); color: var(--n-50); padding: 6px 10px; border-radius: 8px; font-size: 11px; font-weight: 600; white-space: nowrap; box-shadow: var(--shadow-popover); z-index: 5; pointer-events: none; }
.charttip__title { font-size: 10px; color: var(--n-300); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 3px; }
.charttip__row { display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.charttip__row + .charttip__row { margin-top: 2px; }
.charttip__swatch { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.charttip__label { color: var(--n-200); }
.charttip__value { margin-left: auto; padding-left: 14px; color: var(--n-0); font-weight: 700; }

/* --- HrsSearchSelect (plan §4.7) --------------------------------------
   Searchable select (select2 stand-in). */
.hrs-ssel { position: relative; }
.hrs-ssel__wrap { position: relative; }
.hrs-ssel__icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-tertiary); display: inline-flex; pointer-events: none; }
.hrs-ssel .input { padding-left: 32px; }
.hrs-ssel--picked .input { padding-right: 32px; }
.hrs-ssel__clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; cursor: pointer; color: var(--text-tertiary); display: inline-flex; padding: 4px; }
.hrs-ssel__clear:hover { color: var(--text-primary); }
.hrs-ssel__drop { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 40; background: var(--surface-panel); border: 1px solid var(--border-default); border-radius: 8px; box-shadow: var(--shadow-popover); overflow: hidden; }
.hrs-ssel__item { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 8px 12px; border: 0; background: transparent; cursor: pointer; font-family: inherit; text-align: left; }
.hrs-ssel__item:hover { background: var(--n-50); }
.hrs-ssel__item-l { font-weight: 600; color: var(--n-600); font-size: 13px; display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.hrs-ssel__item-s { color: var(--text-tertiary); font-size: 12px; white-space: nowrap; }
.hrs-ssel__hint { padding: 8px 12px; font-size: 11.5px; color: var(--text-tertiary); line-height: 1.5; }
.hrs-ssel__note { font-size: 11px; color: var(--text-tertiary); margin-top: 4px; line-height: 1.45; }

/* --- HrsNotice (plan §4.8) --------------------------------------------
   Callout/notice block (info/warn/err/ok) replacing hu-errbox /
   hma-errs / hpc-warn one-offs and truncation banners. */
.hrs-notice { display: flex; gap: 10px; align-items: flex-start; border: 1px solid; border-radius: 8px; padding: 10px 12px; font-size: 12.5px; margin-bottom: 12px; }
.hrs-notice--compact { padding: 7px 10px; margin-bottom: 8px; }
.hrs-notice__icon { flex-shrink: 0; display: inline-flex; margin-top: 1px; }
.hrs-notice__body { flex: 1; min-width: 0; line-height: 1.5; }
.hrs-notice__title { font-weight: 700; margin-bottom: 2px; }
.hrs-notice__actions { display: flex; gap: 6px; flex-shrink: 0; align-items: center; }
.hrs-notice ul { margin: 4px 0 0; padding-left: 18px; }
.hrs-notice--info { background: var(--info-50); border-color: color-mix(in oklab, var(--info-500) 30%, transparent); color: var(--n-700); }
.hrs-notice--info .hrs-notice__icon { color: var(--info-500); }
.hrs-notice--warn { background: var(--warn-50); border-color: var(--warn-100); color: var(--warn-700); }
.hrs-notice--warn .hrs-notice__icon { color: var(--warn-500); }
.hrs-notice--err { background: var(--err-50); border-color: var(--err-100); color: var(--err-700); }
.hrs-notice--err .hrs-notice__icon { color: var(--err-500); }
.hrs-notice--ok { background: var(--ok-50); border-color: var(--ok-100); color: var(--ok-700); }
.hrs-notice--ok .hrs-notice__icon { color: var(--ok-500); }

/* --- ≤860px: shared modal goes full-screen (brief §11) ---------------- */
@media (max-width: 860px) {
  .hrsm-scrim { padding: 0; }
  .hrsm, .hrsm--sm, .hrsm--md, .hrsm--lg { max-width: none; min-height: 100vh; max-height: none; border-radius: 0; }
  .hrsm-foot { border-radius: 0; position: sticky; bottom: 0; }
}
