/* ====================================================================
   RoofMetric — Modern UI
   Refined palette · Inter typography · soft shadows · smooth lines
   ==================================================================== */

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

:root {
  /* Palette — refined modern */
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #dbeafe;
  --accent: #f97316;
  --accent-dark: #ea580c;
  --accent-soft: #ffedd5;
  --success: #10b981;
  --success-soft: #d1fae5;
  --warning: #f59e0b;
  --warning-soft: #fef3c7;
  --danger: #ef4444;
  --danger-soft: #fee2e2;

  --bg: #f8fafc;
  --bg-alt: #f1f5f9;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-soft: #94a3b8;
  --border: #e2e8f0;
  --border-soft: #f1f5f9;

  /* Shadows — multi-layer for depth */
  --shadow-xs: 0 1px 2px rgba(15,23,42,0.04);
  --shadow-sm: 0 1px 3px rgba(15,23,42,0.04), 0 1px 2px rgba(15,23,42,0.06);
  --shadow: 0 4px 6px -1px rgba(15,23,42,0.05), 0 2px 4px -2px rgba(15,23,42,0.04);
  --shadow-md: 0 10px 15px -3px rgba(15,23,42,0.06), 0 4px 6px -4px rgba(15,23,42,0.05);
  --shadow-lg: 0 20px 25px -5px rgba(15,23,42,0.08), 0 8px 10px -6px rgba(15,23,42,0.05);
  --shadow-xl: 0 25px 50px -12px rgba(15,23,42,0.18);

  /* Radii */
  --r-sm: 6px;
  --r: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-feature-settings: 'cv02','cv03','cv04','cv11';
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================== TOPBAR ============================== */
.topbar {
  background: rgba(255,255,255,0.9);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border-soft);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.brand { display: flex; align-items: center; gap: 14px; }
.logo {
  font-size: 26px;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  -webkit-text-fill-color: white;
}
.topbar h1 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.tagline { color: var(--text-muted); font-size: 13px; font-weight: 500; }

nav { display: flex; gap: 4px; align-items: center; }
nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  transition: var(--transition);
}
nav a:hover {
  color: var(--text);
  background: var(--bg-alt);
}

/* ============================== HERO ============================== */
.hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%);
  color: white;
  padding: 88px 24px 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(255,255,255,0.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(249,115,22,0.18) 0%, transparent 50%);
  pointer-events: none;
}
.hero h2 {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 18px;
  line-height: 1.1;
  position: relative;
}
.hero p {
  font-size: 19px;
  max-width: 720px;
  margin: 0 auto 36px;
  opacity: 0.92;
  font-weight: 400;
  position: relative;
}
.cta {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 16px 36px;
  border-radius: var(--r);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  box-shadow: 0 10px 25px rgba(249,115,22,0.4);
  transition: var(--transition);
  position: relative;
}
.cta:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(249,115,22,0.5);
}

/* ============================== APP / MEASURE ============================== */
.app { padding: 36px 24px; }

.search-bar {
  display: flex;
  gap: 10px;
  max-width: 1400px;
  margin: 0 auto 12px;
  align-items: center;
  position: relative;
}
.search-input-wrap { flex: 1; position: relative; }
.search-bar input {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: 15px;
  background: var(--surface);
  font-family: inherit;
  transition: var(--transition);
  box-shadow: var(--shadow-xs);
}
.search-bar input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}
.search-bar button {
  padding: 14px 28px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--r);
  font-weight: 600;
  cursor: pointer;
  font-size: 15px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  font-family: inherit;
}
.search-bar button:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow); }

.status {
  font-size: 13px;
  color: var(--text-muted);
  min-width: 140px;
  font-weight: 500;
}
.status.error { color: var(--danger); }
.status.success { color: var(--success); }

.search-tip {
  max-width: 1400px;
  margin: 6px auto 18px;
  padding: 11px 16px;
  background: var(--primary-soft);
  border-left: 3px solid var(--primary);
  border-radius: var(--r-sm);
  font-size: 13px;
  color: #1e3a8a;
  font-weight: 500;
}

.suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  max-height: 320px;
  overflow-y: auto;
  z-index: 1100;
  display: none;
  padding: 6px;
}
.suggestions.open { display: block; }
.suggestion {
  padding: 10px 12px;
  cursor: pointer;
  font-size: 14px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transition: var(--transition);
}
.suggestion:hover, .suggestion.active { background: var(--bg-alt); }
.suggestion .pin { color: var(--primary); font-size: 14px; margin-top: 2px; }
.suggestion .text strong { display: block; color: var(--text); font-weight: 600; font-size: 14px; }
.suggestion .text span { color: var(--text-muted); font-size: 12px; }

/* WORKSPACE */
.workspace {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
}
.map-column { display: flex; flex-direction: column; gap: 20px; }

#map {
  height: 540px;
  border-radius: var(--r-md);
  box-shadow: var(--shadow);
  background: #e0e0e0;
  position: relative;
  border: 1px solid var(--border);
}

/* Pulsing highlight at the geocoded address — draws attention to where to click */
.address-pulse {
  width: 28px; height: 28px;
  position: relative;
  pointer-events: none;
}
.address-pulse .dot {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #f97316;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  z-index: 2;
}
.address-pulse .ring {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 3px solid #f97316;
  animation: pulseRing 2s ease-out infinite;
  opacity: 0.8;
}
.address-pulse .ring.delay { animation-delay: 1s; }

