:root {
  --bg: #F1F5F9;
  --card: #FFFFFF;
  --border: #E2E8F0;
  --header-bg: #111827;
  --header-subtle: #9CA3AF;
  --accent: #16A34A;
  --accent-dark: #127A3D;
  --accent-tint: #ECFDF5;
  --text: #111827;
  --muted: #6B7280;
  --error: #DC2626;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 1px rgba(15, 23, 42, 0.04);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  display: flex;
  flex-direction: column;
}

.header {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--header-bg);
  padding: 9px 18px;
  border-bottom: 2px solid var(--accent);
}
.badge {
  width: 30px; height: 30px;
  border-radius: 7px;
  background: var(--accent);
  color: white;
  font-weight: bold;
  font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}
.title-box { display: flex; align-items: baseline; gap: 8px; }
.title-box .title { color: white; font-weight: bold; font-size: 20px; }
.title-box .tagline { color: var(--header-subtle); font-size: 14px; }
.module-nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.module-nav a { font-size: 12px; font-weight: 700; color: var(--header-subtle); text-decoration: none; padding: 6px 10px; border-radius: 6px; white-space: nowrap; }
.module-nav a:hover { color: white; background: rgba(255, 255, 255, 0.08); }
.module-nav a.active { color: white; background: var(--accent); }

main { flex: 1; max-width: 820px; width: 100%; margin: 0 auto; padding: 28px 20px; }
.hidden { display: none !important; }

.intro { margin-bottom: 20px; }
.intro h1 { margin: 0 0 4px 0; font-size: 20px; }
.intro p { margin: 0; color: var(--muted); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 14px 18px;
  margin-bottom: 12px;
}
.card h2 {
  margin: 0 0 10px 0;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--accent-dark);
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 12px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; color: var(--text); margin-bottom: 5px; font-weight: 700; }
.field input[type="number"], .field input[type="text"], .field input[type="tel"], .field select {
  width: 100%;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 9px 11px;
  font-family: inherit;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

.dropzone {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  background: #F8FAFC;
}
.dropzone:hover { border-color: var(--accent); background: var(--accent-tint); }
.dropzone.dragover { border-color: var(--accent); background: var(--accent-tint); }

.actions { display: flex; align-items: center; gap: 12px; margin-top: 2px; flex-wrap: wrap; }
.accent-btn, .ghost-btn {
  border: none;
  border-radius: 6px;
  padding: 11px 26px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.accent-btn { background: var(--accent); color: white; }
.accent-btn:hover { background: var(--accent-dark); }
.accent-btn:disabled { background: #9CA3AF; cursor: default; }
.ghost-btn { background: white; color: var(--accent-dark); border: 1.5px solid var(--border); }
.ghost-btn:hover { background: var(--accent-tint); border-color: #A7F3D0; }

.error-msg { color: var(--error); font-size: 13px; font-weight: 700; margin-top: 10px; }
.status-msg { color: var(--muted); font-size: 13px; font-weight: 700; margin-top: 10px; }

.compare-row { display: flex; gap: 12px; flex-wrap: wrap; }
.compare-box { flex: 1 1 280px; }
.compare-box .compare-label { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 5px; }
.compare-box img {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
}

.step-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-dark);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 0 10px 0;
  text-decoration: none;
}
.step-back:hover { text-decoration: underline; }
