.wa-movil { background: #efeae2; border-radius: 12px; padding: 14px; min-height: 120px; border: 1px solid #e7ecf1; }
.wa-burbuja { background: #fff; border-radius: 8px; padding: 8px 10px 18px; max-width: 92%; box-shadow: 0 1px 0 rgba(0,0,0,.08); position: relative; font-size: 13.5px; line-height: 1.4; word-wrap: break-word; }
.wa-burbuja.out { background: #d9fdd3; margin-left: auto; }
.wa-hora { position: absolute; right: 8px; bottom: 3px; font-size: 10.5px; color: #8696a0; }
.wa-pie { color: #8696a0; font-size: 12px; margin-top: 4px; }
.wa-chat { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow: auto; }
.wa-seccion { border: 1px solid #e7ecf1; border-radius: 4px; padding: 15px; margin-bottom: 15px; background: #fff; }
.wa-seccion-titulo { font-size: 15px; font-weight: 600; color: #3f4750; margin-bottom: 12px; }
.wa-aviso { background: #fff8e1; border: 1px solid #ffe082; border-radius: 4px; padding: 10px 12px; font-size: 13px; margin-bottom: 15px; }
.wa-coste { font-size: 22px; font-weight: 600; color: #26a69a; }
.wa-paso { display: none; } .wa-paso.activo { display: block; }
table.wa-muestra td, table.wa-muestra th { font-size: 12px; padding: 4px 8px !important; white-space: nowrap; }
.wa-adj { margin-bottom: 4px; }
.wa-adj img { display: block; max-width: 240px; max-height: 260px; border-radius: 6px; }
.wa-adj video { display: block; max-width: 260px; max-height: 260px; border-radius: 6px; }
.wa-adj audio { display: block; width: 260px; max-width: 100%; }
.wa-fichero { margin-top: 6px; padding: 4px 10px; border: 1px solid #cfe3ff; background: #eef6ff; border-radius: 12px; font-size: 12.5px; display: inline-block; }
.wa-fichero a { margin-left: 8px; color: #888; text-decoration: none; }
/* ---- Números, Plantillas y Envíos (11/11/2026) ---- */
.wa-vacio { text-align: center; padding: 40px 20px; border: 1px dashed #c8d3dc; border-radius: 6px; background: #fafcfd; margin-bottom: 15px; }
.wa-vacio .fa-whatsapp { display: block; font-size: 42px; color: #25d366; margin-bottom: 10px; }
.wa-vacio p { margin: 0 0 6px; }
.wa-vacio .btn { margin-top: 10px; }
.wa-ayuda-alta { margin-top: 12px; padding-top: 10px; border-top: 1px solid #eef1f5; font-size: 12.5px; color: #5e6a75; }
.wa-ayuda-alta p { margin: 0 0 6px; }
.wa-uso-cifra { font-size: 15px; margin-bottom: 6px; }
.wa-uso-barra { height: 8px; margin-bottom: 8px; box-shadow: none; background: #eef1f5; }
.wa-uso-meta { margin-top: 8px; }
.wa-calidad { cursor: help; }
.wa-hueco { display: inline-block; padding: 0 4px; margin: 0 1px; border-radius: 3px; background: #fff3cd; color: #8a6d3b; font-weight: normal; }
.wa-hueco-etiqueta { font-weight: normal; color: #3f4750; }
.wa-coste-linea { margin: 0 0 12px; }
.wa-coste-meta { font-size: 14px; color: #3f4750; margin-top: 4px; }
/* ---- Historial (11/11/2026) ---- */
/* Página Historial (WhatsAppHistorial.html): tarjetas arriba, lista a la izquierda y chat a la derecha con scroll propio,
   para que se vea sin bajar. Todo va con prefijo wa-h- o colgado de #whatsapphistorial: no toca las otras páginas. */
#whatsapphistorial .caption .beta-tag { color: #e7505a; font-size: 10px; font-weight: 700; letter-spacing: .8px; vertical-align: 6px; margin-left: 2px; }
.portlet > .portlet-title > .caption > i.wa-h-ayuda { float: none; display: inline-block; margin: 0 0 0 8px; color: #3598dc; cursor: help; font-size: 16px; vertical-align: 1px; }
.wa-h .portlet-body { padding-top: 12px; }
.wa-h-tarjetas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.wa-h-tarjeta { flex: 1 1 165px; margin: 0; padding: 10px 14px; cursor: pointer; user-select: none; transition: box-shadow .15s, border-color .15s, opacity .15s; }
.wa-h-tarjeta:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.wa-h-tarjeta.activa { border-color: #3598dc; box-shadow: 0 0 0 2px rgba(53, 152, 220, .3); }
.wa-h-tarjeta.cero { opacity: .55; }
.widget-thumb.wa-h-tarjeta .widget-thumb-wrap .widget-thumb-icon { width: 42px; height: 42px; line-height: 42px; padding: 0; font-size: 19px; border-radius: 50%; margin-right: 12px; }
.wa-h-tarjeta .widget-thumb-body .widget-thumb-subtitle { font-size: 12px; line-height: 1.25; padding-top: 0; }
.wa-h-tarjeta .widget-thumb-body .widget-thumb-body-stat { font-size: 22px; line-height: 1.25; }
.wa-h-filtros { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.wa-h-filtros > select.form-control { width: auto; max-width: 320px; }
.wa-h-buscar { flex: 1 1 220px; max-width: 340px; margin: 0; }
.wa-h-chip { background: #eef6ff; border: 1px solid #cfe3ff; border-radius: 12px; padding: 3px 10px; font-size: 12.5px; color: #2f6fb0; }
.wa-h-chip a { margin-left: 6px; color: #888; text-decoration: none; }
.wa-h-vista, .wa-h-check { margin: 0 0 0 auto; font-weight: normal; cursor: pointer; white-space: nowrap; }
.wa-h-check { margin-left: 0; }
.wa-h-vista input, .wa-h-check input { margin: 0 4px 0 0; vertical-align: -1px; }
.wa-h-caja { height: calc(100vh - 330px); min-height: 430px; border: 1px solid #e7ecf1; border-radius: 4px; background: #fff; display: flex; flex-direction: column; overflow: hidden; }
.wa-h-lista { flex: 1 1 auto; overflow-y: auto; min-height: 0; }
.wa-h-mas { padding: 8px; text-align: center; border-top: 1px solid #f0f2f5; }
.wa-h-fila { padding: 9px 12px 9px 11px; border-bottom: 1px solid #f0f2f5; border-left: 3px solid transparent; cursor: pointer; }
.wa-h-fila:hover { background: #f7f9fb; }
.wa-h-fila.sel { background: #eef6ff; }
.wa-h-fila.persona { border-left-color: #ed6b75; }
.wa-h-fila-l1, .wa-h-fila-l2 { display: flex; align-items: center; gap: 8px; }
.wa-h-fila-nombre { flex: 1 1 auto; min-width: 0; font-weight: 600; color: #2f353b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-h-fila-hora { font-size: 11.5px; color: #8696a0; white-space: nowrap; }
.wa-h-fila-hora.nl { color: #1fa855; font-weight: 600; }
.wa-h-fila-l2 { margin-top: 2px; }
.wa-h-fila-extracto { flex: 1 1 auto; min-width: 0; font-size: 12.5px; color: #667781; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-h-fila-extracto b { color: #3f4750; font-weight: 600; }
.wa-h-nl { background: #25d366; color: #fff; border-radius: 10px; min-width: 20px; height: 20px; line-height: 20px; padding: 0 6px; font-size: 11px; font-weight: 600; text-align: center; }
.wa-h-fila-l3 { margin-top: 5px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.wa-h-num { font-size: 11px; color: #8696a0; white-space: nowrap; }
.label.wa-h-et { font-size: 11px; padding: 2px 7px; font-weight: 600; text-transform: none; }
.label.wa-h-et-sin { background-color: #f2784b; }
.label.wa-h-et-ia { background-color: #3598dc; }
.label.wa-h-et-equipo { background-color: #26c281; }
.label.wa-h-et-cerrada { background-color: #95a5a6; }
.wa-h-vacio { text-align: center; color: #8696a0; padding: 40px 20px; line-height: 1.6; }
.wa-h-vacio > .fa { display: block; font-size: 34px; color: #c8d1d8; margin-bottom: 10px; }
.wa-h-chat-vacio { margin: auto; }
.wa-h-chat { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.wa-h-chat-cab { padding: 10px 14px; border-bottom: 1px solid #e7ecf1; background: #f7f9fb; }
.wa-h-chat-cab-fila { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 8px 12px; }
.wa-h-chat-info { flex: 1 1 260px; min-width: 0; }
.wa-h-chat-titulo { font-size: 15px; font-weight: 600; color: #2f353b; }
.wa-h-chat-titulo .label { vertical-align: 2px; margin-left: 4px; }
.wa-h-chat-acciones { display: flex; flex-wrap: wrap; gap: 6px; }
.wa-h-ventana { font-size: 12px; color: #1f7a5c; margin-top: 3px; }
.wa-h-ventana.cerrada { color: #c0392b; }
.wa-h-ocupada { margin: 8px 0 0; padding: 6px 10px; }
.wa-h-ocupada .btn { margin-left: 8px; }
.label.wa-h-et-espera { background-color: #e87e04; margin-left: 4px; }
.wa-h-pasar { margin: 8px 0 0; padding: 6px 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wa-h-pasar select { width: auto; min-width: 220px; max-width: 100%; }
.wa-h-chat-cuerpo { flex: 1 1 auto; min-height: 0; overflow-y: auto; border: 0; border-radius: 0; }
#whatsapphistorial .wa-h-chat-cuerpo .wa-chat { max-height: none; overflow: visible; }
#whatsapphistorial .wa-h-chat-cuerpo .wa-burbuja { max-width: 78%; align-self: flex-start; }
#whatsapphistorial .wa-h-chat-cuerpo .wa-burbuja.out { align-self: flex-end; }
.wa-h-anteriores { text-align: center; margin-bottom: 10px; font-size: 12.5px; }
.wa-h-dia { align-self: center; background: #fff; color: #54656f; font-size: 11.5px; padding: 3px 10px; border-radius: 8px; box-shadow: 0 1px 0 rgba(0, 0, 0, .06); }
.wa-h-autor { font-size: 11.5px; font-weight: 600; margin-bottom: 3px; color: #1f7a5c; }
.wa-h-autor.ia { color: #2b7cc4; }
.wa-h-autor.campana { color: #8e44ad; }
.wa-h-autor.otro { color: #667781; }
.wa-h-texto { white-space: normal; }
.wa-h-fallo { color: #c0392b; font-size: 12px; margin-top: 3px; }
.wa-h-tick { margin-left: 3px; letter-spacing: -6px; padding-right: 6px; }
.wa-h-tick.leido { color: #53bdeb; }
.wa-h-tick.fallo { color: #e7505a; letter-spacing: 0; padding-right: 0; }
.wa-h-chat-pie { padding: 10px 14px; border-top: 1px solid #e7ecf1; background: #fff; }
.wa-h-responder-pie { margin-top: 6px; display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.wa-h-responder-pie .wa-pie { margin: 0 auto 0 0; }
.wa-h-plantilla { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.wa-h-msg-fila { cursor: pointer; }
#tablawamensajes .wa-pie { white-space: nowrap; }
@media (max-width: 991px) {
  .wa-h-caja { height: auto; min-height: 0; }
  .wa-h-lista { max-height: 45vh; }
  .wa-h-caja-chat { height: 75vh; margin-top: 12px; }
  .wa-h-vista { margin-left: 0; }
  .wa-h-tarjeta { flex: 1 1 140px; padding: 8px 10px; }
  .widget-thumb.wa-h-tarjeta .widget-thumb-wrap .widget-thumb-icon { width: 34px; height: 34px; line-height: 34px; font-size: 15px; margin-right: 8px; }
  .wa-h-sin-chat .wa-h-caja-chat { display: none; }
}