/* Wrong-house warning prompt — red themed, more attention-grabbing */
.click-house-prompt.chp-warning {
  background: #fef2f2;
  border-color: #ef4444;
  border-left: 4px solid #ef4444;
}
.click-house-prompt.chp-warning strong { color: #b91c1c; }
.click-house-prompt.chp-warning .chp-icon { font-size: 26px; }

/* Wrong-house warning marker — red, no animation, no click */
.address-pulse.warning .warning-dot {
  background: #ef4444;
  border: 3px solid white;
  width: 16px; height: 16px;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(239,68,68,0.6);
}

@keyframes pulseRing {
  0%   { width: 14px; height: 14px; opacity: 0.9; }
  100% { width: 70px; height: 70px; opacity: 0; }
}

.click-house-prompt {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--r);
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  max-width: 90%;
  min-width: 340px;
}
.chp-content {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 13px; color: var(--text); line-height: 1.5;
}
.chp-icon { font-size: 22px; line-height: 1; }
.chp-content strong { color: var(--text); display: block; margin-bottom: 4px; font-weight: 600; }
.chp-content small { color: var(--text-muted); }
.chp-close {
  background: transparent; border: none; color: var(--text-muted);
  font-size: 18px; cursor: pointer; padding: 0 4px; line-height: 1;
}

/* STREET VIEW */
.streetview-section {
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.sv-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; flex-wrap: wrap; gap: 8px; }
.sv-header h3 { font-size: 16px; font-weight: 600; }
.sv-hint { font-size: 12px; color: var(--text-muted); }
.sv-container { position: relative; width: 100%; height: 320px; border-radius: var(--r); overflow: hidden; background: #1e293b; margin-bottom: 14px; }
.sv-container iframe { width: 100%; height: 100%; border: 0; }
.sv-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #94a3b8; font-size: 14px; pointer-events: none;
  text-align: center; padding: 16px;
}

.pitch-tool {
  background: var(--bg-alt);
  border-radius: var(--r);
  padding: 14px;
}
.pitch-tool h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-weight: 600;
}
.pitch-references { display: grid; grid-template-columns: repeat(auto-fit, minmax(85px, 1fr)); gap: 8px; margin-bottom: 12px; }
.pitch-ref-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 6px;
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
}
.pitch-ref-card:hover { border-color: var(--primary); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.pitch-ref-card.selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px rgba(249,115,22,0.12); }
.pitch-ref-card svg { width: 60px; height: 30px; display: block; margin: 0 auto 6px; }
.pitch-ref-card .pitch-label { font-size: 12px; font-weight: 700; color: var(--text); }
.pitch-ref-card .pitch-deg { font-size: 10px; color: var(--text-muted); }
.story-counter { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.story-counter label { font-size: 13px; display: block; margin-bottom: 6px; font-weight: 500; }
.story-counter select {
  width: 100%; padding: 9px 11px;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  font-size: 13px; background: var(--surface); font-family: inherit;
}

/* RIGHT PANEL */
.panel {
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  overflow-y: auto;
  border: 1px solid var(--border);
}
.panel h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  letter-spacing: -0.01em;
}
.panel h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 12px;
  margin-top: 4px;
  font-weight: 600;
}

/* Workflow stepper */
.workflow-stepper {
  list-style: none; display: flex; gap: 4px;
  padding: 6px; margin-bottom: 18px;
  background: var(--bg-alt); border-radius: var(--r);
}
.step-item {
  flex: 1; display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--text-soft); font-weight: 600;
  padding: 6px 8px; border-radius: var(--r-sm);
  transition: var(--transition);
}
.step-item .num {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--border); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; flex-shrink: 0;
}
.step-item.active { color: var(--primary); background: var(--primary-soft); }
.step-item.active .num { background: var(--primary); }
.step-item.done { color: var(--success); }
.step-item.done .num { background: var(--success); }

.outline-actions { margin-bottom: 18px; }

.disclaimer-box {
  background: var(--warning-soft);
  border: 1px solid #fcd34d;
  border-left: 3px solid var(--warning);
  border-radius: var(--r-sm);
  padding: 11px 13px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #78350f;
  margin-bottom: 16px;
}
.disclaimer-box strong { color: #92400e; }

.pitch-section { margin-bottom: 22px; }
.pitch-section > label { display: block; margin-bottom: 14px; font-size: 14px; font-weight: 600; }
.pitch-method {
  background: var(--bg-alt);
  border-left: 3px solid var(--primary);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  margin-bottom: 10px;
}
.method-tag {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--primary); margin-bottom: 8px;
}
.method-link {
  display: inline-block; color: var(--primary);
  text-decoration: none; font-weight: 600;
  font-size: 13px; padding: 6px 0;
}
.method-link:hover { text-decoration: underline; }

.pitch-section select, .pitch-section input {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  font-size: 14px; background: var(--surface); font-family: inherit;
  transition: var(--transition);
}
.pitch-section select:focus, .pitch-section input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.hint { font-size: 12px; color: var(--text-muted); margin-top: 8px; line-height: 1.5; }

