/* ============================================================
   ParkZilla design system — portal shell (09-design-system.md).
   Shared verbatim by the admin, host and city portals: nothing in
   this file may be surface-specific.

   Cleanup mandate (09 §1): ONE interactive blue. --pz-blue-deep is
   the only blue allowed on text, links, buttons and focus rings;
   --pz-blue is for large fills and gradients, where its 2.86:1 on
   white doesn't matter.
   ============================================================ */

:root {
  /* Color tokens — 09 §1 */
  --pz-navy: #131e46;
  --pz-blue: #239ff5;          /* large fills & gradients ONLY */
  --pz-blue-deep: #2166cc;     /* THE interactive blue — AA on white (5.47:1) */
  --pz-teal: #51c4d8;
  --pz-blue-city: #5ba7f7;
  --pz-blue-soft: #e8f0fe;
  --pz-violet: #7b6bd6;        /* the midtone inside the logo pin */
  --pz-gold: #f5b301;
  --pz-green: #1f9d55;
  --pz-red: #d93025;
  --pz-amber: #f5a623;         /* event meters, partial occupancy */
  --pz-grey: #9aa3ae;

  --pz-bg: #f4f6fa;
  --pz-surface: #ffffff;
  --pz-surface-2: #fafbfd;     /* row hover, inset wells */
  --pz-ink: #17222f;
  --pz-ink-soft: #5b6875;
  --pz-line: #e1e6ee;

  /* The brand is not flat — the logo pin runs teal → blue → navy, and the
     app/landing carry that same 160deg gradient (09 §1). Portals get it on
     the sidebar and the auth wall so they read as the same product. */
  --pz-grad-deep: linear-gradient(160deg, #0d2b52, #123c7a 55%, #0f47ab);
  --pz-grad-brand: linear-gradient(150deg, var(--pz-teal), var(--pz-blue) 45%, var(--pz-violet));
  --pz-sidebar-bg: linear-gradient(185deg, #16224e 0%, #131e46 55%, #101a3d 100%);
  --pz-sidebar-ink: #cdd9ec;   /* matches the 1.x portals */

  /* Paired chip colors, so semantic states are one token pair each */
  --pz-green-bg: #e5f8ec;  --pz-green-ink: #14713c;
  --pz-red-bg:   #fdeceb;  --pz-red-ink:   #a52117;
  --pz-gold-bg:  #fff6dc;  --pz-gold-ink:  #8a6400;
  --pz-grey-bg:  #eef0f3;
  --pz-city-bg:  #e3f1ff;  --pz-city-ink:  #1668b6;

  /* Shape & elevation — 09 §3 */
  --pz-radius: 12px;
  --pz-radius-lg: 20px;
  --pz-shadow: 0 1px 2px rgba(13, 43, 82, .06), 0 4px 16px rgba(13, 43, 82, .08);
  --pz-shadow-lg: 0 8px 40px rgba(13, 43, 82, .22);

  --pz-font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --pz-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Motion — 09 §4 */
  --pz-ease-out: cubic-bezier(.23, 1, .32, 1);
  --pz-ease-in-out: cubic-bezier(.77, 0, .175, 1);

  --pz-sidebar-w: 244px;
  --pz-ribbon-h: 36px;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* The UA stylesheet's `[hidden] { display: none }` loses to ANY author rule
   that sets display — which is every panel in this file. Without this,
   `el.hidden = true` does nothing and the boot splash and the impersonation
   ribbon stay on screen forever. Author-level, so it actually wins. */
[hidden] { display: none !important; }
body {
  font-family: var(--pz-font-body);
  background: var(--pz-bg);
  color: var(--pz-ink);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; font-family: var(--pz-font-heading); font-weight: 600; }
h1 { font-size: 24px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
p { margin: 0 0 1em; }
a { color: var(--pz-blue-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
hr { border: 0; border-top: 1px solid var(--pz-line); margin: 18px 0; }

/* Focus is always visible on web portals — 09 §7 */
:focus-visible {
  outline: 2px solid var(--pz-blue-deep);
  outline-offset: 2px;
  border-radius: 4px;
}

.pz-mono { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }
.pz-muted { color: var(--pz-ink-soft); }
.pz-small { font-size: 13px; }
.pz-nowrap { white-space: nowrap; }
.pz-right { text-align: right; }
.pz-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Icons (Material Symbols, 09 §6 — never emoji) ---------- */
.mi {
  font-family: 'Material Symbols Rounded';
  font-weight: normal; font-style: normal; line-height: 1;
  letter-spacing: normal; text-transform: none; white-space: nowrap;
  direction: ltr; -webkit-font-smoothing: antialiased;
  font-size: 20px; user-select: none;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
.mi.fill { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
.mi.sm { font-size: 17px; }
.mi.lg { font-size: 40px; }

/* ---------- Buttons — 09 §5 ---------- */
.pz-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid transparent; border-radius: 999px;
  padding: 10px 20px; min-height: 44px;         /* touch target ≥44px — 09 §7 */
  font: 600 14px/1 var(--pz-font-body);
  background: var(--pz-blue-deep); color: #fff; cursor: pointer;
  transition: filter .15s, transform .12s var(--pz-ease-out);
  text-decoration: none !important;
}
.pz-btn:hover:not(:disabled) { filter: brightness(1.08); }
.pz-btn:active:not(:disabled) { transform: scale(.97); }
.pz-btn:disabled { opacity: .5; cursor: default; }
.pz-btn.secondary { background: var(--pz-surface); color: var(--pz-blue-deep); border-color: var(--pz-line); }
.pz-btn.ghost { background: transparent; color: var(--pz-blue-deep); }
.pz-btn.ghost:hover:not(:disabled) { background: var(--pz-blue-soft); }
.pz-btn.danger { background: var(--pz-red); }
.pz-btn.dark { background: var(--pz-navy); }
.pz-btn.small { padding: 6px 14px; min-height: 34px; font-size: 13px; }
.pz-btn.block { width: 100%; }
.pz-btn .mi { font-size: 18px; }
.pz-btn.small .mi { font-size: 16px; }

/* Icon-only button — still 44px of target */
.pz-iconbtn {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 999px;
  border: 1px solid transparent; background: transparent;
  color: var(--pz-ink-soft); cursor: pointer;
}
.pz-iconbtn:hover { background: var(--pz-grey-bg); color: var(--pz-ink); }

/* ---------- Cards, tiles, grids ---------- */
.pz-card {
  background: var(--pz-surface); border: 1px solid var(--pz-line);
  border-radius: var(--pz-radius); box-shadow: var(--pz-shadow); padding: 18px;
}
.pz-card.flush { padding: 0; overflow: hidden; }
.pz-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--pz-line);
}
.pz-card-head h2, .pz-card-head h3 { margin: 0; }
.pz-card-body { padding: 18px; }

.pz-grid { display: grid; gap: 14px; }
.pz-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pz-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pz-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.pz-stat { padding: 16px 18px; }
.pz-stat .num { font: 700 28px/1.1 var(--pz-font-heading); color: var(--pz-navy); }
.pz-stat .lbl {
  font-size: 12.5px; color: var(--pz-ink-soft);
  text-transform: uppercase; letter-spacing: .04em; margin-top: 4px;
}
.pz-stat .sub { font-size: 12.5px; color: var(--pz-ink-soft); margin-top: 6px; }

/* Definition list for detail panes: label above value, tight rhythm */
.pz-facts { display: grid; gap: 12px 20px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin: 0; }
.pz-facts > div { min-width: 0; }
.pz-facts dt {
  font-size: 11.5px; font-weight: 600; color: var(--pz-ink-soft);
  text-transform: uppercase; letter-spacing: .04em;
}
.pz-facts dd { margin: 2px 0 0; font-size: 14.5px; overflow-wrap: anywhere; }

/* ---------- Badges & chips ---------- */
.pz-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 3px 9px;
  background: var(--pz-blue-soft); color: var(--pz-blue-deep); white-space: nowrap;
}
.pz-badge.city { background: var(--pz-city-bg); color: var(--pz-city-ink); }
.pz-badge.premium { background: var(--pz-gold-bg); color: var(--pz-gold-ink); }
.pz-badge.ev, .pz-badge.green { background: var(--pz-green-bg); color: var(--pz-green-ink); }
.pz-badge.grey { background: var(--pz-grey-bg); color: var(--pz-ink-soft); }
.pz-badge.red { background: var(--pz-red-bg); color: var(--pz-red-ink); }
.pz-badge.amber { background: #fff3e0; color: #8a5200; }
.pz-badge .mi { font-size: 13px; }

.pz-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pz-chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--pz-line); background: var(--pz-surface);
  border-radius: 999px; padding: 7px 14px; min-height: 36px;
  font: 600 13px/1 var(--pz-font-body); color: var(--pz-ink-soft); cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.pz-chip:hover { border-color: var(--pz-blue-deep); color: var(--pz-ink); }
.pz-chip.active {
  background: var(--pz-blue-soft); color: var(--pz-blue-deep);
  border-color: var(--pz-blue-soft);
}
.pz-chip .count {
  font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 1px 7px;
  background: var(--pz-grey-bg); color: var(--pz-ink-soft);
}
.pz-chip.active .count { background: #fff; color: var(--pz-blue-deep); }

/* Sub-tabs (Promos §2.8) — a quieter row than chips */
.pz-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--pz-line); overflow-x: auto; }
.pz-tab {
  border: 0; background: none; cursor: pointer; white-space: nowrap;
  padding: 11px 15px; font: 600 14px/1 var(--pz-font-body); color: var(--pz-ink-soft);
  border-bottom: 2.5px solid transparent; margin-bottom: -1px;
}
.pz-tab:hover { color: var(--pz-ink); }
.pz-tab[aria-selected="true"] { color: var(--pz-blue-deep); border-bottom-color: var(--pz-blue-deep); }

/* ---------- Forms ---------- */
.pz-field { margin-bottom: 14px; min-width: 0; }
.pz-field > label {
  display: block; font-size: 13px; font-weight: 600;
  margin-bottom: 5px; color: var(--pz-ink-soft);
}
.pz-field .hint { font-size: 12.5px; color: var(--pz-ink-soft); margin-top: 5px; }
.pz-input, .pz-select, .pz-textarea {
  width: 100%; padding: 11px 13px; font: 400 15px/1.4 var(--pz-font-body);
  border: 1.5px solid var(--pz-line); border-radius: 10px;
  background: var(--pz-surface); color: var(--pz-ink);
}
.pz-textarea { min-height: 96px; resize: vertical; }
.pz-input:focus, .pz-select:focus, .pz-textarea:focus {
  outline: none; border-color: var(--pz-blue-deep);
  box-shadow: 0 0 0 3px rgba(33, 102, 204, .14);
}
.pz-input:disabled, .pz-select:disabled { background: var(--pz-bg); color: var(--pz-ink-soft); }
.pz-input.invalid, .pz-textarea.invalid { border-color: var(--pz-red); }
.pz-check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.pz-check input { width: 17px; height: 17px; accent-color: var(--pz-blue-deep); cursor: pointer; }
.pz-formrow { display: grid; gap: 0 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.pz-formactions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 6px; }

/* Search box with a leading icon */
.pz-search { position: relative; flex: 1 1 240px; max-width: 380px; }
.pz-search .mi {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--pz-ink-soft); pointer-events: none;
}
.pz-search .pz-input { padding-left: 40px; }

/* ---------- Tables — scroll in their own container (09 §5) ---------- */
.pz-tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pz-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pz-table th, .pz-table td {
  text-align: left; padding: 11px 14px;
  border-bottom: 1px solid var(--pz-line); vertical-align: middle;
}
.pz-table th {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--pz-ink-soft); white-space: nowrap;
  position: sticky; top: 0; background: var(--pz-surface); z-index: 1;
}
.pz-table tbody tr:hover { background: var(--pz-surface-2); }
.pz-table tbody tr:last-child td { border-bottom: 0; }
.pz-table tr.clickable { cursor: pointer; }
.pz-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.pz-pager {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 12px 16px; border-top: 1px solid var(--pz-line); font-size: 13.5px;
}

/* ---------- Empty state, errors, skeletons ---------- */
.pz-empty {
  display: grid; justify-items: center; gap: 8px;
  padding: 44px 20px; text-align: center; color: var(--pz-ink-soft);
}
.pz-empty .mi { font-size: 40px; color: var(--pz-grey); }
.pz-empty p { margin: 0; }

.pz-error {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 14px 16px; border-radius: var(--pz-radius);
  background: var(--pz-red-bg); color: var(--pz-red-ink); font-size: 14px;
}
.pz-error .mi { color: var(--pz-red); flex: none; }

.pz-note {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--pz-radius);
  background: var(--pz-blue-soft); color: #14406e; font-size: 13.5px;
}
.pz-note .mi { color: var(--pz-blue-deep); flex: none; }

