/* ============================================================
   Property Radar — "Zieleń Metra" design system
   Deep metro green + warm canary on warm paper.
   Self-contained CSS framework (no external dependencies).
   ============================================================ */

:root {
  --pr-green: #00693e;
  --pr-green-700: #00532f;
  --pr-green-300: #4ea784;
  --pr-green-50: #e6f2ec;
  --pr-canary: #f2c94c;
  --pr-canary-700: #d9aa21;
  --pr-ink: #141b1a;
  --pr-ink-700: #2b3331;
  --pr-paper: #faf9f6;
  --pr-surface: #ffffff;
  --pr-muted: #e6e9e7;
  --pr-muted-2: #f1f3f1;
  --pr-text: #141b1a;
  --pr-text-soft: #5d6863;
  --pr-line: #dfe3e0;
  --pr-red: #d64545;
  --pr-blue: #2f6db2;
  --pr-heat-1: #2e9c6b;
  --pr-heat-2: #7cb86a;
  --pr-heat-3: #f2c94c;
  --pr-heat-4: #ee9b3a;
  --pr-heat-5: #d64545;
  --pr-font: "Helvetica Neue", Arial, sans-serif;
  --pr-r-sm: 6px;
  --pr-r-md: 10px;
  --pr-r-lg: 16px;
  --pr-r-pill: 999px;
  --pr-shadow-1: 0 1px 2px rgba(20, 27, 26, 0.06), 0 1px 3px rgba(20, 27, 26, 0.04);
  --pr-shadow-2: 0 4px 14px rgba(20, 27, 26, 0.08), 0 1px 3px rgba(20, 27, 26, 0.04);
}

/* ---------- Global base ---------- */
body {
  background: var(--pr-paper);
  color: var(--pr-text);
  font-family: var(--pr-font);
  margin: 0;
}
* {
  box-sizing: border-box;
}
a {
  color: var(--pr-green);
}
a:hover {
  color: var(--pr-green-700);
}

/* ---------- Layout ---------- */
.pr-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
}
.pr-container-fluid {
  max-width: 100%;
  padding: 0 24px;
}
.pr-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.pr-col {
  flex: 1;
  min-width: 0;
}
.pr-col-3 {
  flex: 0 0 calc(25% - 6px);
}
.pr-col-4 {
  flex: 0 0 calc(33.333% - 6px);
}
.pr-col-6 {
  flex: 0 0 calc(50% - 6px);
}
.pr-col-8 {
  flex: 0 0 calc(66.667% - 6px);
}
.pr-col-9 {
  flex: 0 0 calc(75% - 6px);
}
.pr-col-12 {
  flex: 0 0 100%;
}
@media (min-width: 601px) {
  .pr-col-md-3 {
    flex: 0 0 calc(25% - 6px);
  }
  .pr-col-md-4 {
    flex: 0 0 calc(33.333% - 6px);
  }
  .pr-col-md-6 {
    flex: 0 0 calc(50% - 6px);
  }
  .pr-col-md-8 {
    flex: 0 0 calc(66.667% - 6px);
  }
  .pr-col-md-12 {
    flex: 0 0 100%;
  }
}

/* ---------- Buttons ---------- */
.pr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--pr-font);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--pr-green);
  border: none;
  border-radius: var(--pr-r-sm);
  padding: 9px 20px;
  cursor: pointer;
  line-height: 1.4;
  text-decoration: none;
  transition: background 0.15s;
  height: 40px;
}
.pr-btn--single {
  margin: 8px;
}
.pr-btn:hover {
  background: var(--pr-green-700);
  color: #fff;
  text-decoration: none;
}
.pr-btn-flat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--pr-font);
  font-size: 14px;
  font-weight: 600;
  color: var(--pr-text-soft);
  background: transparent;
  border: none;
  border-radius: var(--pr-r-sm);
  padding: 9px 14px;
  cursor: pointer;
  line-height: 1.4;
  text-decoration: none;
  transition: background 0.15s;
}
.pr-btn-flat:hover {
  background: var(--pr-muted-2);
  color: var(--pr-ink);
  text-decoration: none;
}
.pr-btn-sm {
  font-size: 13px;
  padding: 6px 12px;
}
.pr-btn-red {
  background: var(--pr-red);
}
.pr-btn-red:hover {
  background: #b33a3a;
}
.pr-btn-blue {
  background: var(--pr-blue);
}
.pr-btn-blue:hover {
  background: #235a94;
}
.pr-btn-canary {
  background: var(--pr-canary);
  color: var(--pr-ink);
}
.pr-btn-canary:hover {
  background: var(--pr-canary-700);
  color: #fff;
}
a.pr-btn,
a.pr-btn-flat {
  text-decoration: none;
}

/* ---------- Pills / badges ---------- */
.pr-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--pr-r-pill);
  letter-spacing: 0.3px;
  text-transform: uppercase;
  line-height: 20px;
}
.pr-pill-green {
  background: var(--pr-green-50);
  color: var(--pr-green-700);
}
.pr-pill-canary {
  background: #fef6dc;
  color: var(--pr-canary-700);
}
.pr-pill-muted {
  background: var(--pr-muted-2);
  color: var(--pr-text-soft);
}
.pr-pill-red {
  background: #fde8e8;
  color: var(--pr-red);
}
.pr-pill-blue {
  background: #e7f0fa;
  color: var(--pr-blue);
}

/* ---------- Cards ---------- */
.pr-card {
  background: var(--pr-surface);
  border: 1px solid var(--pr-line);
  border-radius: var(--pr-r-md);
  box-shadow: var(--pr-shadow-1);
}
.pr-card-body {
  padding: 16px;
}
.pr-card-img {
  position: relative;
  overflow: hidden;
}
.pr-card-img img {
  width: 100%;
  display: block;
}
.pr-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--pr-ink);
  margin: 0 0 8px;
}

/* ---------- Form controls ---------- */
.pr-field {
  margin-bottom: 16px;
}
.pr-field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--pr-text-soft);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
}
.pr-field input,
.pr-field select,
.pr-field textarea {
  font-family: var(--pr-font);
  font-size: 14px;
  color: var(--pr-ink);
  background: var(--pr-surface);
  border: 1px solid var(--pr-line);
  border-radius: var(--pr-r-sm);
  padding: 9px 12px;
  width: 100%;
  box-sizing: border-box;
  line-height: 1.5;
  margin: 0;
}
.pr-field input:focus,
.pr-field select:focus,
.pr-field textarea:focus {
  border-color: var(--pr-green-300);
  box-shadow: 0 0 0 3px var(--pr-green-50);
  outline: none;
}
.pr-field select {
  cursor: pointer;
  appearance: auto;
  -webkit-appearance: auto;
  -moz-appearance: auto;
  height: 41px;
}
.pr-field--compact {
  margin-bottom: 0;
}
.pr-field--auto {
  width: auto;
}
.pr-field--auto select {
  width: auto;
  max-width: 200px;
}
.pr-field--compact select {
  max-width: 120px;
  height: 32px;
  padding: 5px 10px;
}
.pr-field--inline {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.pr-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--pr-text-soft);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
}
.pr-mono {
  font-variant-numeric: tabular-nums;
}