/* Results metrics */
.results {
  background: var(--bg-alt);
  padding: 18px;
  border-radius: var(--r);
  margin-bottom: 18px;
}
.metric {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.metric:last-child { border-bottom: none; }
.metric span { color: var(--text-muted); font-weight: 500; }
.metric strong { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.metric.primary {
  background: var(--primary-soft);
  margin: 6px -18px;
  padding: 10px 18px;
  border-bottom: none;
  border-radius: var(--r-sm);
}
.metric.primary strong { color: var(--primary); font-size: 16px; font-weight: 700; }

.actions { display: flex; gap: 10px; margin-bottom: 12px; }
.actions button {
  flex: 1; padding: 12px;
  border: none; border-radius: var(--r-sm);
  font-weight: 600; cursor: pointer; font-size: 14px;
  font-family: inherit; transition: var(--transition);
}
.actions .primary { background: var(--primary); color: white; box-shadow: var(--shadow-xs); }
.actions .primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
.actions .secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.actions .secondary:hover { background: var(--bg-alt); }

button.full {
  width: 100%; padding: 13px; border: none; border-radius: var(--r-sm);
  font-weight: 600; cursor: pointer; font-size: 14px; font-family: inherit;
  transition: var(--transition);
}
button.full.primary { background: var(--primary); color: white; box-shadow: var(--shadow-xs); }
button.full.primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
button.full.secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
button.full.secondary:hover { background: var(--bg-alt); }

.big-cta {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  font-size: 15px; padding: 15px;
  box-shadow: 0 4px 14px rgba(249,115,22,0.35);
  font-weight: 700;
}
.big-cta:hover { box-shadow: 0 6px 20px rgba(249,115,22,0.45); }

.material-est {
  background: var(--accent-soft);
  padding: 18px;
  border-radius: var(--r);
  border-left: 3px solid var(--accent);
}

/* ============================== ADMIN AREA ============================== */
#adminGate {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 5000; overflow-y: auto; padding: 32px;
}
#adminLoginScreen { display: flex; align-items: center; justify-content: center; min-height: 80vh; }
.admin-login-card {
  background: var(--surface);
  padding: 48px 40px;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl);
  max-width: 440px; width: 100%;
  border: 1px solid var(--border);
}
.admin-login-card h2 { margin-bottom: 8px; font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
.admin-login-card p { color: var(--text-muted); font-size: 14px; margin-bottom: 24px; }
.admin-login-card input {
  width: 100%; padding: 13px 15px;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  font-size: 15px; margin-bottom: 14px; font-family: inherit;
  transition: var(--transition);
}
.admin-login-card input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.admin-login-card button {
  width: 100%; padding: 13px;
  background: var(--primary); color: white;
  border: none; border-radius: var(--r-sm);
  font-weight: 600; cursor: pointer; font-family: inherit;
  font-size: 15px; transition: var(--transition);
}
.admin-login-card button:hover { background: var(--primary-dark); }

#adminPanel-main { max-width: 1100px; margin: 0 auto; }
.admin-header {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px; margin-bottom: 28px;
  padding-bottom: 20px; border-bottom: 1px solid var(--border);
}
.admin-header h2 { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 4px; }
.admin-header button {
  padding: 9px 16px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  cursor: pointer; margin-left: 8px; font-size: 13px;
  font-weight: 500; font-family: inherit;
  transition: var(--transition);
}
.admin-header button:hover { background: var(--bg-alt); }

.atab {
  background: transparent; border: none;
  padding: 12px 18px; font-size: 14px; font-weight: 600;
  color: var(--text-muted); cursor: pointer;
  border-bottom: 2.5px solid transparent; margin-bottom: -1px;
  display: flex; align-items: center; gap: 8px;
  font-family: inherit; transition: var(--transition);
}
.atab.active { color: var(--primary); border-bottom-color: var(--primary); }
.atab:hover { color: var(--text); }
.atab-panel { display: none; }
.atab-panel.active { display: block; }

.tier-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tier-table th, .tier-table td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--border); }
.tier-table th { background: var(--bg-alt); text-transform: uppercase; letter-spacing: 0.06em; font-size: 10px; font-weight: 600; color: var(--text-muted); }
.tier-table input {
  width: 100%; padding: 7px 9px;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  font-size: 13px; font-family: inherit;
}
.tier-table .tier-name { font-weight: 700; color: var(--text); }

.info-box {
  background: var(--warning-soft);
  border: 1px solid #fcd34d;
  border-left: 3px solid var(--warning);
  border-radius: var(--r-sm);
  padding: 13px 16px; font-size: 13px;
  color: #78350f; margin-top: 16px; line-height: 1.55;
}

.account-status-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white; border-radius: var(--r-md);
  padding: 28px; box-shadow: var(--shadow-md);
  margin-bottom: 16px;
}
.account-status-card h3 { color: white; margin-bottom: 6px; border: none; padding: 0; font-size: 18px; font-weight: 700; }
.account-status-card .section-sub { color: rgba(255,255,255,0.9); font-size: 14px; }
.account-meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px; margin-top: 18px; padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.2);
}
.account-meta div { font-size: 13px; }
.account-meta span { color: rgba(255,255,255,0.85); }
.account-meta strong { display: block; font-size: 18px; margin-top: 4px; font-weight: 700; }

