:root {
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;

  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #0f172a;
  --text-2: #475569;
  --muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  /* Matched to the NVISYS logo blue */
  --primary: #0b4fa6;
  --primary-hover: #093f86;
  --primary-soft: #eff4ff;
  --on-primary: #ffffff;
  --focus: rgba(29, 78, 216, 0.22);

  --success: #15803d;
  --success-soft: #ecfdf3;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --danger-border: #fecdca;
  --warn: #b54708;
  --warn-soft: #fffaeb;
  --info-soft: #eff4ff;
  --info-border: #c7d7fe;

  --brand-from: #0b1b34;
  --brand-to: #12366b;
  --brand-text: #e8eefb;
  --brand-muted: #a9b8d6;

  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 8px 24px rgba(15, 23, 42, 0.06);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1120;
    --surface: #111a2e;
    --surface-2: #0f1729;
    --text: #e5ebf5;
    --text-2: #b4c0d4;
    --muted: #8b98ae;
    --border: #22304a;
    --border-strong: #2f3f5e;

    --primary: #4f7df3;
    --primary-hover: #6b92f6;
    --primary-soft: #16244a;
    --on-primary: #ffffff;
    --focus: rgba(79, 125, 243, 0.35);

    --success: #4ade80;
    --success-soft: #0f2a1c;
    --danger: #fda29b;
    --danger-soft: #2d1414;
    --danger-border: #5c2323;
    --warn: #fdb022;
    --warn-soft: #2b2110;
    --info-soft: #14213f;
    --info-border: #29407a;

    --brand-from: #060d1c;
    --brand-to: #0d2348;

    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

/* ---------- Layout ---------- */

.shell {
  display: grid;
  grid-template-columns: minmax(340px, 440px) 1fr;
  min-height: 100vh;
}

.brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: 48px 44px;
  color: var(--brand-text);
  background:
    radial-gradient(800px 400px at -10% 110%, rgba(56, 120, 255, 0.28), transparent 60%),
    radial-gradient(500px 300px at 120% -10%, rgba(120, 160, 255, 0.18), transparent 60%),
    linear-gradient(160deg, var(--brand-from), var(--brand-to));
}

/* Subtle grid texture */
.brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, transparent, #000 40%, transparent);
  pointer-events: none;
}