/* ---------- Switch (checkbox with switch attr) ---------- */
.pr-field-switch {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pr-field-switch label {
  margin-bottom: 0;
  cursor: pointer;
}

/* ---------- Nav bar ---------- */
.pr-nav {
  background: var(--pr-surface);
  box-shadow: var(--pr-shadow-1);
  border-bottom: 1px solid var(--pr-line);
  position: sticky;
  top: 0;
  z-index: 50;
}
body:has(.map-page) .pr-nav {
  position: static;
}
.pr-nav-inner {
  display: flex;
  align-items: center;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  gap: 24px;
}
.pr-brand {
  font-size: 18px;
  font-weight: 700;
  color: var(--pr-ink);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}
.pr-brand:hover {
  color: var(--pr-ink);
  text-decoration: none;
}
.pr-brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--pr-green), var(--pr-green-700));
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  line-height: 1;
}
.pr-nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin-right: 0;
}
.pr-nav-links a {
  color: var(--pr-text-soft);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--pr-r-sm);
  text-decoration: none;
}
.pr-nav-links a:hover {
  background: var(--pr-muted-2);
  color: var(--pr-ink);
}
.pr-nav-links a.active {
  color: var(--pr-green);
  background: var(--pr-green-50);
  font-weight: 600;
}
.pr-nav-auth {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 16px;
  border-left: 1px solid var(--pr-line);
  flex-shrink: 0;
}
.pr-nav-lang-toggle {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border: 1px solid var(--pr-line);
  border-radius: 4px;
  color: var(--pr-text-soft);
  text-decoration: none;
  transition:
    background 0.15s,
    color 0.15s;
}
.pr-nav-lang-toggle:hover {
  background: var(--pr-green-50);
  color: var(--pr-green-700);
  border-color: var(--pr-green);
}
.pr-nav-user {
  font-size: 12.5px;
  white-space: nowrap;
  color: var(--pr-text-soft);
}
.pr-nav-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--pr-green-50);
  color: var(--pr-green-700);
  font-weight: 700;
  font-size: 12px;
  display: grid;
  place-items: center;
  line-height: 1;
  flex-shrink: 0;
}
.pr-nav-badge-admin {
  font-size: 10px;
  color: var(--pr-canary-700);
  background: #fef6dc;
  padding: 1px 6px;
  border-radius: var(--pr-r-pill);
  font-weight: 700;
  margin-left: 4px;
}
.pr-nav-logout-form {
  display: inline;
  margin: 0;
}
.pr-nav-logout-btn {
  padding: 0 8px;
  height: 32px;
  line-height: 32px;
  color: var(--pr-green);
  background: transparent;
  border: none;
  font-family: var(--pr-font);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--pr-r-sm);
  cursor: pointer;
}
.pr-nav-logout-btn:hover {
  background: var(--pr-green-50);
}
.pr-nav-login-link {
  color: var(--pr-green);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.pr-nav-toggle {
  display: none;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--pr-ink);
  line-height: 1;
}
.pr-mobile-nav {
  display: none;
}
/* Mobile nav checkbox hack */
#pr-nav-toggle-checkbox {
  display: none;
}
#pr-nav-toggle-checkbox:checked ~ .pr-mobile-nav {
  display: flex;
}
@media (max-width: 992px) {
  .pr-nav-links,
  .pr-nav-auth {
    display: none;
  }
  .pr-nav-toggle {
    display: block;
  }
  .pr-mobile-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--pr-surface);
    border-bottom: 1px solid var(--pr-line);
    box-shadow: var(--pr-shadow-2);
    padding: 12px 24px;
    z-index: 49;
  }
  .pr-mobile-nav a {
    display: block;
    padding: 10px 0;
    color: var(--pr-text-soft);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid var(--pr-muted);
  }
  .pr-mobile-nav a:last-child {
    border-bottom: none;
  }
  .pr-mobile-nav a.active {
    color: var(--pr-green);
    font-weight: 600;
  }
  .pr-mobile-nav .pr-nav-user-mobile {
    font-size: 12.5px;
    color: var(--pr-text-soft);
    padding: 10px 0;
  }
  .pr-mobile-nav .pr-nav-logout-form-mobile {
    margin-top: 4px;
  }
}
.page-container {
  padding: 24px 24px 0;
}

/* ---------- Footer ---------- */
.pr-footer {
  padding: 20px 0;
  border-top: 1px solid var(--pr-line);
  margin-top: 40px;
  background: var(--pr-surface);
}
.pr-footer-text {
  font-size: 12.5px;
  color: var(--pr-text-soft);
}

/* ---------- Tabs ---------- */
.pr-tabs {
  display: flex;
  background: var(--pr-surface);
  border-bottom: 2px solid var(--pr-line);
  gap: 0;
}
.pr-tab {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--pr-text-soft);
  cursor: pointer;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition:
    color 0.15s,
    border-color 0.15s;
}
.pr-tab:hover {
  color: var(--pr-green);
  text-decoration: none;
}
.pr-tab.active {
  color: var(--pr-green);
  border-bottom-color: var(--pr-green);
}

/* ---------- Tables ---------- */
.pr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.pr-table th,
.pr-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--pr-line);
}
.pr-table th {
  font-size: 11px;
  font-weight: 700;
  color: var(--pr-text-soft);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.pr-table.striped tbody tr:nth-child(even) {
  background: var(--pr-muted-2);
}
.pr-table thead {
  background: var(--pr-muted-2);
}

/* ---------- List ---------- */
.pr-list {
  border: 1px solid var(--pr-line);
  border-radius: var(--pr-r-md);
  overflow: hidden;
}
.pr-list-item {
  padding: 14px 18px;
  border-bottom: 1px solid var(--pr-line);
  display: flex;
  align-items: center;
  gap: 12px;
}
.pr-list-item:last-child {
  border-bottom: none;
}
.pr-list-item:hover {
  background: var(--pr-muted-2);
}

/* ---------- Badge (alias for pr-pill) ---------- */
.pr-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--pr-r-pill);
  letter-spacing: 0.3px;
  text-transform: uppercase;
  line-height: 20px;
}
.pr-badge-green {
  background: var(--pr-green-50);
  color: var(--pr-green-700);
}
.pr-badge-canary {
  background: #fef6dc;
  color: var(--pr-canary-700);
}
.pr-badge-muted {
  background: var(--pr-muted-2);
  color: var(--pr-text-soft);
}
.pr-badge-red {
  background: #fde8e8;
  color: var(--pr-red);
}
.pr-badge-blue {
  background: #e7f0fa;
  color: var(--pr-blue);
}

/* ---------- Text utilities ---------- */
.pr-center {
  text-align: center;
}
.pr-text-muted {
  color: var(--pr-text-soft);
}
.pr-text-green {
  color: var(--pr-green);
}
.pr-text-red {
  color: var(--pr-red);
}
.pr-hide {
  display: none;
}

/* ---------- Toast ---------- */
.pr-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(20, 27, 26, 0.92);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 24px;
  border-radius: var(--pr-r-md);
  z-index: 9999;
  opacity: 0;
  transition:
    opacity 0.3s,
    transform 0.3s;
  pointer-events: none;
}
.pr-toast.pr-toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Dialog (modal) ---------- */
dialog {
  position: relative;
  border: 1px solid var(--pr-line);
  border-radius: var(--pr-r-md);
  padding: 0;
  box-shadow: var(--pr-shadow-2);
  max-width: 90vw;
}
dialog::backdrop {
  background: rgba(20, 27, 26, 0.4);
}
.pr-modal-body {
  padding: 20px;
}
.pr-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--pr-line);
}
.pr-modal-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 12px;
  padding-right: 32px;
}
.pr-modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: 0;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: var(--pr-text-soft);
  padding: 4px 8px;
  border-radius: var(--pr-r-sm);
}
.pr-modal-close:hover {
  background: var(--pr-muted);
  color: var(--pr-text);
}

/* ---------- Auth (login/register) ---------- */
.auth-card {
  margin-top: 40px;
  background: var(--pr-surface);
  border: 1px solid var(--pr-line);
  border-radius: var(--pr-r-md);
  box-shadow: var(--pr-shadow-1);
}
.auth-row {
  justify-content: center;
}
.auth-col {
  max-width: 440px;
}
.auth-flash {
  margin: 12px 0;
  font-size: 14px;
}
.auth-submit {
  width: 100%;
  margin-top: 12px;
}
.auth-alt-link {
  margin-top: 16px;
  font-size: 14px;
  color: var(--pr-text-soft);
}

