/* ===== Zubia — Design System ===== */
:root {
  --primary: #0F766E;
  --primary-light: #14B8A6;
  --primary-dark: #0D5E58;
  --secondary: #475569;
  --accent: #F97066;
  --accent-light: #FCA5A1;
  --success: #10B981;
  --success-light: #D1FAE5;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --danger: #EF4444;

  --bg: #FAFAF8;
  --bg-teal: #F0FDFA;
  --bg-card: #FFFFFF;
  --text: #0F172A;
  --text-secondary: #64748B;
  --text-light: #94A3B8;
  --border: #E2E8F0;
  --border-light: #F1F5F9;

  --shadow-sm: 0 1px 3px rgba(15, 118, 110, 0.06);
  --shadow: 0 2px 8px rgba(15, 118, 110, 0.08);
  --shadow-lg: 0 8px 30px rgba(15, 118, 110, 0.12);
  --shadow-card: 0 1px 4px rgba(15, 118, 110, 0.06), 0 4px 16px rgba(15, 118, 110, 0.04);

  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --sidebar-width: 240px;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
}

h1, h2, h3, h4 { line-height: 1.3; font-weight: 600; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }

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

.text-secondary { color: var(--text-secondary); }
.text-sm { font-size: 0.8125rem; }
.text-xs { font-size: 0.75rem; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font);
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn svg { width: 16px; height: 16px; }

.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--border);
}
.btn-outline:hover:not(:disabled) {
  background: var(--bg-teal);
  border-color: var(--primary-light);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 6px 12px;
}
.btn-ghost:hover { color: var(--primary); }

.btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--border);
}
.btn-danger:hover:not(:disabled) {
  background: #FEF2F2;
  border-color: var(--danger);
}

.btn-lg { padding: 12px 28px; font-size: 1rem; border-radius: 12px; }
.btn-sm { padding: 5px 12px; font-size: 0.8125rem; }
.btn-xs { padding: 3px 8px; font-size: 0.75rem; }

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.icon-btn:hover, .icon-btn.active {
  background: var(--bg-teal);
  color: var(--primary);
  border-color: var(--primary-light);
}
.icon-btn-sm { width: 28px; height: 28px; }
.icon-btn-sm svg { width: 14px; height: 14px; }

/* ===== Inputs ===== */
.input-field {
  width: 100%;
  padding: 9px 14px;
  font-size: 0.875rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.input-field:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}
.input-field::placeholder { color: var(--text-light); }
.input-lg { padding: 12px 18px; font-size: 1rem; }
.input-sm { padding: 5px 10px; font-size: 0.8125rem; width: 80px; }

.select-field {
  padding: 9px 14px;
  font-size: 0.875rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  cursor: pointer;
}
.select-field:focus { border-color: var(--primary-light); }
.select-sm { padding: 4px 8px; font-size: 0.75rem; }

.textarea {
  resize: vertical;
  min-height: 60px;
}
.textarea-sm { min-height: 40px; font-size: 0.8125rem; }

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.875rem;
}
.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

/* ===== Layout ===== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 20px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
}
.sidebar-brand svg { color: var(--primary); }

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font);
  width: 100%;
  text-align: left;
}
.nav-item:hover {
  background: var(--bg-teal);
  color: var(--primary);
}
.nav-item.active {
  background: var(--bg-teal);
  color: var(--primary);
  font-weight: 600;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
}

.page { max-width: 1100px; }

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
}
.page-header h1 { margin-bottom: 4px; }

/* ===== Cards ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

/* ===== Score Badge ===== */
.score-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--score-color), color-mix(in srgb, var(--score-color), white 30%));
  color: white;
  flex-shrink: 0;
}
.score-badge-small {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
}
.score-badge-small .score-value { font-size: 1.125rem; font-weight: 700; line-height: 1; }
.score-badge-small .score-label { display: none; }

.score-badge-medium {
  width: 64px;
  height: 64px;
}
.score-badge-medium .score-value { font-size: 1.5rem; font-weight: 800; line-height: 1; }
.score-badge-medium .score-label { font-size: 0.625rem; opacity: 0.8; }

.score-badge-large {
  width: 88px;
  height: 88px;
  border-radius: var(--radius-xl);
}
.score-badge-large .score-value { font-size: 2rem; font-weight: 800; line-height: 1; }
.score-badge-large .score-label { font-size: 0.75rem; opacity: 0.8; }

