/* ============================================================
   DIRECT OFF MARKET — Investor Portal
   investor.css — Production Stylesheet
   ============================================================ */

/* ── CSS Variables ── */
/* Brand palette: DOM logo navy #2d3560, sky blue #4fc3f7, white #ffffff */
:root {
  --bg: #181c2e;
  --surface: #1e2340;
  --surface-2: #252c50;
  --border: rgba(255,255,255,0.09);
  --text: #f0f4ff;
  --text-muted: #8a9bbf;
  --accent: #4fc3f7;       /* sky blue -- DOM logo accent */
  --accent-hover: #7dd4f8;
  --navy: #2d3560;         /* DOM logo navy */
  --navy-dark: #1a1e38;
  --green: #22c55e;
  --red: #ef4444;
  --amber: #f59e0b;
  /* legacy gold alias removed -- use --accent */
  --gold: #4fc3f7;
}

[data-theme="light"] {
  --bg: #f0f4fa;
  --surface: #ffffff;
  --surface-2: #e8edf8;
  --border: rgba(45,53,96,0.1);
  --text: #1a1e38;
  --text-muted: #4a5a80;
  --accent: #1d78c8;
  --accent-hover: #1a6ab5;
  --navy: #2d3560;
  --navy-dark: #1a1e38;
}

/* ── Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Barlow', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Navigation ── */
.investor-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  overflow: hidden;
  background: #1a1e38 !important;
  border-bottom: 1px solid rgba(79,195,247,0.2) !important;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

[data-theme="light"] .investor-nav {
  background: #1a1e38;
}

.nav-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-brand img {
  height: 30px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  display: block;
}