.pz-skel {
  background: linear-gradient(90deg, #edf0f5 25%, #f6f8fb 50%, #edf0f5 75%);
  background-size: 400% 100%; animation: pz-shimmer 1.4s ease-in-out infinite;
  border-radius: 8px; height: 14px;
}
.pz-skel.tile { height: 84px; border-radius: var(--pz-radius); }
.pz-skel.row { height: 42px; margin-bottom: 8px; border-radius: 8px; }
@keyframes pz-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ---------- Toasts — 09 §5 ---------- */
#pz-toasts {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  z-index: 9999; display: flex; flex-direction: column; gap: 8px;
  align-items: center; pointer-events: none;
}
.pz-toast {
  background: var(--pz-navy); color: #fff; border-radius: 999px;
  padding: 11px 22px; font-size: 14px; font-weight: 500;
  box-shadow: var(--pz-shadow-lg); animation: pz-pop .2s var(--pz-ease-out);
  max-width: min(90vw, 520px);
}
.pz-toast.error { background: var(--pz-red); }
@keyframes pz-pop { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Modal / confirm — 09 §5 ---------- */
.pz-backdrop {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(19, 30, 70, .5);
  display: grid; place-items: center; padding: 20px;
  animation: pz-fade .16s ease-out;
}
@keyframes pz-fade { from { opacity: 0; } }
.pz-modal {
  background: var(--pz-surface); border-radius: var(--pz-radius-lg);
  box-shadow: var(--pz-shadow-lg); width: 100%; max-width: 400px;
  padding: 24px; text-align: center; animation: pz-pop .2s var(--pz-ease-out);
}
.pz-modal.wide { max-width: 640px; text-align: left; }
.pz-modal h2 { margin-bottom: 6px; }
.pz-modal .msg { color: var(--pz-ink-soft); margin-bottom: 20px; }
.pz-modal .pz-modal-actions { display: flex; gap: 10px; justify-content: center; }
.pz-modal.wide .pz-modal-actions { justify-content: flex-end; }
.pz-modal .icon {
  display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 12px;
  border-radius: 999px; background: var(--pz-blue-soft); color: var(--pz-blue-deep);
}
.pz-modal .icon.danger { background: var(--pz-red-bg); color: var(--pz-red); }

/* ---------- Side panel (wide-layout bottom sheet, 09 §5) ---------- */
.pz-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 800;
  width: min(460px, 100vw); background: var(--pz-surface);
  box-shadow: var(--pz-shadow-lg); display: flex; flex-direction: column;
  animation: pz-slide-in .22s var(--pz-ease-out);
}
@keyframes pz-slide-in { from { transform: translateX(100%); } }
.pz-panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 16px 18px; border-bottom: 1px solid var(--pz-line);
}
.pz-panel-body { flex: 1; overflow-y: auto; padding: 18px; }