/* ===== Status Pills ===== */
.status-pill {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  text-transform: capitalize;
}
.status-saved { background: var(--bg-teal); color: var(--primary); }
.status-applied { background: #EFF6FF; color: #2563EB; }
.status-toured { background: #F5F3FF; color: #7C3AED; }
.status-rejected { background: #FEF2F2; color: var(--danger); }
.status-leased { background: var(--success-light); color: #059669; }
.status-inquiry { background: var(--warning-light); color: #B45309; }
.status-docs_sent { background: #EFF6FF; color: #2563EB; }
.status-approved { background: var(--success-light); color: #059669; }
.status-denied { background: #FEF2F2; color: var(--danger); }
.status-withdrawn { background: #F1F5F9; color: var(--text-secondary); }

/* ===== Source Badge ===== */
.source-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: var(--radius-full);
  background: var(--border-light);
  color: var(--text-secondary);
}

/* ===== Dashboard ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}
.stat-icon { color: var(--primary); }
.stat-icon svg { width: 22px; height: 22px; }
.stat-value { font-size: 2rem; font-weight: 800; color: var(--text); }
.stat-label { font-size: 0.8125rem; color: var(--text-secondary); }

.dashboard-section { margin-bottom: 32px; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.listings-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.listing-card-compact {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s;
}
.listing-card-compact:hover { box-shadow: var(--shadow); }

.listing-card-photo {
  width: 60px;
  height: 60px;
  background: var(--bg-teal);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.listing-card-info { flex: 1; }
.listing-card-info h3 { font-size: 0.9375rem; margin-bottom: 2px; }
.listing-card-meta {
  display: flex;
  gap: 12px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 4px;
}
.listing-card-meta .price { color: var(--text); font-weight: 600; }

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.activity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  gap: 16px;
}
.activity-info { flex: 1; }
.activity-info h4 { font-size: 0.875rem; margin-bottom: 2px; }
.activity-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

.empty-state, .empty-state-sm {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}
.empty-state svg { width: 40px; height: 40px; margin-bottom: 16px; opacity: 0.4; }
.empty-state h3 { margin-bottom: 8px; }
.empty-state .btn { margin-top: 16px; }
.empty-state-sm { padding: 20px; }

/* ===== Add Listing ===== */
.add-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-card);
}

.add-mode-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.mode-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.mode-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.mode-active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.mode-active:hover {
  background: var(--primary-dark);
  color: white;
}

.add-paste-area {
  margin-bottom: 24px;
}

.paste-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.5;
}

.paste-textarea {
  width: 100%;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.6;
  resize: vertical;
  background: var(--bg);
  color: var(--text);
}

.paste-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.add-url-row {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}
.add-url-input {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}
.add-url-input svg {
  position: absolute;
  left: 14px;
  color: var(--text-light);
  width: 18px;
  height: 18px;
}
.add-url-input .input-field { padding-left: 42px; }

/* Search section title */
.search-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 4px;
}

/* Location input row */
.search-location-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

/* Filters row */
.search-filters-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search-filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
  flex: 1;
}

.search-filter-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.search-filter-select,
.search-filter-input {
  padding: 8px 12px !important;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text);
}

.search-filter-select:focus,
.search-filter-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

/* Must-haves pills */
.search-must-haves {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.search-must-haves-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.search-pill {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--bg-teal);
  color: var(--primary-dark);
  border: 1px solid rgba(15, 118, 110, 0.15);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

/* Search buttons */
.search-buttons-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

/* Section divider */
.search-section-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 32px 0;
}

.search-section-divider::before,
.search-section-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.search-section-divider span {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 40px;
  background: var(--bg-teal);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-steps { display: flex; flex-direction: column; gap: 8px; }
.loading-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-light);
  transition: color 0.3s;
}
.loading-step svg { width: 16px; height: 16px; }
.loading-step.active { color: var(--primary); font-weight: 500; }

.loading-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  color: var(--text-secondary);
  font-size: 0.875rem;
}
.loading-inline .loading-spinner { width: 20px; height: 20px; border-width: 2px; }

