/**
 * Registro comercio · Nexo Design System
 * Misma identidad visual que el panel comerciante.
 */
:root {
  --nx-brand: #2d4a7a;
  --nx-brand-deep: #1e3354;
  --nx-brand-soft: #eef2f7;
  --nx-brand-glow: rgba(45, 74, 122, 0.12);
  --nx-ink: #0f172a;
  --nx-muted: #64748b;
  --nx-line: #e2e8f0;
  --nx-bg: #f1f5f9;
  --nx-sheet: #ffffff;
  --nx-sub: #f8fafc;
  --nx-radius: 14px;
  --nx-radius-lg: 20px;
  --nx-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 28px rgba(15, 23, 42, 0.06);
  --nx-shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.1);
  --nx-font: "Outfit", system-ui, sans-serif;
  --nx-touch: 48px;
  --danger: #dc2626;
  --ok: #2d4a7a;
  --warn: #d97706;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--nx-font);
  color: var(--nx-ink);
  background: var(--nx-bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  letter-spacing: -0.01em;
}

.rc-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 50% at 50% -10%, rgba(45, 74, 122, 0.07) 0%, transparent 55%),
    linear-gradient(180deg, #f8fafc 0%, var(--nx-bg) 40%, #eef2f7 100%);
}

.rc {
  width: min(640px, 100%);
  margin: 0 auto;
  padding: 28px 20px calc(64px + env(safe-area-inset-bottom, 0px));
  animation: rc-rise 0.45s var(--ease) both;
}
.rc.rc-wide { width: min(1040px, 100%); }
.rc.rc-wide .rc-panel { max-width: none; }
.rc.rc-wide #step-1,
.rc.rc-wide #step-2 {
  max-width: 640px;
  margin-inline: auto;
}
@keyframes rc-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.rc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--nx-line);
}
.rc-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.rc-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #2d4a7a;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 6px 18px var(--nx-brand-glow);
}
.rc-brand strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--nx-ink);
}
.rc-brand small {
  color: var(--nx-muted);
  font-size: 11px;
  font-weight: 500;
}
.rc-login {
  font-size: 13px;
  font-weight: 650;
  color: var(--nx-brand-deep);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--nx-line);
  background: var(--nx-sheet);
  transition: border-color 0.15s, background 0.15s;
}
.rc-login:hover {
  border-color: var(--nx-brand);
  background: var(--nx-brand-soft);
}

.rc-hero { margin-bottom: 24px; text-align: center; }
.rc-eyebrow {
  margin: 0 0 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nx-brand);
}
.rc-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 4.5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--nx-ink);
}
.rc-lede {
  margin: 0 auto;
  color: var(--nx-muted);
  font-size: 15px;
  line-height: 1.55;
  max-width: 38em;
  font-weight: 500;
}

.rc-timeline {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--nx-line);
  border-radius: var(--nx-radius);
  overflow: hidden;
  background: var(--nx-sheet);
  box-shadow: var(--nx-shadow);
}
.rc-timeline li {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px 16px;
  opacity: 0.45;
  border-right: 1px solid var(--nx-line);
  transition: opacity 0.25s var(--ease), background 0.25s var(--ease);
}
.rc-timeline li:last-child { border-right: 0; }
.rc-timeline li.is-active,
.rc-timeline li.is-done { opacity: 1; }
.rc-timeline li.is-active { background: var(--nx-brand-soft); }
.rc-timeline .dot {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  background: var(--nx-sub);
  color: var(--nx-muted);
  flex: 0 0 auto;
}
.rc-timeline li.is-active .dot {
  background: var(--nx-brand);
  color: #fff;
}
.rc-timeline li.is-done .dot {
  background: var(--ok);
  color: #fff;
}
.rc-timeline strong {
  display: block;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.2;
}
.rc-timeline em {
  display: block;
  font-style: normal;
  font-size: 11px;
  color: var(--nx-muted);
  margin-top: 2px;
}

.rc-motivate {
  margin: 0 0 14px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--nx-brand-deep);
  background: var(--nx-brand-soft);
  border: 1px solid rgba(20, 184, 166, 0.22);
  border-radius: var(--nx-radius);
  min-height: 1.4em;
}

.rc-panel {
  background: var(--nx-sheet);
  border: 1px solid var(--nx-line);
  border-radius: var(--nx-radius-lg);
  padding: clamp(20px, 4vw, 28px);
  box-shadow: var(--nx-shadow);
  position: relative;
}

