/* SPDX-License-Identifier: MIT */
.form-field {
  margin-bottom: 1rem;
}
.form-field label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 500;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: white;
  color: black;
}
@media (prefers-color-scheme: dark) {
  .form-field input,
  .form-field select,
  .form-field textarea {
    background: #2a2a2a;
    color: #e5e5e5;
    border-color: #444;
  }
}
.form-help {
  color: #666;
  font-size: 0.875rem;
  margin: 0.25rem 0 0;
}
.form-error {
  color: #c00;
  font-size: 0.875rem;
  margin: 0.25rem 0 0;
}
button[type="submit"],
.btn-primary {
  background: #22d3ee;
  color: #062028;
  padding: 7px 14px;
  border: 0;
  border-radius: 2px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
}
button.link {
  background: none;
  border: 0;
  color: inherit;
  text-decoration: underline;
  padding: 0;
  cursor: pointer;
}
.flash {
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border-radius: 4px;
}
.flash-success {
  background: #d4edda;
  color: #155724;
}
.flash-error {
  background: #f8d7da;
  color: #721c24;
}
.flash-warning {
  background: #fff3cd;
  color: #856404;
}
.flash-info {
  background: #d1ecf1;
  color: #0c5460;
}
.pagination {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin: 1rem 0;
}

/* Setup wizard — seed step progress UI.
   Auto-refresh via <meta http-equiv="refresh">; this just styles the state. */
.form-hint {
  color: #555;
  font-size: 0.875rem;
  margin: 0.25rem 0 0.5rem 1.5rem;
}
.setup-progress-status {
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  margin: 0.5rem 0;
}
.setup-progress-status--running {
  background: #e3f2fd;
  color: #0d47a1;
}
.setup-progress-status--success {
  background: #d4edda;
  color: #155724;
}
.setup-progress-status--failed {
  background: #f8d7da;
  color: #721c24;
}
.setup-progress-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #e5e5e5;
  border-top-color: #0066cc;
  border-radius: 50%;
  animation: setup-spin 0.8s linear infinite;
  margin: 0.5rem 0;
}
@keyframes setup-spin {
  to {
    transform: rotate(360deg);
  }
}
.setup-progress-meta {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.25rem 1rem;
  margin: 1rem 0;
}
.setup-progress-meta dt {
  font-weight: 600;
  color: #555;
}
.setup-progress-meta dd {
  margin: 0;
}
@media (prefers-reduced-motion: reduce) {
  .setup-progress-spinner {
    animation: none;
    border-top-color: #e5e5e5;
  }
}
@media (prefers-color-scheme: dark) {
  .form-hint {
    color: #aaa;
  }
  .setup-progress-status--running {
    background: #0d47a1;
    color: #e3f2fd;
  }
  .setup-progress-status--success {
    background: #1e4620;
    color: #c8e6c9;
  }
  .setup-progress-status--failed {
    background: #4a1c1c;
    color: #ffcdd2;
  }
  .setup-progress-meta dt {
    color: #aaa;
  }
}
