/* ---------------------------------------------------------------------------
 * Signup wizard — "Plinth" design system (self-contained, no Tailwind).
 * Loaded only by resources/views/layouts/wizard.edge. Kept as a static file
 * (not an inline <style>) so Edge doesn't try to parse @media / @keyframes
 * as template tags.
 * ------------------------------------------------------------------------- */
:root {
  --bg: oklch(0.985 0.004 264);
  --surface: #ffffff;
  --surface-2: oklch(0.992 0.003 264);
  --ink: oklch(0.255 0.02 266);
  --ink-soft: oklch(0.45 0.018 266);
  --muted: oklch(0.60 0.013 266);
  --faint: oklch(0.72 0.01 266);
  --line: oklch(0.925 0.006 266);
  --line-strong: oklch(0.87 0.008 266);
  --accent: oklch(0.535 0.19 277);
  --accent-press: oklch(0.47 0.19 277);
  --accent-ink: oklch(0.42 0.18 277);
  --accent-soft: oklch(0.965 0.022 277);
  --accent-soft-2: oklch(0.93 0.045 277);
  --ring: oklch(0.535 0.19 277 / 0.20);
  --ok: oklch(0.60 0.13 155);
  --ok-soft: oklch(0.96 0.03 155);
  --warn: oklch(0.62 0.16 35);
  --danger: oklch(0.55 0.20 25);
  --danger-soft: oklch(0.965 0.02 25);
  --r-card: 18px;
  --r-field: 11px;
  --r-pill: 999px;
  --shadow-sm: 0 1px 2px oklch(0.4 0.02 266 / 0.05), 0 1px 1px oklch(0.4 0.02 266 / 0.04);
  --shadow-md: 0 10px 30px -12px oklch(0.35 0.04 266 / 0.18), 0 2px 6px -2px oklch(0.35 0.04 266 / 0.08);
  --shadow-lg: 0 30px 70px -28px oklch(0.30 0.05 266 / 0.30), 0 8px 24px -10px oklch(0.30 0.05 266 / 0.12);
  --font: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background-image:
    radial-gradient(120% 90% at 100% 0%, oklch(0.96 0.03 277 / 0.5), transparent 55%),
    radial-gradient(120% 90% at 0% 100%, oklch(0.97 0.02 230 / 0.4), transparent 50%);
}
a { color: inherit; }
::selection { background: var(--accent-soft-2); }