.rc-step { display: none; }
.rc-step.is-show {
  display: block;
  animation: rc-step-in 0.35s var(--ease) both;
}
@keyframes rc-step-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.rc-step h2 {
  margin: 0 0 8px;
  font-size: clamp(1.25rem, 3vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.rc-hint {
  margin: 0 0 20px;
  color: var(--nx-muted);
  font-size: 14px;
  line-height: 1.5;
}

.rc-block {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
}
.rc-block legend {
  padding: 0;
  margin: 0 0 12px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--nx-muted);
}

.rc-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--nx-muted);
  margin: 0 0 6px;
}
.rc-input,
select.rc-input {
  width: 100%;
  min-height: var(--nx-touch);
  padding: 12px 14px;
  border: 1.5px solid var(--nx-line);
  border-radius: 12px;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  background: var(--nx-sheet);
  color: var(--nx-ink);
  outline: none;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
  margin-bottom: 14px;
  appearance: none;
}
select.rc-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.rc-input:focus,
select.rc-input:focus {
  border-color: var(--nx-brand);
  box-shadow: 0 0 0 3px var(--nx-brand-glow);
}
.rc-input:disabled { background: var(--nx-sub); color: var(--nx-muted); }
.rc-input.is-ok { border-color: #6ee7b7; }
.rc-input.is-bad { border-color: #fca5a5; }

.rc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}

.rc-phone {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 4px;
}
.rc-dial {
  display: grid;
  place-items: center;
  min-width: 72px;
  padding: 0 12px;
  border: 1.5px solid var(--nx-line);
  border-radius: 12px;
  background: var(--nx-sub);
  font-weight: 700;
  font-size: 14px;
  color: var(--nx-ink);
  height: var(--nx-touch);
  margin-bottom: 14px;
}

.rc-slug {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--nx-sub);
  border: 1px solid var(--nx-line);
  margin: -2px 0 16px;
}
.rc-slug-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nx-muted);
}
.rc-slug code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--nx-brand-deep);
}
.rc-pill {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--nx-sub);
  color: var(--nx-muted);
}
.rc-pill.ok { background: var(--nx-brand-soft); color: var(--ok); }
.rc-pill.bad { background: #fef2f2; color: var(--danger); }
.rc-pill.wait { background: #fffbeb; color: var(--warn); }

.rc-meter {
  height: 6px;
  border-radius: 999px;
  background: var(--nx-line);
  margin: -4px 0 10px;
  overflow: hidden;
}
.rc-meter i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--warn);
  transition: width 0.2s var(--ease), background 0.2s var(--ease);
}
.rc-meter.s1 i { width: 33%; background: #ef4444; }
.rc-meter.s2 i { width: 66%; background: #f59e0b; }
.rc-meter.s3 i { width: 100%; background: var(--ok); }

.rc-tiny {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--nx-muted);
  line-height: 1.45;
}
.rc-checks {
  display: grid;
  gap: 10px;
  margin: 4px 0 16px;
}
.rc-checks label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--nx-ink);
  line-height: 1.45;
  cursor: pointer;
}
.rc-checks input { margin-top: 3px; }
.rc-checks a {
  color: var(--nx-brand-deep);
  font-weight: 700;
}

.rc-challenge {
  padding: 14px;
  border-radius: var(--nx-radius);
  background: var(--nx-sub);
  border: 1px solid var(--nx-line);
  margin-bottom: 10px;
}
.rc-challenge .rc-input { margin-bottom: 0; }
.rc-challenge-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.rc-chal-refresh {
  flex: 0 0 auto;
  border: 1.5px solid var(--nx-line);
  background: var(--nx-sheet);
  border-radius: 10px;
  padding: 8px 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--nx-ink);
  cursor: pointer;
}
.rc-chal-refresh:hover { background: var(--nx-brand-soft); }
.rc-challenge.is-bad { border-color: #fca5a5; background: #fff5f5; }
.rc-challenge.is-ok { border-color: #6ee7b7; background: var(--nx-brand-soft); }

.rc-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.rc-err {
  min-height: 18px;
  margin: 8px 0 0;
  color: var(--danger);
  font-size: 13px;
  font-weight: 650;
}

.rc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 12px;
  border: 0;
  border-radius: 12px;
  padding: 14px 16px;
  min-height: var(--nx-touch);
  background: #2d4a7a;
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 8px 20px var(--nx-brand-glow);
  transition: filter 0.15s var(--ease), opacity 0.15s;
}
.rc-btn:hover:not(:disabled) { filter: brightness(1.05); }
.rc-btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.rc-btn.ghost {
  background: var(--nx-sheet);
  color: var(--nx-ink);
  border: 1.5px solid var(--nx-line);
  box-shadow: none;
}
.rc-btn.ghost:hover:not(:disabled) {
  border-color: var(--nx-brand);
  background: var(--nx-brand-soft);
}
.rc-actions {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 10px;
}
.rc-actions .rc-btn { margin-top: 10px; }

.rc-success { text-align: center; padding: 8px 0 4px; }
.rc-ring {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 3px solid #a7f3d0;
  background: var(--nx-brand-soft);
  display: grid;
  place-items: center;
  font-size: 28px;
  color: var(--ok);
}
.rc-done {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  text-align: left;
  display: grid;
  gap: 8px;
}
.rc-done li {
  padding: 12px 14px 12px 40px;
  border-radius: var(--nx-radius);
  background: var(--nx-sub);
  border: 1px solid var(--nx-line);
  font-size: 13px;
  font-weight: 600;
  position: relative;
}
.rc-done li::before {
  content: "○";
  position: absolute;
  left: 14px;
  color: var(--nx-muted);
}
.rc-done li.done::before { content: "✓"; color: var(--ok); }
.rc-done li.now {
  background: var(--nx-brand-soft);
  border-color: rgba(20, 184, 166, 0.3);
}
.rc-done li.now::before { content: "→"; color: var(--nx-brand); }

.rc-foot {
  margin-top: 32px;
  text-align: center;
  color: var(--nx-muted);
  font-size: 12px;
  line-height: 1.6;
}
.rc-foot a {
  color: var(--nx-brand-deep);
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 640px) {
  .rc-timeline { grid-template-columns: 1fr; }
  .rc-timeline li { border-right: 0; border-bottom: 1px solid var(--nx-line); }
  .rc-timeline li:last-child { border-bottom: 0; }
  .rc-grid { grid-template-columns: 1fr; }
  .rc-actions { grid-template-columns: 1fr; }
  .rc { padding: 20px 14px 48px; }
  .rc-input, select.rc-input { font-size: 16px; }
}
