/* KMU Navigation – Stile für die nativen Frageblöcke (mehrstufig). */

.form-page { background: var(--grey-bg); min-height: 100vh; }

.form-shell { max-width: 760px; margin: 0 auto; padding: 32px 24px 80px; }

.form-head { text-align: center; margin-bottom: 28px; }
.form-head h1 { color: var(--primary); font-size: 28px; }
.form-head .form-intro {
  color: var(--text-light); max-width: 56ch; margin: 12px auto 0; font-size: 15px;
}

/* ---------- Fortschritt ---------- */
.progress-wrap { margin: 0 0 28px; }
.progress-wrap.has-areas {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 22px;
}
.progress-wrap.has-areas .progress { margin: 0; }
.progress-area { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.progress-wrap.has-areas .progress-area + .progress-area { position: relative; }
.progress-wrap.has-areas .progress-area + .progress-area::before {
  content: ""; position: absolute; left: -12px; top: 22px; bottom: 4px; width: 1px; background: var(--grey-border);
}
.progress-area-name {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--accent);
}
.progress { display: flex; gap: 8px; margin: 0 0 28px; list-style: none; flex-wrap: wrap; justify-content: center; }
.progress li {
  font-size: 12px; font-weight: 600; color: var(--text-light);
  padding: 6px 12px; border-radius: 999px; background: white; border: 1px solid var(--grey-border);
  display: flex; align-items: center; gap: 6px;
}
.progress li .num {
  width: 20px; height: 20px; border-radius: 50%; background: var(--grey-border); color: white;
  display: inline-flex; align-items: center; justify-content: center; font-size: 11px;
}
.progress li.active { color: var(--primary); border-color: var(--accent); }
.progress li.active .num { background: var(--accent); }
.progress li.done .num { background: var(--green); }

/* ---------- Karte / Schritt ---------- */
.form-card {
  background: white; border: 1px solid var(--grey-border); border-radius: var(--radius);
  padding: 32px; box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.step { display: none; }
.step.active { display: block; animation: stepIn .2s ease; }
@keyframes stepIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.step-area {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--accent); margin-bottom: 4px;
}
.step h2 { color: var(--primary); font-size: 20px; margin-bottom: 6px; }
.step .step-count { font-size: 13px; color: var(--text-light); margin-bottom: 6px; }
.step .step-intro {
  font-size: 14px; color: var(--text-light); background: var(--grey-bg);
  border-left: 3px solid var(--accent); padding: 10px 14px; border-radius: 0 8px 8px 0; margin-bottom: 22px;
}
.field-note { font-size: 14px; color: var(--text-light); margin-bottom: 16px; }
.field-note.field-warn {
  color: var(--primary); background: #FFF7E6; border: 1px solid #F0C36D;
  border-radius: 8px; padding: 12px 14px; font-weight: 500;
}

/* ---------- Felder ---------- */
.field { margin-bottom: 22px; }
.field > label.field-label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 15px; }
.field .req { color: var(--red); margin-left: 2px; }
.field input[type=text], .field input[type=email], .field input[type=tel],
.field input[type=number], .field input[type=date], .field select, .field textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--grey-border); border-radius: 8px;
  font-size: 15px; font-family: inherit; color: var(--text); background: white;
}
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(68,114,196,0.15);
}
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--red); }
.field .err-msg { color: var(--red); font-size: 13px; margin-top: 6px; display: none; }
.field.invalid .err-msg { display: block; }

/* Radio / Checkbox-Gruppen */
.choices { display: flex; flex-direction: column; gap: 8px; }
.choices.inline { flex-direction: row; flex-wrap: wrap; gap: 10px; }
.choice {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border: 1px solid var(--grey-border); border-radius: 8px; cursor: pointer; font-size: 15px;
}
.choice:hover { background: var(--grey-bg); }
.choice input { accent-color: var(--accent); width: 18px; height: 18px; }
.choice.selected { border-color: var(--accent); background: rgba(68,114,196,0.06); }

/* Datei-Upload */
.field input[type=file] {
  width: 100%; padding: 14px; border: 2px dashed var(--grey-border); border-radius: 8px;
  background: var(--grey-bg); font-size: 14px; cursor: pointer;
}
.field .file-hint { font-size: 12px; color: var(--text-light); margin-top: 6px; }

