/* ==========================================================================
   Analysis Pages Shared Styles
   Used by: analyze/seller.html, analyze/buyer.html
   Requires: public.css loaded first for variables and nav
   ========================================================================== */

/* --------------------------------------------------------------------------
   Main Container
   -------------------------------------------------------------------------- */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero {
  text-align: center;
  padding: 48px 20px;
  margin-bottom: 32px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 18px;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
  font-weight: 400;
}

/* --------------------------------------------------------------------------
   Input Card
   -------------------------------------------------------------------------- */
.input-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin-bottom: 32px;
}

.input-card-content {
  padding: 32px;
}

/* MLS Import Banner */
.mls-import-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--color-accent-light);
  border-bottom: 1px solid var(--color-border);
}

.mls-import-text {
  font-size: 14px;
  color: var(--color-text-muted);
}

.mls-import-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: transparent;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent);
  cursor: pointer;
  transition: all 0.2s ease;
}

.mls-import-btn:hover {
  background: var(--color-accent);
  color: white;
}

.mls-import-btn svg {
  width: 16px;
  height: 16px;
}

/* MLS Import Panel */
.mls-import-panel {
  display: none;
  padding: 20px;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.mls-import-panel.show {
  display: block;
  animation: fadeIn 0.3s ease;
}

.mls-import-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.mls-import-row .form-group {
  flex: 1;
  max-width: 280px;
}

.btn-import {
  padding: 14px 20px;
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-import:hover {
  background: var(--color-accent-hover);
}

.mls-import-close {
  padding: 14px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.mls-import-close:hover {
  background: var(--color-border);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   Form Styles
   -------------------------------------------------------------------------- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.form-group input,
.form-group select {
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 15px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text);
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-light);
}

.form-group input::placeholder {
  color: var(--color-text-light);
}

/* Property Type Selector */
.property-type-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.property-type-option {
  padding: 16px 12px;
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.property-type-option:hover {
  border-color: var(--color-accent-light);
  transform: translateY(-2px);
}

.property-type-option.selected {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
}

.property-type-option input {
  display: none;
}

.property-type-icon {
  font-size: 24px;
  margin-bottom: 6px;
}

.property-type-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
}

.property-type-option.selected .property-type-label {
  color: var(--color-accent);
}

/* Submit Button */
.btn-analyze {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-analyze:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* City Suggestions */
.city-input-wrapper {
  position: relative;
}

.city-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
  display: none;
  box-shadow: var(--shadow-md);
}

.city-suggestions.show { display: block; }

.city-suggestion {
  padding: 12px 14px;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 14px;
}

.city-suggestion:hover,
.city-suggestion.selected {
  background: var(--color-accent-light);
}

.city-suggestion-match {
  font-weight: 600;
  color: var(--color-accent);
}

/* --------------------------------------------------------------------------
   Loading & Error States
   -------------------------------------------------------------------------- */
.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(250, 249, 247, 0.95);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
}

.loading-overlay.show { display: flex; }

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

.loading-text {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--color-text-muted);
}

.error-message {
  display: none;
  background: #fef2f2;
  border-left: 4px solid #dc2626;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  color: #991b1b;
}

.error-message.show { display: block; }

/* --------------------------------------------------------------------------
   Results Container
   -------------------------------------------------------------------------- */
.results-container {
  display: none;
}

.results-container.show {
  display: block;
  animation: fadeIn 0.5s ease;
}

/* --------------------------------------------------------------------------
   Subject Property Hero
   -------------------------------------------------------------------------- */
.property-hero {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 32px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin-bottom: 32px;
}

.property-photo {
  height: 280px;
  background: linear-gradient(135deg, var(--color-border), var(--color-text-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-surface);
  font-size: 14px;
}

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

.property-info {
  padding: 32px 32px 32px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.property-address {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.property-location {
  font-size: 15px;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.property-features {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
}

.feature-item {
  text-align: center;
}

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

.feature-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
}

.property-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--color-accent-light);
  color: var(--color-accent);
}

/* --------------------------------------------------------------------------
   Section Styling
   -------------------------------------------------------------------------- */
.section {
  margin-bottom: 32px;
}

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

.section-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 14px;
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   Value Estimate Section
   -------------------------------------------------------------------------- */
.value-estimate-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 32px;
  margin-bottom: 32px;
}