/* Vertical settings subtabs */
.admin-subtab-btn.active {
  background: var(--pr-green-50);
  color: var(--pr-green-700);
  font-weight: 600;
}

/* Admin scrollable table containers (run history, POI fetch history) */
.admin-scroll-table {
  border: 1px solid var(--pr-line);
  border-radius: var(--pr-r-md);
  background: var(--pr-surface);
}
.admin-scroll-table table {
  margin: 0;
}
.admin-scroll-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

/* Detail page mini map */
.detail-map {
  border-radius: var(--pr-r-md);
}

/* Admin live log terminal */
.admin-log {
  background: #0f1410;
  color: #c8d6cf;
  padding: 12px 16px;
  border-radius: var(--pr-r-md);
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 12.5px;
  line-height: 1.65;
  max-height: 300px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.admin-log .log-line {
  display: block;
}
.admin-log .log-level-warn {
  color: #fbbf24;
}
.admin-log .log-level-error {
  color: #f87171;
}
.admin-log .log-level-info {
  color: #93c5fd;
}
.admin-log .log-otodom {
  color: #60a5fa;
}
.admin-log .log-olx {
  color: #4ade80;
}
.admin-log .log-gratka {
  color: #c084fc;
}
.admin-log .log-nieruchomosci_online {
  color: #fb923c;
}
.admin-log .log-orchestrator {
  color: #a78bfa;
}
.admin-log .log-base {
  color: #9ca3af;
}
.admin-log .log-propertyradar {
  color: #e5e7eb;
}

/* Map sidebar cards (generated by map.js) */
.map-sidebar .sb-empty {
  color: var(--pr-text-soft);
  font-size: 13px;
  padding: 20px 0;
  text-align: center;
}
.map-sidebar .sb-card {
  border: 1px solid var(--pr-line);
  border-radius: var(--pr-r-sm);
  padding: 10px;
  cursor: pointer;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  margin-bottom: 8px;
}
.map-sidebar .sb-card:hover {
  border-color: var(--pr-green-300);
  box-shadow: var(--pr-shadow-1);
}
.map-sidebar .sb-card.selected {
  border-color: var(--pr-green);
  box-shadow: 0 0 0 1px var(--pr-green);
}
.sb-card-head {
  display: flex;
  gap: 10px;
}
.sb-card-thumb {
  width: 64px;
  height: 48px;
  border-radius: var(--pr-r-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--pr-muted-2);
}
.sb-card-noimg {
  width: 64px;
  height: 48px;
  border-radius: var(--pr-r-sm);
  background: var(--pr-muted-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pr-text-soft);
  flex-shrink: 0;
}
.sb-card-body {
  flex: 1;
  min-width: 0;
}
.sb-card-price {
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--pr-ink);
}
.sb-card-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--pr-ink);
  line-height: 1.3;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sb-card-meta {
  font-size: 11.5px;
  color: var(--pr-text-soft);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.sb-card-foot {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Travel time display in map sidebar */
.sb-travel {
  margin-top: 8px;
  padding: 6px 10px;
  background: var(--pr-green-50);
  border-radius: var(--pr-r-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--pr-green-700);
}

/* Leaflet tooltip overrides */
.leaflet-tooltip.price-label {
  background: var(--pr-surface);
  border: 1px solid var(--pr-line);
  border-radius: var(--pr-r-sm);
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--pr-ink);
  box-shadow: var(--pr-shadow-1);
  white-space: nowrap;
}
.leaflet-tooltip.price-label::before {
  display: none;
}
.leaflet-tooltip.cluster-label {
  background: transparent;
  border: 0;
  box-shadow: none;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.leaflet-tooltip.cluster-label::before {
  display: none;
}
.leaflet-tooltip.poi-label {
  background: var(--pr-surface);
  border: 1px solid var(--pr-line);
  border-radius: var(--pr-r-sm);
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--pr-ink);
  box-shadow: var(--pr-shadow-1);
  white-space: nowrap;
}
.leaflet-tooltip.poi-label::before {
  display: none;
}
.leaflet-popup-content {
  font-size: 13px;
  color: var(--pr-ink);
}
.leaflet-popup-content b {
  font-size: 14px;
}

/* Station toggle control (Leaflet control on map) */
.station-toggle {
  background: var(--pr-surface);
  padding: 8px 12px;
  border: 1px solid var(--pr-line);
  border-radius: var(--pr-r-md);
  font-size: 12px;
  box-shadow: var(--pr-shadow-2);
}
.station-toggle label {
  display: block;
  cursor: pointer;
  padding: 2px 0;
  color: var(--pr-ink);
}
.station-toggle input[type="checkbox"] {
  opacity: 1;
  position: static;
  width: auto;
  height: auto;
  cursor: pointer;
  margin-right: 4px;
  accent-color: var(--pr-green);
}

/* POI divIcon pins */
.poi-div-icon {
  background: transparent;
  border: 0;
}

/* SVG chart styles (generated by ui/charts.py) */
.stats-chart svg {
  width: 100%;
  height: auto;
  border: 1px solid var(--pr-line);
  border-radius: var(--pr-r-md);
  background: var(--pr-surface);
}
.stats-chart .chart-axis {
  stroke: var(--pr-line);
  stroke-width: 1;
}
.stats-chart .chart-grid {
  stroke: var(--pr-line);
  stroke-width: 0.5;
  opacity: 0.5;
}
.stats-chart .chart-label {
  font-size: 8px;
  fill: var(--pr-text-soft);
}
.stats-chart .chart-line {
  fill: none;
  stroke-width: 2;
}
.stats-chart .chart-area {
  opacity: 0.1;
}
.stats-chart .chart-dot {
  r: 3;
  cursor: pointer;
}
.stats-chart .chart-dot:hover {
  r: 5;
}
.stats-chart rect[fill] {
  cursor: pointer;
}
.chart-tooltip {
  position: fixed;
  z-index: 9999;
  background: rgba(20, 27, 26, 0.95);
  color: #fff;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: var(--pr-r-sm);
  pointer-events: none;
  white-space: nowrap;
  display: none;
}
.stats-chart .chart-legend {
  display: flex;
  gap: 16px;
  margin-top: 6px;
  font-size: 12px;
}
.stats-chart .chart-legend span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.stats-chart .chart-legend .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

/* ===== Listing list (list.html) — Zieleń Metra redesign ===== */

/* List page: override page-container so hero is full-width */
.list-page {
  padding: 0;
  max-width: none;
}

/* Hero: full-width band, centered inner content */
.list-hero {
  background: var(--pr-surface);
  border-bottom: 1px solid var(--pr-line);
  padding: 32px 0 24px;
}
.list-hero-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.list-hero-left {
  min-width: 200px;
}
.list-hero-title {
  font-size: 30px;
  font-weight: 700;
  color: var(--pr-ink);
  letter-spacing: -0.5px;
  line-height: 1.1;
  margin: 0;
}
.list-hero-sub {
  color: var(--pr-text-soft);
  font-size: 14px;
  margin-top: 6px;
}
.list-hero-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.list-hero-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.list-hero-stat .l {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--pr-text-soft);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.list-hero-stat .v {
  font-size: 22px;
  font-weight: 800;
  color: var(--pr-ink);
  font-variant-numeric: tabular-nums;
}
.list-hero-stat .v.new {
  color: var(--pr-green);
}

/* Layout: centered container with filter rail + results */
.list-layout {
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}

/* Filter rail */
.list-filter-rail {
  position: sticky;
  top: 76px;
  padding: 16px;
  background: var(--pr-surface);
  border: 1px solid var(--pr-line);
  border-radius: var(--pr-r-md);
  box-shadow: var(--pr-shadow-1);
  overflow-y: auto;
  overflow-x: visible;
  max-height: calc(100vh - 100px);
}
.list-filter-rail .pr-filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.list-filter-rail .pr-filters-head h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}
.list-filter-rail .pr-field {
  margin-bottom: 16px;
}
.list-filter-rail .filter-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.list-filter-rail .filter-row .pr-field {
  margin-bottom: 0;
  flex: 1;
  min-width: 0;
}
.list-filter-rail .list-filter-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.list-filter-rail .list-filter-actions .btn {
  flex: 1;
  justify-content: center;
}

