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

.wrap {
  max-width: 980px;
  margin: 40px auto;
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

h1,
h2 {
  margin-top: 0;
}

.muted {
  color: #667085;
}

.small {
  font-size: 13px;
}

.dropzone {
  border: 2px dashed #98a2b3;
  border-radius: 12px;
  background: #fafafa;
  padding: 24px;
  text-align: center;
  transition: 0.15s ease;
}

.dropzone.dragover {
  border-color: #2563eb;
  background: #eff6ff;
}

.dropzone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.drop-title {
  margin: 0;
  font-size: 16px;
}

.hidden-input {
  display: none;
}

.file-list,
#progressList {
  margin-top: 16px;
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
  background: #fff;
}

.actions {
  margin-top: 16px;
}

button,
.btn,
.secondary-btn {
  appearance: none;
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  font-size: 15px;
  line-height: 1.2;
}

button,
.btn {
  background: #2563eb;
  color: #fff;
}

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

button:disabled {
  opacity: 0.7;
  cursor: default;
}

.secondary-btn {
  background: #e5e7eb;
  color: #111827;
}

.secondary-btn:hover {
  background: #d1d5db;
}

.hidden {
  display: none;
}

.badge {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  color: #fff;
  white-space: nowrap;
}

.queued { background: #6b7280; }
.running { background: #2563eb; }
.ok { background: #16a34a; }
.failed { background: #dc2626; }
.warning { background: #d97706; }

.status-card {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  background: #fcfcfd;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.summary-item {
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  background: #fff;
  padding: 12px;
}

.summary-label {
  font-size: 13px;
  color: #667085;
  margin-bottom: 4px;
}

.summary-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.job-progress-head,
.job-status-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 12px 0 8px;
}

.job-status-line {
  margin-top: 12px;
  color: #475467;
  font-size: 14px;
}

.progress {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.35s ease;
}

.progress-fill.overall,
.progress-fill.running {
  background: #2563eb;
}

.progress-fill.ok {
  background: #16a34a;
}

.progress-fill.failed {
  background: #dc2626;
}

.progress-fill.warning {
  background: #d97706;
}

.progress-fill.queued {
  background: #98a2b3;
}

.job-files {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.job-file {
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  background: #fff;
  padding: 14px;
}

.job-file-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.job-file-name {
  font-weight: 600;
  word-break: break-word;
}

.job-file-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.job-file-stage {
  color: #667085;
  font-size: 14px;
}

.job-file-percent {
  min-width: 48px;
  text-align: right;
  font-weight: 700;
}

.file-message {
  margin-top: 10px;
  color: #b42318;
  font-size: 13px;
  word-break: break-word;
}

@media (max-width: 720px) {
  .wrap {
    margin: 16px;
    padding: 18px;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .job-file-head {
    flex-direction: column;
  }

  .job-file-right {
    justify-content: flex-start;
  }
}
