/* Hub Nanuc — bandeja del SAC. Estilos propios sobre el theme glass
   (tokens de theme.css; no se redefine ninguno). Inter, sin emojis:
   los iconos de plataforma son SVG stroke. */

/* La bandeja necesita ancho, pero sin pegarse al borde: tope amplio y
   aire a la derecha para la barra superior (iconos de tema, campana,
   usuario, que GlassUI alinea con la página). */
.hub-body .page { max-width: 1600px; }
/* GlassUI convierte al propio #glass-top en la barra (.gtop) y la deja
   sin margen lateral: los iconos de tema, campana y usuario tocaban el
   borde derecho. Mismo aire que el gutter de la página (28px). */
.hub-body #glass-top.gtop { padding-right: 28px; padding-left: 28px; }
@media (max-width: 720px) { .hub-body #glass-top.gtop { padding-right: 18px; padding-left: 18px; } }
/* El menú de módulos del celular cuelga de la barra (theme.css): en el
   hub la barra lleva su propio gutter, así que el menú se alinea con los
   iconos y no con el borde de la pantalla. */
@media (max-width: 1020px) { .hub-body #glass-top.gtop #g-pop-menu { left: 28px; right: 28px; } }
@media (max-width: 720px) { .hub-body #glass-top.gtop #g-pop-menu { left: 18px; right: 18px; } }
/* Tarjetas apiladas en las páginas de configuración: aire entre ellas. */
.hub-body .page > .card { margin-bottom: 16px; }
/* Título de sección dentro de una tarjeta: aire antes del contenido. */
.hub-body .card > .ctitle { margin-bottom: 14px; }
.hub-body .card > .csub { margin-top: 12px; }
.hub-body .card > .ctitle + .csub { margin-top: -8px; margin-bottom: 14px; }
/* Formularios en línea dentro de celdas: nunca se parten en dos líneas. */
.hub-inline { flex-wrap: nowrap; white-space: nowrap; }
/* El theme da margin-top: 28px a los .btn de un formulario (botón de
   envío bajo los campos); en los formularios en línea de las tablas eso
   los descuelga del selector. */
.hub-body form.hub-inline .btn, .hub-body form.hub-inline .form-input {
  margin: 0 !important; align-self: center;
}
.hub-acciones-usuario { align-items: center; }
/* Celda secundaria de tabla (NO .cell-sub del theme, que es display:block
   y rompe la fila si va en el <td>). */
.hub-sub { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
/* Entrada solo-CSS (mismo arreglo que base_admin): el reveal por JS del
   theme puede dejar el bloque invisible (y en /acceso no hay GlassUI que
   lo dispare). La animación conserva el escalonado y SIEMPRE termina
   visible. */
.page .reveal {
  opacity: 1; transform: none; filter: none;
  animation: hub-entrada .5s var(--ease, cubic-bezier(.22,.61,.36,1)) both;
  animation-delay: var(--d, 0ms);
}
@keyframes hub-entrada { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) { .page .reveal { animation: none; } }
.page-centrada { display: flex; align-items: center; justify-content: center;
                 min-height: 100vh; padding: 24px 16px; }
.hub-titulo { font-size: 20px; font-weight: 600; margin: 0; letter-spacing: -.01em; }

/* ── Acceso ─────────────────────────────────────────────────────────── */
.hub-acceso { width: min(420px, 100%); }
.hub-acceso-logo { height: 34px; width: auto; margin-bottom: 14px; display: block; }
.hub-acceso .field { margin-bottom: 14px; }
.hub-acceso-btn { width: 100%; margin-top: 6px; }
[data-theme="dark"] .hub-acceso-logo { filter: invert(1); }

/* ── Bandeja: tres columnas ──────────────────────────────────────────── */
.page-bandeja { padding-top: 12px; padding-bottom: 12px; }
.page-bandeja > .hub { margin-bottom: 0; }
.hub {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr) 300px;
  gap: 14px;
  height: calc(100vh - 92px);
  min-height: 520px;
}
.hub > .card { padding: 0; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
/* El atributo hidden manda sobre cualquier display de estas clases. */
.hub [hidden] { display: none !important; }
.hub-hilo-vacio, .hub-ficha .empty-state { margin: auto; box-shadow: none; background: none; }

/* Columna 1 */
.hub-lista-cabeza { display: flex; align-items: center; justify-content: space-between;
                    gap: 8px; padding: 16px 16px 8px; }
.hub-pestanas { display: flex; gap: 4px; padding: 0 12px; border-bottom: 1px solid var(--hairline); }
.hub-pestana { background: none; border: 0; padding: 8px 8px 10px; font: inherit; font-size: 13px;
               color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent;
               margin-bottom: -1px; display: flex; gap: 6px; align-items: center; }
.hub-pestana.on { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.hub-num { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hub-num:empty { display: none; }
.hub-filtros { display: grid; gap: 8px; padding: 10px 12px; }
.hub-conversaciones { list-style: none; margin: 0; padding: 4px 6px 10px; overflow-y: auto; flex: 1; }
.hub-conv { display: block; border-radius: var(--r-sm); cursor: pointer; }
.hub-conv-nombre { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-conv-texto { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis;
                  white-space: nowrap; margin-top: 2px; }
.hub-conv-cuenta { font-size: 11px; color: var(--muted); }
/* Origen (anuncio/publicación), dueño 2026-10-12: distintivo en la lista,
   tarjeta sobre el primer mensaje y filtro en la cabecera. */
.hub-conv-origen { font-size: 11px; color: var(--blue-deep); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-conv-origen::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); margin-right: 5px; vertical-align: 1px; }
.hub-filtro-anuncios { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-top: 6px; cursor: pointer; }
.hub-filtro-anuncios input { accent-color: var(--blue); }
.hub-filtro-anuncios .hub-num:not(:empty)::before { content: '· '; }
.hub-origen { background: rgba(60, 145, 230, .10); border-left: 3px solid var(--blue); border-radius: var(--r-sm); padding: 8px 12px; margin-bottom: 6px; font-size: 12.5px; max-width: 100%; }
.hub-origen-cab { font-size: 11px; color: var(--blue-deep); font-weight: 600; text-transform: none; }
.hub-origen-titulo { font-weight: 600; color: var(--ink); margin-top: 2px; }
.hub-origen-texto { color: var(--muted); margin-top: 2px; }
.hub-origen-pie { display: flex; gap: 10px; margin-top: 4px; font-size: 11.5px; }
.hub-origen-link { color: var(--blue-deep); text-decoration: underline; }
.hub-origen-id { color: var(--muted); }
[data-theme="dark"] .hub-conv-origen, [data-theme="dark"] .hub-origen-cab, [data-theme="dark"] .hub-origen-link { color: var(--blue); }
[data-theme="dark"] .hub-origen { background: rgba(60, 145, 230, .16); }
.hub-conv-hora { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.hub-conv-sinleer { display: inline-block; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
                    background: var(--green-deep); color: #fff; font-size: 11px; font-weight: 600;
                    line-height: 18px; text-align: center; margin-top: 4px; }
.hub-conv.sin-leer .hub-conv-texto { color: var(--ink); font-weight: 500; }

/* Icono de plataforma */
.hub-icono { width: 34px; height: 34px; border-radius: 50%; display: inline-flex;
             align-items: center; justify-content: center; flex-shrink: 0;
             background: rgba(39, 39, 39, .06); color: var(--ink-soft); }
.hub-icono svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8;
                 stroke-linecap: round; stroke-linejoin: round; }
.hub-icono.whatsapp { color: var(--green-deep); background: rgba(41, 191, 18, .12); }
.hub-icono.instagram { color: #b0247a; background: rgba(176, 36, 122, .12); }
.hub-icono.messenger { color: var(--blue-deep); background: rgba(60, 145, 230, .14); }

/* Columna 2: hilo */
.hub-hilo-vacio { margin: auto; }
.hub-hilo-todo { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.hub-hilo-cabeza { display: flex; align-items: center; gap: 12px; padding: 12px 16px;
                   border-bottom: 1px solid var(--hairline); flex-wrap: wrap; }
.hub-hilo-quien { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 220px; }
/* Dueño 2026-10-21: el distintivo de la ventana se montaba sobre el teléfono;
   el bloque del nombre debe poder encoger y el subtítulo recortarse. */
.hub-hilo-quien > div { min-width: 0; }
.hub-hilo-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-hilo-nombre { font-weight: 600; font-size: 15px; }
.hub-hilo-sub { font-size: 12px; color: var(--muted); }
.hub-hilo-acciones { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hub-sel { padding: 6px 10px; font-size: 13px; height: auto; width: auto; }
.hub-switch { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-soft);
              cursor: pointer; }
.badge.ventana-abierta { background: rgba(41, 191, 18, .14); color: var(--green-deep); }
.badge.ventana-cerrada { background: rgba(244, 68, 46, .14); color: var(--red-deep); }

.hub-mensajes { list-style: none; margin: 0; padding: 16px; overflow-y: auto; flex: 1; min-height: 0;
                display: flex; flex-direction: column; gap: 8px; }
.hub-msg { display: flex; flex-direction: column; max-width: min(78%, 620px); }
.hub-msg.in { align-self: flex-start; }
.hub-msg.out { align-self: flex-end; align-items: flex-end; }
.hub-msg.sistema { align-self: center; max-width: 100%; }
.hub-burbuja { padding: 9px 13px; border-radius: 16px; font-size: 14px; line-height: 1.4;
               white-space: pre-wrap; overflow-wrap: anywhere; }
.hub-msg.in .hub-burbuja { background: rgba(39, 39, 39, .07); border-bottom-left-radius: 6px; }
.hub-burbuja-out, .hub-msg.out .hub-burbuja { background: var(--ink); color: var(--canvas); border-bottom-right-radius: 6px; }
.hub-msg.plantilla .hub-burbuja { background: rgba(31, 108, 186, .12); color: var(--ink); border: 1px dashed rgba(31, 108, 186, .4); }
.hub-msg.nota .hub-burbuja { background: rgba(245, 158, 11, .14); color: var(--ink); border: 1px solid rgba(245, 158, 11, .35); }
.hub-msg.sistema .hub-burbuja { background: none; color: var(--muted); font-size: 12px; text-align: center; padding: 2px 8px; }
.hub-msg-meta { font-size: 11px; color: var(--muted); margin-top: 3px; padding: 0 4px;
                display: flex; gap: 6px; align-items: center; }
.hub-msg-estado { font-variant: small-caps; letter-spacing: .02em; }
/* Respuesta citada (2026-10-12): botón "Responder" en cada mensaje, cita
   dentro de la burbuja y caja de cita sobre el cuadro de texto. */
.hub-msg-responder { border: 0; background: none; color: var(--blue-deep); font: inherit; font-size: 11px; cursor: pointer; padding: 0 2px; }
.hub-msg-responder:hover { text-decoration: underline; }
.hub-burbuja-cita { display: block; border-left: 3px solid var(--blue); background: rgba(39, 39, 39, .06); border-radius: 8px; padding: 6px 10px; margin-bottom: 6px; font-size: 12.5px; cursor: pointer; max-width: 100%; }
.hub-burbuja-cita b { display: block; font-size: 11px; color: var(--blue-deep); font-weight: 600; }
.hub-burbuja-cita span { display: block; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-msg.out .hub-burbuja-cita { background: rgba(255, 255, 255, .22); }
.hub-msg.out .hub-burbuja-cita b, .hub-msg.out .hub-burbuja-cita span { color: inherit; opacity: .9; }
.hub-cita { display: flex; align-items: center; gap: 10px; border-left: 3px solid var(--blue); background: rgba(60, 145, 230, .10); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; font-size: 12.5px; }
.hub-cita-cuerpo { flex: 1; min-width: 0; }
.hub-cita-quien { display: block; font-size: 11px; color: var(--blue-deep); font-weight: 600; }
.hub-cita-texto { display: block; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-cita-quitar { border: 0; background: none; color: var(--muted); font: inherit; font-size: 18px; line-height: 1; cursor: pointer; }
.hub-msg.citado .hub-burbuja { box-shadow: 0 0 0 2px rgba(60, 145, 230, .55); transition: box-shadow .4s; }
/* Deslizar a la derecha para responder: flecha que asoma por la izquierda */
.hub-msg { position: relative; touch-action: pan-y; }
.hub-msg::after { content: ''; position: absolute; left: -44px; top: 50%; width: 30px; height: 30px; margin-top: -15px; border-radius: 50%;
  background: rgba(39, 39, 39, .08) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f6cba' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='9 14 4 9 9 4'/><path d='M20 20v-7a4 4 0 0 0-4-4H4'/></svg>") center/16px no-repeat;
  opacity: 0; transform: scale(.7); transition: opacity .15s, transform .15s; pointer-events: none; }
.hub-msg.deslizando::after { opacity: .7; transform: scale(.9); }
.hub-msg.deslizar-listo::after { opacity: 1; transform: scale(1.05); background-color: rgba(60, 145, 230, .18); }
[data-theme="dark"] .hub-burbuja-cita { background: rgba(255, 255, 255, .08); }
[data-theme="dark"] .hub-msg-responder, [data-theme="dark"] .hub-burbuja-cita b, [data-theme="dark"] .hub-cita-quien { color: var(--blue); }
.hub-msg-estado.fallido { color: var(--red-deep); }
.hub-msg-estado.leido { color: var(--blue-deep); }
.hub-baja { margin: 0 16px 8px; }

.hub-redactar { border-top: 1px solid var(--hairline); padding: 10px 16px 14px; display: grid; gap: 8px; }
.hub-redactar-tabs { display: flex; gap: 4px; }
.hub-tab { background: none; border: 0; font: inherit; font-size: 12.5px; color: var(--muted);
           padding: 4px 10px; border-radius: var(--r-pill); cursor: pointer; }
.hub-tab.on { background: rgba(39, 39, 39, .08); color: var(--ink); font-weight: 600; }
.hub-redactar.modo-nota textarea { background: rgba(245, 158, 11, .1); }
.hub-redactar textarea { resize: vertical; min-height: 48px; max-height: 200px; }
.hub-redactar-acciones { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.hub-redactar-aviso { flex: 1; font-size: 12px; color: var(--muted); }
/* Fix 2026-11-13 (dueño, visto en el video 08 del App Review): con la
   bandeja a tres columnas el panel de la conversación queda angosto aunque
   la pantalla sea ancha, y el aviso ("Pasaron más de 24 h: la respuesta sale
   como agente humano…") se apretaba en una columna de una palabra por línea
   al lado de los botones. La regla mira el ancho del REDACTOR, no el de la
   pantalla: si no caben el aviso y los botones en una fila, el aviso baja a
   una fila propia del ancho completo, debajo de los botones. En celular
   manda la regla de más abajo (max-width: 640px), que lo deja arriba. */
.hub-redactar { container-type: inline-size; container-name: redactar; }
@container redactar (max-width: 640px) {
  .hub-redactar-acciones { flex-wrap: wrap; row-gap: 6px; }
  .hub-redactar-aviso { flex-basis: 100%; order: 1; }
  .hub-redactar-aviso:empty { display: none; }
}

/* Columna 3: ficha */
.hub-ficha { padding: 16px !important; overflow-y: auto; }
.hub-ficha-nombre { font-weight: 600; font-size: 16px; margin-top: 4px; }
.hub-ficha-contacto { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.hub-ficha-bloque { margin-top: 16px; }
.hub-ficha-lista { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.hub-ficha-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.hub-ficha-dato { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; padding: 4px 0;
                  border-bottom: 1px solid var(--hairline); }
.hub-ficha-dato b { font-weight: 600; font-variant-numeric: tabular-nums; }

/* Modal plantilla */
.hub-plantilla-texto { margin: 10px 0; font-size: 13px; color: var(--ink-soft); white-space: pre-wrap;
                       background: rgba(39, 39, 39, .05); padding: 10px 12px; border-radius: var(--r-sm); }

/* Páginas de configuración */
.hub-grid-2 { grid-template-columns: minmax(300px, 1fr) minmax(0, 2fr); margin-bottom: 14px; }
@media (max-width: 900px) { .hub-grid-2 { grid-template-columns: 1fr; } }
/* Formulario de plantilla: el formulario manda, la vista previa acompaña. */
.hub-grid-form { grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); }
@media (max-width: 900px) { .hub-grid-form { grid-template-columns: 1fr; } }
.hub-inline { display: inline-flex; gap: 6px; align-items: center; }
.hub-acciones-usuario { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.hub-agente { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-plantillas { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
/* Listado agrupado (dueño 2026-11-17): categoría de Meta en grande y,
   dentro, una fila por origen que se despliega; una abierta a la vez. */
.hub-pl-categoria { margin-top: 34px; }
.hub-pl-titulo { font-size: 26px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); margin: 0 0 12px; }
.hub-pl-origenes { padding: 0; overflow: hidden; }
.hub-pl-origen + .hub-pl-origen { border-top: 1px solid var(--line, rgba(128, 128, 128, .18)); }
.hub-pl-fila { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 20px; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer;
  transition: background .18s ease; }
.hub-pl-fila:hover { background: var(--glass-strong); }
.hub-pl-fila:focus-visible { outline: 2px solid var(--ink-soft); outline-offset: -2px; }
.hub-pl-fila-texto { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hub-pl-fila-nombre { font-size: 16px; font-weight: 600; color: var(--ink); }
.hub-pl-fila-datos { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.hub-pl-cuenta { min-width: 26px; text-align: center; font-size: 12.5px; font-weight: 600; padding: 2px 8px;
  border-radius: 999px; background: var(--glass-strong); color: var(--ink-soft); }
.hub-pl-flecha { color: var(--ink-soft); transition: transform .28s cubic-bezier(.2, .8, .2, 1); }
.hub-pl-origen.abierto .hub-pl-flecha { transform: rotate(180deg); }
/* El alto se anima con la grilla 0fr → 1fr: no hay que medir el contenido. */
.hub-pl-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .32s cubic-bezier(.2, .8, .2, 1); }
.hub-pl-origen.abierto .hub-pl-panel { grid-template-rows: 1fr; }
.hub-pl-panel-dentro { overflow: hidden; min-height: 0; }
.hub-pl-panel .hub-plantillas { padding: 4px 20px 22px; opacity: 0; transform: translateY(-6px);
  transition: opacity .24s ease, transform .28s cubic-bezier(.2, .8, .2, 1); }
.hub-pl-origen.abierto .hub-plantillas { opacity: 1; transform: none; }
@media (max-width: 720px) { .hub-pl-resumen { display: none; } .hub-pl-titulo { font-size: 22px; } }
@media (prefers-reduced-motion: reduce) {
  .hub-pl-panel, .hub-pl-flecha, .hub-pl-panel .hub-plantillas { transition: none; }
}
.hub-plantilla-cabeza { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.hub-plantilla-vista { font-size: 13.5px; }
.hub-plantilla-botones { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.hub-boton-vista { font-size: 12.5px; color: var(--blue-deep); border: 1px solid rgba(31, 108, 186, .35);
                   border-radius: var(--r-pill); padding: 3px 10px; }

/* Plantillas: listado y formulario */
.hub-subtitulo { font-size: 15px; font-weight: 600; margin: 22px 0 10px; color: var(--ink-soft); }
.hub-plantilla-pie { display: flex; justify-content: space-between; align-items: center; gap: 8px;
                     margin-top: 10px; flex-wrap: wrap; }
.hub-plantilla-acciones { display: inline-flex; gap: 6px; }
.hub-plantilla-add { display: flex; gap: 6px; margin-top: 6px; }
.hub-boton-fila { display: grid; grid-template-columns: 72px minmax(120px, .8fr) minmax(0, 1.6fr) auto;
                  gap: 6px; align-items: center; margin-bottom: 6px; }
.hub-boton-fila .hub-boton-url { display: grid; grid-template-columns: minmax(0, 1fr) 130px; gap: 6px; }
.hub-boton-fila .form-input { padding: 6px 10px; font-size: 13px; height: auto; min-width: 0; }
.hub-boton-fila .btn { white-space: nowrap; }
@media (max-width: 640px) { .hub-boton-fila { grid-template-columns: 1fr; } }
.hub-telefono { background: rgba(39, 39, 39, .05); border-radius: var(--r-md); padding: 16px; }
[data-theme="dark"] .hub-telefono { background: rgba(255, 255, 255, .06); }
.hub-plantilla-botones-vista { flex-direction: column; }
.hub-plantilla-botones-vista .hub-boton-vista { text-align: center; background: var(--glass-strong); }
#errores { display: none; white-space: pre-line; }
#errores.visible { display: block; }
.hub-plantilla-guardar { display: flex; align-items: center; gap: 12px; }
[data-solo] { display: none; }
.form-grid[data-modo="texto"] [data-solo="texto"], .form-grid[data-modo="auth"] [data-solo="auth"] { display: block; }
.form-grid[data-modo="texto"] .form-row.full[data-solo="texto"] { grid-column: 1 / -1; }

/* ── Celular: una columna a la vez ──────────────────────────────────── */
@media (max-width: 960px) {
  /* Dueño 2026-09-29: el hub ocupa justo la pantalla y SOLO el hilo (o la
     lista, o la ficha) hace scroll por dentro; la página no crece con los
     mensajes. dvh sigue a la barra del navegador del celular. */
  .hub { grid-template-columns: 1fr; height: calc(100vh - 104px); height: calc(100dvh - 104px); min-height: 0; }
  .hub > .card { min-height: 0; }
  .hub[data-panel="lista"] #col-hilo, .hub[data-panel="lista"] #col-ficha { display: none; }
  .hub[data-panel="hilo"] #col-lista, .hub[data-panel="hilo"] #col-ficha { display: none; }
  .hub[data-panel="ficha"] #col-lista, .hub[data-panel="ficha"] #col-hilo { display: none; }
  .hub-msg { max-width: 92%; }
}
@media (min-width: 961px) { .only-mobile { display: none !important; } }

/* Tema oscuro: los fondos neutros se invierten con los tokens del theme;
   aquí solo lo que usa rgba de tinta directa. */
[data-theme="dark"] .hub-conv:hover { background: rgba(255, 255, 255, .06); }
[data-theme="dark"] .hub-msg.in .hub-burbuja { background: rgba(255, 255, 255, .09); }
[data-theme="dark"] .hub-tab.on { background: rgba(255, 255, 255, .12); }
[data-theme="dark"] .hub-icono { background: rgba(255, 255, 255, .08); }
[data-theme="dark"] .hub-plantilla-texto { background: rgba(255, 255, 255, .07); }
[data-theme="dark"] .hub-msg.out .hub-burbuja, [data-theme="dark"] .hub-burbuja-out { background: var(--canvas); color: var(--ink); }

/* Variables resaltadas en el listado de plantillas ({nombre}). */
.hub-var { display: inline-block; padding: 0 5px; border-radius: 6px; font-weight: 600;
           background: rgba(227, 243, 128, .35); color: var(--lime-deep); }
[data-theme="dark"] .hub-var { background: rgba(227, 243, 128, .18); color: var(--lime); }
.hub-msg.out .hub-var, .hub-burbuja-out .hub-var { background: rgba(255, 255, 255, .18); color: #fff; }
[data-theme="dark"] .hub-burbuja-out .hub-var { background: rgba(0, 0, 0, .18); color: var(--ink); }

/* Globo de "sin leer" en el menú lateral: punto ROJO con el número
   dentro, como el del botón Mesas del POS (dueño 2026-09-28).
   Desplegado: junto al nombre de la opción. Plegado (body.gside-min):
   sobre la esquina del icono. El theme solo oculta .slabel al plegar,
   así que el globo sigue visible. */
.gside-nav a.sitem.con-globo { position: relative; }
.hub-globo { display: inline-block; margin-left: 8px; min-width: 18px; height: 18px; padding: 0 5px;
             border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700;
             line-height: 18px; text-align: center; font-variant-numeric: tabular-nums;
             box-shadow: 0 0 0 2px var(--glass-strong); pointer-events: none; flex: none; }
body.gside-min:not(.gside-peek) .gside-nav a.sitem .hub-globo {
  position: absolute; top: 3px; right: 7px; margin: 0; min-width: 16px; height: 16px;
  line-height: 16px; font-size: 10px; padding: 0 4px; }

/* Ficha: últimos movimientos del socio (compras, canjes, cargas). */
.hub-movimientos { gap: 8px; }
.hub-mov { padding: 6px 0; border-bottom: 1px solid var(--hairline); }
.hub-mov-cab { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.hub-mov-puntos { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 12.5px; }
.hub-mov-puntos.pos { color: var(--green-deep); }
.hub-mov-puntos.neg { color: var(--red-deep); }
.hub-mov-det { white-space: normal; margin-top: 2px; }

/* ── Ficha plegable (dueño 2026-09-28) ────────────────────────────────
   Horizontal: la columna se reduce a una pestaña vertical y el hilo se
   queda con el ancho. Vertical: cada sección se pliega desde su título. */
.hub-ficha { padding: 0 !important; }
.hub-ficha-cuerpo { padding: 16px; overflow-y: auto; flex: 1; min-height: 0; }
.hub-ficha-plegar { display: flex; align-items: center; gap: 6px; width: 100%; border: 0; background: none;
                    font: inherit; font-size: 12px; color: var(--muted); cursor: pointer;
                    padding: 8px 12px; border-bottom: 1px solid var(--hairline); }
.hub-ficha-plegar:hover { color: var(--ink); }
.hub-ficha-plegar-icono { width: 14px; height: 14px; flex: none; position: relative; }
.hub-ficha-plegar-icono::before { content: ""; position: absolute; inset: 3px; border: 1.6px solid currentColor;
                                  border-radius: 3px; border-left-width: 5px; }
.hub[data-ficha="plegada"] { grid-template-columns: 330px minmax(0, 1fr) 40px; }
/* Animado: la grilla interpola el ancho de la columna y el contenido se
   desvanece (nada de display:none, que salta). */
.hub { transition: grid-template-columns .34s var(--ease); }
.hub-ficha-cuerpo { opacity: 1; transition: opacity .22s var(--ease) .12s; }
.hub[data-ficha="plegada"] .hub-ficha-cuerpo { opacity: 0; visibility: hidden; transition-delay: 0s; }
.hub[data-ficha="plegada"] .hub-ficha-plegar { flex-direction: column; height: 100%; padding: 12px 0;
                                              border-bottom: 0; justify-content: flex-start; }
.hub[data-ficha="plegada"] .hub-ficha-plegar-texto { writing-mode: vertical-rl; transform: rotate(180deg); letter-spacing: .04em; }
.hub-ficha-titulo { display: flex; align-items: center; justify-content: space-between; width: 100%;
                    border: 0; background: none; cursor: pointer; padding: 0; text-align: left; margin-bottom: 8px; }
.hub-ficha-titulo::after { content: ""; width: 7px; height: 7px; border-right: 1.6px solid currentColor;
                           border-bottom: 1.6px solid currentColor; transform: rotate(45deg); margin-right: 4px;
                           transition: transform .2s var(--ease); }
.hub-ficha-bloque.plegada .hub-ficha-titulo::after { transform: rotate(-45deg); }
/* Secciones: altura interpolada (Chrome ≥ 129 con interpolate-size) y
   desvanecido; en navegadores viejos cambia sin animar. */
.hub-ficha-contenido { interpolate-size: allow-keywords; height: auto; overflow: hidden; opacity: 1;
                       transition: height .26s var(--ease), opacity .2s var(--ease); }
.hub-ficha-bloque.plegada .hub-ficha-contenido { height: 0; opacity: 0; margin-top: 0; }
.hub-ficha-plegar-texto { transition: opacity .18s var(--ease); }
@media (prefers-reduced-motion: reduce) {
  .hub, .hub-ficha-cuerpo, .hub-ficha-contenido, .hub-ficha-titulo::after { transition: none; }
}
/* Celular: la ficha es un panel propio (botón "Ficha" del hilo), así que el
   estado 'plegada' del escritorio no aplica: el cuerpo se ve siempre.
   Dueño 2026-10-05: 'en mobile las fichas no cargan' — quedaban con
   opacity 0 y visibility hidden heredados del plegado. */
@media (max-width: 960px) { .hub-ficha-plegar { display: none; } .hub[data-ficha="plegada"] { grid-template-columns: 1fr; }
                            .hub[data-ficha="plegada"] .hub-ficha-cuerpo { display: block; opacity: 1; visibility: visible; } }

/* Adjuntos en el hilo (imágenes y PDF) — dueño 2026-09-29 */
.hub-adj-imagen { display: block; }
.hub-adj-imagen img { display: block; max-width: 100%; max-height: 320px; border-radius: 12px; }
.hub-adj-doc { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit;
               padding: 4px 2px; }
.hub-adj-doc-icono { flex: none; width: 40px; height: 48px; border-radius: 8px; display: grid; place-items: center;
                     background: rgba(244, 68, 46, .16); color: var(--red-deep); font-size: 11px; font-weight: 700; }
.hub-msg.out .hub-adj-doc-icono { background: rgba(255, 255, 255, .18); color: #fff; }
.hub-adj-doc-texto { display: flex; flex-direction: column; min-width: 0; }
.hub-adj-doc-texto b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-adj-doc-texto small { opacity: .7; font-size: 11.5px; }
.hub-adj-pendiente { font-size: 12.5px; opacity: .75; font-style: italic; }
.hub-burbuja-texto { margin-top: 6px; }
.hub-burbuja > .hub-burbuja-texto:first-child { margin-top: 0; }
.hub-adjunto-previa { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-soft);
                      padding: 6px 10px; border-radius: var(--r-sm); background: rgba(39, 39, 39, .05); }
[data-theme="dark"] .hub-adjunto-previa { background: rgba(255, 255, 255, .07); }
.hub-adjunto-previa-nombre { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Hilo: ancla de "Mensajes nuevos" y carga de anteriores por página */
.hub-nuevos { display: flex; align-items: center; gap: 10px; margin: 6px 0; font-size: 11.5px; font-weight: 600;
              letter-spacing: .04em; text-transform: uppercase; color: var(--red-deep); }
.hub-nuevos::before, .hub-nuevos::after { content: ""; flex: 1; border-top: 1px solid currentColor; opacity: .4; }
.hub-cargar-mas { display: flex; justify-content: center; margin-bottom: 6px; }

/* iPhone (dueño 2026-10-01): Safari hace zoom automático al enfocar
   cualquier campo con letra menor a 16px, y había que estar devolviendo
   el zoom con los dedos. En pantallas táctiles todos los campos del hub
   (respuesta, búsqueda, selectores, login, formularios) van a 16px; en
   escritorio se mantiene el tamaño del theme. */
@media (max-width: 960px), (pointer: coarse) {
  .hub-body .form-input, .hub-body textarea, .hub-body select, .hub-body input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  .hub-body .hub-sel, .hub-body .hub-boton-fila .form-input { font-size: 16px; }
}

/* Deslizar en la lista (dueño 2026-10-02): la tarjeta es OPACA y las
   acciones son capas debajo que se descubren con el dedo. Derecha =
   Resolver/Reabrir (verde); izquierda = Eliminar (rojo, admin). */
.hub-conv { position: relative; overflow: hidden; padding: 0; }
.hub-conv-cuerpo { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px;
                   align-items: start; position: relative; z-index: 1; padding: 10px;
                   border-radius: var(--r-sm); background: var(--hub-fila-bg);
                   transition: transform .24s var(--ease); will-change: transform; }
.hub-conv:hover .hub-conv-cuerpo { background: var(--hub-fila-bg-hover); }
.hub-conv.on .hub-conv-cuerpo { background: var(--hub-fila-bg-on); box-shadow: inset 0 0 0 1px var(--hairline); }
.hub-conv.deslizando .hub-conv-cuerpo { transition: none; }
.hub-conv.saliendo .hub-conv-cuerpo { transition: transform .22s ease-in; }
.hub-conv-fondo { position: absolute; top: 0; bottom: 0; width: 100%; display: none; align-items: center;
                  border: none; border-radius: var(--r-sm); color: #fff; font: inherit; font-weight: 600;
                  font-size: 13px; cursor: pointer; z-index: 0; padding: 0 18px; }
.hub-conv-fondo-der { left: 0; justify-content: flex-start; background: var(--green-deep); }
.hub-conv-fondo-der.reabrir { background: #3a6fd8; }
.hub-conv-fondo-izq { right: 0; justify-content: flex-end; background: var(--red-deep); }
.hub-conv.mostrando-der .hub-conv-fondo-der, .hub-conv.mostrando-izq .hub-conv-fondo-izq,
.hub-conv.abierta-eliminar .hub-conv-fondo-izq { display: flex; }
.hub-btn-peligro { color: var(--red-deep); }
.hub-btn-peligro-solido { background: var(--red-deep); border-color: var(--red-deep); }
@media (min-width: 961px) { .hub-conv-fondo { display: none !important; } }
/* Fondo opaco de la fila: mismo tono que el panel, para que la capa de
   abajo no se transparente. */
.hub-body { --hub-fila-bg: #f4f4f1; --hub-fila-bg-hover: #ebebe7; --hub-fila-bg-on: #e6e6e1; }
[data-theme="dark"] .hub-body { --hub-fila-bg: #1f1f1f; --hub-fila-bg-hover: #262626; --hub-fila-bg-on: #2b2b2b; }

/* Ventana extendida (Human Agent, IG/Messenger): ámbar, ni verde ni rojo. */
.badge.ventana-humano { background: rgba(244, 180, 46, .18); color: #8a5a00; }
[data-theme="dark"] .badge.ventana-humano { background: rgba(244, 180, 46, .22); color: #f4c766; }

.hub-ficha-volver { margin-bottom: 12px; }

/* Búsqueda: fragmento del mensaje con la coincidencia resaltada */
.hub-conv-coincidencia mark { background: rgba(255, 196, 0, .45); color: inherit; border-radius: 3px; padding: 0 1px; }

/* Acciones en lote (dueño 2026-10-21) */
.hub-lote { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 12px; margin: 0 0 8px;
            border: 1px solid var(--hairline); border-radius: var(--r-sm); background: var(--hub-fila-bg-hover, rgba(127,127,127,.08)); }
.hub-lote-todas { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.hub-lote-acciones { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-left: auto; }
.hub-conv-cuerpo.con-check { grid-template-columns: 22px 34px minmax(0, 1fr) auto; }
.hub-conv-check { width: 18px; height: 18px; margin: 0; align-self: center; cursor: pointer; }

/* Mejorar redacción (Gemini): botón con chispas y enlace "Deshacer" */
.hub-mejorar { display: inline-flex; align-items: center; gap: 6px; }
.hub-mejorar--pensando svg { animation: hub-chispas 0.9s ease-in-out infinite; }
@keyframes hub-chispas { 0%, 100% { transform: scale(1) rotate(0); opacity: 1; } 50% { transform: scale(1.18) rotate(12deg); opacity: 0.6; } }
.hub-deshacer { background: none; border: 0; padding: 0; font: inherit; color: var(--accent, #0b3027); text-decoration: underline; cursor: pointer; }
/* Destello mientras Gemini trabaja (dueño 2026-11-11): una franja de luz
   recorre el botón y un halo late alrededor, para que se note que está
   en curso. El botón queda deshabilitado pero NO se atenúa (el .45 de
   .btn:disabled lo dejaba casi invisible justo cuando hay que verlo). */
.hub-mejorar { position: relative; overflow: hidden; isolation: isolate; }
.hub-mejorar.hub-mejorar--pensando,
.hub-mejorar.hub-mejorar--pensando:disabled {
  opacity: 1; cursor: progress; color: var(--text, currentColor);
  background: color-mix(in srgb, currentColor 8%, transparent);
  animation: hub-halo 1.4s ease-in-out infinite;
}
.hub-mejorar--pensando::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%,
              color-mix(in srgb, currentColor 60%, transparent) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: hub-destello 1.1s cubic-bezier(.4, 0, .2, 1) infinite;
}
@keyframes hub-destello { to { transform: translateX(100%); } }
/* El mismo destello recorre el cuadro de texto que se está corrigiendo:
   en el teléfono el botón es solo un ícono y ahí es donde se mira. */
.hub-redactar textarea.hub-texto--mejorando {
  background-image: linear-gradient(105deg, transparent 35%,
                    color-mix(in srgb, var(--text, #888) 16%, transparent) 50%, transparent 65%);
  background-size: 250% 100%; background-repeat: no-repeat;
  animation: hub-destello-texto 1.2s linear infinite;
}
@keyframes hub-destello-texto { from { background-position: 130% 0; } to { background-position: -30% 0; } }
@keyframes hub-halo {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 0%, transparent); }
  50% { box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 22%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
  .hub-mejorar--pensando svg, .hub-mejorar.hub-mejorar--pensando { animation: none; }
  .hub-mejorar--pensando::after { animation: none; transform: none; opacity: .5; }
  .hub-redactar textarea.hub-texto--mejorando { animation: none; background-position: 50% 0; }
}

/* Redactor en pantallas angostas: el aviso ("Texto mejorado · Deshacer") va
   en su propia fila y los botones no se salen del borde */
@media (max-width: 640px) {
  .hub-redactar-acciones { flex-wrap: wrap; row-gap: 6px; }
  .hub-redactar-aviso { flex-basis: 100%; order: -1; }
  .hub-redactar-acciones .btn-small { padding-left: 10px; padding-right: 10px; }
  .hub-mejorar span { display: none; }
}

/* Estilo del corrector (Cuentas conectadas, admin) */
.hub-estilo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 10px; }
.hub-estilo-grupo { border: 1px solid var(--hairline, rgba(0,0,0,.08)); border-radius: 12px; padding: 10px 12px; margin: 0; display: grid; gap: 8px; }
.hub-estilo-grupo legend { font-size: 12px; font-weight: 600; color: var(--muted); padding: 0 4px; }
.hub-estilo-grupo label { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; cursor: pointer; }
.hub-estilo-grupo input { margin-top: 2px; flex: none; }
.hub-estilo-prueba { margin-top: 16px; display: grid; gap: 8px; }
/* Módulo del agente de IA: estado actual en una línea con un punto de color */
.hub-agente-estado { margin: 10px 0 0; font-size: 13.5px; display: flex; gap: 8px; align-items: baseline; }
.hub-agente-estado::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--muted, #888); transform: translateY(-1px); }
.hub-agente-estado[data-estado="encendido"]::before { background: #2e9e5b; }
.hub-agente-estado[data-estado="pausa"]::before { background: #d99a1c; }
/* Sin style en línea: la CSP del hub lo bloquea */
.hub-agente-guardar { margin-top: 10px; }
/* Textos de ayuda del módulo: como .hub-sub pero pueden ocupar varias
   líneas (.hub-sub es de una sola línea y en el teléfono ensanchaba la tarjeta) */
.hub-agente-ayuda { font-size: 12.5px; color: var(--muted); line-height: 1.4; white-space: normal; overflow-wrap: anywhere; }
#card-agente .hub-estilo-grupo { min-width: 0; }
#card-agente .hub-acciones { flex-wrap: wrap; }
/* .btn fija su display y le ganaba al atributo hidden */
#agente-reanudar[hidden] { display: none; }
/* Derivación, fuera de horario y ciudades (dueño 2026-11-16) */
.hub-agente-linea { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13.5px; }
.hub-estilo-grupo .hub-agente-corto { width: auto; min-width: 0; max-width: 118px; margin: 0; padding: 6px 10px; height: auto; flex: none; }
.hub-agente-titulo { font-size: 13.5px; font-weight: 600; }
.hub-agente-ciudades { display: grid; gap: 12px; }
.hub-agente-ciudad { border: 1px solid var(--hairline, rgba(0,0,0,.08)); border-radius: 12px; padding: 10px 12px; display: grid; gap: 8px; }
.hub-agente-ciudad-cab { display: flex; gap: 8px; align-items: center; }
.hub-agente-ciudad-cab .form-input { flex: 1; min-width: 0; }
.hub-agente-cuentas { display: grid; gap: 8px; }
.hub-agente-cuenta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; font-size: 13.5px; }
.hub-agente-cuenta select { width: auto; min-width: 180px; }
/* Imágenes que el agente puede enviar (dueño 2026-11-16) */
.hub-agente-imagenes { display: grid; gap: 8px; }
.hub-agente-imagen { display: flex; gap: 12px; align-items: center; border: 1px solid var(--hairline, rgba(0,0,0,.08)); border-radius: 12px; padding: 8px 12px; }
.hub-agente-imagen img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; flex: none; background: rgba(0,0,0,.05); }
.hub-agente-imagen-datos { display: grid; gap: 2px; flex: 1; min-width: 0; font-size: 13.5px; overflow-wrap: anywhere; }
.hub-agente-subir { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hub-agente-subir input[type="file"] { flex: 1; min-width: 220px; }
.hub-agente-subir select { width: auto; min-width: 180px; }
.hub-agente-fecha { width: auto; }
.hub-agente-avisos { display: grid; gap: 4px; }
.hub-agente-aviso { margin: 0; font-size: 13px; color: var(--danger, #b3261e); }
#agente-cuentas-bloque[hidden] { display: none; }
.hub-estilo-resultado { background: var(--surface-2, rgba(0,0,0,.04)); border-radius: 12px; padding: 12px 14px; font-size: 14px; white-space: pre-wrap; }

/* ── Transición entre módulos (dueño 2026-11-11: "salta en vez de ser
   transiciones suaves") ───────────────────────────────────────────────
   El hub es de varias páginas: cada clic del menú navega. Con las View
   Transitions entre documentos el panel lateral y la barra se quedan en su
   lugar (tienen nombre propio) y solo el contenido se funde. Los
   navegadores sin soporte navegan como antes. */
@view-transition { navigation: auto; }
.gside { view-transition-name: hub-lateral; }
.hub-body #glass-top.gtop { view-transition-name: hub-barra; }
.hub-body main.page { view-transition-name: hub-pagina; }
::view-transition-old(hub-pagina) { animation: hub-vt-sale .14s ease-in both; }
::view-transition-new(hub-pagina) { animation: hub-vt-entra .26s var(--ease, ease-out) both; }
::view-transition-group(hub-lateral), ::view-transition-group(hub-barra) { animation-duration: .26s; }
@keyframes hub-vt-sale { to { opacity: 0; } }
@keyframes hub-vt-entra { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ── Esqueletos de carga (norma: todo lo que carga, con skeleton) ────── */
:root { --hub-esq-a: rgba(39, 39, 39, .07); --hub-esq-b: rgba(39, 39, 39, .14); }
[data-theme="dark"] { --hub-esq-a: rgba(255, 255, 255, .06); --hub-esq-b: rgba(255, 255, 255, .13); }
.hub-esq { display: block; height: 12px; max-width: 100%; border-radius: 7px;
  background: linear-gradient(90deg, var(--hub-esq-a) 25%, var(--hub-esq-b) 50%, var(--hub-esq-a) 75%);
  background-size: 200% 100%; animation: hub-esq 1.8s ease-in-out infinite; }
.hub-esq.redondo { border-radius: 50%; }
@keyframes hub-esq { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.hub-conv-esq { pointer-events: none; }
.hub-conv-esq .hub-conv-cuerpo { align-items: center; }
.hub-esq-pila { display: grid; gap: 8px; min-width: 0; }
.hub-msg-esq .hub-esq { border-radius: 16px; }
.hub-fila-esq td { padding-top: 14px; padding-bottom: 14px; }
/* Mientras llega la conversación: cabecera y redactor atenuados y sin uso */
.hub-hilo-todo.cargando .hub-hilo-acciones,
.hub-hilo-todo.cargando .hub-redactar,
.hub-hilo-todo.cargando .hub-baja { opacity: .35; pointer-events: none; transition: opacity .15s; }
/* Entrada del contenido que reemplaza al esqueleto */
.hub-aparece { animation: hub-aparece .28s var(--ease, ease-out) both; }
@keyframes hub-aparece { from { opacity: 0; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) {
  .hub-esq, .hub-aparece { animation: none; }
}

/* ── Actividad reciente (Usuarios): cabecera con filtros y pie ───────── */
.hub-actividad-cab { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.hub-actividad-cab .csub { margin: 2px 0 0; }
.hub-actividad-filtros { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hub-actividad-filtros .form-input { width: auto; min-width: 180px; }
.hub-segmento { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--hub-esq-a); }
.hub-segmento button { border: 0; background: none; font: inherit; font-size: 13px; color: var(--muted);
  padding: 6px 14px; border-radius: 999px; cursor: pointer; transition: background .2s var(--ease), color .2s var(--ease); }
.hub-segmento button.on { background: var(--ink); color: var(--canvas); font-weight: 600; }
.hub-actividad-pie { display: flex; justify-content: center; padding-top: 12px; }
