:root {
  --primary: #2f6690;
  --primary-dark: #1e4a6b;
  --primary-light: #e7f0f6;
  --accent: #ff8a5c;
  --bg-top: #eef4f8;
  --bg-bottom: #f7f9fb;
  --card-bg: #ffffff;
  --border: #e1e8ec;
  --text: #1c2b33;
  --muted: #66757e;
  --error: #c4453a;
  --error-bg: #fdeceb;
  --success: #1e8a53;
  --success-bg: #e9f8ef;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(20, 40, 55, 0.04), 0 8px 24px rgba(20, 40, 55, 0.06);
  --shadow-lift: 0 2px 6px rgba(20, 40, 55, 0.06), 0 16px 36px rgba(20, 40, 55, 0.10);
}

* { box-sizing: border-box; }

.hidden { display: none !important; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 45%);
  min-height: 100vh;
  position: relative;
}

.bg-decor {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px 300px at 15% -5%, rgba(47, 102, 144, 0.10), transparent 60%),
    radial-gradient(500px 260px at 100% 0%, rgba(255, 138, 92, 0.10), transparent 60%);
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

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

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-dark);
  background: var(--primary-light);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

header h1 {
  font-size: 2rem;
  font-weight: 800;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}
header .sub {
  color: var(--muted);
  margin: 0;
  font-size: 1rem;
}

.progress { margin: 28px 0 24px; }
.progress-track {
  height: 6px;
  background: #dfe7ec;
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 10%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 999px;
  transition: width 0.35s ease;
}
.progress-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}
.progress-labels .step {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  flex: 1;
  text-align: center;
}
.progress-labels .step:first-child { text-align: left; }
.progress-labels .step:last-child { text-align: right; }
.progress-labels .step.active { color: var(--primary-dark); }

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  animation: rise 0.35s ease;
}
.card.hidden { display: none; }

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

.card-icon {
  font-size: 1.7rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  border-radius: 12px;
  margin-bottom: 14px;
}

h2 { margin: 0 0 6px; font-size: 1.35rem; font-weight: 700; letter-spacing: -0.01em; }
.card-lead { color: var(--muted); margin-top: 0; }

.checklist {
  list-style: none;
  padding: 0;
  margin: 14px 0 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--text);
}
.tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--primary-dark);
  background: var(--primary-light);
  padding: 3px 8px;
  border-radius: 6px;
  flex-shrink: 0;
  min-width: 58px;
  text-align: center;
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  border: 2px dashed #c3d3dc;
  border-radius: 14px;
  padding: 32px 20px;
  cursor: pointer;
  background: #fafcfd;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.dropzone-icon { font-size: 1.6rem; margin-bottom: 4px; }
.dropzone .hint { margin-top: 4px; }

.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 7px; font-size: 0.92rem; }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="number"] {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 102, 144, 0.15);
}
.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; }

.choice-row { display: flex; flex-direction: column; gap: 8px; }
.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 400;
  font-size: 0.94rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.choice:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
}
.choice input { accent-color: var(--primary); width: 16px; height: 16px; }

.hint { font-size: 0.82rem; color: var(--muted); margin: 6px 0 0; line-height: 1.4; }

.error {
  color: var(--error);
  font-size: 0.88rem;
  min-height: 1.2em;
  margin: 10px 0 0;
}
.error:empty { margin: 0; }
.success { color: var(--success); font-size: 0.9rem; font-weight: 600; }

