/* PartnersHub — Back Office Twin shell & UI kit (Part A).
   Hand-written CSS with tokens; hub pages do not use Tailwind.
   Brand: AREP (arep-brand v3). Cormorant Garamond for display, Inter for the UI.
   Palette: blue #065CBA, silver #A7A9AC, graphite #807B80, white, black; navy #13294B for the
   section heads, the active bar and the Action button. No amber anywhere. Red is reserved for
   "needs attention". Layout mirrors BackOffice's information placement only (no BO assets). */

:root {
  /* brand */
  --hub-blue: #065CBA;
  --hub-blue-ink: #054A96;
  --hub-blue-soft: #E6EFFA;
  --hub-navy: #13294B;
  --hub-navy-2: #1C3A66;
  --hub-silver: #A7A9AC;
  --hub-graphite: #807B80;
  --hub-white: #FFFFFF;
  --hub-black: #000000;

  /* surfaces + text */
  --hub-bg: #F3F5F8;
  --hub-panel: #FFFFFF;
  --hub-ink: #13202F;
  --hub-ink-2: #2A3746;
  --hub-muted: #5D6A79;
  --hub-faint: #9AA5B2;
  --hub-line: #DCE2E9;
  --hub-line-2: #C9D1DB;

  /* status tones (pill + notice). Change a tone here and every page follows. */
  --hub-ok: #1C6B45;
  --hub-ok-soft: #DFF0E6;
  --hub-bad: #B42335;
  --hub-bad-soft: #F7E2E5;
  --hub-badge: #C8312F;
  --hub-info: #065CBA;
  --hub-info-soft: #E6EFFA;
  --hub-dark: #22303F;
  --hub-mute-soft: #EDF0F3;

  /* type */
  --hub-font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --hub-font-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --hub-font-mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  /* geometry */
  --hub-side-w: 224px;
  --hub-top-h: 60px;
  --hub-radius: 10px;
  --hub-radius-sm: 7px;
  --hub-shadow-pop: 0 18px 40px rgba(13, 30, 51, .18);
  --hub-focus: 0 0 0 2px #FFFFFF, 0 0 0 4px var(--hub-blue);
}

/* ---- base ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.hub {
  margin: 0;
  background: var(--hub-bg);
  color: var(--hub-ink);
  font-family: var(--hub-font-ui);
  font-size: 13.5px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* Element defaults use :where() so every component class (specificity 0,1,0) wins over them. */
