:root {
  --blue: #1f4e79;
  --blue-2: #2e75b6;
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #1c2733;
  --muted: #6b7785;
  --green: #1e8e5a;
  --red: #c0392b;
  --border: #e3e9f0;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 28px; background: var(--card); border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 14px; }
.logo { height: 40px; width: auto; }
.topbar h1 { font-size: 18px; margin: 0; color: var(--blue); display: flex; align-items: center; gap: 8px; }
.beta-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: #c05621;
  padding: 3px 8px;
  border-radius: 999px;
  line-height: 1.2;
  vertical-align: middle;
}
.tagline { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.user-box { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }

main { max-width: 720px; margin: 36px auto; padding: 0 20px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 28px; box-shadow: 0 1px 3px rgba(20,40,70,.06);
}
.card.center { text-align: center; }
.card h2 { margin-top: 0; color: var(--blue); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
code { background: #eef3f9; padding: 1px 6px; border-radius: 5px; font-size: 13px; }

.btn {
  display: inline-block; border: none; border-radius: 9px; padding: 11px 18px;
  font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-2); }
.btn.primary:disabled { background: #b9c4d2; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--blue); border: 1px solid var(--border); }
.btn.small { padding: 7px 12px; font-size: 13px; }
.link { background: none; border: none; color: var(--blue-2); cursor: pointer; font-size: inherit; padding: 0; }

.template { margin: 18px 0; border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
.template summary { cursor: pointer; font-weight: 600; color: var(--blue); }
.template-body pre { background: #1c2733; color: #e6edf3; padding: 12px; border-radius: 8px; font-size: 13px; overflow-x: auto; }

.dropzone {
  margin: 18px 0; border: 2px dashed #c4d2e2; border-radius: 12px;
  padding: 32px; text-align: center; transition: .15s;
}
.dropzone.over { border-color: var(--blue-2); background: #f0f6fd; }

.auth-form { display: flex; flex-direction: column; gap: 10px; max-width: 360px; margin: 18px auto 0; text-align: left; }
.auth-form input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 15px;
}

.email-opt { display: block; margin: 12px 0 18px; font-size: 14px; color: var(--muted); }
.email-opt input { display: block; margin-top: 6px; width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; }

.progress-wrap { height: 12px; background: #e9eff6; border-radius: 8px; overflow: hidden; margin: 18px 0 10px; }
.progress-bar { height: 100%; width: 2%; background: linear-gradient(90deg, var(--blue), var(--blue-2)); transition: width .4s ease; }

.stages { list-style: none; padding: 0; margin: 18px 0; }
.stages li { padding: 7px 0 7px 28px; position: relative; color: var(--muted); }
.stages li::before { content: "○"; position: absolute; left: 4px; }
.stages li.active { color: var(--blue); font-weight: 600; }
.stages li.active::before { content: "◔"; }
.stages li.done { color: var(--green); }
.stages li.done::before { content: "●"; }

.result-box { margin-top: 18px; padding: 18px; background: #eef8f1; border: 1px solid #cdeccd; border-radius: 10px; }
.success { color: var(--green); font-weight: 600; margin-top: 0; }
.warnings { margin-top: 18px; padding: 14px 18px; background: #fff8e8; border: 1px solid #f3e2b3; border-radius: 10px; }
.warnings h3 { margin: 0 0 8px; font-size: 14px; color: #8a6d1a; }
.warnings ul { margin: 0; padding-left: 18px; font-size: 14px; }
.error { color: var(--red); }
#failBox { margin-top: 16px; padding: 14px 18px; background: #fdecea; border: 1px solid #f5c6c0; border-radius: 10px; }

.footer { text-align: center; color: var(--muted); font-size: 12px; padding: 30px; }
.hidden { display: none !important; }