/* ---------- Shell ---------- */
.wizard {
  width: min(1180px, 100%);
  height: min(880px, 94vh);
  display: grid;
  grid-template-columns: 312px 1fr;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

/* ---------- Sidebar ---------- */
.side {
  background: var(--surface-2);
  border-right: 1px solid var(--line);
  padding: 34px 30px;
  display: flex;
  flex-direction: column;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(150deg, var(--accent), oklch(0.6 0.18 300));
  position: relative; box-shadow: var(--shadow-sm); overflow: hidden;
}
.brand .mark::after {
  content: ""; position: absolute; inset: 9px; border-radius: 3px;
  background: var(--surface);
}
.brand .mark img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.brand .mark.has-img::after { display: none; }
.brand .name { font-weight: 800; font-size: 18px; letter-spacing: -0.02em; color: var(--ink); }

.steps { margin-top: 46px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.stepitem {
  display: grid; grid-template-columns: 30px 1fr; gap: 14px;
  align-items: start; padding: 12px 12px; border-radius: 13px;
  position: relative; cursor: default;
  transition: background 160ms ease;
}
.stepitem.active { background: var(--surface); box-shadow: var(--shadow-sm); border: 1px solid var(--line); padding: 11px; }
.step-dot {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  border: 1.5px solid var(--line-strong); color: var(--faint);
  background: var(--surface);
  transition: all 200ms ease;
}
.stepitem.active .step-dot { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.stepitem.done .step-dot { border-color: var(--accent); background: var(--accent); color: #fff; }
.step-tt { display: flex; flex-direction: column; gap: 1px; padding-top: 3px; }
.step-tt .t { font-size: 14px; font-weight: 600; color: var(--ink-soft); letter-spacing: -0.01em; }
.stepitem.active .step-tt .t { color: var(--ink); }
.step-tt .d { font-size: 12px; color: var(--faint); line-height: 1.35; }

/* connector line */
.stepitem:not(:last-child)::before {
  content: ""; position: absolute; left: 26px; top: 42px; bottom: -6px;
  width: 1.5px; background: var(--line); border-radius: 2px;
}
.stepitem.done::before { background: var(--accent); }

.side-foot { margin-top: auto; padding-top: 22px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.side-foot .av { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft-2); display: grid; place-items: center; color: var(--accent-ink); font-weight: 700; font-size: 14px; flex: none; }
.side-foot .ft { font-size: 12px; color: var(--muted); line-height: 1.4; }
.side-foot .ft a { color: var(--accent-ink); text-decoration: none; font-weight: 600; }

/* ---------- Main ---------- */
.main { display: flex; flex-direction: column; min-width: 0; position: relative; }
.main-scroll { flex: 1; overflow-y: auto; padding: 52px 56px 24px; scroll-behavior: smooth; }
.main-scroll::-webkit-scrollbar { width: 10px; }
.main-scroll::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 10px; border: 3px solid var(--surface); }

.topbar { position: absolute; top: 22px; right: 28px; display: flex; align-items: center; gap: 14px; z-index: 4; }
.topbar .prog { font-family: var(--mono); font-size: 12px; color: var(--faint); letter-spacing: 0.02em; }

.head { max-width: 560px; margin-bottom: 30px; }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); font-weight: 600; }
.head h1 { font-size: 30px; line-height: 1.12; letter-spacing: -0.025em; margin: 12px 0 8px; font-weight: 700; }
.head p { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.5; max-width: 480px; }

.step-pane { animation: stepIn 440ms cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes stepIn { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Footer / nav ---------- */
.foot {
  border-top: 1px solid var(--line);
  padding: 18px 56px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface);
  gap: 16px;
}
.foot .dots { display: flex; gap: 7px; }
.foot .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); transition: all 220ms ease; }
.foot .dots i.on { background: var(--accent); width: 22px; border-radius: 4px; }
.foot .nav { display: flex; gap: 10px; align-items: center; }

/* ---------- Fields ---------- */
.grid { display: grid; gap: 18px; max-width: 560px; }
.grid.two { grid-template-columns: 1fr 1fr; }
.grid.three { grid-template-columns: 1fr 1fr 1fr; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field.col-2 { grid-column: span 2; }
.field > label { font-size: 13.5px; font-weight: 600; color: var(--ink-soft); display: flex; align-items: center; gap: 7px; }
.field .opt { font-weight: 500; color: var(--faint); font-size: 12.5px; }
.control {
  font-family: var(--font); font-size: 15px; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line-strong);
  border-radius: var(--r-field); padding: 12px 14px; width: 100%;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
  outline: none;
}
.control::placeholder { color: var(--faint); }
.control:hover { border-color: oklch(0.80 0.01 266); }
.control:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
.control.err { border-color: var(--danger); box-shadow: 0 0 0 4px var(--danger-soft); }
.control[hidden] { display: none; }
select.control { appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2398929e' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; padding-right: 40px; }
select.control:disabled { opacity: 0.55; cursor: not-allowed; }

.with-prefix, .with-suffix { display: flex; align-items: stretch; border: 1.5px solid var(--line-strong); border-radius: var(--r-field); overflow: hidden; transition: border-color 140ms ease, box-shadow 140ms ease; background: var(--surface); }
.with-prefix:focus-within, .with-suffix:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
.with-prefix .control, .with-suffix .control { border: none; box-shadow: none; }
.with-prefix .control:focus, .with-suffix .control:focus { box-shadow: none; }
.affix { display: grid; place-items: center; padding: 0 14px; font-family: var(--mono); font-size: 13.5px; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
.affix.pre { border-right: 1px solid var(--line); }
.affix.suf { border-left: 1px solid var(--line); }

.err-msg { font-size: 12.5px; color: var(--danger); font-weight: 500; display: flex; align-items: center; gap: 5px; }
.hint { font-size: 12.5px; color: var(--faint); line-height: 1.4; }
.alert { border-radius: var(--r-field); padding: 11px 14px; font-size: 13.5px; line-height: 1.45; margin-bottom: 18px; max-width: 560px; }
.alert.error { background: var(--danger-soft); border: 1px solid oklch(0.85 0.08 25); color: var(--danger); }
.alert.ok { background: var(--ok-soft); border: 1px solid oklch(0.85 0.07 155); color: oklch(0.42 0.12 155); }
.alert.warn { background: oklch(0.97 0.05 70); border: 1px solid oklch(0.87 0.09 70); color: oklch(0.45 0.12 60); }
.alert ul { margin: 0; padding-left: 18px; }

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font); font-weight: 600; font-size: 14.5px;
  border-radius: var(--r-field); padding: 11px 20px; cursor: pointer;
  border: 1.5px solid transparent; display: inline-flex; align-items: center; gap: 9px;
  transition: transform 90ms ease, background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, color 140ms ease;
  letter-spacing: -0.005em; white-space: nowrap; text-decoration: none;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm), inset 0 1px 0 oklch(1 0 0 / 0.18); }