.value-range-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.value-box {
  text-align: center;
  padding: 28px 20px;
  border-radius: var(--radius-md);
  background: var(--color-bg);
}

.value-box.primary {
  background: var(--color-accent);
  color: white;
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

.value-box .amount {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 6px;
}

.value-box.primary .amount {
  font-size: 40px;
  color: white;
}

.value-box .label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.8;
}

.confidence-info {
  text-align: center;
  padding: 16px;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--color-text-muted);
}

.confidence-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  margin-left: 8px;
}

.confidence-badge.high { background: #e6f4ea; color: #1e7e34; }
.confidence-badge.medium { background: #fff8e6; color: #9a6700; }
.confidence-badge.low { background: #fef2f2; color: #991b1b; }

/* --------------------------------------------------------------------------
   Seller Financials Section
   -------------------------------------------------------------------------- */
.financials-card {
  background: var(--color-text);
  border-radius: var(--radius-lg);
  padding: 32px;
  color: white;
  margin-bottom: 32px;
}

.financials-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.financials-header h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
}

.financials-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}

.financial-input-group label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 8px;
}

.financial-input-group input {
  width: 100%;
  padding: 14px;
  font-size: 18px;
  font-weight: 600;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  color: white;
  font-family: var(--font-body);
}

.financial-input-group input::placeholder {
  color: rgba(255,255,255,0.4);
}

.financial-input-group input:focus {
  outline: none;
  border-color: var(--color-accent-light);
  background: rgba(255,255,255,0.15);
}

.financial-result {
  text-align: center;
  padding: 20px;
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-md);
}

.financial-result .amount {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  color: white;
  margin-bottom: 4px;
}

.financial-result .label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.6);
}

