/* ═══════════════════════════════════════════
   PERROS DE LA ISLA · Embudo Victoria
   styles.css
   ═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

/* ── VARIABLES ── */
:root {
  --rojo:       #E8320A;
  --rojo-dk:    #bf2608;
  --rojo-xs:    rgba(232, 50, 10, 0.08);
  --verde:      #9cb64b;
  --verde-dk:   #7a9438;
  --verde-xs:   rgba(156, 182, 75, 0.10);
  --neg:        #0c0c0b;
  --s1:         #161614;
  --s2:         #1e1e1b;
  --s3:         #272724;
  --s4:         #363632;
  --t1:         #f2ede6;
  --t2:         #a09990;
  --t3:         #5a534c;
  --fn:         'DM Sans', sans-serif;
  --fb:         'Bebas Neue', sans-serif;
  --r8:         8px;
  --r12:        12px;
  --r16:        16px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--neg);
  color: var(--t1);
  font-family: var(--fn);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: var(--s3); border-radius: 2px; }

/* ── HEADER ── */
.hd {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(12, 12, 11, 0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--s3);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-wrap {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--neg);
  border: 2px solid var(--rojo);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.hinfo { flex: 1; }
.hname {
  font-family: var(--fb);
  font-size: 16px;
  letter-spacing: .5px;
  color: var(--t1);
}
.hrole {
  font-size: 11.5px;
  color: var(--t2);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 1px;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3dba6a;
  animation: pls 2.2s ease-in-out infinite;
}
@keyframes pls { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.hbrand { font-size: 11px; color: var(--t3); text-align: right; line-height: 1.5; }

/* ── BARRA DE PROGRESO ── */
.prog-bar { height: 2px; background: var(--s3); }
.prog-fill { height: 100%; background: var(--rojo); transition: width .5s ease; width: 0; }

/* ── CHAT ── */
.chat {
  padding: 16px 14px 320px;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ── MENSAJES ── */
.msg {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .28s ease, transform .28s ease;
  margin-bottom: 1px;
}
.msg.in { opacity: 1; transform: translateY(0); }
.mrow { display: flex; align-items: flex-end; gap: 8px; }
.mrow.u { flex-direction: row-reverse; }
.av {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--s2);
  border: 1.5px solid var(--rojo);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.bub {
  max-width: 84%;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.65;
  border-radius: 18px;
}
.bub.bot {
  background: var(--s2);
  border: 1px solid var(--s3);
  border-bottom-left-radius: 4px;
}
.bub.usr {
  background: var(--rojo);
  color: #fff;
  border-bottom-right-radius: 4px;
  font-size: 13.5px;
}
.bub em { color: #ff8060; font-style: normal; font-weight: 500; }
.bub strong { color: #fff; font-weight: 600; }
.bub a { color: #ff8060; text-decoration: none; }

/* ── TYPING ── */
.twrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  opacity: 0;
  transition: opacity .2s;
  margin-bottom: 2px;
}
.twrap.in { opacity: 1; }
.tbub {
  background: var(--s2);
  border: 1px solid var(--s3);
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  padding: 12px 15px;
  display: flex;
  gap: 5px;
  align-items: center;
}
.tdot { width: 7px; height: 7px; border-radius: 50%; background: var(--t3); }
.tdot:nth-child(1) { animation: bou 1.2s 0s infinite; }
.tdot:nth-child(2) { animation: bou 1.2s .18s infinite; }
.tdot:nth-child(3) { animation: bou 1.2s .36s infinite; }
@keyframes bou { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-5px); } }

/* ── WIDGETS ── */
.wzone {
  margin-left: 38px;
  margin-bottom: 2px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .28s ease, transform .28s ease;
}
.wzone.in { opacity: 1; transform: translateY(0); }

@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ── INPUT DE TEXTO ── */
.irow { display: flex; gap: 8px; align-items: flex-end; }
.ti {
  flex: 1;
  background: var(--s2);
  border: 1px solid var(--s3);
  border-radius: var(--r12);
  padding: 11px 14px;
  font-size: 13.5px;
  color: var(--t1);
  font-family: var(--fn);
  resize: none;
  min-height: 46px;
  max-height: 110px;
  outline: none;
  transition: border-color .12s;
  line-height: 1.5;
}
.ti:focus { border-color: var(--rojo); }
.ti::placeholder { color: var(--t3); }
.sb {
  width: 46px;
  height: 46px;
  background: var(--rojo);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s, transform .1s;
}
.sb:hover { background: var(--rojo-dk); }
.sb:active { transform: scale(.94); }
.sb:disabled { background: var(--s3); cursor: not-allowed; }

/* ── BOTONES ── */
.bmain {
  width: 100%;
  background: var(--rojo);
  color: #fff;
  border: none;
  border-radius: var(--r12);
  padding: 13px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--fn);
  transition: background .12s, transform .1s;
  margin-top: 7px;
  letter-spacing: .1px;
}
.bmain:hover { background: var(--rojo-dk); }
.bmain:active { transform: scale(.98); }
.bmain:disabled { background: var(--s3); color: var(--t3); cursor: not-allowed; }

.bmain.verde {
  background: var(--verde);
}
.bmain.verde:hover { background: var(--verde-dk); }

.bsec {
  width: 100%;
  background: transparent;
  color: var(--t3);
  border: 1px solid var(--s3);
  border-radius: var(--r12);
  padding: 10px;
  font-size: 13px;
  cursor: pointer;
  font-family: var(--fn);
  transition: border-color .12s, color .12s;
  margin-top: 5px;
}
.bsec:hover { border-color: var(--s4); color: var(--t2); }

.bback {
  background: transparent;
  border: none;
  color: var(--t3);
  font-size: 12px;
  cursor: pointer;
  font-family: var(--fn);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 0;
  margin-top: 3px;
  transition: color .12s;
  width: 100%;
}
.bback:hover { color: var(--t2); }

/* ── CARDS DE SERVICIO ── */
.scard {
  background: var(--s2);
  border: 1.5px solid var(--s3);
  border-radius: var(--r16);
  padding: 14px;
  margin-bottom: 7px;
  transition: border-color .12s;
}
.scard.on { border-color: var(--rojo); }
.stag {
  display: inline-flex;
  align-items: center;
  background: var(--rojo);
  color: #fff;
  border-radius: 6px;
  padding: 2px 9px;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 7px;
}
.stag.verde-tag { background: var(--verde); }
.sname {
  font-family: var(--fb);
  font-size: 16px;
  letter-spacing: .3px;
  margin-bottom: 4px;
}
.sdesc { font-size: 12.5px; color: var(--t2); line-height: 1.6; }
.snote {
  font-size: 12px;
  color: var(--t3);
  font-style: italic;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--s3);
}

/* ── PRECIOS ── */
.prow { display: flex; gap: 8px; margin: 4px 0; }
.pcard {
  flex: 1;
  background: var(--s2);
  border: 1px solid var(--s3);
  border-radius: var(--r12);
  padding: 12px;
  text-align: center;
}
.pcard.hi { border-color: var(--verde); }
.pamt { font-family: var(--fb); font-size: 26px; letter-spacing: .5px; }
.plbl { font-size: 11px; color: var(--t2); margin-top: 2px; }
.psave { font-size: 11px; color: var(--verde); font-weight: 500; margin-top: 3px; }

/* ── SLOTS DE AGENDA ── */
.sgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 4px 0; }
.slot {
  background: var(--s2);
  border: 1px solid var(--s3);
  border-radius: var(--r12);
  padding: 11px;
  text-align: center;
  cursor: pointer;
  transition: all .12s;
  font-family: var(--fn);
  color: var(--t1);
  position: relative;
}
.slot:hover, .slot.on {
  border-color: var(--verde);
  background: var(--verde-xs);
  color: var(--verde);
}
.slot.lleno { opacity: .35; cursor: not-allowed; pointer-events: none; }
.sday { font-size: 12px; font-weight: 500; }
.stime { font-size: 11.5px; color: var(--t2); margin-top: 2px; }
.slot.on .stime { color: var(--verde); opacity: .75; }

