/* ============================================================================
   mb-gadmin.css — Herramientas para administradores de grupos.
   ----------------------------------------------------------------------------
   Solo lo MÍNIMO que no existe en el design system del app:
   sub-etiquetas de los ítems del panel lateral, insignia de conteo, sección
   plegable y filas de los paneles. Todo lo demás (ítems del panel, tarjetas,
   botones, inputs, tipografía) reutiliza las clases y variables CSS que ya
   tiene MusicBook (--card, --border, --muted, --primary, ...), igual que
   mb-gds-* de mb-fbprofile.css.
   Incluye la VISTA del Asistente administrativo, que se abre EN LA MISMA
   VENTANA DEL GRUPO (no es un modal) con botón "← Atrás".
   ========================================================================== */

/* ---- Ítems del panel lateral con subtítulo (como "4 acciones, 6 criterios") ---- */
.mb-ga-it2 { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 auto; }
.mb-ga-it2 .mb-ga-lb { font-size: 15px; font-weight: 600; line-height: 1.25; }
.mb-ga-it2 .mb-ga-sub { font-size: 12px; font-weight: 400; color: var(--muted-foreground); margin-top: 1px; }

/* ---- Insignia de conteo (mismo lenguaje que las insignias del app) ---- */
.mb-ga-badge {
  margin-left: auto; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px;
  background: var(--primary); color: var(--primary-foreground);
  font-size: 12px; font-weight: 700; line-height: 1;
}

/* ---- Cabecera plegable de la sección de herramientas ---- */
.mb-ga-sec {
  display: flex; align-items: center; gap: 6px; width: 100%;
  border: 0; background: transparent; cursor: pointer; text-align: left;
  padding: 8px 8px 4px;
  font-size: 13px; font-weight: 700; color: var(--muted-foreground);
}
.mb-ga-sec:hover { color: var(--foreground); }
.mb-ga-sec svg { transition: transform .18s ease; flex: 0 0 auto; }
.mb-ga-sec.closed svg { transform: rotate(-90deg); }
.mb-ga-tools { display: block; }
.mb-ga-tools.closed { display: none; }

/* ---- Paneles (van dentro de una tarjeta del app: rounded-2xl border bg-card) ---- */
.mb-ga-panel { display: flex; flex-direction: column; gap: 14px; }
.mb-ga-msg { font-size: 13px; color: var(--muted-foreground); min-height: 18px; }
.mb-ga-msg.ok { color: #059669; }
.mb-ga-msg.err { color: var(--destructive, #dc2626); }

/* Mini-tarjetas de estadísticas del Resumen (mismo lenguaje que las tarjetas del app) */
.mb-ga-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.mb-ga-stat {
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--background); padding: 10px 12px;
  display: flex; flex-direction: column; gap: 2px;
}
.mb-ga-stat b { font-size: 20px; font-weight: 700; line-height: 1.1; }
.mb-ga-stat span { font-size: 12px; color: var(--muted-foreground); }

/* Filas de listas (pendientes, spam, reportes, actividad, roles, programadas) */
.mb-ga-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--background);
}
.mb-ga-av {
  width: 40px; height: 40px; border-radius: 999px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #7c3aed, #f43f5e); color: #fff;
  font-weight: 600; font-size: 15px; overflow: hidden;
}
.mb-ga-av img { width: 100%; height: 100%; object-fit: cover; }
.mb-ga-tx { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 3px; }
.mb-ga-n { font-size: 14px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.mb-ga-s { font-size: 12px; color: var(--muted-foreground); line-height: 1.35; overflow-wrap: anywhere; }
.mb-ga-acts { display: flex; gap: 8px; flex-wrap: wrap; flex: 0 0 auto; align-items: center; }
.mb-ga-empty { padding: 14px 2px; font-size: 14px; color: var(--muted-foreground); }

/* Filas de datos (Estado del grupo, reglas, configuración) */
.mb-ga-kv { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 6px 2px; }
.mb-ga-kv > span:first-child { font-size: 13px; color: var(--muted-foreground); flex: 0 0 auto; }
.mb-ga-kv > span:last-child { font-size: 14px; font-weight: 600; text-align: right; overflow-wrap: anywhere; }

/* Chips de activación (asistente: criterios y acciones) — mismo patrón visual
   de los chips seleccionables que ya usa el app (borde, píldora, estado on) */
.mb-ga-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mb-ga-chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--background); color: inherit;
  padding: 6px 12px; font-size: 13px; font-weight: 600;
  cursor: pointer;
}
.mb-ga-chip:hover { background: var(--muted); }
.mb-ga-chip.on { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }

/* Bloque de agrupación dentro de los paneles */
.mb-ga-block {
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--background); padding: 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.mb-ga-block > p:first-child { font-size: 13px; font-weight: 700; color: var(--muted-foreground); }

/* Timeline del registro de actividad */
.mb-ga-tl { display: flex; flex-direction: column; }
.mb-ga-tlrow { display: flex; gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--border); }
.mb-ga-tlrow:last-child { border-bottom: 0; }
.mb-ga-tlic { width: 30px; height: 30px; border-radius: 999px; flex: 0 0 auto; display: grid; place-items: center; background: var(--muted); color: var(--muted-foreground); }
.mb-ga-tlic svg { width: 15px; height: 15px; }