.error-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: var(--radius);
  color: var(--danger);
  font-size: 0.875rem;
  margin-bottom: 24px;
}

/* Result Card */
.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.result-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px;
  background: var(--bg-teal);
  border-bottom: 1px solid var(--border);
}
.result-title h2 { margin-bottom: 4px; }

.result-details-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border-bottom: 1px solid var(--border);
}
.result-detail {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px;
  background: var(--bg-card);
}
.detail-label { font-size: 0.75rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.03em; }
.detail-value { font-size: 0.9375rem; font-weight: 600; }

.result-description { padding: 20px 24px; border-bottom: 1px solid var(--border); }
.result-description h3 { margin-bottom: 8px; font-size: 0.875rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.03em; }
.result-description p { font-size: 0.9375rem; line-height: 1.6; color: var(--text-secondary); }

/* Score Breakdown */
.score-breakdown-section { padding: 20px 24px; border-bottom: 1px solid var(--border); }
.score-breakdown-section h3, .score-breakdown-section h4 {
  margin-bottom: 16px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.breakdown-list { display: flex; flex-direction: column; gap: 12px; }
.breakdown-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.breakdown-label { width: 100px; font-size: 0.8125rem; font-weight: 500; text-transform: capitalize; }
.breakdown-label-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  width: 160px;
}
.breakdown-weight { font-size: 0.6875rem; color: var(--text-light); }
.breakdown-bar-track {
  flex: 1;
  height: 8px;
  background: var(--border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
  min-width: 120px;
}
.breakdown-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}
.breakdown-value {
  width: 30px;
  text-align: right;
  font-size: 0.875rem;
  font-weight: 700;
}
.breakdown-reason {
  width: 100%;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  padding-left: 110px;
  margin-top: -4px;
}