:where(.hub) :is(h1, h2, h3, h4) { margin: 0; color: var(--hub-ink); }
:where(.hub) :is(h2, h3, h4) { font-family: var(--hub-font-ui); font-weight: 650; letter-spacing: -.005em; }
:where(.hub) h3 { font-size: 14px; }
:where(.hub) p { margin: 0; }
:where(.hub) a { color: var(--hub-blue); text-underline-offset: 3px; }
:where(.hub) a:where(:hover) { color: var(--hub-blue-ink); }
:where(.hub) img { max-width: 100%; }
:where(.hub) :focus-visible { outline: 2px solid var(--hub-blue); outline-offset: 2px; }
:where(.hub) button { font-family: inherit; }
.num, .hub-money, .tn { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.mono { font-family: var(--hub-font-mono); font-size: .92em; }
.muted { color: var(--hub-muted); }
.r { text-align: right; }
.hub-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.hub-skip { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--hub-navy);
  color: #fff !important; padding: 8px 14px; border-radius: 6px; font-weight: 600; text-decoration: none; }
.hub-skip:focus { top: 12px; }
.hub-ico { flex: 0 0 auto; vertical-align: -2px; }

/* ---- bands (test mode, impersonation) ---------------------------------------------- */
.hub-band { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  padding: 4px 16px; font-size: 11.5px; font-weight: 650; letter-spacing: .06em; text-align: center; }
.hub-band--test { background: var(--hub-bad); color: #FFFFFF; }
.hub-band--imp { position: sticky; top: 0; z-index: 60; background: var(--hub-navy); color: #FFFFFF;
  padding: 9px 16px; font-size: 13px; letter-spacing: .03em; border-bottom: 3px solid var(--hub-blue); }
.hub-band--imp form { display: inline; margin: 0; }
.hub-band--imp button { all: unset; cursor: pointer; padding: 3px 10px; border-radius: 6px;
  background: #FFFFFF; color: var(--hub-navy); font-weight: 700; font-size: 12.5px; letter-spacing: 0; }
.hub-band--imp button:hover { background: var(--hub-blue-soft); }
.hub-band--imp button:focus-visible { box-shadow: 0 0 0 2px var(--hub-navy), 0 0 0 4px #FFFFFF; }

/* ---- app grid ------------------------------------------------------------------------ */
.hub-app { display: grid; grid-template-columns: var(--hub-side-w) minmax(0, 1fr); min-height: 100vh; }
.hub-main { display: flex; flex-direction: column; min-width: 0; }

/* ---- sidebar ------------------------------------------------------------------------- */
.hub-side { position: relative; background: var(--hub-panel); border-right: 1px solid var(--hub-line); min-width: 0; }
.hub-side__inner { position: sticky; top: 0; max-height: 100vh; overflow-y: auto; display: flex; flex-direction: column;
  padding: 0 0 18px; scrollbar-width: thin; }
.hub-side__brand { display: block; padding: 18px 18px 14px; text-align: center; }
.hub-side__logo { display: inline-block; height: 88px; width: auto; }
.hub-side__close { display: none; }
.hub-entity { margin: 0 14px 8px; border: 1px solid var(--hub-line); border-radius: 6px; padding: 6px 8px;
  font-size: 9.5px; font-weight: 700; letter-spacing: .04em; color: var(--hub-navy);
  display: flex; justify-content: space-between; align-items: center; gap: 6px; line-height: 1.25; }
.hub-entity__tag { background: var(--hub-navy); color: #FFFFFF; border-radius: 3px; padding: 1px 5px;
  font-size: 9.5px; letter-spacing: .06em; }
.hub-nav { display: grid; }
.hub-nav__head { display: flex; align-items: center; gap: 7px; padding: 14px 18px 5px; font-size: 10.5px;
  font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--hub-navy); margin: 0; }
.hub-nav__head .hub-ico { color: var(--hub-navy); }
.hub-nav__list { list-style: none; margin: 0; padding: 0; }
.hub-nav__link { display: flex; align-items: center; gap: 10px; padding: 7px 16px 7px 38px; color: var(--hub-ink-2);
  text-decoration: none; font-size: 13px; font-weight: 500; }
.hub-nav__link:hover { background: var(--hub-blue-soft); color: var(--hub-ink); }
.hub-nav__link:focus-visible { outline: 2px solid var(--hub-blue); outline-offset: -2px; border-radius: 0; }
.hub-nav__link.is-active { background: var(--hub-navy); color: #FFFFFF; font-weight: 600; }
.hub-nav__link.is-active:focus-visible { outline-color: #FFFFFF; }
.hub-nav__count { margin-left: auto; min-width: 20px; text-align: center; font-size: 10.5px; font-weight: 700;
  background: var(--hub-badge); color: #FFFFFF; border-radius: 9px; padding: 0 6px; line-height: 17px; }
.hub-nav__link.is-active .hub-nav__count { background: #FFFFFF; color: var(--hub-navy); }
.hub-side__who { margin: 16px 14px 0; padding-top: 12px; border-top: 1px solid var(--hub-line);
  font-size: 11.5px; color: var(--hub-muted); overflow-wrap: anywhere; }

/* ---- top bar ------------------------------------------------------------------------- */
.hub-top { position: sticky; top: 0; z-index: 30; height: var(--hub-top-h); display: flex; align-items: center;
  gap: 14px; padding: 0 24px; background: var(--hub-panel); border-bottom: 1px solid var(--hub-line); }
/* While viewing as an agent the read-only band owns the sticky top edge; the top bar scrolls. */
.hub-band--imp ~ .hub-app .hub-top { position: static; }
.hub-top__menu { display: none; }
.hub-top__logo { display: none; }
.hub-search { flex: 1; max-width: 520px; height: 36px; border: 1px solid var(--hub-line); border-radius: 8px;
  display: flex; align-items: center; gap: 8px; padding: 0 6px 0 12px; color: var(--hub-muted); background: var(--hub-bg); margin: 0; }
.hub-search:focus-within { border-color: var(--hub-blue); box-shadow: 0 0 0 3px var(--hub-blue-soft); background: #FFFFFF; }
.hub-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; font: inherit;
  font-size: 13px; color: var(--hub-ink); outline: none; }
.hub-search input::placeholder { color: var(--hub-muted); }
.hub-search button { all: unset; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--hub-blue);
  padding: 4px 8px; border-radius: 5px; }
.hub-search button:focus-visible { box-shadow: var(--hub-focus); }
.hub-top__spacer { flex: 1; }
.hub-who { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--hub-muted); white-space: nowrap; }
.hub-who b { color: var(--hub-ink); font-weight: 600; }
.hub-av { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--hub-blue-soft); color: var(--hub-blue); font-weight: 700; font-size: 11px; flex: 0 0 auto; }
.hub-av--lg { width: 56px; height: 56px; font-size: 18px; }

/* ---- body + footer ------------------------------------------------------------------- */
.hub-body { padding: 22px 26px 30px; display: grid; gap: 18px; align-content: start; flex: 1; min-width: 0; }
.hub-notices { display: grid; gap: 8px; }
.hub-foot { padding: 16px 26px 22px; border-top: 1px solid var(--hub-line); font-size: 11.5px; color: var(--hub-muted);
  display: flex; flex-wrap: wrap; gap: 4px 10px; }
.hub-foot__mode--test { color: var(--hub-bad); font-weight: 600; }
.hub-foot__mode--live { color: var(--hub-blue); font-weight: 600; }

/* ---- page header --------------------------------------------------------------------- */
.hub-hdr { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.hub-hdr__main { min-width: 0; }
.hub-crumbs { font-size: 12px; color: var(--hub-muted); margin: 0 0 2px; padding: 0; list-style: none;
  display: flex; flex-wrap: wrap; gap: 4px; }
.hub-crumbs li + li::before { content: "/"; margin-right: 4px; color: var(--hub-faint); }
.hub-crumbs a { color: var(--hub-muted); text-decoration: none; }
.hub-crumbs a:hover { color: var(--hub-blue); text-decoration: underline; }
.hub-crumbs [aria-current] { color: var(--hub-ink); font-weight: 600; }
.hub-title { font-family: var(--hub-font-display); font-weight: 600; font-size: 32px; line-height: 1.1;
  letter-spacing: .005em; color: var(--hub-navy); }
.hub-title--upper { text-transform: uppercase; letter-spacing: .06em; font-size: 30px; }
.hub-hdr__row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hub-sub { color: var(--hub-muted); margin-top: 4px; font-size: 13px; }
.hub-hdr__actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---- buttons ------------------------------------------------------------------------- */
.hub-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 13px;
  border-radius: var(--hub-radius-sm); font: inherit; font-size: 12.5px; font-weight: 600; border: 1px solid var(--hub-line-2);
  background: var(--hub-panel); color: var(--hub-ink); cursor: pointer; white-space: nowrap; text-decoration: none; }
.hub-btn:hover { border-color: var(--hub-blue); }
.hub-btn:focus-visible { outline: none; box-shadow: var(--hub-focus); }
.hub-btn--primary, a.hub-btn--primary { background: var(--hub-blue); border-color: var(--hub-blue); color: #FFFFFF; }
.hub-btn--primary:hover { background: var(--hub-blue-ink); border-color: var(--hub-blue-ink); color: #FFFFFF; }
.hub-btn--navy, a.hub-btn--navy { background: var(--hub-navy); border-color: var(--hub-navy); color: #FFFFFF; }
.hub-btn--navy:hover { background: var(--hub-navy-2); border-color: var(--hub-navy-2); }
.hub-btn--danger, a.hub-btn--danger { background: var(--hub-bad); border-color: var(--hub-bad); color: #FFFFFF; }
.hub-btn--danger-outline { color: var(--hub-bad); border-color: #EBC3C9; }
.hub-btn--danger-outline:hover { border-color: var(--hub-bad); }
.hub-btn--ghost { background: transparent; }
.hub-btn--sm { height: 28px; padding: 0 10px; font-size: 12px; }
.hub-btn[disabled], .hub-btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }

/* ---- Action ▾ menu (<details>, no JS needed) ---------------------------------------- */
.hub-menu { position: relative; display: inline-block; }
.hub-menu > summary { list-style: none; }
.hub-menu > summary::-webkit-details-marker { display: none; }
.hub-menu__panel { position: absolute; right: 0; top: calc(100% + 6px); width: 340px; max-width: calc(100vw - 32px);
  background: var(--hub-panel); border: 1px solid var(--hub-line); border-radius: 9px; box-shadow: var(--hub-shadow-pop);
  padding: 6px 0; z-index: 40; }
.hub-menu__list { list-style: none; margin: 0; padding: 0; }
.hub-mi { display: grid; grid-template-columns: 20px 1fr auto; gap: 8px; align-items: center; width: 100%;
  padding: 8px 14px; font-size: 13px; color: var(--hub-ink); text-decoration: none; background: none; border: 0;
  text-align: left; font: inherit; font-size: 13px; cursor: pointer; }
a.hub-mi { color: var(--hub-ink); text-decoration: none; }
.hub-mi:hover { background: var(--hub-bg); }
.hub-mi:focus-visible { outline: 2px solid var(--hub-blue); outline-offset: -2px; border-radius: 0; }
.hub-mi__glyph { display: grid; place-items: center; color: var(--hub-faint); }
.hub-mi__note { font-size: 11.5px; color: var(--hub-muted); font-weight: 500; white-space: nowrap; }
.hub-mi--done, a.hub-mi--done { color: var(--hub-muted); cursor: default; }
.hub-mi--done .hub-mi__glyph { color: var(--hub-ok); }
.hub-mi--next, a.hub-mi--next { background: var(--hub-blue-soft); font-weight: 650; color: var(--hub-ink); }
.hub-mi--next .hub-mi__glyph { color: var(--hub-blue); }
.hub-mi--off, a.hub-mi--off { color: var(--hub-faint); cursor: not-allowed; }
.hub-mi--off:hover, .hub-mi--done:hover { background: transparent; }
.hub-mi--danger, a.hub-mi--danger { color: var(--hub-bad); }
.hub-menu__sep { border: 0; border-top: 1px solid var(--hub-line); margin: 5px 0; }
.hub-mi-confirm > summary { list-style: none; }
.hub-mi-confirm > summary::-webkit-details-marker { display: none; }
.hub-mi-confirm__box { margin: 2px 12px 8px; padding: 10px 12px; border: 1px solid var(--hub-bad-soft); border-radius: 8px;
  background: #FFF9FA; display: grid; gap: 8px; font-size: 12.5px; color: var(--hub-ink); }

/* ---- confirm form (danger posts always ask first) ----------------------------------- */
.hub-confirm { display: inline-block; }
.hub-confirm > summary { list-style: none; }
.hub-confirm > summary::-webkit-details-marker { display: none; }
.hub-confirm__box { margin-top: 8px; padding: 12px 14px; border: 1px solid #EBC3C9; border-radius: 9px; background: #FFF9FA;
  display: grid; gap: 10px; max-width: 420px; }
.hub-confirm__box p { font-size: 13px; }
.hub-confirm__row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- pills ------------------------------------------------------------------------------ */
.hub-pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px;
  font-weight: 600; white-space: nowrap; line-height: 1.55; border: 1px solid transparent; }
.hub-pill--ok { background: var(--hub-ok-soft); color: var(--hub-ok); }
.hub-pill--info { background: var(--hub-info-soft); color: var(--hub-info); }
.hub-pill--accent { background: var(--hub-blue); color: #FFFFFF; }
.hub-pill--dark { background: var(--hub-dark); color: #FFFFFF; }
.hub-pill--mute { background: var(--hub-mute-soft); color: var(--hub-muted); }
.hub-pill--line { border-color: var(--hub-line-2); color: var(--hub-muted); background: var(--hub-panel); }
.hub-pill--bad { background: var(--hub-bad-soft); color: var(--hub-bad); }

/* ---- money ------------------------------------------------------------------------------ */
.hub-money { white-space: nowrap; }
.hub-money--neg { color: var(--hub-ink); }
.hub-money--blank { color: var(--hub-faint); }

/* ---- cards / labels / kv ----------------------------------------------------------------- */
.hub-card { background: var(--hub-panel); border: 1px solid var(--hub-line); border-radius: var(--hub-radius); min-width: 0; }
.hub-card__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 16px;
  border-bottom: 1px solid var(--hub-line); }
.hub-card__foot { padding: 12px 16px; border-top: 1px solid var(--hub-line); font-size: 12px; color: var(--hub-muted); }
.hub-pad { padding: 16px 18px; }
.hub-lbl { font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--hub-navy);
  display: flex; align-items: center; gap: 8px; margin: 0; }
.hub-note { font-size: 12px; color: var(--hub-muted); }
.hub-note--bad { color: var(--hub-bad); font-weight: 600; }
.hub-kv { display: grid; grid-template-columns: minmax(120px, 160px) 1fr; gap: 9px 14px; margin: 0; font-size: 13px; }
.hub-kv dt { color: var(--hub-muted); }
.hub-kv dd { margin: 0; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.hub-kv--right { grid-template-columns: 1fr auto; gap: 6px 12px; }
.hub-kv--right dd { text-align: right; }
.hub-kv__hint { display: block; font-size: 11.5px; color: var(--hub-muted); font-weight: 400; }

/* ---- summary blocks + stat strip ---------------------------------------------------------- */
.hub-cols-1 { --hub-cols: 1; } .hub-cols-2 { --hub-cols: 2; } .hub-cols-3 { --hub-cols: 3; }
.hub-cols-4 { --hub-cols: 4; } .hub-cols-5 { --hub-cols: 5; } .hub-cols-6 { --hub-cols: 6; }
.hub-blocks { display: grid; grid-template-columns: repeat(var(--hub-cols, 3), minmax(0, 1fr)); background: var(--hub-panel);
  border: 1px solid var(--hub-line); border-radius: var(--hub-radius); }
.hub-blocks > section { padding: 14px 16px; border-left: 1px solid var(--hub-line); display: grid; gap: 9px; align-content: start; min-width: 0; }
.hub-blocks > section:first-child { border-left: 0; }
.hub-stats { display: grid; grid-template-columns: repeat(var(--hub-cols, 4), minmax(0, 1fr)); border: 1px solid var(--hub-line);
  border-radius: var(--hub-radius); background: var(--hub-panel); }
.hub-stats > div { padding: 12px 16px; border-left: 1px solid var(--hub-line); min-width: 0; }
.hub-stats > div:first-child { border-left: 0; }
.hub-stats__l { font-size: 11px; color: var(--hub-muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.hub-stats__v { font-size: 19px; font-weight: 650; margin-top: 3px; font-variant-numeric: tabular-nums; }

/* ---- tables ---------------------------------------------------------------------------- */
.hub-table-wrap { overflow-x: auto; }
.hub-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.hub-table caption { text-align: left; }
.hub-table th { font-size: 10.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--hub-muted);
  text-align: left; padding: 9px 12px; white-space: nowrap; border-bottom: 1px solid var(--hub-line); }
.hub-table td { padding: 10px 12px; border-top: 1px solid var(--hub-line); vertical-align: middle; }
.hub-table tbody tr:first-child td { border-top: 0; }
.hub-table .r, .hub-table th.r { text-align: right; }
.hub-table tr.is-attn td:first-child { box-shadow: inset 3px 0 0 var(--hub-badge); }
.hub-table tr.is-sub td { background: var(--hub-bg); border-top: 0; padding-top: 6px; padding-bottom: 10px; }
.hub-table tr.is-total td { border-top: 2px solid var(--hub-ink); font-weight: 700; }
.hub-table tbody tr.is-click:hover td { background: var(--hub-blue-soft); }
.hub-row-link { color: var(--hub-blue); font-weight: 600; text-decoration: none; }
.hub-row-link:hover { text-decoration: underline; }
.hub-expander { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.hub-expander:focus-visible { box-shadow: var(--hub-focus); border-radius: 4px; }
.hub-expander .hub-ico { transition: transform .15s; }
.hub-expander[aria-expanded="false"] .hub-ico { transform: rotate(-90deg); }
.hub-wf { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12px; color: var(--hub-muted); padding-left: 22px;
  margin: 0; list-style: none; }
.hub-wf b { color: var(--hub-ink); font-weight: 600; margin-left: 4px; }
.hub-wf li.is-total b { font-weight: 700; }

/* ---- side menu + tabs ------------------------------------------------------------------------ */
.hub-with-side { display: grid; grid-template-columns: 186px minmax(0, 1fr); gap: 20px; align-items: start; }
.hub-sidemenu { background: var(--hub-panel); border: 1px solid var(--hub-line); border-radius: var(--hub-radius); padding: 8px 0; }
.hub-sidemenu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.hub-sidemenu__head { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--hub-navy);
  padding: 10px 14px 3px; }
.hub-sidemenu a { display: flex; justify-content: space-between; gap: 8px; padding: 7px 14px; font-size: 13px; color: var(--hub-ink-2);
  text-decoration: none; }
.hub-sidemenu a.is-indent { padding-left: 24px; }
.hub-sidemenu a:hover { background: var(--hub-blue-soft); color: var(--hub-ink); }
.hub-sidemenu a.is-active { background: var(--hub-navy); color: #FFFFFF; font-weight: 600; }
.hub-sidemenu a:focus-visible { outline: 2px solid var(--hub-blue); outline-offset: -2px; border-radius: 0; }
.hub-sidemenu__count { font-size: 11px; opacity: .8; font-variant-numeric: tabular-nums; }
.hub-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--hub-line); overflow-x: auto; }
.hub-tab { padding: 10px 14px; font-size: 13px; font-weight: 550; color: var(--hub-muted); border-bottom: 2px solid transparent;
  margin-bottom: -1px; white-space: nowrap; text-decoration: none; }
a.hub-tab { color: var(--hub-muted); text-decoration: none; }
a.hub-tab:hover { color: var(--hub-ink); }
a.hub-tab.is-active { color: var(--hub-ink); border-bottom-color: var(--hub-blue); font-weight: 650; }
.hub-tab:focus-visible { outline: 2px solid var(--hub-blue); outline-offset: -2px; }
.hub-tab__count { font-size: 11px; color: var(--hub-muted); margin-left: 5px; font-variant-numeric: tabular-nums; }

/* ---- filters bar ------------------------------------------------------------------------------- */
.hub-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; }
.hub-filters__spacer { flex: 1; }
.hub-field { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 4px 0 10px; border: 1px solid var(--hub-line-2);
  border-radius: var(--hub-radius-sm); background: var(--hub-panel); font-size: 12.5px; color: var(--hub-muted); }
.hub-field:focus-within { border-color: var(--hub-blue); box-shadow: 0 0 0 3px var(--hub-blue-soft); }
.hub-field select, .hub-field input { border: 0; background: transparent; font: inherit; font-size: 12.5px; color: var(--hub-ink);
  height: 100%; outline: none; min-width: 0; }
.hub-field input[type="search"] { width: 190px; }
.hub-field.is-set { border-color: var(--hub-blue); background: var(--hub-blue-soft); }
.hub-input { height: 34px; border: 1px solid var(--hub-line-2); border-radius: var(--hub-radius-sm); background: var(--hub-panel);
  color: var(--hub-ink); padding: 0 10px; font: inherit; font-size: 13px; width: 100%; }
.hub-input:focus { outline: none; border-color: var(--hub-blue); box-shadow: 0 0 0 3px var(--hub-blue-soft); }

/* ---- pager ----------------------------------------------------------------------------------------- */
.hub-pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px;
  font-size: 12.5px; color: var(--hub-muted); }
.hub-pager__pages { display: flex; gap: 4px; align-items: center; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.hub-pager__pages a, .hub-pager__pages span { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 8px;
  border-radius: 6px; border: 1px solid var(--hub-line); text-decoration: none; color: var(--hub-ink); font-variant-numeric: tabular-nums; }
.hub-pager__pages a:hover { border-color: var(--hub-blue); }
.hub-pager__pages [aria-current="page"] { background: var(--hub-navy); border-color: var(--hub-navy); color: #FFFFFF; font-weight: 600; }
.hub-pager__pages .is-off { color: var(--hub-faint); border-color: transparent; }

/* ---- empty state + notices ------------------------------------------------------------------------- */
.hub-empty { display: grid; justify-items: center; gap: 8px; padding: 34px 20px; text-align: center; }
.hub-empty__icon { color: var(--hub-silver); }
.hub-empty__title { font-family: var(--hub-font-display); font-size: 22px; font-weight: 600; color: var(--hub-navy); }
.hub-empty__body { max-width: 460px; color: var(--hub-muted); }
.hub-notice { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 8px; font-size: 13px;
  font-weight: 500; border: 1px solid transparent; }
.hub-notice .hub-ico { margin-top: 1px; }
.hub-notice--ok { background: var(--hub-ok-soft); color: var(--hub-ok); border-color: #BFDFCB; }
.hub-notice--info { background: var(--hub-info-soft); color: var(--hub-blue-ink); border-color: #C4D9F2; }
.hub-notice--bad { background: var(--hub-bad-soft); color: var(--hub-bad); border-color: #EBC3C9; font-weight: 600; }

/* ---- styleguide helpers ------------------------------------------------------------------------------- */
.hub-grid2 { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.hub-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.hub-stack { display: grid; gap: 12px; align-content: start; min-width: 0; }
.hub-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hub-kit-section { display: grid; gap: 12px; }
.hub-kit-section > h2 { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--hub-muted);
  border-bottom: 1px dashed var(--hub-line-2); padding-bottom: 6px; }
.hub-kit-example { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; color: var(--hub-graphite); }
.hub-kit-nav { padding: 0 0 10px; max-width: 300px; overflow: hidden; }
.hub-kit-code { font-family: var(--hub-font-mono); font-size: 11.5px; color: var(--hub-muted); }

/* ---- responsive: sidebar becomes a drawer under 1024px -------------------------------------------- */
.hub-overlay { display: none; }
@media (max-width: 1023.98px) {
  .hub-app { grid-template-columns: minmax(0, 1fr); }
  .hub-side { position: fixed; z-index: 80; left: 0; top: 0; bottom: 0; height: 100%; width: min(var(--hub-side-w), 86vw);
    overflow-y: auto;
    transform: translateX(-102%); visibility: hidden; box-shadow: none;
    transition: transform .18s ease, visibility 0s linear .18s; }
  .hub-drawer-open .hub-side { transform: none; visibility: visible; box-shadow: 0 0 40px rgba(0, 0, 0, .25);
    transition: transform .18s ease, visibility 0s; }
  .hub-overlay { position: fixed; inset: 0; z-index: 70; background: rgba(5, 10, 18, .45); border: 0; padding: 0; }
  .hub-drawer-open .hub-overlay { display: block; }
  .hub-side__inner { position: static; max-height: none; overflow: visible; }
  .hub-side__close { display: grid; place-items: center; position: absolute; right: 8px; top: 8px; width: 32px; height: 32px;
    border: 0; border-radius: 6px; background: transparent; color: var(--hub-muted); cursor: pointer; }
  .hub-side__close:focus-visible { box-shadow: var(--hub-focus); }
  .hub-top { height: auto; min-height: 72px; padding: 10px 16px; flex-wrap: wrap; row-gap: 10px; }
  .hub-top__menu { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--hub-line);
    border-radius: 8px; background: var(--hub-panel); color: var(--hub-navy); cursor: pointer; }
  .hub-top__menu:focus-visible { box-shadow: var(--hub-focus); outline: none; }
  .hub-top__logo { display: block; padding: 0 4px; }
  .hub-top__logo img { height: 52px; width: auto; display: block; }
  .hub-search { order: 5; flex-basis: 100%; max-width: none; }
  .hub-who__name { display: none; }
  .hub-body { padding: 18px 16px 26px; }
  .hub-foot { padding: 14px 16px 20px; }
  .hub-grid2, .hub-grid3 { grid-template-columns: minmax(0, 1fr); }
  .hub-blocks, .hub-stats { grid-template-columns: minmax(0, 1fr); }
  .hub-blocks > section, .hub-stats > div { border-left: 0; border-top: 1px solid var(--hub-line); }
  .hub-blocks > section:first-child, .hub-stats > div:first-child { border-top: 0; }
  .hub-with-side { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .hub-title { font-size: 26px; }
  .hub-title--upper { font-size: 24px; }
  .hub-kv { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .hub-kv dd { margin-bottom: 8px; }
  .hub-kv--right { grid-template-columns: 1fr auto; gap: 6px 12px; }
  .hub-kv--right dd { margin-bottom: 0; }
  .hub-menu__panel { position: fixed; left: 16px; right: 16px; top: auto; width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .hub-side, .hub-expander .hub-ico { transition: none; }
}
@media print {
  .hub-side, .hub-top, .hub-band--imp, .hub-overlay, .hub-hdr__actions { display: none !important; }
  .hub-app { display: block; }
  body.hub { background: #FFFFFF; }
}