/* Badge "Próximo" en el primer slot disponible */
.slot-primero:not(:hover):not(.on) {
  border-color: var(--rojo);
}
.slot-primero::before {
  content: "Próximo";
  position: absolute;
  top: -6px;
  right: 8px;
  background: var(--rojo);
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 8px;
  font-family: var(--fn);
}

/* ── OPCIONES DE PAGO ── */
.payopt {
  background: var(--s2);
  border: 1px solid var(--s3);
  border-radius: var(--r12);
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  margin-bottom: 6px;
  transition: border-color .12s;
}
.payopt:hover, .payopt.on { border-color: var(--rojo); background: var(--rojo-xs); }
.picon { font-size: 21px; }
.pname { font-size: 13.5px; font-weight: 500; }
.pdetail { font-size: 11.5px; color: var(--t2); margin-top: 1px; }

/* ── CHECKBOX ── */
.chkw {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--s2);
  border: 1px solid var(--s3);
  border-radius: var(--r12);
  padding: 11px 13px;
  cursor: pointer;
  margin: 4px 0;
}
.chkw input {
  accent-color: var(--verde);
  margin-top: 2px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
}
.chkw label { font-size: 13px; color: var(--t2); line-height: 1.5; cursor: pointer; }

/* ── FORMULARIO ── */
.flbl { font-size: 11.5px; color: var(--t2); margin-bottom: 4px; display: block; letter-spacing: .2px; }
.fin {
  width: 100%;
  background: var(--s2);
  border: 1px solid var(--s3);
  border-radius: var(--r8);
  padding: 10px 13px;
  font-size: 13.5px;
  color: var(--t1);
  font-family: var(--fn);
  outline: none;
  transition: border-color .12s;
  margin-bottom: 9px;
}
.fin:focus { border-color: var(--rojo); }
.fin::placeholder { color: var(--t3); }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
textarea.fin { resize: none; height: 88px; line-height: 1.55; }