/* Sort bar */
.list-sortbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 10px 16px;
  background: var(--pr-surface);
  border: 1px solid var(--pr-line);
  border-radius: var(--pr-r-md);
}
.list-sortbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.list-toolbar-count {
  font-size: 13px;
  color: var(--pr-text-soft);
}
.list-toolbar-count b {
  color: var(--pr-ink);
  font-variant-numeric: tabular-nums;
}
.list-toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.list-sort-form {
  display: flex;
  align-items: center;
  gap: 4px;
}
.list-export-btn {
  color: var(--pr-green);
  border: 1px solid var(--pr-line);
  font-size: 0.85rem;
  border-radius: var(--pr-r-sm);
}
.list-export-btn:hover {
  background: var(--pr-green-50);
}
.list-save-filter-btn {
  color: var(--pr-green);
  border: 1px solid var(--pr-green-300);
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: var(--pr-r-sm);
}
.list-save-filter-btn:hover {
  background: var(--pr-green-50);
}
.pr-modal-desc {
  font-size: 14px;
  color: var(--pr-text-soft);
  margin: 0 0 12px;
}
.pr-pill--score {
  font-size: 11px;
  margin-left: 4px;
}

.list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 16px;
}
.listing-col {
  margin-bottom: 0;
}
.listing-card {
  background: var(--pr-surface);
  border: 1px solid var(--pr-line);
  border-radius: var(--pr-r-md);
  overflow: hidden;
  box-shadow: var(--pr-shadow-1);
  transition:
    box-shadow 0.2s,
    transform 0.2s;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  height: 100%;
}
.listing-card:hover {
  box-shadow: var(--pr-shadow-2);
  transform: translateY(-2px);
}
.listing-card .card-image {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--pr-muted-2);
  overflow: hidden;
  height: auto;
  flex-shrink: 0;
}
.listing-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.listing-source-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.94);
  padding: 4px 9px;
  border-radius: var(--pr-r-pill);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--pr-ink);
  backdrop-filter: blur(4px);
}
.listing-source-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.listing-card-img {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--pr-muted-2);
  overflow: hidden;
  flex-shrink: 0;
}
.listing-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.listing-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.listing-card .card-content {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.listing-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.listing-card .price {
  font-size: 20px;
  font-weight: 800;
  color: var(--pr-ink);
  font-variant-numeric: tabular-nums;
}
.listing-card .pm2 {
  font-size: 13px;
  color: var(--pr-text-soft);
  font-weight: 600;
  white-space: nowrap;
}
.listing-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--pr-ink);
  line-height: 1.3;
  margin: 0;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.listing-card-subtitle {
  font-size: 12px;
  color: var(--pr-text-soft);
  line-height: 1.3;
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.listing-card .meta {
  font-size: 12.5px;
  color: var(--pr-text-soft);
  margin: 0;
}
.listing-card-heat {
  margin-top: 4px;
}
.pr-heat-bar {
  display: block;
  height: 5px;
  background: var(--pr-muted);
  border-radius: var(--pr-r-pill);
  overflow: hidden;
}
.pr-heat-bar span {
  display: block;
  height: 100%;
  border-radius: var(--pr-r-pill);
}
.pr-heat-label {
  font-size: 11px;
  color: var(--pr-text-soft);
  margin-top: 3px;
  display: block;
}
.sb-card-heat {
  margin-top: 8px;
}
.listing-footer {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--pr-muted);
}
.listing-hit-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
}
.listing-source-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.94);
  padding: 4px 9px;
  border-radius: var(--pr-r-pill);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--pr-ink);
  backdrop-filter: blur(4px);
}
.listing-source-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.btn-link {
  background: transparent;
  border: 1px solid var(--pr-line);
  cursor: pointer;
  padding: 0;
  font-size: 14px;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: var(--pr-r-sm);
  display: grid;
  place-items: center;
  color: var(--pr-text-soft);
}
.btn-link:hover {
  background: var(--pr-muted-2);
  color: var(--pr-ink);
}

.list-empty {
  padding: 48px 0;
  text-align: center;
  color: var(--pr-text-soft);
}
.list-saved-filters {
  margin: 8px 0 16px;
}
.list-saved-filters .collection-header {
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 600;
}
.collection-item-saved-filter {
  display: flex;
  align-items: center;
}
.list-delete-filter-icon {
  cursor: pointer;
  color: var(--pr-red);
  font-size: 18px;
}
.filter-card {
  padding: 16px;
  margin-bottom: 16px;
}

/* ===== Detail page — dupe group card ===== */

/* ===== Map view (map.html) — Zieleń Metra mockup port ===== */
.map-page {
  padding: 0;
  max-width: none;
}
.map-modal-title {
  font-weight: 600;
  margin-bottom: 16px;
}
.map-modal-filter-row {
  margin-bottom: 0;
}
.map-modal-filter-row .pr-field {
  margin-bottom: 12px;
}
.map-modal-filter-row .pr-row {
  gap: 8px;
}
.map-modal-filter-row .pr-row .pr-field {
  margin-bottom: 0;
  flex: 1;
  min-width: 0;
}
.map-modal-label-field {
  margin-bottom: 16px;
}
.map-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}
.map-empty {
  padding: 48px 0;
  text-align: center;
  color: var(--pr-text-soft);
}

.map-layout {
  display: flex;
  gap: 0;
  height: calc(100vh - 60px);
  min-height: 500px;
  margin-bottom: -40px;
}
.map-sidebar-card {
  width: 340px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  background: var(--pr-surface);
  border-right: 1px solid var(--pr-line);
  overflow: hidden;
}
.map-sidebar-head {
  padding: 16px;
  border-bottom: 1px solid var(--pr-line);
}
.map-sidebar-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}
.map-sidebar-count {
  font-size: 12.5px;
  color: var(--pr-text-soft);
}

.map-sidebar-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--pr-line);
}
.map-sidebar-toolbar .pr-btn-sm {
  background: var(--pr-green);
  color: #fff;
  border-radius: var(--pr-r-sm);
  font-weight: 600;
  height: 32px;
  line-height: 32px;
  padding: 0 12px;
}

.map-travel-filter {
  padding: 12px 16px;
  border-bottom: 1px solid var(--pr-line);
  background: var(--pr-muted-2);
}
.map-travel-filter .pr-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--pr-text-soft);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.map-travel-modes {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}
.map-travel-mode {
  flex: 1;
  padding: 6px;
  border: 1px solid var(--pr-line);
  border-radius: var(--pr-r-sm);
  background: var(--pr-surface);
  font-size: 11px;
  font-weight: 600;
  color: var(--pr-text-soft);
  cursor: pointer;
  text-align: center;
}
.map-travel-mode.active {
  background: var(--pr-green-50);
  color: var(--pr-green-700);
  border-color: var(--pr-green-300);
}
.map-travel-mode:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.map-travel-row {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  align-items: self-end;
}
.map-travel-row .pr-field {
  flex: 1;
  margin-bottom: 0;
}
.map-travel-row .btn-small {
  background: var(--pr-green);
  color: #fff;
  border-radius: var(--pr-r-sm);
  font-weight: 600;
  height: 34px;
  line-height: 34px;
  padding: 0 12px;
}
.map-travel-row .btn-flat {
  font-size: 13px;
  color: var(--pr-text-soft);
}