/* Botones de los paneles: se usan las clases de botón del app (shadcn).
   Variantes reutilizadas tal cual las usa MusicBook: */
.mb-ga-btn { /* primario (mismo estilo que "Guardar cambios" del app) */
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; padding: 8px 16px; font-size: 14px; font-weight: 500;
  background: var(--primary); color: var(--primary-foreground);
  border: 1px solid transparent; cursor: pointer;
}
.mb-ga-btn:hover { background: var(--primary); opacity: .9; }
.mb-ga-btn:disabled { opacity: .5; cursor: default; }
.mb-ga-btn.sec { /* outline (mismo estilo que "Compartir" del app) */
  background: var(--background); color: inherit; border: 1px solid var(--border);
}
.mb-ga-btn.sec:hover { background: var(--muted); opacity: 1; }
.mb-ga-btn.danger { background: var(--destructive, #dc2626); color: #fff; }
.mb-ga-btn.sm { padding: 5px 12px; font-size: 13px; }

/* Inputs de los paneles (misma clase que usa el app en sus formularios) */
.mb-ga-in {
  width: 100%; border: 1px solid var(--border); border-radius: 8px;
  background: var(--background); color: inherit;
  padding: 8px 12px; font-size: 14px; font-family: inherit;
}
.mb-ga-in:focus { outline: 2px solid var(--ring, var(--primary)); outline-offset: -1px; }
textarea.mb-ga-in { resize: vertical; min-height: 74px; }

/* Scroll de listas largas dentro de los paneles */
.mb-ga-list { max-height: 420px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 2px; }

/* ============================================================================
   VISTA del Asistente administrativo — EN LA MISMA VENTANA DEL GRUPO (no es
   un modal). Mientras está abierta, el contenido de la columna principal del
   grupo queda oculto y en su lugar se muestra el botón "← Atrás" (misma
   posición y mismo botón outline redondeado del app que "← Grupos") seguido
   de las tarjetas del asistente. El panel lateral y la barra del header no
   se tocan. Cada bloque se ve como una tarjeta del app (rounded-2xl border
   bg-card p-4), reutilizando las variables que ya tiene MusicBook.
   ========================================================================== */

/* Oculta el contenido del grupo mientras la vista del asistente está abierta */
.mb-ga-inline > *:not(.mb-ga-vw) { display: none !important; }

/* La vista ocupa la columna principal del grupo (mismo espaciado space-y-3) */
.mb-ga-vw { display: flex; flex-direction: column; gap: 12px; }

/* Cuerpo de la vista: scroll natural de la página (ya no es un modal) */
.mb-ga-vbody { display: flex; flex-direction: column; gap: 12px; }

/* Cada bloque del asistente pasa a ser una tarjeta del app
   (rounded-2xl border bg-card p-4, el mismo lenguaje de las tarjetas del grupo) */
.mb-ga-vw .mb-ga-block { background: var(--card); border-radius: 16px; padding: 16px; }

/* En móvil el app oculta .mb-gback (usa la portada propia del móvil): la vista
   del asistente mantiene visible su botón "← Atrás" para poder volver al grupo */
@media (max-width: 767px) {
  .mb-ga-vw .mb-gback { display: block !important; }
}

/* ---- Hero (captura 1: icono del asistente + título + descripción + reloj) ---- */
.mb-ga-hero-t { display: flex; align-items: center; gap: 12px; }
.mb-ga-hero-ic {
  width: 48px; height: 48px; border-radius: 999px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #7c3aed, #f43f5e); color: #fff; /* mismo gradiente de .mb-ga-av */
}
.mb-ga-hero-ic svg { width: 26px; height: 26px; }
.mb-ga-hero-tx { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 3px; }
.mb-ga-hero-tt { font-size: 17px; font-weight: 700; line-height: 1.2; }
.mb-ga-micon {
  width: 32px; height: 32px; border-radius: 999px; flex: 0 0 auto;
  border: 0; background: var(--muted); color: var(--muted-foreground);
  display: grid; place-items: center; cursor: pointer; padding: 0;
}
.mb-ga-micon:hover { color: var(--foreground); }
.mb-ga-micon svg { width: 16px; height: 16px; }
.mb-ga-link {
  border: 0; background: none; color: var(--primary);
  font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; padding: 0; text-align: left; align-self: flex-start;
}
.mb-ga-link:hover { text-decoration: underline; }
.mb-ga-howto {
  display: flex; flex-direction: column; gap: 8px;
  font-size: 13px; color: var(--muted-foreground);
  border-top: 1px solid var(--border); padding-top: 10px;
}
.mb-ga-howto p { line-height: 1.45; }

/* ---- Cabecera de bloque con icono + título + chevron plegable ---- */
.mb-ga-bhead { display: flex; align-items: center; gap: 8px; }
.mb-ga-bhead p { flex: 1 1 auto; min-width: 0; }
.mb-ga-bic { color: var(--primary); display: grid; place-items: center; flex: 0 0 auto; }
.mb-ga-chev {
  border: 0; background: none; color: var(--muted-foreground);
  cursor: pointer; display: grid; place-items: center; padding: 4px; flex: 0 0 auto;
}
.mb-ga-chev svg { transition: transform .18s ease; }
.mb-ga-card.closed .mb-ga-chev svg { transform: rotate(-90deg); }
.mb-ga-card.closed .mb-ga-cbody { display: none; }
.mb-ga-cbody { display: flex; flex-direction: column; gap: 10px; }

/* ---- Filas de acción con botón "Agregar" (capturas 1-3) ---- */
.mb-ga-crow { display: flex; align-items: center; gap: 10px; }
.mb-ga-crow > span { flex: 1 1 auto; min-width: 0; font-size: 14px; line-height: 1.35; }
.mb-ga-crow .mb-ga-btn { flex: 0 0 auto; }

/* ---- Píldoras de valores (mismo lenguaje de píldora que los chips) ---- */
.mb-ga-pill {
  display: inline-flex; align-items: center;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--background);
  padding: 1px 10px; font-weight: 600; font-size: 13px;
  color: var(--primary);
}

/* ---- Cajas de reglas (interior suave, como las cajas internas del app) ---- */
.mb-ga-rlist { display: flex; flex-direction: column; gap: 8px; }
.mb-ga-rulebox {
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--muted); padding: 10px 12px;
  display: flex; flex-direction: column; gap: 6px;
}
.mb-ga-rulebox.off { opacity: .55; }
.mb-ga-rtx { font-size: 14px; line-height: 1.5; }
.mb-ga-rtx b { font-weight: 600; }
.mb-ga-itxt { font-size: 14px; font-style: italic; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.mb-ga-racts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---- Formularios de la ventana (mismo lenguaje de inputs de los paneles) ---- */
.mb-ga-fline { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14px; line-height: 1.5; }
.mb-ga-nin {
  width: 64px; text-align: center;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--background); color: inherit;
  padding: 6px 8px; font: inherit; font-size: 14px;
}
.mb-ga-nin:focus { outline: 2px solid var(--ring, var(--primary)); outline-offset: -1px; }
select.mb-ga-in { width: auto; }
.mb-ga-fbtns { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- Pestañas Hoy / Ayer y chips chicos ---- */
.mb-ga-tabs { display: flex; gap: 8px; }
.mb-ga-chip.sm { padding: 4px 10px; font-size: 13px; }

/* ---- Título de la sección de criterios (captura 1) ---- */
.mb-ga-sec-t { display: flex; flex-direction: column; gap: 2px; padding-top: 2px; }
.mb-ga-sec-t > p:first-child { font-size: 15px; font-weight: 700; }

/* ============================================================================
   VISTAS de las herramientas (Publicaciones pendientes, Publicaciones
   programadas, Reglas del grupo, Contenido reportado por miembros y Alertas
   de moderación) — EN LA MISMA VENTANA DEL GRUPO, con el mismo botón
   "← Atrás" que la vista del asistente. Reutilizan las tarjetas, filas,
   chips, botones e iconos que ya tiene el app (variables CSS de MusicBook).
   ========================================================================== */

/* Encabezado de la vista: tarjeta con título + info (como en las capturas) */
.mb-ga-vhead { display: flex; flex-direction: column; gap: 10px; }
.mb-ga-vhead-t { display: flex; align-items: center; gap: 8px; }
.mb-ga-vhead-tt { flex: 1 1 auto; min-width: 0; font-size: 18px; font-weight: 700; line-height: 1.25; margin: 0; }

/* Estado vacío centrado (capturas: icono + título + descripción + botón) */
.mb-ga-vempty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 36px 16px; }
.mb-ga-vempty-ic { width: 64px; height: 64px; border-radius: 999px; display: grid; place-items: center; background: var(--muted); color: var(--muted-foreground); }
.mb-ga-vempty-ic svg { width: 30px; height: 30px; }
.mb-ga-vempty-t { font-size: 16px; font-weight: 700; margin: 0; }
.mb-ga-vempty p { font-size: 13px; color: var(--muted-foreground); max-width: 460px; line-height: 1.5; margin: 0; }