/* ---------- Impersonation ribbon — 09 §5 ----------
   Full-width and fixed above the sidebar (which is itself fixed at z 600),
   so it cannot be half-hidden behind the nav — the whole point of the ribbon
   is that it is impossible to miss. The shell adds `.pz-impersonating` to
   <body>, which makes room for it. */
.pz-ribbon {
  position: fixed; top: 0; left: 0; right: 0; z-index: 700;
  height: var(--pz-ribbon-h);
  display: flex; align-items: center; justify-content: center; gap: 14px;
  background: var(--pz-gold); color: #3d2f00;
  padding: 0 16px; font-size: 13.5px; font-weight: 600;
}
.pz-ribbon a { color: #3d2f00; text-decoration: underline; }
body.pz-impersonating .pz-sidebar { top: var(--pz-ribbon-h); }
body.pz-impersonating .pz-app { padding-top: var(--pz-ribbon-h); }

/* ============================================================
   Portal shell — sidebar + main column (04 §1)
   ============================================================ */
.pz-app { display: flex; min-height: 100vh; }

.pz-sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--pz-sidebar-w); z-index: 600;
  background: var(--pz-sidebar-bg); color: var(--pz-sidebar-ink);
  display: flex; flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, .06);
}
.pz-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 18px 16px; border-bottom: 1px solid rgba(255, 255, 255, .1);
}
/* The real pin mark, not a stand-in. 399×542 transparent PNG. */
.pz-brand-mark { width: 26px; height: 34px; flex: none; object-fit: contain; display: block; }
.pz-brand-name { font: 700 17px/1.1 var(--pz-font-heading); color: #fff; letter-spacing: -.01em; }
.pz-brand-name .park { color: var(--pz-teal); }
.pz-brand-sub {
  font-size: 10.5px; color: rgba(205, 217, 236, .65);
  text-transform: uppercase; letter-spacing: .14em; margin-top: 1px;
}

.pz-nav { flex: 1; overflow-y: auto; padding: 10px 10px 20px; }
.pz-nav a, .pz-nav button {
  position: relative;
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 10px 12px; margin-bottom: 2px; border: 0; border-radius: 10px;
  background: none; color: var(--pz-sidebar-ink); cursor: pointer;
  font: 500 14px/1.2 var(--pz-font-body); text-align: left; text-decoration: none;
  transition: background .15s, color .15s;
}
.pz-nav a:hover, .pz-nav button:hover { background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
.pz-nav a.active {
  background: linear-gradient(90deg, rgba(33, 102, 204, .95), rgba(33, 102, 204, .72));
  color: #fff; font-weight: 600;
}
/* Teal edge — the accent the logo leads with. */
.pz-nav a.active::before {
  content: ''; position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--pz-teal);
}
.pz-nav .mi { font-size: 19px; flex: none; }
.pz-nav .soon {
  margin-left: auto; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; background: rgba(255, 255, 255, .15); border-radius: 999px; padding: 2px 7px;
}
.pz-nav .badge {
  margin-left: auto; font-size: 11px; font-weight: 700;
  background: var(--pz-red); color: #fff; border-radius: 999px; padding: 1px 7px;
}

.pz-sidebar-foot {
  padding: 14px 18px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 13px;
}
.pz-sidebar-foot .who { color: #fff; font-weight: 600; overflow-wrap: anywhere; }
.pz-sidebar-foot .role { color: rgba(205, 217, 236, .65); font-size: 12px; margin-bottom: 8px; }
.pz-sidebar-foot button {
  border: 0; background: none; color: var(--pz-sidebar-ink);
  cursor: pointer; font: 500 13px var(--pz-font-body); padding: 0;
  display: inline-flex; align-items: center; gap: 6px;
}
.pz-sidebar-foot button:hover { color: #fff; }

.pz-main {
  flex: 1; min-width: 0; margin-left: var(--pz-sidebar-w);
  display: flex; flex-direction: column;
}
.pz-topline {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 20px 26px 14px;
}
.pz-topline h1 { margin: 0; }
.pz-topline .spacer { flex: 1; }
.pz-topbar { display: none; }             /* becomes the mobile header <900px */
.pz-content { padding: 0 26px 40px; }
.pz-section { margin-bottom: 20px; }

/* ---------- Auth wall (04 §1) ---------- */
.pz-wall {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: var(--pz-grad-deep);
}
.pz-wall-card {
  width: 100%; max-width: 400px; background: var(--pz-surface);
  border-radius: var(--pz-radius-lg); box-shadow: var(--pz-shadow-lg);
  padding: 32px 28px; text-align: center;
}
.pz-wall-card .pz-brand-mark { width: 52px; height: 68px; margin: 0 auto 14px; }
.pz-wall-card .pz-brand-name { font-size: 22px; color: var(--pz-navy); }
.pz-wall-card h1 { font-size: 21px; margin-bottom: 4px; }
.pz-wall-card .tagline { color: var(--pz-ink-soft); font-size: 14px; margin-bottom: 22px; }
.pz-wall-card form { text-align: left; }
.pz-wall-card .pz-field { margin-bottom: 12px; }
.pz-wall-foot { margin-top: 18px; font-size: 13px; color: var(--pz-ink-soft); }

/* OTP entry: wide, spaced, numeric */
.pz-otp {
  letter-spacing: .5em; text-align: center; font-size: 20px;
  font-weight: 600; font-variant-numeric: tabular-nums;
}

/* ---------- Boot splash & noscript ---------- */
.pz-boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 14px; }
.pz-boot-mark {
  width: 38px; height: 50px; object-fit: contain;
  animation: pz-breathe 1.5s var(--pz-ease-in-out) infinite;
}
@keyframes pz-breathe { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.12); opacity: 1; } }
.pz-boot-msg { color: var(--pz-ink-soft); font-size: 14px; margin: 0; }
.pz-noscript { min-height: 100vh; display: grid; place-content: center; text-align: center; padding: 24px; }