.map-legend {
  font-size: 11.5px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px;
  background: var(--pr-surface);
  border-bottom: 1px solid var(--pr-line);
  color: var(--pr-text-soft);
}
.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 4px;
}
.legend-dot.apartment {
  background: var(--pr-green);
}
.legend-dot.house {
  background: #16a34a;
}
.legend-dot.plot {
  background: var(--pr-canary);
}
.legend-dot.room {
  background: #8b5cf6;
}
.legend-dot.commercial {
  background: #ec4899;
}

.map-sidebar {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
}
.map-sidebar-empty {
  padding: 20px 0;
  font-size: 13px;
  text-align: center;
  color: var(--pr-text-soft);
}
#map {
  flex: 1;
  overflow: hidden;
}

/* ===== Admin page (admin.html) ===== */
/* ===== Detail page (detail.html) — Zieleń Metra 1:1 mockup port ===== */
.detail-page {
  padding: 0;
  max-width: none;
}
.detail-layout {
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
}
.detail-breadcrumb {
  font-size: 12.5px;
  color: var(--pr-text-soft);
  margin-bottom: 12px;
}
.detail-breadcrumb a {
  color: var(--pr-text-soft);
}
.detail-breadcrumb a:hover {
  color: var(--pr-green);
}
.detail-breadcrumb .sep {
  margin: 0 6px;
  opacity: 0.5;
}
.detail-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 6px;
  border-radius: var(--pr-r-lg);
  overflow: hidden;
  margin-bottom: 24px;
  height: 460px;
}
.detail-gallery-main {
  grid-row: 1 / 3;
  position: relative;
  overflow: hidden;
}
.detail-gallery-main img,
.detail-gallery-main a {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.detail-gallery-thumb {
  overflow: hidden;
  position: relative;
}
.detail-gallery-thumb img,
.detail-gallery-thumb a {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
}
.detail-gallery-more {
  position: absolute;
  inset: 0;
  background: rgba(20, 27, 26, 0.55);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}
.detail-gallery-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(255, 255, 255, 0.94);
  padding: 4px 10px;
  border-radius: var(--pr-r-pill);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(4px);
  z-index: 2;
}
.detail-gallery-hidden {
  display: none;
}
.detail-head {
  margin-bottom: 24px;
}
.detail-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--pr-ink);
  letter-spacing: -0.3px;
  line-height: 1.15;
  margin: 0;
}
.detail-loc {
  font-size: 15px;
  color: var(--pr-text-soft);
  margin-top: 4px;
}
.detail-tags {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.detail-tags a {
  text-decoration: none;
}
.detail-price-block {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  padding: 16px 20px;
  background: var(--pr-surface);
  border: 1px solid var(--pr-line);
  border-radius: var(--pr-r-md);
  box-shadow: var(--pr-shadow-1);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.detail-price-main {
  display: flex;
  flex-direction: column;
}
.detail-price-val {
  font-size: 32px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--pr-ink);
}
.detail-price-per {
  font-size: 15px;
  color: var(--pr-text-soft);
  font-weight: 600;
}
.detail-price-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-left: auto;
}
.detail-price-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.detail-price-stat .l {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--pr-text-soft);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.detail-price-stat .v {
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.detail-price-stat .v.good {
  color: var(--pr-green);
}
.detail-price-stat .v.bad {
  color: var(--pr-red);
}
.detail-price-stat .v.neutral {
  color: var(--pr-ink);
}
.detail-spec-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--pr-line);
  border: 1px solid var(--pr-line);
  border-radius: var(--pr-r-md);
  overflow: hidden;
  margin-bottom: 24px;
}
.detail-spec {
  background: var(--pr-surface);
  padding: 16px;
}
.detail-spec-icon {
  font-size: 20px;
  margin-bottom: 6px;
}
.detail-spec-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--pr-text-soft);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.detail-spec-val {
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.detail-section-h {
  font-size: 19px;
  font-weight: 700;
  color: var(--pr-ink);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.detail-section-h--no-margin {
  margin: 0;
}
.detail-section-h .pr-pill {
  font-size: 10px;
}
.detail-legend-pills {
  display: flex;
  gap: 8px;
}
.detail-section {
  margin-bottom: 24px;
}
.detail-params-details summary {
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: var(--pr-text-soft);
  padding: 12px 0;
  list-style: none;
}
.detail-params-details summary::-webkit-details-marker {
  display: none;
}
.detail-params-details summary::before {
  content: "▶ ";
  font-size: 10px;
  transition: transform 0.2s;
}
.detail-params-details[open] summary::before {
  content: "▼ ";
}
.detail-params-details[open] summary {
  margin-bottom: 12px;
}
.detail-desc {
  background: var(--pr-surface);
  border: 1px solid var(--pr-line);
  border-radius: var(--pr-r-md);
  padding: 24px;
  margin-bottom: 24px;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--pr-ink-700);
}
/* gratka description override, to display full description */
.detail-desc .details-description__content {
  max-height: 100% !important;
}
.detail-price-history {
  margin-bottom: 24px;
}
.detail-chart-card {
  background: var(--pr-surface);
  border: 1px solid var(--pr-line);
  border-radius: var(--pr-r-md);
  padding: 24px;
  margin-bottom: 24px;
}
.price-history-table-wrap {
  overflow-x: auto;
  margin-top: 12px;
}
.price-history-table {
  font-size: 0.85rem;
  width: 100%;
  border-collapse: collapse;
}
.price-history-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--pr-text-soft);
  text-transform: uppercase;
  padding: 8px 12px;
  border-bottom: 1px solid var(--pr-line);
}
.price-history-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--pr-line);
}
.price-history-current-row {
  font-weight: 700;
}
.detail-context-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.detail-context-card {
  background: var(--pr-surface);
  border: 1px solid var(--pr-line);
  border-radius: var(--pr-r-md);
  padding: 16px;
}
.detail-context-icon {
  font-size: 22px;
  margin-bottom: 6px;
}
.detail-context-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--pr-text-soft);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.detail-context-val {
  font-size: 15px;
  font-weight: 700;
  margin-top: 2px;
  color: var(--pr-ink);
}
.detail-context-sub {
  font-size: 12px;
  color: var(--pr-text-soft);
  margin-top: 2px;
}
.detail-minimap {
  background: var(--pr-surface);
  border: 1px solid var(--pr-line);
  border-radius: var(--pr-r-md);
  overflow: hidden;
  margin-bottom: 24px;
}
.detail-minimap-head {
  padding: 16px;
  border-bottom: 1px solid var(--pr-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.detail-map-container {
  min-height: 300px;
  height: 300px;
  border: none;
  position: relative;
  z-index: 0;
}
.detail-map {
  width: 100%;
  height: 100%;
}
/* Keep Leaflet below the sticky navbar (z-index:50) */
.detail-map-container .leaflet-pane {
  z-index: 1;
}
.detail-map-container .leaflet-control {
  z-index: 10;
}
.detail-map-container .leaflet-popup-pane {
  z-index: 15;
}
.detail-map-container .leaflet-tooltip {
  z-index: 15;
}
.detail-param-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.detail-param {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.detail-param-label {
  font-size: 11px;
  color: var(--pr-text-soft);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.detail-param-value {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--pr-ink);
}
.detail-param-value em {
  color: var(--pr-text-soft);
  font-style: normal;
}
.poi-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 4px;
  background: var(--pr-muted-2);
  border-radius: var(--pr-r-sm);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s;
}
.poi-row:hover {
  background: var(--pr-green-50);
}
.poi-row.no-click {
  cursor: default;
}
.poi-row .poi-icon {
  font-size: 1.3rem;
}
.poi-row .poi-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--pr-ink);
}
.poi-row .poi-type {
  text-transform: uppercase;
  font-size: 0.7rem;
  color: var(--pr-text-soft);
  margin-left: auto;
}
.poi-row .poi-walk {
  color: var(--pr-green);
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 600;
}
.poi-route-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid var(--pr-line);
  font-size: 0.8rem;
}
.poi-route-badge {
  background: var(--pr-text-soft);
  color: #fff;
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 0.75rem;
}
.station-routes-collapse {
  margin-left: 32px;
  margin-bottom: 4px;
}
.route-long-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--pr-text-soft);
}
.route-travel {
  white-space: nowrap;
  color: var(--pr-text-soft);
}
.route-frequency {
  white-space: nowrap;
  color: var(--pr-text-soft);
}
.route-departures {
  margin-left: auto;
  font-size: 0.75rem;
  white-space: nowrap;
  color: var(--pr-text-soft);
}
.stations-list,
.schools-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.no-stations {
  padding: 16px 0;
  font-size: 0.85rem;
  color: var(--pr-text-soft);
}
.neighbourhood-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 4px;
}
.neighbourhood-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--pr-green-50);
  border-radius: var(--pr-r-pill);
  padding: 4px 10px;
  font-size: 0.8rem;
}
.neighbourhood-badge-icon {
  font-size: 1.1rem;
}
.neighbourhood-badge-count {
  font-weight: 700;
  color: var(--pr-green-700);
}
.neighbourhood-section-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--pr-text-soft);
  margin: 12px 0 4px;
}
.neighbourhood-unnamed-note {
  padding: 2px 0 4px;
  font-size: 0.75rem;
  color: var(--pr-text-soft);
}
.detail-dupe-group-card {
  margin: 0;
  padding: 12px 16px;
  background: var(--pr-muted-2);
  border-radius: var(--pr-r-md);
  border: 1px solid var(--pr-line);
}
.detail-dupe-group-title {
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--pr-canary-700);
  font-size: 13px;
}
.detail-dupe-group-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.detail-dupe-group-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}
.detail-dupe-group-link {
  color: var(--pr-green);
  text-decoration: underline;
  font-weight: 500;
}
.detail-dupe-group-pm2 {
  font-size: 13px;
  color: var(--pr-text-soft);
}
.detail-no-images {
  padding: 32px 0;
  font-size: 0.9rem;
  color: var(--pr-text-soft);
  text-align: center;
}
.detail-sidebar {
  position: sticky;
  top: 76px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.detail-side-card {
  background: var(--pr-surface);
  border: 1px solid var(--pr-line);
  border-radius: var(--pr-r-md);
  padding: 16px;
  box-shadow: var(--pr-shadow-1);
}
.detail-side-card h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--pr-text-soft);
  margin: 0 0 12px;
}
.detail-action-bar {
  position: static;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.detail-action-bar .pr-btn {
  width: 100%;
  justify-content: center;
}
.detail-action-bar .pr-btn--surface {
  background: var(--pr-surface);
  color: var(--pr-text-soft);
  border: 1px solid var(--pr-line);
  margin-top: 8px;
}
.detail-action-bar .pr-btn--surface:hover {
  background: var(--pr-muted-2);
}
.detail-action-bar .pr-btn--canary {
  background: var(--pr-canary);
  color: var(--pr-ink);
  margin-top: 8px;
  text-decoration: none;
}
.detail-action-bar .pr-btn--canary:hover {
  background: var(--pr-canary-700);
  color: #fff;
}
.detail-note-save {
  background: var(--pr-green);
  width: 100%;
  justify-content: center;
  margin-top: 8px;
}
.detail-note-saved {
  font-size: 0.8rem;
  color: var(--pr-green);
  display: none;
}
.detail-side-score {
  text-align: center;
  padding: 24px 16px;
}
.detail-side-score-val {
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
}
.detail-side-score-pr-pill-green {
  color: var(--pr-heat-1);
}
.detail-side-score-pr-pill-canary {
  color: var(--pr-heat-3);
}
.detail-side-score-pr-pill-red {
  color: var(--pr-heat-5);
}
.detail-side-score-label {
  font-size: 12px;
  color: var(--pr-text-soft);
  margin-top: 6px;
}
.detail-side-score-bar {
  height: 6px;
  background: var(--pr-muted);
  border-radius: var(--pr-r-pill);
  margin-top: 12px;
  overflow: hidden;
}
.detail-side-score-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: var(--pr-r-pill);
}
.detail-side-score-breakdown {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.detail-side-score-row {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
}
.detail-side-score-row .l {
  color: var(--pr-text-soft);
}
.detail-side-score-row .v {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.detail-yield-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--pr-line);
  font-size: 13.5px;
}
.detail-yield-row:last-child {
  border-bottom: none;
}
.detail-yield-row .l {
  color: var(--pr-text-soft);
}
.detail-yield-row .v {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.detail-poi-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--pr-line);
  font-size: 13px;
}
.detail-poi-item:last-child {
  border-bottom: none;
}
.detail-poi-item .emoji {
  font-size: 16px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}