.key-status {
  margin-top: 10px; padding: 10px 14px;
  border-radius: var(--r-sm); font-size: 13px; display: none;
}
.key-status.ok { display: block; background: var(--success-soft); color: #047857; border: 1px solid #6ee7b7; }
.key-status.bad { display: block; background: var(--danger-soft); color: var(--danger); border: 1px solid #fca5a5; }

.estimate-card .badge {
  background: var(--success); color: white; font-size: 10px;
  padding: 3px 9px; border-radius: 12px; vertical-align: middle;
  margin-left: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
}
.estimate-card .badge.admin-badge { background: var(--primary); }
.estimate-card .badge.member-badge { background: #6366f1; }

/* ============================== DASHBOARD ============================== */
.dashboard-section {
  padding: 48px 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.dashboard-wrap { max-width: 1400px; margin: 0 auto; }
.dashboard-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  flex-wrap: wrap; gap: 16px; margin-bottom: 28px;
}
.dashboard-header h2 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; }

.active-customer-banner {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white; padding: 12px 20px;
  border-radius: var(--r); display: flex; align-items: center; gap: 12px;
  font-size: 14px; box-shadow: var(--shadow);
}
.active-customer-banner strong { font-size: 15px; font-weight: 700; }
.link-btn {
  background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.3);
  color: white; padding: 5px 12px; border-radius: var(--r-sm);
  cursor: pointer; font-size: 12px; font-family: inherit; font-weight: 500;
  transition: var(--transition);
}
.link-btn:hover { background: rgba(255,255,255,0.3); }

.dash-tabs {
  display: flex; gap: 4px; border-bottom: 1px solid var(--border);
  margin-bottom: 28px; flex-wrap: wrap;
}
.dtab {
  background: transparent; border: none;
  padding: 12px 18px; font-size: 14px; font-weight: 600;
  color: var(--text-muted); cursor: pointer;
  border-bottom: 2.5px solid transparent; margin-bottom: -1px;
  display: flex; align-items: center; gap: 8px;
  font-family: inherit; transition: var(--transition);
}
.dtab.active { color: var(--primary); border-bottom-color: var(--primary); }
.dtab:hover { color: var(--text); }
.dtab .count {
  background: var(--bg-alt); color: var(--text-muted);
  padding: 2px 9px; border-radius: 10px;
  font-size: 11px; font-weight: 700;
}
.dtab.active .count { background: var(--primary-soft); color: var(--primary); }

.dtab-panel { display: none; }
.dtab-panel.active { display: block; }

.customer-layout, .templates-layout {
  display: grid; grid-template-columns: 340px 1fr; gap: 20px;
}
.customer-list-pane, .templates-list-pane,
.customer-detail-pane, .template-detail-pane {
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.customer-detail-pane, .template-detail-pane { min-height: 540px; }

.pane-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.pane-header h3 { font-size: 16px; font-weight: 700; }

.primary.small {
  padding: 7px 14px; background: var(--primary); color: white;
  border: none; border-radius: var(--r-sm); cursor: pointer;
  font-size: 13px; font-weight: 600; font-family: inherit;
  transition: var(--transition);
}
.primary.small:hover { background: var(--primary-dark); }

.customer-search {
  width: 100%; padding: 10px 13px;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  font-size: 13px; margin-bottom: 14px; font-family: inherit;
}

.customer-list, .template-list { max-height: 600px; overflow-y: auto; }
.customer-row, .template-row {
  padding: 12px 14px; border-radius: var(--r-sm); cursor: pointer;
  border: 1px solid transparent; margin-bottom: 4px;
  transition: var(--transition);
}
.customer-row:hover, .template-row:hover { background: var(--bg-alt); }
.customer-row.active, .template-row.active {
  background: var(--primary-soft); border-color: var(--primary);
}
.customer-row .name, .template-row .name {
  font-weight: 600; font-size: 14px; color: var(--text);
  display: block; margin-bottom: 3px;
}
.customer-row .meta, .template-row .meta {
  font-size: 12px; color: var(--text-muted);
}

.empty-state { text-align: center; padding: 28px 16px; color: var(--text-muted); font-size: 13px; }
.empty-state.large { padding: 80px 24px; }
.empty-state.large h3 { color: var(--text); margin-bottom: 10px; font-size: 20px; }

.placeholder-list {
  text-align: left; background: var(--bg-alt);
  padding: 18px; border-radius: var(--r);
  margin-top: 24px; font-size: 13px;
  max-width: 540px; margin-left: auto; margin-right: auto;
}
.placeholder-list strong { display: block; margin-bottom: 10px; }
.placeholder-list ul { padding-left: 22px; }
.placeholder-list li { margin-bottom: 4px; }
.placeholder-list code {
  background: var(--surface); padding: 2px 7px;
  border-radius: 4px; border: 1px solid var(--border);
  font-size: 12px; font-family: 'JetBrains Mono', monospace;
}

/* Customer detail */
.customer-detail h3 { font-size: 22px; font-weight: 700; margin-bottom: 4px; letter-spacing: -0.01em; }
.customer-detail .addr { color: var(--text-muted); margin-bottom: 18px; font-size: 14px; }

.customer-meta-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px;
}
.customer-meta-grid label {
  font-size: 11px; color: var(--text-muted); display: block;
  margin-bottom: 5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
}
.customer-meta-grid input, .customer-meta-grid textarea {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  font-size: 13px; font-family: inherit;
  transition: var(--transition);
}
.customer-meta-grid input:focus, .customer-meta-grid textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.customer-section-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-muted); margin: 24px 0 10px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 600;
}