/* Scam Card */
.scam-card { margin: 20px 24px; padding: 16px 20px; border-radius: var(--radius); }
.scam-low { background: var(--success-light); border: 1px solid #A7F3D0; }
.scam-medium { background: var(--warning-light); border: 1px solid #FDE68A; }
.scam-high { background: #FEF2F2; border: 1px solid #FECACA; }
.scam-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-weight: 600; }
.scam-reasons { padding-left: 28px; font-size: 0.8125rem; }
.scam-reasons li { margin-bottom: 4px; }

.save-confirmation {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  background: var(--success-light);
  color: #059669;
  font-weight: 500;
}
.save-confirmation svg { color: #059669; }

/* ===== Listings Page ===== */
.listings-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.controls-left { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.controls-right { display: flex; gap: 4px; }
.min-score-filter { display: flex; align-items: center; gap: 6px; font-size: 0.8125rem; }

.listings-container { display: flex; flex-direction: column; gap: 12px; }
.listings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }

.listing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s;
}
.listing-card:hover { box-shadow: var(--shadow); }

.listing-card-main {
  display: flex;
  gap: 16px;
  padding: 16px 20px;
  cursor: pointer;
}

.listing-card-body { flex: 1; min-width: 0; }
.listing-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.listing-notes {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 6px;
  font-style: italic;
}

.listing-expanded {
  border-top: 1px solid var(--border);
  padding: 20px;
  background: var(--bg);
}

.expanded-details {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.detail-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.detail-row .detail-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.expanded-description { margin-bottom: 16px; }
.expanded-description h4 { margin-bottom: 8px; }
.expanded-description p { font-size: 0.9375rem; color: var(--text-secondary); line-height: 1.6; }

.neighborhood-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.neighborhood-section h4 { margin-bottom: 12px; }

.neighborhood-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.neighborhood-stat {
  background: var(--bg-card);
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.neighborhood-stat .stat-label {
  font-size: 0.6875rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: block;
  margin-bottom: 4px;
}
.neighborhood-stat .stat-value {
  font-size: 0.9375rem;
  font-weight: 600;
}
.neighborhood-detail {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.5;
}
.neighborhood-detail strong { color: var(--text); }
.neighborhood-summary {
  margin-top: 12px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.neighborhood-summary p { margin-bottom: 8px; }

.listing-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

/* ===== Compare ===== */
.saved-comparisons { margin-bottom: 24px; }
.saved-comp-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

.compare-select-section { margin-bottom: 32px; }
.compare-listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.compare-select-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
}
.compare-select-card:hover { border-color: var(--primary-light); }
.compare-select-card.selected { border-color: var(--primary); background: var(--bg-teal); }

.compare-select-check {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.compare-select-card.selected .compare-select-check {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}
.compare-select-check svg { width: 14px; height: 14px; }

.compare-select-info { flex: 1; min-width: 0; }
.compare-select-info h4 { font-size: 0.8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compare-select-info p { font-size: 0.75rem; }

.compare-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.compare-actions .input-field { max-width: 240px; }

.comparison-matrix-section { margin-bottom: 32px; }
.comparison-table-wrapper { overflow-x: auto; }

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.comparison-table th,
.comparison-table td {
  padding: 12px 16px;
  text-align: center;
  border: 1px solid var(--border);
}
.comparison-table th {
  background: var(--bg-teal);
  font-weight: 600;
  font-size: 0.8125rem;
}
.comparison-table td:first-child {
  text-align: left;
  font-weight: 500;
  background: var(--bg);
}
.criterion-label { text-transform: capitalize; }
.comp-value { font-weight: 500; }

.comp-listing-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.comp-score-cell {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.875rem;
}

.comparison-summary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.comparison-summary h3 { margin-bottom: 16px; }
.ai-summary-content { font-size: 0.9375rem; line-height: 1.7; color: var(--text-secondary); }
.ai-summary-content p { margin-bottom: 12px; }
.ai-summary-content .md-h2 { font-size: 1.2rem; font-weight: 700; color: var(--text); margin: 20px 0 8px; }
.ai-summary-content .md-h3 { font-size: 1.05rem; font-weight: 600; color: var(--primary); margin: 16px 0 6px; }
.ai-summary-content h4 { font-size: 0.95rem; font-weight: 600; color: var(--text); margin: 12px 0 4px; }
.ai-summary-content strong { color: var(--text); font-weight: 600; }

/* ===== Applications Kanban ===== */
.add-app-form {
  margin-bottom: 24px;
}
.add-app-form h3 { margin-bottom: 16px; }
.form-row { margin-bottom: 12px; }
.form-actions { display: flex; gap: 8px; margin-top: 12px; }

.kanban-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  min-height: 400px;
}

.kanban-column {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px;
  min-width: 0;
}

.kanban-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 4px;
}
.kanban-header h3 { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-secondary); }
.kanban-count {
  background: var(--border);
  color: var(--text-secondary);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.kanban-cards { display: flex; flex-direction: column; gap: 8px; }

.kanban-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow-sm);
}
.kanban-card-header h4 { font-size: 0.8125rem; margin-bottom: 2px; }
.kanban-card-date { margin-top: 6px; }
.kanban-notes {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 6px;
  cursor: pointer;
  line-height: 1.4;
}
.kanban-notes:hover { color: var(--primary); }

.kanban-edit { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.kanban-edit .btn { align-self: flex-start; }

.kanban-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  align-items: center;
}

.follow-up-indicator {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--primary);
  margin-top: 6px;
}
.follow-up-indicator.overdue { color: var(--danger); }

.kanban-empty {
  text-align: center;
  padding: 20px 8px;
}

/* ===== Advisor Chat ===== */
.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 160px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.chat-welcome {
  text-align: center;
  padding: 60px 20px 40px;
}
.chat-welcome-icon {
  width: 56px;
  height: 56px;
  background: var(--bg-teal);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--primary);
}
.chat-welcome-icon svg { width: 28px; height: 28px; }
.chat-welcome h2 { margin-bottom: 8px; }
.chat-welcome p { margin-bottom: 24px; }

.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.suggestion-btn {
  padding: 8px 16px;
  font-size: 0.8125rem;
  font-family: var(--font);
  background: var(--bg-teal);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--primary);
  cursor: pointer;
  transition: all 0.15s;
}
.suggestion-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }

.chat-message {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}
.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.875rem;
  font-weight: 600;
}
.chat-message.user .message-avatar {
  background: var(--primary);
  color: white;
}
.chat-message.assistant .message-avatar {
  background: var(--bg-teal);
  color: var(--primary);
}

.message-content {
  flex: 1;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text-secondary);
  padding-top: 6px;
}
.message-content p { margin-bottom: 6px; }
.chat-message.user .message-content { color: var(--text); }