.detail-poi-item .name {
  flex: 1;
  color: var(--pr-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.detail-poi-item .dist {
  font-weight: 700;
  color: var(--pr-text-soft);
  font-variant-numeric: tabular-nums;
}
/* Note popup */
.detail-note-popup {
  position: fixed;
  inset: 0;
  background: rgba(20, 27, 26, 0.4);
  z-index: 100;
  display: none;
  pointer-events: auto;
}
.detail-note-popup.open {
  display: flex;
  align-items: center;
  justify-content: center;
}
.detail-note-popup-card {
  background: var(--pr-surface);
  border: 1px solid var(--pr-line);
  border-radius: var(--pr-r-md);
  padding: 20px;
  width: 360px;
  max-width: 90vw;
  box-shadow: var(--pr-shadow-2);
}
.detail-note-popup-card h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--pr-text-soft);
  margin: 0 0 12px;
}
.detail-note-existing {
  background: var(--pr-muted-2);
  border: 1px solid var(--pr-line);
  border-radius: var(--pr-r-sm);
  padding: 10px 12px;
  font-size: 13px;
  color: var(--pr-ink-700);
  line-height: 1.5;
  margin-bottom: 10px;
  white-space: pre-wrap;
  max-height: 120px;
  overflow-y: auto;
}
.detail-note-popup-card textarea {
  min-height: 80px;
  resize: vertical;
}
.detail-note-save {
  margin-top: 8px;
}
.detail-note-saved {
  font-size: 0.8rem;
}
.detail-placeholder {
  position: relative;
}
.detail-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(241, 243, 241, 0.65);
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
}
.detail-placeholder .v,
.detail-placeholder .detail-context-val {
  color: var(--pr-text-soft);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}
.detail-override-card {
  padding: 16px 20px;
}
.detail-override-hint {
  font-size: 13px;
  color: var(--pr-text-soft);
  margin: 0 0 12px;
}
.detail-override-fields {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--pr-text-soft);
  margin-bottom: 8px;
}
.detail-override-fields b {
  color: var(--pr-ink);
  font-variant-numeric: tabular-nums;
}
.detail-override-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.detail-override-saved {
  font-size: 12px;
  color: var(--pr-green);
  display: none;
}
.detail-override-save {
  background: var(--pr-green);
  color: #fff;
}
.detail-override-reset {
  font-size: 12px;
  color: var(--pr-red);
}
@media (max-width: 1000px) {
  .detail-layout {
    grid-template-columns: 1fr;
    padding: 16px;
  }
  .detail-sidebar {
    position: static;
  }
  .detail-gallery {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    height: auto;
  }
  .detail-gallery-main {
    grid-row: 1;
    grid-column: 1 / 3;
    min-height: 250px;
  }
  .detail-gallery-thumb {
    min-height: 120px;
  }
  .detail-spec-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .detail-context-grid {
    grid-template-columns: 1fr;
  }
}