/* Fila de filtros (captura: "Más recientes ▼" · "Todos ▼") */
.mb-ga-vfilt { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Select con forma de píldora (mismo lenguaje de los chips del app) */
.mb-ga-selwrap { position: relative; display: inline-flex; align-items: center; }
.mb-ga-sel {
  appearance: none; -webkit-appearance: none;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--background); color: inherit;
  padding: 6px 32px 6px 14px;
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.mb-ga-sel:focus { outline: 2px solid var(--ring, var(--primary)); outline-offset: -1px; }
.mb-ga-selwrap > svg { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--muted-foreground); }

/* Pestañas de la vista de alertas (se pliegan en pantallas angostas) */
.mb-ga-vw .mb-ga-tabs { flex-wrap: wrap; }

/* ============================================================================
   VISTA REGISTRO DE ACTIVIDAD — botonera de píldoras estilo Facebook
   (capturas): "Borrar filtros" · "Seleccionar fechas ▾" (calendario) ·
   "Administradores y moderadores ▾" · "Miembros ▾" (selectores de persona) ·
   "Más filtros" (submenús + interruptores). Cada popover es una tarjeta
   redondeada anclada debajo de su botón. La lista es una tarjeta por entrada:
   fecha en negrita + icono + texto + marca de tiempo en gris.
   ========================================================================== */