.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 8px 0;
}
.typing-indicator span {
  width: 8px;
  height: 8px;
  background: var(--text-light);
  border-radius: 50%;
  animation: typing 1.4s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}

.chat-input-area {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.chat-input-row { display: flex; gap: 10px; }
.chat-input { flex: 1; }

/* ===== Settings ===== */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.settings-card h3 { margin-bottom: 16px; }
.settings-card-full { grid-column: 1 / -1; }

.form-group { margin-bottom: 14px; }
.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 5px;
}
.form-row-inline { display: flex; gap: 12px; }
.form-row-inline .form-group { flex: 1; }

.priority-sliders { display: flex; flex-direction: column; gap: 16px; margin-top: 12px; }
.priority-slider { display: flex; flex-direction: column; gap: 6px; }
.priority-label { display: flex; justify-content: space-between; align-items: center; }
.priority-label span:first-child { font-size: 0.875rem; font-weight: 500; text-transform: capitalize; }
.priority-value { font-size: 0.875rem; font-weight: 700; color: var(--primary); }

.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: var(--radius-full);
  outline: none;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.warning-text {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--warning);
  font-size: 0.8125rem;
  margin-top: 12px;
}
.warning-text svg { width: 16px; height: 16px; }

/* ===== Landing Page ===== */
.landing {
  background: var(--bg);
}

.landing-nav {
  position: sticky;
  top: 0;
  background: rgba(250, 250, 248, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}
.landing-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.landing-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

/* Hero */
.hero {
  padding: 80px 32px 60px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-teal) 0%, var(--bg) 100%);
}
.hero-inner { max-width: 720px; margin: 0 auto; }
.hero-tagline {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}
.hero-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  color: var(--text);
}
.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 36px;
}
.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.hero-email-form {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 440px;
}
.hero-email-form .input-field { flex: 1; }
.hero-email-success {
  color: var(--success);
  font-weight: 500;
}

/* Sections */
.landing-section { padding: 64px 32px; }
.section-inner { max-width: 1000px; margin: 0 auto; }
.section-title { font-size: 2rem; font-weight: 700; text-align: center; margin-bottom: 12px; }
.section-subtitle { text-align: center; color: var(--text-secondary); font-size: 1.0625rem; margin-bottom: 40px; }

/* Demo Section */
.demo-section { background: var(--bg-card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.demo-input-row { display: flex; gap: 12px; margin-bottom: 24px; }
.demo-url-input {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}
.demo-url-input svg {
  position: absolute;
  left: 14px;
  color: var(--text-light);
  width: 18px;
  height: 18px;
}
.demo-url-input .input-field { padding-left: 42px; }

.demo-loading { text-align: center; padding: 40px; }

.demo-result { max-width: 700px; margin: 0 auto; }
.demo-result-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}
.demo-result-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}
.demo-result-header h3 { font-size: 1.125rem; }
.demo-score-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--score-color), color-mix(in srgb, var(--score-color), white 30%));
  color: white;
  flex-shrink: 0;
}
.demo-score-badge .score-value { font-size: 1.75rem; font-weight: 800; line-height: 1; }
.demo-score-badge .score-label { font-size: 0.625rem; opacity: 0.8; }

.demo-result-details {
  display: flex;
  gap: 16px;
  font-size: 0.9375rem;
  margin-bottom: 12px;
}
.demo-result-details span:first-child { font-weight: 700; color: var(--text); }
.demo-result-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}
.demo-score-breakdown { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.demo-score-breakdown h4 { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-secondary); margin-bottom: 12px; }

.scam-warning {
  margin-top: 16px;
  padding: 12px 16px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: var(--radius);
  color: var(--danger);
  font-size: 0.875rem;
}
.scam-warning ul { padding-left: 20px; margin-top: 6px; }

/* Pain Points */
.pain-section { background: var(--bg); }
.pain-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; max-width: 700px; margin: 0 auto; }
.pain-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.pain-icon {
  width: 44px;
  height: 44px;
  background: var(--bg-teal);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}
.pain-card p { font-size: 0.9375rem; font-style: italic; color: var(--text-secondary); }