/* ── RESUMEN ── */
.srow {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 7px 0;
  border-bottom: 1px solid var(--s3);
  font-size: 12.5px;
}
.srow:last-child { border: none; padding-bottom: 0; }
.sk { color: var(--t2); }
.sv { color: var(--t1); font-weight: 500; text-align: right; max-width: 62%; }
.sv.verde { color: var(--verde); }
.sv.red { color: var(--rojo); }

/* ── CHECKMARK ── */
.sicon {
  width: 52px;
  height: 52px;
  background: var(--verde);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px 0 4px 38px;
  animation: pop .4s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes pop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ── AVISO / WARNING ── */
.warn {
  background: rgba(255, 180, 0, .06);
  border: 1px solid rgba(255, 180, 0, .18);
  border-radius: var(--r12);
  padding: 11px 13px;
  font-size: 13px;
  color: #f0c040;
  line-height: 1.55;
  margin: 4px 0;
}

/* ── DERIVACIÓN (etólogo) ── */
.deriv-box {
  background: var(--s2);
  border: 1.5px solid var(--s3);
  border-radius: var(--r16);
  padding: 16px;
  margin: 4px 0;
}
.deriv-box .stag { background: var(--t3); }

/* ── LOADER IA ── */
.ail {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--t3);
  padding: 6px 0;
  margin-left: 38px;
}
.ais {
  width: 13px;
  height: 13px;
  border: 2px solid var(--s3);
  border-top-color: var(--rojo);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── TÍTULO BEBAS ── */
.titulo-bebas {
  font-family: var(--fb);
  font-size: 22px;
  letter-spacing: .5px;
  color: var(--t1);
  margin-bottom: 4px;
}

/* ── ADMIN PANEL ── */
.admin-wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 16px;
}
.admin-title {
  font-family: var(--fb);
  font-size: 28px;
  letter-spacing: .5px;
  color: var(--rojo);
  margin-bottom: 4px;
}
.admin-sub { font-size: 13px; color: var(--t2); margin-bottom: 24px; }
.admin-card {
  background: var(--s2);
  border: 1px solid var(--s3);
  border-radius: var(--r16);
  padding: 16px;
  margin-bottom: 12px;
}
.admin-card-title {
  font-family: var(--fb);
  font-size: 15px;
  letter-spacing: .3px;
  margin-bottom: 12px;
  color: var(--t1);
}