/* ---- Botonera: píldoras grises (mismo lenguaje de los chips del app) ---- */
.mb-ga-fbar { position: relative; }
.mb-ga-fwrap { position: relative; display: inline-flex; }
.mb-ga-fbtn {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--muted); color: inherit;
  padding: 7px 14px; font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; max-width: 100%;
}
.mb-ga-fbtn:hover { background: color-mix(in srgb, var(--muted) 88%, var(--foreground) 12%); }
.mb-ga-fbtn.on { background: color-mix(in srgb, var(--primary) 14%, var(--muted)); }
.mb-ga-fbtn > svg { flex: 0 0 auto; color: var(--muted-foreground); }
.mb-ga-fbtn-t {
  min-width: 0; max-width: 200px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
/* "Borrar filtros" atenuado cuando no hay filtros (como en las capturas) */
.mb-ga-fbtn:disabled, .mb-ga-fbtn.off {
  background: var(--muted); color: var(--muted-foreground);
  cursor: default; opacity: .75;
}
.mb-ga-fbtn:disabled:hover, .mb-ga-fbtn.off:hover { background: var(--muted); }

/* ---- Popover anclado debajo de la píldora (tarjeta del app) ---- */
.mb-ga-fpop {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 40;
  width: 300px; max-width: min(300px, calc(100vw - 40px));
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .25);
  padding: 8px; display: flex; flex-direction: column; gap: 6px;
  text-align: left;
}
.mb-ga-fwrap.more .mb-ga-fpop { left: auto; right: 0; }
.mb-ga-fpop-t { font-size: 15px; font-weight: 700; margin: 2px 4px 4px; }
.mb-ga-fpop-hr { border-top: 1px solid var(--border); margin: 2px 4px; }
.mb-ga-fpl-g { font-size: 13px; color: var(--muted-foreground); padding: 8px 10px; margin: 0; }

/* Buscador del popover (capturas: lupa + "Buscar miembros") */
.mb-ga-fsearch { position: relative; }
.mb-ga-fsearch > svg {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--muted-foreground); pointer-events: none;
}
.mb-ga-fsq {
  width: 100%; border: 1px solid var(--border); border-radius: 999px;
  background: var(--background); color: inherit;
  padding: 8px 12px 8px 32px; font: inherit; font-size: 13px;
}
.mb-ga-fsq:focus { outline: 2px solid var(--ring, var(--primary)); outline-offset: -1px; }