/* Features */
.features-section { background: var(--bg-teal); }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}
.feature-card:hover { box-shadow: var(--shadow); }
.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--bg-teal);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 16px;
}
.feature-card h3 { margin-bottom: 8px; }
.feature-card p { font-size: 0.9375rem; color: var(--text-secondary); line-height: 1.6; }

/* How It Works */
.how-section { background: var(--bg-card); border-top: 1px solid var(--border); }
.how-steps { display: flex; align-items: flex-start; justify-content: center; gap: 12px; }
.how-step {
  flex: 1;
  max-width: 260px;
  text-align: center;
  padding: 24px 16px;
}
.how-step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.how-step h3 { margin-bottom: 8px; }
.how-step p { font-size: 0.9375rem; color: var(--text-secondary); }
.how-step-arrow {
  display: flex;
  align-items: center;
  color: var(--text-light);
  padding-top: 36px;
}

/* Credibility */
.credibility-section { background: var(--bg); }
.credibility-card {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  padding: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}
.credibility-text {
  font-size: 1.1875rem;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Pricing */
.pricing-section { background: var(--bg-teal); text-align: center; }

/* Footer */
.landing-footer {
  padding: 40px 32px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-inner { max-width: 1000px; margin: 0 auto; }
.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}
.footer-tagline { color: var(--text-secondary); font-size: 0.875rem; margin-bottom: 4px; }
.footer-copy { color: var(--text-light); font-size: 0.8125rem; }

/* ===== Top Bar & Sidebar Overlay ===== */
.topbar {
  padding: 16px 32px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}

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

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

.sidebar-overlay {
  display: none;
}

.sidebar-close {
  display: none;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 12px 16px;
  border-bottom: 1px solid var(--border-light);
}

.page-content {
  padding: 32px;
  max-width: 1200px;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .kanban-board { grid-template-columns: repeat(3, 1fr); overflow-x: auto; }
  .neighborhood-grid { grid-template-columns: repeat(2, 1fr); }
  .result-details-grid { grid-template-columns: repeat(2, 1fr); }
  .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 200;
  }
  .sidebar-open {
    transform: translateX(0);
  }
  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 150;
  }
  .sidebar-close {
    display: block;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 8px;
  }
  .main-content {
    margin-left: 0;
  }
  .hamburger {
    display: flex;
  }
  .topbar {
    padding: 14px 16px;
  }
  .page-content {
    padding: 20px 16px;
  }
  .hero-title { font-size: 2rem; }
  .hero { padding: 40px 16px; }
  .landing-section { padding: 40px 16px; }
  .features-grid { grid-template-columns: 1fr; }
  .pain-grid { grid-template-columns: 1fr; }
  .how-steps { flex-direction: column; align-items: center; }
  .how-step-arrow { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .kanban-board { grid-template-columns: 1fr; }
  .demo-input-row { flex-direction: column; }
  .add-url-row { flex-direction: column; }
  .search-filters-row { flex-direction: column; }
  .search-filter-group { min-width: 100%; }
  .search-buttons-row { flex-direction: column; }
  .search-location-row { flex-direction: column; }
  .listings-controls { flex-direction: column; align-items: stretch; }
  .compare-actions { flex-direction: column; }
  .listing-card-main { flex-direction: column; }
  .comparison-table { font-size: 0.75rem; }
  .comparison-table th, .comparison-table td { padding: 8px; }
  .page-header { flex-direction: column; gap: 12px; }
}

/* ===== Price highlight ===== */
.price { font-weight: 600; color: var(--text); }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* ===== Must-Haves & Nice-to-Haves ===== */
.criteria-checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.criteria-checkboxes .checkbox-label {
  font-size: 0.875rem;
  padding: 6px 0;
}

.criteria-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.criteria-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--bg-teal);
  border: 1px solid var(--primary-light);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  color: var(--primary-dark);
}

.pill-remove {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0 2px;
  line-height: 1;
}
.pill-remove:hover {
  color: var(--danger);
}

.criteria-add-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  align-items: center;
}

.criteria-add-row .input-field {
  flex: 1;
  max-width: 300px;
}

/* Must-have warnings on listing cards */
.must-have-warning {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: var(--radius);
  color: var(--danger);
  font-size: 0.8125rem;
  font-weight: 500;
  margin-top: 8px;
}

.must-have-warning svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.must-have-warning-detail {
  margin-bottom: 12px;
}