.brand > * { position: relative; z-index: 1; }

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}
.logo svg { width: 30px; height: 30px; color: #8fb3ff; }

.brand h2 {
  margin: 56px 0 12px;
  font-size: 1.75rem;
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.brand-lead { margin: 0; color: var(--brand-muted); font-size: 1rem; }

.features { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 22px; }
.features li { display: flex; gap: 14px; align-items: flex-start; }
.features strong { display: block; font-weight: 600; font-size: 0.95rem; }
.features span:not(.feature-icon) { display: block; color: var(--brand-muted); font-size: 0.88rem; }

.feature-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.feature-icon svg { width: 18px; height: 18px; color: #b9cdff; }

.brand-foot { margin: 0; font-size: 0.85rem; color: var(--brand-muted); }

.panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 32px 24px;
}

/* Company logo, top-right of the form side */
.panel-top {
  align-self: stretch;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 28px;
}
.company-logo { display: block; width: 168px; height: auto; }
/* The artwork is blue/gray on transparency; give it a light plate on dark backgrounds. */
@media (prefers-color-scheme: dark) {
  .company-logo { box-sizing: content-box; padding: 6px 10px; border-radius: 8px; background: #ffffff; }
}

.panel-inner { width: 100%; max-width: 520px; flex: 1; }

.panel-head { margin-bottom: 28px; }
.panel-head h1, .result h1 {
  margin: 0 0 6px;
  font-size: 1.6rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}
.panel-head p { margin: 0; color: var(--text-2); }

/* Cloudflare Turnstile: only takes space when Cloudflare asks the guest to click */
.turnstile { display: flex; justify-content: center; }
.turnstile:has(iframe[style*="display: none"]), .turnstile:empty { display: none; }

.panel-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 40px;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}
.foot-notes { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.copyright { margin: 0; font-size: 0.78rem; }

/* ---------- Stepper ---------- */

.stepper {
  display: flex;
  list-style: none;
  margin: 0 0 36px;
  padding: 0;
  counter-reset: step;
}

.stepper li {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
}

.stepper li:not(:last-child)::after {
  content: "";
  flex: 1;
  height: 2px;
  margin: 0 12px;
  border-radius: 2px;
  background: var(--border);
}

.stepper .dot {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s;
}

.stepper li.active { color: var(--text); }
.stepper li.active .dot {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 0 0 4px var(--focus);
}

.stepper li.complete { color: var(--text-2); }
.stepper li.complete .dot {
  border-color: var(--success);
  background: var(--success);
  color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 10.5 3 3 7-7' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 16px;
  background-position: center;
  background-repeat: no-repeat;
}
.stepper li.complete::after { background: var(--success); }

/* ---------- Alert ---------- */

.alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  margin-bottom: 24px;
  border-radius: var(--radius);
  border: 1px solid;
  font-size: 0.9rem;
}
.alert-icon { flex: none; width: 18px; height: 18px; margin-top: 2px; }
.alert.error { background: var(--danger-soft); border-color: var(--danger-border); color: var(--danger); }
.alert.info { background: var(--info-soft); border-color: var(--info-border); color: var(--primary); }

/* ---------- Form ---------- */

form { margin: 0; }
#details-form { display: grid; gap: 18px; }

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

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

label { font-size: 0.875rem; font-weight: 550; color: var(--text); }
.req { color: var(--danger); margin-left: 2px; }
.optional {
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
}

input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder { color: var(--muted); opacity: 0.7; }
input:hover { border-color: var(--muted); }
input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--focus); }
input[aria-invalid="true"] { border-color: var(--danger); }
input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.18); }
input:disabled { opacity: 0.65; cursor: not-allowed; }

.hint { margin: 0; font-size: 0.8rem; color: var(--muted); }
.field-error {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 0.8rem;
  color: var(--danger);
  font-weight: 500;
}
.field-error::before {
  content: "";
  width: 14px;
  height: 14px;
  flex: none;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm1 15h-2v-2h2v2Zm0-4h-2V7h2v6Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Consent checkbox ---------- */

.consent {
  margin-top: 4px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.consent:has(input[aria-invalid="true"]) { border-color: var(--danger); background: var(--danger-soft); }

.checkbox {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-weight: 400;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-2);
  cursor: pointer;
}
/* Native input kept for accessibility/validation, visually replaced by .checkmark */
.checkbox input {
  position: absolute;
  opacity: 0;
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
}
.checkmark {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border: 1.5px solid var(--border-strong);
  border-radius: 5px;
  background: var(--surface);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.checkbox:hover .checkmark { border-color: var(--muted); }
.checkbox input:focus-visible + .checkmark { box-shadow: 0 0 0 4px var(--focus); border-color: var(--primary); }
.checkbox input[aria-invalid="true"] + .checkmark { border-color: var(--danger); }
.checkbox input:checked + .checkmark {
  border-color: var(--primary);
  background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 10.5 3 3 7-7' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 15px no-repeat;
}
.checkbox a { color: var(--primary); font-weight: 550; text-decoration: underline; text-underline-offset: 2px; }
.checkbox a:hover { color: var(--primary-hover); }
.consent .field-error { margin-left: 32px; }

/* ---------- Continue gate ---------- */

/* Grey, inert Continue button until the Privacy Policy has been read */
#continue:disabled:not(.loading) {
  background: var(--border);
  color: var(--muted);
  opacity: 1;
  cursor: not-allowed;
}
#continue:disabled .btn-arrow { transform: none; }

.gate-hint { display: grid; justify-items: center; gap: 8px; margin: -4px 0 0; font-size: 0.82rem; color: var(--muted); }
.gate-hint p { display: flex; align-items: center; gap: 6px; margin: 0; }
.gate-hint svg { flex: none; width: 15px; height: 15px; }

.gate-docs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.gate-doc {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px 5px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--primary);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.gate-doc:hover { border-color: var(--primary); background: var(--primary-soft); }
.gate-doc:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--focus); }
.gate-dot { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid currentColor; }
.gate-doc.done { color: var(--success); border-color: color-mix(in srgb, var(--success) 45%, var(--border)); background: var(--success-soft); }
.gate-doc.done .gate-dot {
  border-color: var(--success);
  background: var(--success) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 10.5 3 3 7-7' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px no-repeat;
}