.admin-tabs-bar {
  margin-bottom: 16px;
}
.admin-settings-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.admin-save-result {
  font-size: 0.85rem;
  margin-bottom: 8px;
}
.admin-settings-layout {
  display: flex;
  min-height: 400px;
}
.admin-subtabs {
  min-width: 160px;
  margin-right: 12px;
}
.admin-subtab-btn {
  display: block;
  text-align: left;
  width: 100%;
}
.admin-settings-content {
  flex: 1;
}
.admin-site-card {
  margin: 0 0 12px;
  border-radius: var(--pr-r-md);
  border: 1px solid var(--pr-line);
  box-shadow: var(--pr-shadow-1);
}
.admin-card-content {
  padding: 16px;
}
.admin-site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.admin-site-name {
  font-weight: 600;
}
.admin-badge-margin {
  margin-left: 8px;
}
.admin-badge-margin-sm {
  margin-left: 4px;
}
.admin-toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.admin-fields-row {
  margin-bottom: 0;
}
.admin-checkbox-col {
  display: flex;
  align-items: center;
  padding-bottom: 8px;
}
.admin-divider {
  border-top: 1px solid #e0e0e0;
  margin: 8px 0;
}
.admin-section-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #757575;
  margin-bottom: 8px;
}
.admin-save-row {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.admin-saved-indicator {
  display: none;
  font-size: 0.85rem;
}
.admin-subtab-hidden {
  display: none;
}
.admin-search-intro {
  font-size: 0.85rem;
  margin-bottom: 12px;
}
.admin-search-config-card {
  margin-bottom: 12px;
}
.admin-search-config-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.admin-sc-display-label {
  width: auto;
  display: inline-block;
  font-weight: 600;
}
.admin-sc-key {
  font-size: 0.85rem;
  margin-left: 8px;
}
.admin-sc-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.admin-add-config-btn {
  border: 1px solid var(--pr-green-300);
  color: var(--pr-green);
}
.admin-poi-section-label {
  font-weight: 600;
}
.admin-poi-subsection-title {
  font-weight: 600;
  margin: 12px 0 4px;
}
.admin-poi-help {
  font-size: 0.85rem;
  margin-bottom: 12px;
}
.admin-poi-fields-row {
  margin-bottom: 8px;
}
.admin-poi-hint {
  font-size: 11px;
}
.admin-poi-divider {
  border-top: 1px solid #e0e0e0;
  margin: 12px 0;
}
.admin-poi-display-title {
  font-weight: 600;
  margin: 4px 0;
}
.admin-notifier-help {
  font-size: 0.85rem;
  margin-bottom: 12px;
}
.admin-general-help {
  font-size: 0.85rem;
  margin-bottom: 12px;
}
.admin-coverage-title {
  font-weight: 600;
}
.admin-coverage-intro {
  font-size: 0.85rem;
  margin-bottom: 12px;
}
.admin-coverage-section {
  margin-bottom: 32px;
}
.admin-coverage-pt-name {
  font-weight: 600;
  text-transform: capitalize;
  margin-bottom: 8px;
}
.admin-coverage-table-wrap {
  overflow-x: auto;
}
.admin-coverage-table {
  font-size: 0.85rem;
  border: 1px solid var(--pr-line);
  border-radius: var(--pr-r-md);
  overflow: hidden;
}
.admin-coverage-table thead {
  background: var(--pr-muted-2);
}
.admin-coverage-th {
  text-align: center;
}
.admin-coverage-label-cell {
  font-weight: 600;
}
.admin-coverage-cell {
  text-align: center;
}
.admin-coverage-bar {
  display: inline-block;
  width: 50px;
  height: 6px;
  background: var(--pr-muted);
  border-radius: 3px;
  overflow: hidden;
  vertical-align: middle;
}
.admin-coverage-bar-fill {
  height: 100%;
  background: var(--pr-green);
  border-radius: 3px;
}
.admin-coverage-pct {
  font-size: 0.85rem;
}
.admin-coverage-sub {
  font-size: 0.85rem;
}
.admin-stats-title {
  font-weight: 600;
}
.admin-stats-intro {
  font-size: 0.85rem;
  margin-bottom: 12px;
}
.admin-empty-state {
  padding: 48px 0;
  font-size: 0.85rem;
}
.admin-stats-chart {
  margin-bottom: 32px;
}
.admin-stats-subtitle {
  font-weight: 600;
  margin-bottom: 8px;
}
.admin-active-inactive {
  margin-bottom: 32px;
}
.admin-active-inactive-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 8px 0;
}
.admin-active-count {
  font-size: 2rem;
  font-weight: 700;
  color: var(--pr-green);
}
.admin-inactive-count {
  font-size: 2rem;
  font-weight: 700;
  color: var(--pr-red);
}
.admin-total-count {
  font-size: 2rem;
  font-weight: 700;
}
.admin-count-label {
  font-size: 0.85rem;
}
.admin-breakdown-table {
  margin-top: 16px;
  max-width: 560px;
}
.admin-breakdown-table td.right,
.admin-breakdown-table th.right {
  text-align: right;
}
.admin-recent-runs {
  margin-bottom: 32px;
}
.admin-recent-runs-wrap {
  overflow-x: auto;
}
.admin-data-table {
  font-size: 0.85rem;
  border: 1px solid var(--pr-line);
  border-radius: var(--pr-r-md);
  overflow: hidden;
}
.admin-data-table thead {
  background: var(--pr-muted-2);
}
.admin-health-title {
  font-weight: 600;
}
.admin-health-intro {
  font-size: 0.85rem;
  margin-bottom: 12px;
}
.admin-health-row {
  margin-bottom: 32px;
}
.admin-health-card-col {
  margin-bottom: 12px;
}
.admin-health-card-col .card {
  border-radius: var(--pr-r-md);
  border: 1px solid var(--pr-line);
  box-shadow: var(--pr-shadow-1);
}
.admin-health-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.admin-health-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.admin-health-site {
  font-weight: 600;
}
.admin-health-runs {
  margin-left: auto;
  font-size: 0.85rem;
}
.admin-health-sparkline-row {
  margin-bottom: 8px;
}
.admin-health-spark-label {
  font-size: 0.85rem;
}
.admin-health-last-run {
  font-size: 0.85rem;
}
.admin-health-error {
  font-size: 0.85rem;
  color: #c62828;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-health-error-cell {
  font-size: 0.85rem;
  color: #c62828;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-health-started-cell {
  font-size: 0.85rem;
}
.badge-cb-tripped {
  background: #fde8e8;
  color: var(--pr-red);
}
.badge-partial-scan {
  background: #fef6dc;
  color: var(--pr-canary-700);
}
.badge-full-scan {
  background: var(--pr-green-50);
  color: var(--pr-green-700);
}
.admin-index-title {
  font-weight: 600;
  margin: 0;
}
.admin-index-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 12px 0 8px;
}
.admin-config-select-field {
  min-width: 320px;
}
.admin-index-section {
  background: var(--pr-surface);
  border: 1px solid var(--pr-line);
  border-radius: var(--pr-r-md);
  padding: 16px 20px;
  margin: 16px 0;
  box-shadow: var(--pr-shadow-1);
}
.admin-run-time {
  font-size: 0.85rem;
  margin-bottom: 8px;
}
.admin-status-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.admin-status-card {
  min-width: 140px;
  background: var(--pr-surface);
  border: 1px solid var(--pr-line);
  border-radius: var(--pr-r-md);
  box-shadow: var(--pr-shadow-1);
}
.admin-status-card-content {
  padding: 12px;
}
.admin-status-site-name {
  font-weight: 600;
  font-size: 0.85rem;
}
.admin-status-meta {
  font-size: 0.85rem;
  margin-top: 4px;
}
.admin-status-error {
  font-size: 0.85rem;
  color: #c62828;
  margin-top: 4px;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-no-run {
  font-size: 0.85rem;
}
.admin-section-subtitle {
  font-weight: 600;
  margin-bottom: 4px;
}
.admin-poi-divider-bottom {
  border-top: 1px solid #e0e0e0;
  margin: 12px 0;
}
.admin-station-fetch-history {
  max-height: 240px;
  margin-bottom: 12px;
  overflow: auto;
}
.admin-history-scroll {
  overflow: auto;
  max-height: 240px;
}
.admin-history-empty {
  padding: 32px 0;
  font-size: 0.85rem;
}
.admin-error-text {
  font-size: 0.85rem;
}
.admin-ok-text {
  font-size: 0.85rem;
}

/* ===== Admin queue display ===== */
.admin-queue-display {
  margin-bottom: 8px;
}
.admin-queue-card {
  background: #f5f5f5;
  margin: 4px 0;
}
.admin-queue-card-content {
  padding: 10px 14px;
}
.admin-queue-current {
  background: #e3f2fd;
}
.admin-queue-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.admin-queue-title {
  font-weight: 600;
  font-size: 0.85rem;
}
.admin-queue-clear-btn {
  font-size: 0.75rem;
  padding: 0 6px;
}
.admin-queue-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.admin-queue-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  background: #fff;
  border-radius: 4px;
}
.admin-queue-item-label {
  font-size: 0.85rem;
}

