/* ---------- Setup-Assistent (/setup) und Checkliste unter Admin → Einrichtung ----------
   Baut auf .auth-card auf (Sakura-Hintergrund), nur breiter. Abstände im 8-px-Raster,
   Touch-Ziele 44 px (DESIGN_SYSTEM.md §7). */

.auth-card.setup-card { width: 560px; }

/* Fortschritt: Zahl für alle, Punkte als Orientierung; auf dem Handy nur die Zahl */
.setup-steps { display: grid; gap: var(--s-space-2); margin-bottom: var(--s-space-5); }
.setup-steps__count { margin: 0; font-size: var(--s-text-sm); font-weight: 600; color: var(--s-text-2); }
.setup-steps__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s-space-1); }
.setup-steps__item { display: grid; justify-items: center; gap: var(--s-space-1); font-size: var(--s-text-xs); color: var(--s-text-3); text-align: center; }
.setup-steps__dot {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--s-border); background: var(--s-surface); font-weight: 700; font-size: var(--s-text-xs);
}
.setup-steps__item--done .setup-steps__dot { border-color: var(--s-success-border); background: var(--s-success-soft); color: var(--s-success); }
.setup-steps__item--current { color: var(--s-text); font-weight: 600; }
.setup-steps__item--current .setup-steps__dot { border-color: var(--s-accent); background: var(--s-accent); color: var(--s-on-accent); }
.setup-steps__label { overflow-wrap: anywhere; }

/* Formular: Fehler direkt am Feld (Inline-Validierung) */
.field--invalid .input { border-color: var(--s-danger); }
.field-error { display: flex; align-items: flex-start; gap: var(--s-space-2); margin: 0; font-size: var(--s-text-sm); color: var(--s-danger); }
.field-error .icon { flex: none; margin-top: 2px; }
.field--locked .input { background: var(--s-surface-2); color: var(--s-text-2); cursor: not-allowed; }
.setup-hint--locked { display: flex; align-items: center; gap: var(--s-space-2); }

/* Auswahl als grosse Karten (Anbieter, Login-Art) */
.setup-choice { display: grid; gap: var(--s-space-2); margin: 0; padding: 0; border: 0; min-width: 0; }
.setup-choice .label { margin-bottom: var(--s-space-1); }
.setup-choice__option {
  display: flex; align-items: flex-start; gap: var(--s-space-3); min-height: 44px; padding: var(--s-space-3) var(--s-space-4);
  border: 1px solid var(--s-border); border-radius: var(--s-radius-lg); background: var(--s-surface); cursor: pointer;
}
.setup-choice__option:hover { border-color: var(--s-border-strong); }
.setup-choice__option:has(input:checked) { border-color: var(--s-accent); background: var(--s-accent-soft); }
/* Auf dem Rosé-Grund reicht der Kontrast von --s-text-3 im Dunkelmodus nicht (axe color-contrast) */
.setup-choice__option:has(input:checked) .hint { color: var(--s-text-2); }
.setup-choice__option:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--s-ring); }
.setup-choice__option input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--s-accent); }
.setup-choice__option > span { display: grid; gap: 2px; min-width: 0; }
.setup-choice[disabled] .setup-choice__option { cursor: not-allowed; opacity: .7; }

.setup-oidc { display: grid; gap: var(--s-space-4); }
.setup-oidc .field + .field { margin-top: 0; }

/* Ein Primär-Knopf rechts, Nebenaktion links daneben; auf dem Handy untereinander */
.setup-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: var(--s-space-2); margin-top: var(--s-space-2); }
.setup-actions .btn { min-height: 44px; }
.auth-form .setup-actions .btn { margin-top: 0; }

/* Status-Zeilen (getestet, nicht erreichbar …) */
.setup-status { display: flex; align-items: flex-start; gap: var(--s-space-2); margin: 0 0 var(--s-space-4); padding: var(--s-space-2) var(--s-space-3); border-radius: var(--s-radius); background: var(--s-surface-2); font-size: var(--s-text-base); color: var(--s-text-2); }
.setup-status .icon { flex: none; margin-top: 2px; }
.setup-status--ok { background: var(--s-success-soft); color: var(--s-text); }
.setup-status--ok .icon { color: var(--s-success); }
.setup-status--warn { background: var(--s-warning-soft); color: var(--s-text); }
.setup-status--warn .icon { color: var(--s-warning); }

.setup-section { display: grid; gap: var(--s-space-2); padding-bottom: var(--s-space-5); margin-bottom: var(--s-space-5); border-bottom: 1px solid var(--s-border-soft); }
.setup-section__title { display: flex; align-items: center; gap: var(--s-space-2); margin: 0; font-size: var(--s-text-base); }
.setup-section .setup-status, .setup-section p { margin: 0; }

.setup-howto { display: grid; gap: var(--s-space-4); margin: 0 0 var(--s-space-4); padding-left: var(--s-space-5); }
.setup-howto li { padding-left: var(--s-space-1); }
.setup-howto .secret-value { display: block; margin-top: var(--s-space-2); }
.setup-skip-hint { margin: var(--s-space-4) 0 0; }

/* Checkliste */
.setup-checklist__progress { margin: 0 0 var(--s-space-2); font-size: var(--s-text-sm); font-weight: 600; color: var(--s-text-2); }
.setup-checklist { list-style: none; margin: 0 0 var(--s-space-5); padding: 0; display: grid; gap: var(--s-space-2); }
.setup-checklist__item { display: flex; align-items: flex-start; gap: var(--s-space-3); padding: var(--s-space-3) var(--s-space-4); border: 1px solid var(--s-border); border-radius: var(--s-radius-lg); background: var(--s-surface); }
.setup-checklist__icon { flex: none; margin-top: 2px; }
.setup-checklist__item--done .setup-checklist__icon { color: var(--s-success); }
.setup-checklist__item--warn { border-color: var(--s-warning-border); }
.setup-checklist__item--warn .setup-checklist__icon { color: var(--s-warning); }
.setup-checklist__item--todo .setup-checklist__icon { color: var(--s-danger); }
.setup-checklist__text { display: grid; gap: 2px; min-width: 0; font-size: var(--s-text-base); }
.setup-checklist__text strong { color: var(--s-text); }
.setup-confirm { align-items: flex-start; font-size: var(--s-text-base); color: var(--s-text); }
.setup-confirm input { margin-top: 2px; }
.setup-admin-confirm { display: grid; gap: var(--s-space-2); justify-items: start; }
.setup-admin-links { margin-top: var(--s-space-4); }

@media (max-width: 767.98px) {
  .setup-steps__list { display: none; }
  .setup-actions { flex-direction: column-reverse; align-items: stretch; }
  .setup-actions .btn { width: 100%; justify-content: center; }
}
