/* ============================================================
   Real Estate Bot — Global Stylesheet
   ============================================================ */

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

:root {
  --color-bg:        #05152F;
  --color-surface:   #1E293B;
  --color-sidebar:   #122440;
  --color-border:    rgba(255, 255, 255, 0.08);
  --color-primary:   #00FFD1;
  --color-primary-h: #00E8BC;
  --color-text:      #F9FAFB;
  --color-muted:     #A1A7B3;
  --color-success:   #34d399;
  --color-danger:    #f87171;

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --radius:    10px;
  --max-width: 1100px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-h); }

img { max-width: 100%; display: block; }

/* ─── Layout ───────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 96px 0; }

/* ─── Navigation ───────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 21, 47, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
}

.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a { color: var(--color-muted); font-size: 0.95rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--color-text); }

/* ─── Buttons ──────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.1s;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--color-primary);
  color: #020B1A;
}
.btn-primary:hover { background: var(--color-primary-h); color: #020B1A; }

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}
.btn-outline:hover { background: var(--color-primary); color: #fff; }

/* ─── Hero ─────────────────────────────────────────────── */
#hero {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  text-align: center;
}

.hero-eyebrow {
  display: inline-block;
  background: rgba(0, 255, 209, 0.15);
  color: var(--color-primary);
  border: 1px solid rgba(0, 255, 209, 0.3);
  border-radius: 100px;
  padding: 4px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.hero-title span { color: var(--color-primary); }

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--color-muted);
  max-width: 560px;
  margin: 0 auto 40px;
}

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

/* ─── How It Works ─────────────────────────────────────── */
#how-it-works { background: var(--color-surface); }

.section-label {
  text-align: center;
  color: var(--color-primary);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-title {
  text-align: center;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.section-subtitle {
  text-align: center;
  color: var(--color-muted);
  max-width: 540px;
  margin: 0 auto 64px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.step-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px 28px;
}

.step-number {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(0, 255, 209, 0.15);
  color: var(--color-primary);
  font-weight: 700;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}

.step-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; }
.step-card p  { color: var(--color-muted); font-size: 0.95rem; }

/* ─── Pricing ──────────────────────────────────────────── */
.pricing-card {
  max-width: 420px;
  margin: 0 auto;
  background: var(--color-surface);
  border: 1.5px solid var(--color-primary);
  border-radius: 16px;
  padding: 48px 40px;
  text-align: center;
}

.pricing-price {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--color-text);
  line-height: 1;
  margin: 16px 0 4px;
}

.pricing-price span { font-size: 1.2rem; vertical-align: top; margin-top: 12px; display: inline-block; }
.pricing-period { color: var(--color-muted); margin-bottom: 32px; }

.pricing-features { list-style: none; text-align: left; margin-bottom: 36px; }
.pricing-features li {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.95rem;
}
.pricing-features li:last-child { border-bottom: none; }
.pricing-features li::before { content: '✓'; color: var(--color-success); font-weight: 700; }

/* ─── CTA ──────────────────────────────────────────────── */
#cta {
  background: var(--color-surface);
  text-align: center;
}

/* ─── Footer ───────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--color-border);
  padding: 24px 0;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.875rem;
}

/* ─── Dashboard Layout ─────────────────────────────────── */
.dashboard-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--color-sidebar);
  border-right: 1px solid var(--color-border);
  padding: 32px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-logo {
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0 12px;
  margin-bottom: 32px;
}

.sidebar-nav { list-style: none; }
.sidebar-nav li a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--color-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.sidebar-nav li a:hover,
.sidebar-nav li a.active {
  background: rgba(0, 255, 209, 0.12);
  color: var(--color-text);
}

.dashboard-main { padding: 40px 48px; overflow-y: auto; }

.dashboard-header { margin-bottom: 40px; }
.dashboard-header h1 { font-size: 1.6rem; font-weight: 700; }
.dashboard-header p  { color: var(--color-muted); margin-top: 4px; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
}
.stat-card .stat-label { color: var(--color-muted); font-size: 0.85rem; margin-bottom: 8px; }
.stat-card .stat-value { font-size: 2rem; font-weight: 700; }

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 28px;
}
.card h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th { text-align: left; color: var(--color-muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--color-border); }
td { padding: 12px 12px; border-bottom: 1px solid var(--color-border); }
tr:last-child td { border-bottom: none; }

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
}
.badge-green  { background: rgba(52, 211, 153, 0.15); color: var(--color-success); }
.badge-yellow { background: rgba(251, 191, 36, 0.15);  color: #fbbf24; }
.badge-red    { background: rgba(248, 113, 113, 0.15); color: var(--color-danger); }

/* ─── Forms ────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 6px; }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  padding: 10px 14px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: var(--color-primary); }

/* ─── Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .dashboard-main { padding: 24px 20px; }
}


/* ============================================================
   ONBOARDING OVERLAY
   ============================================================ */

/* ─── Backdrop ─────────────────────────────────────────── */
.ob-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;   /* slides up from bottom on mobile */
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.ob-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* ─── Panel ────────────────────────────────────────────── */
.ob-panel {
  background: var(--color-surface);
  width: 100%;
  max-width: 560px;
  max-height: 92dvh;          /* dvh handles mobile browser chrome */
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(48px);
  transition: transform 0.3s cubic-bezier(0.34, 1.3, 0.64, 1);
}

.ob-overlay.open .ob-panel {
  transform: translateY(0);
}

/* On desktop: centered card, rounded all sides */
@media (min-width: 600px) {
  .ob-overlay { align-items: center; }
  .ob-panel {
    border-radius: 20px;
    max-height: 88vh;
  }
}

/* ─── Header ───────────────────────────────────────────── */
.ob-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 16px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.ob-logo {
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-text);
}

