/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   AutoCreate Customer — Light Mode
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

:root {
  --bg: #F5F7FA;
  --card: #FFFFFF;
  --border: #E2E8F0;
  --text: #1A202C;
  --text-muted: #64748B;
  --primary: #4F6EF7;
  --primary-hover: #3B5DE7;
  --primary-light: #EEF1FE;
  --green: #22C55E;
  --green-light: #ECFDF5;
  --red: #EF4444;
  --red-light: #FEF2F2;
  --orange: #F59E0B;
  --orange-light: #FFFBEB;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
}

* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:'Inter',sans-serif; background:var(--bg); color:var(--text); min-height:100vh; }

/* ━━ Page Layout ━━ */
.page { max-width:600px; margin:0 auto; padding:32px 20px 48px; }

/* ━━ Hero ━━ */
.hero { text-align:center; margin-bottom:28px; }
.hero__badge { display:inline-flex; align-items:center; gap:8px; padding:6px 16px 6px 8px; background:var(--card); border:1px solid var(--border); border-radius:20px; font-weight:600; font-size:14px; color:var(--primary); margin-bottom:20px; box-shadow:var(--shadow); }
.hero h1 { font-size:28px; font-weight:700; line-height:1.3; margin-bottom:10px; }
.hero__subtitle { font-size:15px; color:var(--text-muted); line-height:1.6; max-width:480px; margin:0 auto; }