.note-list .note {
  background: var(--warning-soft);
  padding: 12px 14px;
  border-radius: var(--r-sm);
  margin-bottom: 8px;
  border-left: 3px solid var(--warning);
  font-size: 13px;
}
.note-list .note .meta {
  font-size: 11px; color: var(--text-muted);
  margin-top: 6px; display: flex; justify-content: space-between;
}
.note-list .delete-note {
  background: transparent; border: none; color: var(--danger);
  cursor: pointer; font-size: 12px; font-weight: 500;
}

.note-input { display: flex; gap: 8px; }
.note-input textarea {
  flex: 1; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  font-size: 13px; resize: vertical; min-height: 64px; font-family: inherit;
}
.note-input button {
  padding: 0 18px; background: var(--primary); color: white;
  border: none; border-radius: var(--r-sm);
  cursor: pointer; font-weight: 600; font-family: inherit;
}

.attachments-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.attachment-card {
  position: relative; background: var(--bg-alt); border-radius: var(--r-sm);
  overflow: hidden; border: 1px solid var(--border);
  aspect-ratio: 1; cursor: pointer; transition: var(--transition);
}
.attachment-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.attachment-card img { width: 100%; height: 100%; object-fit: cover; }
.attachment-card .doc-icon {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; padding: 10px; text-align: center;
  font-size: 12px; color: var(--text-muted);
}
.attachment-card .doc-icon .icon { font-size: 28px; margin-bottom: 6px; }
.attachment-card .delete {
  position: absolute; top: 6px; right: 6px;
  background: rgba(0,0,0,0.7); color: white;
  border: none; border-radius: 50%;
  width: 22px; height: 22px; cursor: pointer;
  font-size: 14px; line-height: 22px; padding: 0;
}
.attachment-card .name {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: white; font-size: 10px; padding: 8px 8px 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.upload-trigger {
  border: 2px dashed var(--border); border-radius: var(--r-sm);
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-muted);
  font-size: 11px; text-align: center; padding: 10px;
  transition: var(--transition);
}
.upload-trigger:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

.history-list { display: flex; flex-direction: column; gap: 8px; }
.history-row {
  background: var(--bg-alt); padding: 12px 14px;
  border-radius: var(--r-sm); display: flex;
  justify-content: space-between; align-items: center; font-size: 13px;
}
.history-row .actions { display: flex; gap: 4px; }
.history-row button {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 5px 11px;
  cursor: pointer; font-size: 12px; font-family: inherit;
}
.history-row button.danger { color: var(--danger); border-color: #fca5a5; }

.danger {
  background: var(--danger-soft); color: var(--danger);
  border: 1px solid #fca5a5; padding: 9px 16px;
  border-radius: var(--r-sm); cursor: pointer;
  font-size: 13px; font-weight: 500; font-family: inherit;
  transition: var(--transition);
}
.danger:hover { background: #fee2e2; }

.template-edit input, .template-edit textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  font-size: 13px; font-family: inherit;
}
.template-edit label {
  font-size: 11px; color: var(--text-muted);
  display: block; margin: 12px 0 5px;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
}
.template-line-table { width: 100%; border-collapse: collapse; margin-top: 14px; }
.template-line-table th, .template-line-table td { padding: 8px 5px; font-size: 12px; border-bottom: 1px solid var(--border); text-align: left; }
.template-line-table th { color: var(--text-muted); text-transform: uppercase; font-size: 10px; letter-spacing: 0.06em; font-weight: 600; }
.template-line-table input {
  width: 100%; padding: 7px 9px; font-size: 12px;
  border: 1px solid transparent; background: transparent;
  border-radius: var(--r-sm); font-family: inherit;
  transition: var(--transition);
}
.template-line-table input:focus { background: var(--surface); border-color: var(--primary); outline: none; }
.template-line-table .remove-tpl-row { background: transparent; border: none; color: var(--danger); cursor: pointer; font-size: 16px; }

.settings-grid { max-width: 720px; }

.storage-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px; background: var(--bg-alt);
  padding: 18px; border-radius: var(--r); margin-bottom: 18px;
}
.stat-item { font-size: 13px; }
.stat-item span { color: var(--text-muted); }
.stat-item strong { display: block; font-size: 20px; margin-top: 4px; color: var(--text); font-weight: 700; }

.storage-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.storage-actions .primary, .storage-actions .secondary {
  padding: 11px 18px; border-radius: var(--r-sm);
  border: none; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: var(--transition);
}
.storage-actions .primary { background: var(--primary); color: white; }
.storage-actions .primary:hover { background: var(--primary-dark); }
.storage-actions .secondary { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.storage-actions .secondary:hover { background: var(--bg-alt); }

.template-apply-select {
  padding: 9px 14px; border: 1px solid var(--border);
  background: var(--surface); border-radius: var(--r-sm);
  font-size: 13px; cursor: pointer; font-family: inherit;
}

.estimate-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.secondary.big {
  padding: 15px; background: var(--surface);
  color: var(--text); border: 1px solid var(--border);
  border-radius: var(--r); font-size: 16px; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: var(--transition);
}
.secondary.big:hover { background: var(--bg-alt); }

/* ============================== ESTIMATE BUILDER ============================== */
.estimate-section {
  background: var(--bg); padding: 56px 24px;
  border-top: 1px solid var(--border);
}
.estimate-wrap { max-width: 1400px; margin: 0 auto; }
.estimate-section h2 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; }
.estimate-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px; }
.estimate-col { display: flex; flex-direction: column; gap: 16px; }