/* ── RESPONSIVE ── */
@media (max-width: 480px) {
  .bub { max-width: 90%; font-size: 13.5px; }
  .frow { grid-template-columns: 1fr; }
  .prow { flex-direction: column; }
}

/* ═══════════════════════════════════════════
   VICTORIA — AÑADIDO v1.3
   ═══════════════════════════════════════════ */

/* Input fijo abajo — ocupa todo el ancho disponible */
.input-wrap {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--s1);
  border-top: 1px solid var(--s3);
  padding: 10px 14px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 50;
  display: flex;
  justify-content: center;
}

/* Contenedor interno — mismo max-width que el chat para alineación visual */
.input-wrap .irow {
  width: 100%;
  max-width: 560px;
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Espacio extra en el chat para que el input no tape los mensajes */
.chat {
  padding-bottom: calc(90px + env(safe-area-inset-bottom));
}

/* Widgets de agenda y pago insertados como burbujas en el chat */
.widget-wrap {
  width: 100%;
  margin-left: 38px;
  margin-bottom: 4px;
}
.widget-wrap > div { width: 100%; }

/* Mensajes de Victoria */
.msg.bot {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 4px 0;
}
.msg.bot .bub {
  background: var(--s2);
  border: 1px solid var(--s3);
  border-radius: 18px 18px 18px 4px;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.65;
  max-width: 84%;
  color: var(--t1);
}
.msg.bot .av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--s2);
  border: 1.5px solid var(--rojo);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

/* Mensajes del cliente */
.msg.usr {
  display: flex;
  justify-content: flex-end;
  margin: 4px 0;
}
.msg.usr .bub {
  background: var(--rojo);
  color: #fff;
  border-radius: 18px 18px 4px 18px;
  padding: 10px 14px;
  font-size: 13.5px;
  line-height: 1.65;
  max-width: 84%;
}

/* Los mensajes generados dinámicamente por victoria.js son visibles sin .in */
.msg.bot, .msg.usr {
  opacity: 1;
  transform: none;
}

/* Input de texto — ocupa todo el espacio del irow */
.input-wrap input.ti {
  flex: 1;
  background: var(--s2);
  border: 1px solid var(--s3);
  border-radius: var(--r12);
  padding: 12px 16px;
  font-size: 14px;
  color: var(--t1);
  font-family: var(--fn);
  outline: none;
  transition: border-color .12s;
  min-height: 44px;
}
.input-wrap input.ti:focus { border-color: var(--rojo); }
.input-wrap input.ti::placeholder { color: var(--t3); }

/* Botón de enviar — círculo rojo */
.input-wrap button.sb {
  width: 44px;
  height: 44px;
  background: var(--rojo);
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s, transform .1s;
}
.input-wrap button.sb:hover { background: var(--rojo-dk); }
.input-wrap button.sb:active { transform: scale(.94); }

@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }


/* Foto de Victoria — encuadre desde arriba para mostrar la cara completa */
.msg.bot .av img,
#tw .av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Avatar del typing indicator — mismo tamaño que los mensajes */
#tw .av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--s2);
  border: 1.5px solid var(--rojo);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

/* ═══════════════════════════════════════════
   WIDGET DE PAGO — INERTE (pagos.js eliminado)
   Todo el CSS de pago de aquí abajo (clases pago-, pay-,
   upload-) ya no se usa: el flujo quedó sin pago en el chat.
   PENDIENTE DE LIMPIEZA: extraer primero la utilidad
   .hidden (de más abajo) a una sección de utilidades
   —la comparte vicky/vicky.js— y recién entonces borrar
   el resto del bloque.
   ═══════════════════════════════════════════ */

/* Utilidad crítica — EN USO (compartida con vicky/vicky.js). NO borrar al limpiar el bloque de pago. */
.hidden { display: none !important; }

