/* Grupos plegables en tablas agrupadas (Usuarios y accesos, Organizaciones y unidades). */
.cg-group-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:6px 0 10px; }
.cg-group-summary { flex:1 1 260px; color:#475569; font-size:13px; }
.cg-group-bulk { min-height:44px; padding:8px 14px; font-size:13px; }
.cg-group-bulk:focus-visible { outline:3px solid #1d4ed8; outline-offset:2px; }
.cg-group-toggle { display:flex; align-items:center; gap:10px; width:100%; min-height:44px; padding:2px 0; border:0; background:transparent; color:inherit; font:inherit; text-align:left; cursor:pointer; border-radius:10px; }
.cg-group-toggle:focus-visible { outline:3px solid #1d4ed8; outline-offset:3px; }
.cg-group-chevron { flex:0 0 26px; width:26px; height:26px; display:inline-grid; place-items:center; border-radius:8px; border:1px solid #c7d2fe; background:#fff; color:#4338ca; }
.cg-group-toggle:hover .cg-group-chevron { background:#e0e7ff; }
.cg-group-chevron svg { display:block; width:16px; height:16px; transition:transform .15s ease; }
.cg-group-toggle[aria-expanded="true"] .cg-group-chevron svg { transform:rotate(90deg); }
.cg-group-toggle-subgroup { min-height:40px; }
.cg-group-toggle-subgroup .cg-group-chevron { flex-basis:22px; width:22px; height:22px; }
.cg-group-toggle-subgroup .cg-group-chevron svg { width:14px; height:14px; }
tr.is-collapsed > td, tr.is-collapsed > th { border-bottom:1px solid #e2e8f0; }
.cg-sr-only { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
@media (prefers-reduced-motion: reduce) { .cg-group-chevron svg { transition:none; } }
@media (max-width: 640px) { .cg-group-toolbar { align-items:stretch; } .cg-group-bulk { flex:1 1 auto; } }
/* En Usuarios, los encabezados dan estilo de píldora a todo <span>: la flecha y el texto para lectores conservan el suyo. */
.admin-users-table .user-group-row .cg-group-chevron, .admin-users-table .user-subgroup-row .cg-group-chevron { display:inline-grid; place-items:center; padding:0; gap:0; border:1px solid #c7d2fe; border-left-width:1px; border-radius:8px; background:#fff; color:#4338ca; text-transform:none; }
.admin-users-table .user-group-row .cg-group-toggle:hover .cg-group-chevron, .admin-users-table .user-subgroup-row .cg-group-toggle:hover .cg-group-chevron { background:#e0e7ff; }
/* Rol y estado: la píldora "Activo/Inactivo" no se parte en dos líneas cuando hay también "Pendiente de aprobación". */
.admin-users-table .user-role-cell .admin-user-actions { flex-wrap:wrap; }
.admin-users-table .user-role-cell .status-badge { white-space:nowrap; flex:0 0 auto; }
