/* Paygent Business UI, v2
   One stylesheet for every screen: tokens first, then components.
   Values sit on a 4px grid. Weights 400, 500, 600 only. */

:root {
  /* Brand */
  --pg-blue: #1A61FC;
  --pg-blue-hover: #1555E2;
  --pg-blue-press: #1249C8;
  --pg-blue-ink: #1249C8;
  --pg-blue-wash: #EEF3FF;
  --pg-blue-line: #C9D8FE;
  --pg-navy: #0B1840;

  /* Neutral ramp, tinted toward the brand navy */
  --pg-bg: #F4F6FA;
  --pg-surface: #FFFFFF;
  --pg-raised: #F8F9FC;
  --pg-sunken: #EEF1F6;
  --pg-line: #E3E8F0;
  --pg-line-soft: #EEF1F6;
  --pg-line-strong: #CDD5E2;

  /* Three text roles */
  --pg-text: #0B1840;
  --pg-text-2: #33425F;
  --pg-text-3: #5B6576;
  --pg-text-disabled: #97A0B1;

  /* Meaning only */
  --pg-pos: #15803D;
  --pg-pos-wash: #EBF7EF;
  --pg-warn: #B45309;
  --pg-warn-wash: #FEF6E8;
  --pg-warn-line: #F4D7A6;
  --pg-neg: #B42318;
  --pg-neg-wash: #FDEEEC;
  --pg-neg-line: #F2C6C0;

  /* Type */
  --pg-font: Figtree, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --pg-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Radius: controls 8, cards 12, panels 16 */
  --pg-r-xs: 4px;
  --pg-r-sm: 6px;
  --pg-r-md: 8px;
  --pg-r-lg: 12px;
  --pg-r-xl: 16px;

  /* Depth and motion */
  --pg-shadow-sm: 0 1px 2px rgba(11, 24, 64, 0.06);
  --pg-shadow-pop: 0 12px 32px rgba(11, 24, 64, 0.10), 0 1px 2px rgba(11, 24, 64, 0.06);
  --pg-focus: 0 0 0 3px rgba(26, 97, 252, 0.28);
  --pg-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Base ---------- */
.pg-app {
  box-sizing: border-box;
  font-family: var(--pg-font);
  font-size: 14px;
  line-height: 20px;
  color: var(--pg-text);
  background: var(--pg-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.pg-app *, .pg-app *::before, .pg-app *::after { box-sizing: border-box; }
:where(.pg-app) :where(h1, h2, h3, h4, p, ul, ol, dl, dd, figure, fieldset) { margin: 0; }
:where(.pg-app) :where(ul, ol) { padding: 0; list-style: none; }
:where(.pg-app) fieldset { border: 0; padding: 0; min-width: 0; }
:where(.pg-app) :where(button, input, select, textarea) { font: inherit; color: inherit; }
:where(.pg-app) svg { flex: none; }
:where(.pg-app) :focus-visible { outline: none; box-shadow: var(--pg-focus); }
:where(.pg-app) :where(b, strong) { font-weight: 600; color: var(--pg-text); }

/* Icons: one line set, stroke drawn by CSS so markup stays short */
svg.i { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
svg.i .f { fill: currentColor; stroke: none; }

.pg-num { font-variant-numeric: tabular-nums; }
.pg-mono { font-family: var(--pg-mono); font-size: 13px; letter-spacing: 0; }
.pg-muted { color: var(--pg-text-3); }
.pg-soft { color: var(--pg-text-2); }
.pg-pos { color: var(--pg-pos); }
.pg-neg { color: var(--pg-neg); }
.pg-warn { color: var(--pg-warn); }
.pg-ink { color: var(--pg-blue-ink); }
.pg-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pg-tbd { font-family: var(--pg-mono); font-size: 0.92em; color: var(--pg-text-2); border-bottom: 1px dashed var(--pg-line-strong); }

/* ---------- App shell ---------- */
.pg-shell { display: flex; flex-wrap: wrap; align-items: stretch; min-height: 100vh; container: pg-shell / inline-size; }
.pg-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; }
.pg-content {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 32px 56px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Sidebar (the import host is a plain block, so the wrapper sizes it) */
.pg-side-host { flex: 1 1 248px; min-width: 0; max-width: 100%; display: flex; flex-direction: column; }
.pg-side-host > .sc-host { flex: 1; display: flex; flex-direction: column; }
.pg-side-host .pg-sidebar { flex: 1; }
.pg-sidebar {
  width: 100%;
  background: var(--pg-surface);
  border-right: 1px solid var(--pg-line);
  padding: 16px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pg-brand { display: flex; align-items: center; gap: 8px; padding: 0 8px; height: 32px; text-decoration: none; }
.pg-brand img { height: 22px; width: auto; display: block; }
.pg-brand span { font-size: 12px; font-weight: 500; color: var(--pg-text-3); padding-top: 4px; }
.pg-side-top { display: flex; flex-direction: column; gap: 12px; position: relative; }
.pg-side-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pg-iconbtn.pg-menu-btn { display: none; }

.pg-ws {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px; border-radius: var(--pg-r-md);
  border: 1px solid var(--pg-line); background: var(--pg-surface);
  text-align: left; cursor: pointer;
  transition: background-color 150ms var(--pg-ease), border-color 150ms var(--pg-ease);
}
.pg-ws:hover { background: var(--pg-raised); border-color: var(--pg-line-strong); }
.pg-ws-av {
  width: 28px; height: 28px; border-radius: var(--pg-r-sm);
  background: var(--pg-navy); color: #FFFFFF;
  font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.pg-ws-av--alt { background: #0E7A63; }
.pg-ws-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pg-ws-name { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--pg-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-ws-meta { font-size: 12px; line-height: 16px; color: var(--pg-text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-ws svg { color: var(--pg-text-3); }

.pg-nav { display: flex; flex-direction: column; gap: 16px; }
.pg-nav-group { display: flex; flex-direction: column; gap: 2px; }
.pg-nav-label {
  display: flex; align-items: center; justify-content: space-between;
  height: 24px; padding: 0 8px; margin-bottom: 2px;
  font-size: 12px; font-weight: 500; color: var(--pg-text-3);
  border-radius: var(--pg-r-sm); cursor: pointer; list-style: none; user-select: none;
}
.pg-nav-label::-webkit-details-marker { display: none; }
.pg-nav-label:hover { color: var(--pg-text-2); background: var(--pg-raised); }
.pg-nav-label svg { width: 14px; height: 14px; transition: transform 160ms var(--pg-ease); }
details.pg-nav-group:not([open]) > .pg-nav-label svg { transform: rotate(-90deg); }
.pg-nav-items { display: flex; flex-direction: column; gap: 2px; }
.pg-nav-item {
  display: flex; align-items: center; gap: 10px;
  height: 34px; padding: 0 8px; border-radius: var(--pg-r-md);
  color: var(--pg-text-2); font-size: 14px; font-weight: 500; text-decoration: none;
  transition: background-color 150ms var(--pg-ease), color 150ms var(--pg-ease);
}
.pg-nav-item svg { width: 18px; height: 18px; color: var(--pg-text-3); transition: color 150ms var(--pg-ease); }
.pg-nav-item:hover, .pg-nav-item.is-hover { background: var(--pg-sunken); color: var(--pg-text); }
.pg-nav-item[aria-current="page"] { background: var(--pg-blue-wash); color: var(--pg-blue-ink); font-weight: 600; }
.pg-nav-item[aria-current="page"] svg { color: var(--pg-blue); }
.pg-nav-count { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--pg-text-3); font-variant-numeric: tabular-nums; }
.pg-nav-count--due { color: var(--pg-blue-ink); font-weight: 600; }
.pg-nav-ext { margin-left: auto; width: 14px !important; height: 14px !important; }
.pg-side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--pg-line-soft); display: flex; flex-direction: column; gap: 2px; }

/* Admin sidebar: navy, so Paygent staff always know they are in the internal tool */
.pg-sidebar--admin { background: var(--pg-navy); border-right-color: var(--pg-navy); }
.pg-sidebar--admin .pg-nav-label { color: #8E9BBD; }
.pg-sidebar--admin .pg-nav-label:hover { background: transparent; color: #8E9BBD; }
.pg-sidebar--admin .pg-nav-item { color: #C9D3E8; }
.pg-sidebar--admin .pg-nav-item svg { color: #8E9BBD; }
.pg-sidebar--admin .pg-nav-item:hover { background: #18275A; color: #FFFFFF; }
.pg-sidebar--admin .pg-nav-item[aria-current="page"] { background: #1D3175; color: #FFFFFF; }
.pg-sidebar--admin .pg-nav-item[aria-current="page"] svg { color: #8FB4FF; }
.pg-sidebar--admin .pg-nav-count { color: #8E9BBD; }
.pg-sidebar--admin .pg-side-foot { border-top-color: #1D2B57; }
.pg-admin-tag { margin-left: 4px; padding: 2px 6px; border-radius: 4px; background: #F6D58A; color: #6B3D06; font-size: 11px; font-weight: 600; }

/* Popover menu (workspace switcher, account) */
.pg-pop {
  position: absolute; z-index: 20; min-width: 240px;
  background: var(--pg-surface); border: 1px solid var(--pg-line);
  border-radius: var(--pg-r-lg); box-shadow: var(--pg-shadow-pop);
  padding: 6px; display: flex; flex-direction: column; gap: 2px;
  animation: pg-rise 180ms var(--pg-ease);
}
.pg-pop-label { padding: 6px 8px 4px; font-size: 12px; color: var(--pg-text-3); }
.pg-pop-item {
  display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 6px 8px;
  border-radius: var(--pg-r-sm); color: var(--pg-text); text-decoration: none; font-size: 14px;
}
.pg-pop-item:hover { background: var(--pg-sunken); color: var(--pg-text); }
.pg-pop-item svg { width: 16px; height: 16px; color: var(--pg-text-3); }
.pg-pop-sep { height: 1px; background: var(--pg-line-soft); margin: 4px 0; }

/* Top bar */
.pg-topbar {
  height: 56px; display: flex; align-items: center; gap: 12px;
  padding: 0 32px; background: var(--pg-surface); border-bottom: 1px solid var(--pg-line);
  position: relative;
}
.pg-search {
  flex: 0 1 440px; min-width: 0; height: 36px;
  display: flex; align-items: center; gap: 8px; padding: 0 6px 0 10px;
  border: 1px solid var(--pg-line); border-radius: var(--pg-r-md); background: var(--pg-raised);
  color: var(--pg-text-3); text-decoration: none; font-size: 14px;
  transition: border-color 150ms var(--pg-ease), background-color 150ms var(--pg-ease);
}
.pg-search:hover { border-color: var(--pg-line-strong); background: var(--pg-surface); color: var(--pg-text-3); }
.pg-search svg { width: 16px; height: 16px; }
.pg-search span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; position: relative; }
.pg-kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 5px;
  font-family: var(--pg-mono); font-size: 12px; line-height: 1; color: var(--pg-text-3);
  background: var(--pg-surface); border: 1px solid var(--pg-line); border-bottom-width: 2px; border-radius: var(--pg-r-xs);
}
.pg-iconbtn {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--pg-r-md); border: 1px solid transparent; background: transparent;
  color: var(--pg-text-2); cursor: pointer; text-decoration: none;
  transition: background-color 150ms var(--pg-ease), color 150ms var(--pg-ease);
}
.pg-iconbtn:hover { background: var(--pg-sunken); color: var(--pg-text); }
.pg-iconbtn svg { width: 18px; height: 18px; }
.pg-me {
  width: 32px; height: 32px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--pg-sunken); color: var(--pg-text-2); font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
  transition: box-shadow 150ms var(--pg-ease);
}
.pg-me:hover { box-shadow: 0 0 0 3px var(--pg-sunken); }
.pg-testband {
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
  min-height: 32px; padding: 6px 16px; text-align: center;
  background: var(--pg-warn-wash); border-bottom: 1px solid var(--pg-warn-line);
  color: #8A4508; font-size: 13px; line-height: 18px;
}
.pg-testband b { color: #8A4508; }

/* ---------- Page header ---------- */
.pg-page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.pg-page-title { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 360px; }
.pg-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--pg-text-3); margin-bottom: 4px; }
.pg-crumbs a { color: var(--pg-text-3); text-decoration: none; }
.pg-crumbs a:hover { color: var(--pg-text); }
.pg-crumbs svg { width: 14px; height: 14px; color: var(--pg-line-strong); }
.pg-h1 { font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -0.01em; color: var(--pg-text); }
.pg-lede { font-size: 14px; line-height: 20px; color: var(--pg-text-3); max-width: 680px; text-wrap: pretty; }
.pg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* ---------- Type ---------- */
.pg-display { font-size: 56px; line-height: 60px; font-weight: 600; letter-spacing: -0.03em; text-wrap: balance; }
.pg-h2 { font-size: 16px; line-height: 24px; font-weight: 600; color: var(--pg-text); }
.pg-h3 { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--pg-text); }
.pg-body { font-size: 14px; line-height: 22px; color: var(--pg-text-2); text-wrap: pretty; }
.pg-small { font-size: 13px; line-height: 18px; color: var(--pg-text-3); }
.pg-meta { font-size: 12px; line-height: 16px; color: var(--pg-text-3); }
.pg-figure { font-size: 28px; line-height: 36px; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; color: var(--pg-text); }
.pg-figure-xl { font-size: 36px; line-height: 44px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--pg-text); }

/* ---------- Buttons ---------- */
.pg-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: var(--pg-r-md);
  border: 1px solid transparent; background: transparent;
  font-family: var(--pg-font); font-size: 14px; font-weight: 500; line-height: 1;
  text-decoration: none; white-space: nowrap; cursor: pointer; user-select: none;
  transition: background-color 150ms var(--pg-ease), border-color 150ms var(--pg-ease), color 150ms var(--pg-ease), box-shadow 150ms var(--pg-ease), transform 100ms var(--pg-ease);
}
.pg-btn svg { width: 16px; height: 16px; }
.pg-btn:active { transform: scale(0.98); }
.pg-btn:focus-visible, .pg-btn.is-focus { outline: none; box-shadow: var(--pg-focus); }
.pg-btn--primary { background: var(--pg-blue); color: #FFFFFF; }
.pg-btn--primary:hover, .pg-btn--primary.is-hover { background: var(--pg-blue-hover); color: #FFFFFF; }
.pg-btn--primary:active { background: var(--pg-blue-press); }
.pg-btn--secondary { background: var(--pg-surface); border-color: var(--pg-line-strong); color: var(--pg-text); box-shadow: var(--pg-shadow-sm); }
.pg-btn--secondary:hover, .pg-btn--secondary.is-hover { background: var(--pg-raised); border-color: #B9C3D4; color: var(--pg-text); }
.pg-btn--ghost { color: var(--pg-text-2); }
.pg-btn--ghost:hover, .pg-btn--ghost.is-hover { background: var(--pg-sunken); color: var(--pg-text); }
.pg-btn--danger { background: var(--pg-surface); border-color: var(--pg-neg-line); color: var(--pg-neg); }
.pg-btn--danger:hover, .pg-btn--danger.is-hover { background: var(--pg-neg-wash); color: var(--pg-neg); }
.pg-btn--approve { background: var(--pg-pos); color: #FFFFFF; }
.pg-btn--approve:hover { background: #126B33; color: #FFFFFF; }
.pg-btn--sm { height: 32px; padding: 0 10px; font-size: 13px; }
.pg-btn--lg { height: 44px; padding: 0 18px; font-size: 15px; }
.pg-btn--xl { height: 52px; padding: 0 20px; font-size: 16px; border-radius: 10px; }
.pg-btn--block { width: 100%; }
.pg-btn:disabled, .pg-btn[aria-disabled="true"], .pg-btn.is-disabled {
  background: var(--pg-sunken); border-color: var(--pg-line); color: var(--pg-text-disabled);
  box-shadow: none; cursor: not-allowed; transform: none;
}

.pg-link { color: var(--pg-blue-ink); font-weight: 500; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.pg-link:hover { color: var(--pg-blue-press); text-decoration: underline; text-underline-offset: 3px; }
.pg-link svg { width: 14px; height: 14px; }
.pg-link--quiet { color: var(--pg-text-3); font-weight: 500; }
.pg-link--quiet:hover { color: var(--pg-text); }

/* ---------- Segmented control and tabs ---------- */
.pg-seg { display: inline-flex; align-items: center; gap: 2px; padding: 2px; background: var(--pg-sunken); border-radius: var(--pg-r-md); }
.pg-seg > button, .pg-seg > a {
  height: 28px; padding: 0 12px; border: 0; border-radius: var(--pg-r-sm);
  background: transparent; color: var(--pg-text-2); font-size: 13px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none; cursor: pointer;
  transition: background-color 150ms var(--pg-ease), color 150ms var(--pg-ease);
}
.pg-seg > button:hover, .pg-seg > a:hover { color: var(--pg-text); }
.pg-seg > [aria-pressed="true"], .pg-seg > [aria-current="page"] { background: var(--pg-surface); color: var(--pg-text); box-shadow: 0 1px 2px rgba(11, 24, 64, 0.10); }
.pg-seg-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--pg-pos); }
.pg-seg-dot--test { background: #D97706; }

.pg-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--pg-line); overflow-x: auto; }
.pg-tab {
  height: 40px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  color: var(--pg-text-3); font-size: 14px; font-weight: 500; text-decoration: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color 150ms var(--pg-ease), border-color 150ms var(--pg-ease);
}
.pg-tab:hover { color: var(--pg-text); }
.pg-tab[aria-current="page"], .pg-tab[aria-selected="true"] { color: var(--pg-blue-ink); border-bottom-color: var(--pg-blue); }
.pg-tab .pg-nav-count { margin-left: 0; }

/* ---------- Forms ---------- */
.pg-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pg-label { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--pg-text); }
.pg-label .pg-muted { font-weight: 400; }
.pg-hint { font-size: 12px; line-height: 16px; color: var(--pg-text-3); }
.pg-input, .pg-select, .pg-textarea {
  width: 100%; height: 40px; padding: 0 12px;
  border: 1px solid var(--pg-line-strong); border-radius: var(--pg-r-md);
  background: var(--pg-surface); color: var(--pg-text);
  font-family: var(--pg-font); font-size: 14px;
  transition: border-color 150ms var(--pg-ease), box-shadow 150ms var(--pg-ease);
}
.pg-input::placeholder, .pg-textarea::placeholder { color: #8A94A6; }
.pg-input:hover, .pg-select:hover, .pg-textarea:hover { border-color: #B9C3D4; }
.pg-input:focus, .pg-select:focus, .pg-textarea:focus, .pg-input.is-focus { outline: none; border-color: var(--pg-blue); box-shadow: var(--pg-focus); }
.pg-input[aria-invalid="true"] { border-color: #D92D20; }
.pg-input:disabled, .pg-input[readonly] { background: var(--pg-raised); color: var(--pg-text-2); }
.pg-input--mono { font-family: var(--pg-mono); font-size: 13px; }
.pg-input--lg { height: 48px; font-size: 16px; }
.pg-select {
  appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, #5B6576 50%), linear-gradient(135deg, #5B6576 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.pg-textarea { height: auto; min-height: 88px; padding: 10px 12px; line-height: 20px; resize: vertical; }
.pg-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 16px; }
.pg-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pg-affix { position: relative; display: flex; align-items: center; }
.pg-affix > svg { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--pg-text-3); pointer-events: none; }
.pg-affix > .pg-input { padding-left: 36px; }

.pg-check, .pg-radio {
  appearance: none; -webkit-appearance: none; flex: none; margin: 0;
  width: 16px; height: 16px; border: 1px solid var(--pg-line-strong); background: var(--pg-surface);
  display: inline-grid; place-content: center; cursor: pointer;
  transition: background-color 120ms var(--pg-ease), border-color 120ms var(--pg-ease), box-shadow 120ms var(--pg-ease);
}
.pg-check { border-radius: var(--pg-r-xs); }
.pg-radio { border-radius: 50%; }
.pg-check::after { content: ""; width: 8px; height: 4px; border: 2px solid #FFFFFF; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); opacity: 0; }
.pg-check:checked { background: var(--pg-blue); border-color: var(--pg-blue); }
.pg-check:checked::after { opacity: 1; }
.pg-radio:checked { border: 5px solid var(--pg-blue); }
.pg-check:focus-visible, .pg-radio:focus-visible { box-shadow: var(--pg-focus); }

.pg-switch {
  appearance: none; -webkit-appearance: none; flex: none; margin: 0; cursor: pointer;
  width: 32px; height: 20px; border-radius: 10px; background: var(--pg-line-strong); position: relative;
  transition: background-color 150ms var(--pg-ease);
}
.pg-switch::before {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #FFFFFF; box-shadow: 0 1px 2px rgba(11, 24, 64, 0.20);
  transition: transform 150ms var(--pg-ease);
}
.pg-switch:checked { background: var(--pg-blue); }
.pg-switch:checked::before { transform: translateX(12px); }
.pg-switch:focus-visible { box-shadow: var(--pg-focus); }
.pg-switch:disabled { opacity: 0.5; cursor: not-allowed; }
.pg-toggle-row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 0; border-top: 1px solid var(--pg-line-soft); cursor: pointer; }
.pg-toggle-row:first-child { border-top: 0; }
.pg-toggle-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.pg-option {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; cursor: pointer;
  border: 1px solid var(--pg-line); border-radius: var(--pg-r-md); background: var(--pg-surface);
  transition: border-color 150ms var(--pg-ease), background-color 150ms var(--pg-ease);
}
.pg-option:hover { border-color: var(--pg-line-strong); }
.pg-option:has(:checked) { border-color: var(--pg-blue); background: var(--pg-blue-wash); }
.pg-option .pg-radio, .pg-option .pg-check { margin-top: 2px; }

/* ---------- Surfaces ---------- */
.pg-card { background: var(--pg-surface); border: 1px solid var(--pg-line); border-radius: var(--pg-r-lg); min-width: 0; position: relative; }
.pg-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 16px 20px; }
.pg-card-head--rule { border-bottom: 1px solid var(--pg-line-soft); }
.pg-card-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pg-card-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.pg-card-head + .pg-card-body { padding-top: 4px; }
.pg-card-head--rule + .pg-card-body { padding-top: 20px; }
.pg-card-foot { padding: 12px 20px; border-top: 1px solid var(--pg-line-soft); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.pg-card--flush > .pg-table-wrap { border-top: 1px solid var(--pg-line-soft); }

.pg-split { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px; }
.pg-split-main { flex: 999 1 540px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.pg-split-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.pg-card.pg-split-main, .pg-card.pg-split-side { gap: 0; }
.pg-stack { display: flex; flex-direction: column; gap: 24px; }
.pg-stack-sm { display: flex; flex-direction: column; gap: 12px; }
.pg-row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.pg-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 24px; align-items: start; }
.pg-grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; }

/* Stat strip: one card, hairline cells that survive wrapping */
.pg-statbar {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr));
  gap: 1px; background: var(--pg-line); border: 1px solid var(--pg-line);
  border-radius: var(--pg-r-lg); overflow: hidden;
}
.pg-stat { background: var(--pg-surface); padding: 16px 20px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pg-stat-label { font-size: 13px; line-height: 18px; color: var(--pg-text-3); display: flex; align-items: center; gap: 6px; }
.pg-stat-value { font-size: 28px; line-height: 36px; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; color: var(--pg-text); white-space: nowrap; }
.pg-stat-note { font-size: 13px; line-height: 18px; color: var(--pg-text-3); }
.pg-up { color: var(--pg-pos); font-weight: 500; font-variant-numeric: tabular-nums; }
.pg-down { color: var(--pg-neg); font-weight: 500; font-variant-numeric: tabular-nums; }

/* Key and value pairs */
.pg-kv { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 10px 24px; font-size: 14px; line-height: 20px; }
.pg-kv dt { color: var(--pg-text-3); }
.pg-kv dd { color: var(--pg-text); min-width: 0; overflow-wrap: break-word; }
.pg-kv--stack { grid-template-columns: 1fr; gap: 2px; }
.pg-kv--stack dt { font-size: 13px; }
.pg-kv--stack dd { margin-bottom: 10px; }
.pg-kv--stack dd:last-child { margin-bottom: 0; }
.pg-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); gap: 16px 24px; }
.pg-fact { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pg-fact span:first-child { font-size: 13px; color: var(--pg-text-3); }
.pg-fact span:last-child { font-size: 14px; font-weight: 500; color: var(--pg-text); font-variant-numeric: tabular-nums; }

/* ---------- Tables ---------- */
.pg-table-wrap { overflow-x: auto; position: relative; }
.pg-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
.pg-table th {
  height: 40px; padding: 0 12px; text-align: left; white-space: nowrap;
  font-size: 13px; font-weight: 500; color: var(--pg-text-3);
  background: var(--pg-raised); border-bottom: 1px solid var(--pg-line);
}
.pg-table td { height: 52px; padding: 8px 12px; border-bottom: 1px solid var(--pg-line-soft); vertical-align: middle; color: var(--pg-text); white-space: nowrap; }
.pg-table td.wrap { white-space: normal; min-width: 160px; }
.pg-table th:first-child, .pg-table td:first-child { padding-left: 20px; }
.pg-table th:last-child, .pg-table td:last-child { padding-right: 20px; }
.pg-table tbody tr { transition: background-color 120ms var(--pg-ease); }
.pg-table tbody tr:hover { background: var(--pg-raised); }
.pg-table tbody tr:last-child td { border-bottom: 0; }
.pg-table tr[aria-selected="true"] { background: var(--pg-blue-wash); }
.pg-table tr[aria-selected="true"]:hover { background: var(--pg-blue-wash); }
.pg-table .r { text-align: right; }
.pg-table .nw { white-space: nowrap; }
.pg-table .amt { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; white-space: nowrap; }
.pg-table .amt small { font-size: 12px; font-weight: 500; color: var(--pg-text-3); margin-left: 4px; }
.pg-table .sub { display: block; font-size: 12px; line-height: 16px; color: var(--pg-text-3); }
.pg-table a.pg-cell-link { color: var(--pg-blue-ink); text-decoration: none; font-weight: 500; }
.pg-table a.pg-cell-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.pg-table--compact td { height: 44px; }
.pg-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pg-who > span:last-child { display: flex; flex-direction: column; min-width: 0; }

/* Table toolbar and pagination */
.pg-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 20px; }
.pg-toolbar .pg-affix { flex: 1 1 260px; max-width: 420px; }
.pg-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px 0 10px;
  border: 1px solid var(--pg-line); border-radius: var(--pg-r-sm); background: var(--pg-surface);
  font-size: 13px; color: var(--pg-text-2);
}
.pg-chip button { width: 20px; height: 20px; border: 0; background: transparent; border-radius: var(--pg-r-xs); display: inline-flex; align-items: center; justify-content: center; color: var(--pg-text-3); cursor: pointer; }
.pg-chip button:hover { background: var(--pg-sunken); color: var(--pg-text); }
.pg-chip svg { width: 12px; height: 12px; }
.pg-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--pg-line-soft); font-size: 13px; color: var(--pg-text-3); }
.pg-pager-nav { display: flex; align-items: center; gap: 4px; }
.pg-pager-nav button {
  min-width: 32px; height: 32px; padding: 0 8px; border-radius: var(--pg-r-md);
  border: 1px solid var(--pg-line); background: var(--pg-surface); color: var(--pg-text-2);
  font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.pg-pager-nav button:hover { background: var(--pg-raised); }
.pg-pager-nav button[aria-current="page"] { background: var(--pg-blue-wash); border-color: var(--pg-blue-line); color: var(--pg-blue-ink); font-weight: 600; }
.pg-pager-nav button:disabled { color: var(--pg-text-disabled); cursor: not-allowed; background: var(--pg-surface); }
.pg-pager-nav svg { width: 14px; height: 14px; }

/* ---------- Status, tags, marks ---------- */
.pg-status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; white-space: nowrap; color: var(--pg-text-2); }
.pg-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.pg-status--ok { color: var(--pg-pos); }
.pg-status--warn { color: var(--pg-warn); }
.pg-status--bad { color: var(--pg-neg); }
.pg-status--info { color: var(--pg-blue-ink); }
.pg-status--muted { color: var(--pg-text-3); }
.pg-status--live::before { box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.14); }

.pg-tag {
  display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 6px;
  border-radius: var(--pg-r-xs); background: var(--pg-sunken); color: var(--pg-text-2);
  font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap;
}
.pg-tag--blue { background: var(--pg-blue-wash); color: var(--pg-blue-ink); }
.pg-tag--mono { font-family: var(--pg-mono); font-weight: 400; }

/* The agent mark: the two eyes from the Paygent logo. Used only where an AI agent acted. */
.pg-agent { display: inline-flex; align-items: center; gap: 6px; color: var(--pg-blue-ink); font-weight: 500; white-space: nowrap; }
.pg-agent svg { width: 16px; height: 16px; }

.pg-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: var(--pg-sunken); color: var(--pg-text-2);
  font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center;
}
.pg-avatar--sm { width: 24px; height: 24px; font-size: 11px; }
.pg-avatar--sq { border-radius: var(--pg-r-md); }
.pg-flag { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 1px rgba(11, 24, 64, 0.08); }
.pg-thumb {
  width: 40px; height: 40px; border-radius: var(--pg-r-md); flex: none;
  background: var(--pg-sunken); color: var(--pg-text-3);
  display: inline-flex; align-items: center; justify-content: center;
}
.pg-thumb svg { width: 20px; height: 20px; }
.pg-icon-tile {
  width: 32px; height: 32px; border-radius: var(--pg-r-md); flex: none;
  background: var(--pg-sunken); color: var(--pg-text-2);
  display: inline-flex; align-items: center; justify-content: center;
}
.pg-icon-tile svg { width: 16px; height: 16px; }

/* ---------- Paygent notes: the assistant's suggestions ---------- */
.pg-note {
  background: var(--pg-surface); border: 1px solid var(--pg-blue-line); border-radius: var(--pg-r-lg);
  padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0;
}
.pg-note-head { display: flex; align-items: center; gap: 8px; font-size: 13px; line-height: 18px; font-weight: 500; color: var(--pg-blue-ink); }
.pg-note-head img { width: 16px; height: 16px; object-fit: contain; }
.pg-note-title { font-size: 15px; line-height: 22px; font-weight: 600; color: var(--pg-text); }
.pg-note p, .pg-note li { font-size: 14px; line-height: 22px; color: var(--pg-text-2); text-wrap: pretty; }
.pg-note-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pg-note-items { display: flex; flex-direction: column; }
.pg-note-items > * { padding: 12px 0; border-top: 1px solid var(--pg-line-soft); }
.pg-note-items > *:first-child { border-top: 0; padding-top: 0; }

/* ---------- Alerts ---------- */
.pg-alert { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border-radius: var(--pg-r-md); border: 1px solid var(--pg-line); background: var(--pg-raised); font-size: 14px; line-height: 20px; color: var(--pg-text-2); }
.pg-alert svg { width: 18px; height: 18px; margin-top: 1px; flex: none; }
.pg-alert--info { background: var(--pg-blue-wash); border-color: var(--pg-blue-line); }
.pg-alert--info svg { color: var(--pg-blue); }
.pg-alert--warn { background: var(--pg-warn-wash); border-color: var(--pg-warn-line); }
.pg-alert--warn svg { color: #C2620A; }
.pg-alert--bad { background: var(--pg-neg-wash); border-color: var(--pg-neg-line); }
.pg-alert--bad svg { color: #D92D20; }
.pg-alert--ok { background: var(--pg-pos-wash); border-color: #BFE3CB; }
.pg-alert--ok svg { color: var(--pg-pos); }
.pg-alert-body { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }

/* ---------- Lists ---------- */
.pg-list { display: flex; flex-direction: column; }
.pg-li { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 20px; border-top: 1px solid var(--pg-line-soft); }
.pg-li:first-child { border-top: 0; }
.pg-li-main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.pg-li-end { margin-left: auto; display: flex; align-items: center; gap: 12px; text-align: right; }
a.pg-li { color: inherit; text-decoration: none; transition: background-color 120ms var(--pg-ease); }
a.pg-li:hover { background: var(--pg-raised); }
.pg-checklist li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--pg-line-soft); font-size: 14px; line-height: 20px; color: var(--pg-text-2); }
.pg-checklist li:first-child { border-top: 0; }
.pg-checklist svg { width: 16px; height: 16px; margin-top: 2px; color: var(--pg-pos); flex: none; }

/* Bars: one series, one accent */
.pg-bars { display: flex; flex-direction: column; gap: 12px; }
.pg-bar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-size: 14px; }
.pg-bar-row > span:nth-child(2) { font-variant-numeric: tabular-nums; color: var(--pg-text-2); }
.pg-bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--pg-sunken); overflow: hidden; }
.pg-bar > span { display: block; height: 100%; border-radius: 3px; background: #9AA6BA; }
.pg-bar--accent > span { background: var(--pg-blue); }
.pg-stack-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; gap: 2px; }
.pg-stack-bar > span { display: block; height: 100%; }
.pg-progress { height: 6px; border-radius: 3px; background: var(--pg-sunken); overflow: hidden; }
.pg-progress > span { display: block; height: 100%; background: var(--pg-blue); border-radius: 3px; }


/* Daily bars (payouts) */
.pg-daybars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; align-items: end; height: 196px; }
.pg-daybars > div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; min-width: 0; }
.pg-daybars span { font-family: var(--pg-mono); font-size: 12px; color: var(--pg-text-3); }
.pg-daybars i { display: block; width: 100%; max-width: 44px; border-radius: 4px 4px 2px 2px; background: #C9D1DE; }
.pg-daybars b { font-size: 12px; font-weight: 500; color: var(--pg-text-3); }
.pg-daybars .is-on i { background: var(--pg-blue); }
.pg-daybars .is-on span, .pg-daybars .is-on b { color: var(--pg-text); }
.pg-daybars .is-next i { background: transparent; border: 1px dashed var(--pg-line-strong); }

/* Steps (go live, setup, transfer progress) */
.pg-steps { display: flex; flex-direction: column; }
.pg-step { display: flex; gap: 16px; align-items: flex-start; padding: 16px 20px; border-top: 1px solid var(--pg-line-soft); }
.pg-step:first-child { border-top: 0; }
.pg-step-mark {
  width: 24px; height: 24px; border-radius: 50%; flex: none; margin-top: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
  border: 1px solid var(--pg-line-strong); color: var(--pg-text-3); background: var(--pg-surface);
}
.pg-step-mark svg { width: 14px; height: 14px; }
.pg-step--done .pg-step-mark { background: var(--pg-pos); border-color: var(--pg-pos); color: #FFFFFF; }
.pg-step--now .pg-step-mark { border: 2px solid var(--pg-blue); color: var(--pg-blue-ink); }
.pg-step-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pg-step-end { margin-left: auto; flex: none; display: flex; align-items: center; gap: 8px; }

.pg-ref-steps { grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); }
.pg-ref-steps li { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--pg-line); border-radius: var(--pg-r-md); background: var(--pg-raised); }
.pg-ref-steps .pg-step-mark { margin-bottom: 4px; }

