* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f4f6f8;
  color: #1f2937;
}

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

header h1 {
  margin: 0;
}

header p {
  margin: 4px 0 0;
  color: #d1d5db;
}

h1,
h2 {
  margin: 0;
}

main {
  max-width: 1100px;
  margin: 24px auto;
  padding: 0 16px;
  display: grid;
  gap: 20px;
}

.card {
  background: white;
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

form {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

input,
select,
button {
  font-size: 15px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
}

button {
  cursor: pointer;
  border: none;
  background: #2563eb;
  color: white;
  font-weight: 700;
}

button:hover {
  opacity: 0.9;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

button.danger {
  background: #dc2626;
}

.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.checks label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.drop-zone {
  border: 2px dashed #94a3b8;
  border-radius: 12px;
  padding: 22px;
  text-align: center;
  background: #f8fafc;
}

.drop-zone.dragover {
  background: #dbeafe;
  border-color: #2563eb;
}

.jobs-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.jobs-header div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.jobs-list {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.job {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px;
  background: #f9fafb;
}

.job-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
}

.status {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 13px;
  background: #e5e7eb;
  white-space: nowrap;
}

.status.COMPLETED {
  background: #dcfce7;
  color: #166534;
}

.status.FAILED {
  background: #fee2e2;
  color: #991b1b;
}

.status.PROCESSING,
.status.QUEUED,
.status.RETRYING {
  background: #dbeafe;
  color: #1e40af;
}

.progress-wrap {
  margin-top: 10px;
  height: 12px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: #2563eb;
  width: 0%;
}

.job-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.health {
  min-width: 150px;
}

.health.ok {
  background: #16a34a;
}

.health.bad {
  background: #dc2626;
}

.health.unknown {
  background: #64748b;
}

.muted {
  color: #64748b;
}

.error {
  color: #dc2626;
}

@media (max-width: 760px) {
  header,
  .jobs-header,
  .job-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .health {
    width: 100%;
  }

  .jobs-header div {
    width: 100%;
  }

  .jobs-header button,
  .job-actions button {
    flex: 1;
  }
}

.hidden {
  display: none !important;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
