/* 3DPC Support — neutral iframe-safe styles */
:root {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #6b7280;
  --border: #d9dce1;
  --border-strong: #b7bcc4;
  --primary: #3984c0;
  --primary-active: #2a6897;
  --accent: #d80000;
  --accent-hover: #b00000;
  --alert-bg: #fff1ee;
  --alert-fg: #8a2812;
  --alert-border: #f4c1b3;
  --notice-bg: #f4f6ff;
  --notice-border: #d5dcf5;
  --radius: 6px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

/* Stepper */
.stepper {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  align-items: center;
  margin: 8px 0 40px;
  gap: 0;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 110px;
}
.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e1e2e6;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 15px;
}
.step.active .step-circle { background: var(--primary); color: #fff; }
.step-label {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.step.current .step-label { color: var(--fg); font-weight: 500; }
.stepper-line {
  height: 2px;
  background: #e1e2e6;
  margin: 0 4px;
  align-self: center;
  margin-bottom: 22px; /* align with circle center */
}
.stepper-line.active { background: var(--primary); }

/* Card */
.card {
  background: var(--bg);
}

/* Form fields */
.field { margin-bottom: 22px; }
.label {
  display: block;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 6px;
}
.req { color: var(--accent); margin-left: 2px; }

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  font: inherit;
  color: var(--fg);
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(57, 132, 192, 0.2);
}
textarea { resize: vertical; min-height: 120px; }

.radio, .checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 20px;
  cursor: pointer;
  font-size: 15px;
}
.checkbox { display: flex; margin-bottom: 8px; }
fieldset { border: 0; padding: 0; margin: 0; }

.help {
  font-size: 13px;
  color: var(--muted);
  margin: 6px 0 0;
  line-height: 1.45;
}
.help a { color: var(--primary); }
.hint { font-size: 12px; color: var(--muted); margin-top: 8px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: var(--radius);
  border: 0;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.12s;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { background: #c9a399; cursor: not-allowed; }

.actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  gap: 16px;
}

/* Dropzone */
.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  background: #fafbfc;
  padding: 32px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary);
  background: #f4f6ff;
}
.dropzone-icon {
  color: var(--muted);
  margin-bottom: 8px;
}
.dropzone-text {
  margin: 0;
  font-weight: 500;
  color: var(--fg);
}

.file-list { list-style: none; padding: 0; margin: 12px 0 0; }
.file-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 6px;
  font-size: 14px;
}
.file-row.done { background: #f1f9f3; border-color: #b7e0c1; }
.file-row.error { background: #fdf2f0; border-color: #f4c1b3; }
.file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { color: var(--muted); font-variant-numeric: tabular-nums; }
.file-status {
  font-size: 13px;
  color: var(--muted);
  min-width: 36px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.file-row.done .file-status { color: #2a8a45; font-weight: 600; }
.file-row.error .file-status { color: var(--accent); }
.file-cancel {
  background: none;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  font-size: 18px;
  line-height: 1;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.file-cancel:hover { color: var(--accent); background: rgba(216, 0, 0, 0.08); }
.file-cancel:disabled { opacity: 0.4; cursor: wait; }
.file-progress {
  grid-column: 1 / -1;
  height: 4px;
  background: #e1e4e8;
  border-radius: 2px;
  overflow: hidden;
  margin-top: 6px;
}
.file-progress > div {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width 0.2s;
}

/* Alert / notice */
.alert {
  background: var(--alert-bg);
  color: var(--alert-fg);
  border: 1px solid var(--alert-border);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 20px;
  font-size: 14px;
}
.notice {
  background: var(--notice-bg);
  border: 1px solid var(--notice-border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 14px;
}
.notice p { margin: 0 0 6px; }
.notice p:last-child { margin-bottom: 0; }
.notice a { color: var(--primary); }

/* Done */
.card.done {
  text-align: center;
  padding-top: 24px;
}
.ref-number {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  background: #f6f7f9;
  padding: 8px 14px;
  border-radius: var(--radius);
  display: inline-block;
}
.muted { color: var(--muted); font-size: 14px; }

[hidden] { display: none !important; }
