/* School setup checklist wizard — scoped styles. */
#settings-card-setup .setup-toolbar,
#setupProgressBanner,
#setupEvidenceModal .setup-muted {
  font-family: inherit;
}

.setup-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.setup-progress-wrap {
  flex: 1 1 260px;
  min-width: 220px;
}

.setup-progress {
  height: 10px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.setup-progress > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #16a34a);
  transition: width 0.35s ease;
}

.setup-progress-label {
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: #475569;
}

.setup-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.setup-btn-danger {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #ef4444;
}

.setup-alert {
  border-radius: 0.9rem;
  padding: 0.75rem 1rem;
  font-size: 0.82rem;
  line-height: 1.55;
  margin-bottom: 0.9rem;
}

.setup-alert-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

.setup-alert-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
}

.setup-phases {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.setup-phase {
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #f8fafc;
  overflow: hidden;
}

.setup-phase-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
}

.setup-phase-head h4 {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
}

.setup-phase-head p {
  margin: 0.2rem 0 0;
  font-size: 0.72rem;
  color: #64748b;
}

.setup-phase-count {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: #334155;
  background: #e2e8f0;
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
}

.setup-steps {
  display: flex;
  flex-direction: column;
}

.setup-step {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #eef2f7;
  background: #fff;
}

.setup-step:last-child {
  border-bottom: 0;
}

.setup-step-blocked {
  background: #fffbeb;
}

.setup-step-failed {
  background: #fff7f7;
}

.setup-step-main {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  flex: 1 1 340px;
  min-width: 0;
}

.setup-check {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
  accent-color: #16a34a;
  flex-shrink: 0;
}

.setup-step-text {
  min-width: 0;
}

.setup-step-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
}

.setup-step-desc {
  margin: 0.25rem 0 0;
  font-size: 0.74rem;
  line-height: 1.55;
  color: #64748b;
}

.setup-chip {
  font-size: 0.66rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  border: 1px solid transparent;
  white-space: nowrap;
}

.setup-chip-verified { background: #dcfce7; color: #166534; border-color: #86efac; }
.setup-chip-pending { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.setup-chip-failed { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.setup-chip-not_applicable { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }
.setup-chip-blocked { background: #fef3c7; color: #92400e; border-color: #fcd34d; }

.setup-owner {
  font-size: 0.64rem;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 0.08rem 0.45rem;
  white-space: nowrap;
}

.setup-owner.setup-optional {
  color: #7c3aed;
  border-color: #ddd6fe;
  background: #f5f3ff;
}

.setup-blocked {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 0.6rem;
  padding: 0.35rem 0.55rem;
}

.setup-step-details {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed #e2e8f0;
  font-size: 0.72rem;
  color: #475569;
}

.setup-last {
  line-height: 1.5;
}

.setup-muted {
  color: #64748b;
  font-size: 0.72rem;
}

.setup-warnings {
  margin: 0.35rem 0 0;
  padding-inline-start: 1.1rem;
  color: #92400e;
}

.setup-checks {
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.setup-checks .ok { color: #166534; }
.setup-checks .bad { color: #991b1b; }

.setup-list {
  margin-top: 0.3rem;
  line-height: 1.5;
}

.setup-step-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  flex: 0 1 auto;
}

.setup-btn {
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 0.6rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  min-height: 32px;
}

.setup-btn:hover { background: #f8fafc; }
.setup-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.setup-btn-check {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.setup-btn-signoff {
  background: #f0fdf4;
  color: #166534;
  border-color: #bbf7d0;
}

.setup-btn-skip {
  color: #7c3aed;
  border-color: #ddd6fe;
  background: #f5f3ff;
}

.setup-btn-reset {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fff;
}

.setup-btn-link {
  color: #0f766e;
  border-color: #99f6e4;
  background: #f0fdfa;
}

.setup-empty {
  padding: 1.5rem;
  text-align: center;
  color: #64748b;
  font-size: 0.85rem;
}

/* Dashboard banner */
#setupProgressBanner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
  border: 1px solid #bfdbfe;
  border-radius: 1.1rem;
  background: linear-gradient(135deg, #eff6ff, #f0fdf4);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

#setupProgressBanner.hidden {
  display: none;
}

.setup-banner-icon {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.9rem;
  background: #dbeafe;
  color: #1d4ed8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.setup-banner-body {
  flex: 1 1 320px;
  min-width: 0;
}

.setup-banner-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
}

.setup-banner-text {
  margin-top: 0.2rem;
  font-size: 0.76rem;
  color: #475569;
}

.setup-banner-scan {
  margin-top: 0.25rem;
  font-size: 0.72rem;
  color: #1d4ed8;
  font-weight: 600;
}

.setup-banner-next {
  margin: 0.35rem 0 0;
  padding-inline-start: 1.1rem;
  font-size: 0.72rem;
  color: #475569;
}

.setup-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

/* Evidence modal fields */
.setup-checkbox-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #0f172a;
  margin-top: 0.4rem;
}

#setupEvidenceModal .form-group {
  margin-bottom: 0.85rem;
}

@media (max-width: 640px) {
  .setup-step {
    flex-direction: column;
  }
  .setup-step-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .setup-btn {
    min-height: 44px;
    padding: 0.5rem 0.8rem;
  }
  #setupProgressBanner {
    align-items: flex-start;
  }
  .setup-banner-actions {
    width: 100%;
  }
}
