/* ============================================================
   membresia.css — paquete, pago, seguimiento y verificación
   (convive con style.css del asistente; usa los mismos tokens)
   ============================================================ */
:root {
  --navy: #0b3765;
  --navy-deep: #0A1930;
  --gold: #B08D57;
  --bg: #F7F8FA;
  --surface: #FFFFFF;
  --text: #1A2233;
  --text-muted: #626B7A;
  --border: #E2E4EA;
  --success: #2F855A;
  --success-bg: #EAF5EF;
  --danger: #C0392B;
  --danger-bg: #FBEAE8;
  --warn: #9A6700;
  --warn-bg: #FFF6DD;
  --info: #1B4B93;
  --info-bg: #E8F0FB;
  --radius: 12px;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---------- Páginas simples (seguimiento / verificación) ---------- */
.page-simple { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); -webkit-font-smoothing: antialiased; }
.page-simple * { box-sizing: border-box; }
.wrap { max-width: 640px; margin: 0 auto; padding: 20px 16px 48px; }
.page-head { padding: 8px 2px 14px; }
.page-head h1 { margin: 4px 0 6px; font-size: 24px; color: var(--navy); }
.eyebrow { margin: 0; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.muted { color: var(--text-muted); }
.small { font-size: 13px; }
.center { text-align: center; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.card h2 { margin: 0 0 10px; font-size: 18px; color: var(--navy); }
.card h3 { margin: 18px 0 6px; font-size: 15px; }

.banner { border-width: 1px; }
.banner h2 { margin-bottom: 4px; }
.banner p { margin: 0; line-height: 1.5; }
.banner--ok { background: var(--success-bg); border-color: #b9dfc9; } .banner--ok h2 { color: var(--success); }
.banner--warn { background: var(--warn-bg); border-color: #f1dba0; } .banner--warn h2 { color: var(--warn); }
.banner--info { background: var(--info-bg); border-color: #c4d6f1; } .banner--info h2 { color: var(--info); }
.banner--danger { background: var(--danger-bg); border-color: #f0c4be; } .banner--danger h2 { color: var(--danger); }

.notice { padding: 12px 14px; border-radius: 10px; margin-bottom: 14px; font-size: 14.5px; line-height: 1.45; }
.notice--ok { background: var(--success-bg); color: var(--success); }
.notice--danger { background: var(--danger-bg); color: var(--danger); }

/* Botones (versión independiente del asistente) */
.page-simple .btn, .btn--wa {
  display: inline-block; padding: 12px 20px; border-radius: 10px; border: 0; cursor: pointer;
  font: inherit; font-weight: 600; text-decoration: none; text-align: center;
}
.page-simple .btn--primary { background: var(--navy); color: #fff; }
.page-simple .btn--primary:disabled { opacity: .45; cursor: not-allowed; }
.btn--block { display: block; width: 100%; }
.btn--wa { background: #1FA855; color: #fff; display: inline-block; text-decoration: none; padding: 12px 20px; border-radius: 10px; font-weight: 600; }

/* Línea de tiempo */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline__item { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 0 9px 0; color: var(--text-muted); }
.timeline__item:not(:last-child)::after { content: ''; position: absolute; left: 11px; top: 33px; bottom: -9px; width: 2px; background: var(--border); }
.timeline__dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border); background: #fff; display: grid; place-items: center; font-size: 13px; color: #fff; flex: none; z-index: 1; }
.timeline__item.is-done { color: var(--text); }
.timeline__item.is-done .timeline__dot { background: var(--success); border-color: var(--success); }
.timeline__item.is-done:not(:last-child)::after { background: var(--success); }
.timeline__item.is-current { color: var(--navy); font-weight: 700; }
.timeline__item.is-current .timeline__dot { border-color: var(--navy); box-shadow: 0 0 0 4px rgba(11,55,101,.14); }

/* Datos bancarios */
.bank-card { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin: 12px 0 4px; }
.bank-card__amount { background: var(--navy); color: #fff; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.bank-card__amount strong { font-size: 24px; }
.bank-card__label { font-size: 13px; opacity: .85; }
.bank-card__list { margin: 0; }
.bank-card__row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 11px 16px; border-top: 1px solid var(--border); align-items: center; }
.bank-card__row dt { grid-column: 1 / -1; font-size: 12px; color: var(--text-muted); }
.bank-card__row dt em { font-style: normal; color: var(--danger); font-weight: 600; }
.bank-card__row dd { margin: 0; font-weight: 700; word-break: break-word; }
.bank-card__row--concept { background: var(--warn-bg); }
.copy-btn { border: 1px solid var(--border); background: #fff; color: var(--navy); border-radius: 8px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.copy-btn.is-copied { background: var(--success); color: #fff; border-color: var(--success); }

/* Subir comprobante */
.upload { margin-top: 8px; border-top: 1px dashed var(--border); padding-top: 4px; }
.file-drop { display: block; border: 2px dashed #b8c4d6; border-radius: var(--radius); padding: 22px 14px; text-align: center; color: var(--navy); font-weight: 600; cursor: pointer; background: #fafcff; margin: 10px 0 14px; word-break: break-all; }
.file-drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.file-drop:focus-within { outline: 3px solid rgba(11,55,101,.3); }

/* Tablas y listas */
.mini-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.mini-table th { text-align: left; font-size: 12px; color: var(--text-muted); font-weight: 600; padding: 6px 4px; border-bottom: 1px solid var(--border); }
.mini-table td { padding: 9px 4px; border-bottom: 1px solid #f0f1f5; }
.kv { margin: 0; }
.kv div { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid #f0f1f5; }
.kv dt { color: var(--text-muted); font-size: 14px; }
.kv dd { margin: 0; font-weight: 600; text-align: right; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #eceff4; color: #455066; white-space: nowrap; }
.badge--validado, .badge--entregado, .badge--en_preparacion { background: var(--success-bg); color: var(--success); }
.badge--en_revision, .badge--pago_en_revision, .badge--saldo_en_revision { background: var(--info-bg); color: var(--info); }
.badge--por_pagar, .badge--solicitada, .badge--listo_entrega { background: var(--warn-bg); color: var(--warn); }
.badge--rechazado, .badge--cancelada { background: var(--danger-bg); color: var(--danger); }

.incluye summary { cursor: pointer; font-weight: 600; color: var(--navy); padding: 10px 0 4px; }

/* Items del paquete (con foto) */
.items { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.item { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.item__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #eef2f8; display: block; }
.item__body { padding: 10px 12px 12px; }
.item__body h4 { margin: 0 0 4px; font-size: 14.5px; color: var(--navy); line-height: 1.3; }
.item__body p { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.4; }
.tag-lider { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 700; background: var(--warn-bg); color: var(--warn); padding: 2px 8px; border-radius: 999px; }
.item--lider { border-color: #f1dba0; }
.items:not(.items--compact) { grid-template-columns: repeat(4, 1fr); }
.items:not(.items--compact) > .item { grid-column: span 2; }
/* Si el número de ítems es impar, el último ocupa todo el ancho: foto a la izquierda (mismo
   tamaño que las demás) y el texto a la derecha, así la cuadrícula queda pareja */
.items:not(.items--compact) > .item:last-child:nth-child(odd) { grid-column: 1 / -1; flex-direction: row; align-items: stretch; }
.items:not(.items--compact) > .item:last-child:nth-child(odd) .item__img { width: calc(50% - 6px); flex: none; }
.items:not(.items--compact) > .item:last-child:nth-child(odd) .item__body { display: flex; flex-direction: column; justify-content: center; padding: 14px 16px; }
.items--compact { grid-template-columns: 1fr; gap: 8px; }
.items--compact .item { flex-direction: row; align-items: center; }
.items--compact .item__img { width: 72px; height: 72px; aspect-ratio: auto; flex: none; }
.items--compact .item__body { padding: 8px 12px; }

/* Verificación pública */
.verify { text-align: center; }
.verify__icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 10px; font-size: 32px; color: #fff; background: var(--success); }
.verify__icon--bad { background: var(--danger); }

/* ============================================================
   Asistente: pantalla del paquete y paso "Entrega y pago"
   ============================================================ */
.pkg-hero { background: linear-gradient(135deg, #0b3765, #1B4B93); color: #fff; border-radius: 14px; padding: 20px 20px 18px; margin: 8px 0 18px; }
.pkg-hero__name { margin: 0; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.pkg-hero__price { margin: 4px 0 2px; font-size: 36px; font-weight: 800; }
.pkg-hero__sub { margin: 0; opacity: .9; font-size: 14px; }

.pkg-note { display: flex; gap: 10px; background: var(--warn-bg); border: 1px solid #f1dba0; color: #5c4300; border-radius: 10px; padding: 12px 14px; font-size: 14px; line-height: 1.45; margin: 14px 0; }
.pkg-note--info { background: var(--info-bg); border-color: #c4d6f1; color: #173a73; }

.step .items { margin: 10px 0 8px; }

.opt-group { margin: 6px 0 22px; }
.opt-group > legend, .opt-title { display: block; font-weight: 700; margin: 0 0 10px; font-size: 15px; padding: 0; }
.opt-group { border: 0; padding: 0; min-width: 0; }
.opt-cards { display: grid; gap: 10px; }
.opt-card { position: relative; display: block; border: 2px solid var(--border); border-radius: 12px; padding: 14px 16px 14px 46px; cursor: pointer; background: #fff; transition: border-color .15s, background .15s; }
.opt-card input { position: absolute; opacity: 0; }
.opt-card::before { content: ''; position: absolute; left: 15px; top: 16px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #b8c0cf; background: #fff; }
.opt-card:has(input:checked) { border-color: var(--navy); background: #f2f7fd; }
.opt-card:has(input:checked)::before { border-color: var(--navy); background: radial-gradient(circle, var(--navy) 0 45%, #fff 50%); }
.opt-card:has(input:focus-visible) { outline: 3px solid rgba(11,55,101,.35); }
.opt-card strong { display: block; font-size: 15.5px; }
.opt-card span { display: block; margin-top: 2px; font-size: 13.5px; color: var(--text-muted); line-height: 1.4; }

.size-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.size-chip { position: relative; }
.size-chip input { position: absolute; opacity: 0; }
.size-chip span { display: grid; place-items: center; min-width: 58px; height: 46px; padding: 0 14px; border: 2px solid var(--border); border-radius: 10px; font-weight: 700; cursor: pointer; background: #fff; }
.size-chip input:checked + span { border-color: var(--navy); background: var(--navy); color: #fff; }
.size-chip input:focus-visible + span { outline: 3px solid rgba(11,55,101,.35); }

.step .bank-card { margin: 10px 0 16px; }
.comp-box { border: 1px dashed #b8c4d6; border-radius: 12px; padding: 14px; background: #fafcff; margin-bottom: 8px; }
.comp-box h3 { margin: 0 0 4px; font-size: 15px; }
.comp-box p { margin: 0 0 10px; font-size: 13.5px; color: var(--text-muted); }
.comp-box .file-drop { margin: 8px 0 0; padding: 16px 12px; }
.comp-box__ok { color: var(--success); font-weight: 700; font-size: 14px; margin-top: 8px; }
.comp-box__later { display: block; margin-top: 10px; font-size: 13.5px; color: var(--text-muted); }

.summary { border: 1px solid var(--border); border-radius: 12px; padding: 4px 16px; margin: 16px 0; background: #fff; }
.summary .row { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid #f0f1f5; font-size: 14.5px; }
.summary .row:last-child { border-bottom: 0; }
.summary .row span:first-child { color: var(--text-muted); }
.summary .row span:last-child { font-weight: 700; text-align: right; }

.done-steps { text-align: left; margin: 18px auto; max-width: 440px; padding-left: 20px; line-height: 1.6; }
.done-actions { display: grid; gap: 10px; max-width: 360px; margin: 18px auto 0; }
.done-ref { display: inline-block; margin: 6px 0 14px; padding: 8px 16px; background: var(--info-bg); color: var(--info); border-radius: 999px; font-weight: 800; letter-spacing: .04em; }

.contact-chip { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; font-size: 13.5px; line-height: 1.3; }
.contact-chip strong { white-space: nowrap; }
a.contact-chip { color: inherit; text-decoration: none; }
a.contact-chip strong { color: #128c4a; }
.link-btn { background: none; border: 0; color: var(--navy); text-decoration: underline; font: inherit; cursor: pointer; padding: 0; }

/* Los elementos con atributo hidden siempre deben ocultarse, aunque su clase defina display */
[hidden] { display: none !important; }
@media (max-width: 420px) {
  .items:not(.items--compact) { gap: 8px; }
  .items:not(.items--compact) > .item:last-child:nth-child(odd) .item__img { width: calc(50% - 4px); }
  .items:not(.items--compact) > .item:last-child:nth-child(odd) .item__body { padding: 10px 12px; }
  .item__body { padding: 8px 10px 10px; }
  .item__body h4 { font-size: 13.5px; }
  .item__body p { font-size: 12px; }
}
