/* XMARTS · Personas / Estados planos v1 · 2026-10-20
   La lista y los filtros mantienen su funcionalidad original.
   Solo #peopleRail: colores sólidos, sin degradados/brillos/sombras. */
html body.xm-mkt-ui #peopleRail{
  --pf-surface:#23292d;
  --pf-surface-hover:#2a3135;
  --pf-selected:#2f3d2f;
  --pf-badge:#2b3136;
  --pf-border:#414947;
  --pf-fg:#f1f4ef;
  --pf-muted:#a2aaa4;
}
html body.xm-mkt-ui #peopleRail .xm-personas-filters{
  /* Dos controles legibles en filas completas, nunca a media columna. */
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:6px!important;
  width:100%!important;
  min-width:0!important;
  position:relative!important;
  z-index:140!important;
}
html body.xm-mkt-ui #peopleRail .xm-personas-filters #directoryDepartmentFilter,
html body.xm-mkt-ui #peopleRail .xm-personas-filters .flat-personas-state{
  box-sizing:border-box!important;
  grid-column:1 / -1!important;
  width:100%!important;
  min-width:0!important;
}
html body.xm-mkt-ui #peopleRail .xm-personas-filters :is(#directoryDepartmentFilter,#directoryStatusFilter){
  background-color:var(--pf-surface)!important;
  background-image:none!important;
  color:var(--pf-fg)!important;
  border-color:var(--pf-border)!important;
  box-shadow:none!important;
  filter:none!important;
}
html body.xm-mkt-ui #peopleRail .xm-personas-filters :is(#directoryDepartmentFilter,#directoryStatusFilter):focus{
  border-color:var(--accent)!important;
  outline:none!important;
  box-shadow:none!important;
}
html body.xm-mkt-ui #peopleRail .xm-personas-filters select option{
  background-color:var(--pf-surface)!important;
  background-image:none!important;
  color:var(--pf-fg)!important;
  box-shadow:none!important;
}
html body.xm-mkt-ui #peopleRail.flat-personas-ready #directoryStatusFilter{
  display:none!important;
}
/* El desplegable visible delega los cambios al select real. */
html body #peopleRail .flat-personas-state{
  display:block;position:relative;min-width:0;z-index:120;
}
html body #peopleRail .flat-personas-trigger{
  display:flex!important;align-items:center!important;gap:10px!important;
  box-sizing:border-box!important;width:100%!important;min-width:0!important;
  height:35px!important;min-height:35px!important;
  padding:0 10px!important;text-align:left!important;
  font:600 0.75rem/1.15 var(--font,Manrope),system-ui,sans-serif!important;
  border:1px solid var(--accent)!important;
  border-radius:11px!important;
  background:var(--pf-surface)!important;background-image:none!important;
  color:var(--pf-fg)!important;box-shadow:none!important;
  text-shadow:none!important;filter:none!important;cursor:pointer!important;
}
html body #peopleRail .flat-personas-trigger:hover{
  background:var(--pf-surface-hover)!important;
}
html body #peopleRail .flat-personas-trigger:focus-visible{
  outline:2px solid var(--accent)!important;outline-offset:2px!important;
}
html body #peopleRail .flat-personas-label{
  flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  color:inherit;
}
html body #peopleRail .flat-personas-arrow{
  font-size:1.0625rem;line-height:1;color:var(--pf-muted);flex:0 0 auto;margin-left:0;
}
html body #peopleRail .flat-personas-list{
  /* Alineada al selector de ancho completo; no se sale por la izquierda. */
  position:absolute;left:0;right:0;top:calc(100% + 5px);width:100%;max-width:100%;
  max-height:min(430px,calc(100dvh - 160px));
  box-sizing:border-box;overflow-x:hidden;overflow-y:auto;
  z-index:125;padding:6px;border:1px solid var(--pf-border);
  border-radius:15px;background:var(--pf-surface);background-image:none;
  box-shadow:none;filter:none;scrollbar-width:thin;
  scrollbar-color:#666d68 transparent;
}
html body #peopleRail .flat-personas-list[hidden]{display:none!important}
html body #peopleRail .flat-personas-row{
  display:flex!important;align-items:center!important;gap:10px!important;
  box-sizing:border-box!important;width:100%!important;min-height:40px!important;
  padding:8px 12px!important;margin:0!important;text-align:left!important;
  font:600 0.75rem/1.3 var(--font,Manrope),system-ui,sans-serif!important;
  color:var(--pf-fg)!important;border:1px solid transparent!important;
  border-radius:10px!important;background:var(--pf-surface)!important;
  background-image:none!important;box-shadow:none!important;
  text-shadow:none!important;filter:none!important;cursor:pointer!important;
}
html body #peopleRail .flat-personas-row:hover,
html body #peopleRail .flat-personas-row:focus-visible{
  background:var(--pf-surface-hover)!important;
}
html body #peopleRail .flat-personas-row.selected,
html body #peopleRail .flat-personas-row[aria-selected="true"]{
  background:var(--pf-selected)!important;border-color:transparent!important;
}
html body #peopleRail .flat-personas-row:focus-visible{
  outline:1px solid var(--accent)!important;outline-offset:-2px;
}
html body #peopleRail .flat-personas-check{
  flex:0 0 17px;min-width:17px;text-align:center;font-size:0.8125rem;color:var(--vo-light-primary,var(--accent));
  visibility:hidden;
}
html body #peopleRail .flat-personas-row[aria-selected="true"] .flat-personas-check{
  visibility:visible;
}
html body #peopleRail .flat-personas-count{
  flex:0 0 auto;min-width:40px;text-align:center;box-sizing:border-box;
  padding:3px 8px;border-radius:999px;
  background:var(--pf-badge);background-image:none;box-shadow:none;
  color:var(--pf-muted);font-size:0.6875rem;font-weight:700;line-height:1.15;
}
html body #peopleRail .flat-personas-count[hidden]{display:none!important}
html body #peopleRail .flat-personas-dot{
  display:block;flex:0 0 14px;box-sizing:border-box;
  width:14px;height:14px;border-radius:50%;border:0 solid transparent;
  background-color:transparent;background-image:none;
  box-shadow:none!important;filter:none!important;
}
html body #peopleRail .flat-personas-dot.flat-personas-people{
  width:17px;height:17px;flex-basis:17px;color:var(--pf-muted);border:0;
}
html body #peopleRail .flat-personas-dot.flat-personas-people svg{
  display:block;width:100%;height:100%;
}
html body #peopleRail .flat-personas-dot.flat-personas-ring-online{
  border:2px solid var(--st-free)!important;background:transparent!important;
}
html body #peopleRail .flat-personas-dot.flat-personas-ring-offline{
  border:2px solid var(--st-off)!important;background:transparent!important;
}
html body #peopleRail .flat-personas-dot.flat-personas-disponible{
  background:var(--st-free)!important;
}
html body #peopleRail .flat-personas-dot.flat-personas-ocupado{
  background:var(--st-busy)!important;
}
html body #peopleRail .flat-personas-dot.flat-personas-comunicacion{
  background:var(--st-call)!important;
}
html body #peopleRail .flat-personas-dot.flat-personas-reunion{
  background:var(--st-meet)!important;
}
html body #peopleRail .flat-personas-dot.flat-personas-reunionexterna{
  background:#a78bfa!important;
}
html body #peopleRail .flat-personas-dot.flat-personas-nodisturb{
  background:var(--st-dnd)!important;
}
html body #peopleRail .flat-personas-dot.flat-personas-absence{
  background:var(--odoo)!important;
}
/* Los contadores y puntos existentes del panel también quedan planos. */
html body.xm-mkt-ui #peopleRail :is(.directory-status-count,.xm-personas-stat){
  background-image:none!important;box-shadow:none!important;text-shadow:none!important;
  filter:none!important;
}
html body.xm-mkt-ui #peopleRail .directory-status-count{
  background:var(--pf-badge)!important;border-color:var(--pf-border)!important;
  transform:none!important;
}
html body.xm-mkt-ui #peopleRail .directory-status-count:hover{
  background:var(--pf-surface-hover)!important;transform:none!important;
}
html body.xm-mkt-ui #peopleRail .directory-status-count.active{
  background:var(--pf-selected)!important;
  border-color:var(--accent)!important;box-shadow:none!important;
}
html body.xm-mkt-ui #peopleRail .directory-status-count .dot{
  box-sizing:border-box!important;border:0!important;
  width:10px!important;height:10px!important;
  box-shadow:none!important;background-image:none!important;filter:none!important;
}
html body.xm-mkt-ui #peopleRail .directory-status-count .dot.disponible{
  background:var(--st-free)!important;
}
html body.xm-mkt-ui #peopleRail .directory-status-count .dot.ocupado{
  background:var(--st-busy)!important;
}
html body.xm-mkt-ui #peopleRail .directory-status-count .dot.comunicacion{
  background:var(--st-call)!important;box-shadow:none!important;
}
html body.xm-mkt-ui #peopleRail .directory-status-count .dot.reunion{
  background:var(--st-meet)!important;
}
html body.xm-mkt-ui #peopleRail .directory-status-count .dot.reunionexterna{
  background:#a78bfa!important;
}
html body.xm-mkt-ui #peopleRail .directory-status-count .dot.dnd{
  background:var(--st-dnd)!important;
}
html body.xm-mkt-ui #peopleRail .directory-status-count .dot.offline{
  border:2px solid var(--st-off)!important;background:transparent!important;
}
/* Los indicadores existentes por usuario conservan un único color, sin halos. */
html body.xm-mkt-ui #peopleRail #directoryList .directory-status .status-dot{
  box-shadow:none!important;filter:none!important;background-image:none!important;
}
html body.xm-mkt-ui #peopleRail #directoryList .directory-status .status-dot.offline{
  border:2px solid var(--st-off)!important;background:transparent!important;
}
/* Tema claro: superficies y texto igualmente planos. */
html[data-theme="light"] body.xm-mkt-ui #peopleRail{
  --pf-surface:#fbfcfa;
  --pf-surface-hover:#edf1eb;
  --pf-selected:#e5eedf;
  --pf-badge:#edf0eb;
  --pf-border:#cbd3cb;
  --pf-fg:#17201a;
  --pf-muted:#56605a;
}

/* Personas · estados de empleados siempre circulares (lista y cuadrícula).
   Se preservan los colores y el aro hueco de Desconectado. */
html body.xm-mkt-ui #peopleRail #directoryList .directory-item .directory-status .status-dot{
  display:inline-block!important;
  width:8px!important;
  height:8px!important;
  min-width:8px!important;
  min-height:8px!important;
  flex:0 0 8px!important;
  box-sizing:border-box!important;
  border-radius:50%!important;
  aspect-ratio:1 / 1;
}