.estimate-card {
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.estimate-card h3 {
  font-size: 17px; font-weight: 700; margin-bottom: 14px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border);
  letter-spacing: -0.01em;
}
.estimate-card label {
  display: block; font-size: 11px; color: var(--text-muted);
  margin: 12px 0 5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.estimate-card input[type="text"],
.estimate-card input[type="number"],
.estimate-card input[type="password"],
.estimate-card textarea {
  width: 100%; padding: 10px 13px;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  font-size: 14px; font-family: inherit; background: var(--surface);
  transition: var(--transition);
}
.estimate-card input:focus, .estimate-card textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.logo-uploader { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.logo-preview {
  width: 100px; height: 100px;
  border: 2px dashed var(--border); border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-alt); color: var(--text-muted);
  font-size: 11px; text-align: center;
  overflow: hidden; flex-shrink: 0;
}
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-actions { display: flex; flex-direction: column; gap: 7px; }
.logo-actions button {
  padding: 9px 15px; border: 1px solid var(--border);
  background: var(--surface); border-radius: var(--r-sm);
  cursor: pointer; font-size: 13px; font-weight: 500; font-family: inherit;
  transition: var(--transition);
}
.logo-actions button:hover { background: var(--bg-alt); }

.line-items { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.line-items th, .line-items td {
  padding: 10px 7px; text-align: left;
  border-bottom: 1px solid var(--border-soft); font-size: 13px;
}
.line-items th {
  background: var(--bg-alt); font-weight: 600;
  color: var(--text-muted); text-transform: uppercase;
  font-size: 10px; letter-spacing: 0.06em;
}
.line-items input {
  width: 100%; padding: 7px 10px;
  border: 1px solid transparent; border-radius: 5px;
  font-size: 13px; background: transparent; font-family: inherit;
  transition: var(--transition);
}
.line-items input:focus { background: var(--surface); border-color: var(--primary); outline: none; }
.line-items td.row-total { font-weight: 600; text-align: right; padding-right: 12px; font-variant-numeric: tabular-nums; }
.line-items .remove-row {
  background: transparent; border: none; color: var(--danger);
  cursor: pointer; font-size: 18px; padding: 0 6px;
}
.line-actions { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.line-actions button {
  padding: 9px 15px; border: 1px solid var(--border);
  background: var(--surface); border-radius: var(--r-sm);
  cursor: pointer; font-size: 13px; font-family: inherit;
  transition: var(--transition);
}
.line-actions button:hover { background: var(--bg-alt); }

.totals-area {
  background: var(--bg-alt); border-radius: var(--r);
  padding: 16px 20px; margin-bottom: 18px;
}
.total-row {
  display: grid; grid-template-columns: 1fr auto auto;
  gap: 14px; align-items: center;
  padding: 7px 0; font-size: 14px;
}
.total-row label { margin: 0; color: var(--text); font-weight: 500; text-transform: none; letter-spacing: 0; font-size: 14px; }
.total-row input {
  width: 70px; padding: 6px 9px !important;
  font-size: 13px; text-align: right;
  border: 1px solid var(--border) !important;
  border-radius: 4px !important; background: var(--surface) !important;
}
.total-row span { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; min-width: 100px; }
.total-row.grand { border-top: 2px solid var(--text); margin-top: 8px; padding-top: 14px; font-size: 19px; }
.total-row.grand label { font-weight: 700; }
.total-row.grand span { color: var(--primary); font-weight: 800; }

.primary.big {
  width: 100%; padding: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white; border: none; border-radius: var(--r);
  font-size: 16px; font-weight: 700;
  cursor: pointer; margin-top: 14px; font-family: inherit;
  box-shadow: 0 4px 14px rgba(249,115,22,0.35);
  transition: var(--transition);
}
.primary.big:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(249,115,22,0.5); }

/* ============================== PHOTO ANALYSIS ============================== */
.photo-section {
  background: var(--surface); padding: 56px 24px;
  border-top: 1px solid var(--border);
}
.photo-wrap { max-width: 1400px; margin: 0 auto; }
.photo-section h2 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; }
.section-sub { color: var(--text-muted); margin-bottom: 28px; font-size: 14px; }

.badge {
  background: var(--accent); color: white; font-size: 10px;
  padding: 3px 9px; border-radius: 12px; vertical-align: middle;
  margin-left: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
}

.photo-tabs {
  display: flex; gap: 4px; border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
.ptab {
  background: transparent; border: none;
  padding: 12px 22px; font-size: 14px; font-weight: 600;
  color: var(--text-muted); cursor: pointer;
  border-bottom: 2.5px solid transparent; margin-bottom: -1px;
  font-family: inherit; transition: var(--transition);
}
.ptab.active { color: var(--primary); border-bottom-color: var(--primary); }
.ptab:hover { color: var(--text); }
.ptab-panel { display: none; }
.ptab-panel.active { display: block; }

.upload-area {
  border: 2px dashed var(--border); border-radius: var(--r-md);
  padding: 48px; text-align: center; cursor: pointer;
  background: var(--bg-alt); transition: var(--transition); margin-bottom: 18px;
}
.upload-area:hover, .upload-area.dragover {
  border-color: var(--primary); background: var(--primary-soft);
}
.upload-prompt strong { display: block; font-size: 16px; margin-bottom: 6px; font-weight: 600; }
.upload-prompt span { color: var(--text-muted); font-size: 13px; }

.pitch-photo-tools { display: grid; grid-template-columns: 1fr 320px; gap: 22px; margin-bottom: 18px; }
.pitch-canvas-wrap, .siding-canvas-wrap {
  background: #1e293b; border-radius: var(--r-md);
  overflow: hidden; position: relative;
}
.pitch-canvas-wrap canvas, .siding-canvas-wrap canvas {
  display: block; width: 100%; height: auto; cursor: crosshair;
}
.canvas-help {
  position: absolute; top: 10px; left: 10px;
  background: rgba(15,23,42,0.85); color: white;
  padding: 7px 12px; border-radius: var(--r-sm);
  font-size: 12px; pointer-events: none;
}

.pitch-readout {
  background: var(--bg-alt); padding: 18px;
  border-radius: var(--r); display: flex; flex-direction: column; gap: 10px;
}
.pitch-readout button {
  padding: 11px; border: none; border-radius: var(--r-sm);
  font-weight: 600; cursor: pointer; font-size: 14px;
  margin-top: 6px; font-family: inherit;
}
.pitch-readout .primary { background: var(--primary); color: white; }
.pitch-readout .secondary { background: var(--surface); border: 1px solid var(--border); color: var(--text); }

.opening-toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin-bottom: 14px; padding: 14px;
  background: var(--bg-alt); border-radius: var(--r);
}
.opening-toolbar label { font-size: 13px; width: 100%; margin-bottom: 4px; font-weight: 500; }
.opening-toolbar select {
  flex: 1; min-width: 220px; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  font-size: 13px; background: var(--surface); font-family: inherit;
}
.opening-toolbar button {
  padding: 9px 16px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; font-size: 13px; font-weight: 500; font-family: inherit;
  transition: var(--transition);
}
.opening-toolbar button:hover { background: var(--bg-alt); }

.siding-readout {
  background: var(--bg-alt); padding: 18px;
  border-radius: var(--r); margin-top: 18px;
}

.tip-box {
  background: var(--accent-soft); border-left: 3px solid var(--accent);
  padding: 13px 17px; border-radius: var(--r-sm);
  font-size: 13px; color: var(--text); margin-top: 14px; line-height: 1.55;
}

/* ============================== PRICING ============================== */
.pricing-section {
  background: var(--surface); padding: 80px 24px;
  border-top: 1px solid var(--border);
}
.pricing-wrap { max-width: 1200px; margin: 0 auto; }
.pricing-section h2 { text-align: center; font-size: 36px; font-weight: 800; letter-spacing: -0.025em; margin-bottom: 12px; }

.pricing-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px; margin-top: 36px;
}
.pricing-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 32px 26px;
  text-align: center; position: relative;
  display: flex; flex-direction: column;
  transition: var(--transition);
}
.pricing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.pricing-card.featured {
  border-color: var(--accent); border-width: 2px;
  transform: scale(1.04);
  box-shadow: 0 12px 32px rgba(249,115,22,0.18);
}
.pricing-card.featured:hover { transform: scale(1.04) translateY(-4px); }
.featured-badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: white;
  padding: 5px 16px; border-radius: 14px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  box-shadow: var(--shadow);
}
.pricing-card h3 { font-size: 18px; margin-bottom: 14px; font-weight: 700; }
.price { margin-bottom: 24px; }
.price .amount { font-size: 44px; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.price .period { color: var(--text-muted); font-size: 14px; }
.features { list-style: none; padding: 0; margin: 0 0 22px; text-align: left; flex: 1; }
.features li { padding: 8px 0; font-size: 13px; border-bottom: 1px solid var(--border-soft); }
.features li:last-child { border-bottom: none; }
.signup-btn {
  width: 100%; padding: 13px; border: none; border-radius: var(--r-sm);
  font-weight: 700; font-size: 14px; cursor: pointer; font-family: inherit;
  transition: var(--transition);
}
.signup-btn.primary { background: var(--primary); color: white; }
.signup-btn.primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
.signup-btn.secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.signup-btn.secondary:hover { background: var(--bg-alt); }

/* ============================== INFO SECTIONS ============================== */
.info { padding: 80px 24px; background: var(--surface); }
.info.alt { background: var(--bg); }
.info h2 { font-size: 32px; font-weight: 800; letter-spacing: -0.025em; text-align: center; margin-bottom: 44px; }
.info h3 { font-size: 18px; font-weight: 700; margin: 28px 0 10px; }
.info p, .info ul { max-width: 800px; margin: 0 auto 14px; }
.info ul { padding-left: 24px; }
.info li { margin-bottom: 6px; }

.steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px; max-width: 1200px; margin: 0 auto;
}
.step {
  background: var(--bg); padding: 28px;
  border-radius: var(--r-md); text-align: center;
  border: 1px solid var(--border-soft);
}
.info.alt .step { background: var(--surface); }
.num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white; border-radius: 50%;
  font-weight: 700; font-size: 18px; margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.step h3 { margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--text-muted); }