.financial-result.positive .amount { color: #7CB890; }
.financial-result.negative .amount { color: #E88B8B; }

/* --------------------------------------------------------------------------
   Market Trends Section
   -------------------------------------------------------------------------- */
.trends-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.trend-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.trend-card.highlight {
  background: var(--color-accent);
  color: white;
}

.trend-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 6px;
}

.trend-card.highlight .trend-value {
  color: white;
}

.trend-value.positive { color: #1e7e34; }
.trend-value.negative { color: #dc2626; }

.trend-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
}

.trend-card.highlight .trend-label {
  color: rgba(255,255,255,0.8);
}

.market-badge {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.market-badge.sellers { background: #e6f4ea; color: #1e7e34; }
.market-badge.buyers { background: #fef2f2; color: #991b1b; }
.market-badge.balanced { background: #fff8e6; color: #9a6700; }

/* --------------------------------------------------------------------------
   Charts
   -------------------------------------------------------------------------- */
.chart-container {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 32px;
}

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

.chart-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
}

.chart-wrapper {
  height: 280px;
  position: relative;
}

/* --------------------------------------------------------------------------
   Comparable Sales
   -------------------------------------------------------------------------- */
.comps-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.comp-stat {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.comp-stat-value {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 4px;
}

.comp-stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
}

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

.comp-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s, box-shadow 0.2s;
}

.comp-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.comp-photo {
  height: 160px;
  background: var(--color-border);
  position: relative;
}

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

.comp-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.comp-badge.sold { background: #1e7e34; color: white; }
.comp-badge.active { background: var(--color-accent); color: white; }
.comp-badge.pending { background: #9a6700; color: white; }

.comp-content {
  padding: 16px;
}

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

.comp-price {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 10px;
}

.comp-features {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.comp-meta {
  font-size: 12px;
  color: var(--color-text-light);
}

/* Enhanced comp card styles */
.comp-photo .no-photo {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  font-size: 12px;
}

.comp-dom-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  background: rgba(0,0,0,0.7);
  color: white;
}

.comp-dom-badge.dom-hot {
  background: #dc2626;
  animation: pulse 2s infinite;
}

.comp-dom-badge.dom-warm {
  background: #f59e0b;
}

.comp-dom-badge.dom-normal {
  background: #3b82f6;
}

.comp-dom-badge.dom-slow {
  background: #6b7280;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.comp-price-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.comp-sold-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text);
}

.comp-sale-vs-list {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.comp-sale-vs-list.below-asking {
  background: #dcfce7;
  color: #166534;
}

.comp-sale-vs-list.above-asking {
  background: #fee2e2;
  color: #991b1b;
}

.comp-sale-vs-list.at-asking {
  background: #f3f4f6;
  color: #4b5563;
}

.comp-list-price {
  font-size: 12px;
  color: var(--color-text-light);
  text-decoration: line-through;
  margin-bottom: 6px;
}

/* Escrow note */
.escrow-note {
  background: var(--color-surface);
  border-left: 3px solid var(--color-accent);
  padding: 12px 16px;
  margin-bottom: 20px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 13px;
  color: var(--color-text);
}

.escrow-note strong {
  color: var(--color-accent);
}

/* Highlight stat */
.comp-stat.highlight .comp-stat-value {
  color: var(--color-accent);
  font-size: 28px;
}

.comp-stat.highlight .comp-stat-label {
  font-weight: 600;
}

.comp-adjustments {
  padding: 14px 16px;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
}

.adjustment-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.adjustment-tag {
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
}

.adjustment-tag.positive { background: #e6f4ea; color: #1e7e34; }
.adjustment-tag.negative { background: #fef2f2; color: #991b1b; }

.adjusted-price {
  font-weight: 600;
  font-size: 14px;
  color: var(--color-text);
}

/* --------------------------------------------------------------------------
   Data Tables
   -------------------------------------------------------------------------- */
.data-table-container {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

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

.data-table th {
  padding: 14px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.data-table th.number { text-align: right; }

.data-table td {
  padding: 14px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--color-border-light);
}

.data-table td.number {
  text-align: right;
  font-weight: 500;
}

.data-table tr:last-child td { border-bottom: none; }

.data-table tr:hover { background: var(--color-accent-light); }

/* --------------------------------------------------------------------------
   No Data State
   -------------------------------------------------------------------------- */
.no-data {
  text-align: center;
  padding: 48px 32px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  color: var(--color-text-muted);
}

.no-data-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.no-data-text {
  font-size: 15px;
}

/* --------------------------------------------------------------------------
   Lead Capture Modal
   -------------------------------------------------------------------------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 26, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1001;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.show {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 440px;
  width: 100%;
  overflow: hidden;
}

.modal-header {
  background: var(--color-accent);
  color: white;
  padding: 28px;
  text-align: center;
}

.modal-header h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  margin-bottom: 8px;
}

.modal-header p {
  font-size: 14px;
  opacity: 0.9;
}

.lead-form {
  padding: 28px;
}

.lead-form .form-group {
  margin-bottom: 18px;
}

.lead-form .form-group:last-of-type {
  margin-bottom: 20px;
}

.modal-disclaimer {
  padding: 0 28px 20px;
  font-size: 12px;
  color: var(--color-text-light);
  text-align: center;
}

/* --------------------------------------------------------------------------
   MLS Primary Input (Buyer Page)
   -------------------------------------------------------------------------- */
.mls-primary {
  text-align: center;
  padding: 32px;
  background: var(--color-accent-light);
  border-bottom: 1px solid var(--color-border);
}

.mls-primary h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 6px;
}

.mls-primary p {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.mls-input-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  justify-content: center;
  max-width: 480px;
  margin: 0 auto;
}

.mls-input-row .form-group {
  flex: 1;
}

.manual-toggle {
  margin-top: 16px;
  font-size: 14px;
  color: var(--color-text-muted);
}

.manual-toggle a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
}

.manual-toggle a:hover {
  text-decoration: underline;
}

/* Manual Entry Panel */
.manual-entry-panel {
  display: none;
  padding: 32px;
  border-top: 1px solid var(--color-border);
}

.manual-entry-panel.show {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* --------------------------------------------------------------------------
   Property Price & Badges (Buyer Page)
   -------------------------------------------------------------------------- */
.property-price {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 16px;
}

.property-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.property-badge.active { background: var(--color-accent); color: white; }
.property-badge.pending { background: #9a6700; color: white; }
.property-badge.dom { background: var(--color-bg); color: var(--color-text-muted); border: 1px solid var(--color-border); }

/* --------------------------------------------------------------------------
   DOM Analysis Card (Buyer Page)
   -------------------------------------------------------------------------- */
.dom-analysis-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 32px;
  margin-bottom: 32px;
}

.dom-comparison {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
}

.dom-stat {
  text-align: center;
}

.dom-stat-value {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 600;
  color: var(--color-accent);
}

.dom-stat-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
}

.dom-bar-container {
  position: relative;
  height: 36px;
  background: var(--color-bg);
  border-radius: 18px;
  overflow: hidden;
}

.dom-bar {
  height: 100%;
  border-radius: 18px;
  transition: width 0.5s ease;
}

.dom-bar.below-avg { background: #1e7e34; }
.dom-bar.average { background: #9a6700; }
.dom-bar.above-avg { background: #dc2626; }

.dom-bar-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--color-text);
}

.dom-interpretation {
  text-align: center;
  padding: 14px;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--color-text-muted);
}

.dom-interpretation strong {
  color: var(--color-text);
}

/* --------------------------------------------------------------------------
   Price Analysis Card (Buyer Page)
   -------------------------------------------------------------------------- */
.price-analysis-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 32px;
  margin-bottom: 32px;
}

.price-comparison {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.price-stat {
  text-align: center;
  padding: 20px;
  background: var(--color-bg);
  border-radius: var(--radius-md);
}

.price-stat.highlight {
  background: var(--color-accent);
  color: white;
}

.price-stat-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 4px;
}

.price-stat.highlight .price-stat-value {
  color: white;
}

.price-stat-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.8;
}

.price-badge {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.price-badge.underpriced { background: #e6f4ea; color: #1e7e34; }
.price-badge.fair { background: #fff8e6; color: #9a6700; }
.price-badge.high { background: #fef2f2; color: #991b1b; }

/* --------------------------------------------------------------------------
   Offer Strategy Card (Buyer Page)
   -------------------------------------------------------------------------- */
.offer-strategy-card {
  background: var(--color-accent);
  border-radius: var(--radius-lg);
  padding: 32px;
  color: white;
  margin-bottom: 32px;
}

.offer-strategy-header {
  text-align: center;
  margin-bottom: 28px;
}

.offer-strategy-header h3 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  margin-bottom: 6px;
}

.offer-strategy-header p {
  font-size: 14px;
  opacity: 0.85;
}

.offer-range-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.offer-box {
  text-align: center;
  padding: 28px 20px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.1);
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.offer-box.recommended {
  background: rgba(255,255,255,0.15);
  border-color: white;
  transform: scale(1.05);
}

.offer-box .amount {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 6px;
}

.offer-box.recommended .amount {
  color: white;
}

.offer-box .label {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.offer-box .description {
  font-size: 12px;
  opacity: 0.7;
}

.offer-reasoning {
  text-align: center;
  padding: 16px;
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.5;
}

/* Offer Metrics Row */
.offer-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.offer-metric {
  text-align: center;
}

.offer-metric-value {
  font-size: 24px;
  font-weight: 700;
  color: #C9A962;
  margin-bottom: 4px;
}

.offer-metric-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.9;
  margin-bottom: 2px;
}

.offer-metric-detail {
  font-size: 11px;
  opacity: 0.7;
}

/* Offer Factors */
.offer-factors {
  margin-top: 24px;
  margin-bottom: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.15);
}

.offer-factors-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.8;
  margin-bottom: 12px;
  text-align: center;
}

.offer-factors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.offer-factor {
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  border-left: 3px solid rgba(255,255,255,0.3);
}

.offer-factor.positive {
  border-left-color: #4ade80;
  background: rgba(74, 222, 128, 0.1);
}

.offer-factor.negative {
  border-left-color: #f87171;
  background: rgba(248, 113, 113, 0.1);
}

.offer-factor.neutral {
  border-left-color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
}

.offer-factor-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.offer-factor-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
}

.offer-factor-indicator.positive { background: #4ade80; }
.offer-factor-indicator.negative { background: #f87171; }
.offer-factor-indicator.neutral { background: #fbbf24; }

.offer-factor-name {
  font-size: 13px;
  font-weight: 600;
  flex: 1;
}

.offer-factor-value {
  font-size: 12px;
  font-weight: 600;
  color: #C9A962;
}

.offer-factor-detail {
  font-size: 11px;
  opacity: 0.8;
  line-height: 1.4;
}

@media (max-width: 900px) {
  .offer-metrics {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .offer-factors-grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   Market Grid (Buyer Page)
   -------------------------------------------------------------------------- */
.market-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.market-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.market-card.highlight {
  background: var(--color-accent);
  color: white;
}

.market-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 6px;
}

.market-card.highlight .market-value {
  color: white;
}

.market-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
}

.market-card.highlight .market-label {
  color: rgba(255,255,255,0.8);
}

/* --------------------------------------------------------------------------
   Status Badges
   -------------------------------------------------------------------------- */
.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.active { background: var(--color-accent); color: white; }
.status-badge.pending { background: #9a6700; color: white; }
.status-badge.closed { background: #1e7e34; color: white; }

/* --------------------------------------------------------------------------
   CTA Section (Buyer Page)
   -------------------------------------------------------------------------- */
.cta-section {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.cta-section h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 10px;
}

.cta-section p {
  font-size: 15px;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.cta-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-cta.primary {
  background: var(--color-accent);
  color: white;
}

.btn-cta.primary:hover {
  background: var(--color-accent-hover);
}

.btn-cta.secondary {
  background: transparent;
  border: 2px solid var(--color-accent);
  color: var(--color-accent);
}

.btn-cta.secondary:hover {
  background: var(--color-accent);
  color: white;
}

/* --------------------------------------------------------------------------
   Option Grid (Buyer Lead Form)
   -------------------------------------------------------------------------- */
.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.option-item {
  padding: 12px 14px;
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  font-size: 13px;
}

.option-item:hover {
  border-color: var(--color-accent-light);
}

.option-item.selected {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
}

.option-item input {
  display: none;
}

/* --------------------------------------------------------------------------
   Alerts Section (Buyer Lead Form)
   -------------------------------------------------------------------------- */
.alerts-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
}

.alerts-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  margin-bottom: 14px;
}

.alerts-toggle input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  cursor: pointer;
}

.alerts-toggle span {
  font-size: 14px;
  color: var(--color-text-muted);
}

.alerts-criteria {
  display: none;
  padding: 16px;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  margin-top: 12px;
}

.alerts-criteria.show {
  display: block;
}

.alerts-criteria .form-grid {
  margin-bottom: 12px;
}

.property-type-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.property-type-checkboxes label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
  color: var(--color-text-muted);
}

.property-type-checkboxes input {
  width: 16px;
  height: 16px;
}

/* --------------------------------------------------------------------------
   Inline CTA (Early Call to Action)
   -------------------------------------------------------------------------- */
.cta-inline {
  background: linear-gradient(135deg, var(--color-accent) 0%, #1e3d32 100%);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-lg);
}

.cta-inline-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cta-inline-text {
  color: white;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cta-inline-text strong {
  font-size: 18px;
  font-weight: 600;
}

.cta-inline-text span {
  font-size: 14px;
  opacity: 0.9;
}

.cta-inline-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-cta-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-cta-inline.primary {
  background: white;
  color: var(--color-accent);
}

.btn-cta-inline.primary:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
}

.btn-cta-inline.secondary {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
}

.btn-cta-inline.secondary:hover {
  background: rgba(255,255,255,0.25);
}

/* --------------------------------------------------------------------------
   Expandable Cards
   -------------------------------------------------------------------------- */
.expandable-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.expandable-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--color-accent-light);
}

.expandable-card.expanded {
  border-color: var(--color-accent);
}

.expandable-card-header {
  display: flex;
  cursor: pointer;
  position: relative;
}

.card-expand-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  border-radius: 50%;
  color: var(--color-text-muted);
  transition: all 0.3s ease;
}

.expandable-card:hover .card-expand-icon {
  background: var(--color-accent-light);
  color: var(--color-accent);
}

.expandable-card.expanded .card-expand-icon {
  transform: translateY(-50%) rotate(180deg);
  background: var(--color-accent);
  color: white;
}

.expandable-card-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

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

.expanded-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.expanded-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.expanded-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
}

.expanded-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.btn-view-listing {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--color-accent);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-view-listing:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
}

.btn-view-listing.secondary {
  background: transparent;
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
}

.btn-view-listing.secondary:hover {
  background: var(--color-accent-light);
}

.expanded-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.price-history-note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #fff8e6;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: #9a6700;
  margin-bottom: 12px;
}

/* --------------------------------------------------------------------------
   Similar Homes Cards (Competition) - Grid Layout
   -------------------------------------------------------------------------- */
.similar-homes-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.similar-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.similar-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.similar-card.expanded {
  border-color: var(--color-accent);
}

.similar-card-photo {
  position: relative;
  height: 180px;
  background: var(--color-border);
  cursor: pointer;
  overflow: hidden;
}

.similar-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.similar-card:hover .similar-card-photo img {
  transform: scale(1.05);
}

.no-photo-large {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  font-size: 13px;
  background: linear-gradient(135deg, var(--color-border) 0%, #d1d5db 100%);
}

.no-photo-large svg {
  width: 40px;
  height: 40px;
  opacity: 0.4;
  margin-bottom: 6px;
}

.no-photo-large span {
  opacity: 0.7;
}

.similar-card-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 8px;
}

.badge-status {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-status.active {
  background: var(--color-accent);
  color: white;
}

.badge-status.pending {
  background: #f59e0b;
  color: white;
}

.badge-dom {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(0,0,0,0.75);
  color: white;
}

.badge-dom.dom-hot {
  background: #dc2626;
}

.badge-dom.dom-warm {
  background: #f59e0b;
}

.badge-dom.dom-normal {
  background: #3b82f6;
}

.badge-price-compare {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.badge-price-compare.price-lower {
  background: #dcfce7;
  color: #166534;
}

.badge-price-compare.price-higher {
  background: #fee2e2;
  color: #991b1b;
}

.badge-price-compare.price-same {
  background: rgba(255,255,255,0.9);
  color: #4b5563;
}

.similar-card-expand-hint {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: white;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.similar-card:hover .similar-card-expand-hint {
  opacity: 1;
}

.similar-card.expanded .similar-card-expand-hint svg {
  transform: rotate(180deg);
}

.similar-card-content {
  padding: 16px;
}

.similar-card-price {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}

.similar-card-address {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 2px;
}

.similar-card-location {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

.similar-card-specs {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.similar-card-specs span {
  display: flex;
  align-items: center;
}

/* Expanded section */
.similar-card-expanded {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.similar-expanded-content {
  padding: 16px;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
}

.similar-expanded-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.similar-expanded-stat {
  text-align: center;
}

.similar-expanded-stat .stat-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.similar-expanded-stat .stat-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.similar-price-change {
  padding: 8px 12px;
  background: #fff8e6;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: #9a6700;
  text-align: center;
  margin-bottom: 12px;
}

.similar-card-actions {
  display: flex;
  gap: 10px;
}

.btn-similar {
  flex: 1;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: all 0.2s ease;
}

.btn-similar.primary {
  background: var(--color-accent);
  color: white;
}

.btn-similar.primary:hover {
  background: var(--color-accent-hover);
}

.btn-similar.secondary {
  background: transparent;
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
}

.btn-similar.secondary:hover {
  background: var(--color-accent-light);
}

/* Comp card adjustments for expandable */
.comps-grid .expandable-card .comp-photo {
  width: 140px;
  height: 105px;
  flex-shrink: 0;
}

.comps-grid .expandable-card-header {
  padding: 12px;
  gap: 16px;
}

.comps-grid .expandable-card .comp-content {
  flex: 1;
  padding: 0;
  padding-right: 40px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .property-hero { grid-template-columns: 1fr; }
  .property-photo { height: 220px; }
  .property-info { padding: 24px; }
  .value-range-grid { grid-template-columns: 1fr; }
  .value-box.primary { transform: none; }
  .financials-grid { grid-template-columns: 1fr; gap: 16px; }
  .trends-grid { grid-template-columns: repeat(2, 1fr); }
  .comps-summary { grid-template-columns: repeat(2, 1fr); }
  .dom-comparison { grid-template-columns: 1fr; }
  .price-comparison { grid-template-columns: 1fr; }
  .offer-range-grid { grid-template-columns: 1fr; }
  .offer-box.recommended { transform: none; }
  .market-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .main-container { padding: 16px; }
  .hero { padding: 32px 16px; }
  .hero h1 { font-size: 28px; }
  .input-card-content { padding: 20px; }
  .property-type-grid { grid-template-columns: repeat(2, 1fr); }
  .trends-grid { grid-template-columns: 1fr; }
  .comps-grid { grid-template-columns: 1fr; }
  .comps-summary { grid-template-columns: 1fr; }
  .mls-import-banner { flex-direction: column; gap: 12px; text-align: center; }
  .mls-import-row { flex-direction: column; }
  .mls-import-row .form-group { max-width: none; }
  .modal-header { padding: 20px; }
  .modal-header h2 { font-size: 22px; }
  .lead-form { padding: 20px; }
  .market-grid { grid-template-columns: 1fr; }
  .mls-primary { padding: 24px; }
  .manual-entry-panel { padding: 20px; }
  .cta-section { padding: 28px 20px; }

  /* Inline CTA responsive */
  .cta-inline { padding: 20px; }
  .cta-inline-content { flex-direction: column; text-align: center; }
  .cta-inline-actions { justify-content: center; width: 100%; }
  .btn-cta-inline { flex: 1; justify-content: center; }

  /* Expandable cards responsive */
  .expanded-grid { grid-template-columns: repeat(2, 1fr); }
  .card-expand-icon { top: 10px; right: 10px; transform: none; }
  .expandable-card.expanded .card-expand-icon { transform: rotate(180deg); }

  /* Comp card responsive */
  .comps-grid .expandable-card-header { flex-direction: column; }
  .comps-grid .expandable-card .comp-photo { width: 100%; height: 160px; }
  .comps-grid .expandable-card .comp-content { padding-right: 0; padding-top: 12px; }

  /* Similar homes cards responsive */
  .similar-homes-cards { grid-template-columns: 1fr; }
  .similar-card-photo { height: 200px; }
  .similar-expanded-row { grid-template-columns: repeat(3, 1fr); }
  .similar-card-actions { flex-direction: column; }
  .btn-similar { text-align: center; }

  /* Expanded actions stack */
  .expanded-actions { flex-direction: column; }
  .btn-view-listing { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
  .expanded-grid { grid-template-columns: 1fr; }
  .similar-expanded-row { grid-template-columns: 1fr; gap: 8px; }
  .similar-expanded-stat { text-align: left; display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--color-border); }
  .similar-expanded-stat .stat-label { margin-bottom: 0; }
}

/* --------------------------------------------------------------------------
   Monthly Cost Estimate Section
   -------------------------------------------------------------------------- */
.monthly-cost-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.monthly-cost-loading {
  text-align: center;
  color: var(--color-text-muted);
  padding: 20px;
}

.monthly-cost-error {
  text-align: center;
  color: #dc2626;
  padding: 20px;
}

.monthly-cost-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  align-items: start;
}

.monthly-cost-total {
  text-align: center;
  padding: 24px;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-radius: var(--radius-md);
}

.monthly-cost-total-value {
  font-size: 36px;
  font-weight: 700;
  color: #166534;
  line-height: 1;
}

.monthly-cost-total-label {
  font-size: 14px;
  color: #166534;
  margin-top: 8px;
  font-weight: 500;
}

.monthly-cost-breakdown {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.monthly-cost-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border-light);
}

.monthly-cost-item:last-child {
  border-bottom: none;
}

.monthly-cost-item-label {
  font-size: 14px;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.monthly-cost-item-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
}

.monthly-cost-item.flood-insurance {
  background: #fef2f2;
  margin: 0 -12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border-bottom: none;
}

.monthly-cost-item.flood-insurance .monthly-cost-item-value {
  color: #dc2626;
}

.monthly-cost-item.flood-info .monthly-cost-item-value {
  color: #059669;
  font-weight: 500;
}

.flood-zone-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.flood-zone-badge.high {
  background: #fee2e2;
  color: #dc2626;
}

.flood-zone-badge.moderate {
  background: #fef3c7;
  color: #d97706;
}

.flood-zone-badge.low {
  background: #d1fae5;
  color: #059669;
}

.flood-not-required {
  color: #059669 !important;
}

.monthly-cost-item.heating-cost {
  background: #fff7ed;
  border-radius: 6px;
  padding: 8px 12px;
  margin: 4px -12px;
}

.heating-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  background: #fed7aa;
  color: #c2410c;
  margin-left: 4px;
  vertical-align: middle;
}

.monthly-cost-assumptions {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
  font-size: 13px;
  color: var(--color-text-muted);
}

.monthly-cost-assumptions a {
  color: var(--color-text-muted);
}

.monthly-cost-assumptions a:hover {
  color: var(--color-accent);
}

@media (max-width: 768px) {
  .monthly-cost-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .monthly-cost-total {
    padding: 20px;
  }

  .monthly-cost-total-value {
    font-size: 32px;
  }
}