/* Filas del popover: persona (avatar + nombre + tilde) y filas de menú */
.mb-ga-fpl {
  max-height: 320px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 1px; padding-right: 2px;
}
.mb-ga-fpi, .mb-ga-fmi {
  display: flex; align-items: center; gap: 10px; width: 100%;
  text-align: left; border: 0; background: none; color: inherit;
  padding: 7px 10px; border-radius: 8px; cursor: pointer; font: inherit;
}
.mb-ga-fpi:hover, .mb-ga-fmi:hover { background: var(--muted); }
.mb-ga-fpi.on { background: color-mix(in srgb, var(--primary) 12%, transparent); }
.mb-ga-fpi.on:hover { background: color-mix(in srgb, var(--primary) 16%, transparent); }
.mb-ga-fpav {
  width: 36px; height: 36px; border-radius: 999px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #7c3aed, #f43f5e); color: #fff;
  font-weight: 600; font-size: 14px; overflow: hidden;
}
.mb-ga-fpav img { width: 100%; height: 100%; object-fit: cover; }
.mb-ga-fpic { background: var(--muted); color: var(--muted-foreground); }
.mb-ga-fpic svg { width: 17px; height: 17px; }
.mb-ga-fpin {
  min-width: 0; flex: 1 1 auto; font-size: 14px; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mb-ga-fpck { flex: 0 0 auto; color: var(--primary); display: grid; place-items: center; }

/* Filas del menú "Más filtros": chevron a la derecha (captura 5) */
.mb-ga-fmi > svg { flex: 0 0 auto; color: var(--muted-foreground); }
.mb-ga-fmi.on > .mb-ga-fpin { color: var(--primary); font-weight: 600; }

/* Submenús: encabezado con botón ‹ y título (como en Facebook) */
.mb-ga-fback { display: flex; align-items: center; gap: 4px; margin: 0 -2px; }
.mb-ga-fback-b {
  width: 32px; height: 32px; border-radius: 999px; flex: 0 0 auto;
  border: 0; background: var(--muted); color: var(--muted-foreground);
  display: grid; place-items: center; cursor: pointer; padding: 0;
}
.mb-ga-fback-b:hover { color: var(--foreground); background: var(--muted); }
.mb-ga-fback .mb-ga-fpop-t { margin: 0; flex: 1 1 auto; }

/* Casillas del submenú "Tipo de actividad" / "Acción de moderación" */
.mb-ga-fck {
  width: 20px; height: 20px; border-radius: 6px; flex: 0 0 auto;
  border: 1.5px solid var(--border); display: grid; place-items: center;
  color: #fff; background: transparent;
}
.mb-ga-fck.on { background: var(--primary); border-color: var(--primary); }
.mb-ga-fck svg { width: 13px; height: 13px; }

/* Interruptores del menú "Más filtros" ("Con nota" / "Asistente") */
.mb-ga-fsw {
  width: 38px; height: 22px; border-radius: 999px; flex: 0 0 auto;
  background: var(--muted); border: 1px solid var(--border);
  position: relative; transition: background .15s ease, border-color .15s ease;
}
.mb-ga-fswk {
  position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 999px;
  background: var(--background); box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
  transition: transform .15s ease;
}
.mb-ga-fsw.on { background: var(--primary); border-color: var(--primary); }
.mb-ga-fsw.on .mb-ga-fswk { transform: translateX(16px); }

/* ---- Calendario de "Seleccionar fechas" (captura 4) ---- */
.mb-ga-calpop { width: 312px; max-width: min(312px, calc(100vw - 40px)); padding: 10px; gap: 4px; }
.mb-ga-cal-h { display: flex; align-items: center; gap: 4px; }
.mb-ga-cal-nav {
  width: 34px; height: 34px; border-radius: 999px; flex: 0 0 auto;
  border: 0; background: var(--muted); color: var(--muted-foreground);
  display: grid; place-items: center; cursor: pointer; padding: 0;
}
.mb-ga-cal-nav:hover { color: var(--foreground); }
.mb-ga-cal-m {
  flex: 1 1 auto; text-align: center;
  border: 1px solid var(--border); border-radius: 8px;
  padding: 7px 4px; font-size: 14px; font-weight: 700;
}
.mb-ga-cal-wds, .mb-ga-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.mb-ga-cal-wd {
  text-align: center; font-size: 11px; font-weight: 600;
  color: var(--muted-foreground); padding: 4px 0 6px;
}
.mb-ga-cal-d {
  height: 36px; border: 0; background: none; color: inherit;
  border-radius: 8px; font: inherit; font-size: 13px; cursor: pointer;
  display: grid; place-items: center; position: relative;
}
.mb-ga-cal-d:hover { background: var(--muted); }
.mb-ga-cal-d.out { color: var(--muted-foreground); opacity: .55; }
.mb-ga-cal-d.today::after {
  content: ""; position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 999px; background: var(--primary);
}
.mb-ga-cal-d.sel { background: var(--primary); color: var(--primary-foreground); font-weight: 700; }
.mb-ga-cal-d.sel:hover { background: var(--primary); }
.mb-ga-cal-d.sel.a { border-radius: 999px; }
.mb-ga-cal-d.sel.s { border-radius: 999px 6px 6px 999px; }
.mb-ga-cal-d.sel.e { border-radius: 6px 999px 999px 6px; }
.mb-ga-cal-d.range { background: color-mix(in srgb, var(--primary) 16%, transparent); border-radius: 6px; }
.mb-ga-cal-d.range:hover { background: color-mix(in srgb, var(--primary) 24%, transparent); }
.mb-ga-cal-f {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--border); padding-top: 8px; margin-top: 4px;
}
.mb-ga-cal-ok {
  border: 0; border-radius: 8px; padding: 7px 14px;
  font: inherit; font-size: 13px; font-weight: 600;
  background: var(--muted); color: inherit; cursor: pointer;
}
.mb-ga-cal-ok:hover { background: color-mix(in srgb, var(--muted) 85%, var(--foreground) 15%); }
.mb-ga-cal-ok.off { opacity: .55; cursor: default; }

/* ---- Entradas del registro (capturas: una tarjeta por entrada con la fecha
   en negrita arriba, el icono + texto y la marca de tiempo en gris) ---- */