.btn-primary:hover { background: var(--accent-press); }
.btn-ghost { background: transparent; color: var(--ink-soft); border-color: transparent; }
.btn-ghost:hover { background: oklch(0.95 0.006 266); color: var(--ink); }
.btn-outline { background: var(--surface); color: var(--ink-soft); border-color: var(--line-strong); }
.btn-outline:hover { border-color: oklch(0.78 0.01 266); color: var(--ink); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-block { width: 100%; justify-content: center; }
.btn-lg { padding: 14px 22px; font-size: 15.5px; }

/* ---------- Password strength ---------- */
.pw-wrap { position: relative; }
.pw-meter { display: flex; gap: 5px; margin-top: 8px; }
.pw-meter i { height: 4px; flex: 1; border-radius: 3px; background: var(--line); transition: background 240ms ease; }
.pw-lab { font-size: 12px; font-weight: 600; margin-top: 5px; color: var(--muted); }
.eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--faint); padding: 6px 12px; font-size: 12px; font-weight: 600; }
.eye:hover { color: var(--ink-soft); }

/* ---------- Segmented ---------- */
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg label { position: relative; }
.seg label input { position: absolute; opacity: 0; pointer-events: none; }
.seg label span {
  font-family: var(--font); font-size: 13.5px; font-weight: 600; cursor: pointer;
  padding: 9px 15px; border-radius: var(--r-pill); border: 1.5px solid var(--line-strong);
  background: var(--surface); color: var(--ink-soft); transition: all 140ms ease; display: inline-block;
}
.seg label span:hover { border-color: oklch(0.78 0.01 266); }
.seg label input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }

/* OTP */
.otp {
  font-family: var(--mono); font-size: 30px; font-weight: 600; text-align: center;
  letter-spacing: 0.45em; padding: 16px 14px;
}

