/* Panel Hacedores · tema crema y rosa */
:root {
  --rosa: #e72c5e;
  --rosa-suave: #FCE3EA;
  --oscuro: #2B2B2A;
  --texto: #1F1F1E;
  --suave: #5F5E5A;
  --linea: rgba(0, 0, 0, .08);
  --vidrio: rgba(255, 255, 255, .72);
  --fondo: #F1EFEA;
  --bien: #2F7A3E;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0; color: var(--texto); font-family: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: #D9D5CD; padding: 14px;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
.lienzo {
  width: 100%; min-height: calc(100vh - 28px); display: flex; flex-direction: column; border-radius: 32px; padding: 24px clamp(20px, 2.6vw, 48px) 32px;
  background: linear-gradient(135deg, #F1EFEA 0%, #FCEFF1 55%, #F8D3DC 100%);
}
.neu { color: var(--suave); font-size: 12px; }
.pos { color: var(--bien); } .neg { color: #C23A2C; }

/* cabecera y menú */
.cabecera { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.logo-img { display: block; height: 34px; width: auto; }
.menu { display: flex; gap: 2px; background: var(--vidrio); border-radius: 999px; padding: 4px; }
.menu button { position: relative; border: 0; background: none; padding: 8px 18px; border-radius: 999px; font-size: 14px; color: #4A4944; cursor: pointer; }
.menu button.activo { background: var(--oscuro); color: #fff; }
.menu button:not(.activo):hover { background: rgba(255, 255, 255, .9); }
.aviso-nav { position: absolute; top: 6px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--rosa); }
.cab-acc { min-width: 120px; text-align: right; }
.estado-sistema { font-size: 12px; color: var(--suave); }

/* cada sección ocupa todo el alto disponible de la pantalla */
.vista:not([hidden]) { flex: 1; display: flex; flex-direction: column; }
.vista > .rejilla { flex: 1; }

/* encabezados */
.saludo { margin: 26px 0 2px; font-size: 38px; font-weight: 400; letter-spacing: -.01em; }
.fecha { margin: 0 0 16px; color: var(--suave); font-size: 13px; }
.tit-vista { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.tit-vista .fecha { margin-bottom: 14px; }

/* resumen */
.resumen { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.barras-pct { display: flex; gap: 6px; align-items: flex-end; flex: 1; min-width: 260px; max-width: 520px; }
.barras-pct .seg { font-size: 12px; color: #4A4944; min-width: 92px; }
.barras-pct .seg b { display: block; margin-top: 5px; padding: 8px 12px; border-radius: 999px; font-weight: 400; font-size: 12px; white-space: nowrap; overflow: hidden; }
.grandes { display: flex; gap: 28px; }
.grandes div { font-size: 12px; color: #4A4944; }
.grandes strong { display: block; font-size: 46px; font-weight: 400; line-height: 1; color: var(--texto); }

/* tarjetas */
.rejilla { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.rejilla.dos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tarjeta { background: var(--vidrio); border-radius: 28px; padding: 18px 20px; min-width: 0; }
.tarjeta.ancha { grid-column: span 2; }
.tarjeta.oscura { background: var(--oscuro); color: #fff; grid-column: 3; grid-row: 1 / span 2; }
.tarjeta.oscura h3 { color: #fff; }
.tit { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.tit h3 { margin: 0; font-size: 16px; font-weight: 400; }
.cifra-g { font-size: 30px; }
.enlace-claro { border: 0; background: #444441; color: #fff; border-radius: 999px; padding: 4px 12px; font-size: 12px; cursor: pointer; }
.enlace-claro:hover { background: var(--rosa); }

/* barras de la semana */
.barras-sem { display: flex; align-items: flex-end; justify-content: space-between; height: 110px; margin-top: 8px; }
.barras-sem div { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 11px; color: var(--suave); flex: 1; }
.barras-sem i { display: block; width: 6px; border-radius: 3px; background: var(--oscuro); min-height: 6px; }
.barras-sem .hoy i { background: var(--rosa); }
.barras-sem .vacio i { background: #D3D1C7; }

/* reloj */
.reloj { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 4px 0; }
.reloj .aro { position: relative; width: 132px; height: 132px; }
.reloj svg { width: 132px; height: 132px; }
.reloj .centro { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.reloj .tiempo { font-size: 26px; font-variant-numeric: tabular-nums; }
.reloj .pie { font-size: 11px; color: var(--suave); }
.reloj .extra { font-size: 12px; color: var(--suave); text-align: center; }

/* mensajes en inicio (tarjeta oscura) */
.inicio-msg .grupo-h { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #D3D1C7; margin: 14px 0 4px; padding-top: 12px; border-top: .5px solid #444441; }
.inicio-msg .grupo-h:first-child { border: 0; padding-top: 0; margin-top: 2px; }
.etq-red { margin-left: auto; font-size: 11px; background: #444441; color: #fff; border-radius: 999px; padding: 1px 9px; }
.etq-red.p { background: var(--rosa); }

/* filas de contacto (inicio oscuro y columnas) */
.ct { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; background: none; text-align: left; border-radius: 16px; cursor: pointer; color: inherit; }
.ct:hover { background: rgba(255, 255, 255, .85); }
.ct .av { width: 30px; height: 30px; border-radius: 50%; background: var(--fondo); display: grid; place-items: center; font-size: 13px; flex: none; color: var(--texto); }
.ct .x { min-width: 0; flex: 1; }
.ct .n { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct .s { display: block; font-size: 12px; color: var(--suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct .punto { width: 10px; height: 10px; border-radius: 50%; background: var(--rosa); flex: none; }
.ct .punto.ok { background: #D3D1C7; }
.ct.sel { background: var(--oscuro); color: #fff; }
.ct.sel .av { background: #444441; color: #fff; }
.ct.sel .s { color: #B4B2A9; }
.inicio-msg .ct:hover { background: #3a3a38; }
.inicio-msg .ct .av { background: #444441; color: #fff; }
.inicio-msg .ct .s { color: #B4B2A9; }
.inicio-msg .ct .punto.ok { background: #5F5E5A; }

/* columnas de mensajes */
.cols-msg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.col-red { background: var(--vidrio); border-radius: 28px; padding: 14px; }
.col-red .cab { display: flex; align-items: center; gap: 8px; padding: 2px 6px 8px; font-size: 15px; }
.col-red .cab svg { width: 20px; height: 20px; }
.col-red .sin { color: var(--suave); font-size: 13px; padding: 8px 6px; }
.lista-col { max-height: max(300px, calc(100vh - 290px)); overflow-y: auto; scrollbar-width: thin; }
.vacio-msg { color: var(--suave); font-size: 13px; padding: 8px 2px; }
.acc-msg { display: flex; gap: 6px; }
.mini-msg { border: 0; background: var(--vidrio); border-radius: 999px; padding: 7px 14px; font-size: 13px; cursor: pointer; }
.mini-msg:hover { background: #fff; }

/* conversación */
.modal-conv { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(43, 43, 42, .35); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.conv { width: min(640px, 100%); max-height: 88vh; display: flex; flex-direction: column; background: var(--oscuro); color: #fff; border-radius: 28px; padding: 18px 20px; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.conv .hilo { flex: 1; min-height: 0; }
.conv .cab { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: .5px solid #444441; }
.conv .cab .av { width: 38px; height: 38px; border-radius: 50%; background: #444441; display: grid; place-items: center; }
.conv .cab p { margin: 0; line-height: 1.3; }
.conv .cab .s { font-size: 12px; color: #B4B2A9; }
.conv .cab .est { margin-left: auto; font-size: 12px; border-radius: 999px; padding: 3px 12px; background: #444441; }
.conv .cab .est.p { background: var(--rosa); }
.conv .cab .cerrar-conv { border: 0; background: #444441; color: #fff; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; }
.hilo { display: flex; flex-direction: column; gap: 10px; padding: 14px 0; max-height: 420px; overflow-y: auto; }
.burbuja-c { max-width: 72%; padding: 10px 14px; border-radius: 18px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.burbuja-c small { display: block; font-size: 11px; margin-top: 4px; opacity: .75; }
.burbuja-c.cli { background: #444441; align-self: flex-start; border-bottom-left-radius: 4px; }
.burbuja-c.ag { background: #fff; color: var(--texto); align-self: flex-end; border-bottom-right-radius: 4px; }
.burbuja-c.yo { background: var(--rosa); align-self: flex-end; border-bottom-right-radius: 4px; }
.resp { border-top: .5px solid #444441; padding-top: 12px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.resp-texto { width: 100%; resize: none; border: 0; border-radius: 18px; background: #3a3a38; color: #fff; font: inherit; font-size: 14px; padding: 10px 14px; }
.resp-texto::placeholder { color: #B4B2A9; }
.resp-texto:focus { outline: 2px solid var(--rosa); }
.resp-pie, .resp-conf { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.resp-pie { justify-content: space-between; }
.resp-conf { font-size: 13px; color: #D3D1C7; }
.resp-conf span { flex: 1; min-width: 180px; }
.resp-error { color: #ffb0a5; font-size: 12px; min-height: 14px; }
.resp button { border: 0; border-radius: 999px; padding: 8px 18px; font-size: 13px; cursor: pointer; background: #444441; color: #fff; }
.resp .resp-enviar, .resp .resp-ok { background: var(--rosa); }
.resp button:disabled { opacity: .5; cursor: default; }
.resp-nota { margin: 0 0 12px; padding-top: 12px; border-top: .5px solid #444441; font-size: 12px; color: #B4B2A9; }
.leyenda { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: #B4B2A9; border-top: .5px solid #444441; padding-top: 10px; }
.leyenda span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.leyenda .l1::before { background: #444441; } .leyenda .l2::before { background: #fff; } .leyenda .l3::before { background: var(--rosa); }
.clave-msg { display: flex; flex-direction: column; gap: 8px; max-width: 320px; background: var(--vidrio); border-radius: 24px; padding: 18px; }
.clave-msg p { margin: 0; font-size: 13px; }
.clave-msg input { border: 0; border-radius: 999px; padding: 10px 16px; background: #fff; font: inherit; }
.clave-msg button { border: 0; background: var(--oscuro); color: #fff; border-radius: 999px; padding: 10px; cursor: pointer; }
.error-msg { color: #C23A2C; font-size: 12px; min-height: 14px; }

/* barras por red */
.fila-red { display: flex; align-items: center; gap: 12px; margin-top: 10px; font-size: 13px; }
.fila-red .ic-red { width: 28px; display: grid; place-items: center; flex: none; }
.fila-red .r { flex: 1; height: 9px; border-radius: 5px; background: rgba(0, 0, 0, .07); }
.fila-red .r div { height: 9px; border-radius: 5px; }
.fila-red b { width: 64px; text-align: right; font-weight: 400; }

/* gráfica y redes */
.grafica { height: 200px; position: relative; }
.grafica svg { width: 100%; height: 100%; overflow: visible; font-variant-numeric: tabular-nums; }
.tip { position: absolute; pointer-events: none; background: var(--oscuro); color: #fff; border-radius: 12px; padding: 7px 11px; font-size: 12px; display: flex; flex-direction: column; gap: 1px; white-space: nowrap; }
.tip strong { font-size: 14px; }
.tip .pos { color: #8fe0a0; } .tip .neg { color: #ffb0a5; }
.lista-redes { display: flex; flex-direction: column; gap: 2px; }
.red-fila { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: none; border: 0; border-radius: 20px; padding: 9px 12px; cursor: pointer; }
.red-fila:hover { background: rgba(255, 255, 255, .7); }
.red-fila.activa { background: var(--rosa-suave); }
.red-fila .icono { width: 40px; height: 40px; border-radius: 50%; background: #fff; display: grid; place-items: center; flex-shrink: 0; }
.red-datos { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.red-nombre { font-size: 13px; color: var(--suave); }
.red-cifra { font-size: 20px; }
.red-cambio { font-size: 12px; white-space: nowrap; }

/* publicación */
.iconos-posts { display: flex; gap: 10px; margin-bottom: 12px; }
.icono-post { width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; background: #fff; }
.icono-post.activo { background: var(--oscuro); color: #fff; }
.post-cab { display: flex; gap: 12px; text-decoration: none; color: inherit; background: #fff; border-radius: 20px; padding: 10px; }
.post-cab img, .post-cab .sin-img { width: 72px; height: 72px; border-radius: 14px; object-fit: cover; flex-shrink: 0; background: #D3D1C7; }
.post-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.post-texto { font-size: 13px; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.post-meta { display: flex; gap: 10px; font-size: 12px; color: var(--suave); }
.coments { margin-top: 12px; max-height: 190px; overflow-y: auto; scrollbar-width: thin; }
.coments h4 { margin: 0 0 6px; font-size: 13px; font-weight: 500; }
.coment { padding: 7px 0; border-top: 1px solid var(--linea); }
.coment strong { font-size: 13px; font-weight: 500; }
.coment .cuando { font-size: 11px; color: var(--suave); margin-left: 8px; }
.coment p { margin: 2px 0 0; font-size: 13px; line-height: 1.35; }
.aviso { font-size: 12px; margin: 0 0 6px; }

/* agentes */
.lista-agentes { display: flex; flex-direction: column; gap: 6px; }
.agente-fila { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer; background: #fff; border: 0; border-radius: 20px; padding: 10px 12px; }
.agente-fila:hover { background: var(--rosa-suave); }
.ag-cara { flex-shrink: 0; }
.ag-datos { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.ag-nombre { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-rol { font-size: 12px; color: var(--suave); }
.ag-estado { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--suave); margin-top: 2px; }
.ag-estado i { width: 8px; height: 8px; border-radius: 50%; background: #C9CFC2; display: inline-block; }
.ag-estado.on { color: var(--rosa); }
.ag-estado.on i { background: var(--rosa); animation: pulso 1.6s infinite; }
@keyframes pulso { 0% { box-shadow: 0 0 0 0 rgba(231, 44, 94, .5); } 100% { box-shadow: 0 0 0 8px rgba(231, 44, 94, 0); } }
.ag-chat { background: var(--oscuro); color: #fff; padding: 5px 14px; border-radius: 999px; font-size: 12px; }
.ag-engrane { flex-shrink: 0; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: none; color: var(--suave); cursor: pointer; }
.ag-engrane:hover { background: var(--fondo); color: var(--texto); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 4px; border-bottom: 1px solid var(--linea); }
th { color: var(--suave); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.etiq { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 11px; }
.etiq.ok { background: #DCEBDD; color: #2F6B34; }
.etiq.error { background: var(--rosa-suave); color: #B3173F; }

/* chat lateral */
.cajon { position: fixed; top: 16px; bottom: 16px; right: 16px; width: min(440px, calc(100vw - 32px)); z-index: 10; background: #fff; border-radius: 28px; box-shadow: 0 24px 60px rgba(60, 40, 40, .25); transform: translateX(calc(100% + 40px)); transition: transform .35s cubic-bezier(.2, .8, .2, 1); display: flex; flex-direction: column; overflow: hidden; }
.cajon.abierto { transform: translateX(0); }
.cajon-cab { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px 12px; }
.cajon-cab h2 { margin: 0; font-size: 20px; font-weight: 400; }
.cerrar { border: 0; background: var(--fondo); width: 34px; height: 34px; border-radius: 50%; font-size: 20px; cursor: pointer; color: var(--suave); }
.velo { position: fixed; inset: 0; background: rgba(43, 43, 42, .25); z-index: 9; opacity: 0; pointer-events: none; transition: opacity .3s; }
.velo.activo { opacity: 1; pointer-events: auto; }
.chat-cuerpo { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.mensajes { flex: 1; overflow-y: auto; padding: 8px 22px 14px; display: flex; flex-direction: column; gap: 10px; }
.burbuja { max-width: 82%; padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; }
.burbuja.yo { align-self: flex-end; background: var(--oscuro); color: #fff; border-bottom-right-radius: 4px; }
.burbuja.agente { align-self: flex-start; background: var(--fondo); border-bottom-left-radius: 4px; }
.formulario { display: flex; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--linea); }
.formulario input { flex: 1; border: 0; border-radius: 999px; background: var(--fondo); padding: 11px 18px; font: inherit; }
.formulario input:focus { outline: 2px solid var(--rosa); }
.formulario button { background: var(--rosa); color: #fff; border: 0; border-radius: 999px; padding: 0 20px; cursor: pointer; }
.acciones { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 18px 0; }
.acciones .chip { border: 0; background: var(--fondo); border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; }
.acciones .chip:hover { background: var(--rosa-suave); }
.acciones .chip:disabled { opacity: .5; cursor: default; }

/* ajustes del agente */
.modal-ajustes { position: fixed; inset: 0; background: rgba(43, 43, 42, .4); display: grid; place-items: center; z-index: 100; }
.modal-caja { width: min(420px, 92vw); max-height: 90vh; overflow: auto; background: #fff; border-radius: 28px; padding: 22px; display: flex; flex-direction: column; gap: 14px; font-size: 14px; }
.modal-caja h3 { margin: 0; font-size: 18px; font-weight: 400; }
.modal-caja label, .modal-caja .campo { display: flex; flex-direction: column; gap: 5px; }
.modal-caja small { color: var(--suave); }
.modal-caja input[type=text], .modal-caja input:not([type]), .modal-caja input[type=password], .modal-caja textarea { font: inherit; padding: 10px 14px; border: 0; border-radius: 14px; background: var(--fondo); resize: vertical; }
.paleta { display: flex; gap: 10px; }
.modal-caja .color { flex-direction: row; cursor: pointer; }
.color input { position: absolute; opacity: 0; }
.color i { width: 28px; height: 28px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px #C9CFC2; }
.color input:checked + i { box-shadow: 0 0 0 2.5px var(--oscuro); }
.nota-aj { margin: 0; font-size: 12px; color: var(--suave); }
.botones-aj { display: flex; gap: 8px; align-items: center; }
.botones-aj button { padding: 8px 18px; border: 0; border-radius: 999px; cursor: pointer; background: var(--rosa); color: #fff; }
.botones-aj button.sec { background: var(--fondo); color: var(--texto); }

@media (max-width: 900px) {
  body { padding: 8px; }
  .lienzo { padding: 16px 14px 24px; border-radius: 24px; }
  .saludo { font-size: 30px; }
  .rejilla, .rejilla.dos, .cols-msg { grid-template-columns: 1fr; }
  .tarjeta.ancha, .tarjeta.oscura { grid-column: auto; grid-row: auto; }
  .grandes strong { font-size: 36px; }
  .burbuja-c { max-width: 88%; }
  .menu button { padding: 8px 12px; }
}

/* ---------- Mascotas (los agentes caminando por el panel) ---------- */
#capa-masc { position: fixed; inset: 0; z-index: 30; pointer-events: none; overflow: hidden; }
.masc { position: absolute; left: 0; top: 0; width: 74px; height: 50px; pointer-events: auto; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; will-change: transform; outline: none; }
.masc.agarrada { cursor: grabbing; }
.masc:focus-visible svg { filter: drop-shadow(0 0 0 #fff) drop-shadow(0 0 3px var(--rosa)); }
.masc svg { display: block; overflow: visible; filter: drop-shadow(0 6px 5px rgba(60, 30, 40, .18)); transform-origin: 50% 100%; }
.nombre-masc { position: absolute; left: 50%; top: -17px; transform: translateX(-50%); font-size: 10.5px; line-height: 1; color: var(--texto); background: rgba(255, 255, 255, .85); border-radius: 999px; padding: 3px 8px; white-space: nowrap; max-width: 120px; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.masc .pata { transform-box: fill-box; transform-origin: 50% 0; }
.masc.caminando .cuerpo-m { animation: rebote-masc .42s ease-in-out infinite; }
.masc.caminando .p1, .masc.caminando .p3 { animation: pata-masc .42s ease-in-out infinite; }
.masc.caminando .p2, .masc.caminando .p4 { animation: pata-masc .42s ease-in-out infinite reverse; }
.masc.en-aire .pata { transform: scaleY(.7); }
/* Animación corta: la mascota saca una impresora 3D e imprime un cubito (≈4.6 s) */
.impresora { position: absolute; left: 100%; bottom: 0; margin-left: 4px; pointer-events: none; transform-origin: 50% 100%; animation: imp-sale 4.6s ease-out both; }
.impresora.izq { left: auto; right: 100%; margin: 0 4px 0 0; }
.impresora svg { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 4px 3px rgba(60, 30, 40, .2)); }
.imp-obj { transform-box: fill-box; transform-origin: 50% 100%; animation: imp-sube 3.2s steps(8, end) .5s both; }
.imp-carro { animation: imp-baja 3.2s steps(8, end) .5s both; }
.imp-cabezal { animation: imp-barre .45s ease-in-out .5s 7 alternate both; }
.masc.imprimiendo > svg { animation: imp-celebra 4.6s ease-out both; }
@keyframes imp-sale { 0% { transform: scale(0); } 9% { transform: scale(1.12); } 12%, 90% { transform: scale(1); } 100% { transform: scale(0); } }
@keyframes imp-sube { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes imp-baja { from { transform: translateY(16px); } to { transform: translateY(0); } }
@keyframes imp-barre { from { transform: translateX(-9px); } to { transform: translateX(9px); } }
@keyframes imp-celebra { 0%, 78% { transform: none; } 82% { transform: translateY(-9px); } 88% { transform: none; } 91% { transform: translateY(-6px); } 96%, 100% { transform: none; } }
.masc.agarrada svg { animation: colgada-masc .35s ease-in-out infinite alternate; transform-origin: 50% 0; }
.masc.agarrada .pata { transform: scaleY(1.15); }
.masc .ojos-m { transform-box: fill-box; transform-origin: 50% 50%; animation: parpadeo-masc 5s infinite; }
@keyframes pata-masc { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px) scaleY(.7); } }
@keyframes rebote-masc { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes colgada-masc { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }
@keyframes parpadeo-masc { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@media (prefers-reduced-motion: reduce) { .masc *, .masc svg { animation: none !important; } }

/* burbuja de diálogo */
#burbuja-masc { position: fixed; z-index: 31; width: max-content; max-width: min(300px, calc(100vw - 16px)); background: #fff; color: var(--texto); border-radius: 20px; padding: 14px 16px; font-size: 13px; line-height: 1.4; box-shadow: 0 12px 34px rgba(60, 30, 40, .22); border-top: 4px solid var(--color-masc, var(--rosa)); }
#burbuja-masc::after { content: ""; position: absolute; left: var(--cola, 30px); bottom: -9px; width: 16px; height: 16px; background: #fff; transform: translateX(-50%) rotate(45deg); border-radius: 3px; }
#burbuja-masc.abajo::after { bottom: auto; top: -11px; background: var(--color-masc, var(--rosa)); border-radius: 3px; }
.bub-x { position: absolute; top: 6px; right: 8px; border: 0; background: none; font-size: 18px; line-height: 1; color: var(--suave); cursor: pointer; }
.bub-cab { display: flex; flex-direction: column; margin-bottom: 6px; padding-right: 16px; }
.bub-cab b { font-size: 14px; font-weight: 500; }
.bub-cab span, .bub-est { color: var(--suave); font-size: 12px; }
.bub-est i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #C9CFC2; margin-right: 6px; }
.bub-est.on i { background: var(--rosa); }
.bub-redes { display: grid; gap: 6px; margin: 8px 0; }
.bub-red { display: flex; align-items: center; gap: 8px; }
.bub-red svg { flex: none; }
.bub-red b { font-weight: 500; font-variant-numeric: tabular-nums; }
.bub-red em { font-style: normal; font-size: 12px; margin-left: auto; font-variant-numeric: tabular-nums; }
.bub-linea { margin: 6px 0 0; }
.bub-pie { margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--linea); font-size: 12px; color: var(--suave); }
.ag-ult { display: block; font-size: 12px; color: var(--suave); }
.agente-fila { cursor: pointer; }

/* ajustes de los agentes (tamaño y cuáles se ven) */
.titulo-eng { display: flex; align-items: center; gap: 10px; }
.btn-engrane { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--vidrio); color: var(--texto); cursor: pointer; transition: background .15s, transform .3s; }
.btn-engrane:hover, .btn-engrane[aria-expanded="true"] { background: #fff; transform: rotate(45deg); }
#panel-masc { position: absolute; z-index: 40; width: min(320px, calc(100vw - 24px)); background: #fff; border-radius: 24px; padding: 18px 20px; box-shadow: 0 16px 44px rgba(60, 30, 40, .22); font-size: 14px; }
#panel-masc h4 { margin: 0 0 8px; font-size: 14px; font-weight: 500; }
#panel-masc .fila-tam { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
#panel-masc input[type=range] { flex: 1; accent-color: var(--rosa); }
#panel-masc .valor-tam { width: 46px; text-align: right; font-variant-numeric: tabular-nums; color: var(--suave); }
#panel-masc .sep { height: 1px; background: var(--linea); margin: 14px 0; }
#panel-masc .lista-vis { display: flex; flex-direction: column; gap: 2px; }
#panel-masc label.vis { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 14px; cursor: pointer; }
#panel-masc label.vis:hover { background: var(--fondo); }
#panel-masc label.vis input { width: 18px; height: 18px; accent-color: var(--rosa); }
#panel-masc .punto-color { width: 12px; height: 12px; border-radius: 3px; flex: none; }
#panel-masc .acciones-vis { display: flex; gap: 8px; margin-top: 10px; }
#panel-masc .acciones-vis button { border: 0; background: var(--fondo); border-radius: 999px; padding: 7px 14px; font-size: 13px; cursor: pointer; }
#panel-masc .acciones-vis button:hover { background: var(--rosa-suave); }

/* gráfica de seguidores del inicio: red, rango y agrupación */
.tarjeta.seg-grande { grid-column: span 2; }
.segmento { display: flex; flex-wrap: wrap; gap: 4px; background: rgba(0, 0, 0, .05); border-radius: 999px; padding: 3px; }
.seg-op { border: 0; background: none; border-radius: 999px; padding: 5px 12px; font-size: 12.5px; color: #4A4944; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; min-height: 28px; }
.seg-op:hover { background: rgba(255, 255, 255, .8); }
.seg-op.activo { background: var(--oscuro); color: #fff; }
.cifra-seg { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin: 2px 0 10px; min-height: 40px; }
.cifra-seg strong { font-size: 34px; font-weight: 400; line-height: 1; font-variant-numeric: tabular-nums; }
.cifra-seg span { font-size: 14px; font-variant-numeric: tabular-nums; }
.cifra-seg small { color: var(--suave); font-size: 12px; }
.ctl-fila { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }

/* sección Mensajes: columnas negras como la tarjeta del inicio */
.col-red { background: var(--oscuro); color: #fff; }
.col-red .cab { color: #fff; }
.col-red .ct:hover { background: #3a3a38; }
.col-red .ct .av { background: #444441; color: #fff; }
.col-red .ct .s { color: #B4B2A9; }
.col-red .ct .punto.ok { background: #5F5E5A; }
.col-red .ct.sel { background: #444441; }
.col-red .sin { color: #B4B2A9; }
.col-red .lista-col { scrollbar-color: #5F5E5A transparent; }
.filtros-col { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 6px 10px; border-bottom: .5px solid #444441; margin-bottom: 6px; }
.filtro-wa { border: 0; border-radius: 999px; padding: 6px 12px; font-size: 12.5px; background: #444441; color: #D3D1C7; cursor: pointer; }
.filtro-wa small { opacity: .8; margin-left: 2px; font-size: 11px; }
.filtro-wa:hover { background: #5F5E5A; color: #fff; }
.filtro-wa.activo { background: var(--rosa); color: #fff; }
.ct.con-etq { flex-wrap: wrap; }
.mini-etqs { display: flex; flex-wrap: wrap; gap: 4px; width: 100%; padding-left: 40px; margin-top: -2px; }
.mini-etq { font-style: normal; font-size: 10.5px; line-height: 1; padding: 3px 8px; border-radius: 999px; background: #444441; color: #D3D1C7; }
.mini-etq.ok { background: rgba(231, 44, 94, .22); color: #ffb3c6; }

/* mientras se comprueba la sesión no se muestra nada (evita ver el panel un instante antes de ir a la pantalla de entrada) */
html.verificando body { visibility: hidden; }
.cab-acc { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }

/* archivos de WhatsApp dentro de la conversación */
.burbuja-c .adj { display: block; margin-bottom: 6px; }
.adj-img img { display: block; max-width: 100%; max-height: 280px; border-radius: 12px; background: rgba(255, 255, 255, .08); }
.burbuja-c audio.adj { width: 240px; max-width: 100%; }
.burbuja-c video.adj { max-width: 100%; max-height: 280px; border-radius: 12px; }
.adj-doc { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: rgba(0, 0, 0, .12); color: inherit; text-decoration: none; }
.adj-doc span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adj-doc small { display: inline; margin: 0 0 0 10px; white-space: nowrap; font-size: 11px; opacity: .85; text-decoration: underline; }
.adj-doc:hover { background: rgba(0, 0, 0, .2); }
.adj-nota { display: block; margin-bottom: 6px; font-size: 12px; opacity: .8; font-style: italic; }
.burbuja-c .txt-c { white-space: pre-wrap; }

#burbuja-masc.sin-cola::after { display: none; }
#burbuja-masc .bub-linea.neu { color: var(--suave); font-size: 12px; }
#burbuja-masc .bub-red em { margin-left: auto; padding-left: 14px; }

#burbuja-masc .monto-venta { font-size: 20px; font-weight: 500; color: var(--color-masc, var(--rosa)); }
