/* ═══════════════════════════════════════════════════════════
   BROKERYIELD — Global Styles
   Brand: Navy #1A3B5D | Accent Blue #3D8BFF | Gold #F2B544
   ═══════════════════════════════════════════════════════════ */

:root {
  --navy:      #1A3B5D;
  --navy-dark: #0F2440;
  --blue:      #3D8BFF;
  --blue-light:#EBF4FF;
  --gold:      #F2B544;
  --gold-light:#FFF8E7;
  --green:     #22C55E;
  --red:       #EF4444;
  --gray-50:   #F8FAFC;
  --gray-100:  #F1F5F9;
  --gray-200:  #E2E8F0;
  --gray-300:  #CBD5E1;
  --gray-500:  #64748B;
  --gray-700:  #334155;
  --gray-900:  #0F172A;
  --white:     #FFFFFF;

  --font:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius:    8px;
  --radius-lg: 14px;
  --shadow:    0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12), 0 4px 10px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--gray-900); background: var(--white); line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Typography ── */
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; line-height: 1.15; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; line-height: 1.25; }
h3 { font-size: 1.2rem; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 600; }
p  { color: var(--gray-700); }

/* ── Layout ── */
.container  { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.section    { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.flex       { display: flex; }
.flex-col   { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-4      { gap: 16px; }
.gap-8      { gap: 32px; }
.grid-2     { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3     { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4     { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hide-mobile { display: none !important; }
}

/* ── Nav ── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; max-width: 1140px; margin: 0 auto;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.3rem; font-weight: 800; color: var(--navy); text-decoration: none;
}
.nav-logo:hover { text-decoration: none; }
.logo-icon {
  width: 34px; height: 34px; background: var(--navy);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
}
.logo-icon svg { width: 20px; height: 20px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 0.9rem; font-weight: 500; color: var(--gray-700); }
.nav-links a:hover { color: var(--navy); text-decoration: none; }
.nav-cta { display: flex; align-items: center; gap: 10px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: var(--radius);
  font-size: 0.9rem; font-weight: 600; cursor: pointer;
  border: none; transition: all 0.15s ease; text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-blue { background: var(--blue); color: var(--white); }
.btn-blue:hover { background: #2d7aee; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: #e0a63a; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--navy); border: 1.5px solid var(--gray-300); }
.btn-outline:hover { border-color: var(--navy); background: var(--gray-50); }
.btn-ghost { background: transparent; color: var(--gray-700); }
.btn-ghost:hover { background: var(--gray-100); }
.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-sm { padding: 7px 16px; font-size: 0.82rem; }

/* ── Cards ── */
.card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow);
  transition: box-shadow 0.15s ease;
}
.card:hover { box-shadow: var(--shadow-md); }

/* ── BY Score Badge ── */
.by-score {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 12px;
  font-size: 1.25rem; font-weight: 800; color: var(--white);
  flex-shrink: 0;
}
.by-score.high   { background: linear-gradient(135deg, #059669, #10B981); }
.by-score.medium { background: linear-gradient(135deg, #D97706, #F59E0B); }
.by-score.low    { background: linear-gradient(135deg, #DC2626, #EF4444); }
.by-score.sm     { width: 38px; height: 38px; font-size: 0.95rem; border-radius: 8px; }

/* ── Confidence Badge ── */
.confidence-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px; font-size: 0.72rem; font-weight: 600;
}
.conf-3 { background: #D1FAE5; color: #065F46; }
.conf-2 { background: #DBEAFE; color: #1E40AF; }
.conf-1 { background: #F3F4F6; color: #374151; }

/* ── Forms ── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.form-group label { font-size: 0.85rem; font-weight: 600; color: var(--gray-700); }
.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 14px; border: 1.5px solid var(--gray-300); border-radius: var(--radius);
  font-size: 0.9rem; font-family: var(--font); color: var(--gray-900);
  transition: border-color 0.15s;
  background: var(--white);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(61,139,255,0.1);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

/* ── Tables ── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--gray-200); }
table { width: 100%; border-collapse: collapse; }
thead { background: var(--navy); color: var(--white); }
thead th { padding: 12px 16px; font-size: 0.82rem; font-weight: 600; text-align: left; }
tbody tr { border-bottom: 1px solid var(--gray-100); transition: background 0.1s; }
tbody tr:hover { background: var(--gray-50); }
tbody td { padding: 12px 16px; font-size: 0.88rem; color: var(--gray-700); vertical-align: middle; }
.rank-num { font-size: 1rem; font-weight: 800; color: var(--navy); }

/* ── Pills / Tags ── */
.pill {
  display: inline-block; padding: 4px 12px; border-radius: 20px;
  font-size: 0.78rem; font-weight: 600;
}
.pill-navy  { background: var(--navy); color: var(--white); }
.pill-blue  { background: var(--blue-light); color: var(--blue); }
.pill-gold  { background: var(--gold-light); color: #92640a; }
.pill-green { background: #D1FAE5; color: #065F46; }

/* ── Alerts ── */
.alert {
  padding: 14px 18px; border-radius: var(--radius);
  font-size: 0.88rem; margin-bottom: 16px;
  display: flex; align-items: flex-start; gap: 10px;
}
.alert-blue   { background: var(--blue-light); border-left: 4px solid var(--blue); color: #1e40af; }
.alert-green  { background: #D1FAE5; border-left: 4px solid var(--green); color: #065F46; }
.alert-gold   { background: var(--gold-light); border-left: 4px solid var(--gold); color: #92640a; }

/* ── Footer ── */
.footer { background: var(--navy-dark); color: rgba(255,255,255,0.7); padding: 48px 0 24px; }
.footer h4 { color: var(--white); margin-bottom: 12px; }
.footer a { color: rgba(255,255,255,0.6); font-size: 0.88rem; display: block; margin-bottom: 8px; }
.footer a:hover { color: var(--white); text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 40px; padding-top: 24px; font-size: 0.82rem; }
.footer-logo { color: var(--white); font-size: 1.1rem; font-weight: 800; margin-bottom: 8px; }

/* ── Stat Cards ── */
.stat-card { text-align: center; padding: 28px 20px; }
.stat-card .stat-num { font-size: 2.4rem; font-weight: 800; color: var(--navy); }
.stat-card .stat-label { font-size: 0.85rem; color: var(--gray-500); margin-top: 4px; }

/* ── Section Headers ── */
.section-header { text-align: center; margin-bottom: 48px; }
.section-header .tag { display: inline-block; padding: 6px 14px; background: var(--blue-light); color: var(--blue); border-radius: 20px; font-size: 0.8rem; font-weight: 600; margin-bottom: 14px; }
.section-header h2 { margin-bottom: 12px; }
.section-header p { font-size: 1.05rem; color: var(--gray-500); max-width: 580px; margin: 0 auto; }

/* ── Property Card (platform list view) ── */
.prop-card {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 16px; border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  background: var(--white); transition: all 0.15s ease; cursor: pointer;
}
.prop-card:hover { border-color: var(--blue); box-shadow: var(--shadow-md); }
.prop-card.active { border-color: var(--blue); background: var(--blue-light); }
.prop-info { flex: 1; min-width: 0; }
.prop-address { font-size: 0.92rem; font-weight: 700; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prop-sub { font-size: 0.78rem; color: var(--gray-500); margin-top: 2px; }
.prop-metrics { display: flex; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.prop-metric { font-size: 0.76rem; color: var(--gray-600); }
.prop-metric span { font-weight: 700; color: var(--gray-900); }

/* ── Sidebar ── */
.platform-layout { display: grid; grid-template-columns: 380px 1fr; height: calc(100vh - 64px); }
.sidebar { overflow-y: auto; border-right: 1px solid var(--gray-200); background: var(--gray-50); }
.sidebar-header { padding: 18px 16px 12px; background: var(--white); border-bottom: 1px solid var(--gray-200); position: sticky; top: 0; z-index: 10; }
.map-area { position: relative; }
@media (max-width: 900px) { .platform-layout { grid-template-columns: 1fr; } .map-area { height: 50vh; } }

/* ── Map popup ── */
.leaflet-popup-content-wrapper { border-radius: var(--radius-lg) !important; border: none !important; box-shadow: var(--shadow-lg) !important; }
.leaflet-popup-content { margin: 0 !important; }
.map-popup { padding: 16px; min-width: 220px; }
.map-popup h4 { font-size: 0.9rem; color: var(--navy); margin-bottom: 4px; }
.map-popup p  { font-size: 0.8rem; margin-bottom: 10px; }
.map-score-row { display: flex; align-items: center; gap: 10px; }

/* ── Progress bar ── */
.score-bar { height: 6px; background: var(--gray-200); border-radius: 3px; overflow: hidden; margin-top: 4px; }
.score-bar-fill { height: 100%; border-radius: 3px; transition: width 0.6s ease; }

/* ── Tab nav ── */
.tab-nav { display: flex; border-bottom: 2px solid var(--gray-200); margin-bottom: 24px; }
.tab-btn { padding: 10px 20px; font-size: 0.9rem; font-weight: 600; color: var(--gray-500); border: none; background: none; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.15s; }
.tab-btn.active { color: var(--navy); border-bottom-color: var(--navy); }
.tab-btn:hover { color: var(--navy); }

/* ── Step indicator ── */
.steps { display: flex; align-items: center; gap: 0; margin-bottom: 32px; }
.step { display: flex; align-items: center; gap: 8px; flex: 1; }
.step-num { width: 32px; height: 32px; border-radius: 50%; background: var(--gray-200); color: var(--gray-500); display: flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 700; flex-shrink: 0; }
.step.active .step-num { background: var(--navy); color: var(--white); }
.step.done .step-num { background: var(--green); color: var(--white); }
.step-label { font-size: 0.8rem; font-weight: 600; color: var(--gray-500); }
.step.active .step-label { color: var(--navy); }
.step-line { flex: 1; height: 2px; background: var(--gray-200); margin: 0 8px; }

/* ── Pricing ── */
.pricing-card { border: 2px solid var(--gray-200); border-radius: var(--radius-lg); padding: 32px; background: var(--white); }
.pricing-card.featured { border-color: var(--blue); background: var(--blue-light); }
.pricing-card .price { font-size: 2.8rem; font-weight: 800; color: var(--navy); }
.pricing-card .price sup { font-size: 1.2rem; vertical-align: super; }
.pricing-card .price-note { font-size: 0.82rem; color: var(--gray-500); }
.pricing-card .feature-list { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.pricing-card .feature-list li { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; color: var(--gray-700); list-style: none; }
.check-icon { color: var(--green); font-weight: 700; }

/* ── Hero gradient ── */
.hero { background: linear-gradient(135deg, var(--navy) 0%, #1e4d7b 50%, #0F2440 100%); color: var(--white); padding: 100px 0 80px; }
.hero h1 { color: var(--white); }
.hero p   { color: rgba(255,255,255,0.8); }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2); border-radius: 20px; padding: 6px 14px; font-size: 0.8rem; font-weight: 600; margin-bottom: 20px; color: rgba(255,255,255,0.9); }
.hero-metrics { display: flex; gap: 32px; margin-top: 40px; padding-top: 32px; border-top: 1px solid rgba(255,255,255,0.15); flex-wrap: wrap; }
.hero-metric .num { font-size: 1.8rem; font-weight: 800; color: var(--gold); }
.hero-metric .lbl { font-size: 0.82rem; color: rgba(255,255,255,0.6); margin-top: 2px; }

/* ── Feature icon ── */
.feature-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--blue-light); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.feature-icon svg { width: 24px; height: 24px; color: var(--blue); }

/* ── Utility ── */
.text-center { text-align: center; }
.text-navy   { color: var(--navy); }
.text-blue   { color: var(--blue); }
.text-gold   { color: var(--gold); }
.text-gray   { color: var(--gray-500); }
.font-bold   { font-weight: 700; }
.mt-4  { margin-top: 16px; }
.mt-8  { margin-top: 32px; }
.mb-4  { margin-bottom: 16px; }
.mb-8  { margin-bottom: 32px; }
.w-full { width: 100%; }
.hidden { display: none; }

/* ── Map marker custom ── */
.by-marker {
  background: var(--navy); color: var(--white);
  border-radius: 8px; padding: 4px 8px;
  font-size: 0.75rem; font-weight: 800;
  border: 2px solid var(--white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  white-space: nowrap; cursor: pointer;
  transition: transform 0.15s;
}
.by-marker:hover { transform: scale(1.1); }
.by-marker.high   { background: #059669; }
.by-marker.medium { background: #D97706; }
.by-marker.low    { background: #DC2626; }

/* ── Dashboard panels ── */
.dash-stat { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 20px 24px; }
.dash-stat .ds-label { font-size: 0.8rem; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.04em; }
.dash-stat .ds-value { font-size: 2rem; font-weight: 800; color: var(--navy); margin-top: 4px; }
.dash-stat .ds-sub   { font-size: 0.8rem; color: var(--green); margin-top: 2px; }

/* ── Modal ── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000; align-items: center; justify-content: center; padding: 16px; }
.modal-overlay.open { display: flex; }
.modal { background: var(--white); border-radius: var(--radius-lg); max-width: 520px; width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--gray-200); display: flex; align-items: center; justify-content: space-between; }
.modal-body { padding: 24px; }
.modal-close { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--gray-500); }

/* ── Toast ── */
.toast { position: fixed; bottom: 24px; right: 24px; background: var(--gray-900); color: var(--white); padding: 12px 20px; border-radius: var(--radius); font-size: 0.88rem; z-index: 2000; opacity: 0; transform: translateY(10px); transition: all 0.3s ease; pointer-events: none; max-width: 320px; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background: #065F46; }
.toast.error   { background: #7F1D1D; }