/* ---------- Privacy Policy popup ---------- */

.modal {
  width: min(540px, calc(100vw - 32px));
  max-height: min(64vh, 560px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}
.modal[open] { display: flex; flex-direction: column; animation: modal-in 0.2s ease-out; }
.modal::backdrop { background: rgba(10, 17, 32, 0.55); backdrop-filter: blur(3px); }

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--border);
}
.modal-head h2 { margin: 0; font-size: 0.95rem; font-weight: 650; letter-spacing: -0.01em; }
.modal-sub { margin: 2px 0 0; font-size: 0.72rem; color: var(--muted); }
.modal-sub a { color: var(--primary); }

.modal-close {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.modal-close:hover { background: var(--surface-2); color: var(--text); }
.modal-close:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--focus); }
.modal-close svg { width: 18px; height: 18px; }

.modal-progress { height: 3px; background: var(--border); }
.modal-progress span { display: block; height: 100%; width: 0; background: var(--primary); transition: width 0.1s linear; }
.modal.read .modal-progress span { background: var(--success); }

.modal-body { flex: 1; min-height: 140px; overflow-y: auto; padding: 4px 16px 16px; overscroll-behavior: contain; }
.modal-body:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--focus); }

.modal-state { display: grid; place-items: center; gap: 12px; padding: 64px 16px; text-align: center; color: var(--text-2); }
.modal-state p { margin: 0; }

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.modal-status { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 0.75rem; color: var(--muted); }
.modal-status svg { width: 16px; height: 16px; flex: none; }
.arrow-down { animation: nudge 1.4s ease-in-out infinite; }
.modal.read .modal-status { color: var(--success); font-weight: 600; }
.modal.read .arrow-down { animation: none; }

/* Policy typography */
.modal .doc-content { font-size: 0.72rem; line-height: 1.5; }
.doc-content { font-size: 0.82rem; line-height: 1.6; color: var(--text-2); }
/* Source pages mix heading levels for sibling sections, so all headings share one size. */
.modal .doc-content :is(h1, h2, h3, h4, h5, h6) { font-size: 0.78rem; margin-top: 1.1em; }
.doc-content :is(h1, h2, h3, h4, h5, h6) { margin: 1.5em 0 0.45em; font-size: 0.9rem; font-weight: 650; color: var(--text); line-height: 1.35; }
.doc-content p { margin: 0.7em 0; }
.doc-content ul, .doc-content ol { margin: 0.6em 0; padding-left: 1.4em; }
.doc-content li { margin: 0.25em 0; }
.doc-content li p { margin: 0; }
.doc-content strong { color: var(--text); }
.doc-content hr { border: 0; border-top: 1px solid var(--border); margin: 1.6em 0; }
.doc-content a { color: var(--primary); }

/* Standalone /terms and /privacy pages */
.doc-page { background: var(--surface); font-family: var(--font); }
.doc-page main { max-width: 760px; margin: 0 auto; padding: 40px 16px 64px; }
.doc-page h1 { margin: 0 0 8px; font-size: 1.4rem; color: var(--text); }

@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }

@media (max-width: 520px) {
  .modal { width: 100vw; max-width: 100vw; max-height: 75vh; margin: auto 0 0; border-radius: 12px 12px 0 0; }
  .modal-body { padding: 4px 14px 14px; }
  .modal-head, .modal-foot { padding-left: 14px; padding-right: 14px; }
  .modal-foot { flex-direction: column; align-items: stretch; text-align: center; }
  .modal-status { justify-content: center; }
}


