/* ============================================================================
   The Location Portal (MIX-2314, Claude Design "Location Portal Redesign",
   variant 3a and its Wallet / Activity / Settings re-cuts).

   Loaded by portal/_head.html only, after app.css. Every class is prefixed
   `pt-` so nothing here can reach an operator page.

   Why a stylesheet and not Tailwind utilities: the design leans on exact
   sizes (18px card radius, 56px hero figure, a 380px roster column) and
   app.css compiles no arbitrary values (`tw-w-[380px]` renders as nothing)
   and only a subset of breakpoint variants. A missing utility is a silent
   no-op, so the portal's own look lives here, where it cannot be purged.

   Colours are literal hex, not the design system's var(--surface-*) tokens:
   those are not defined in any stylesheet the app serves. The three brand
   values below are the exception, set per request by portal/_head.html from
   `app/web/utils/brand_colors.py::derive_portal_palette`.

   Text colours are one step darker than the mockup where the mockup's would
   fail WCAG AA at the size used: muted text is surface-700 (#6B6560, 5.6:1 on
   white) rather than surface-600 (#8A8590, 3.6:1), and the gold button is
   accent-700 (4.8:1 with white) rather than accent-600 (3.5:1).
   ========================================================================== */

:root {
  --vv-brand: #0E1F3C;
  --vv-brand-soft: #E7E9EC;
  --vv-brand-kicker: #F5B843;

  --pt-cream: #F5F1E8;
  --pt-card-alt: #FAF7F0;
  --pt-divider: rgba(20, 25, 40, 0.08);
  --pt-shadow: 0 4px 12px -4px rgba(20, 25, 40, 0.06);
  --pt-ink: #352F30;
  --pt-body: #4A4540;
  --pt-muted: #6B6560;
  --pt-line: #E5E0DA;
  --pt-field: #C9C2B8;
  --pt-hover: #F6F3EF;
  --pt-primary: #1F7A71;
  --pt-primary-hover: #196058;
  --pt-primary-link: #258178;
  --pt-primary-wash: #E0F2EF;
  --pt-accent: #9A6726;
  --pt-accent-hover: #7D521E;
  --pt-dark: #2C3038;
  --pt-dark-hover: #0A1729;
  --pt-ok: #1E7A55;
  --pt-ok-bg: #E1F1E8;
  --pt-warn: #8A5F10;
  --pt-warn-bg: #FBF1D8;
  --pt-danger: #B3261E;
  --pt-danger-bg: #FBE5E7;
  --pt-radius-card: 18px;
  --pt-radius-tile: 16px;
  --pt-radius-control: 12px;
}

/* ── Page ─────────────────────────────────────────────────────────────── */

.pt-body {
  margin: 0;
  min-height: 100vh;
  background: var(--pt-cream);
  color: var(--pt-ink);
  -webkit-font-smoothing: antialiased;
}

.pt-wrap {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

@media (min-width: 768px) {
  .pt-wrap { padding-left: 40px; padding-right: 40px; }
}

.pt-main { padding-top: 28px; padding-bottom: 48px; }

.pt-body a { color: var(--pt-primary-link); }
.pt-body a:hover { color: var(--pt-primary); }

.pt-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ── The brand hero ───────────────────────────────────────────────────── */

.pt-hero {
  position: relative;
  overflow: hidden;
  background: var(--vv-brand);
  color: #fff;
  padding-top: 16px;
  padding-bottom: 32px;
}

/* The two faint circles, drawn by the hero itself so no markup carries them. */
.pt-hero::before,
.pt-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: #fff;
  pointer-events: none;
}
.pt-hero::before { right: -40px; top: -60px; width: 320px; height: 320px; opacity: 0.08; }
.pt-hero::after { right: 120px; top: 120px; width: 200px; height: 200px; opacity: 0.06; }
.pt-hero-shallow::after { display: none; }

@media (min-width: 768px) {
  .pt-hero { padding-top: 20px; padding-bottom: 40px; }
}

.pt-hero > .pt-wrap { position: relative; z-index: 1; }

.pt-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