/* Contenedor principal */
.pago-wrap {
  background: var(--s2);
  border: 1px solid var(--s3);
  border-radius: var(--r16);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pago-wrap h3 {
  font-family: var(--fb);
  font-size: 20px;
  letter-spacing: .4px;
  color: var(--t1);
  margin: 0;
}

.pago-info {
  font-size: 13px;
  color: var(--t2);
  line-height: 1.6;
  margin: 0;
}

/* Grid de los dos botones de método */
.pay-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}

/* Botones de método */
.pay-btn {
  border: none;
  border-radius: var(--r12);
  padding: 16px 12px;
  font-family: var(--fn);
  font-size: 14.5px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: transform .1s, filter .12s, box-shadow .12s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  letter-spacing: .2px;
}

/* Bizum — azul oficial */
#btn-bizum {
  background: #00B0E0;
}
#btn-bizum:hover { filter: brightness(1.08); }

/* Transferencia — verde marca */
#btn-transf {
  background: var(--verde);
}
#btn-transf:hover { background: var(--verde-dk); }

.pay-btn:active { transform: scale(.97); }

/* Estado seleccionado */
.pay-btn.on {
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.35);
}

/* Bloques de datos (Bizum / Transferencia) */
.pay-block {
  background: var(--s1);
  border: 1px solid var(--s3);
  border-radius: var(--r12);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: fadein .25s ease;
}

.pay-block p {
  font-size: 13.5px;
  color: var(--t2);
  line-height: 1.55;
  margin: 0;
}

.pay-block strong {
  color: var(--t1);
  font-weight: 600;
}

/* Etiquetas pequeñas tipo "IBAN" */
.pay-label {
  font-size: 11px !important;
  color: var(--t3) !important;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: -4px !important;
}

/* Número Bizum / IBAN — destacado en Bebas Neue */
.pay-number, .pay-iban {
  font-family: var(--fb) !important;
  font-size: 22px !important;
  letter-spacing: 1px;
  color: var(--t1) !important;
  background: var(--s3);
  padding: 10px 12px;
  border-radius: var(--r8);
  user-select: all;
  word-break: break-all;
}

.pay-titular {
  font-size: 12.5px !important;
  color: var(--t2) !important;
}

.pay-concepto {
  font-size: 12.5px !important;
  color: var(--t3) !important;
  font-style: normal;
}

.pay-concepto em {
  color: var(--t2);
  font-style: italic;
}

/* Botón de adjuntar comprobante — CTA primario rojo PDLI */
.upload-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 18px;
  margin-top: 8px;
  background: #C8102E;
  border: 0;
  border-radius: var(--r12);
  cursor: pointer;
  transition: background .12s, transform .08s;
  text-align: center;
  box-shadow: 0 2px 6px rgba(200, 16, 46, 0.25);
}

.upload-label:hover {
  background: #A60D26;
}

.upload-label:active {
  transform: scale(.98);
}

.upload-label-text {
  font-size: 16px;
  color: #FFFFFF;
  font-weight: 600;
  letter-spacing: 0.2px;
}

/* Input file oculto visualmente pero funcional */
.upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Preview del comprobante */
.upload-preview {
  margin-top: 4px;
  padding: 8px;
  background: var(--s1);
  border: 1px solid var(--verde);
  border-radius: var(--r8);
  display: flex;
  justify-content: center;
  align-items: center;
}

.upload-thumb {
  max-width: 100%;
  max-height: 240px;
  border-radius: var(--r8);
  display: block;
}

.upload-file-name {
  font-size: 13px !important;
  color: var(--verde) !important;
  font-weight: 500;
  margin: 0 !important;
}

/* Botón único de confirmar pago */
.pay-confirm-btn {
  background: var(--verde);
  color: #fff;
  border: none;
  border-radius: var(--r12);
  padding: 14px;
  font-family: var(--fn);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .12s, transform .1s;
  margin-top: 4px;
  letter-spacing: .2px;
}

.pay-confirm-btn:hover { background: var(--verde-dk); }
.pay-confirm-btn:active { transform: scale(.98); }
.pay-confirm-btn:disabled {
  background: var(--s3);
  color: var(--t3);
  cursor: not-allowed;
}

