/* ==========================================================================
   Designsystem: Neutrales, hochwertiges Finanzdienstleistungsdesign
   Weiß / Off-White, Anthrazit, dezenter Gold-Akzent
   ========================================================================== */

:root {
  --color-bg: #F7F7F5;
  --color-surface: #FFFFFF;
  --color-text: #2E3135;
  --color-text-muted: #6B6E71;
  --color-gold: #C9A24B;
  --color-gold-light: #E9DCB9;
  --color-error: #B3261E;
  --color-border: #E1E1DE;
  --color-disabled-bg: #E5E5E3;
  --color-disabled-text: #A3A3A1;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-soft: 0 4px 20px rgba(46, 49, 53, 0.08);
  --font-base: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-base);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.app-shell {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 16px 64px;
}

.app-header {
  text-align: center;
  margin-bottom: 24px;
}

.app-header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: 0.2px;
}

.app-subtitle {
  color: var(--color-text-muted);
  margin: 0;
  font-size: 0.95rem;
}

/* Fortschrittsanzeige */
.progress-bar {
  margin-bottom: 24px;
}

.progress-track {
  height: 4px;
  background: var(--color-border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-fill {
  height: 100%;
  background: var(--color-gold);
  width: 12.5%;
  transition: width 0.3s ease;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  list-style: none;
  margin: 0;
  padding: 0;
}

.progress-step {
  flex: 1;
  text-align: center;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  cursor: default;
}

.step-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  font-weight: 600;
  margin-bottom: 4px;
}

.progress-step.active .step-dot {
  border-color: var(--color-gold);
  color: var(--color-gold);
}

.progress-step.completed .step-dot {
  background: var(--color-gold);
  border-color: var(--color-gold);
  color: var(--color-surface);
}

.progress-step.completed .step-dot::after {
  content: "\2713";
}

.progress-step.completed .step-dot {
  font-size: 0;
}

.progress-step.completed .step-dot::after {
  font-size: 0.85rem;
}

.step-label {
  display: block;
}

.progress-mobile {
  display: none;
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* Card */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 32px;
}

.step h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 20px;
  color: var(--color-text);
}

.step h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 24px 0 12px;
  color: var(--color-text);
}

.hint-text {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

/* Felder */
.field-group {
  margin-bottom: 18px;
}

.field-row {
  display: flex;
  gap: 16px;
}

.field-row .field-group {
  flex: 1;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--color-text);
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 0.95rem;
  font-family: var(--font-base);
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 75, 0.25);
}

input[readonly] {
  background: var(--color-bg);
  color: var(--color-text-muted);
}

input.invalid,
select.invalid,
textarea.invalid {
  border-color: var(--color-error);
}

.error-msg {
  display: block;
  min-height: 16px;
  font-size: 0.78rem;
  color: var(--color-error);
  margin-top: 4px;
}

.inline-input {
  width: auto;
  display: inline-block;
  margin-left: 8px;
  padding: 6px 10px;
}

fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

legend {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  padding: 0;
}

.radio-label,
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  font-size: 0.9rem;
  margin-bottom: 10px;
  cursor: pointer;
}

.checkbox-group {
  background: var(--color-bg);
  padding: 14px 16px;
  border-radius: var(--radius-md);
}

input[type="radio"],
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-gold);
  flex-shrink: 0;
}

.conditional-fields {
  border-left: 3px solid var(--color-gold-light);
  padding-left: 16px;
  margin-top: 8px;
}

.hidden {
  display: none !important;
}

/* Akkordeon */
.accordion {
  margin-bottom: 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.accordion-toggle {
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  background: var(--color-bg);
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
}

.accordion-toggle:hover {
  background: var(--color-gold-light);
}

.accordion-content {
  padding: 16px 18px;
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

.accordion-content h3 {
  font-size: 0.9rem;
  color: var(--color-text);
  margin: 16px 0 6px;
}

.accordion-content h3:first-child {
  margin-top: 0;
}

/* Zusammenfassung */
.summary {
  margin-top: 12px;
}

.summary-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

.summary-section:last-child {
  border-bottom: none;
}

.summary-section h3 {
  font-size: 0.95rem;
  margin: 0 0 10px;
  color: var(--color-text);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.summary-edit-link {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--color-gold);
  cursor: pointer;
  text-decoration: underline;
  background: none;
  border: none;
  padding: 0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 0.88rem;
}

.summary-row .summary-key {
  color: var(--color-text-muted);
}

.summary-row .summary-value {
  color: var(--color-text);
  font-weight: 500;
  text-align: right;
}

/* Buttons */
.nav-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 28px;
  gap: 12px;
}

.btn {
  padding: 12px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-text);
}

.btn-outline:hover {
  background: var(--color-bg);
}

.btn-primary {
  background: var(--color-gold);
  color: var(--color-text);
  margin-left: auto;
}

.btn-primary:hover {
  background: #B8913F;
}

.btn:disabled {
  background: var(--color-disabled-bg);
  color: var(--color-disabled-text);
  border-color: var(--color-disabled-bg);
  cursor: not-allowed;
}

.btn-outline:disabled {
  background: transparent;
  color: var(--color-disabled-text);
  border-color: var(--color-disabled-bg);
}

/* Bestätigungsseite */
.confirmation {
  text-align: center;
  padding: 40px 20px;
}

.confirmation h2 {
  color: var(--color-gold);
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.ref-number {
  margin-top: 20px;
  font-weight: 600;
  color: var(--color-text-muted);
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Responsive: Breakpoint 600px */
@media (max-width: 600px) {
  .card {
    padding: 22px 18px;
  }

  .field-row {
    flex-direction: column;
    gap: 0;
  }

  .progress-steps {
    display: none;
  }

  .progress-mobile {
    display: block;
  }

  .nav-buttons {
    flex-wrap: wrap;
  }

  .btn {
    flex: 1;
  }

  .btn-primary {
    margin-left: 0;
  }
}

/* Responsive: Breakpoint 992px (großer Desktop, mehr Weißraum) */
@media (min-width: 992px) {
  .app-shell {
    max-width: 820px;
    padding-top: 48px;
  }

  .card {
    padding: 44px;
  }
}
