:root {
  --bg: #0b1220;
  --card: #10192b;
  --text: #e9eef9;
  --muted: #9db0d1;
  --accent: #4da3ff;
  --accent-2: #2dd4bf;
  --danger: #ff6b6b;
}

* { box-sizing: border-box; }
html,body { height: 100%; }
body {
  margin: 0;
  background: linear-gradient(160deg, #0b1220, #0f1a30 60%, #0b1220);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
  display: grid;
  place-items: center;
  padding: 24px;
}

.card {
  width: min(760px, 92vw);
  background: linear-gradient(180deg, #111a2e, #0f182b);
  border: 1px solid #1e2a44;
  border-radius: 16px;
  padding: 24px 28px 28px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.04);
}

h1 { margin: 0 0 6px; font-weight: 650; letter-spacing: .2px; font-size: 22px; }
header.card-head {
  display:flex; align-items:center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 12px;
}
header.card-head .spacer { flex: 1; }
.muted { color: var(--muted); margin: 0 0 16px; }
.muted.small { font-size: 14px; margin-bottom: 18px; }

.form-section {
  margin-bottom: 20px;
}
.form-section h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 600;
}
.field-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
  gap: 6px;
}
.field-group label {
  font-size: 14px;
  color: var(--muted);
}
.field-group input {
  background: rgba(12,20,37,0.85);
  border: 1px solid #223251;
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(77,163,255,0.2);
}
.hidden { display: none; }

.dropzone {
  border: 2px dashed #28406d;
  border-radius: 12px;
  padding: 36px 20px;
  text-align: center;
  background: rgba(20,35,60,.55);
  transition: border-color .2s, background .2s;
  cursor: pointer;
}
.dropzone.hover { border-color: var(--accent); background: rgba(30,50,85,.6); }

.btn {
  display: inline-block;
  margin-top: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  color: #051126;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 700;
  cursor: pointer;
  border: none;
}

.status { margin: 16px 4px 8px; min-height: 22px; }
.status.error { color: var(--danger); }

.progress {
  height: 10px;
  background: #16233b;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #1f2c47;
}
.bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .2s ease;
}

.links { margin-top: 14px; }
code { background: #0e1a30; padding: 2px 6px; border-radius: 6px; color: #bcd2ff; }
ul { margin: 6px 0 0 18px; }

.status-panel {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #1e2a44;
  border-radius: 12px;
  background: rgba(15,26,43,0.65);
}
.status-panel h2 {
  margin: 0 0 6px;
  font-size: 17px;
}
.stage-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.stage-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--muted);
}
.stage-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #30405f;
  margin-top: 6px;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.05);
}
.stage-item .stage-label {
  font-weight: 600;
  color: var(--text);
}
.stage-item.active .stage-dot {
  background: var(--accent);
}
.stage-item.complete .stage-dot {
  background: var(--accent-2);
}
.stage-item.error .stage-dot {
  background: var(--danger);
}
.status-detail {
  margin-top: 10px;
}