/* Mensaje de error */
.pay-error {
  background: rgba(232, 50, 10, 0.08);
  border: 1px solid rgba(232, 50, 10, 0.25);
  border-radius: var(--r8);
  padding: 10px 12px;
  font-size: 13px;
  color: #ff8060;
  line-height: 1.5;
  margin: 0;
}

/* Botón volver */
.back-btn {
  background: transparent;
  border: none;
  color: var(--t3);
  font-size: 12.5px;
  cursor: pointer;
  font-family: var(--fn);
  padding: 8px 0;
  margin-top: 4px;
  text-align: center;
  transition: color .12s;
}

.back-btn:hover { color: var(--t2); }

/* Responsive — móvil */
@media (max-width: 480px) {
  .pay-opts {
    grid-template-columns: 1fr;
  }
  .pay-number, .pay-iban {
    font-size: 18px !important;
  }
  .pago-wrap h3 {
    font-size: 18px;
  }
}

/* ═══════════════════════════════════════════
   CHAT REDISEÑADO — estética premium
   ═══════════════════════════════════════════ */

body {
  background: #0b141a !important;
  letter-spacing: 0.3px;
}

/* ── HEADER PDLI (sticky, estilo WhatsApp con acento rojo) ── */
.pdli-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #1f2c34;
  border-bottom: 2px solid #C8102E;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  transition: padding 0.2s ease;
}

.pdli-header.shrunk {
  padding: 6px 14px;
}

.pdli-header.shrunk .pdli-header-subtitle {
  display: none;
}

.pdli-header-info {
  flex: 1;
  min-width: 0;
}

.pdli-header-title {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 18px;
  letter-spacing: 1px;
  color: #f5efe0;
  line-height: 1.1;
}

.pdli-header-subtitle {
  font-size: 11px;
  color: #8696a0;
  margin-top: 2px;
}

.pdli-header-links {
  display: flex;
  gap: 12px;
}

.pdli-header-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #f5efe0;
  opacity: 0.7;
  text-decoration: none;
  transition: opacity 0.15s, background 0.15s;
}

.pdli-header-links a:hover {
  opacity: 1;
  background: rgba(245, 239, 224, 0.1);
}

.pdli-header-links svg {
  width: 20px;
  height: 20px;
}

/* Burbujas rediseñadas */
.msg {
  margin-bottom: 14px;
}

.msg.bot .bub {
  background: #202c33 !important;
  color: #e9edef !important;
  border-radius: 8px 8px 8px 0 !important;
  padding: 12px 16px !important;
  border: none;
  font-family: var(--fn);
  font-size: 14.5px;
  line-height: 1.6;
  letter-spacing: 0.1px;
  max-width: 80%;
}

.msg.usr .bub {
  background: #005c4b !important;
  color: #e9edef !important;
  border-radius: 8px 8px 0 8px !important;
  padding: 12px 16px !important;
  font-family: var(--fn);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.1px;
  max-width: 80%;
}

/* Avatares */
.msg.bot .av {
  width: 30px !important;
  height: 30px !important;
}

.msg.bot .av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* ── CHIPS / OPCIONES INLINE — definición única ── */
.opts-inline {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0 8px 38px;
  max-width: 84%;
  animation: fadein .25s ease;
}

.opt-btn-inline {
  position: relative;
  background: var(--s2);
  border: 1.5px solid var(--rojo);
  border-radius: var(--r12);
  padding: 12px 34px 12px 16px;
  color: var(--t1);
  font-family: var(--fn);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
  line-height: 1.45;
}

.opt-btn-inline::after {
  content: "›";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  line-height: 1;
  color: var(--rojo);
  transition: transform .15s, color .15s;
}

.opt-btn-inline:hover {
  background: var(--rojo);
  border-color: var(--rojo);
  color: #fff;
}
.opt-btn-inline:hover::after {
  color: #fff;
  transform: translateY(-50%) translateX(3px);
}

.opt-btn-inline:active { transform: scale(.98); }