.mb-ga-actcard { gap: 8px; padding: 12px 14px; }
.mb-ga-actcard .mb-ga-actday {
  font-size: 15px; font-weight: 700; color: var(--foreground);
  padding: 0; margin: 0; border-bottom: 0;
}
.mb-ga-actcard .mb-ga-tlrow { padding: 0; border-bottom: 0; }
.mb-ga-tlic.ai {
  background: linear-gradient(135deg, #9333ea, #db2777); color: #fff;
}

/* Editor de reglas dentro de la vista: tarjetas apiladas con aire */
#mb-ga-rules-list { display: flex; flex-direction: column; gap: 10px; }

/* ============================================================================
   VISTA POSIBLE SPAM — feed de tarjetas de publicación (una arriba de otra,
   como el feed del grupo). Reutiliza el lenguaje de los posts del app
   (mb-gf-* de mb-gfeat.css): fila de autor con avatar + nombre + fecha ·
   globo, texto con "Ver más", foto a lo ancho y fila de acciones. El menú de
   tres puntos replica los ítems del app: icono circular + título + descripción.
   ========================================================================== */

/* Búsqueda "Buscar por nombre" + botón "Filtro ▾" del encabezado (captura) */
.mb-ga-vsearch { position: relative; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mb-ga-vsearch > svg {
  position: absolute; left: 12px; top: 15px;
  width: 16px; height: 16px; color: var(--muted-foreground); pointer-events: none;
}
.mb-ga-vsearch .mb-ga-in { flex: 1 1 200px; min-width: 0; border-radius: 999px; padding-left: 36px; }

/* El feed: tarjetas apiladas una arriba de otra (mismo espaciado del feed) */
.mb-ga-feed { display: flex; flex-direction: column; gap: 12px; }

/* Tarjeta de publicación de la cola (la base es .mb-ga-block = tarjeta del app) */
.mb-ga-pcard { position: relative; }

/* Píldora del motivo: "Asistente: Palabras de spam" / "Reportada por …" */
.mb-ga-preason {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--muted); color: var(--muted-foreground);
  padding: 3px 10px; font-size: 12px; font-weight: 600; line-height: 1.4;
}
.mb-ga-preason svg { width: 13px; height: 13px; flex: 0 0 auto; }
.mb-ga-preason.rep { color: #b45309; border-color: color-mix(in srgb, #b45309 35%, var(--border)); background: color-mix(in srgb, #b45309 10%, var(--muted)); }
.dark .mb-ga-preason.rep { color: #fbbf24; }

/* Fila de autor (patrón del header de post del app) */
.mb-ga-phead { display: flex; gap: 10px; align-items: center; }
.mb-ga-ptx { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
.mb-ga-pnm { font-size: 15px; font-weight: 700; margin: 0; line-height: 1.25; }
.mb-ga-pmeta {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--muted-foreground); margin: 0;
}
.mb-ga-pmeta svg { width: 12px; height: 12px; flex: 0 0 auto; }

/* Texto de la publicación (patrón del post del app) con "Ver más" */
.mb-ga-ptxt {
  font-size: 15px; line-height: 21px; margin: 0;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.mb-ga-ptxt.clamp {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6;
  overflow: hidden;
}
.mb-ga-pmore { margin-top: 2px; }

/* Media (img / video / grid de fotos, mismo patrón del app) */
.mb-ga-pmedia img, .mb-ga-pmedia video {
  display: block; width: 100%; max-height: min(52vh, 400px);
  object-fit: cover; background: #000; border-radius: 10px;
}
.mb-ga-pmgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.mb-ga-pmgrid .mb-ga-pmc { position: relative; }
.mb-ga-pmgrid .mb-ga-pmc img { height: 100%; }

/* Fila de acciones (captura: "Publicar" y "Rechazar" anchos + botón ···) */
.mb-ga-pacts {
  display: flex; gap: 8px; align-items: center;
  border-top: 1px solid var(--border); padding-top: 10px;
}
.mb-ga-pacts .mb-ga-btn { flex: 1 1 0; min-width: 0; }
.mb-ga-pdots {
  width: 36px; height: 36px; border-radius: 999px; flex: 0 0 auto;
  border: 0; background: var(--muted); color: var(--muted-foreground);
  display: grid; place-items: center; cursor: pointer; padding: 0;
}
.mb-ga-pdots:hover { color: var(--foreground); }
.mb-ga-pdots svg { width: 18px; height: 18px; }
.mb-ga-pdots.on { background: color-mix(in srgb, var(--primary) 16%, var(--muted)); color: var(--primary); }

/* Menú de tres puntos (captura 3: ítems con icono circular + título + desc) */
.mb-ga-pmenu {
  position: absolute; right: 12px; bottom: 58px; z-index: 30;
  min-width: 300px; max-width: min(370px, calc(100% - 24px));
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .25);
  padding: 6px; display: flex; flex-direction: column; gap: 2px;
}
.mb-ga-pmi {
  display: flex; gap: 10px; align-items: flex-start; width: 100%;
  text-align: left; border: 0; background: none; color: inherit;
  padding: 8px 10px; border-radius: 8px; cursor: pointer; font: inherit;
}
.mb-ga-pmi:hover { background: var(--muted); }
.mb-ga-pmi-ic {
  width: 34px; height: 34px; border-radius: 999px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: var(--muted); color: var(--muted-foreground);
}
.mb-ga-pmi-ic svg { width: 17px; height: 17px; }
.mb-ga-pmi-ic.red { background: rgba(220, 38, 38, .12); color: #dc2626; }
.mb-ga-pmi-tx { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
.mb-ga-pmi b { font-size: 14px; font-weight: 600; line-height: 1.3; }
.mb-ga-pmi span { font-size: 12px; color: var(--muted-foreground); line-height: 1.4; }

/* Formulario "Rechazar publicación y enviar comentarios" (opcional) */
.mb-ga-pfb {
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--muted); padding: 10px;
  display: flex; flex-direction: column; gap: 8px;
}
.mb-ga-pfb p { font-size: 13px; font-weight: 600; margin: 0; }

/* En móvil el menú ··· se ancla al borde derecho de la tarjeta y los popover
   del Registro de actividad se ajustan al ancho de la pantalla */
@media (max-width: 767px) {
  .mb-ga-pmenu { right: 8px; left: 8px; max-width: none; min-width: 0; }
  .mb-ga-vsearch > svg { top: 13px; }
  .mb-ga-fbtn { padding: 7px 12px; }
  .mb-ga-fbtn-t { max-width: 140px; }
  .mb-ga-fpop { width: min(300px, calc(100vw - 48px)); }
  .mb-ga-fwrap.more .mb-ga-fpop { left: auto; right: 0; }
  .mb-ga-calpop { width: min(312px, calc(100vw - 48px)); }
}

/* ============================================================================
   VISTA ESTADO DEL GRUPO — diseño de la captura: dos columnas dentro de la
   columna principal (la principal con la salud del grupo + "Más información"
   con el carrusel de las Normas comunitarias; la derecha con "Estado de la
   cuenta", "Administrar grupo" y "Danos tu opinión"). En pantallas angostas
   la columna derecha se apila debajo de la principal.
   ========================================================================== */

/* Moderadores: oculta los botones de gestión (cambiar la configuración del
   grupo es de administradores — el backend también lo corta con adminGate) */
.mb-ga-mod .mb-ga-mng { display: none !important; }

/* Grilla de dos columnas (como el main + columna derecha de la captura) */
.mb-ga-hgrid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: 12px; align-items: start; }
.mb-ga-hmain, .mb-ga-hside { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
@media (max-width: 1023px) { .mb-ga-hgrid { grid-template-columns: 1fr; } }

/* ---- Salud del grupo: avatar grande con punto verde + nombre (captura) ---- */
.mb-ga-health .mb-ga-hrow { display: flex; align-items: center; gap: 12px; }
.mb-ga-gav {
  position: relative; width: 56px; height: 56px; border-radius: 999px; flex: 0 0 auto;
  display: grid; place-items: center; overflow: visible;
  background: linear-gradient(135deg, #7c3aed, #f43f5e); color: #fff;
  font-weight: 700; font-size: 20px;
}
.mb-ga-gav img { width: 100%; height: 100%; border-radius: 999px; object-fit: cover; }
.mb-ga-gdot {
  position: absolute; right: -1px; bottom: -1px;
  width: 14px; height: 14px; border-radius: 999px;
  background: #059669; border: 2.5px solid var(--card);
}
.mb-ga-health .mb-ga-n { font-size: 16px; line-height: 1.3; }
.mb-ga-health .mb-ga-s { font-size: 13px; }

/* Asuntos que atender (cuando el grupo NO está en regla): filas clicable */
.mb-ga-hiss { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.mb-ga-hissue {
  display: flex; align-items: center; gap: 10px; width: 100%;
  text-align: left; border: 0; background: none; color: inherit;
  padding: 8px 10px; border-radius: 8px; cursor: pointer; font: inherit;
}
.mb-ga-hissue:hover { background: var(--muted); }
.mb-ga-hissue b { min-width: 0; flex: 0 1 auto; font-size: 14px; font-weight: 600; line-height: 1.3; }
.mb-ga-hissue span { min-width: 0; flex: 1 1 auto; font-size: 12px; color: var(--muted-foreground); line-height: 1.4; }
.mb-ga-hissue > svg { flex: 0 0 auto; color: var(--muted-foreground); }

/* ---- "Más información": carrusel de las Normas comunitarias (captura) ---- */
.mb-ga-carwrap { position: relative; }
.mb-ga-car {
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 2px 34px 4px 2px; scrollbar-width: none;
}
.mb-ga-car::-webkit-scrollbar { display: none; }
.mb-ga-carit {
  flex: 0 0 60%; min-width: 180px; scroll-snap-align: start;
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  background: var(--muted); display: flex; flex-direction: column;
}
.mb-ga-carit img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--muted); }
.mb-ga-carit p { font-size: 13px; font-weight: 600; line-height: 1.35; padding: 8px 10px; margin: 0; }
/* Botón flotante › a caballo entre las tarjetas (como en la captura) */
.mb-ga-carnext {
  position: absolute; right: 12px; top: 50%; transform: translateY(-58%);
  width: 32px; height: 32px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--card); color: var(--foreground);
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
  display: grid; place-items: center; padding: 0;
}
.mb-ga-carnext:hover { background: var(--muted); }
.mb-ga-carnext svg { width: 17px; height: 17px; }

/* ---- Filas clicable de la columna derecha y de los roles (captura) ---- */
.mb-ga-srow {
  display: flex; align-items: center; gap: 10px; width: 100%;
  text-align: left; border: 0; background: none; color: inherit;
  padding: 8px 10px; border-radius: 8px; cursor: pointer; font: inherit;
}
.mb-ga-srow:hover { background: var(--muted); }
.mb-ga-srow > svg { flex: 0 0 auto; color: var(--muted-foreground); }
.mb-ga-sric {
  width: 36px; height: 36px; border-radius: 999px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: var(--muted); color: var(--muted-foreground);
}
.mb-ga-sric svg { width: 18px; height: 18px; }
.mb-ga-srtx { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
.mb-ga-srtx b { font-size: 14px; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-ga-srtx span {
  font-size: 12px; color: var(--muted-foreground); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ============================================================================
   VISTA ROLES DE LA COMUNIDAD — tarjeta "Roles estándar" de la captura:
   filas Administrador / Moderador / Top voices ("N miembros" + chevron) que
   abren el detalle del rol (personas con chips + Hacer/Quitar para el dueño
   y la lista "Agregar" con el resto de los miembros).
   ========================================================================== */
.mb-ga-roleslist { display: flex; flex-direction: column; gap: 2px; }

/* Sección "Agregar administrador/moderador" del detalle de un rol */
.mb-ga-roleadd { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.mb-ga-roleadd > p { font-size: 13px; font-weight: 700; color: var(--muted-foreground); }

/* ============================================================================
   VISTA "CONFIGURAR GRUPO" (Editar grupo) — capturas de Facebook:
   columna principal del grupo con "← Atrás" + tarjeta de identidad (portada
   con botón de cámara "Editar" + "Quitar", foto del grupo con cámara,
   nombre y "Grupo x · N miembros") y tarjetas de ajustes con filas
   (título en negrita + subtítulo gris + lápiz a la derecha) que abren su
   editor en línea (Nombre y descripción · Categoría · Privacidad con
   opciones tipo Facebook · Color del grupo con interruptor y muestras ·
   Requerir aprobación de publicaciones · Miembros del grupo) y la fila
   final roja "Eliminar grupo".
   ========================================================================== */

/* ---- Portada / identidad ---- */
.mb-gedit .mb-ge-cov { position: relative; height: 150px; }
@media (min-width: 640px) { .mb-gedit .mb-ge-cov { height: 190px; } }
.mb-ge-camb {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 8px; border: 0;
  background: rgba(0, 0, 0, .55); color: #fff;
  font-size: 13px; font-weight: 600; cursor: pointer;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.mb-ge-camb:hover { background: rgba(0, 0, 0, .72); }
.mb-ge-camb:disabled { opacity: .6; cursor: default; }
.mb-ge-camb svg { width: 15px; height: 15px; }
.mb-gedit .mb-ge-prow { padding: 0 16px; }
.mb-ge-prof { position: relative; width: 78px; margin-top: -34px; }
.mb-ge-pcam {
  position: absolute; right: -7px; bottom: -7px;
  width: 30px; height: 30px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--border);
  display: grid; place-items: center; cursor: pointer; color: var(--foreground);
}
.mb-ge-pcam:hover { background: var(--muted); }
.mb-ge-pcam svg { width: 14px; height: 14px; }
.mb-ge-id { padding: 10px 16px 16px; }
.mb-ge-name { font-size: 22px; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.mb-ge-sub { font-size: 13px; color: var(--muted-foreground); margin-top: 3px; }

/* ---- Tarjetas de ajustes (filas con lápiz, como la captura) ---- */
.mb-ge-card { overflow: hidden; }
.mb-ge-ct { font-size: 20px; font-weight: 800; padding: 16px 16px 6px; letter-spacing: -.01em; }
.mb-ge-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 16px; border-top: 1px solid var(--border); cursor: pointer;
}
.mb-ge-row:hover { background: var(--muted); }
.mb-ge-rtx { min-width: 0; }
.mb-ge-t { font-size: 15px; font-weight: 700; }
.mb-ge-s {
  font-size: 13px; color: var(--muted-foreground); margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mb-ge-pen {
  flex: 0 0 auto; width: 36px; height: 36px; border-radius: 999px;
  border: 0; background: transparent; color: var(--foreground);
  display: grid; place-items: center; cursor: pointer;
}
.mb-ge-pen:hover { background: var(--muted-foreground); opacity: .9; }

/* ---- Editor en línea de cada fila ---- */
.mb-ge-ed {
  margin: 0 16px 14px; padding: 14px; border-radius: 12px;
  background: var(--muted); display: flex; flex-direction: column; gap: 10px;
}
.mb-ge-err { font-size: 12.5px; color: #e11d48; }
.mb-ge-lbl { font-size: 13px; font-weight: 600; }
.mb-ge-fbtns { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

/* ---- Opciones de privacidad (tipo Facebook) ---- */
.mb-ge-opt {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px; cursor: pointer;
  border: 1px solid transparent;
}
.mb-ge-opt:hover { background: var(--background); }
.mb-ge-opt.on { border-color: #7c3aed; background: var(--background); }
.mb-ge-oic {
  width: 36px; height: 36px; border-radius: 999px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: var(--background); color: var(--foreground);
}
.mb-ge-otx { min-width: 0; flex: 1 1 auto; }
.mb-ge-ot { font-size: 15px; font-weight: 700; }
.mb-ge-os { font-size: 12.5px; color: var(--muted-foreground); line-height: 1.4; }
.mb-ge-ochk { margin-left: auto; color: #7c3aed; flex: 0 0 auto; }

/* ---- Interruptor (Color del grupo / aprobación) ---- */
.mb-ge-tog {
  flex: 0 0 auto; width: 46px; height: 26px; border-radius: 999px;
  background: var(--muted); border: 1px solid var(--border);
  position: relative; cursor: pointer; transition: background .15s ease;
}
.mb-ge-tog::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; border-radius: 999px; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .35); transition: left .15s ease;
}
.mb-ge-tog.on { background: linear-gradient(90deg, #7c3aed, #db2777); border-color: transparent; }
.mb-ge-tog.on::after { left: 22px; }

/* ---- Muestras de color ---- */
.mb-ge-swrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 0 16px 14px; }
.mb-ge-sw {
  width: 32px; height: 32px; border-radius: 999px; cursor: pointer;
  border: 3px solid transparent; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
}
.mb-ge-sw.on { border-color: var(--foreground); }

/* ---- Lista de miembros (Participación) ---- */
.mb-ge-mlist { display: flex; flex-direction: column; gap: 2px; max-height: 288px; overflow-y: auto; }
.mb-ge-mrow { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; }
.mb-ge-mrow:hover { background: var(--background); }

/* ---- Fila final roja: Eliminar grupo ---- */
.mb-ge-del {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 14px 16px; border: 0; border-top: 1px solid var(--border);
  background: transparent; color: #e11d48;
  font-size: 15px; font-weight: 700; cursor: pointer;
}
.mb-ge-del:hover { background: rgba(225, 29, 72, .08); }
.mb-ge-del:disabled { opacity: .6; cursor: default; }
