/* ============================================================
   ParkZilla design system v1 — shared by all five surfaces.
   Brand-neutral blue family per spec §5.4; real brand assets land
   in /assets/brand/ later (Addendum §L) and only these tokens change.
   ============================================================ */

:root {
  /* Blue family (spec §5.4) */
  --pz-navy: #1a2450;   /* logo navy */
  --pz-blue: #1b5fd9;          /* private parking / primary */
  --pz-blue-deep: #0f47ab;
  --pz-blue-city: #5ba7f7;     /* city parking (lighter blue) */
  --pz-blue-soft: #e8f0fe;
  --pz-gold: #f5b301;          /* premium badge */
  --pz-green: #1f9d55;
  --pz-red: #d93025;
  --pz-grey: #9aa3ae;          /* unavailable */

  --pz-bg: #f4f6fa;
  --pz-surface: #ffffff;
  --pz-ink: #17222f;
  --pz-ink-soft: #5b6875;
  --pz-line: #e1e6ee;

  --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: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--pz-font);
  background: var(--pz-bg);
  color: var(--pz-ink);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--pz-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.2; }

/* ---------- Buttons ---------- */
.pz-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 999px;
  padding: 10px 20px; font-size: 14px; font-weight: 600; font-family: inherit;
  background: var(--pz-blue); color: #fff; cursor: pointer;
  transition: filter .15s, transform .05s;
  text-decoration: none !important;
}
.pz-btn:hover { filter: brightness(1.08); }
.pz-btn:active { transform: scale(.98); }
.pz-btn:disabled { opacity: .5; cursor: default; }
.pz-btn.secondary { background: var(--pz-surface); color: var(--pz-blue); border-color: var(--pz-line); }
.pz-btn.ghost { background: transparent; color: var(--pz-blue); }
.pz-btn.danger { background: var(--pz-red); }
.pz-btn.dark { background: var(--pz-navy); }
.pz-btn.small { padding: 6px 14px; font-size: 13px; }
.pz-btn.block { width: 100%; }

/* ---------- Cards / panels ---------- */
.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-stat { padding: 16px 18px; }
.pz-stat .num { font-size: 28px; font-weight: 700; color: var(--pz-navy); }
.pz-stat .lbl { font-size: 12.5px; color: var(--pz-ink-soft); text-transform: uppercase; letter-spacing: .04em; }
.pz-grid { display: grid; gap: 14px; }
.pz-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.pz-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.pz-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .pz-grid.cols-3, .pz-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Badges ---------- */
.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);
}
.pz-badge.city { background: #e3f1ff; color: #1668b6; }
.pz-badge.premium { background: #fff6dc; color: #8a6400; }
.pz-badge.ev { background: #e5f8ec; color: #14713c; }
.pz-badge.grey { background: #eef0f3; color: var(--pz-ink-soft); }
.pz-badge.green { background: #e5f8ec; color: #14713c; }
.pz-badge.red { background: #fdeceb; color: #a52117; }

/* ---------- Forms ---------- */
.pz-field { margin-bottom: 14px; }
.pz-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: var(--pz-ink-soft); }
.pz-input, .pz-select {
  width: 100%; padding: 11px 13px; font-size: 15px; font-family: inherit;
  border: 1.5px solid var(--pz-line); border-radius: 10px; background: #fff; color: var(--pz-ink);
}
.pz-input:focus, .pz-select:focus { outline: none; border-color: var(--pz-blue); }

/* ---------- Tables ---------- */
.pz-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pz-table th, .pz-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--pz-line); }
.pz-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--pz-ink-soft); }

/* ---------- Toasts & demo banner ---------- */
#pz-toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.pz-toast {
  background: var(--pz-navy); color: #fff; border-radius: 999px; padding: 10px 20px;
  font-size: 14px; box-shadow: var(--pz-shadow-lg); animation: pz-pop .18s ease-out;
}
.pz-toast.error { background: var(--pz-red); }
@keyframes pz-pop { from { opacity: 0; transform: translateY(8px); } }

