/* Piezas comunes */
.ctx-ico { width: 13px; height: 13px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ctx-ini {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  background: #ffe8f2;
  color: #d61f6a;
  font-size: 10.5px;
  font-style: normal;
  font-weight: 800;
}
.ctx-ini--b { background: #efe9ff; color: #5a22e9; }
.ctx-ini--c { background: #e9f8ef; color: #15803d; }
.ctx-dot { width: 22px; height: 22px; flex: none; border-radius: 50%; background: #FF7A59; }

/* Hero: formulario → aviso → lista */
.ctx-hero { position: relative; width: 100%; max-width: 560px; min-height: 520px; }
.ctx-hero__path {
  position: absolute;
  left: 200px;
  top: 120px;
  width: calc(100% - 300px);
  height: 230px;
  overflow: visible;
  fill: none;
  stroke: #c9bdfd;
  stroke-width: 2;
  stroke-dasharray: 6 7;
}
.ctx-hero__phone { position: absolute; left: 0; top: 0; z-index: 2; width: 248px; }
.ctx-form { display: grid; gap: 6px; padding: 16px 14px 18px; font-size: 11px; text-align: left; }
.ctx-form__head { display: flex; align-items: center; gap: 9px; padding-bottom: 10px; border-bottom: 1px solid #f0f1f6; }
.ctx-form__head img { border-radius: 9px; }
.ctx-form__head b { display: block; font-size: 12px; }
.ctx-form__head small { color: #6b7190; font-size: 10.5px; }
.ctx-form__t { margin-top: 6px; font-size: 13.5px; line-height: 1.25; }
.ctx-form__h { margin-bottom: 4px; color: #6b7190; font-size: 10.5px; }
.ctx-form__f {
  display: grid;
  gap: 1px;
  padding: 6px 9px;
  border: 1px solid #e3e6f0;
  border-radius: 9px;
  background: #fff;
  color: #1f2547;
  font-size: 11px;
}
.ctx-form__f small { color: #8a90a6; font-size: 9px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.ctx-form__f span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctx-form__f--note span { white-space: normal; line-height: 1.35; }
.ctx-form__send {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
  padding: 9px 0;
  border-radius: 10px;
  background: #2563eb;
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
}
.ctx-form__send svg { width: 13px; height: 13px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ctx-hero__toast { right: 8px; top: 64px; }
.ctx-hero__list { position: absolute; right: 0; bottom: 18px; z-index: 3; width: 310px; padding: 12px 14px 6px; }
.ctx-mini__h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; font-size: 13px; }
.ctx-mini__r { display: flex; align-items: center; gap: 9px; padding: 9px 6px; border-top: 1px solid #f1f2f6; border-radius: 8px; }
.ctx-mini__r > span:nth-child(2) { flex: 1; min-width: 0; }
.ctx-mini__r b { display: block; font-size: 12px; }
.ctx-mini__r small { display: block; overflow: hidden; color: #6b7190; font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.ctx-mini__r.is-new { border-top-color: transparent; background: #fff5f9; box-shadow: inset 3px 0 0 #FB2B7D; }

/* Lista de la app */
.ctx-app { max-width: 1040px; margin: 0 auto; }
.ctx-app .ux-app { grid-template-columns: 176px minmax(0, 1fr); min-height: 380px; }
.ctx-app__main { padding: 20px 22px 22px; }
.ctx-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ctx-top .ux-h { flex: 1; font-size: 17px; }
.ctx-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0; }
.ctx-search { flex: 1 1 200px; gap: 7px; color: #8a90a6; }
.ctx-filter { display: flex; flex-wrap: wrap; gap: 5px; }
.ctx-filter span {
  padding: 5px 10px;
  border: 1px solid #e3e6f0;
  border-radius: 999px;
  background: #fff;
  color: #4b5372;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}
.ctx-filter .is-on { border-color: #2563eb; background: #2563eb; color: #fff; }
.ctx-grid { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 12px; align-items: start; }
.ctx-tbl-wrap { padding: 4px 12px; }
.ctx-tbl { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.ctx-tbl th {
  padding: 9px 6px;
  border-bottom: 1px solid #eef0f5;
  color: #6b7190;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.ctx-tbl td { padding: 10px 6px; border-bottom: 1px solid #f3f4f8; color: #3a4170; vertical-align: middle; }
.ctx-tbl tr:last-child td { border-bottom: 0; }
.ctx-tbl tr.is-sel td { background: #f5f8ff; }
.ctx-person { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ctx-person b { display: block; color: #070d38; font-size: 12px; }
.ctx-person small { display: block; color: #6b7190; font-size: 10px; }
.ctx-card { display: grid; gap: 9px; }
.ctx-card__top { display: flex; align-items: center; gap: 9px; }
.ctx-card__top .ctx-ini { width: 36px; height: 36px; font-size: 12px; }
.ctx-card__top b { display: block; font-size: 13px; }
.ctx-card__top small { display: block; color: #6b7190; font-size: 10.5px; line-height: 1.35; }
.ctx-card__f { display: grid; gap: 2px; padding-top: 8px; border-top: 1px solid #f1f2f6; color: #1f2547; font-size: 11px; line-height: 1.4; }
.ctx-card__f small { color: #8a90a6; font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.ctx-card__ai { justify-content: flex-start; padding: 7px 10px; background: #6D4AFF; }
.ctx-card__ai .mi { width: 18px; height: 18px; border-radius: 6px; background-size: 12px 12px; }

.ctx-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; max-width: 1040px; margin: 40px auto 0; }
.ctx-facts > div { padding-top: 16px; border-top: 2px solid #070d38; }
.ctx-facts b { font-size: 16px; }
.ctx-facts p { margin: 6px 0 0; color: #5b6280; font-size: 14.5px; line-height: 1.5; }

/* Escanear */
.ctx-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; max-width: none; }
.ctx-head > div { max-width: 640px; }
.ctx-head .px-tag { margin-bottom: 6px; }
.ctx-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.ctx-mode { overflow: hidden; border: 1px solid #eceef5; border-radius: 24px; background: #fff; }
.ctx-mode__vis { position: relative; display: grid; place-items: center; height: 270px; padding: 22px; }
.ctx-mode__body { padding: 22px 24px 26px; }
.ctx-mode__n { color: #6D4AFF; font-size: 13px; font-weight: 800; letter-spacing: .06em; }
.ctx-mode h3 { margin: 6px 0 0; font-size: 20px; font-weight: 800; }
.ctx-mode p { margin: 8px 0 0; color: #5b6280; font-size: 15px; line-height: 1.55; }

.ctx-cam { align-content: center; gap: 14px; background: #0b1033; }
.ctx-cam__view {
  position: relative;
  display: grid;
  place-items: center;
  width: 168px;
  height: 168px;
  border-radius: 18px;
  background: radial-gradient(70% 70% at 50% 40%, #2a3266 0, #141a44 100%);
}
.ctx-cam__view img { padding: 8px; border-radius: 10px; background: #fff; }
.ctx-cam__c { position: absolute; width: 28px; height: 28px; border: 3px solid #FB2B7D; }
.ctx-cam__c:nth-of-type(1) { left: 10px; top: 10px; border-width: 3px 0 0 3px; border-radius: 10px 0 0; }
.ctx-cam__c:nth-of-type(2) { right: 10px; top: 10px; border-width: 3px 3px 0 0; border-radius: 0 10px 0 0; }
.ctx-cam__c:nth-of-type(3) { left: 10px; bottom: 10px; border-width: 0 0 3px 3px; border-radius: 0 0 0 10px; }
.ctx-cam__c:nth-of-type(4) { right: 10px; bottom: 10px; border-width: 0 3px 3px 0; border-radius: 0 0 10px; }
.ctx-cam__line {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 50%;
  height: 2px;
  border-radius: 2px;
  background: #FB2B7D;
  box-shadow: 0 0 12px 2px rgb(251 43 125 / 55%);
  animation: ctx-scan 2.6s ease-in-out infinite alternate;
}
@keyframes ctx-scan { from { transform: translateY(-62px); } to { transform: translateY(62px); } }
.ctx-cam__hint { padding: 5px 12px; border-radius: 999px; background: rgb(255 255 255 / 12%); color: #fff; font-size: 11.5px; font-weight: 700; }

.ctx-photo { align-content: center; gap: 18px; background: #f8f1e6; }
.ctx-paper {
  position: relative;
  display: grid;
  gap: 3px;
  width: 210px;
  padding: 18px 18px 22px;
  border-radius: 6px;
  background: #fffdf8;
  box-shadow: 0 2px 0 #eadfcb, 0 18px 34px rgb(80 60 20 / 18%);
  color: #2a2418;
  transform: rotate(-4deg);
}
.ctx-paper b { font-family: Georgia, "Times New Roman", serif; font-size: 16px; }
.ctx-paper small { color: #6f6656; font-size: 10.5px; }
.ctx-paper i { position: absolute; right: 16px; top: 18px; width: 26px; height: 26px; border-radius: 50%; background: #c2410c; }
.ctx-photo__up { padding: 8px 14px; }

.ctx-txt { align-content: start; justify-items: start; background: #f1edff; }
.ctx-txt__code {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  color: #3a4170;
  font: 10.5px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre;
  box-shadow: 0 8px 20px rgb(16 24 64 / 6%);
}
.ctx-txt__out {
  position: absolute;
  right: 18px;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 34px rgb(16 24 64 / 16%);
  font-size: 11px;
}
.ctx-txt__out b { display: block; font-size: 12px; }
.ctx-txt__out small { color: #6b7190; font-size: 10.5px; }

.ctx-save {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
  margin-top: 20px;
  padding: 18px 22px;
  border: 1px solid #eceef5;
  border-radius: 20px;
  background: #fff;
}
.ctx-save__l { align-self: center; margin-right: auto; color: #1f2547; font-size: 15px; font-weight: 700; }
.ctx-save__f { display: grid; gap: 4px; min-width: 170px; }
.ctx-save__f small { color: #6b7190; font-size: 11px; font-weight: 700; }
.ctx-save__f .ux-input { gap: 7px; min-height: 34px; font-size: 12px; }
.ctx-save__f img { border-radius: 5px; }
.ctx-save .ux-btn { min-height: 34px; padding: 0 16px; font-size: 12px; }

/* Eventos */
.ctx-ev { display: flex; align-items: flex-start; justify-content: center; gap: 26px; width: 100%; }
.ctx-badge { position: relative; display: grid; justify-items: center; width: 196px; padding-top: 76px; }
.ctx-badge__strap {
  position: absolute;
  left: 50%;
  top: -40px;
  width: 30px;
  height: 112px;
  background: repeating-linear-gradient(180deg, #FB2B7D 0 16px, #e11d74 16px 18px);
  transform: translateX(-50%);
}
.ctx-badge__clip {
  position: absolute;
  left: 50%;
  top: 64px;
  width: 26px;
  height: 18px;
  border-radius: 4px;
  background: linear-gradient(180deg, #d9dce6, #9aa0b5);
  transform: translateX(-50%);
}
.ctx-badge__card {
  display: grid;
  justify-items: center;
  gap: 2px;
  width: 100%;
  overflow: hidden;
  padding-bottom: 14px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 26px 50px rgb(0 0 0 / 35%);
  color: #070d38;
  text-align: center;
}
.ctx-badge__band { width: 100%; padding: 14px 0 34px; background: linear-gradient(135deg, #6D4AFF, #2563eb); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.ctx-badge__logo { margin-top: -28px; margin-bottom: 4px; border: 3px solid #fff; border-radius: 14px; background: #fff; }
.ctx-badge__card b { font-size: 15px; }
.ctx-badge__card small { color: #6b7190; font-size: 11px; }
.ctx-badge__qr { margin-top: 10px; }
.ctx-badge__cap { margin-top: 2px; font-weight: 700; }
.ctx-badge__acts { display: flex; gap: 5px; margin-top: 14px; }
.ctx-badge__acts span { padding: 5px 9px; border-radius: 999px; background: #1d2450; color: #c7cbe6; font-size: 10.5px; font-weight: 700; white-space: nowrap; }
.ctx-evp {
  display: grid;
  gap: 8px;
  width: 230px;
  margin-top: 40px;
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  color: #1f2547;
  font-size: 12px;
  box-shadow: 0 26px 50px rgb(0 0 0 / 30%);
}
.ctx-evp .ux-pill { justify-self: start; }
.ctx-evp__t { font-size: 16px; }
.ctx-evp__qr { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; background: #f5f6fa; }
.ctx-evp__qr small { color: #4b5372; font-size: 11px; font-weight: 700; }
.ctx-evp__n { display: flex; align-items: baseline; gap: 8px; padding: 4px 2px 6px; border-bottom: 1px solid #f1f2f6; }
.ctx-evp__n b { color: #6D4AFF; font-size: 34px; font-weight: 900; line-height: 1; }
.ctx-evp__n small { color: #5b6280; font-size: 11.5px; }
.ctx-evp__r { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.ctx-evp__r .ctx-ini { width: 24px; height: 24px; font-size: 9.5px; }

/* Después */
.ctx-links { display: flex; flex-wrap: wrap; gap: 18px; margin: 22px 0 0; }
.ctx-links a { color: #2563eb; font-size: 15.5px; font-weight: 800; text-decoration: none; }
.ctx-links a:hover { text-decoration: underline; }
.ctx-route { display: grid; grid-template-columns: minmax(0, 210px) 70px minmax(0, 190px); align-items: center; width: 100%; max-width: 500px; }
.ctx-route__card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 20px 44px rgb(16 24 64 / 14%);
  font-size: 12px;
}
.ctx-route__card .ux-pill { justify-self: start; }
.ctx-route__note { padding: 9px 10px; border-radius: 10px; background: #fff8e1; color: #5c4a12; font-size: 11.5px; line-height: 1.4; }
.ctx-route__lines { width: 100%; height: 200px; fill: none; stroke: #16a34a; stroke-width: 2; stroke-dasharray: 5 6; }
.ctx-route__to { display: grid; gap: 34px; }
.ctx-route__to span {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 28px rgb(16 24 64 / 10%);
  font-size: 12.5px;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .ctx-cam__line { animation: none; }
}
@media (max-width: 1080px) {
  .ctx-grid { grid-template-columns: minmax(0, 1fr); }
  .ctx-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ctx-card__top { grid-column: 1 / -1; }
  .ctx-card__ai { justify-self: start; }
  .ctx-modes { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ctx-mode:last-child { grid-column: 1 / -1; }
  .ctx-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ctx-ev { gap: 16px; }
}
@media (max-width: 899px) {
  .ctx-hero { max-width: 520px; margin: 0 auto; }
  .ctx-head { display: block; }
  .ctx-head .px-tag { margin-top: 16px; }
  .ctx-modes { grid-template-columns: minmax(0, 1fr); }
  .ctx-mode:last-child { grid-column: auto; }
  .ctx-mode__vis { height: 250px; }
  .ctx-save__l { flex-basis: 100%; }
}
@media (max-width: 720px) {
  .ctx-tbl th:nth-child(2),
  .ctx-tbl td:nth-child(2),
  .ctx-tbl th:nth-child(4),
  .ctx-tbl td:nth-child(4) { display: none; }
}
@media (max-width: 560px) {
  .ctx-hero { display: grid; justify-items: center; gap: 14px; min-height: 0; }
  .ctx-hero__path { display: none; }
  .ctx-hero__phone,
  .ctx-hero__toast,
  .ctx-hero__list { position: relative; inset: auto; }
  .ctx-hero__phone { width: 248px; }
  .ctx-hero__list { width: 100%; max-width: 340px; }
  .ctx-app__main { padding: 16px 12px; }
  .ctx-top .ux-h { flex-basis: 100%; }
  .ctx-tbl th:nth-child(3),
  .ctx-tbl td:nth-child(3) { display: none; }
  .ctx-person small { display: none; }
  .ctx-card { grid-template-columns: minmax(0, 1fr); }
  .ctx-facts { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .ctx-save { padding: 16px; }
  .ctx-save__f { flex: 1 1 100%; }
  .ctx-save .ux-btn { width: 100%; }
  .ctx-ev { flex-direction: column; align-items: center; gap: 20px; }
  .ctx-evp { width: 100%; max-width: 260px; margin-top: 0; }
  .ctx-route { grid-template-columns: minmax(0, 1fr); gap: 14px; max-width: 300px; }
  .ctx-route__lines { display: none; }
  .ctx-route__to { gap: 10px; }
}