/* ============================== MODAL ============================== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.6);
  backdrop-filter: blur(8px);
  z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-card {
  background: var(--surface); border-radius: var(--r-lg);
  max-width: 540px; width: 100%; padding: 32px;
  box-shadow: var(--shadow-xl);
  max-height: 90vh; overflow-y: auto;
  border: 1px solid var(--border);
}
.modal-card h3 { margin-bottom: 8px; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.template-picker { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.template-pick-card {
  text-align: left; padding: 16px 18px;
  border: 2px solid var(--border); background: var(--surface);
  border-radius: var(--r); cursor: pointer;
  display: flex; flex-direction: column; gap: 4px;
  transition: var(--transition); font-family: inherit;
}
.template-pick-card:hover {
  border-color: var(--primary); background: var(--primary-soft);
  transform: translateY(-2px); box-shadow: var(--shadow);
}
.template-pick-card strong { font-size: 15px; color: var(--text); font-weight: 700; }
.template-pick-card span { font-size: 12px; color: var(--text-muted); }

/* ============================== FOOTER ============================== */
footer {
  background: #0f172a; color: #94a3b8;
  text-align: center; padding: 28px;
  font-size: 13px;
}
footer a { color: #cbd5e1; }

/* ============================== RESPONSIVE ============================== */
@media (max-width: 960px) {
  .workspace { grid-template-columns: 1fr; }
  #map { height: 440px; }
  .sv-container { height: 280px; }
  .hero h2 { font-size: 36px; }
  .pricing-section h2 { font-size: 28px; }
  nav { display: none; }
  .tagline { display: none; }
}

/* ============= MOBILE-SPECIFIC ============= */
@media (max-width: 640px) {
  .topbar { padding: 12px 16px; }
  .app { padding: 20px 12px; }
  .hero { padding: 56px 20px 64px; }
  .hero h2 { font-size: 28px; line-height: 1.15; }
  .hero p { font-size: 16px; }

  /* Search bar — stack vertically so it can use full width */
  .search-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .search-input-wrap { width: 100%; }
  .search-bar input {
    font-size: 16px; /* 16px prevents iOS Safari from zooming in on focus */
    padding: 14px 16px;
    width: 100%;
    box-sizing: border-box;
  }
  .search-bar button {
    width: 100%;
    padding: 14px;
    font-size: 15px;
  }
  .status {
    min-width: auto;
    width: 100%;
    text-align: center;
    margin-top: 4px;
  }
  .search-tip { font-size: 12px; padding: 9px 12px; }

  /* Autocomplete dropdown — bigger touch targets */
  .suggestions { max-height: 260px; }
  .suggestion {
    padding: 14px 12px;
    font-size: 15px;
  }
  .suggestion .text strong { font-size: 15px; }
  .suggestion .text span { font-size: 13px; }

  /* Map height shorter on phones */
  #map { height: 360px; }

  /* Workflow stepper hides on tiny screens (saves space, isn't critical) */
  .workflow-stepper { display: none; }

  /* Panel padding tighter */
  .panel { padding: 16px; }
  .panel h3 { font-size: 16px; margin-bottom: 14px; }

  /* Estimate grid stacks */
  .estimate-grid { gap: 14px; }
  .estimate-card { padding: 18px; }
  .two-col { grid-template-columns: 1fr; }

  /* Customer detail meta grid stacks */
  .customer-meta-grid { grid-template-columns: 1fr; gap: 10px; }

  /* Pricing cards smaller */
  .pricing-section { padding: 48px 16px; }
  .pricing-card { padding: 24px 20px; }
  .pricing-card.featured { transform: none; }

  /* Section headings */
  .info { padding: 48px 20px; }
  .info h2 { font-size: 24px; margin-bottom: 28px; }
  .photo-section, .estimate-section, .dashboard-section { padding: 36px 16px; }

  /* Modals fit phone */
  .modal-card { padding: 22px; max-height: 88vh; }
  .modal-card h3 { font-size: 18px; }

  /* Login modal — already good but ensure tap targets are big */
  .auth-modal { max-width: 100%; }
  .auth-form { padding: 22px; }
  .auth-form input { font-size: 16px; padding: 13px 14px; }

  /* Click-house prompt — small toast at the bottom on mobile (not blocking the map) */
  .click-house-prompt {
    top: auto !important;
    bottom: 8px;
    left: 8px;
    right: 8px;
    transform: none !important;
    min-width: 0;
    max-width: none;
    padding: 9px 11px;
  }
  .chp-content { gap: 8px; align-items: center; }
  .chp-icon { font-size: 18px; }
  .chp-content strong { font-size: 12px; }
  .chp-content small { font-size: 10.5px; line-height: 1.3; display: block; margin-top: 2px; }
  .chp-close { font-size: 22px; padding: 0 6px; }
}
@media (max-width: 900px) {
  .customer-layout, .templates-layout { grid-template-columns: 1fr; }
  .estimate-grid { grid-template-columns: 1fr; }
  .estimate-buttons { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .pitch-photo-tools { grid-template-columns: 1fr; }
}
