/* DoorReach Design System */
:root {
  --primary: #E07B39;
  --primary-dark: #C5612A;
  --primary-light: #FDF0E8;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-900: #1F2937;
  --shadow: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
  --radius: 8px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
  font-family: var(--font);
  color: var(--gray-900);
  background: var(--gray-50);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 56px;
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}
.nav-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-logo span { color: var(--primary); }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a {
  color: var(--gray-500);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--gray-900); }
.nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--gray-500);
}
.nav-user a { color: var(--gray-400); font-size: 13px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-secondary {
  background: #fff;
  color: var(--gray-900);
  border: 1px solid var(--gray-200);
}
.btn-secondary:hover { background: var(--gray-50); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-ghost {
  background: transparent;
  color: var(--gray-500);
  padding: 6px 12px;
}
.btn-ghost:hover { color: var(--gray-900); background: var(--gray-100); }
.btn-danger { background: #EF4444; color: #fff; }
.btn-danger:hover { background: #DC2626; }
.btn-success { background: #10B981; color: #fff; }
.btn-success:hover { background: #059669; }

/* Cards */
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}
.card-body { padding: 20px; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-500);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  font-size: 14px;
  font-family: var(--font);
  color: var(--gray-900);
  background: #fff;
  transition: border-color 0.15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(224,123,57,0.1);
}
.form-textarea { min-height: 120px; resize: vertical; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 16px;
}
.alert-error { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }
.alert-success { background: #D1FAE5; color: #065F46; border: 1px solid #A7F3D0; }
.alert-info { background: var(--primary-light); color: var(--primary-dark); border: 1px solid #FDDCBF; }

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 24px; }
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.page-title { font-size: 24px; font-weight: 700; color: var(--gray-900); }
.page-subtitle { font-size: 14px; color: var(--gray-500); margin-top: 2px; }

/* Stats Row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  padding: 16px;
  text-align: center;
}
.stat-value { font-size: 28px; font-weight: 700; color: var(--gray-900); }
.stat-label { font-size: 12px; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }

/* Kanban */
.kanban {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  overflow-x: auto;
}
.kanban-col {
  min-width: 260px;
  background: var(--gray-50);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
}
.kanban-header {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-500);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.kanban-count {
  background: var(--gray-200);
  color: var(--gray-500);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
}
.kanban-body { padding: 8px; display: flex; flex-direction: column; gap: 8px; min-height: 100px; }

/* Column variants */
.call-due-col { border-color: #FCA5A5; background: #FFF5F5; }
.call-due-col .kanban-header { color: #991B1B; border-bottom-color: #FCA5A5; }
.call-due-col .kanban-count { background: #FEE2E2; color: #991B1B; }
.won-col { border-color: #6EE7B7; background: #F0FDF4; }
.won-col .kanban-header { color: #065F46; border-bottom-color: #6EE7B7; }
.won-col .kanban-count { background: #D1FAE5; color: #065F46; }

.prospect-card {
  background: #fff;
  border-radius: 6px;
  border: 1px solid var(--gray-200);
  padding: 12px;
  cursor: pointer;
  transition: box-shadow 0.15s;
}
.prospect-card:hover { box-shadow: var(--shadow-md); }
.prospect-card-address {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 4px;
}
.prospect-card-owner { font-size: 13px; color: var(--gray-500); margin-bottom: 8px; }
.prospect-card-meta { display: flex; gap: 6px; flex-wrap: wrap; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}
.badge-dom { background: var(--gray-100); color: var(--gray-500); }
.badge-dom.hot { background: var(--primary-light); color: var(--primary-dark); }
.badge-rent { background: #DBEAFE; color: #1E40AF; }
.badge-type { background: var(--gray-100); color: var(--gray-500); }
.badge-status { padding: 3px 10px; font-size: 12px; border-radius: 12px; }
.badge-new { background: #DBEAFE; color: #1E40AF; }
.badge-letter { background: var(--primary-light); color: var(--primary-dark); }
.badge-email { background: #FEF3C7; color: #92400E; }
.badge-call { background: #FEE2E2; color: #991B1B; }
.badge-won { background: #D1FAE5; color: #065F46; }
.badge-lost { background: var(--gray-100); color: var(--gray-500); }

.prospect-card-actions { margin-top: 8px; display: flex; gap: 4px; }

/* Prospect Table */
.prospect-table { width: 100%; border-collapse: collapse; }
.prospect-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-400);
  padding: 10px 12px;
  border-bottom: 2px solid var(--gray-200);
}
.prospect-table td {
  padding: 12px;
  font-size: 14px;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
.prospect-table tr:hover td { background: var(--gray-50); }

/* Prospect Detail */
.detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}
.detail-section { margin-bottom: 24px; }
.detail-section-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-400);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gray-200);
}
.detail-row { display: flex; justify-content: space-between; padding: 6px 0; }
.detail-label { font-size: 13px; color: var(--gray-500); }
.detail-value { font-size: 14px; font-weight: 500; color: var(--gray-900); }

/* Drip Timeline */
.drip-timeline { margin: 16px 0; }
.drip-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  position: relative;
}
.drip-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 15px;
  top: 36px;
  bottom: -12px;
  width: 2px;
  background: var(--gray-200);
}
.drip-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  z-index: 1;
}
.drip-icon.done { background: #D1FAE5; color: #065F46; }
.drip-icon.active { background: var(--primary-light); color: var(--primary); }
.drip-icon.pending { background: var(--gray-100); color: var(--gray-400); }
.drip-content { flex: 1; }
.drip-title { font-size: 14px; font-weight: 600; color: var(--gray-900); }
.drip-date { font-size: 12px; color: var(--gray-400); }

/* Activity Feed */
.activity-feed { list-style: none; }
.activity-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
}
.activity-dot {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}
.activity-text { font-size: 13px; color: var(--gray-500); }
.activity-time { font-size: 12px; color: var(--gray-400); }

/* Landing */
.landing-hero {
  background: linear-gradient(135deg, #fff 0%, var(--primary-light) 100%);
  padding: 80px 24px;
  text-align: center;
}
.hero-title { font-size: 42px; font-weight: 800; color: var(--gray-900); max-width: 700px; margin: 0 auto 16px; line-height: 1.15; }
.hero-subtitle { font-size: 18px; color: var(--gray-500); max-width: 560px; margin: 0 auto 32px; line-height: 1.6; }
.features-section { padding: 60px 24px; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 900px; margin: 0 auto; }
.feature-card {
  text-align: center;
  padding: 32px 24px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}
.feature-icon { font-size: 32px; margin-bottom: 12px; }
.feature-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--gray-900); }
.feature-desc { font-size: 14px; color: var(--gray-500); line-height: 1.5; }

/* Auth pages */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-50);
  padding: 24px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
  padding: 40px 32px;
}
.auth-logo {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--gray-900);
}
.auth-logo span { color: var(--primary); }
.auth-footer { text-align: center; margin-top: 16px; font-size: 13px; color: var(--gray-400); }

/* Onboarding */
.onboarding-wrapper { max-width: 600px; margin: 40px auto; padding: 0 24px; }
.onboarding-step { display: none; }
.onboarding-step.active { display: block; }
.onboarding-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 32px;
}
.progress-dot {
  height: 4px;
  flex: 1;
  border-radius: 2px;
  background: var(--gray-200);
}
.progress-dot.filled { background: var(--primary); }

/* Settings Tabs */
.settings-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 24px;
}
.settings-tab {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-400);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: var(--font);
}
.settings-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.settings-panel { display: none; }
.settings-panel.active { display: block; }

/* Filter bar */
.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  align-items: center;
  flex-wrap: wrap;
}
.search-input {
  flex: 1;
  min-width: 200px;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  font-size: 14px;
  font-family: var(--font);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%239CA3AF' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242.156a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E") 12px center no-repeat;
}
.search-input:focus { outline: none; border-color: var(--primary); }

.filter-select {
  padding: 8px 12px;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  font-size: 14px;
  font-family: var(--font);
  background: #fff;
  color: var(--gray-900);
}

/* Footer */
.landing-footer {
  text-align: center;
  padding: 32px;
  color: var(--gray-400);
  font-size: 13px;
  border-top: 1px solid var(--gray-200);
}

/* Responsive */
@media (max-width: 768px) {
  .kanban { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 28px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .nav { padding: 0 14px; height: 52px; }
  .nav-links { gap: 12px; }
  .nav-links a { font-size: 13px; }
  .nav-user span { display: none; }
  .nav-user { gap: 8px; }
  .container { padding: 14px; }
  .auth-card { padding: 28px 20px; }
}

/* -- Google OAuth button -------------------------------------------------- */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  border: 1.5px solid #dadce0;
  border-radius: 6px;
  background: #fff;
  color: #3c4043;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
  margin-bottom: 4px;
}
.btn-google:hover {
  background: #f8f9fa;
  box-shadow: 0 1px 3px rgba(60,64,67,.15);
  color: #3c4043;
  text-decoration: none;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: #9aa0a6;
  font-size: 12px;
  margin: 16px 0;
  gap: 10px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e0e0e0;
}
