:root {
  --bg: #f5f6fb;
  --ink: #16171d;
  --muted: #717380;
  --card: #ffffff;
  --line: #e5e7ef;
  --red: #ff3038;
  --violet: #6f2cff;
  --blue: #1677ff;
  --green: #20b86d;
  --shadow: 0 22px 60px rgba(20, 22, 32, .16);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(800px 420px at 8% -8%, rgba(255, 48, 56, .16), transparent 62%),
    radial-gradient(760px 420px at 110% 4%, rgba(22, 119, 255, .14), transparent 58%),
    linear-gradient(180deg, #ffffff 0, var(--bg) 46%);
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { border: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }

.topbar { display: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 18px Manrope, sans-serif; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(20, 22, 32, .08);
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.status-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: #343641;
  font-size: 13px;
  font-weight: 800;
}

.app-shell {
  width: min(100% - 28px, 980px);
  margin: 0 auto;
  padding: 22px 0 70px;
}
.phone-card {
  width: min(100%, 560px);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: cardEnter .58s cubic-bezier(.2,.8,.2,1) both;
}
.intro {
  padding: 30px 24px 20px;
  background:
    linear-gradient(135deg, rgba(111, 44, 255, .95), rgba(255, 48, 56, .92)),
    #1d113a;
  color: white;
}
.eyebrow {
  display: inline-flex;
  margin-bottom: 11px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.intro h1 {
  margin: 0 0 9px;
  font: 800 clamp(34px, 9vw, 48px)/1 Manrope, sans-serif;
  letter-spacing: 0;
}
.intro p {
  max-width: 430px;
  margin: 0;
  color: rgba(255, 255, 255, .82);
  font-size: 15px;
  line-height: 1.55;
}

.progress {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 18px 22px 8px;
}
.progress-step {
  display: grid;
  justify-items: center;
  gap: 5px;
  color: #8b8e9b;
  font-size: 11px;
  font-weight: 900;
}
.progress-step span {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #d9dce7;
  color: white;
}
.progress-step.active { color: var(--ink); }
.progress-step.active span { background: linear-gradient(135deg, var(--violet), var(--red)); }
.progress-step.active span { animation: stepPop .34s cubic-bezier(.2,.9,.2,1.3); }
.progress-line { height: 3px; border-radius: 999px; background: #d9dce7; overflow: hidden; }
.progress-line:before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--violet), var(--red));
  transform: translateX(-100%);
  transition: transform .35s ease;
}
.progress-step.active + .progress-line:before { transform: translateX(0); }

.flow-form { padding: 12px 20px 0; }
.flow-step { display: none; min-height: 420px; }
.flow-step.active { display: block; animation: stepEnter .32s ease both; }
.step-title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 12px 0 18px;
}
.step-title > span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: #11131a;
  color: white;
  font-weight: 900;
}
.step-title h2 {
  margin: 0 0 4px;
  font: 800 23px/1.15 Manrope, sans-serif;
  letter-spacing: 0;
}
.step-title p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }

.network-grid, .service-grid {
  display: grid;
  gap: 12px;
}
.network-grid { grid-template-columns: 1fr; }
.service-grid { grid-template-columns: 1fr; }
.choice-card {
  position: relative;
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 76px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfcff;
  color: var(--ink);
  text-align: left;
  overflow: hidden;
  transition: transform .18s, border-color .18s, box-shadow .18s, background .18s;
}
.choice-card:after, .package-card:after, .nav-button:after, .pay-button:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255,255,255,.45), transparent 80%);
  transform: translateX(-120%);
  transition: transform .45s ease;
  pointer-events: none;
}
.choice-card:hover:after, .package-card:hover:after, .nav-button:hover:after, .pay-button:hover:after { transform: translateX(120%); }
.choice-card:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(20, 22, 32, .09); }
.choice-card.active {
  border-color: rgba(111, 44, 255, .5);
  background: linear-gradient(135deg, rgba(111, 44, 255, .08), rgba(255, 48, 56, .08));
  box-shadow: 0 14px 32px rgba(111, 44, 255, .14);
}
.choice-card > span {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: #11131a;
  color: white;
  font: 900 23px Manrope, sans-serif;
  transition: transform .2s ease;
}
.choice-card.active > span { transform: rotate(-4deg) scale(1.05); }
.choice-card b { display: block; font: 800 18px Manrope, sans-serif; }
.choice-card small { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; }