/* Nice-to-have badges on listing cards */
.nice-to-have-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 0.8125rem;
  color: var(--primary-dark);
}

.nice-to-have-detail {
  margin-bottom: 12px;
}

.nice-to-have-badge {
  display: inline-block;
  padding: 2px 8px;
  background: var(--success-light);
  border: 1px solid var(--success);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
  color: #065F46;
}

/* ===== Auth Loading ===== */
.auth-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg);
}

/* ===== Login Page ===== */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--bg-teal) 0%, var(--bg) 50%, #FFF5F5 100%);
  padding: 20px;
}

.login-container {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  text-align: center;
}

.login-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  margin-bottom: 24px;
}
.login-brand svg { width: 28px; height: 28px; }

.login-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 28px;
}

.login-form {
  text-align: left;
}

.login-field {
  margin-bottom: 16px;
}
.login-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}
.login-field .input-field {
  width: 100%;
}

.login-error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.8125rem;
  margin-bottom: 16px;
}

.login-submit {
  width: 100%;
  justify-content: center;
  margin-top: 8px;
  padding: 12px 18px;
  font-size: 1rem;
}

.login-footer-text {
  margin-top: 24px;
  font-size: 0.8125rem;
  color: var(--text-light);
}

/* ===== Sidebar Footer / User ===== */
.sidebar-footer {
  margin-top: auto;
  padding: 16px;
  border-top: 1px solid var(--border-light);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 600;
  flex-shrink: 0;
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.sidebar-user-email {
  font-size: 0.6875rem;
  color: var(--text-light);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-logout {
  width: 100%;
  justify-content: center;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  padding: 6px 12px;
}
.sidebar-logout:hover {
  color: var(--accent);
}

/* ===== Tasks Page ===== */
.tasks-page {
  max-width: 720px;
}

.tasks-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.tasks-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tasks-header-left h2 {
  margin: 0;
}

.tasks-count {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  background: var(--border-light);
  padding: 2px 10px;
  border-radius: var(--radius-full);
}

/* Task Form */
.task-form {
  padding: 20px;
  margin-bottom: 20px;
}

.task-form-row {
  margin-bottom: 12px;
}

.task-title-input {
  width: 100%;
  font-size: 1rem;
  font-weight: 500;
}

.task-desc-input {
  width: 100%;
  resize: vertical;
  font-size: 0.875rem;
}

.task-form-meta {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.task-form-field {
  flex: 1;
  min-width: 140px;
}
.task-form-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.task-form-field .input-field {
  width: 100%;
  font-size: 0.8125rem;
}

.task-form-actions {
  display: flex;
  justify-content: flex-end;
}

/* Filters */
.tasks-filters {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
}

.filter-btn {
  padding: 6px 14px;
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: var(--font);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}
.filter-btn:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}
.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* Task Card */
.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.task-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  transition: opacity 0.2s;
}
.task-card.task-done {
  opacity: 0.6;
}

.task-check {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border);
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  transition: all 0.15s ease;
  color: white;
  padding: 0;
}
.task-check:hover {
  border-color: var(--primary);
  background: var(--bg-teal);
}
.task-check.checked {
  background: var(--success);
  border-color: var(--success);
}

.task-content {
  flex: 1;
  min-width: 0;
}

.task-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.task-title {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
}
.task-done .task-title {
  text-decoration: line-through;
  color: var(--text-light);
}

.task-priority {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.priority-high {
  background: #FEF2F2;
  color: var(--danger);
}
.priority-medium {
  background: var(--warning-light);
  color: #92400E;
}
.priority-low {
  background: var(--border-light);
  color: var(--text-secondary);
}

.task-description {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
  line-height: 1.5;
}

.task-meta {
  display: flex;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--text-light);
}

.task-due {
  font-weight: 500;
}
.task-due.overdue {
  color: var(--danger);
}

.task-listing-link {
  color: var(--primary);
}

.task-delete {
  background: transparent;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius);
  opacity: 0;
  transition: all 0.15s ease;
}
.task-card:hover .task-delete {
  opacity: 1;
}
.task-delete:hover {
  color: var(--danger);
  background: #FEF2F2;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-secondary);
}
.empty-state svg {
  width: 40px;
  height: 40px;
  color: var(--text-light);
  margin-bottom: 12px;
}
.empty-state p {
  font-size: 0.9375rem;
}