.ob-step-counter {
  color: var(--color-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.ob-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-muted);
  font-size: 1rem;
  padding: 6px 8px;
  border-radius: 6px;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}
.ob-close-btn:hover {
  background: var(--color-border);
  color: var(--color-text);
}

/* ─── Progress Bar ─────────────────────────────────────── */
.ob-progress-track {
  height: 3px;
  background: var(--color-border);
  flex-shrink: 0;
}
.ob-progress-fill {
  height: 100%;
  background: var(--color-primary);
  width: 20%;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Scrollable Body ──────────────────────────────────── */
.ob-body {
  flex: 1;
  overflow-y: auto;
  padding: 28px 24px 8px;
  -webkit-overflow-scrolling: touch;
}

/* ─── Step Typography ──────────────────────────────────── */
.ob-step-title {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 6px;
}

.ob-step-subtitle {
  color: var(--color-muted);
  font-size: 0.925rem;
  margin-bottom: 22px;
}

/* Trust line (Step 1) */
.ob-trust {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--color-success);
  font-size: 0.83rem;
  font-weight: 600;
  margin-bottom: 22px;
}
.ob-trust::before { content: '⚡'; }

/* ─── Form Hint ────────────────────────────────────────── */
.form-hint {
  display: block;
  margin-top: 6px;
  color: var(--color-muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

/* ─── Listing Source Tabs ──────────────────────────────── */
.ob-tab-row {
  display: flex;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
}

.ob-tab {
  flex: 1;
  padding: 10px 14px;
  background: none;
  border: none;
  color: var(--color-muted);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.ob-tab + .ob-tab { border-left: 1px solid var(--color-border); }
.ob-tab.active {
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
}

/* ─── Voice Grid ───────────────────────────────────────── */
.voice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.voice-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  padding: 12px 12px 12px 10px;
  cursor: pointer;
  position: relative;
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}
.voice-card:hover            { border-color: var(--color-primary); }
.voice-card.selected         {
  border-color: var(--color-primary);
  background: rgba(0, 255, 209, 0.09);
}

.voice-play {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-primary);
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.voice-play:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.voice-card.selected .voice-play { border-color: var(--color-primary); }

.voice-info { flex: 1; min-width: 0; }
.voice-name { font-size: 0.875rem; font-weight: 700; }
.voice-tag  { font-size: 0.72rem; color: var(--color-muted); margin-top: 2px; line-height: 1.3; }

.voice-check {
  position: absolute;
  top: 7px;
  right: 9px;
  font-size: 0.72rem;
  color: var(--color-primary);
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.15s;
}
.voice-card.selected .voice-check { opacity: 1; }

/* ─── Choice Cards (Tone / Goal) ───────────────────────── */
.ob-field-label {
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 10px;
}

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

.choice-card {
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px 8px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}
.choice-card:hover { border-color: var(--color-primary); }
.choice-card.selected {
  border-color: var(--color-primary);
  background: rgba(0, 255, 209, 0.09);
}

.choice-icon  { font-size: 1.5rem; margin-bottom: 7px; }
.choice-label { font-size: 0.83rem; font-weight: 700; }
.choice-desc  { font-size: 0.72rem; color: var(--color-muted); margin-top: 4px; line-height: 1.3; }

/* ─── Summary (Step 5) ─────────────────────────────────── */
.ob-summary {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 4px 16px;
  margin-bottom: 18px;
}

.ob-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.875rem;
}
.ob-summary-row:last-child { border-bottom: none; }
.ob-summary-label { color: var(--color-muted); flex-shrink: 0; }
.ob-summary-value { font-weight: 600; text-align: right; word-break: break-word; }

/* Live notice */
.ob-live-notice {
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: 8px;
  color: var(--color-success);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  padding: 11px 16px;
  margin-bottom: 16px;
}
.ob-live-notice::before { content: '🟢  '; }

/* Checkout button */
.ob-checkout-btn {
  width: 100%;
  padding: 16px;
  font-size: 1rem;
  margin-bottom: 12px;
}
.ob-checkout-btn.loading {
  opacity: 0.65;
  pointer-events: none;
}

.ob-terms {
  text-align: center;
  color: var(--color-muted);
  font-size: 0.8rem;
  margin-bottom: 8px;
  line-height: 1.6;
}
.ob-terms a {
  color: var(--color-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s;
}
.ob-terms a:hover { color: #00FFD1; }

.ob-error {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: var(--color-danger);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.875rem;
  margin-top: 12px;
}

/* ─── Error States ─────────────────────────────────────── */
.form-group input.error,
.form-group textarea.error { border-color: var(--color-danger); }

.form-error {
  color: var(--color-danger);
  font-size: 0.8rem;
  margin-top: 5px;
  display: block;
}

/* ─── Sticky Footer (Continue / Back) ─────────────────── */
/* Fixed to bottom on mobile for large-thumb reachability.
   On desktop it's just a flex row at the bottom of the panel. */
.ob-footer {
  display: flex;
  gap: 12px;
  padding: 14px 22px;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  flex-shrink: 0;
}

.ob-back-btn { flex: 0 0 auto; min-width: 90px; }
.ob-next-btn { flex: 1; }