.pz-demo-banner {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  background: #fff6dc; color: #6d4f00; border: 1px dashed #e3bb4d;
  border-radius: 10px; padding: 10px 14px; font-size: 13.5px; margin: 10px 0;
}
.pz-demo-banner b { font-size: 18px; letter-spacing: 3px; color: #4a3600; }

/* ---------- Modal ---------- */
.pz-modal-backdrop {
  position: fixed; inset: 0; background: rgba(13, 43, 82, .5); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  animation: pz-fade .15s ease-out;
}
.pz-modal {
  background: #fff; border-radius: var(--pz-radius-lg); box-shadow: var(--pz-shadow-lg);
  width: 100%; max-width: 400px; max-height: 92vh; overflow: auto; padding: 24px;
  animation: pz-pop .18s ease-out;
}
.pz-modal h2 { font-size: 20px; }
@keyframes pz-fade { from { opacity: 0; } }

/* Mock OAuth account picker */
.pz-picker-account {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 12px; border: 1px solid var(--pz-line); border-radius: 10px;
  background: #fff; cursor: pointer; font-family: inherit; font-size: 14px; margin-bottom: 8px; text-align: left;
}
.pz-picker-account:hover { background: var(--pz-blue-soft); }
.pz-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--pz-blue); color: #fff; font-weight: 700; font-size: 15px;
}

/* ============================================================
   Portal layout (portal / cities / admin / demo)
   ============================================================ */