/* Loading container */
.loading-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

/* ===== Demo Mode ===== */

.demo-banner {
  background: #FFFBEB;
  border-bottom: 1px solid #FDE68A;
  padding: 10px 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.demo-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  gap: 12px;
}
.demo-banner-text {
  font-size: 0.875rem;
  color: #92400E;
  font-weight: 500;
}
.demo-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.demo-banner-dismiss {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: #92400E;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
  border-radius: 4px;
}
.demo-banner-dismiss:hover {
  background: rgba(146, 64, 14, 0.1);
}

.demo-badge {
  display: inline-block;
  background: #FDE68A;
  color: #92400E;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  margin-left: 8px;
  vertical-align: middle;
}

.demo-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 9999;
  box-shadow: var(--shadow-lg);
  animation: demo-toast-in 0.25s ease;
}
@keyframes demo-toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.demo-blocked {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 60px 20px;
  text-align: center;
}
.demo-blocked p {
  font-size: 1rem;
  color: var(--text-secondary);
}

.sidebar-login-btn {
  width: 100%;
}

.login-demo-link {
  display: block;
  text-align: center;
  margin-top: 16px;
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}
.login-demo-link:hover {
  text-decoration: underline;
}

.landing-nav-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}

.pricing-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8125rem;
}

/* ===== Welcome / Onboarding ===== */
.welcome-page {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 24px 60px;
}

.welcome-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 48px;
}

.welcome-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--border);
  transition: all 0.3s ease;
}

.welcome-dot-active {
  width: 12px;
  height: 12px;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.15);
}

.welcome-dot-done {
  background: var(--primary-light);
}

.welcome-step-label {
  font-size: 0.8125rem;
  color: var(--text-light);
  margin-left: 8px;
}

.welcome-step-container {
  width: 100%;
  max-width: 640px;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.welcome-fade-in {
  opacity: 1;
  transform: translateY(0);
}

.welcome-fade-out {
  opacity: 0;
  transform: translateY(8px);
}

.welcome-step {
  display: flex;
  flex-direction: column;
}

.welcome-step-center {
  align-items: center;
  text-align: center;
}

.welcome-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 32px;
}

.welcome-logo svg {
  width: 40px;
  height: 40px;
}

.welcome-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.3;
}

.welcome-subtitle {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 520px;
}

.welcome-explain {
  background: var(--bg-teal);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 40px;
  max-width: 520px;
}

.welcome-explain p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}

.welcome-explain p:last-child {
  margin-bottom: 0;
}

.welcome-video {
  width: 100%;
  max-width: 560px;
  aspect-ratio: 16 / 9;
  margin: 1.5rem auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.welcome-video iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.welcome-cta {
  padding: 14px 36px;
  font-size: 1rem;
}

/* Step 2: Form */
.welcome-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 36px;
}

.welcome-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.welcome-form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

.welcome-form-row {
  display: flex;
  gap: 16px;
}

/* Step 3: Must-haves */
.welcome-must-haves {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 36px;
}

.welcome-checkbox-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.9375rem;
  color: var(--text);
}

.welcome-checkbox-card:hover {
  border-color: var(--primary-light);
  background: var(--bg-teal);
}

.welcome-checkbox-card-active {
  border-color: var(--primary);
  background: var(--bg-teal);
}

.welcome-checkbox-card input[type="checkbox"] {
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
}

/* Step 4: Feature cards */
.welcome-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 36px;
}

.welcome-feature-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.welcome-feature-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-teal);
  border-radius: var(--radius);
  color: var(--primary);
}

.welcome-feature-icon svg {
  width: 20px;
  height: 20px;
}

.welcome-feature-card h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.welcome-feature-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Step 5: Ready */
.welcome-ready-icon {
  margin-bottom: 24px;
}

/* Navigation */
.welcome-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

/* Responsive */
@media (max-width: 600px) {
  .welcome-page {
    padding: 24px 16px 40px;
  }
  .welcome-title {
    font-size: 1.5rem;
  }
  .welcome-must-haves {
    grid-template-columns: 1fr;
  }
  .welcome-form-row {
    flex-direction: column;
  }
}
