/* PULSiA — tarjetas y editor de tarjetas (estilo 7Stamp) */

.card-visual {
  width: 100%; max-width: 210px; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; font-size: 11px;
}
.card-visual .cv-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-weight: 800; font-size: 12px; }
.card-visual .cv-logo { font-size: 16px; }
.card-visual .cv-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-visual .cv-dots { display: grid; gap: 6px; padding: 12px; }
.card-visual .cv-dot {
  aspect-ratio: 1; border: 2px solid #d6d4e6; border-radius: 50%; background: transparent;
  display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800;
}
.card-visual .cv-reward { padding: 0 12px 10px; font-size: 10px; }
.card-visual .cv-foot { margin-top: auto; padding: 6px 12px; font-size: 9px; color: var(--muted); background: #faf9f6; border-top: 1px solid var(--line); }
.card-visual.wallet { max-width: 180px; border-radius: 16px; box-shadow: 0 10px 24px rgba(23, 24, 31, 0.12); }
.card-visual.wallet .cv-dots { padding: 10px; }
.card-visual.wallet .cv-foot { text-align: center; }
.previews { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.previews .card-visual { flex: 1 1 150px; }

/* ===== editor full-screen ===== */
.modal.full { width: min(1220px, 96vw); height: 92vh; display: flex; flex-direction: column; overflow: hidden; }
.editor { display: flex; flex-direction: column; height: 100%; }
.editor-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.ed-steps { display: flex; gap: 6px; flex-wrap: wrap; }
.ed-step { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); }
.ed-step b { width: 18px; height: 18px; border-radius: 50%; background: #ecebf4; color: var(--muted); display: flex; align-items: center; justify-content: center; font-size: 10px; }
.ed-step.active { background: var(--accent-soft); color: var(--accent); border-color: transparent; font-weight: 700; }
.ed-step.active b { background: var(--accent); color: #fff; }
.ed-step.done { color: var(--ink); }
.ed-step.done b { background: var(--mint); color: #04382c; }
.editor-body { display: grid; grid-template-columns: 1fr 360px; flex: 1; min-height: 0; }
.ed-form { padding: 20px 24px; overflow: auto; }
.ed-preview { background: #f7f6fb; border-left: 1px solid var(--line); padding: 22px; display: flex; flex-direction: column; gap: 14px; align-items: center; overflow: auto; }
.ed-title { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 2px; }
.ed-sub { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.ed-form .field { margin-bottom: 12px; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper button { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 18px; cursor: pointer; }
.stepper input { text-align: center; font-weight: 700; }
.opt-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.opt-card { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; background: #fff; text-align: left; font-size: 13px; }
.opt-card.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.editor-foot { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; border-top: 1px solid var(--line); background: #fff; }
.ed-summary { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.ed-summary li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--line); padding: 7px 0; }
.ed-summary li span:first-child { color: var(--muted); }
.phone { width: 280px; flex: 0 0 auto; background: #1a1b24; border-radius: 34px; padding: 12px; box-shadow: 0 22px 50px rgba(0, 0, 0, 0.25); }
.phone .card-visual.wallet { max-width: 100%; }
.ed-note { font-size: 11px; color: var(--muted); text-align: center; }

@media (max-width: 900px) {
  .editor-body { grid-template-columns: 1fr; }
  .ed-preview { display: none; }
  .modal.full { width: 98vw; height: 94vh; }
}

/* ===== tarjeta hero de la lista ===== */
.hero-card {
  width: 100%; max-width: 620px; border: 1px solid var(--line); border-radius: 16px;
  padding: 18px 20px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 8px 24px rgba(23, 24, 31, 0.06);
}
.hc-eyebrow { font-size: 9px; letter-spacing: 0.14em; font-weight: 800; opacity: 0.72; }
.hc-title { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.hc-dots { display: grid; gap: 6px; max-width: 320px; }
.hc-dot { aspect-ratio: 1; border: 2px solid #d6d4e6; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: #fff; }
.hc-scan { font-size: 9px; letter-spacing: 0.12em; font-weight: 700; opacity: 0.6; }
.hc-brand { font-size: 12px; font-weight: 700; }
.hc-foot { font-size: 9px; opacity: 0.55; border-top: 1px dashed var(--line); padding-top: 8px; }

/* ===== selector de plantillas ===== */
.pk-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.pk-chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 11px; font-size: 12px; cursor: pointer; color: var(--muted); }
.pk-chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.pk-card { border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 8px; cursor: pointer; text-align: left; }
.pk-card:hover { border-color: var(--accent); }
.pk-preview { border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px; min-height: 96px; }
.pk-eyebrow { font-size: 7px; letter-spacing: 0.1em; font-weight: 800; opacity: 0.7; }
.pk-reward { font-size: 14px; font-weight: 800; }
.ed-tabs { display: inline-flex; gap: 4px; background: #f2f1f8; border-radius: 999px; padding: 3px; }
.ed-tabs button { border: 0; background: transparent; padding: 5px 12px; border-radius: 999px; font-size: 12px; cursor: pointer; color: var(--muted); }
.ed-tabs button.on { background: #fff; color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.ed-section { font-size: 12px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin: 16px 0 6px; }
.ed-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ===== tarjeta vertical estilo 7Stamp ===== */
.card-tile { width: 300px; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: 0 10px 26px rgba(23,24,31,.07); }
.pcard {
  background: #0a0a0b; color: #fff; padding: 20px 18px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: 'Manrope', system-ui, sans-serif;
}
.pcard .plogo {
  width: 46px; height: 46px; border-radius: 50%; background: #fff; color: #111;
  display: flex; align-items: center; justify-content: center; font-size: 22px; overflow: hidden;
}
.pcard .plogo img { width: 100%; height: 100%; object-fit: cover; }
.pcard .pe { font-size: 7px; letter-spacing: .16em; font-weight: 800; color: rgba(249,250,251,.86); text-align: center; line-height: 1.7; }
.pcard .pn { font-family: 'Playfair Display', Georgia, serif; font-size: 23px; font-weight: 700; text-align: center; line-height: 1.15; }
.pcard .pstrip {
  width: 100%; border-radius: 10px; padding: 9px; display: grid; gap: 7px;
  background: linear-gradient(135deg, #6b4a33 0%, #a97c55 55%, #c9a06f 100%);
  background-size: cover; background-position: center;
}
.pcard .pbadge {
  aspect-ratio: 1; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 15px; background: #f7efe4; color: #3a2a1e; border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.28); position: relative; overflow: hidden;
}
.pcard .pbadge.off { filter: grayscale(1); opacity: .5; background: #c9c9c9; border-color: #e8e8e8; }
.pcard .pbadge img { width: 100%; height: 100%; object-fit: cover; }
.pcard .pid { font-size: 8px; color: rgba(249,250,251,.72); letter-spacing: .04em; }
.pcard .pqr { background: #fff; border-radius: 8px; padding: 7px; width: 104px; }
.pcard .pqr img { display: block; width: 100%; height: auto; }
.pcard .pscan { font-size: 8px; letter-spacing: .12em; font-weight: 700; color: rgba(249,250,251,.72); text-align: center; }
.pcard .pbrand { font-size: 10px; color: rgba(249,250,251,.85); font-weight: 700; }
.card-actions-bar { display: flex; background: #fff; border-top: 1px solid var(--line); }
.card-actions-bar button {
  flex: 1; border: 0; background: #fff; cursor: pointer; padding: 9px 4px 10px;
  font-size: 10px; color: #4b4b57; display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.card-actions-bar button:hover { background: #fff6f3; }
.card-actions-bar .ico { color: #e0603c; font-size: 16px; line-height: 1; }
.ed-preview .pcard { width: 244px; }
.ed-sample { display: flex; align-items: center; gap: 10px; margin: 6px 0 12px; }
.ed-sample .pbadge { width: 44px; height: 44px; flex: 0 0 44px; }
.logo-up {
  width: 66px; height: 66px; border-radius: 50%; border: 2px dashed #e0a79b; cursor: pointer;
  background: #fff center/cover no-repeat; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #a4443c; letter-spacing: .04em; flex: 0 0 66px;
}
.blk-thumb {
  width: 104px; height: 66px; border-radius: 8px; border: 1px solid var(--line); cursor: pointer;
  background: #d9c3b0 center/cover no-repeat; display: flex; align-items: center; justify-content: center;
  position: relative; color: #fff; font-size: 10px; font-weight: 700;
}
.blk-thumb .blk-x {
  position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 1px solid var(--line); color: #555; display: flex; align-items: center; justify-content: center;
  font-size: 11px; cursor: pointer;
}
.blk-hint { text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.ed-form input[type="color"] {
  width: 66px; height: 42px; padding: 3px; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; cursor: pointer;
}
.ms-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.ms-row { display: flex; gap: 8px; align-items: center; }
.ms-row input[type="number"] { max-width: 96px; }
.ms-row input { flex: 1; }

/* ===== tarjeta pública del cliente ===== */
.tarjeta-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 26px 16px 8px; }
.pcard-public { width: 300px; max-width: 92vw; }
.tv-box { width: 380px; max-width: 92vw; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; box-shadow: 0 8px 24px rgba(23,24,31,.06); }
.tv-box h2 { margin: 0 0 8px; }
.tv-h3 { margin: 0 0 10px; font-size: 15px; }
.tv-pill { display: inline-block; background: var(--accent-soft, #ece9ff); color: var(--accent, #5b4bff); font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 999px; margin-bottom: 10px; }
.tv-progress-row { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.tv-label { font-size: 10px; letter-spacing: .12em; font-weight: 800; color: #8a8a99; text-transform: uppercase; }
.tv-big { font-size: 40px; font-weight: 800; line-height: 1; margin-top: 4px; }
.tv-sub { font-size: 13px; font-weight: 600; color: #8a8a99; }
.tv-reward { text-align: right; max-width: 190px; }
.tv-next { font-size: 13px; color: #555; margin: 12px 0 8px; }
.tv-bar { height: 8px; background: #efeef6; border-radius: 999px; overflow: hidden; }
.tv-bar span { display: block; height: 100%; background: #5b4bff; border-radius: 999px; }
.tv-voucher { display: flex; justify-content: space-between; gap: 12px; align-items: center; border-top: 1px dashed var(--line); padding: 10px 0; }
.tv-voucher:first-of-type { border-top: 0; }
.tv-code { font-family: monospace; font-weight: 700; letter-spacing: .08em; background: #f6f5fb; border-radius: 8px; padding: 6px 8px; }
.tv-actions { text-align: center; }

/* ===== estilos de sello (tarjeta + galería del editor) ===== */
.pbadge {
  aspect-ratio: 1; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 15px; background: #f7efe4; color: #3a2a1e; border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.28); position: relative; overflow: hidden;
}
.pbadge.off { filter: grayscale(1); opacity: .5; background: #c9c9c9; border-color: #e8e8e8; }
.pbadge img { width: 100%; height: 100%; object-fit: cover; }
.pbadge.badge {
  background: radial-gradient(circle at 32% 28%, #fff 0%, var(--badge, #f1e2cf) 78%);
  color: #4a2f18; flex-direction: column;
}
.pbadge.badge.shine::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(circle at 30% 22%, rgba(255,255,255,.95), transparent 46%);
}
.pbadge.milestone { box-shadow: 0 0 0 2px #f4b400, 0 2px 6px rgba(0,0,0,.28); }
.pbadge.milestone.off { opacity: .65; filter: none; }
.pbadge.milestone .bi { font-size: 12px; }
.pbadge.badge .bi { font-size: 14px; line-height: 1; }
.pbadge.badge .ribbon {
  position: absolute; bottom: 1px; font-size: 4px; letter-spacing: .06em;
  font-weight: 800; text-transform: uppercase; opacity: .72;
}
.pbadge.postal { border-radius: 5px; border: 2px dashed currentColor; background: #fff; color: #4a2f18; }
.pbadge.star { background: #ffd166; border-color: #fff; color: #7a4d00; }
.pbadge.heart { background: #ffd6e0; border-color: #fff; color: #b3123f; }
.pbadge.logo, .pbadge.custom { background: #fff center/cover no-repeat; }
.pbadge.emoji { background: #fff; }
.stamp-gallery { display: flex; gap: 8px; flex-wrap: wrap; }
.stamp-opt {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  border: 1px solid var(--line); background: #fff; border-radius: 12px;
  padding: 8px 10px; cursor: pointer; min-width: 74px;
}
.stamp-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.stamp-opt .pbadge { width: 34px; height: 34px; flex: 0 0 34px; font-size: 14px; }
.ed-preview .card-tile { width: 244px; }
.ed-mini-row { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