/* Variante fantasma — opción secundaria ("Otra cosa") */
.opt-btn-inline.is-ghost {
  background: transparent;
  border-color: var(--s3);
  color: var(--t2);
}
.opt-btn-inline.is-ghost::after { color: var(--t3); }
.opt-btn-inline.is-ghost:hover {
  background: var(--s2);
  border-color: var(--t3);
  color: var(--t1);
}
.opt-btn-inline.is-ghost:hover::after { color: var(--t2); }

/* Tarjeta de cierre tras mensaje final */
.chat-cierre {
  margin: 24px 16px;
  padding: 24px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 0.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  text-align: center;
}

.chat-cierre-lema {
  color: white;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  line-height: 1.0;
  margin: 0 0 18px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.chat-cierre-botones {
  display: flex;
  gap: 10px;
}

.chat-cierre-btn {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 10px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.chat-cierre-btn:active {
  transform: scale(0.97);
}

.chat-cierre-btn.ig {
  background: #c53030;
  color: white;
}

.chat-cierre-btn.web {
  background: #9cb64b;
  color: #1a1a1a;
}

/* Etiqueta de debug del fallback IA — solo aparece con ?prueba=1.
   Se inserta como hermana del bubble de Victoria, justo encima.
   Margin-left = 36px (avatar) + 8px (gap) = 44px → alineado con el inicio del bubble. */
.msg-debug {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: normal;
  color: #a09990;
  opacity: 0.7;
  letter-spacing: 0.3px;
  margin: 8px 0 -2px 44px;
  user-select: none;
}

/* ═══════════════════════════════════════════
   PDLI · INPUT Y TYPING (estética WhatsApp)
   ═══════════════════════════════════════════ */

/* Barra de input — fondo WA, campo interno más oscuro, botón rojo PDLI */
.input-wrap {
  background: #1f2c34 !important;
  border-top: none !important;
}

.input-wrap input.ti {
  background: #2a3942 !important;
  border: 1px solid transparent !important;
  color: #e9edef !important;
  border-radius: 20px !important;
}
.input-wrap input.ti:focus {
  border-color: #00a884 !important;
}
.input-wrap input.ti::placeholder {
  color: #8696a0 !important;
}

.input-wrap button.sb {
  background: #C8102E !important;
  color: #ffffff !important;
}
.input-wrap button.sb:hover {
  background: #a30d24 !important;
}

/* Typing indicator — estilo WhatsApp con 3 puntos rebotando */
.tbub {
  background: #202c33 !important;
  border: none !important;
  border-radius: 8px 8px 8px 0 !important;
  padding: 12px 14px !important;
  max-width: 70px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.tdot {
  width: 8px !important;
  height: 8px !important;
  background: #8696a0 !important;
}

/* Animación de salto más marcada (estilo WA) */
@keyframes pdli-typing-bounce {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30%           { opacity: 1;   transform: translateY(-4px); }
}
.tdot:nth-child(1) { animation: pdli-typing-bounce 1.4s 0s    infinite ease-in-out !important; }
.tdot:nth-child(2) { animation: pdli-typing-bounce 1.4s 0.2s  infinite ease-in-out !important; }
.tdot:nth-child(3) { animation: pdli-typing-bounce 1.4s 0.4s  infinite ease-in-out !important; }

/* Avatar de Victoria — tono cálido sobre fondo oscuro WA */
.msg.bot .av,
#tw .av {
  border-color: #C8102E !important;
}

/* ═══════════════════════════════════════════
   LOGO HEADER — aro rojo coherente PDLI
   Mismo patrón que Paseos Seguros y app cliente: contenedor
   .logo-circle con borde rojo, padding interno y el ícono
   "respirando" dentro. Soporta versión shrunk del header.
   ═══════════════════════════════════════════ */

.logo-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1A1A1A;
  border: 2px solid var(--pdli-rojo, #C8102E);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  overflow: hidden;
}

.logo-circle img,
.logo-circle__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Versión shrunk (cuando header se achica al scrollear) */
.pdli-header.shrunk .logo-circle {
  width: 32px;
  height: 32px;
  padding: 0;
}