.package-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.package-card {
  position: relative;
  min-height: 128px;
  padding: 16px 12px 12px;
  border: 1px solid #1f222d;
  border-radius: 16px;
  background: white;
  color: var(--ink);
  text-align: center;
  transition: transform .18s, box-shadow .18s, border-color .18s;
  overflow: hidden;
}
.package-card:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(20, 22, 32, .12); }
.package-card.active {
  border-color: var(--violet);
  background: linear-gradient(135deg, #6f2cff, #ff3038);
  color: white;
  animation: selectedPulse .36s ease both;
}
.package-card em {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 8px;
  border-radius: 999px;
  background: #ffe45c;
  color: #251d00;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}
.package-card strong { display: block; margin-top: 6px; font: 900 26px/1 Manrope, sans-serif; }
.package-card span { display: block; margin: 6px 0 12px; font-size: 13px; }
.package-card b { display: inline-flex; padding: 5px 8px; border-radius: 999px; background: #eef0f7; font-size: 13px; }
.package-card.active b { background: rgba(255, 255, 255, .2); }

.custom-box, .target-box {
  display: block;
  margin-top: 14px;
}
.custom-box span, .target-box span {
  display: block;
  margin-bottom: 8px;
  color: #343641;
  font-size: 13px;
  font-weight: 900;
}
input {
  width: 100%;
  min-height: 54px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfcff;
  color: var(--ink);
  outline: 0;
}
input:focus { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(111, 44, 255, .12); }
.target-box.compact { margin-top: 12px; }

.target-preview {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8f9fd;
}
.preview-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--violet), var(--red));
  color: white;
  font-weight: 900;
  overflow: hidden;
  box-shadow: 0 12px 24px rgba(111, 44, 255, .22);
}
.preview-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.preview-avatar span {
  position: relative;
  z-index: 1;
}
.target-preview b { display: block; margin-bottom: 3px; font: 800 15px Manrope, sans-serif; }
.target-preview p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }

.summary-card {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfcff;
  overflow: hidden;
}
.summary-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
}
.summary-card div:last-child { border-bottom: 0; }
.summary-card span { color: var(--muted); font-size: 13px; }
.summary-card strong { text-align: right; font: 900 15px Manrope, sans-serif; overflow-wrap: anywhere; }

.payment-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 16px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f1f3f8;
}
.pay-tab {
  display: grid;
  place-items: center;
  gap: 5px;
  min-height: 58px;
  padding: 8px 6px;
  border-radius: 12px;
  background: transparent;
  color: #666977;
  font-weight: 900;
}
.pay-tab span { display: block; font-size: 13px; line-height: 1.15; }
.pay-tab small { display: block; font-size: 10px; font-weight: 800; line-height: 1.15; color: #8b8e9b; }
.pay-tab.active small { color: #666977; }
.pay-tab.active { background: white; color: var(--ink); box-shadow: 0 8px 18px rgba(20, 22, 32, .08); }
.currency-notice { margin: 10px 2px 0; color: var(--muted); font-size: 12px; font-weight: 800; }
.payment-panel { display: none; padding-top: 14px; }
.payment-panel.active { display: block; }
.pay-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--violet), var(--red));
  color: white;
  font-weight: 900;
  box-shadow: 0 16px 30px rgba(111, 44, 255, .2);
}
.pay-button.wompi { background: linear-gradient(135deg, #159657, #20c977); box-shadow: 0 16px 30px rgba(32, 184, 109, .18); }
.message { min-height: 22px; margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.message.error { color: #d91f2b; }
.message.ok { color: #12814d; }
.setup-warning {
  padding: 13px;
  border: 1px solid rgba(255, 193, 7, .45);
  border-radius: 14px;
  background: rgba(255, 193, 7, .12);
  color: #5e4800;
  font-size: 13px;
  line-height: 1.5;
}
code { padding: 2px 5px; border-radius: 6px; background: rgba(20, 22, 32, .08); }

.flow-actions {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 10px;
  padding: 14px 20px 20px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(18px);
}
.nav-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border-radius: 16px;
  background: #11131a;
  color: white;
  font-weight: 900;
}
.nav-button.secondary {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}

.confirm-body {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}
.confirm-shell { width: min(620px, 100%); }
.confirm-brand { margin-bottom: 18px; }
.confirm-box {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: white;
  box-shadow: var(--shadow);
}
.confirm-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: var(--green);
  color: white;
  font-size: 30px;
  font-weight: 900;
}
.confirm-box h1 { margin: 18px 0 10px; font: 800 44px/1 Manrope, sans-serif; }
.confirm-box p { color: var(--muted); line-height: 1.65; }
.reference, .status-list {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfcff;
}
.reference span, .status-list span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.reference strong { overflow-wrap: anywhere; }
.status-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }

@media (max-width: 620px) {
  .app-shell { width: min(100% - 18px, 980px); padding-top: 9px; }
  .phone-card { border-radius: 22px; }
  .intro { padding: 26px 18px 18px; }
  .progress { padding-inline: 16px; }
  .flow-form { padding-inline: 14px; }
  .flow-step { min-height: 440px; }
  .package-grid { grid-template-columns: 1fr 1fr; }
  .flow-actions { padding-inline: 14px; }
  .confirm-actions, .status-list { grid-template-columns: 1fr; }
}

@media (max-width: 390px) {
  .package-grid { grid-template-columns: 1fr; }
  .payment-tabs { grid-template-columns: 1fr; }
}

.emoji-particle {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: particleBurst .76s cubic-bezier(.18,.86,.22,1) forwards;
  font-size: 20px;
  filter: drop-shadow(0 8px 10px rgba(20,22,32,.18));
}

@keyframes cardEnter {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes stepEnter {
  from { opacity: 0; transform: translateX(14px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes stepPop {
  0% { transform: scale(.82); }
  70% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

@keyframes selectedPulse {
  0% { transform: scale(.98); }
  60% { transform: scale(1.025); }
  100% { transform: scale(1); }
}

@keyframes particleBurst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.4) rotate(0deg); }
  14% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1.15) rotate(24deg); }
}

@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
