body {
  background: var(--ink);
  /* Dark app shell — rebind the light-theme tokens (same set as .mock-window),
     else headings/values inherit near-black-on-near-black and vanish. */
  color: #e8e5df;
  --fg: #e8e5df;
  --fg-muted: rgba(232, 229, 223, 0.65);
  --fg-dim: rgba(232, 229, 223, 0.4);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
}

/* Ghost buttons default to ink-on-paper — rebind for the dark shell. */
.btn-ghost {
  color: var(--fg);
  border-color: var(--line-strong);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--fg);
}

.app-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.app-side {
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
  padding: 18px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--fg-muted);
  font-size: 13.5px;
  cursor: pointer;
  text-decoration: none;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--fg);
}
.nav-item.active {
  background: rgba(var(--coral-rgb), 0.12);
  color: var(--coral-2);
}
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.crumbs {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--fg-muted);
}
.crumbs .sep {
  color: var(--fg-dim);
}
.app-body {
  padding: 28px;
}
.panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
}
.panel h4 {
  font-size: 12px;
  color: var(--fg-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 14px;
  font-weight: 500;
}
.unit-row {
  display: grid;
  grid-template-columns: 60px 1fr 1fr 110px 100px 100px 80px;
  gap: 12px;
  align-items: center;
  padding: 14px 8px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.1s ease;
}
.unit-row:hover {
  background: rgba(255, 255, 255, 0.02);
}
.unit-row .unit-num {
  font-family: "Instrument Serif", serif;
  font-size: 22px;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
  margin-right: 6px;
}
.map-cell {
  aspect-ratio: 1;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-family: "JetBrains Mono", monospace;
  cursor: pointer;
  transition: transform 0.1s ease;
}
.map-cell:hover {
  transform: scale(1.06);
}
.map-cell.occ {
  background: rgba(var(--lime-rgb), 0.18);
  color: var(--lime);
  border: 1px solid rgba(var(--lime-rgb), 0.3);
}
.map-cell.late {
  background: rgba(var(--violet-rgb), 0.18);
  color: #ffd8c2;
  border: 1px solid rgba(var(--violet-rgb), 0.3);
}
.map-cell.vac {
  background: rgba(255, 255, 255, 0.04);
  color: var(--fg-dim);
  border: 1px solid var(--line);
}
.map-cell.notice {
  background: rgba(var(--coral-rgb), 0.18);
  color: var(--coral-2);
  border: 1px solid rgba(var(--coral-rgb), 0.3);
}
.map-cell.maint {
  background: rgba(var(--violet-rgb), 0.18);
  color: #b19eff;
  border: 1px solid rgba(var(--violet-rgb), 0.3);
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .app-side {
    display: none;
  }
  /* The 7-column unit rows and 12-column unit map scroll inside their
     panel instead of blowing the page out. */
  .panel {
    overflow-x: auto;
  }
  .rpd-unit-head,
  .unit-row {
    min-width: 620px;
  }
  .rpd-unit-map {
    min-width: 480px;
  }
}

/* ---------- Rental property detail — extracted inline styles ---------- */

.rpd-brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  text-decoration: none;
}
.rpd-brand-mark {
  width: 28px;
  height: 28px;
  display: block;
}
.rpd-brand-name {
  font-size: 13px;
  font-weight: 600;
}
.rpd-brand-sub {
  font-size: 11px;
  color: var(--fg-dim);
}
.rpd-demo-badge {
  margin-top: 10px;
  padding: 6px 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  font-size: 11px;
  color: var(--fg-muted);
}
.rpd-nav-group {
  margin-top: 24px;
}
.rpd-nav-label {
  margin-top: 18px;
  font-size: 10px;
  color: var(--fg-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-left: 8px;
}
.rpd-property-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 6px;
}
.rpd-property-item {
  font-size: 12px;
}
.rpd-swatch-violet {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--violet);
}
.rpd-swatch-coral {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--coral);
}
.rpd-property-count {
  margin-left: auto;
  font-size: 10px;
}
.rpd-property-count-dim {
  margin-left: auto;
  font-size: 10px;
  color: var(--fg-dim);
}
.rpd-crumb-link {
  color: var(--fg-muted);
  text-decoration: none;
}
.rpd-crumb-current {
  color: var(--fg);
}
.rpd-toolbar-actions {
  display: flex;
  gap: 8px;
}
.rpd-header-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 20px;
  align-items: stretch;
}
.rpd-visual-panel {
  padding: 0;
  overflow: hidden;
}
.rpd-building-visual {
  height: 260px;
  background:
    radial-gradient(600px 400px at 20% 70%, rgba(var(--coral-rgb), 0.25), transparent 60%),
    radial-gradient(600px 400px at 80% 30%, rgba(var(--violet-rgb), 0.2), transparent 60%), #0e0e10;
  position: relative;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.rpd-building-svg {
  position: absolute;
  bottom: 0;
  right: 0;
  height: 80%;
}
.rpd-visual-caption {
  position: relative;
}
.rpd-visual-title {
  font-size: 42px;
  line-height: 1;
  margin-top: 14px;
  letter-spacing: -0.02em;
}
.rpd-visual-address {
  color: var(--fg-muted);
  margin-top: 6px;
  font-size: 14px;
}
.rpd-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.rpd-kpi-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.rpd-kpi-label {
  font-size: 11px;
  color: var(--fg-dim);
}
.rpd-kpi-value {
  font-family: "Instrument Serif", serif;
  font-size: 28px;
  margin-top: 6px;
}
.rpd-meta-list {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}
.rpd-meta-row {
  display: flex;
  justify-content: space-between;
}
.rpd-panel-gap {
  margin-top: 16px;
}
.rpd-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.rpd-panel-head-mb {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.rpd-h4-flush {
  margin: 0;
}
.rpd-legend {
  display: flex;
  gap: 14px;
  font-size: 11px;
  color: var(--fg-muted);
  flex-wrap: wrap;
}
.rpd-dot-lime {
  background: var(--lime);
}
.rpd-dot-violet {
  background: var(--violet);
}
.rpd-dot-coral {
  background: var(--coral);
}
.rpd-dot-dim {
  background: var(--fg-dim);
}
.rpd-unit-map {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 6px;
  margin-top: 18px;
}
.rpd-filter-actions {
  display: flex;
  gap: 6px;
}
.rpd-unit-head {
  font-size: 10px;
  color: var(--fg-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  display: grid;
  grid-template-columns: 60px 1fr 1fr 110px 100px 100px 80px;
  gap: 12px;
  padding: 8px;
}
.rpd-unit-sub {
  font-size: 11px;
  color: var(--fg-muted);
}
.rpd-tag-maint {
  background: rgba(var(--violet-rgb), 0.1);
  color: #b19eff;
  border-color: rgba(var(--violet-rgb), 0.2);
}
.rpd-tag-late {
  background: rgba(var(--violet-rgb), 0.1);
  color: #ffd8c2;
  border-color: rgba(var(--violet-rgb), 0.2);
}
.rpd-tag-notice {
  background: rgba(var(--coral-rgb), 0.1);
  color: var(--coral-2);
  border-color: rgba(var(--coral-rgb), 0.2);
}
.rpd-tag-vacant {
  background: rgba(255, 255, 255, 0.04);
  color: var(--fg-muted);
}
.rpd-due-late {
  color: var(--violet);
}
.rpd-unit-action {
  text-align: right;
}
.rpd-footer-note {
  text-align: center;
  margin: 40px 0 20px;
  font-size: 12px;
  color: var(--fg-dim);
}

/* Late override — must sit after the base .rpd-header-grid rule above,
   or the base two-column value wins on mobile (same specificity). */
@media (max-width: 900px) {
  .rpd-header-grid {
    grid-template-columns: 1fr;
  }
}

/* Grid items default to min-width:auto — the 620px unit rows would otherwise
   set the page's minimum width instead of scrolling inside their panel. */
.app-shell > * {
  min-width: 0;
}

@media (max-width: 900px) {
  .top-bar {
    flex-wrap: wrap;
    gap: 10px;
  }
}
