/* Modal "Mis grupos" (administrativos) + opción del navbar. Tokens --rd-* */
.mg-wrap { display: flex; flex-direction: column; gap: 10px; }
.mg-intro { margin: 0; font-size: 13.5px; color: var(--rd-ink-500); }
.mg-intro strong { color: var(--rd-primary-600); }

.mg-search { position: relative; }
.mg-search i {
    position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
    font-size: 13px; color: var(--rd-ink-400);
}
.mg-search input {
    width: 100%; height: 34px; padding: 0 10px 0 30px;
    border: 1px solid var(--rd-ink-200); border-radius: 4px;
    font-size: 13px; color: var(--rd-ink-900); background: #fff;
}
.mg-search input:focus { outline: none; border-color: var(--rd-primary-500); box-shadow: 0 0 0 2px var(--rd-primary-100); }

.mg-list {
    list-style: none; margin: 0; padding: 0;
    max-height: 340px; overflow-y: auto;
    border: 1px solid var(--rd-ink-200); border-radius: 4px;
}
.mg-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; font-size: 13px; color: var(--rd-ink-700);
    border-bottom: 1px solid var(--rd-ink-100);
}
.mg-item:last-child { border-bottom: 0; }
.mg-item[hidden] { display: none; }
.mg-item i { color: var(--rd-primary-600); font-size: 14px; flex-shrink: 0; }
.mg-item span { min-width: 0; overflow-wrap: anywhere; }

.mg-empty {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 22px 12px; font-size: 13px; color: var(--rd-ink-500);
    border: 1px dashed var(--rd-ink-200); border-radius: 4px; background: var(--rd-ink-50);
}
.mg-empty[hidden] { display: none; }

/* Secciones del modal "Mis asignaciones" */
.mg-wrap { gap: 16px; }
.mg-wrap section { display: flex; flex-direction: column; gap: 8px; }
.mg-title {
    display: flex; align-items: center; gap: 6px; margin: 0;
    font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    color: var(--rd-primary-600);
}
.mg-count {
    padding: 0 6px; border-radius: 3px; font-size: 11px;
    background: var(--rd-primary-50); color: var(--rd-primary-700);
}
.mg-item { justify-content: space-between; }
.mg-item i + .mg-item-name { margin-right: auto; }
.mg-item-name { min-width: 0; overflow-wrap: anywhere; }
.mg-item.is-active { background: var(--rd-primary-50); }
.mg-item.is-active .mg-item-name { font-weight: 700; color: var(--rd-primary-700); }
.mg-badge {
    flex-shrink: 0; padding: 2px 8px; border-radius: 3px;
    font-size: 11px; font-weight: 700; background: var(--rd-primary-600); color: #fff;
}
/* Botón "Cambiar a este": propio (sin .btn de Bootstrap, que deja el texto azul y el fondo blanco al quedar con foco/disabled) */
.mg-switch {
    flex-shrink: 0;
    padding: 4px 10px;
    border: 1px solid var(--rd-primary-600);
    border-radius: 4px;
    background: #fff;
    color: var(--rd-primary-600);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background .12s, color .12s;
}
.mg-switch:hover, .mg-switch:active { background: var(--rd-primary-600); color: #fff; }
.mg-switch:focus { outline: none; }
.mg-switch:focus-visible { outline: 2px solid var(--rd-primary-500); outline-offset: 2px; }
.mg-switch.is-loading, .mg-switch:disabled {
    background: var(--rd-primary-600);
    border-color: var(--rd-primary-600);
    color: #fff;
    opacity: .75;
    cursor: progress;
}
.mg-list--perfiles { max-height: none; overflow: visible; }
@media (max-width: 575.98px) {
    .mg-list--perfiles .mg-item { flex-wrap: wrap; }
}

/* Sección Cargos */
.mg-item--cargo { align-items: flex-start; }
.mg-item--cargo .mg-item-name { display: flex; flex-direction: column; gap: 2px; }
.mg-sub { display: block; font-size: 12px; font-weight: 400; line-height: 1.3; color: var(--rd-ink-500); }
.mg-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; flex-shrink: 0; }
.mg-tag {
    padding: 2px 8px; border-radius: 3px; font-size: 11px; font-weight: 700;
    background: var(--rd-primary-600); color: #fff; white-space: nowrap;
}
.mg-tag--alt { background: var(--rd-primary-50); color: var(--rd-primary-700); border: 1px solid var(--rd-primary-200); }
