:root {
  --ink: #1c2733;
  --muted: #5b6b7b;
  --accent: #00a7c7; /* ColorID teal, matched to the logo */
  --accent-dark: #00869f;
  --danger: #c0392b;
  --ok: #1e9e5a;
  --card-bg: rgba(255, 255, 255, 0.88);
  --line: rgba(28, 39, 51, 0.14);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
}

/* 30/70 vertical placement — card sits in the upper third, not dead center */
body::before { content: ""; flex: 3; }
body::after  { content: ""; flex: 7; }

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1100px 600px at 15% -10%, #d8ecfb 0%, transparent 60%),
    radial-gradient(900px 600px at 110% 110%, #dcf3e8 0%, transparent 55%),
    linear-gradient(160deg, #f2f6fa 0%, #e8eef5 100%);
}

.card {
  width: 100%;
  max-width: 560px;
  background: var(--card-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(28, 39, 51, 0.14), 0 2px 8px rgba(28, 39, 51, 0.06);
  padding: 34px 38px 22px;
}

.brand { text-align: center; margin-bottom: 22px; }
.brand-logo { height: 78px; width: auto; }
.brand-sub {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--muted);
  margin-top: 2px;
}

.step { animation: rise 0.28s ease; }
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.hidden { display: none !important; }

.lead { color: var(--muted); font-size: 14.5px; line-height: 1.5; text-align: center; margin: 0 0 18px; }

/* --- step 1 --- */
.code-row { display: flex; gap: 10px; }
.code-row input { flex: 1; }

/* --- inputs --- */
input, textarea {
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 13px;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(14, 123, 209, 0.15);
}
textarea { resize: vertical; }

.field { display: block; margin-bottom: 14px; }
.field span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
}
.field span em { font-style: normal; font-weight: 400; color: var(--muted); font-size: 12px; }
.field span em.req { color: #cf5f5f; }
.field-row { display: flex; gap: 12px; }
.field-row .grow { flex: 1; }

/* --- buttons --- */
.btn {
  font: inherit;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  padding: 10px 22px;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); }
.btn.primary:disabled { background: #9fb6c9; cursor: default; }
.btn.wide { width: 100%; margin-top: 4px; }
.btn.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn.ghost:hover { background: rgba(14, 123, 209, 0.08); }

/* --- dropzone --- */
.dropzone {
  border: 2px dashed var(--line);
  border-radius: 14px;
  padding: 26px 18px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: 18px;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone:focus, .dropzone.drag {
  border-color: var(--accent);
  background: rgba(14, 123, 209, 0.05);
  outline: none;
}
.dz-idle svg { color: var(--accent); margin-bottom: 8px; }
.dz-idle b { color: var(--ink); }
.dz-hint { font-size: 12.5px; margin-top: 6px; }
.dz-file .dz-name { font-weight: 600; color: var(--ink); word-break: break-all; }
.dz-file .dz-size { font-size: 13px; margin: 3px 0 6px; }
.dz-clear {
  font: inherit;
  font-size: 12.5px;
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

/* --- feedback --- */
.error { color: var(--danger); font-size: 13.5px; min-height: 18px; margin: 6px 0; }

.progress {
  position: relative;
  height: 34px;
  border-radius: 10px;
  background: rgba(14, 123, 209, 0.12);
  overflow: hidden;
  margin-bottom: 12px;
}
.progress-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #35a3ee);
  transition: width 0.2s ease;
}
.progress-label {
  position: relative;
  line-height: 34px;
  text-align: center;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

/* --- done --- */
#step-done { text-align: center; padding: 10px 0 6px; }
.done-icon { color: var(--ok); margin-bottom: 6px; }
#step-done h2 { margin: 0 0 8px; }
#step-done .btn { margin-top: 6px; }

.foot {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 520px) {
  .card { padding: 26px 20px 16px; }
  .field-row { flex-direction: column; gap: 0; }
  .code-row { flex-direction: column; }
}

/* Embed mode (?embed=1) — bare card for iframing into colorid.com */
body.embed { padding: 0; }
body.embed::before, body.embed::after { content: none; }
body.embed .backdrop, body.embed .foot, body.embed .brand { display: none; }
body.embed .card {
  max-width: none;
  border-radius: 0;
  border: none;
  box-shadow: none;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 8px 6px;
}