/* ===== 404 page ===== */
.not-found-empty {
  padding: 48px 0;
}

/* ===== PWA / mobile tweaks ===== */
@media (max-width: 600px) {
  .nav-bar .nav-stats-line {
    display: none;
  }
  .nav-bar .brand-logo {
    font-size: 1.1rem;
  }
  .list-page {
    padding: 0;
  }
  .list-layout {
    grid-template-columns: 1fr;
    padding: 16px;
  }
  .list-filter-rail {
    position: static;
  }
  .list-grid {
    grid-template-columns: 1fr;
  }
  .list-hero {
    padding: 24px 0 16px;
  }
  .list-hero-title {
    font-size: 24px;
  }
  .list-hero-stats {
    gap: 16px;
  }
  .list-hero-stat .v {
    font-size: 18px;
  }
  .list-sortbar {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
  .list-toolbar-right {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }
  .listing-card .card-content {
    padding: 12px;
  }
  .listing-card-title {
    font-size: 13px;
  }
  .listing-card .price {
    font-size: 1.1rem;
  }
  .detail-title {
    font-size: 1.3rem;
    padding-right: 0;
  }
  .detail-action-bar {
    position: static;
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
  }
  .detail-price-row {
    font-size: 1.4rem;
  }
  .detail-map-container {
    height: 300px;
  }
  .admin-fields-row .input-field {
    margin-bottom: 12px;
  }
  .btn,
  .btn-flat,
  .btn-small {
    min-height: 40px;
  }
  .map-sidebar-toolbar .btn-small,
  .map-travel-row .btn-small {
    height: 40px;
    line-height: 40px;
  }
  .poi-row {
    padding: 10px 0;
  }
  .poi-row .poi-name {
    white-space: normal;
  }
  .map-layout {
    flex-direction: column;
    height: auto;
  }
  .map-sidebar-card {
    width: 100%;
    max-height: 40vh;
  }
  #map {
    height: 60vh;
    flex: none;
  }
  .admin-settings-layout {
    flex-direction: column;
  }
  .admin-subtabs {
    display: flex;
    flex-wrap: wrap;
    min-width: 0;
    margin-right: 0;
    margin-bottom: 12px;
  }
  .admin-subtab-btn {
    width: auto;
  }
  .admin-index-toolbar {
    flex-wrap: wrap;
  }
  .admin-config-select-field {
    min-width: 0;
    width: 100%;
  }
  .admin-status-card {
    min-width: 0;
  }
  .admin-status-row {
    gap: 8px;
  }
  .admin-active-inactive-row {
    flex-wrap: wrap;
    gap: 4px 12px;
  }
  .admin-active-count,
  .admin-inactive-count,
  .admin-total-count {
    font-size: 1.5rem;
  }
}

/* ===== Tablet tweaks (601px–992px) ===== */
@media (min-width: 601px) and (max-width: 992px) {
  .map-sidebar-card {
    width: 280px;
  }
  .detail-title {
    padding-right: 0;
  }
  .detail-action-bar {
    position: static;
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
  }
}
/* Saved searches page */
.saved-page-card {
  background: var(--pr-surface);
  border: 1px solid var(--pr-line);
  border-radius: var(--pr-r-md);
  box-shadow: var(--pr-shadow-1);
  margin: 0 0 20px;
}
.saved-page-title {
  font-weight: 700;
  color: var(--pr-ink);
  font-size: 24px;
}
.saved-page-desc {
  color: var(--pr-text-soft);
  font-size: 14px;
}
.saved-filters-collection {
  margin-top: 16px;
}
.saved-filter-item {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.saved-filter-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.saved-filter-link {
  font-weight: 700;
  font-size: 15px;
  color: var(--pr-green);
}
.saved-filter-notify-badge {
  font-size: 11px;
  border-radius: var(--pr-r-pill);
  padding: 3px 8px;
  background: var(--pr-green-50);
  color: var(--pr-green-700);
  font-weight: 700;
}
.saved-filter-meta {
  font-size: 13px;
  color: var(--pr-text-soft);
}
.saved-filter-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.saved-filter-toggle-notify {
  font-size: 12px;
  padding: 0 12px;
  height: 28px;
  line-height: 28px;
  min-height: 28px;
  color: var(--pr-green);
  border: 1px solid var(--pr-green-300);
  border-radius: var(--pr-r-sm);
}
.saved-filter-delete {
  font-size: 12px;
  padding: 0 12px;
  height: 28px;
  line-height: 28px;
  min-height: 28px;
  color: var(--pr-red);
  border: 1px solid var(--pr-line);
  border-radius: var(--pr-r-sm);
}
.saved-filters-empty {
  padding: 40px 0;
  color: var(--pr-text-soft);
}

.admin-geo-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--pr-ink);
  margin: 1rem 0 0.5rem;
}

.admin-geo-intro {
  margin-bottom: 1.5rem;
}

.admin-geo-add-form {
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.admin-geo-table-wrap {
  padding: 0;
  overflow-x: auto;
}

.admin-geo-table {
  width: 100%;
}

.admin-geo-table th {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--pr-text-soft);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--pr-line);
}

.admin-geo-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--pr-line);
}

.admin-geo-actions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.admin-geo-actions .pr-btn-flat {
  font-size: 0.75rem;
  padding: 4px 8px;
}

.admin-geo-section-title {
  margin: 24px 0 8px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--pr-green, #00693e);
}

.admin-log-terminal {
  background: #1a1a2e;
  border-radius: 6px;
  padding: 12px;
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 12px;
  line-height: 1.5;
  overflow-y: auto;
}

.admin-log-terminal .admin-log-pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: #c5c6c7;
}

/* ── Users admin tab ───────────────────────────────────────────── */
.admin-users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.admin-users-table th {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 2px solid var(--pr-border, #ddd);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--pr-text-soft, #6b7280);
}
.admin-users-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--pr-border, #eee);
}
.admin-user-row:hover {
  background: var(--pr-bg-hover, #f5f5f5);
}
.admin-user-email {
  font-weight: 500;
}
.admin-user-actions {
  white-space: nowrap;
}
.admin-user-actions .pr-btn {
  font-size: 12px;
  padding: 4px 12px;
  margin-right: 4px;
}
.admin-pending-banner {
  padding: 8px 12px;
  margin-bottom: 16px;
  background: #fff3cd;
  border-radius: 6px;
  font-weight: 500;
}