/* ━━ Steps Guide ━━ */
.steps-guide { display:flex; align-items:center; justify-content:center; gap:8px; margin-bottom:28px; flex-wrap:wrap; }
.step { display:flex; align-items:center; gap:8px; }
.step__number { width:28px; height:28px; background:var(--primary); color:#fff; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:700; flex-shrink:0; }
.step__text { font-size:13px; font-weight:500; color:var(--text); white-space:nowrap; }
.step__line { width:32px; height:2px; background:var(--border); flex-shrink:0; }

/* ━━ Card ━━ */
.card { background:var(--card); border-radius:var(--radius); padding:32px; box-shadow:var(--shadow-md); }

/* ━━ Form ━━ */
.form-group { margin-bottom:20px; }
.form-group--highlight { background:var(--primary-light); padding:20px; border-radius:var(--radius); margin:-8px -8px 24px; border:1.5px solid rgba(79,110,247,0.2); }
.form-group label { display:flex; align-items:center; gap:6px; font-size:13px; font-weight:600; color:var(--text); margin-bottom:6px; text-transform:uppercase; letter-spacing:0.03em; }
.form-group label svg { color:var(--primary); }
.form-group input, .form-group select { width:100%; padding:12px 16px; border:1.5px solid var(--border); border-radius:8px; font-size:15px; font-family:inherit; outline:none; background:#fff; transition:border-color 0.2s, box-shadow 0.2s; appearance:none; -moz-appearance:none; -webkit-appearance:none; }
.form-group select { background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 12px center; background-size:16px; }
.form-group input:focus, .form-group select:focus { border-color:var(--primary); box-shadow:0 0 0 3px rgba(79,110,247,0.12); }
.form-group input::placeholder { color:#94A3B8; }
.form-hint { font-size:12px; color:var(--text-muted); margin-top:4px; display:block; }
.form-hint--valid { color:var(--green); font-weight:500; }
.form-hint--invalid { color:var(--red); font-weight:500; }

.form-row { display:grid; grid-template-columns:1fr 1fr; gap:16px; }

.divider { display:flex; align-items:center; gap:12px; margin:24px 0 20px; }
.divider::before, .divider::after { content:''; flex:1; height:1px; background:var(--border); }
.divider span { font-size:12px; font-weight:600; color:var(--text-muted); text-transform:uppercase; letter-spacing:0.1em; }

/* ━━ Submit Button ━━ */
.submit-btn { width:100%; padding:14px; background:var(--primary); color:#fff; border:none; border-radius:10px; font-size:16px; font-weight:600; font-family:inherit; cursor:pointer; transition:all 0.15s; display:flex; align-items:center; justify-content:center; gap:8px; margin-top:8px; }
.submit-btn:hover { background:var(--primary-hover); transform:translateY(-1px); box-shadow:0 4px 14px rgba(79,110,247,0.35); }
.submit-btn:active { transform:scale(0.99); }
.submit-btn:disabled { opacity:0.6; cursor:not-allowed; transform:none; box-shadow:none; }
.submit-btn--outline { background:none; color:var(--primary); border:1.5px solid var(--primary); margin-top:16px; }
.submit-btn--outline:hover { background:var(--primary-light); box-shadow:none; transform:none; }
.submit-btn__loading { display:flex; align-items:center; gap:8px; }
.submit-btn__loading[hidden] { display:none !important; }

/* ━━ Spinner ━━ */
.spinner { animation:spin 0.8s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }

/* ━━ Progress ━━ */
.progress { margin-top:28px; padding-top:24px; border-top:1px solid var(--border); }
.progress h3 { font-size:16px; margin-bottom:16px; }
.progress__steps { display:flex; flex-direction:column; gap:12px; }
.progress__step { display:flex; align-items:center; gap:10px; font-size:14px; color:var(--text-muted); transition:color 0.3s; }
.progress__step.active { color:var(--primary); font-weight:500; }
.progress__step.done { color:var(--green); }
.progress__dot { width:10px; height:10px; border-radius:50%; background:var(--border); flex-shrink:0; transition:all 0.3s; }
.progress__step.active .progress__dot { background:var(--primary); box-shadow:0 0 0 4px rgba(79,110,247,0.2); }
.progress__step.done .progress__dot { background:var(--green); }

/* ━━ Result ━━ */
.result { margin-top:24px; padding-top:24px; border-top:1px solid var(--border); text-align:center; }
.result__icon { font-size:48px; margin-bottom:12px; }
.result h3 { font-size:20px; margin-bottom:8px; }
.result p { color:var(--text-muted); font-size:14px; margin-bottom:20px; }

.credentials { text-align:left; background:#F8FAFC; border-radius:var(--radius); padding:20px; margin-bottom:16px; }
.credential { margin-bottom:14px; }
.credential:last-child { margin-bottom:0; }
.credential label { font-size:12px; font-weight:600; color:var(--text-muted); text-transform:uppercase; letter-spacing:0.05em; margin-bottom:4px; display:block; }
.credential__value { display:flex; align-items:center; justify-content:space-between; background:#fff; border:1px solid var(--border); border-radius:8px; padding:10px 14px; }
.credential__value span { font-family:'SF Mono','Fira Code',monospace; font-size:15px; font-weight:600; color:var(--text); }
.copy-btn { padding:4px 12px; background:var(--primary-light); color:var(--primary); border:none; border-radius:6px; font-family:inherit; font-size:12px; font-weight:600; cursor:pointer; transition:all 0.15s; }
.copy-btn:hover { background:var(--primary); color:#fff; }

.result__info { display:flex; align-items:center; gap:8px; padding:12px 16px; background:var(--primary-light); border-radius:8px; font-size:13px; color:var(--primary); margin-bottom:8px; }
.result__info svg { flex-shrink:0; }

.result__error { text-align:center; }
.result__error p { color:var(--red); background:var(--red-light); padding:12px; border-radius:8px; }

/* ━━ Footer ━━ */
.footer { text-align:center; padding:32px 20px; font-size:13px; color:var(--text-muted); }
.footer a { color:var(--primary); text-decoration:none; }
.footer a:hover { text-decoration:underline; }

/* ━━ Modal ━━ */
.modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.4); backdrop-filter:blur(4px); display:flex; align-items:center; justify-content:center; z-index:100; padding:20px; animation:fadeIn 0.2s ease-out; }
.modal-overlay[hidden] { display:none !important; }
.modal { background:var(--card); border-radius:var(--radius); padding:32px; max-width:440px; width:100%; box-shadow:0 20px 60px rgba(0,0,0,0.15); text-align:center; animation:scaleUp 0.3s cubic-bezier(0.16,1,0.3,1); }
.modal[hidden] { display:none !important; }
.modal h3 { font-size:22px; margin-bottom:8px; }
.modal p { color:var(--text-muted); font-size:15px; margin-bottom:24px; line-height:1.5; }
.modal__spinner { display:flex; justify-content:center; margin-bottom:24px; color:var(--primary); }
.modal__spinner svg { width:48px; height:48px; animation:spin 1s linear infinite; }
.modal__icon { font-size:48px; margin-bottom:16px; display:inline-flex; align-items:center; justify-content:center; width:80px; height:80px; background:var(--green-light); border-radius:50%; }
.modal__warning { text-align:left; background:var(--red-light); color:var(--red); border:1px solid #FCA5A5; padding:12px 16px; border-radius:8px; font-size:13px; line-height:1.5; margin-bottom:20px; }

/* ━━ Animations ━━ */
@keyframes fadeIn { from{opacity:0;} to{opacity:1;} }
@keyframes scaleUp { from{opacity:0;transform:scale(0.95)} to{opacity:1;transform:scale(1)} }
.card { animation:fadeIn 0.4s ease-out; }
.hero { animation:fadeIn 0.3s ease-out; }

/* ━━ Responsive ━━ */
@media (max-width:480px) {
  body { background: var(--card); }
  .page { padding:0 0 32px; max-width: 100%; }
  .hero { margin-top: 24px; padding: 0 20px; }
  .card { padding:24px 20px; box-shadow:none; border-radius:0; border:none; }
  .form-row { grid-template-columns:1fr; }
  .hero h1 { font-size:22px; }
  .steps-guide { gap:4px; padding: 0 10px; }
  .step__text { font-size:11px; }
  .step__line { width:16px; }
  .form-group input, .form-group select { font-size: 16px; padding: 14px 16px; }
  .submit-btn { font-size: 17px; padding: 16px; border-radius: 12px; }
  .modal { max-width: calc(100% - 32px); padding: 28px 20px; }
}

/* Queue position shown in the loading modal */
.modal p.queue-status {
  display: inline-block;
  margin: 6px auto 14px;
  padding: 10px 18px;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.3px;
}