/* ---------- Buttons ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  font: inherit;
  font-weight: 600;
  font-size: 0.925rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, color 0.15s;
}
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--focus); }
.btn:disabled { cursor: not-allowed; opacity: 0.6; }
.btn svg { width: 18px; height: 18px; }

.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }

.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); }

.btn-text { height: auto; padding: 6px 4px; background: none; color: var(--primary); font-weight: 550; }
.btn-text:hover:not(:disabled) { color: var(--primary-hover); text-decoration: underline; text-underline-offset: 3px; }
.btn-text:disabled { color: var(--muted); opacity: 1; text-decoration: none; }

.btn-block { width: 100%; margin-top: 6px; }
a.btn { text-decoration: none; }
#accept-invite { margin: 4px 0 16px; }
.btn-arrow { transition: transform 0.15s; }
.btn-primary:hover .btn-arrow { transform: translateX(2px); }

/* Loading state: hide content, show spinner */
.btn.loading { color: transparent !important; pointer-events: none; }
.btn.loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--on-primary);
  border-right-color: transparent;
  animation: spin 0.7s linear infinite;
}

.btn-text.loading::after, .btn-secondary.loading::after { border-color: var(--primary); border-right-color: transparent; }

.back { margin-top: 20px; color: var(--text-2); }
.back svg { width: 16px; height: 16px; }

/* ---------- Verification ---------- */

.verify-list { display: grid; gap: 14px; }

.verify-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.verify-or::before,
.verify-or::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.verify-or[hidden] { display: none; }

.verify-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  transition: border-color 0.2s;
}
.verify-card.verified { border-color: color-mix(in srgb, var(--success) 40%, var(--border)); }

.verify-head { display: flex; align-items: center; gap: 12px; }
.verify-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
}
.verify-icon svg { width: 20px; height: 20px; }
.verify-card.verified .verify-icon { background: var(--success-soft); color: var(--success); }

.verify-title { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.verify-title strong { font-size: 0.95rem; font-weight: 600; }
.target { color: var(--muted); font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px 3px 7px;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  font-size: 0.78rem;
  font-weight: 600;
}
.badge svg { width: 14px; height: 14px; }

.verify-body { margin-top: 16px; display: grid; gap: 14px; }

.otp-boxes { display: flex; gap: 8px; }
.otp-boxes input {
  width: 48px;
  height: 54px;
  padding: 0;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  caret-color: var(--primary);
}
.otp-boxes input.filled { border-color: var(--primary); background: var(--primary-soft); }
.otp-boxes.error input { border-color: var(--danger); animation: shake 0.3s; }
/* Visual gap between the 3rd and 4th digit */
.otp-boxes input:nth-child(3) { margin-right: 8px; }

.verify-actions { display: flex; align-items: center; gap: 16px; }

/* ---------- Result ---------- */

.result { text-align: center; padding: 12px 0 8px; }
.result p { color: var(--text-2); margin: 0 auto 20px; max-width: 440px; }

.result-icon {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 18px;
  border-radius: 50%;
}
.result-icon svg { width: 30px; height: 30px; }
.result-icon.ok { background: var(--success-soft); color: var(--success); box-shadow: 0 0 0 8px color-mix(in srgb, var(--success-soft) 50%, transparent); }
.result-icon.warn { background: var(--warn-soft); color: var(--warn); box-shadow: 0 0 0 8px color-mix(in srgb, var(--warn-soft) 50%, transparent); }
.result-icon.pending { background: var(--primary-soft); color: var(--primary); }

.next-steps {
  list-style: none;
  margin: 0 0 20px;
  padding: 6px 20px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.next-steps li { display: flex; gap: 14px; padding: 14px 0; color: var(--text-2); font-size: 0.9rem; }
.next-steps li + li { border-top: 1px solid var(--border); }
.next-steps li > span {
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
}
.next-steps strong { display: block; color: var(--text); font-weight: 600; margin-bottom: 2px; }

.reference { font-size: 0.82rem; color: var(--muted); }
.reference code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
}

#restart-done { margin: 4px auto 0; display: flex; }

.spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid var(--primary);
  border-right-color: transparent;
  animation: spin 0.8s linear infinite;
}