.pz-portal { display: flex; min-height: 100vh; }
.pz-sidebar {
  width: 232px; flex: none; background: var(--pz-navy); color: #cdd9ec;
  display: flex; flex-direction: column; padding: 18px 12px;
}
.pz-sidebar .brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 17px; padding: 6px 10px 18px; }
.pz-sidebar a.nav {
  display: flex; align-items: center; gap: 10px; color: #cdd9ec; padding: 10px 12px;
  border-radius: 8px; font-size: 14px; font-weight: 500; text-decoration: none;
}
.pz-sidebar a.nav:hover { background: rgba(255, 255, 255, .08); }
.pz-sidebar a.nav.active { background: var(--pz-blue); color: #fff; }
.pz-sidebar .soon { margin-left: auto; font-size: 10px; background: rgba(255,255,255,.14); border-radius: 999px; padding: 2px 7px; }
.pz-sidebar .foot { margin-top: auto; padding: 10px; font-size: 12px; color: #8fa5c4; }
.pz-main { flex: 1; padding: 26px 30px; max-width: 1200px; }
.pz-topline { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.pz-topline h1 { font-size: 22px; margin: 0; }
.pz-topline .spacer { flex: 1; }
@media (max-width: 800px) {
  .pz-portal { flex-direction: column; }
  .pz-sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .pz-sidebar .foot { display: none; }
  .pz-main { padding: 18px; }
}

/* Centered auth screen for portals */
.pz-authwall { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: linear-gradient(160deg, var(--pz-navy), #123c7a 60%, var(--pz-blue-deep)); }
.pz-authwall .pz-modal { max-width: 380px; }

/* Impersonation ribbon */
.pz-impersonating {
  position: fixed; top: 0; left: 0; right: 0; z-index: 2000;
  background: var(--pz-gold); color: #4a3600; font-size: 13px; font-weight: 600;
  text-align: center; padding: 5px 10px;
}
body.has-ribbon { padding-top: 28px; }

/* ============================================================
   Seeker app (/app): phone bezel on desktop, native feel on mobile
   ============================================================ */
body.pz-app-body { background: linear-gradient(160deg, #0d2b52, #123c7a 55%, #0f47ab); }
.pz-phone {
  position: relative; width: 100%; height: 100dvh; background: #fff; overflow: hidden;
  display: flex; flex-direction: column;
}
@media (min-width: 768px) {
  body.pz-app-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 28px 0; }
  .pz-phone {
    width: 393px; height: 830px; max-height: calc(100vh - 56px);
    border-radius: 46px; border: 10px solid #10151c; box-shadow: var(--pz-shadow-lg);
  }
  .pz-phone::after { /* notch */
    content: ""; position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
    width: 110px; height: 22px; background: #10151c; border-radius: 999px; z-index: 60;
  }
}
.pz-app-screen { flex: 1; position: relative; overflow: hidden; display: flex; flex-direction: column; }
.pz-tab-pane { flex: 1; overflow-y: auto; padding: 16px; padding-top: 46px; }
.pz-tab-pane.no-pad { padding: 0; }

/* Bottom tab bar */
.pz-tabbar {
  flex: none; display: flex; border-top: 1px solid var(--pz-line); background: #fff;
  padding: 6px 4px calc(10px + env(safe-area-inset-bottom)); z-index: 50;
}
.pz-tabbar button {
  flex: 1; background: none; border: none; cursor: pointer; font-family: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 10.5px; font-weight: 600; color: var(--pz-ink-soft); padding: 4px 0;
}
.pz-tabbar button .ico { font-size: 21px; line-height: 1; }
.pz-tabbar button.active { color: var(--pz-blue); }

/* App header over the map */
.pz-app-head {
  position: absolute; top: 0; left: 0; right: 0; z-index: 40;
  padding: 14px 12px 8px; padding-top: calc(14px + env(safe-area-inset-top));
  display: flex; gap: 8px; align-items: center; pointer-events: none;
}
@media (min-width: 768px) { .pz-app-head { padding-top: 38px; } }
.pz-app-head > * { pointer-events: auto; }
.pz-searchbar {
  flex: 1; display: flex; align-items: center; gap: 8px; background: #fff;
  border-radius: 999px; box-shadow: var(--pz-shadow); padding: 10px 16px; font-size: 14px; color: var(--pz-ink-soft);
  border: none; cursor: pointer;
}
.pz-iconbtn {
  width: 42px; height: 42px; border-radius: 50%; border: none; background: #fff;
  box-shadow: var(--pz-shadow); cursor: pointer; font-size: 17px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
}

/* Mode selector pills */
.pz-modes {
  position: absolute; top: 66px; left: 0; right: 0; z-index: 39;
  display: flex; justify-content: center; gap: 6px;
}
@media (min-width: 768px) { .pz-modes { top: 92px; } }
.pz-modes button {
  border: none; background: #fff; box-shadow: var(--pz-shadow); cursor: pointer;
  font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--pz-ink-soft);
  border-radius: 999px; padding: 7px 14px;
}
.pz-modes button.active { background: var(--pz-blue); color: #fff; }

/* Map */
#pz-map { position: absolute; inset: 0; }
.pz-map-fallback {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(45deg, #dfe7f3, #dfe7f3 14px, #e9eff8 14px, #e9eff8 28px);
  padding: 30px; text-align: center; color: var(--pz-ink-soft);
}

/* Listing preview bottom sheet */
.pz-sheet {
  position: absolute; left: 10px; right: 10px; bottom: 12px; z-index: 45;
  background: #fff; border-radius: var(--pz-radius-lg); box-shadow: var(--pz-shadow-lg);
  padding: 16px; animation: pz-slide .2s ease-out;
}
@keyframes pz-slide { from { transform: translateY(30px); opacity: 0; } }
.pz-sheet .close { position: absolute; top: 10px; right: 12px; border: none; background: #eef0f3; border-radius: 50%; width: 26px; height: 26px; cursor: pointer; }
.pz-sheet h3 { font-size: 16px; margin: 0 0 4px; padding-right: 28px; }
.pz-sheet .meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.pz-sheet .price { font-size: 18px; font-weight: 800; color: var(--pz-navy); }

/* Splash */
#pz-splash {
  position: absolute; inset: 0; z-index: 100; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px; color: #fff;
  background: linear-gradient(160deg, var(--pz-navy), var(--pz-blue-deep));
  transition: opacity .45s;
}
#pz-splash.gone { opacity: 0; pointer-events: none; }
#pz-splash .mark { width: 96px; animation: pz-bounce 1s ease infinite alternate; }
#pz-splash .word { font-size: 26px; font-weight: 800; letter-spacing: .5px; }
@keyframes pz-bounce { to { transform: translateY(-8px); } }

/* Hamburger drawer */
.pz-drawer-backdrop { position: absolute; inset: 0; z-index: 55; background: rgba(13,43,82,.45); animation: pz-fade .15s; }
.pz-drawer {
  position: absolute; top: 0; bottom: 0; left: 0; width: 78%; max-width: 300px; z-index: 56;
  background: #fff; box-shadow: var(--pz-shadow-lg); padding: 20px 14px calc(14px + env(safe-area-inset-bottom));
  overflow-y: auto; animation: pz-drawer-in .2s ease-out;
  border-radius: 0 18px 18px 0;
}
@keyframes pz-drawer-in { from { transform: translateX(-40px); opacity: .4; } }
.pz-drawer .who { padding: 26px 10px 14px; border-bottom: 1px solid var(--pz-line); margin-bottom: 8px; }
.pz-drawer .who .nm { font-weight: 700; font-size: 16px; }
.pz-drawer .who .em { font-size: 12.5px; color: var(--pz-ink-soft); }
.pz-drawer button.item, .pz-drawer a.item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 10px;
  background: none; border: none; font-family: inherit; font-size: 14.5px; color: var(--pz-ink);
  border-radius: 8px; cursor: pointer; text-decoration: none;
}
.pz-drawer button.item:hover, .pz-drawer a.item:hover { background: var(--pz-blue-soft); }

/* Simple list rows (events, placeholders) */
.pz-row { display: flex; gap: 12px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--pz-line); }
.pz-row .ico { font-size: 22px; width: 40px; height: 40px; border-radius: 10px; background: var(--pz-blue-soft); display: flex; align-items: center; justify-content: center; flex: none; }
.pz-row .t { font-weight: 600; font-size: 14px; }
.pz-row .s { font-size: 12.5px; color: var(--pz-ink-soft); }

.pz-empty { text-align: center; color: var(--pz-ink-soft); padding: 40px 20px; }
.pz-empty .big { font-size: 40px; margin-bottom: 8px; }

/* ============================================================
   Marketing site
   ============================================================ */
.mk-nav { display: flex; align-items: center; gap: 22px; padding: 18px 6vw; background: transparent; position: absolute; top: 0; left: 0; right: 0; z-index: 5; }
.mk-nav .brand { color: #fff; font-weight: 800; font-size: 20px; display: flex; gap: 8px; align-items: center; }
.mk-nav .links { margin-left: auto; display: flex; gap: 20px; align-items: center; }
.mk-nav .links a { color: #d9e5f7; font-size: 14px; font-weight: 600; }
.mk-hero {
  background: linear-gradient(160deg, var(--pz-navy) 0%, #123c7a 55%, var(--pz-blue-deep) 100%);
  color: #fff; padding: 130px 6vw 90px; position: relative; overflow: hidden;
}
.mk-hero h1 { font-size: clamp(30px, 5vw, 52px); max-width: 640px; }
.mk-hero p.lead { font-size: 18px; color: #c9d8ef; max-width: 520px; margin-bottom: 28px; }
.mk-stats { display: flex; gap: 40px; margin-top: 48px; flex-wrap: wrap; }
.mk-stats .num { font-size: 30px; font-weight: 800; }
.mk-stats .lbl { font-size: 13px; color: #a9bedd; }
.mk-section { padding: 70px 6vw; }
.mk-section h2 { font-size: 28px; margin-bottom: 24px; }
.mk-foot { background: var(--pz-navy); color: #a9bedd; padding: 30px 6vw; font-size: 13px; display: flex; gap: 20px; flex-wrap: wrap; }
.mk-foot a { color: #d9e5f7; }