/* ============================================================
   Responsive — 900px is the shell breakpoint (04 §1 mobile pass)
   ============================================================ */
@media (max-width: 1100px) {
  .pz-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .pz-grid.cols-3, .pz-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* Sidebar collapses to a top bar + drawer */
  .pz-sidebar {
    transform: translateX(-100%);
    transition: transform .25s var(--pz-ease-in-out);
    width: min(300px, 78%);
  }
  .pz-app.drawer-open .pz-sidebar { transform: none; }
  .pz-app.drawer-open::after {
    content: ''; position: fixed; inset: 0; z-index: 590;
    background: rgba(19, 30, 70, .5);
  }
  .pz-main { margin-left: 0; }
  .pz-topbar {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; background: var(--pz-navy); color: #fff;
    position: sticky; top: 0; z-index: 500;
  }
  .pz-topbar .pz-iconbtn { color: #fff; }
  .pz-topbar .pz-iconbtn:hover { background: rgba(255, 255, 255, .12); color: #fff; }
  .pz-topbar .title { font: 600 15px var(--pz-font-heading); }
  .pz-topline { padding: 16px 16px 10px; }
  .pz-content { padding: 0 16px 32px; }
  .pz-panel { width: 100vw; }
}
@media (max-width: 560px) {
  .pz-grid.cols-2, .pz-grid.cols-3, .pz-grid.cols-4 { grid-template-columns: minmax(0, 1fr); }
  .pz-stat .num { font-size: 24px; }
  h1 { font-size: 20px; }
}


/* ============================================================
   Dark mode.

   09 §1 says dark mode is "not part of 1.x — if added in 2.0 it is a
   deliberate later project, do not partially theme". This is that project,
   done the way that note demands: every colour in this file resolves through
   a token, and dark redefines the token set wholesale. Nothing is left
   half-lit.

   Three states, because the OS default must work without anyone choosing:
     :root                          → light
     prefers-color-scheme: dark     → dark, unless the user chose light
     [data-theme="dark"|"light"]    → an explicit choice wins either way
   ============================================================ */

/* The brand hues hold; only the surfaces they sit on move. Ink is warmed off
   pure white and surfaces off pure black — both reduce halation on OLED and
   keep the navy from turning muddy. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark; }
}
:root[data-theme="dark"] { color-scheme: dark; }

/* One definition, applied by both the media query and the explicit attribute.
   CSS has no mixins, so the declarations are stated twice rather than risk
   the two drifting apart silently — they are kept adjacent for that reason. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --pz-bg: #0e1524;
    --pz-surface: #16203a;
    --pz-surface-2: #1c2745;
    --pz-ink: #e8edf6;
    --pz-ink-soft: #9aa8c0;
    --pz-line: #26324f;

    --pz-blue-deep: #6aa6f5;     /* lifted for AA on the dark surface */
    --pz-blue-soft: #1d2c4d;
    --pz-grey-bg: #1f2a45;

    --pz-green-bg: #12331f;  --pz-green-ink: #6fdc9b;
    --pz-red-bg:   #3a1a18;  --pz-red-ink:   #ff9b91;
    --pz-gold-bg:  #3a2e10;  --pz-gold-ink:  #f5cf72;
    --pz-city-bg:  #172b47;  --pz-city-ink:  #7cc0ff;

    --pz-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 16px rgba(0, 0, 0, .3);
    --pz-shadow-lg: 0 8px 40px rgba(0, 0, 0, .55);
    --pz-grad-deep: linear-gradient(160deg, #070d1a, #0d2b52 55%, #123c7a);
    --pz-sidebar-bg: linear-gradient(185deg, #101a34 0%, #0d1730 55%, #0a1229 100%);
  }
}

:root[data-theme="dark"] {
  --pz-bg: #0e1524;
  --pz-surface: #16203a;
  --pz-surface-2: #1c2745;
  --pz-ink: #e8edf6;
  --pz-ink-soft: #9aa8c0;
  --pz-line: #26324f;

  --pz-blue-deep: #6aa6f5;
  --pz-blue-soft: #1d2c4d;
  --pz-grey-bg: #1f2a45;

  --pz-green-bg: #12331f;  --pz-green-ink: #6fdc9b;
  --pz-red-bg:   #3a1a18;  --pz-red-ink:   #ff9b91;
  --pz-gold-bg:  #3a2e10;  --pz-gold-ink:  #f5cf72;
  --pz-city-bg:  #172b47;  --pz-city-ink:  #7cc0ff;

  --pz-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 16px rgba(0, 0, 0, .3);
  --pz-shadow-lg: 0 8px 40px rgba(0, 0, 0, .55);
  --pz-grad-deep: linear-gradient(160deg, #070d1a, #0d2b52 55%, #123c7a);
  --pz-sidebar-bg: linear-gradient(185deg, #101a34 0%, #0d1730 55%, #0a1229 100%);
}

/* Pieces that named a literal white/navy rather than a surface token. */
:root[data-theme="dark"] .pz-btn.secondary,
:root:not([data-theme="light"]) .pz-btn.secondary { background: var(--pz-surface); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pz-stat .num { color: var(--pz-ink); }
  :root:not([data-theme="light"]) .pz-chip.active .count { background: var(--pz-surface); }
  :root:not([data-theme="light"]) .pz-toast { background: #26324f; }
  :root:not([data-theme="light"]) .pz-skel {
    background: linear-gradient(90deg, #1a2440 25%, #222e4e 50%, #1a2440 75%);
    background-size: 400% 100%;
  }
  :root:not([data-theme="light"]) .pz-backdrop { background: rgba(0, 0, 0, .65); }
  /* The brand mark is a transparent PNG with a dark navy figure — it needs a
     touch of lift to stay readable against a dark sidebar. */
  :root:not([data-theme="light"]) .pz-wall-card .pz-brand-name { color: var(--pz-ink); }
}
:root[data-theme="dark"] .pz-stat .num { color: var(--pz-ink); }
:root[data-theme="dark"] .pz-chip.active .count { background: var(--pz-surface); }
:root[data-theme="dark"] .pz-toast { background: #26324f; }
:root[data-theme="dark"] .pz-skel {
  background: linear-gradient(90deg, #1a2440 25%, #222e4e 50%, #1a2440 75%);
  background-size: 400% 100%;
}
:root[data-theme="dark"] .pz-backdrop { background: rgba(0, 0, 0, .65); }
:root[data-theme="dark"] .pz-wall-card .pz-brand-name { color: var(--pz-ink); }

/* Theme switch in the sidebar footer. */
.pz-themeswitch { display: flex; gap: 4px; margin-top: 10px; }
.pz-themeswitch button {
  flex: 1; display: grid; place-items: center; padding: 6px 0;
  border-radius: 8px; border: 1px solid rgba(255, 255, 255, .12);
  background: transparent; color: var(--pz-sidebar-ink); cursor: pointer;
}
.pz-themeswitch button[aria-pressed="true"] {
  background: rgba(255, 255, 255, .12); color: #fff; border-color: transparent;
}
.pz-themeswitch .mi { font-size: 17px; }

/* Reduced motion turns everything off, everywhere — 09 §4 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
}

@media print {
  .pz-sidebar, .pz-topbar, #pz-toasts { display: none; }
  .pz-main { margin-left: 0; }
}