/* ---------- Motion ---------- */

section[data-panel]:not([hidden]) { animation: fade-in 0.25s ease-out; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes shake {
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .brand { padding: 20px 24px; gap: 0; }
  .brand h2, .brand-lead, .features, .brand-foot { display: none; }
  .panel-top { margin-bottom: 20px; }
  .company-logo { width: 132px; }
  .panel { padding: 32px 16px 20px; }
}

@media (max-width: 520px) {
  .grid-2 { grid-template-columns: 1fr; }
  .stepper .label { display: none; }
  .stepper li:not(:last-child)::after { margin: 0 8px; }
  .verify-card { padding: 16px; }
  .otp-boxes { gap: 6px; }
  .otp-boxes input { width: 100%; max-width: 46px; height: 50px; font-size: 1.2rem; }
  .otp-boxes input:nth-child(3) { margin-right: 4px; }
  .panel-head h1, .result h1 { font-size: 1.35rem; }
  .foot-notes { flex-direction: column; align-items: center; gap: 2px; }
  .foot-notes [aria-hidden] { display: none; }
}

/* ---------- Admin approval page ---------- */

.btn-danger-outline { background: var(--surface); color: var(--danger); border-color: var(--danger-border); }
.btn-danger-outline:hover:not(:disabled) { background: var(--danger-soft); }

.admin-page { margin: 0; background: var(--bg); font-family: var(--font); color: var(--text); min-height: 100vh; }
.admin-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 32px; color: var(--brand-text);
  background: linear-gradient(135deg, var(--brand-from), var(--brand-to));
}
.admin-brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 1rem; }
.admin-brand svg { width: 28px; height: 28px; }
.admin-brand em { font-style: normal; font-weight: 400; color: var(--brand-muted); margin-left: 4px; }
.admin-tag { font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand-muted); }
.admin-main { max-width: 680px; margin: 0 auto; padding: 32px 16px 48px; }
.admin-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 28px 32px; }
.admin-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.admin-head h1 { margin: 2px 0 0; font-size: 1.4rem; letter-spacing: -0.01em; }
.admin-eyebrow { margin: 0; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--primary); }
.admin-status { padding: 4px 12px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; background: var(--warn-soft); color: var(--warn); border: 1px solid #fedf89; }
.admin-lead { margin: 14px 0 0; color: var(--text-2); font-size: 0.92rem; line-height: 1.55; }
.admin-section { margin: 26px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); font-size: 0.72rem; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; margin: 0; }
.admin-grid dt { font-size: 0.75rem; color: var(--muted); margin-bottom: 2px; }
.admin-grid dd { margin: 0; font-size: 0.92rem; font-weight: 550; overflow-wrap: anywhere; }
.admin-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.admin-badge { padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.admin-badge.ok { background: var(--success-soft); color: var(--success); border: 1px solid #abefc6; }
.admin-badge.off { background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger-border); }
.admin-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.admin-note { margin: 14px 0 0; font-size: 0.78rem; line-height: 1.5; color: var(--muted); }
.admin-notice { text-align: center; padding: 16px 0; }
.admin-notice h1 { margin: 16px 0 8px; font-size: 1.35rem; }
.admin-notice p { margin: 0 auto; max-width: 440px; color: var(--text-2); line-height: 1.55; }
.admin-foot { margin: 16px 0 0; text-align: center; font-size: 0.75rem; color: var(--muted); }
@media (max-width: 560px) {
  .admin-bar { padding: 12px 16px; }
  .admin-tag { display: none; }
  .admin-card { padding: 20px; }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-actions { flex-direction: column-reverse; }
}
.gate-agree { cursor: default; }
.gate-agree:hover { border-color: var(--border-strong); background: var(--surface); }
.gate-agree.done:hover { background: var(--success-soft); border-color: color-mix(in srgb, var(--success) 45%, var(--border)); }