/* ---------- Navigation ---------- */
.form-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }
.form-nav .spacer { flex: 1; }
.form-error-summary {
  background: #FDECEC; border: 1px solid var(--red); color: var(--red);
  padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; font-size: 14px; display: none;
}
.form-error-summary.show { display: block; }

/* ---------- Fortschritt speichern / laden ---------- */
.form-save-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 6px; }
.form-save-bar .btn { padding: 9px 16px; font-size: 13px; cursor: pointer; }
.form-save-bar [data-load-progress-label] { display: inline-flex; align-items: center; }
.form-save-status { font-size: 12.5px; color: var(--text-light); }
.form-save-status.is-error { color: var(--red); }
.form-save-hint { font-size: 12.5px; color: var(--text-light); margin: 0 0 18px; }

.form-legal { font-size: 12px; color: var(--text-light); margin-top: 18px; text-align: center; }
.form-legal a { color: var(--accent); }

.topbar-min { background: white; border-bottom: 1px solid var(--grey-border); }
.topbar-min .container { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.topbar-min .back-link { color: var(--text-light); text-decoration: none; font-size: 14px; }
.topbar-min .back-link:hover { color: var(--primary); }

/* ---------- Zwischenüberschrift ---------- */
.field-heading {
  color: var(--primary); font-size: 16px; font-weight: 700;
  margin: 30px 0 6px; padding-bottom: 6px; border-bottom: 1px solid var(--grey-border);
}

/* ---------- Zahlenfeld mit Einheit (CHF / %) ---------- */
.input-suffix { position: relative; display: flex; align-items: center; }
.input-suffix input { padding-right: 52px; }
.input-suffix .suffix {
  position: absolute; right: 12px; color: var(--text-light); font-size: 14px;
  font-weight: 600; pointer-events: none;
}

/* ---------- Live-Rechner (Substanzwert) ---------- */
.calc-field { margin-bottom: 22px; }
.calc-box {
  background: var(--grey-bg); border: 1px solid var(--grey-border);
  border-radius: 10px; padding: 18px 20px;
}
.calc-title { font-weight: 700; color: var(--primary); margin-bottom: 10px; font-size: 15px; }
.calc-line {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 7px 0; font-size: 14px; color: var(--text);
}
.calc-line + .calc-line { border-top: 1px dashed var(--grey-border); }
.calc-line small { color: var(--text-light); font-weight: 400; }
.calc-line output { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.calc-line.total {
  margin-top: 4px; border-top: 2px solid var(--accent);
  font-weight: 700; color: var(--primary); font-size: 15px;
}
.calc-line.total output { font-size: 17px; color: var(--accent); }
.calc-note { font-size: 12px; color: var(--text-light); margin-top: 12px; line-height: 1.5; }

/* ---------- Personen-Repeater ---------- */
.persons-rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.person-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)) 34px;
  gap: 10px; align-items: end;
  background: var(--grey-bg); border: 1px solid var(--grey-border);
  border-radius: 10px; padding: 12px 14px;
}
.person-cell { display: flex; flex-direction: column; min-width: 0; }
.person-cell label { font-size: 12px; color: var(--text-light); margin-bottom: 4px; }
.person-cell input, .person-cell select {
  width: 100%; padding: 8px 10px; border: 1px solid var(--grey-border); border-radius: 7px;
  font-size: 14px; font-family: inherit; background: white; color: var(--text);
}
.person-cell input:focus, .person-cell select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(68,114,196,0.15);
}
.person-remove {
  width: 34px; height: 38px; border: 1px solid var(--grey-border); border-radius: 7px;
  background: white; color: var(--text-light); font-size: 20px; line-height: 1; cursor: pointer;
}
.person-remove:hover { border-color: var(--red); color: var(--red); }
.person-add { padding: 9px 16px; font-size: 14px; }

@media (max-width: 600px) {
  .form-card { padding: 22px 18px; }
  .progress li span.label { display: none; }
  .person-row { grid-template-columns: 1fr 1fr; }
  .person-remove { grid-column: 1 / -1; width: auto; }
}