.pt-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: #fff !important;
  text-decoration: none;
}

.pt-logo-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  height: 44px;
  min-width: 44px;
  box-sizing: border-box;
  padding: 6px;
  border-radius: 12px;
  background: #fff;
}
.pt-logo-chip img { display: block; height: 32px; width: auto; max-width: 140px; object-fit: contain; }
.pt-logo-chip-vv img { width: 32px; border-radius: 6px; }

.pt-identity-text { display: flex; flex-direction: column; min-width: 0; }
.pt-identity-name {
  font-size: 16px; font-weight: 700; letter-spacing: -0.2px; line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pt-identity-sub {
  font-size: 12px; opacity: 0.8; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pt-wordmark { font-size: 20px; letter-spacing: -0.5px; white-space: nowrap; }

/* Pill tabs in a see-through capsule. The active one is white with brand text. */
.pt-nav {
  order: 3;
  width: 100%;
}
.pt-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}
.pt-nav li { list-style: none; flex: 1 0 auto; }

/* On a phone the four tabs stay one row and scroll sideways rather than
   wrapping into a second row of pills (the Spanish labels are longer). */
@media (max-width: 899px) {
  .pt-nav ul { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .pt-nav ul::-webkit-scrollbar { display: none; }
  .pt-nav-link { padding: 0 12px; font-size: 13px; }
}
.pt-nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  color: #fff !important;
  text-decoration: none;
  transition: background-color 150ms ease;
}
.pt-nav-link:hover { background: rgba(255, 255, 255, 0.12); }
.pt-nav-link.vv-nav-active {
  background: #fff;
  color: var(--vv-brand) !important;
  font-weight: 600;
}

@media (min-width: 900px) {
  .pt-nav { order: 0; width: auto; margin-left: auto; }
  .pt-nav li { flex: 0 0 auto; }
}

.pt-account { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.pt-account form { margin: 0; }
@media (min-width: 900px) {
  .pt-nav + .pt-account { margin-left: 8px; }
}

/* Profile, Sign out, All locations: real 44px buttons on the hero. */
.pt-hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.32);
  background: transparent;
  color: #fff !important;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.pt-hero-btn:hover { background: rgba(255, 255, 255, 0.12); }

/* The figures under the bar: one hero number, then the supporting ones. */
.pt-figures {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 20px 48px;
  margin-top: 32px;
}
@media (min-width: 768px) { .pt-figures { margin-top: 44px; } }

.pt-figures-action { margin-left: auto; }

.pt-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--vv-brand-kicker);
}
.pt-kicker-plain { color: #fff; opacity: 0.8; }
.pt-figure-lg {
  margin-top: 8px;
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
@media (min-width: 768px) { .pt-figure-lg { font-size: 56px; letter-spacing: -2.5px; } }
.pt-figure {
  margin-top: 6px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.4px;
  font-variant-numeric: tabular-nums;
}
.pt-figure-sub { margin-top: 2px; font-size: 12px; opacity: 0.8; }

.pt-hero-title {
  margin: 32px 0 0;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -1.2px;
  line-height: 1.05;
}
@media (min-width: 768px) { .pt-hero-title { font-size: 40px; letter-spacing: -1.5px; } }
.pt-hero-lede { margin: 8px 0 0; font-size: 13px; opacity: 0.85; }

/* ── Cards, tiles, type ───────────────────────────────────────────────── */

.pt-card {
  background: #fff;
  border: 1px solid var(--pt-divider);
  border-radius: var(--pt-radius-card);
  box-shadow: var(--pt-shadow);
}
.pt-card-pad { padding: 18px; }
@media (min-width: 640px) { .pt-card-pad { padding: 24px 26px; } }
.pt-card-clip { overflow: hidden; }

.pt-card-title { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -0.3px; color: var(--pt-ink); }
.pt-section-title { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -0.2px; color: var(--pt-ink); }
.pt-page-title { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -0.8px; color: var(--pt-ink); }
@media (min-width: 768px) { .pt-page-title { font-size: 28px; } }
.pt-lede { margin: 4px 0 0; font-size: 13px; line-height: 1.5; color: var(--pt-muted); }
.pt-muted { color: var(--pt-muted); }
.pt-small { font-size: 12px; }
.pt-num { font-variant-numeric: tabular-nums; }
.pt-strong { font-weight: 700; color: var(--pt-ink); }
.pt-divider-top { border-top: 1px solid var(--pt-divider); }

.pt-tile {
  background: var(--pt-card-alt);
  border-radius: var(--pt-radius-tile);
  padding: 16px 18px;
  min-width: 0;
}
.pt-tile-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.6px;
  text-transform: uppercase; color: var(--pt-muted);
}
.pt-tile-value {
  margin-top: 10px; font-size: 32px; font-weight: 700; letter-spacing: -1.5px;
  line-height: 1; font-variant-numeric: tabular-nums; color: var(--pt-ink);
}
.pt-tile-value-sm { margin-top: 12px; font-size: 20px; letter-spacing: -0.6px; line-height: 1.15; }
.pt-tile-note { margin-top: 8px; font-size: 12px; color: var(--pt-muted); }

.pt-tile-brand {
  position: relative;
  overflow: hidden;
  background: var(--vv-brand);
  color: #fff;
}
.pt-tile-brand::after {
  content: ""; position: absolute; right: -30px; top: -40px; width: 120px; height: 120px;
  border-radius: 50%; background: #fff; opacity: 0.1; pointer-events: none;
}
.pt-tile-brand .pt-tile-label { color: var(--vv-brand-kicker); }
.pt-tile-brand .pt-tile-value { color: #fff; }
.pt-tile-brand .pt-tile-note { color: #fff; opacity: 0.8; }

.pt-grid { display: grid; gap: 12px; }
.pt-grid-gap { gap: 16px; }
@media (min-width: 640px) {
  .pt-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pt-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pt-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .pt-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* A short field beside a long one (an amount beside a sentence-long select). */
@media (min-width: 640px) {
  .pt-grid-2-wide { grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr); }
}

.pt-stack > * + * { margin-top: 16px; }
.pt-stack-sm > * + * { margin-top: 12px; }

/* ── Buttons ──────────────────────────────────────────────────────────── */

.pt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--pt-radius-control);
  border: 1.5px solid transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none !important;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}
.pt-btn:focus-visible,
.pt-chip:focus-visible,
.pt-nav-link:focus-visible,
.pt-hero-btn:focus-visible,
.pt-hero-pill:focus-visible,
.pt-section-link:focus-visible,
.pt-person:focus-visible {
  outline: 3px solid var(--vv-brand-kicker);
  outline-offset: 2px;
}
.pt-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.pt-btn-lg { min-height: 48px; padding: 0 22px; font-size: 15px; border-radius: 14px; }
.pt-btn-block { width: 100%; }

.pt-btn-primary { background: var(--pt-primary); color: #fff !important; }
.pt-btn-primary:hover { background: var(--pt-primary-hover); }
.pt-btn-accent { background: var(--pt-accent); color: #fff !important; }
.pt-btn-accent:hover { background: var(--pt-accent-hover); }
.pt-btn-dark { background: var(--pt-dark); color: #fff !important; }
.pt-btn-dark:hover { background: var(--pt-dark-hover); }
.pt-btn-outline { background: transparent; color: var(--pt-primary) !important; border-color: var(--pt-primary-link); }
.pt-btn-outline:hover { background: var(--pt-primary-wash); }
.pt-btn-ghost { background: transparent; color: var(--pt-body) !important; }
.pt-btn-ghost:hover { background: var(--pt-primary-wash); color: var(--pt-primary) !important; }
.pt-btn-danger { background: transparent; color: var(--pt-danger) !important; }
.pt-btn-danger:hover { background: var(--pt-danger-bg); }
/* On the hero: white fill, brand text. */
.pt-btn-onbrand { background: #fff; color: var(--vv-brand) !important; }
.pt-btn-onbrand:hover { background: var(--vv-brand-soft); }

/* Pills: filters, quick amounts. 44px tall to stay a real target. */
.pt-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1.5px solid var(--pt-line);
  background: #fff;
  color: var(--pt-body) !important;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
  cursor: pointer;
}
.pt-chip:hover { border-color: var(--pt-field); }
.pt-chip.is-on { background: var(--pt-dark); border-color: var(--pt-dark); color: #fff !important; }
.pt-chip-count { font-variant-numeric: tabular-nums; opacity: 0.8; }

.pt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pt-chips form { margin: 0; }

/* Period pills inside the hero. */
.pt-hero-pills {
  display: flex; flex-wrap: wrap; gap: 4px; padding: 4px;
  border-radius: 999px; background: rgba(255, 255, 255, 0.14);
}
.pt-hero-pill {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px;
  border-radius: 999px; font-size: 13px; font-weight: 600;
  color: #fff !important; text-decoration: none !important; cursor: pointer;
  list-style: none;
}
.pt-hero-pill::-webkit-details-marker { display: none; }
.pt-hero-pill:hover { background: rgba(255, 255, 255, 0.12); }
.pt-hero-pill.is-on { background: #fff; color: var(--vv-brand) !important; }

/* ── Forms ────────────────────────────────────────────────────────────── */

.pt-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--pt-body);
}
.pt-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  padding: 10px 12px;
  border: 1.5px solid var(--pt-field);
  border-radius: var(--pt-radius-control);
  background: #FEFDFB;
  color: var(--pt-ink);
  font: inherit;
  font-size: 14px;
}
.pt-input::placeholder { color: var(--pt-muted); opacity: 1; }
.pt-input:focus {
  outline: none;
  border-color: #2D9A8F;
  box-shadow: 0 0 0 3px rgba(45, 154, 143, 0.18);
}
.pt-hint { margin: 6px 0 0; font-size: 12px; color: var(--pt-muted); }
.pt-field-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.pt-field-row > .pt-grow { flex: 1 1 140px; min-width: 0; }

/* A switch: a real checkbox, restyled. Its name and value post as before. */
.pt-switch {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 26px;
  margin: 0;
  border-radius: 999px;
  background: var(--pt-field);
  cursor: pointer;
  transition: background-color 150ms ease;
}
.pt-switch::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 150ms ease;
}
/* app.css (Flowbite's forms base) paints a checked checkbox with
   `background-color: currentColor !important`, so the switch's colour has to
   arrive through `color`, not `background`. */
.pt-switch { color: var(--pt-field); }
.pt-switch:checked { color: var(--vv-brand); background: var(--vv-brand); }
.pt-switch:checked::before { transform: translateX(18px); }
.pt-switch:focus-visible { outline: 3px solid var(--vv-brand-kicker); outline-offset: 2px; }

.pt-toggle-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  min-height: 44px;
  cursor: pointer;
}

/* Radio cards: the input stays in the DOM (and focusable), visually hidden. */
.pt-choice { position: relative; display: block; cursor: pointer; }
.pt-choice-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pt-choice-body {
  display: block;
  height: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  border: 1.5px solid var(--pt-line);
  border-radius: var(--pt-radius-tile);
  background: #fff;
}
.pt-choice-title { display: block; font-size: 14px; font-weight: 700; color: var(--pt-ink); }
.pt-choice-note { display: block; margin-top: 3px; font-size: 12px; color: var(--pt-muted); }
.pt-choice-input:checked + .pt-choice-body {
  border-color: var(--vv-brand);
  background: var(--vv-brand-soft);
}
.pt-choice-input:checked + .pt-choice-body .pt-choice-title { color: var(--vv-brand); }
.pt-choice-input:focus-visible + .pt-choice-body { outline: 3px solid var(--vv-brand-kicker); outline-offset: 2px; }

/* ── Status ───────────────────────────────────────────────────────────── */

.pt-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}
.pt-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pt-badge-ok { background: var(--pt-ok-bg); color: var(--pt-ok); border-color: rgba(42, 157, 111, 0.25); }
.pt-badge-warn { background: var(--pt-warn-bg); color: var(--pt-warn); border-color: rgba(232, 168, 44, 0.3); }
.pt-badge-muted { background: #EDE8E1; color: var(--pt-body); border-color: var(--pt-line); }

.pt-status-ok { color: var(--pt-ok); }
.pt-status-warn { color: var(--pt-warn); }
.pt-status-muted { color: var(--pt-muted); }
.pt-low { color: var(--pt-danger) !important; }
.pt-money-in { color: var(--pt-ok) !important; }

/* ── Flash ────────────────────────────────────────────────────────────── */

.pt-flash {
  margin-bottom: 16px;
  padding: 14px 18px;
  border-radius: var(--pt-radius-tile);
  border: 1px solid var(--pt-line);
  background: #fff;
  font-size: 14px;
  color: var(--pt-body);
}
.pt-flash-success { background: var(--pt-ok-bg); border-color: rgba(42, 157, 111, 0.25); color: #17593F; }
.pt-flash-warning { background: var(--pt-warn-bg); border-color: rgba(232, 168, 44, 0.35); color: #6E4C0D; }
.pt-flash-error { background: var(--pt-danger-bg); border-color: rgba(217, 64, 74, 0.3); color: #8C1D16; }

/* ── Employees: roster + the person in focus ──────────────────────────── */

.pt-split { display: grid; gap: 24px; align-items: start; }
@media (min-width: 1024px) {
  .pt-split { grid-template-columns: 380px minmax(0, 1fr); }
}

.pt-roster-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pt-search { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.pt-search form { display: flex; flex: 1 1 200px; gap: 8px; margin: 0; }
.pt-search .pt-input { flex: 1 1 auto; }

.pt-person {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 12px 16px;
  border-top: 1px solid var(--pt-divider);
  color: inherit !important;
  text-decoration: none !important;
}
.pt-person:first-child { border-top: 0; }
.pt-person:hover { background: var(--pt-hover); }
.pt-person.is-focus { background: var(--vv-brand-soft); box-shadow: inset 3px 0 0 var(--vv-brand); }
.pt-person-main { flex: 1 1 auto; min-width: 0; }
.pt-person-name {
  font-size: 14px; font-weight: 600; color: var(--pt-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pt-person-sub { font-size: 12px; color: var(--pt-muted); }
.pt-person-side { text-align: right; flex-shrink: 0; }
.pt-person-balance { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--pt-ink); }
.pt-person-status { font-size: 11px; font-weight: 700; }

.pt-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
}
.pt-avatar-lg { width: 56px; height: 56px; font-size: 20px; }
.pt-avatar-primary { background: #258178; color: #fff; }
.pt-avatar-navy { background: #0E1F3C; color: #fff; }
.pt-avatar-amber { background: #F5B843; color: #0A1729; }
.pt-avatar-muted { background: #EDE8E1; color: var(--pt-body); }

.pt-inspector-head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.pt-inspector-head p { overflow-wrap: anywhere; }
.pt-inspector-name { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.6px; color: var(--pt-ink); }
@media (min-width: 640px) { .pt-inspector-name { font-size: 24px; } }

.pt-panel {
  border: 1px solid var(--pt-divider);
  border-radius: var(--pt-radius-tile);
  padding: 16px 18px;
  min-width: 0;
}
.pt-panel-title { margin: 0; font-size: 14px; font-weight: 700; color: var(--pt-ink); }

.pt-pin-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pt-pin-row form { margin: 0; }
.pt-pin-label {
  margin-right: 4px; font-size: 12px; font-weight: 700; letter-spacing: 0.6px;
  text-transform: uppercase; color: var(--pt-muted);
}
.pt-pin { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 4px; color: var(--pt-body); }
.pt-spacer { flex: 1 1 auto; }

/* ── Tables ───────────────────────────────────────────────────────────── */

.pt-table-wrap { overflow-x: auto; }
.pt-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pt-table th {
  padding: 10px 16px; text-align: left; font-size: 11px; font-weight: 700;
  letter-spacing: 0.6px; text-transform: uppercase; color: var(--pt-muted); white-space: nowrap;
}
.pt-table td { padding: 12px 16px; border-top: 1px solid var(--pt-divider); vertical-align: top; color: var(--pt-body); }
.pt-table .pt-right { text-align: right; }
@media (min-width: 640px) {
  .pt-table th:first-child, .pt-table td:first-child { padding-left: 24px; }
  .pt-table th:last-child, .pt-table td:last-child { padding-right: 24px; }
}

.pt-card-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  padding: 18px; border-bottom: 1px solid var(--pt-divider);
}
@media (min-width: 640px) { .pt-card-head { padding: 18px 24px; } }

/* ── Activity: day cards ──────────────────────────────────────────────── */

.pt-day-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px;
  padding: 14px 18px; background: var(--pt-card-alt); border-bottom: 1px solid var(--pt-divider);
}
@media (min-width: 640px) { .pt-day-head { padding: 14px 22px; } }
/* Phone: what + amount on the first line, who under it. Wider: three columns. */
.pt-day-row {
  display: grid; gap: 4px 16px; align-items: center;
  padding: 12px 18px; border-top: 1px solid var(--pt-divider);
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "what amount" "who who";
}
.pt-day-row:first-of-type { border-top: 0; }
.pt-day-what { grid-area: what; min-width: 0; }
.pt-day-who { grid-area: who; min-width: 0; }
@media (min-width: 640px) {
  .pt-day-row {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) 110px;
    grid-template-areas: "what who amount";
    padding: 12px 22px;
  }
}
.pt-day-amount { grid-area: amount; text-align: right; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--pt-ink); }

.pt-activity-split { display: grid; gap: 20px; align-items: start; }
@media (min-width: 1024px) {
  .pt-activity-split { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
}

.pt-empty-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--vv-brand-soft); color: var(--vv-brand);
}

/* ── Settings: section links ──────────────────────────────────────────── */

.pt-settings-split { display: grid; gap: 24px; align-items: start; }
.pt-section-nav { display: flex; flex-wrap: wrap; gap: 4px; }
@media (min-width: 1024px) {
  .pt-settings-split { grid-template-columns: 220px minmax(0, 1fr); gap: 32px; }
  .pt-section-nav { position: sticky; top: 20px; flex-direction: column; }
}
.pt-section-link {
  display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px;
  font-size: 14px; font-weight: 600; color: var(--pt-body) !important; text-decoration: none !important;
}
.pt-section-link:hover { background: #fff; color: var(--vv-brand) !important; box-shadow: var(--pt-shadow); }

/* ── Sign-in pages ────────────────────────────────────────────────────── */

.pt-auth {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  box-sizing: border-box;
  padding: 40px 16px;
}
.pt-auth-inner { width: 100%; max-width: 440px; }
.pt-auth-brand { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 24px; }
.pt-auth-brand img { width: 40px; height: 40px; border-radius: 6px; }
.pt-auth-title { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.6px; color: var(--pt-ink); }

/* ── Busy state (portal.js) ───────────────────────────────────────────── */

/* The button a manager just pressed, while its POST is out (a HaHa or Stripe
   round trip takes seconds). portal.js disables every POST button and marks
   the pressed one; this makes that visible instead of a click that looks dead. */
.pt-btn.is-busy,
.pt-chip.is-busy,
.pt-hero-btn.is-busy { cursor: progress; }
.pt-btn.is-busy:disabled { opacity: 1; }
.is-busy::after {
  content: "";
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  box-sizing: border-box;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: pt-spin 700ms linear infinite;
}
@keyframes pt-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .is-busy::after { animation-duration: 2s; }
}

/* ── The person's details (email, phone, staff number, added) ─────────── */

.pt-details {
  display: grid;
  gap: 12px 16px;
  margin-bottom: 0;
}
@media (min-width: 640px) { .pt-details { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .pt-details { grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); } }
.pt-details dt {
  font-size: 11px; font-weight: 700; letter-spacing: 0.6px;
  text-transform: uppercase; color: var(--pt-muted);
}
.pt-details dd {
  margin: 4px 0 0; font-size: 14px; color: var(--pt-ink); overflow-wrap: anywhere;
}