.btn {
  padding: 12px 22px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: white;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: #f4f7f8; }
.btn:active { transform: scale(0.98); }
.btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: transparent;
  color: white;
}
.btn.primary:hover { filter: brightness(1.06); }
.btn.outline { background: white; border-color: var(--primary); color: var(--primary-dark); }
.btn.outline:hover { background: var(--primary-light); }
.btn.full { width: 100%; margin-top: 4px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-row { display: flex; justify-content: space-between; margin-top: 22px; gap: 12px; }

.verify-choice { display: flex; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.verify-choice .btn { flex: 1; }

.code-row { display: flex; gap: 10px; }
.code-row input {
  flex: 1;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  text-align: center;
}

.photo-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}
.photo-preview .thumb {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }

.divider { height: 1px; background: var(--border); margin: 22px 0; }

.analyzing {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.92rem;
  padding: 6px 0;
}
.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid var(--primary-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

.detected-card {
  background: var(--primary-light);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
}
.detected-label { font-weight: 700; font-size: 0.92rem; color: var(--primary-dark); margin-bottom: 12px; }
.count-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.count-row input {
  width: 84px;
  text-align: center;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-dark);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 8px 4px;
  font-family: inherit;
}
.stepper {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: white;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-dark);
  cursor: pointer;
  line-height: 1;
}
.stepper:hover { background: white; border-color: var(--primary); }

.confidence-row { margin-top: 12px; }
.confidence-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 4px 10px;
  border-radius: 999px;
}
.confidence-badge.high { background: var(--success-bg); color: var(--success); }
.confidence-badge.medium { background: #fff4e0; color: #a9670a; }
.confidence-badge.low { background: var(--error-bg); color: var(--error); }

.confirmed-steps-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--success-bg);
  color: var(--success);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 20px;
}
.confirmed-steps-banner:empty { display: none; margin: 0; }

.quote-total {
  font-size: 2.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 4px 0 6px;
}
.quote-line {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  line-height: 1.45;
}
.quote-line:last-of-type { border-bottom: none; }
.disclaimer {
  margin-top: 22px;
  font-size: 0.82rem;
  color: var(--muted);
  background: #f2f6f8;
  padding: 14px;
  border-radius: 10px;
  line-height: 1.5;
}
.blocked {
  background: var(--error-bg);
  border: 1px solid #f3c2bd;
  padding: 18px;
  border-radius: 12px;
  color: var(--error);
}
.blocked ul { margin: 8px 0 0; padding-left: 18px; }

.model-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}
.model-card {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.model-card:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
}
.model-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
}
.model-card-top .price { color: var(--primary-dark); }
.model-card input { accent-color: var(--primary); margin-right: 8px; }
.model-card .model-note { font-size: 0.85rem; color: var(--muted); margin-top: 6px; }

.option-note {
  background: var(--primary-light);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.88rem;
  color: var(--primary-dark);
  margin-bottom: 16px;
}
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
  cursor: pointer;
}
.checkbox-row input { accent-color: var(--primary); width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; }
.checkbox-row .checkbox-title { font-weight: 600; }
.checkbox-row .checkbox-sub { font-size: 0.85rem; color: var(--muted); margin-top: 2px; }

.result-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 18px 0;
}
.result-card {
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  position: relative;
}
.result-card.highlight { border-color: var(--primary); background: var(--primary-light); }
.result-card-name { font-size: 1.05rem; font-weight: 800; margin-bottom: 2px; }
.result-card-total {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin: 4px 0 12px;
}
.result-card .quote-line { padding: 8px 0; font-size: 0.86rem; }
.warranty-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.warranty-list li { font-size: 0.85rem; display: flex; gap: 6px; }
.warranty-list li::before { content: "🛡️"; flex-shrink: 0; }
.warranty-heading {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  margin-top: 14px;
  margin-bottom: 4px;
}

.logo-preview-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  margin-bottom: 10px;
  padding: 12px;
  background: #fafcfd;
}
.logo-preview-wrap img { max-height: 64px; max-width: 100%; object-fit: contain; }
.logo-preview-wrap .placeholder { color: var(--muted); font-size: 0.85rem; }

.brand-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 14px;
}
.brand-header img { max-height: 48px; max-width: 200px; object-fit: contain; }
.brand-phone {
  text-align: center;
  font-size: 0.92rem;
  color: var(--primary-dark);
  font-weight: 600;
  margin-bottom: 18px;
}
.brand-phone a { color: inherit; text-decoration: none; }
.brand-phone a:hover { text-decoration: underline; }

@media (max-width: 480px) {
  .card { padding: 22px; }
  header h1 { font-size: 1.6rem; }
  .field-row { flex-direction: column; gap: 0; }
}