.nav-logo {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.nav-sub {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link.active,
.nav-link:hover {
  color: var(--accent);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.btn-logout {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  transition: color 0.2s;
  font-family: inherit;
}

.btn-logout:hover {
  color: var(--red);
}

/* ── Buttons ── */
.btn-primary {
  /* DOM sky blue button */
  background: var(--accent);
  color: #0f1a2e;
  border: none;
  padding: 12px 28px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  font-family: inherit;
  display: inline-block;
  text-decoration: none;
  text-align: center;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(79,195,247,0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  padding: 10px 24px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
  display: inline-block;
  text-decoration: none;
  text-align: center;
}

.btn-secondary:hover {
  background: rgba(79,195,247,0.1);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  transition: background 0.2s;
}

.btn-ghost:hover {
  background: var(--surface-2);
}

.btn-danger {
  background: var(--red);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
}

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge-available {
  background: rgba(34,197,94,0.15);
  color: var(--green);
  border: 1px solid rgba(34,197,94,0.3);
}

.badge-pending {
  background: rgba(245,158,11,0.15);
  color: var(--amber);
  border: 1px solid rgba(245,158,11,0.3);
}

.badge-sold {
  background: rgba(255,255,255,0.08);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.badge-coming-soon {
  background: rgba(99,102,241,0.15);
  color: #818cf8;
  border: 1px solid rgba(99,102,241,0.3);
}

/* ── Deal Cards ── */
.deal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.deal-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.card-photo {
  height: 200px;
  position: relative;
  overflow: hidden;
}

.card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-photo-sm {
  height: 72px;
  width: 100px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.card-photo-sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.status-badge {
  position: absolute;
  top: 12px;
  right: 12px;
}

.card-content {
  padding: 16px;
}

.card-location {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.card-specs {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.card-price {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
}

.list-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
  cursor: pointer;
  transition: background 0.2s;
}

.list-card:hover {
  background: var(--surface-2);
}

.card-arrow {
  color: var(--text-muted);
  font-size: 18px;
  margin-left: auto;
}

/* ── Tab System ── */
.tab-bar {
  display: flex;
  border-bottom: 2px solid var(--border);
  gap: 0;
  padding: 0;
}

.tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  font-family: inherit;
}

.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-btn:hover {
  color: var(--text);
}

/* ── Pro Forma ── */
.pro-forma-input {
  background: #dbeafe;
  border: 1px solid rgba(59,130,246,0.3);
  color: #1e3a5f;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 15px;
  width: 100%;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

[data-theme="light"] .pro-forma-input {
  background: #eff6ff;
  color: #1e3a5f;
}

.pro-forma-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.pro-forma-label {
  font-size: 14px;
  color: var(--text-muted);
}

.pro-forma-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.pro-forma-section {
  background: var(--surface);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

.pro-forma-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.metric-card {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 16px;
}

.metric-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.metric-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
}

.metric-value.positive {
  color: var(--green);
}

.metric-value.negative {
  color: var(--red);
}

/* ── Forms ── */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}

.form-input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 15px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79,195,247,0.15);
}

.form-input::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.form-select {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 15px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79,195,247,0.15);
}

.form-error {
  color: var(--red);
  font-size: 13px;
  margin-top: 6px;
}

.error-box {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--red);
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
}

.error-box.visible {
  display: block;
}

/* ── Theme Toggle ── */
.theme-toggle {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: border-color 0.2s, background 0.2s;
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--accent);
  background: rgba(79,195,247,0.1);
}

/* ── Auth Page ── */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo-text {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.auth-logo-sub {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-top: 4px;
}

.auth-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

/* ── Step Indicator ── */
.step-indicator {
  display: flex;
  gap: 0;
  margin-bottom: 32px;
  justify-content: center;
  align-items: center;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.step.active .step-num {
  background: var(--accent);
  color: #0f1a2e;
  border-color: var(--accent);
}

.step.complete .step-num {
  background: var(--green);
  color: white;
  border-color: var(--green);
}

.step-label {
  font-size: 12px;
  color: var(--text-muted);
}

.step.active .step-label {
  color: var(--text);
}

.step-connector {
  width: 40px;
  height: 2px;
  background: var(--border);
  margin: 0 4px;
  flex-shrink: 0;
}

.step.complete + .step-connector {
  background: var(--green);
}

/* ── Hero Section ── */
.hero {
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0a1220 0%, #0f1a2e 50%, #1a2744 100%);
}

[data-theme="light"] .hero {
  background: linear-gradient(135deg, #1a2744, #1e2d52);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  padding: 40px 24px;
}

.hero-tag {
  display: inline-block;
  background: rgba(79,195,247,0.15);
  color: var(--accent);
  border: 1px solid rgba(79,195,247,0.3);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(32px, 5.5vw, 64px);
  font-weight: 800;
  color: white;
  line-height: 1.1;
  margin-bottom: 20px;
  max-width: 800px;
  white-space: nowrap;
}

.hero-sub {
  font-size: 18px;
  color: rgba(232,237,245,0.75);
  margin-bottom: 40px;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-fine {
  font-size: 13px;
  color: rgba(232,237,245,0.45);
  margin-top: 20px;
}

/* ── Footer ── */
.site-footer {
  background: #080f1e;
  border-top: 1px solid var(--border);
  padding: 60px 24px 32px;
}

[data-theme="light"] .site-footer {
  background: #1a2744;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-logo {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
}

.footer-tagline {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.6;
}

[data-theme="light"] .footer-tagline {
  color: rgba(232,237,245,0.6);
}

.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

[data-theme="light"] .footer-col h4 {
  color: rgba(232,237,245,0.5);
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 8px;
  transition: color 0.2s;
}

[data-theme="light"] .footer-col a {
  color: rgba(232,237,245,0.65);
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-legal {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 600px;
}

[data-theme="light"] .footer-legal {
  color: rgba(232,237,245,0.5);
}

.equal-housing {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

[data-theme="light"] .equal-housing {
  color: rgba(232,237,245,0.5);
}

.eh-icon {
  width: 32px;
  height: 32px;
  background: var(--surface-2);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

/* ── Marketplace Layout ── */
.marketplace-layout {
  display: flex;
  height: calc(100vh - 64px);
  margin-top: 64px;
  overflow: hidden;
}

.marketplace-map {
  flex: 1;
  position: relative;
}

.marketplace-panel {
  width: 400px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-left: 1px solid var(--border);
  overflow: hidden;
}

.panel-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.filter-pill {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  font-family: inherit;
}

.filter-pill.active {
  background: var(--accent);
  color: #0f1a2e;
  border-color: var(--accent);
}

.filter-pill:hover:not(.active) {
  border-color: var(--accent);
  color: var(--accent);
}

.panel-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#listingCount {
  font-size: 13px;
  color: var(--text-muted);
}

.view-toggle {
  display: flex;
  gap: 4px;
}

.view-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.view-btn.active {
  background: var(--accent);
  color: #0f1a2e;
  border-color: var(--accent);
}

.listings-panel {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.listings-panel::-webkit-scrollbar {
  width: 6px;
}

.listings-panel::-webkit-scrollbar-track {
  background: transparent;
}

.listings-panel::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.map-controls {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.map-style-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
  font-family: inherit;
}

.map-style-btn.active,
.map-style-btn:hover {
  background: var(--accent);
  color: #0f1a2e;
}

.map-legend {
  position: absolute;
  bottom: 32px;
  left: 12px;
  z-index: 10;
  background: rgba(15,26,46,0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
}

.legend-dot.orange {
  background: #f97316;
}

.legend-dot.red {
  background: var(--red);
}

.legend-dot.purple {
  background: #8b5cf6;
}

.map-reset-btn,
.map-flood-btn {
  position: absolute;
  bottom: 32px;
  z-index: 10;
  background: rgba(15,26,46,0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  transition: background 0.2s;
}

.map-reset-btn {
  right: 12px;
}

.map-flood-btn {
  right: 90px;
}

.map-popup {
  min-width: 180px;
}

.popup-address {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

.popup-price {
  color: var(--accent);
  font-size: 16px;
  font-weight: 800;
}

.popup-link {
  display: block;
  margin-top: 8px;
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
}

.popup-link:hover {
  text-decoration: underline;
}

/* ── Deal Page ── */
.deal-header {
  position: sticky;
  top: 64px;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.deal-back {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

.deal-back:hover {
  color: var(--accent);
}

.deal-title-block {
  flex: 1;
}

.deal-address {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.deal-actions {
  display: flex;
  gap: 12px;
}

.deal-photo-hero {
  height: 420px;
  overflow: hidden;
  position: relative;
  background: var(--surface-2);
}

.deal-photo-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stats-bar {
  display: flex;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0;
}

.stat-item {
  flex: 1;
  padding: 16px 20px;
  text-align: center;
  border-right: 1px solid var(--border);
}

.stat-item:last-child {
  border-right: none;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.stat-value.accent {
  color: var(--accent);
}

.deal-body {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px;
}

.deal-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
}

.interest-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
}

.interest-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.interest-noted {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-weight: 600;
}

.open-house-banner {
  background: linear-gradient(135deg, rgba(79,195,247,0.15), rgba(79,195,247,0.08));
  border: 1px solid rgba(79,195,247,0.3);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 24px;
  font-size: 15px;
  color: var(--text);
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}

.photos-grid img {
  width: 100%;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.photos-grid img:hover {
  opacity: 0.85;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

.comps-table {
  width: 100%;
  border-collapse: collapse;
}

.comps-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  border-bottom: 2px solid var(--border);
}

.comps-table td {
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

/* ── Offer / Stepper ── */
.stepper-page {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 24px;
}

.stepper-header {
  margin-bottom: 32px;
}

.stepper-step {
  display: none;
}

.stepper-step.active {
  display: block;
}

.offer-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
}

.offer-disclaimer {
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: 10px;
  padding: 16px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Dashboard ── */
.dashboard-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 24px;
}

.buybox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.coming-soon-tab {
  text-align: center;
  padding: 80px 24px;
}

.coming-soon-tab p {
  color: var(--text-muted);
  font-size: 15px;
}

/* ── Terms / Agreement ── */
.terms-container {
  max-height: 60vh;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
  background: var(--surface-2);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.terms-container::-webkit-scrollbar {
  width: 6px;
}

.terms-container::-webkit-scrollbar-track {
  background: transparent;
}

.terms-container::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.terms-section {
  margin-bottom: 28px;
}

.terms-section h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.terms-section p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 12px;
}

.terms-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 12px;
  padding: 10px;
  background: var(--surface);
  border-radius: 6px;
}

.terms-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.terms-check label {
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}

.sign-row {
  display: flex;
  gap: 16px;
  margin-top: 20px;
}

.sign-field {
  flex: 1;
}

.date-display {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 15px;
  color: var(--text-muted);
}

/* ── Misc / Utilities ── */
.page-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px;
}

.section-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.section-sub {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.value-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
}

.value-icon {
  font-size: 32px;
  margin-bottom: 16px;
}

.value-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.value-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.steps-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.step-card {
  text-align: center;
  padding: 24px;
}

.step-num-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #0f1a2e;
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.step-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.step-desc {
  font-size: 13px;
  color: var(--text-muted);
}

.video-placeholder {
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  max-width: 640px;
  margin: 0 auto;
}

.play-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--text-muted);
}

.cta-section {
  background: linear-gradient(135deg, #1a2744, #0f1a2e);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 80px 24px;
  text-align: center;
}

.featured-strip {
  padding: 80px 24px;
  background: var(--bg);
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.mini-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s;
}

.mini-card:hover {
  transform: translateY(-3px);
}

.mini-photo {
  height: 160px;
  position: relative;
}

.mini-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-content {
  padding: 16px;
}

.mini-location {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.mini-specs {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.mini-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
}

.mini-link {
  display: block;
  margin-top: 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.loading-state {
  text-align: center;
  padding: 60px;
  color: var(--text-muted);
}

.empty-state {
  text-align: center;
  padding: 60px 24px;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state p {
  color: var(--text-muted);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.index-loading {
  position: fixed;
  inset: 0;
  background: #0f1a2e;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.index-loading p {
  color: var(--text-muted);
  font-size: 14px;
}

/* ── Mapbox Overrides ── */
.mapboxgl-popup-content {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  padding: 16px !important;
  color: var(--text) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4) !important;
}

.mapboxgl-popup-close-button {
  color: var(--text-muted) !important;
}

.mapboxgl-ctrl-group {
  background: var(--surface) !important;
  border-color: var(--border) !important;
}

.mapboxgl-ctrl button {
  background-color: transparent !important;
}

/* ── Utility Classes ── */
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

.text-accent  { color: var(--accent); }
.text-green { color: var(--green); }
.text-red   { color: var(--red); }
.text-muted { color: var(--text-muted); }
.font-bold  { font-weight: 700; }
.text-sm    { font-size: 14px; }
.text-xs    { font-size: 12px; }
.w-full     { width: 100%; }
.flex       { display: flex; }
.items-center { align-items: center; }
.gap-8      { gap: 8px; }
.gap-16     { gap: 16px; }
.justify-between { justify-content: space-between; }

/* ── Responsive: 768px ── */
@media (max-width: 768px) {
  .investor-nav {
    padding: 0 16px;
  }

  .nav-sub {
    display: none;
  }

  .hero h1 {
    font-size: 22px;
    white-space: normal;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .marketplace-layout {
    flex-direction: column;
  }

  .marketplace-map {
    height: 40vh;
  }

  .marketplace-panel {
    width: 100%;
    height: 60vh;
  }

  .deal-grid {
    grid-template-columns: 1fr;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .stats-bar {
    flex-wrap: wrap;
  }

  .stat-item {
    width: 50%;
  }

  .steps-row {
    grid-template-columns: 1fr 1fr;
  }

  .featured-grid {
    grid-template-columns: 1fr 1fr;
  }

  .buybox-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Responsive: 480px ── */
@media (max-width: 480px) {
  .featured-grid {
    grid-template-columns: 1fr;
  }

  .footer-top {
    grid-template-columns: 1fr;
  }

  .steps-row {
    grid-template-columns: 1fr;
  }

  .auth-card {
    padding: 28px 20px;
  }

  .stats-bar .stat-item {
    width: 100%;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .deal-header {
    flex-wrap: wrap;
  }
}