/* ---------- Theme/header cards (step 2) ---------- */
.cards { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.pick {
  border: 1.5px solid var(--line-strong); border-radius: 14px; padding: 14px; cursor: pointer;
  background: var(--surface); transition: all 150ms ease; position: relative; display: block;
}
.pick:hover { border-color: oklch(0.78 0.01 266); }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick input:checked ~ .pick-body { color: var(--accent-ink); }
.pick:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.pick .pick-name { font-size: 13.5px; font-weight: 700; text-transform: capitalize; }
.pick .pick-prev { height: 40px; border-radius: 8px; border: 1px solid var(--line); margin-bottom: 10px; background: var(--surface-2); display: flex; align-items: center; padding: 0 8px; gap: 6px; }
.pick .pick-prev i { height: 6px; border-radius: 3px; background: var(--line-strong); display: block; }

/* color row */
.color-row { display: flex; align-items: center; gap: 12px; }
.color-row input[type=color] { width: 48px; height: 44px; border: 1.5px solid var(--line-strong); border-radius: var(--r-field); background: var(--surface); padding: 3px; cursor: pointer; }
.color-row .code { font-family: var(--mono); font-size: 14px; color: var(--ink-soft); text-transform: uppercase; }

/* live preview (step 2 / step 3) */
.browser { border: 1px solid var(--line-strong); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-md); background: var(--surface); }
.browser .bar { display: flex; align-items: center; gap: 9px; padding: 10px 13px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.browser .lights { display: flex; gap: 6px; }
.browser .lights i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.browser .url { flex: 1; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; padding: 5px 11px; font-family: var(--mono); font-size: 11.5px; color: var(--ink-soft); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.browser .canvas { padding: 0; }
.browser .canvas .topband { height: 46px; display: flex; align-items: center; padding: 0 16px; }
.browser .canvas .topband span { color: #fff; font-weight: 700; font-size: 14px; }
.browser .canvas .body { height: 120px; background: var(--surface-2); display: grid; place-items: center; }
.browser .canvas .body .cta { padding: 9px 18px; border-radius: var(--r-pill); color: #fff; font-size: 12.5px; font-weight: 700; }
.preview-cap { text-align: center; font-size: 12px; color: var(--faint); margin-top: 12px; font-family: var(--mono); }

/* ---------- Plans (step 4) ---------- */
.pay-grid { display: grid; grid-template-columns: 1fr 340px; gap: 34px; align-items: start; max-width: none; }
.plans { display: flex; flex-direction: column; gap: 11px; }
.plan {
  border: 1.5px solid var(--line-strong); border-radius: 15px; padding: 18px 20px; cursor: pointer;
  background: var(--surface); transition: all 150ms ease; position: relative; display: grid;
  grid-template-columns: 22px 1fr auto; gap: 15px; align-items: center;
}
.plan:hover { border-color: oklch(0.78 0.01 266); }
.plan input { position: absolute; opacity: 0; pointer-events: none; }
.plan:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.plan .radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-strong); transition: all 150ms ease; position: relative; }
.plan:has(input:checked) .radio { border-color: var(--accent); }
.plan:has(input:checked) .radio::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent); }
.plan .pl-name { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; display: flex; align-items: center; gap: 9px; }
.plan .pop { font-size: 10.5px; font-weight: 700; color: #fff; background: var(--accent); border-radius: 5px; padding: 2px 7px; letter-spacing: 0.02em; white-space: nowrap; flex: none; }
.plan .pl-desc { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.plan .pl-price { text-align: right; }
.plan .pl-price .amt { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.plan .pl-price .per { font-size: 12px; color: var(--muted); }
.plan .pl-price .free { color: var(--ok); }

.summary { border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface-2); padding: 22px; position: sticky; top: 0; box-shadow: var(--shadow-sm); }
.summary h3 { margin: 0 0 16px; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.sum-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 13.5px; margin-bottom: 10px; color: var(--ink-soft); gap: 12px; }
.sum-row .v { font-weight: 600; color: var(--ink); white-space: nowrap; }
.sum-div { height: 1px; background: var(--line); margin: 14px 0; }
.recap { display: flex; flex-direction: column; gap: 8px; }
.recap .r { display: flex; justify-content: space-between; font-size: 13px; gap: 12px; }
.recap .r .k { color: var(--muted); }
.recap .r .v { font-weight: 600; color: var(--ink); text-align: right; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .pay-grid { grid-template-columns: 1fr; }
  .summary { position: static; }
}
@media (max-width: 860px) {
  body { padding: 0; }
  .wizard { grid-template-columns: 1fr; height: 100vh; border-radius: 0; border: none; }
  .side { display: none; }
  .main-scroll { padding: 40px 28px 20px; }
  .foot { padding: 16px 28px; }
  .grid.two, .grid.three, .cards, .pay-grid { grid-template-columns: 1fr; }
}
