body {
  font-family: system-ui, sans-serif;
  margin: 0;
  background: #f5f6f8;
  color: #1f2937;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: #111827;
  color: white;
}

header a {
  color: white;
}

main {
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

th, td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid #e5e7eb;
}

th {
  background: #f3f4f6;
}

.warn {
  color: #b91c1c;
  font-weight: 600;
}

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: #111827;
}

.login-box {
  background: white;
  padding: 32px;
  border-radius: 8px;
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-box label {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  gap: 4px;
}

.login-box input {
  padding: 8px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
}

.login-box button {
  padding: 10px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.error {
  color: #b91c1c;
  font-size: 14px;
}

h2, h3 {
  margin-top: 32px;
}

.cards {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.card {
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 16px 20px;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card strong {
  font-size: 24px;
}

.card span {
  font-size: 13px;
  color: #6b7280;
}

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  border-radius: 999px;
  margin-right: 8px;
  vertical-align: middle;
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.badge-alt {
  background: rgba(168, 85, 247, 0.15);
  color: #7e22ce;
}

.sortable-col {
  cursor: pointer;
  user-select: none;
}

.sortable-col:hover {
  background: #e5e7eb;
}

.btn {
  display: inline-block;
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  background: #2563eb;
  color: white;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  background: #1d4ed8;
}

.btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.btn-link {
  color: #2563eb;
  font-size: 13px;
  text-decoration: none;
  align-self: center;
}

.btn-link:hover {
  text-decoration: underline;
}

.error-note {
  background: #fee2e2;
  color: #991b1b;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 16px;
}

.ok-note {
  background: #dcfce7;
  color: #166534;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 16px;
}

.alt-note {
  font-size: 12px;
  color: #6b7280;
}

.muted {
  color: #6b7280;
  font-size: 13px;
}

.pipeline-panel {
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.pipeline-panel h2 {
  margin-top: 0;
}

.pipeline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}

.pipeline-export-form {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.pipeline-export-form label {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  color: #6b7280;
  gap: 4px;
}

.pipeline-export-form input {
  padding: 6px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  width: 90px;
}

.pipeline-hint {
  font-size: 12px;
  color: #6b7280;
  margin: 12px 0;
}

.pipeline-hint code {
  background: #f3f4f6;
  padding: 1px 5px;
  border-radius: 4px;
}

.pipeline-status {
  font-size: 13px;
  margin-bottom: 8px;
}

.log-box {
  background: #111827;
  color: #d1d5db;
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.5;
  max-height: 260px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0 0 12px;
}

.filter-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 16px;
}

.filter-form label {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  color: #6b7280;
  gap: 4px;
}

.filter-form select,
.filter-form input {
  padding: 7px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
  margin-top: 16px;
  font-size: 13px;
  color: #6b7280;
}

.pagination a {
  color: #2563eb;
  text-decoration: none;
}

.pagination a:hover {
  text-decoration: underline;
}
