:root {
  --bg: #f3f7f6;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --accent: #0f766e;
  --accent-2: #115e59;
  --line: #d1d5db;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Noto Sans", sans-serif;
  background: linear-gradient(180deg, #eef4f2 0%, #f7faf9 100%);
  color: var(--text);
}

.container {
  max-width: 780px;
  margin: 40px auto;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
}

h1, h2, h3 {
  margin-top: 0;
}

label {
  display: block;
  margin-top: 12px;
  margin-bottom: 6px;
  font-weight: 600;
}

input[type="file"] {
  display: block;
  width: 100%;
}

button,
.button {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}

.button.secondary {
  background: #64748b;
}

button:hover,
.button:hover {
  background: var(--accent-2);
}

.card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  margin: 14px 0;
  background: #fcfefd;
}

.trace {
  white-space: pre-wrap;
  background: #0b1020;
  color: #d1e7dd;
  padding: 12px;
  border-radius: 8px;
  font-size: 12px;
  max-height: 320px;
  overflow: auto;
}

.muted {
  color: var(--muted);
}

.error {
  color: #b91c1c;
}

.progress-card {
  margin-bottom: 18px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}

.progress-pct {
  font-weight: 700;
  color: var(--accent);
  font-size: 1.1rem;
}

.progress-track {
  height: 12px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
  border: 1px solid var(--line);
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #14b8a6);
  transition: width 0.35s ease;
}

.progress-stage {
  margin-top: 12px;
  margin-bottom: 4px;
}

.progress-hint {
  margin-top: 0;
  font-size: 12px;
}

.step-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.step-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f9fafb;
  font-size: 14px;
}

.step-list li .step-idx {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #e5e7eb;
  color: #374151;
  flex-shrink: 0;
}

.step-list li.step-pending {
  opacity: 0.65;
}

.step-list li.step-active {
  border-color: var(--accent);
  background: #ecfdf5;
  box-shadow: 0 0 0 1px rgba(15, 118, 110, 0.12);
}

.step-list li.step-active .step-idx {
  background: var(--accent);
  color: #fff;
}

.step-list li.step-done {
  border-color: #a7f3d0;
  background: #f0fdf4;
}

.step-list li.step-done .step-idx {
  background: #10b981;
  color: #fff;
}

.step-list li.step-fail {
  border-color: #fecaca;
  background: #fef2f2;
}

.step-list li.step-fail .step-idx {
  background: #ef4444;
  color: #fff;
}