/* ---------- Code ---------- */
.pg-code {
  font-family: var(--pg-mono); font-size: 13px; line-height: 20px;
  background: var(--pg-navy); color: #D9E1F2; border-radius: var(--pg-r-md);
  padding: 16px; overflow-x: auto; white-space: pre; margin: 0;
}
.pg-code .k { color: #8FB4FF; }
.pg-code .s { color: #A7DFC3; }
.pg-code .c { color: #8794B4; }
.pg-code .n { color: #F6C38B; }
.pg-code-inline { font-family: var(--pg-mono); font-size: 13px; padding: 1px 6px; border-radius: var(--pg-r-xs); background: var(--pg-sunken); color: var(--pg-text); }
.pg-secret {
  display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 4px 0 12px;
  border: 1px solid var(--pg-line); border-radius: var(--pg-r-md); background: var(--pg-raised);
}
.pg-secret code { flex: 1; min-width: 0; font-family: var(--pg-mono); font-size: 13px; color: var(--pg-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Empty and loading ---------- */
.pg-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 40px 24px; }
.pg-empty .pg-icon-tile { width: 40px; height: 40px; margin-bottom: 4px; }
.pg-empty .pg-icon-tile svg { width: 20px; height: 20px; }
.pg-skel { display: block; height: 12px; border-radius: var(--pg-r-xs); background: var(--pg-sunken); animation: pg-breathe 1.6s var(--pg-ease) infinite alternate; }

/* ---------- Dialog ---------- */
.pg-dialog { background: var(--pg-surface); border: 1px solid var(--pg-line); border-radius: var(--pg-r-xl); box-shadow: var(--pg-shadow-pop); padding: 24px; display: flex; flex-direction: column; gap: 16px; }

/* ---------- Charts ---------- */
.pg-chart { width: 100%; height: auto; display: block; overflow: visible; }
.pg-chart text { font-family: var(--pg-mono); font-size: 11px; fill: #6B7487; }
.pg-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--pg-text-2); }
.pg-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pg-legend i { width: 12px; height: 3px; border-radius: 2px; display: inline-block; }
.pg-tip { position: absolute; z-index: 2; padding: 10px 12px; border-radius: var(--pg-r-md); background: var(--pg-surface); border: 1px solid var(--pg-line); box-shadow: var(--pg-shadow-pop); display: flex; flex-direction: column; gap: 2px; font-size: 13px; line-height: 18px; pointer-events: none; }

/* ---------- Virtual card object ---------- */
.pg-vcard {
  aspect-ratio: 1.586; width: 100%; max-width: 360px; border-radius: 16px; padding: 20px;
  display: flex; flex-direction: column; justify-content: space-between; color: #FFFFFF;
  background: linear-gradient(150deg, #13286B 0%, #0B1840 70%);
  box-shadow: 0 16px 32px -12px rgba(11, 24, 64, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.10);
  position: relative; overflow: hidden;
}
.pg-vcard-chip { width: 36px; height: 28px; border-radius: 6px; background: linear-gradient(135deg, #E9D9A6, #C8B27A); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); }
.pg-vcard-num { font-family: var(--pg-mono); font-size: 17px; letter-spacing: 0.08em; }
.pg-vcard-meta { display: flex; justify-content: space-between; align-items: flex-end; font-size: 12px; letter-spacing: 0.04em; color: #C9D3EE; }

/* ---------- Phone checkout ---------- */
.pg-phone { width: 390px; height: 844px; background: var(--pg-surface); display: flex; flex-direction: column; overflow: hidden; }
.pg-phone-body { flex: 1; display: flex; flex-direction: column; gap: 16px; padding: 16px 20px 24px; min-height: 0; }
.pg-phone-head { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.pg-back {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--pg-line); background: var(--pg-surface);
  display: inline-flex; align-items: center; justify-content: center; color: var(--pg-text); text-decoration: none; flex: none;
}
.pg-back:hover { background: var(--pg-raised); color: var(--pg-text); }
.pg-back svg { width: 18px; height: 18px; }
.pg-method {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 16px;
  border: 1px solid var(--pg-line); border-radius: var(--pg-r-lg); background: var(--pg-surface);
  color: var(--pg-text); text-decoration: none;
  transition: border-color 150ms var(--pg-ease), background-color 150ms var(--pg-ease);
}
.pg-method:hover { border-color: var(--pg-line-strong); background: var(--pg-raised); color: var(--pg-text); }
.pg-method svg { width: 20px; height: 20px; color: var(--pg-text-2); }
.pg-method-name { font-weight: 600; flex: 1; }
.pg-method-meta { font-size: 13px; color: var(--pg-text-3); }
.pg-secure { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--pg-text-3); }
.pg-secure svg { width: 14px; height: 14px; }


/* Bank transfer account card (checkout) */
.pg-acct { background: var(--pg-navy); color: #FFFFFF; border-radius: var(--pg-r-xl); padding: 16px 20px 12px; display: flex; flex-direction: column; }
.pg-acct-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.10); font-size: 13px; color: #B9C4DE; }
.pg-acct-row b { color: #FFFFFF; font-weight: 600; font-size: 15px; text-align: right; }
.pg-acct-copy { margin-top: 14px; background: #FFFFFF; color: var(--pg-navy); }
.pg-acct-copy:hover { background: #E8EEFB; color: var(--pg-navy); }
.pg-acct-foot { margin-top: 10px; text-align: center; font-size: 12px; color: #B9C4DE; }
.pg-step--busy .pg-step-mark { border-color: var(--pg-blue-line); border-top-color: var(--pg-blue); animation: pg-spin 900ms linear infinite; color: transparent; }
@keyframes pg-spin { to { transform: rotate(360deg); } }
.pg-qr {
  width: 112px; height: 112px; flex: none; border-radius: var(--pg-r-md);
  border: 1px dashed var(--pg-line-strong); background: var(--pg-raised);
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  font-family: var(--pg-mono); font-size: 12px; color: var(--pg-text-3);
}
.pg-sheet {
  position: absolute; left: 0; right: 0; bottom: 0; background: var(--pg-surface);
  border-radius: 20px 20px 0 0; box-shadow: 0 -12px 32px rgba(11, 24, 64, 0.12);
  padding: 12px 20px 24px; display: flex; flex-direction: column; gap: 16px;
  animation: pg-rise 320ms var(--pg-ease);
}
.pg-sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: var(--pg-line-strong); align-self: center; margin-bottom: 4px; }
.pg-done-mark { width: 64px; height: 64px; border-radius: 50%; background: var(--pg-pos-wash); color: var(--pg-pos); display: inline-flex; align-items: center; justify-content: center; }
.pg-done-mark svg { width: 32px; height: 32px; stroke-width: 2.25; }

/* ---------- Marketing ---------- */
.pg-site { background: var(--pg-surface); }
.pg-wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.pg-site-head { position: sticky; top: 0; z-index: 5; background: rgba(255, 255, 255, 0.94); border-bottom: 1px solid var(--pg-line); }
.pg-site-nav { height: 64px; display: flex; align-items: center; gap: 32px; }
.pg-site-nav nav { display: flex; gap: 24px; }
.pg-site-nav nav a { color: var(--pg-text-2); font-size: 14px; font-weight: 500; text-decoration: none; }
.pg-site-nav nav a:hover { color: var(--pg-text); }
.pg-section { padding: 96px 0; }
.pg-section--tint { background: var(--pg-bg); }
.pg-eyebrow { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--pg-blue-ink); }
.pg-h-xl { font-size: 40px; line-height: 48px; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; color: var(--pg-text); }
.pg-lead { font-size: 18px; line-height: 28px; color: var(--pg-text-2); text-wrap: pretty; max-width: 600px; }
.pg-hero { padding: 80px 0 72px; }
.pg-hero-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; }
.pg-hero-copy { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.pg-hero-visual { flex: 1 1 420px; min-width: 0; position: relative; padding: 32px 0 112px 32px; }
.pg-hero-visual::before { content: ""; position: absolute; inset: 0 -32px 0 0; background: var(--pg-bg); border-radius: 24px; }
.pg-hero-card { position: relative; box-shadow: var(--pg-shadow-pop); border-radius: var(--pg-r-xl); overflow: hidden; }
.pg-hero-card .pg-li { padding: 10px 20px; }
.pg-hero-note { position: absolute; left: 0; bottom: 16px; width: min(320px, 88%); box-shadow: var(--pg-shadow-pop); }
.pg-band { border-top: 1px solid var(--pg-line); border-bottom: 1px solid var(--pg-line); }
.pg-works { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; min-height: 72px; padding-top: 16px; padding-bottom: 16px; font-size: 15px; font-weight: 500; color: var(--pg-text-2); }
.pg-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 1px; background: var(--pg-line); border: 1px solid var(--pg-line); border-radius: var(--pg-r-xl); overflow: hidden; }
.pg-feature { background: var(--pg-surface); padding: 28px; display: flex; flex-direction: column; gap: 8px; }
.pg-feature > svg { width: 20px; height: 20px; color: var(--pg-blue); margin-bottom: 8px; }
.pg-split-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); gap: 48px; align-items: center; }
.pg-agent-side { padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.pg-agent-side .pg-code { margin-top: 4px; }
.pg-chat-demo { margin-top: 8px; padding: 16px; background: var(--pg-bg); border-radius: var(--pg-r-lg); display: flex; flex-direction: column; gap: 10px; }
.pg-chat-bot { align-self: flex-start; max-width: 85%; padding: 10px 14px; background: var(--pg-surface); border: 1px solid var(--pg-line); border-radius: 12px 12px 12px 4px; font-size: 14px; line-height: 20px; }
.pg-chat-approve { align-self: flex-start; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; background: var(--pg-surface); border: 1px solid var(--pg-blue-line); border-radius: var(--pg-r-lg); min-width: 220px; }
.pg-chat-approve b { font-size: 22px; line-height: 28px; }
.pg-chat-approve .pg-btn { margin-top: 6px; align-self: flex-start; }
.pg-dev-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; }
.pg-dev-facts dt { font-weight: 600; font-size: 15px; }
.pg-dev-facts dd { margin: 2px 0 0; color: var(--pg-text-3); font-size: 14px; }
.pg-price td { height: 56px; font-size: 15px; }
.pg-price tbody tr:hover { background: transparent; }
.pg-faq { display: flex; flex-direction: column; border-top: 1px solid var(--pg-line); }
.pg-faq details { border-bottom: 1px solid var(--pg-line); }
.pg-faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; font-size: 16px; font-weight: 500; }
.pg-faq summary::-webkit-details-marker { display: none; }
.pg-faq summary svg { width: 18px; height: 18px; color: var(--pg-text-3); transition: transform 160ms var(--pg-ease); }
.pg-faq details[open] summary svg { transform: rotate(180deg); }
.pg-faq details p { padding: 0 0 20px; max-width: 620px; }
.pg-cta { background: var(--pg-navy); padding: 72px 0; }
.pg-cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.pg-cta-btn { background: #FFFFFF; color: var(--pg-navy); }
.pg-cta-btn:hover { background: #E8EEFB; color: var(--pg-navy); }
.pg-footer { padding: 56px 0 72px; border-top: 1px solid var(--pg-line); }
.pg-footer-grid { display: grid; grid-template-columns: 2fr repeat(3, minmax(0, 1fr)); gap: 32px; }
.pg-footer-col { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.pg-footer-col b { font-weight: 600; margin-bottom: 4px; }
.pg-footer-col a { color: var(--pg-text-3); text-decoration: none; }
.pg-footer-col a:hover { color: var(--pg-text); }
@media (max-width: 807px) {
  .pg-hero { padding: 40px 0 48px; }
  .pg-hero-visual { padding: 16px 0 72px 16px; }
  .pg-hero-visual::before { inset: 0 -16px 0 0; border-radius: 16px 0 0 16px; }
  .pg-footer-grid { grid-template-columns: 1fr 1fr; }
  .pg-dev-facts { grid-template-columns: 1fr; }
}


/* ---------- Sign-up and set-up ---------- */
.pg-auth { min-height: 100vh; display: flex; justify-content: center; align-items: flex-start; padding: 48px 24px 64px; background: var(--pg-bg); }
.pg-auth-col { width: 100%; max-width: 560px; display: flex; flex-direction: column; gap: 24px; }
.pg-auth-card { padding: 32px; display: flex; flex-direction: column; gap: 20px; box-shadow: var(--pg-shadow-sm); }
.pg-choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 8px; }

/* ---------- Docs ---------- */
.pg-docs-head { height: 64px; display: flex; align-items: center; gap: 32px; padding: 0 32px; }
.pg-docs-tabs { display: flex; gap: 24px; }
.pg-docs-tabs a { color: var(--pg-text-3); font-size: 14px; font-weight: 500; text-decoration: none; height: 64px; display: inline-flex; align-items: center; border-bottom: 2px solid transparent; }
.pg-docs-tabs a:hover { color: var(--pg-text); }
.pg-docs-tabs a[aria-current="page"] { color: var(--pg-text); border-bottom-color: var(--pg-blue); }
.pg-docs { display: grid; grid-template-columns: 240px minmax(0, 1fr) 200px; gap: 48px; padding: 32px 32px 64px; max-width: 1280px; margin: 0 auto; }
.pg-docs-nav { display: flex; flex-direction: column; gap: 2px; }
.pg-docs-nav .pg-nav-label { margin-top: 16px; }
.pg-docs-nav .pg-nav-label:first-child { margin-top: 0; }
.pg-docs-nav .pg-nav-item { height: 32px; font-weight: 400; }
.pg-docs-body { display: flex; flex-direction: column; gap: 16px; min-width: 0; max-width: 720px; }
.pg-docs-toc { display: flex; flex-direction: column; gap: 10px; font-size: 13px; position: relative; }
.pg-docs-toc a { color: var(--pg-text-3); text-decoration: none; }
.pg-docs-toc a:hover { color: var(--pg-text); }
.pg-docs-next { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 12px; margin-top: 16px; }
@media (max-width: 1080px) { .pg-docs { grid-template-columns: 220px minmax(0, 1fr); } .pg-docs-toc { display: none; } }
@media (max-width: 807px) { .pg-docs { grid-template-columns: 1fr; padding: 16px; } .pg-docs-nav { display: none; } .pg-docs-tabs { display: none; } .pg-docs-head { padding: 0 16px; gap: 12px; } .pg-auth-card { padding: 20px; } }

/* ---------- Ask Paygent conversation ---------- */
.pg-chat { gap: 24px; }
.pg-msg-user {
  align-self: flex-end; max-width: 80%; padding: 10px 14px;
  background: var(--pg-sunken); color: var(--pg-text); border-radius: 12px 12px 4px 12px;
  font-size: 14px; line-height: 20px;
}
.pg-msg-bot { display: flex; gap: 12px; align-items: flex-start; }
.pg-msg-av { width: 24px; height: 28px; object-fit: contain; flex: none; margin-top: 2px; }
.pg-msg-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.pg-msg-facts { padding: 12px 16px; border: 1px solid var(--pg-line); border-radius: var(--pg-r-md); background: var(--pg-raised); }
.pg-msg-slip { padding: 12px 16px; border: 1px solid var(--pg-line); border-radius: var(--pg-r-md); }
.pg-composer { display: flex; gap: 8px; padding: 16px 20px; border-top: 1px solid var(--pg-line-soft); background: var(--pg-raised); border-radius: 0 0 var(--pg-r-lg) var(--pg-r-lg); }
.pg-suggest {
  display: flex; align-items: center; width: 100%; min-height: 40px; padding: 8px 12px; text-align: left;
  border: 1px solid var(--pg-line); border-radius: var(--pg-r-md); background: var(--pg-surface);
  color: var(--pg-text-2); font-size: 14px; cursor: pointer;
  transition: border-color 150ms var(--pg-ease), background-color 150ms var(--pg-ease), color 150ms var(--pg-ease);
}
.pg-suggest:hover { border-color: var(--pg-blue-line); background: var(--pg-blue-wash); color: var(--pg-blue-ink); }

/* ---------- Money input (conversions, transfers) ---------- */
.pg-convert { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; }
.pg-convert-arrow { width: 32px; height: 32px; border-radius: 50%; background: var(--pg-sunken); color: var(--pg-text-3); display: inline-flex; align-items: center; justify-content: center; }
.pg-convert-arrow svg { width: 16px; height: 16px; }
.pg-money { display: flex; }
.pg-money .pg-money-cur { width: 96px; flex: none; border-radius: var(--pg-r-md) 0 0 var(--pg-r-md); border-right: 0; background-color: var(--pg-raised); font-weight: 500; }
.pg-money .pg-input { border-radius: 0 var(--pg-r-md) var(--pg-r-md) 0; text-align: right; font-size: 16px; font-weight: 500; height: 48px; }
.pg-money .pg-money-cur { height: 48px; }
@media (max-width: 640px) {
  .pg-convert { grid-template-columns: 1fr; }
  .pg-convert-arrow { transform: rotate(90deg); justify-self: center; }
}


.pg-fee-table .pg-input { height: 32px; width: 80px; padding: 0 8px; font-size: 13px; font-variant-numeric: tabular-nums; }
.pg-fee-table td { height: 48px; }

/* ---------- Agents ---------- */
.pg-table td.pg-tool-group { height: 32px; padding-top: 0; padding-bottom: 0; background: var(--pg-raised); font-size: 12px; font-weight: 500; color: var(--pg-text-3); }
.pg-table tbody tr:has(.pg-tool-group):hover { background: transparent; }
.pg-chip--on { background: var(--pg-blue-wash); border-color: var(--pg-blue-line); color: var(--pg-blue-ink); font-weight: 500; }
.pg-chip--on svg { width: 14px; height: 14px; }
.pg-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; }
.pg-method-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px; text-align: left;
  border: 1px solid var(--pg-line); border-radius: var(--pg-r-lg); background: var(--pg-surface); cursor: pointer;
  transition: border-color 150ms var(--pg-ease), background-color 150ms var(--pg-ease), box-shadow 150ms var(--pg-ease);
}
.pg-method-card:hover { border-color: var(--pg-line-strong); }
.pg-method-card[aria-checked="true"] { border-color: var(--pg-blue); background: var(--pg-blue-wash); box-shadow: inset 0 0 0 1px var(--pg-blue); }
.pg-method-top { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-bottom: 4px; }
.pg-method-dot { width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--pg-line-strong); background: var(--pg-surface); }
.pg-method-card[aria-checked="true"] .pg-method-dot { border: 5px solid var(--pg-blue); }
.pg-method-card[aria-checked="true"] .pg-icon-tile { background: var(--pg-surface); color: var(--pg-blue); }
.pg-pin { display: grid; grid-template-columns: repeat(4, 48px); gap: 12px; justify-content: center; padding: 8px 0; }
.pg-pin i { height: 56px; border: 1px solid var(--pg-line-strong); border-radius: var(--pg-r-md); display: flex; align-items: center; justify-content: center; }
.pg-pin i.is-on::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--pg-text); }
.pg-pin i:not(.is-on):first-of-type, .pg-pin i.is-on + i:not(.is-on) { border: 2px solid var(--pg-blue); box-shadow: var(--pg-focus); }


/* ---------- Foundations sheet ---------- */
.pg-fd { padding: 48px 48px 64px; display: flex; flex-direction: column; gap: 48px; max-width: 1280px; margin: 0 auto; }
.pg-fd-sec { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pg-fd-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.pg-fd-sw { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--pg-text-3); }
.pg-fd-sw i { height: 56px; border-radius: var(--pg-r-md); margin-bottom: 8px; }
.pg-fd-sw b { font-size: 14px; color: var(--pg-text); }
.pg-fd-sw span:first-of-type { font-family: var(--pg-mono); }
.pg-fd-type { display: flex; flex-direction: column; }
.pg-fd-type > div { display: flex; flex-direction: column; gap: 4px; padding: 14px 20px; border-top: 1px solid var(--pg-line-soft); }
.pg-fd-type > div:first-child { border-top: 0; }
.pg-fd-space { display: flex; flex-direction: column; gap: 6px; font-family: var(--pg-mono); font-size: 12px; color: var(--pg-text-3); }
.pg-fd-space div { display: flex; align-items: center; gap: 12px; }
.pg-fd-space i { display: block; height: 12px; background: var(--pg-blue); border-radius: 2px; opacity: 0.85; }
.pg-fd-radius { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; color: var(--pg-text-3); }
.pg-fd-radius div { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.pg-fd-radius i { width: 64px; height: 44px; border: 1px solid var(--pg-line-strong); background: var(--pg-raised); }
.pg-fd-matrix { display: grid; grid-template-columns: 100px repeat(4, minmax(0, 1fr)); gap: 12px 16px; align-items: center; overflow-x: auto; }

/* ---------- Motion ---------- */
@keyframes pg-rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pg-breathe { from { opacity: 1; } to { opacity: 0.55; } }
.pg-enter { animation: pg-rise 320ms var(--pg-ease) both; }
@media (prefers-reduced-motion: reduce) {
  .pg-app *, .pg-app *::before, .pg-app *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}

/* ---------- Responsive ---------- */
/* The sidebar collapses by the width of its shell, not the window, so the
   sidebar component still shows its desktop form when previewed on its own. */
@container pg-shell (max-width: 807px) {
  .pg-sidebar { border-right: 0; border-bottom: 1px solid var(--pg-line); padding: 12px 16px; gap: 12px; }
  .pg-iconbtn.pg-menu-btn { display: inline-flex; }
  .pg-sidebar[data-open="false"] .pg-nav, .pg-sidebar[data-open="false"] .pg-side-foot, .pg-sidebar[data-open="false"] .pg-ws { display: none; }
}
@media (max-width: 1080px) {
  .pg-content { padding: 20px 24px 48px; }
  .pg-topbar { padding: 0 24px; }
}
@media (max-width: 807px) {
  .pg-content { padding: 16px 16px 40px; gap: 20px; }
  .pg-topbar { padding: 0 16px; gap: 8px; }
  .pg-search span, .pg-search .pg-kbd { display: none; }
  .pg-search { flex: 0 0 36px; width: 36px; padding: 0; justify-content: center; }
  .pg-h1 { font-size: 22px; line-height: 28px; }
  .pg-card-head, .pg-card-body { padding-left: 16px; padding-right: 16px; }
  .pg-table th:first-child, .pg-table td:first-child { padding-left: 16px; }
  .pg-table th:last-child, .pg-table td:last-child { padding-right: 16px; }
  .pg-stat-value { font-size: 24px; line-height: 32px; }
  .pg-display { font-size: 40px; line-height: 44px; }
  .pg-h-xl { font-size: 30px; line-height: 36px; }
  .pg-section { padding: 64px 0; }
  .pg-wrap { padding: 0 16px; }
  .pg-site-nav nav { display: none; }
  .pg-site-nav { gap: 12px; }
  .pg-hide-sm { display: none !important; }
}

/* ---------- Utilities: last, so they win over component colours ---------- */
.pg-pos { color: var(--pg-pos); }
.pg-neg { color: var(--pg-neg); }
.pg-warn { color: var(--pg-warn); }
.pg-ink { color: var(--pg-blue-ink); }
.pg-muted { color: var(--pg-text-3); }
.pg-soft { color: var(--pg-text-2); }
