/* Omnicanal shell — azul marino oscuro uniforme + scrollbars casi invisibles */
:root {
  color-scheme: dark;
  --omni-navy: #0a0f1a;
  --omni-bg: #0a0f1a;
  --omni-panel: #0c1222;
  --omni-panel2: #111827;
  --omni-surface: #0f172a;
  --omni-line: #1e293b;
  --omni-accent: #10b981;
  --omni-accent2: #6366f1;
  --omni-glow: rgba(16, 185, 129, 0.25);
  --omni-text: #e2e8f0;
  --omni-muted: #94a3b8;
  --omni-scroll: rgba(148, 163, 184, 0.14);
  --omni-scroll-hover: rgba(148, 163, 184, 0.28);

  /* Forzar tokens de la app al color del menú (sin pedazos blancos) */
  --fvtTransparent: transparent;
  --fvtWhite: #0c1222;
  --fvtDarkWhite: #0a0f1a;
  --fvtDarkerWhite: #1e293b;
  --fvtXWhite: #f8fafc;
  --fvtXDarkWhite: #0a0f1a;
  --fvtXDarkerWhite: #1e293b;
  --fvtBlack: #e2e8f0;
  --fvtXBlack: #e2e8f0;
  --fvtGray: #94a3b8;
  --fvtXGray: #94a3b8;
  --fvtBorder: #1e293b;
  --fvtDarkBlue: #0c1222;
  --fvtXDarkBlue: #0a0f1a;

  /* WhatsApp / Gmail embeds en shell oscuro */
  --wspBgPattern: url(/assets/wspBgDark-DLsoH247.svg);
  --wspMsgOut: #005c4b;
  --wspBg: #0c1222;
  --wspMsgIn: #1e293b;
  --wspSeen: #8added;
  --wspGreen: #2e9362;
  --wspBlue: #47a5fe;
  --wspButtonBorder: #334155;
  --wspButtonBg: #111827;
  --wspButtonHover: #1e293b;
  --gmailTitle: #e2e8f0;
  --gmailHeader: #0c1222;
  --gmailHover: #111827;
  --gmailGray: #1e293b;
  --gmailBlue: #47abff;
  --gmailBlueHover: #60a5fa;
}

/* Misma paleta con clase (por si algún override de :root del bundle intenta ganar) */
html.omni-dark {
  --fvtWhite: #0c1222;
  --fvtDarkWhite: #0a0f1a;
  --fvtDarkerWhite: #1e293b;
  --fvtXWhite: #f8fafc;
  --fvtXDarkWhite: #0a0f1a;
  --fvtXDarkerWhite: #1e293b;
  --fvtBlack: #e2e8f0;
  --fvtXBlack: #e2e8f0;
  --fvtGray: #94a3b8;
  --fvtXGray: #94a3b8;
  --fvtBorder: #1e293b;
  --fvtDarkBlue: #0c1222;
  --fvtXDarkBlue: #0a0f1a;
}

/* Anular el modo claro del CSS compilado aunque el SO esté en light */
@media (prefers-color-scheme: light), (prefers-color-scheme: dark) {
  :root,
  html.omni-dark {
    --fvtWhite: #0c1222;
    --fvtDarkWhite: #0a0f1a;
    --fvtDarkerWhite: #1e293b;
    --fvtXWhite: #f8fafc;
    --fvtXDarkWhite: #0a0f1a;
    --fvtXDarkerWhite: #1e293b;
    --fvtBlack: #e2e8f0;
    --fvtXBlack: #e2e8f0;
    --fvtBorder: #1e293b;
    --fvtDarkBlue: #0c1222;
    --fvtXDarkBlue: #0a0f1a;
    --wspBg: #0c1222;
    --wspMsgIn: #1e293b;
    --wspMsgOut: #005c4b;
    --wspButtonBg: #111827;
    --wspButtonBorder: #334155;
    --wspButtonHover: #1e293b;
    --gmailHeader: #0c1222;
    --gmailHover: #111827;
    --gmailGray: #1e293b;
  }
}

html,
body,
#app {
  background: var(--omni-bg) !important;
  background-color: var(--omni-bg) !important;
  color: var(--omni-text);
}

html.omni-dark body,
html.omni-dark #app {
  background: var(--omni-bg) !important;
  color: var(--omni-text);
}

/* Main / header / cards: mismo navy que el menú */
main,
[style*="grid-area: main"],
[style*="grid-area:main"],
[style*="grid-area: header"],
[style*="grid-area:header"] {
  background: var(--omni-bg) !important;
  background-color: var(--omni-bg) !important;
  color: var(--omni-text);
}

/* Utilidades claras del bundle → navy */
.bg-white {
  background-color: var(--omni-bg) !important;
}

/* Sidebar: mismo tono que el resto */
html.omni-dark nav[style*="grid-area: sidebar"],
html.omni-dark nav[style*="grid-area:sidebar"],
nav[style*="grid-area: sidebar"],
nav[style*="grid-area:sidebar"] {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  background: var(--omni-navy) !important;
  background-color: var(--omni-navy) !important;
  border-right: 1px solid var(--omni-line);
  box-shadow: none;
}

html.omni-dark [style*="grid-area: header"],
html.omni-dark [style*="grid-area:header"] {
  background: var(--omni-bg) !important;
  backdrop-filter: none;
  border-bottom: 1px solid var(--omni-line);
}

/* Iframes embebidos */
iframe {
  background: var(--omni-bg) !important;
  border-radius: 14px;
  box-shadow: none;
}

/* Overlay modal — nunca debe quedar invisible bloqueando clicks */
#omnicanal-msg-overlay[data-stuck="1"] {
  display: none !important;
  pointer-events: none !important;
}

/* Micro-interacciones sutiles en el menú */
html.omni-dark nav button,
html.omni-dark nav a,
nav button,
nav a {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
html.omni-dark nav a:hover,
nav a:hover {
  transform: translateX(2px);
}

/* Pestañas de submódulos: varias filas, sin scroll horizontal */
html.omni-dark main div.flex.flex-row.flex-wrap.gap-3,
main div.flex.flex-row.flex-wrap.gap-3 {
  row-gap: 0.5rem;
  align-items: center;
}

html.omni-dark main .rounded-xl.col-span-1 > div.flex.flex-row,
html.omni-dark main .rounded-xl.col-span-2 > div.flex.flex-row,
main .rounded-xl.col-span-1 > div.flex.flex-row,
main .rounded-xl.col-span-2 > div.flex.flex-row {
  flex-wrap: wrap !important;
  overflow-x: hidden !important;
  gap: 0.65rem;
  row-gap: 0.5rem;
}

/* ——— Scrollbars opacas / casi imperceptibles (global) ——— */
html {
  color-scheme: dark;
}

html,
body,
#app,
* {
  scrollbar-width: thin !important;
  scrollbar-color: rgba(148, 163, 184, 0.16) transparent !important;
}

*::-webkit-scrollbar {
  width: 5px !important;
  height: 5px !important;
  background: transparent !important;
}

*::-webkit-scrollbar-button,
*::-webkit-scrollbar-button:start:decrement,
*::-webkit-scrollbar-button:end:increment {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

*::-webkit-scrollbar-track,
*::-webkit-scrollbar-track-piece,
*::-webkit-scrollbar-corner {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

*::-webkit-scrollbar-thumb {
  background-color: rgba(148, 163, 184, 0.16) !important;
  border-radius: 999px !important;
  border: 1px solid transparent !important;
  background-clip: padding-box !important;
  min-height: 24px;
}

*::-webkit-scrollbar-thumb:hover {
  background-color: rgba(148, 163, 184, 0.28) !important;
}

*::-webkit-scrollbar-thumb:active {
  background-color: rgba(148, 163, 184, 0.35) !important;
}



/* Menú lateral: texto e íconos siempre claros sobre navy */
nav[style*="grid-area: sidebar"],
nav[style*="grid-area:sidebar"] {
  color: #f8fafc !important;
}
nav[style*="grid-area: sidebar"] a,
nav[style*="grid-area: sidebar"] button,
nav[style*="grid-area:sidebar"] a,
nav[style*="grid-area:sidebar"] button {
  color: #f8fafc !important;
}
nav[style*="grid-area: sidebar"] a:not([class*="bg-[var(--fvtXBlue"])] svg,
nav[style*="grid-area: sidebar"] button:not([class*="bg-[var(--fvtXBlue"])] svg,
nav[style*="grid-area:sidebar"] a svg,
nav[style*="grid-area:sidebar"] button svg {
  color: #f8fafc;
}
nav[style*="grid-area: sidebar"] .fill-\[var\(--fvtXWhite\)\],
nav[style*="grid-area:sidebar"] .fill-\[var\(--fvtXWhite\)\],
nav[style*="grid-area: sidebar"] [class*="fill-[var(--fvtXWhite)]"],
nav[style*="grid-area:sidebar"] [class*="fill-[var(--fvtXWhite)]"] {
  fill: #f8fafc !important;
}
nav[style*="grid-area: sidebar"] [class*="text-[var(--fvtXWhite)]"],
nav[style*="grid-area:sidebar"] [class*="text-[var(--fvtXWhite)]"],
nav[style*="grid-area: sidebar"] [class*="text-[var(--fvtGray)]"],
nav[style*="grid-area:sidebar"] [class*="text-[var(--fvtGray)]"] {
  color: #f8fafc !important;
}

/* ——— Botón colapsar/expandir menú ——— */
/* Desktop/mouse ancho: oculto (hover auto). En responsive/táctil: visible << >> */
@media (hover: hover) and (pointer: fine) and (min-width: 1024px) {
  nav[style*="grid-area: sidebar"] > div:last-child,
  nav[style*="grid-area:sidebar"] > div:last-child {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
}

/* Responsive / touch: mostrar flechas de comprimir/descomprimir del menú */
@media (max-width: 1023px), (hover: none), (pointer: coarse) {
  nav[style*="grid-area: sidebar"] > div:last-child,
  nav[style*="grid-area:sidebar"] > div:last-child {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    min-height: 2.5rem !important;
    margin: 0.25rem 0 0 !important;
    padding: 0.25rem 0 0.15rem !important;
    overflow: visible !important;
    clip: auto !important;
    border: 0 !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    display: flex !important;
    justify-content: center !important;
    z-index: 5 !important;
  }
  nav[style*="grid-area: sidebar"] > div:last-child > button,
  nav[style*="grid-area: sidebar"] > div:last-child > a,
  nav[style*="grid-area:sidebar"] > div:last-child > button,
  nav[style*="grid-area:sidebar"] > div:last-child > a {
    opacity: 1 !important;
    pointer-events: auto !important;
    visibility: visible !important;
  }
}

nav[style*="grid-area: sidebar"] > div:last-child,
nav[style*="grid-area:sidebar"] > div:last-child {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: auto;
  padding-top: 0.35rem;
}

nav[style*="grid-area: sidebar"] > div:last-child > button,
nav[style*="grid-area: sidebar"] > div:last-child > a,
nav[style*="grid-area:sidebar"] > div:last-child > button,
nav[style*="grid-area:sidebar"] > div:last-child > a {
  position: relative;
  width: 2.35rem !important;
  height: 2.35rem !important;
  min-width: 2.35rem !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 999px !important;
  border: 1px solid rgba(148, 163, 184, 0.28) !important;
  background: linear-gradient(160deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98)) !important;
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.6),
    0 6px 16px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
  color: #e2e8f0 !important;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.25s ease,
    background 0.25s ease !important;
  overflow: hidden;
}

nav[style*="grid-area: sidebar"] > div:last-child > button::before,
nav[style*="grid-area:sidebar"] > div:last-child > button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 25%, rgba(71, 171, 255, 0.22), transparent 55%);
  opacity: 0.85;
  pointer-events: none;
}

nav[style*="grid-area: sidebar"] > div:last-child > button:hover,
nav[style*="grid-area: sidebar"] > div:last-child > a:hover,
nav[style*="grid-area:sidebar"] > div:last-child > button:hover,
nav[style*="grid-area:sidebar"] > div:last-child > a:hover {
  transform: translateY(-1px) scale(1.04) !important;
  border-color: rgba(71, 171, 255, 0.65) !important;
  box-shadow:
    0 0 0 1px rgba(71, 171, 255, 0.25),
    0 8px 22px rgba(0, 0, 0, 0.35),
    0 0 18px rgba(71, 171, 255, 0.22) !important;
}

nav[style*="grid-area: sidebar"] > div:last-child > button:active,
nav[style*="grid-area:sidebar"] > div:last-child > button:active {
  transform: translateY(0) scale(0.97) !important;
}

nav[style*="grid-area: sidebar"] > div:last-child svg,
nav[style*="grid-area:sidebar"] > div:last-child svg,
nav[style*="grid-area: sidebar"] > div:last-child img,
nav[style*="grid-area:sidebar"] > div:last-child img {
  width: 1.05rem !important;
  height: 1.05rem !important;
  position: relative;
  z-index: 1;
  opacity: 0.92;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

nav[style*="grid-area: sidebar"] > div:last-child > button:hover svg,
nav[style*="grid-area:sidebar"] > div:last-child > button:hover svg {
  opacity: 1;
  transform: scale(1.08);
}

/* Paneles Vue del webphone — estilos en omnicanal-webphone-hub.css */


/* ——— Menú lateral: un poco más compacto (sin scroll vertical) ——— */
nav[style*="grid-area: sidebar"],
nav[style*="grid-area:sidebar"] {
  padding: 0.75rem 0.7rem !important;
  gap: 0.55rem !important;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Logo un poco más bajo en altura al estar expandido */
nav[style*="grid-area: sidebar"] > div:first-child > div:first-child,
nav[style*="grid-area:sidebar"] > div:first-child > div:first-child {
  max-height: 2.75rem;
}

nav[style*="grid-area: sidebar"] a,
nav[style*="grid-area: sidebar"] button,
nav[style*="grid-area:sidebar"] a,
nav[style*="grid-area:sidebar"] button {
  font-size: 0.84rem !important;
  line-height: 1.2 !important;
  padding-top: 0.28rem !important;
  padding-bottom: 0.28rem !important;
}

/* Íconos del menú un poco más chicos */
nav[style*="grid-area: sidebar"] a svg,
nav[style*="grid-area: sidebar"] button svg,
nav[style*="grid-area:sidebar"] a svg,
nav[style*="grid-area:sidebar"] button svg,
nav[style*="grid-area: sidebar"] a img,
nav[style*="grid-area:sidebar"] a img {
  width: 1.05rem !important;
  height: 1.05rem !important;
  min-width: 1.05rem !important;
}

/* Contenedor de ícono en botones del menú */
nav[style*="grid-area: sidebar"] a [class*="w-5"],
nav[style*="grid-area: sidebar"] button [class*="w-5"],
nav[style*="grid-area:sidebar"] a [class*="w-5"],
nav[style*="grid-area:sidebar"] button [class*="w-5"],
nav[style*="grid-area: sidebar"] a [class*="h-5"],
nav[style*="grid-area:sidebar"] a [class*="h-5"] {
  width: 1.05rem !important;
  height: 1.05rem !important;
}

/* Lista de módulos: menos espacio entre ítems */
nav[style*="grid-area: sidebar"] > div:first-child > div:nth-child(2),
nav[style*="grid-area:sidebar"] > div:first-child > div:nth-child(2) {
  gap: 0.15rem !important;
}

/* Separadores / labels de sección más compactos */
nav[style*="grid-area: sidebar"] p,
nav[style*="grid-area:sidebar"] p,
nav[style*="grid-area: sidebar"] span.text-xs,
nav[style*="grid-area:sidebar"] span.text-xs {
  font-size: 0.7rem !important;
  margin: 0.15rem 0 !important;
}

/* Botón colapsar: no crecer de más */
nav[style*="grid-area: sidebar"] > div:last-child,
nav[style*="grid-area:sidebar"] > div:last-child {
  margin-top: 0.25rem !important;
  padding-top: 0.15rem !important;
}



/* ——— Reportes Premium: layout compacto sin scroll ——— */
html.omni-premium-fit [style*="grid-area: main"],
html.omni-premium-fit [style*="grid-area:main"] {
  padding: 0.45rem 0.6rem !important;
  gap: 0.4rem !important;
  overflow: hidden !important;
  max-height: calc(100vh - 3.4rem) !important;
  height: calc(100vh - 3.4rem) !important;
  align-content: start !important;
  box-sizing: border-box !important;
}

html.omni-premium-fit [style*="grid-area: main"] > div,
html.omni-premium-fit [style*="grid-area:main"] > div {
  padding: 0.5rem 0.65rem !important;
  height: auto !important;
  max-height: 100% !important;
  overflow: hidden !important;
  background: rgba(12, 18, 34, 0.72) !important;
  border: 1px solid rgba(30, 41, 59, 0.95) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
}

html.omni-premium-fit form.omni-prem-filters,
html.omni-premium-fit form.flex.flex-col {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  grid-template-areas: "obj gen" "tmp tmp" "btn btn" !important;
  gap: 0.4rem !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  align-content: start !important;
}

html.omni-premium-fit form.omni-prem-filters > div:nth-child(1),
html.omni-premium-fit form.flex.flex-col > div:nth-child(1) {
  grid-area: obj !important;
  padding: 0.55rem 0.65rem !important;
  border-radius: 10px !important;
  background: rgba(15, 23, 42, 0.55) !important;
}

html.omni-premium-fit form.omni-prem-filters > div:nth-child(2),
html.omni-premium-fit form.flex.flex-col > div:nth-child(2) {
  grid-area: gen !important;
  padding: 0.55rem 0.65rem !important;
  border-radius: 10px !important;
  background: rgba(15, 23, 42, 0.55) !important;
}

html.omni-premium-fit form.omni-prem-filters > div:nth-child(3),
html.omni-premium-fit form.flex.flex-col > div:nth-child(3) {
  grid-area: tmp !important;
  padding: 0.55rem 0.65rem !important;
  border-radius: 10px !important;
  background: rgba(15, 23, 42, 0.55) !important;
}

html.omni-premium-fit form.omni-prem-filters > div:nth-child(4),
html.omni-premium-fit form.flex.flex-col > div:nth-child(4) {
  grid-area: btn !important;
  padding: 0.35rem 0.55rem !important;
  border-radius: 10px !important;
  background: transparent !important;
  border: none !important;
}

html.omni-premium-fit form h2 {
  font-size: 0.82rem !important;
  line-height: 1.15 !important;
  margin: 0 0 0.3rem !important;
  font-weight: 650 !important;
}

html.omni-premium-fit form label {
  font-size: 0.72rem !important;
  margin: 0 0 0.12rem !important;
  line-height: 1.15 !important;
}

html.omni-premium-fit form .flex.flex-col.gap-5,
html.omni-premium-fit form .flex.flex-col.gap-2 {
  gap: 0.3rem !important;
}

html.omni-premium-fit form input,
html.omni-premium-fit form select {
  min-height: 1.85rem !important;
  padding-top: 0.25rem !important;
  padding-bottom: 0.25rem !important;
  font-size: 0.84rem !important;
}

html.omni-premium-fit form .flex.flex-wrap.items-center > button,
html.omni-premium-fit form .items-center.justify-start.flex-wrap > button {
  padding: 0.15rem 0.45rem !important;
  font-size: 0.74rem !important;
  min-height: 0 !important;
  line-height: 1.2 !important;
}

html.omni-premium-fit form .flex.gap-3,
html.omni-premium-fit form .flex.flex-row.gap-3 {
  gap: 0.3rem !important;
}

html.omni-premium-fit form .flex.gap-5,
html.omni-premium-fit form .flex.flex-row.gap-5 {
  gap: 0.45rem !important;
}

html.omni-premium-fit form > div:nth-child(4) > div {
  justify-content: flex-end !important;
}


/* ——— Filtros temporales: más aire vertical ——— */
html.omni-premium-fit form.omni-prem-filters > div:nth-child(3) .flex.flex-col.gap-2,
html.omni-premium-fit form.flex.flex-col > div:nth-child(3) .flex.flex-col.gap-2,
html.omni-premium-fit form.omni-prem-filters > div:nth-child(3) .flex.flex-col.gap-5,
html.omni-premium-fit form.flex.flex-col > div:nth-child(3) .flex.flex-col.gap-5 {
  gap: 0.7rem !important;
}

html.omni-premium-fit form.omni-prem-filters > div:nth-child(3) > div,
html.omni-premium-fit form.flex.flex-col > div:nth-child(3) > div {
  row-gap: 0.7rem !important;
}

html.omni-premium-fit form > div:nth-child(3) .w-full.flex.flex-col.gap-3,
html.omni-premium-fit form > div:nth-child(3) .flex.flex-col.gap-3 {
  gap: 0.65rem !important;
  margin-top: 0.15rem !important;
}

html.omni-premium-fit form > div:nth-child(3) .flex.flex-wrap.items-center,
html.omni-premium-fit form > div:nth-child(3) .items-center.justify-start.flex-wrap {
  margin: 0.15rem 0 0.25rem !important;
  row-gap: 0.4rem !important;
}

html.omni-premium-fit form > div:nth-child(3) .w-full.flex.flex-row.gap-5.items-center,
html.omni-premium-fit form > div:nth-child(3) .flex.flex-row.gap-5.items-center {
  margin-top: 0.35rem !important;
  margin-bottom: 0.2rem !important;
}

html.omni-premium-fit form > div:nth-child(3) .w-full.flex.flex-row.gap-3.items-end,
html.omni-premium-fit form > div:nth-child(3) .flex.flex-row.gap-3.items-end {
  margin-top: 0.25rem !important;
}

@media (max-width: 1100px) {
  html.omni-premium-fit form.omni-prem-filters,
  html.omni-premium-fit form.flex.flex-col {
    grid-template-columns: 1fr !important;
    grid-template-areas: "obj" "gen" "tmp" "btn" !important;
    overflow-y: auto !important;
    max-height: calc(100vh - 4rem) !important;
  }
}

/* Ocultar Colaboración (módulo intacto; solo oculto del menú por ahora) */
a[href="/colaboracion"],
a[href="#/colaboracion"],
nav a[href*="colaboracion"] {
  display: none !important;
}

/* ——— Login + Home (/): contraste legible sobre fondo oscuro ———
   HomeView/AuthLogin usan bg-[var(--fvtXBlack)] y text-[var(--fvtXWhite)].
   En el tema oscuro global fvtXBlack se remapea a texto claro → fondo blanco ileíble. */
html.omni-login {
  --fvtXBlack: #0a0f1a;
  --fvtXWhite: #e2e8f0;
  --fvtWhite: #111827;
  --fvtDarkWhite: #0c1222;
  --fvtDarkerWhite: #1e293b;
  --fvtBlack: #e2e8f0;
  --fvtGray: #94a3b8;
  --fvtXGray: #94a3b8;
  --fvtBlue: #0ea5e9;
  --fvtXBlue: #38bdf8;
  --fvtBorder: #334155;
}

html.omni-login,
html.omni-login body,
html.omni-login #app {
  background: #0a0f1a !important;
  background-color: #0a0f1a !important;
  color: #e2e8f0 !important;
}

html.omni-login main,
html.omni-login .min-h-screen,
html.omni-login [class*="min-h-screen"] {
  background: radial-gradient(ellipse at 50% 0%, #122033 0%, #0a0f1a 55%, #070b14 100%) !important;
  color: #e2e8f0 !important;
}

html.omni-login label,
html.omni-login p,
html.omni-login span,
html.omni-login a,
html.omni-login h1,
html.omni-login h2 {
  color: #e2e8f0 !important;
}

/* Home: panel izquierdo + footer sin franja blanca */
html.omni-home main,
html.omni-home [class*="bg-[var(--fvtXBlack)]"],
html.omni-home .sectionContainer {
  background-color: #0a0f1a !important;
  color: #e2e8f0 !important;
}
html.omni-home footer,
html.omni-home footer[class*="bg-[var(--fvtXWhite)]"],
html.omni-home [class*="bg-[var(--fvtWhite)]"],
html.omni-home [class*="bg-white"] {
  background: #070b14 !important;
  background-color: #070b14 !important;
  color: #94a3b8 !important;
  border-color: #1e293b !important;
}
html.omni-home footer p,
html.omni-home footer .text-\[var\(--fvtXGray\)\] {
  color: #94a3b8 !important;
}
html.omni-home h1 {
  color: #f8fafc !important;
}
html.omni-home main > section p,
html.omni-home .sectionContainer p {
  color: #94a3b8 !important;
}

html.omni-login input[type="email"],
html.omni-login input[type="password"],
html.omni-login input[type="text"],
html.omni-login input:not([type]) {
  background: #111827 !important;
  color: #f8fafc !important;
  border: 1px solid #334155 !important;
  border-radius: 10px !important;
  caret-color: #38bdf8;
}

html.omni-login input::placeholder {
  color: #64748b !important;
}

html.omni-login button[type="submit"],
html.omni-login button.bg-\[var\(--fvtBlue\)\] {
  box-shadow: 0 0 24px rgba(14, 165, 233, 0.35);
}

/* Logo omnicanal en login: forzar contraste */
html.omni-login img[alt*="omni" i],
html.omni-login svg {
  filter: none;
}

/* Botones Chat / Notificaciones / Agendas (junto al avatar SU) */
.omni-team-bar {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-right: 0.45rem;
  margin-bottom: 0.15rem;
  flex-shrink: 0;
}
.omni-team-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: linear-gradient(145deg, rgba(14, 165, 233, 0.18), rgba(15, 23, 42, 0.95));
  color: #7dd3fc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  box-shadow: 0 0 0 0 rgba(56, 189, 248, 0);
  flex-shrink: 0;
  padding: 0;
}
.omni-team-btn:hover,
.omni-team-btn.is-open {
  transform: scale(1.06);
  border-color: rgba(56, 189, 248, 0.7);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.35);
  color: #e0f2fe;
}
.omni-team-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  border: 1px solid #0f172a;
}
.omni-team-panel {
  position: fixed;
  top: 4.5rem;
  right: 1rem;
  width: min(420px, calc(100vw - 1.5rem));
  max-height: calc(100vh - 5.5rem);
  background: #0c1222;
  border: 1px solid #1e293b;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,.45);
  z-index: 99990;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #e2e8f0;
  font-family: 'Segoe UI', system-ui, sans-serif;
}
.omni-team-panel.is-chat {
  width: min(560px, calc(100vw - 1.5rem));
}
.omni-team-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #1e293b;
  background: #111827;
}
.omni-team-panel-head strong { color: #fff; font-size: 0.95rem; }
.omni-team-close {
  border: 0; background: transparent; color: #94a3b8; font-size: 1.4rem;
  cursor: pointer; line-height: 1; padding: 0 0.25rem;
}
.omni-team-panel-body { flex: 1; min-height: 0; overflow: auto; padding: 0.75rem; }
.omni-team-chat-layout { display: flex; gap: 0.5rem; height: min(62vh, 520px); }
.omni-team-chat-side {
  width: 132px; flex-shrink: 0; overflow: auto;
  border-right: 1px solid #1e293b; padding-right: 0.4rem;
}
.omni-team-chat-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.omni-team-online-label {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em;
  color: #64748b; margin: 0.55rem 0 0.25rem;
}
.omni-team-peer {
  display: block; width: 100%; text-align: left; border: 0;
  background: transparent; color: #cbd5e1; font-size: 0.8rem;
  padding: 0.4rem 0.45rem; border-radius: 8px; cursor: pointer; margin-bottom: 2px;
}
.omni-team-peer:hover, .omni-team-peer.is-active { background: #1e293b; color: #fff; }
.omni-team-peer .dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: #22c55e; margin-right: 0.35rem;
}
.omni-team-peer small { color: #64748b; }
.omni-team-msgs {
  flex: 1; overflow: auto; background: #0a0f1a; border-radius: 10px;
  padding: 0.65rem; border: 1px solid #1e293b;
}
.omni-team-msg { margin: 0.45rem 0; max-width: 92%; }
.omni-team-msg.mine { margin-left: auto; }
.omni-team-msg .meta { font-size: 0.68rem; color: #64748b; margin-bottom: 2px; }
.omni-team-msg .txt {
  background: #1e293b; color: #e2e8f0; padding: 0.45rem 0.6rem;
  border-radius: 10px; font-size: 0.86rem; white-space: pre-wrap; word-break: break-word;
}
.omni-team-msg.mine .txt { background: rgba(20,184,166,.25); color: #ccfbf1; }
.omni-team-composer { display: flex; gap: 0.4rem; margin-top: 0.5rem; }
.omni-team-composer input {
  flex: 1; background: #111827; border: 1px solid #334155; color: #e2e8f0;
  border-radius: 10px; padding: 0.55rem 0.7rem; font: inherit;
}
.omni-team-composer button,
.omni-team-agenda-form button[type=submit] {
  border: 0; border-radius: 10px; padding: 0.55rem 0.85rem; font-weight: 700;
  background: linear-gradient(135deg,#14b8a6,#0d9488); color: #042f2e; cursor: pointer;
}
.omni-team-empty { color: #64748b; font-size: 0.85rem; padding: 1rem 0.25rem; text-align: center; }
.omni-team-toolbar { margin-bottom: 0.5rem; }
.omni-team-toolbar .ghost,
.omni-team-agenda-item .acts button {
  border: 1px solid #334155; background: #111827; color: #94a3b8;
  border-radius: 8px; padding: 0.35rem 0.65rem; cursor: pointer; font-size: 0.78rem;
}
.omni-team-agenda-item .acts button.danger { color: #fca5a5; border-color: rgba(248,113,113,.4); }
.omni-team-notif {
  display: block; width: 100%; text-align: left; border: 1px solid #1e293b;
  background: #111827; color: inherit; border-radius: 10px; padding: 0.65rem 0.75rem;
  margin-bottom: 0.45rem; cursor: pointer;
}
.omni-team-notif.unread { border-color: rgba(56,189,248,.45); background: rgba(14,165,233,.08); }
.omni-team-notif .t { font-weight: 700; color: #fff; font-size: 0.88rem; }
.omni-team-notif .c { color: #94a3b8; font-size: 0.8rem; margin-top: 0.2rem; }
.omni-team-notif .meta { color: #64748b; font-size: 0.7rem; margin-top: 0.35rem; }
.omni-team-agenda-form { display: flex; flex-direction: column; gap: 0.45rem; margin-bottom: 0.85rem; }
.omni-team-agenda-form input,
.omni-team-agenda-form textarea {
  background: #111827; border: 1px solid #334155; color: #e2e8f0;
  border-radius: 10px; padding: 0.5rem 0.65rem; font: inherit;
}
.omni-team-check { display: flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: #cbd5e1; }
.omni-team-agenda-item {
  border: 1px solid #1e293b; background: #111827; border-radius: 10px;
  padding: 0.65rem 0.75rem; margin-bottom: 0.45rem;
}
.omni-team-agenda-item .t { font-weight: 700; color: #fff; }
.omni-team-agenda-item .c { color: #94a3b8; font-size: 0.82rem; margin-top: 0.2rem; }
.omni-team-agenda-item .meta { color: #64748b; font-size: 0.72rem; margin-top: 0.35rem; }
.omni-team-agenda-item .acts { display: flex; gap: 0.35rem; margin-top: 0.45rem; }
.omni-team-agenda-item .bell { font-size: 0.85rem; }

/* Toggle modo webphone (junto al avatar SU) */
.omni-wp-mode-toggle {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: linear-gradient(145deg, rgba(14, 165, 233, 0.18), rgba(15, 23, 42, 0.95));
  color: #7dd3fc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-right: 0.55rem;
  margin-bottom: 0.15rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  box-shadow: 0 0 0 0 rgba(56, 189, 248, 0);
  flex-shrink: 0;
}

.omni-wp-mode-toggle:hover {
  transform: scale(1.06);
  border-color: rgba(56, 189, 248, 0.7);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.35);
  color: #e0f2fe;
}

.omni-wp-mode-toggle.is-sidebar {
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.22), rgba(15, 23, 42, 0.95));
  border-color: rgba(52, 211, 153, 0.45);
  color: #6ee7b7;
}

.omni-wp-mode-toggle.is-sidebar:hover {
  box-shadow: 0 0 18px rgba(52, 211, 153, 0.35);
}

/* Header: check + SU con aire respecto a bordes */
[style*="grid-area: header"],
[style*="grid-area:header"],
nav.w-full.h-fit {
  padding-top: 1.05rem !important;
  padding-bottom: 1rem !important;
  align-items: center !important;
}

/*
 * El área main del SPA usa grid-cols-2 y deja la 2ª columna vacía (hueco negro).
 * Forzar 1 columna a todo el ancho en TODAS las vistas.
 */
[style*="grid-area: main"],
[style*="grid-area:main"] {
  grid-template-columns: minmax(0, 1fr) !important;
  display: grid !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Anular utilidades Tailwind lg:grid-cols-2 en el contenedor main */
[style*="grid-area: main"].lg\:grid-cols-2,
[style*="grid-area:main"].lg\:grid-cols-2,
[style*="grid-area: main"][class*="grid-cols-2"],
[style*="grid-area:main"][class*="grid-cols-2"] {
  grid-template-columns: minmax(0, 1fr) !important;
}

[style*="grid-area: main"] > *,
[style*="grid-area:main"] > * {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

[style*="grid-area: main"] iframe,
[style*="grid-area:main"] iframe,
[style*="grid-area: main"] .col-span-1,
[style*="grid-area:main"] .col-span-1,
[style*="grid-area: main"] .lg\:col-span-2,
[style*="grid-area:main"] .lg\:col-span-2 {
  width: 100% !important;
  max-width: 100% !important;
  grid-column: 1 / -1 !important;
  display: block !important;
}

/* Reservar espacio SOLO en el contenedor de contenido (NO en <main> layout) */
html.omni-wp-sidebar [style*="grid-area: header"],
html.omni-wp-sidebar [style*="grid-area:header"],
html.omni-wp-sidebar nav.w-full.h-fit {
  padding-right: 4.75rem !important;
  transition: padding-right 0.28s ease;
}

html.omni-wp-sidebar.omni-wp-rail-open [style*="grid-area: header"],
html.omni-wp-sidebar.omni-wp-rail-open [style*="grid-area:header"],
html.omni-wp-sidebar.omni-wp-rail-open nav.w-full.h-fit {
  padding-right: 21rem !important;
}

html.omni-wp-sidebar [style*="grid-area: main"],
html.omni-wp-sidebar [style*="grid-area:main"] {
  padding-right: 64px !important;
  margin-right: 0 !important;
  max-width: none !important;
  width: 100% !important;
  box-sizing: border-box !important;
  transition: padding-right 0.28s ease;
}

html.omni-wp-sidebar.omni-wp-rail-open [style*="grid-area: main"],
html.omni-wp-sidebar.omni-wp-rail-open [style*="grid-area:main"] {
  /* Exactamente el ancho del rail expandido — sin doble padding */
  padding-right: 320px !important;
  margin-right: 0 !important;
  max-width: none !important;
}

/* Nunca paddear el <main> layout exterior (eso duplicaba el hueco) */
html.omni-wp-sidebar main.min-h-\[100vh\],
html.omni-wp-sidebar main[class*="min-h"] {
  padding-right: 0 !important;
  margin-right: 0 !important;
}

html.omni-wp-sidebar #omni-wp-mode-toggle,
html.omni-wp-sidebar .size-10.rounded-full {
  position: relative;
  z-index: 80;
}

/* Telefonía: pestañas en una sola línea (títulos sin wrap) */
main [style*="grid-area: main"] .flex.flex-row.flex-nowrap,
main [style*="grid-area:main"] .flex.flex-row.flex-nowrap {
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
main [style*="grid-area: main"] .flex.flex-row.flex-nowrap > *,
main [style*="grid-area:main"] .flex.flex-row.flex-nowrap > * {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}
main [style*="grid-area: main"] .flex.flex-row.flex-nowrap button,
main [style*="grid-area:main"] .flex.flex-row.flex-nowrap button {
  white-space: nowrap !important;
  word-break: keep-all !important;
}

/* ——— Configuración: menú en cascada (estilo WP, tonos del sistema) ——— */
/* Ocultar pestañas L1/L2 del contenido (wrap o nowrap) */
html.omni-cfg-route main [style*="grid-area: main"] > div > .flex.flex-col.gap-3.w-full > .flex.flex-row:nth-child(1),
html.omni-cfg-route main [style*="grid-area:main"] > div > .flex.flex-col.gap-3.w-full > .flex.flex-row:nth-child(1),
html.omni-cfg-route main [style*="grid-area: main"] > div > .flex.flex-col.gap-3.w-full > .flex.flex-row:nth-child(2),
html.omni-cfg-route main [style*="grid-area:main"] > div > .flex.flex-col.gap-3.w-full > .flex.flex-row:nth-child(2),
html.omni-cfg-route [data-omni-cfg-tabrow] {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
}

/* Permisos de tipos de usuario: no aplastar chips del modal */
html.omni-cfg-route .modalContainer .flex.flex-col.gap-3,
html.omni-cfg-route .modalContent .flex.flex-col.gap-3 {
  gap: 0.75rem !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
}
html.omni-cfg-route .modalContainer [data-omni-cfg-tabrow],
html.omni-cfg-route .modalContent [data-omni-cfg-tabrow] {
  display: flex !important;
  height: auto !important;
  min-height: 2.4rem !important;
  margin: 0 !important;
  padding: 0.25rem 0 !important;
  overflow: visible !important;
  border: 0 !important;
}
html.omni-cfg-route .modalContent .flex.flex-row.flex-wrap {
  display: flex !important;
  flex-wrap: wrap !important;
  height: auto !important;
  min-height: 2.6rem !important;
  overflow: visible !important;
  gap: 0.5rem !important;
}
html.omni-cfg-route .modalContent .flex.flex-row.flex-wrap > *,
html.omni-cfg-route .modalContent button {
  height: auto !important;
  min-height: 2.15rem !important;
  padding-top: 0.35rem !important;
  padding-bottom: 0.35rem !important;
  overflow: visible !important;
  line-height: 1.25 !important;
}

/* Sin pestañas: contenido centrado (no a todo el ancho) y aire vs webphone */
html.omni-cfg-route [style*="grid-area: main"],
html.omni-cfg-route [style*="grid-area:main"] {
  padding: 0.4rem 1rem !important;
  padding-right: 5.5rem !important; /* no lo tape el webphone compacto */
  align-content: start !important;
  justify-items: center !important;
  align-items: start !important;
}

html.omni-wp-sidebar.omni-cfg-route [style*="grid-area: main"],
html.omni-wp-sidebar.omni-cfg-route [style*="grid-area:main"] {
  padding-right: 5.5rem !important;
}

html.omni-wp-sidebar.omni-wp-rail-open.omni-cfg-route [style*="grid-area: main"],
html.omni-wp-sidebar.omni-wp-rail-open.omni-cfg-route [style*="grid-area:main"] {
  padding-right: 22rem !important;
}

html.omni-cfg-route [style*="grid-area: main"] > div,
html.omni-cfg-route [style*="grid-area:main"] > div {
  padding: 0.45rem 0.65rem !important;
  height: auto !important;
  min-height: 0 !important;
  align-self: start !important;
  width: min(1200px, 100%) !important;
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  justify-self: center !important;
}

html.omni-cfg-route [style*="grid-area: main"] .flex.flex-col.gap-3,
html.omni-cfg-route [style*="grid-area:main"] .flex.flex-col.gap-3,
html.omni-cfg-route [style*="grid-area: main"] .flex.flex-col.gap-3.w-full,
html.omni-cfg-route [style*="grid-area:main"] .flex.flex-col.gap-3.w-full {
  gap: 0.25rem !important;
  margin: 0 auto !important;
  padding-top: 0 !important;
  width: 100% !important;
  max-width: 1200px !important;
}

html.omni-cfg-route [style*="grid-area: main"] iframe,
html.omni-cfg-route [style*="grid-area:main"] iframe {
  margin-top: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
  min-height: calc(100vh - 7rem) !important;
  width: 100% !important;
  max-width: 1200px !important;
  display: block !important;
}

html.omni-cfg-route [style*="grid-area: main"] .rounded-xl,
html.omni-cfg-route [style*="grid-area:main"] .rounded-xl {
  margin-top: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
  width: min(1200px, 100%) !important;
  max-width: 1200px !important;
}

/* Rutas entrantes: iframe más amplio (solo telephony tab rutas) */
html.omni-cfg-route[data-omni-cfg-path="/telephony"] [style*="grid-area: main"] > div,
html.omni-cfg-route[data-omni-cfg-path="/telephony"] [style*="grid-area:main"] > div,
html.omni-cfg-route[data-omni-cfg-path="/telephony"] [style*="grid-area: main"] .flex.flex-col.gap-3,
html.omni-cfg-route[data-omni-cfg-path="/telephony"] [style*="grid-area:main"] .flex.flex-col.gap-3,
html.omni-cfg-route[data-omni-cfg-path="/telephony"] [style*="grid-area: main"] .flex.flex-col.gap-3.w-full,
html.omni-cfg-route[data-omni-cfg-path="/telephony"] [style*="grid-area:main"] .flex.flex-col.gap-3.w-full,
html.omni-cfg-route[data-omni-cfg-path="/telephony"] [style*="grid-area: main"] iframe,
html.omni-cfg-route[data-omni-cfg-path="/telephony"] [style*="grid-area:main"] iframe,
html.omni-cfg-route[data-omni-cfg-path="/telephony"] [style*="grid-area: main"] .rounded-xl,
html.omni-cfg-route[data-omni-cfg-path="/telephony"] [style*="grid-area:main"] .rounded-xl {
  width: 100% !important;
  max-width: none !important;
}

/* Flechita en el ítem Configuración del sidebar */
nav[style*="grid-area: sidebar"] a.omni-cfg-root,
nav[style*="grid-area:sidebar"] a.omni-cfg-root {
  position: relative !important;
}

nav[style*="grid-area: sidebar"] a.omni-cfg-root .omni-cfg-root-arrow,
nav[style*="grid-area:sidebar"] a.omni-cfg-root .omni-cfg-root-arrow {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  width: 0;
  height: 0;
  margin-top: -5px;
  border-style: solid;
  border-width: 5px 0 5px 6px;
  border-color: transparent transparent transparent rgba(226, 232, 240, 0.55);
  pointer-events: none;
  z-index: 2;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

nav[style*="grid-area: sidebar"] a.omni-cfg-root:hover .omni-cfg-root-arrow,
nav[style*="grid-area:sidebar"] a.omni-cfg-root:hover .omni-cfg-root-arrow,
nav[style*="grid-area: sidebar"] a.omni-cfg-root.is-hot .omni-cfg-root-arrow,
nav[style*="grid-area:sidebar"] a.omni-cfg-root.is-hot .omni-cfg-root-arrow,
html.omni-cfg-route nav[style*="grid-area: sidebar"] a.omni-cfg-root .omni-cfg-root-arrow,
html.omni-cfg-route nav[style*="grid-area:sidebar"] a.omni-cfg-root .omni-cfg-root-arrow {
  border-left-color: #fff;
}

/* Contenedor cascada */
#omni-cfg-menu {
  position: fixed;
  inset: 0;
  z-index: 10060;
  pointer-events: none;
}

#omni-cfg-menu.is-open {
  pointer-events: none;
}

#omni-cfg-menu .omni-cfg-bridge,
#omni-cfg-menu .omni-cfg-panel {
  pointer-events: auto;
}

#omni-cfg-menu .omni-cfg-bridge {
  position: fixed;
  z-index: 10061;
  background: transparent;
}

#omni-cfg-menu .omni-cfg-bridge-l2 {
  display: none;
  z-index: 10063;
}

#omni-cfg-menu .omni-cfg-panel {
  position: fixed;
  z-index: 10062;
  display: none;
  min-width: 260px;
  width: 260px;
  max-width: 300px;
  max-height: min(78vh, 620px);
  overflow: auto;
  padding: 0.4rem 0;
  border: 1px solid #1e293b;
  border-radius: 10px;
  background: #0c1222;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(148, 163, 184, 0.06);
  color: #cbd5e1;
  scrollbar-width: thin;
  /* Sin transform animado: evita sensación de parpadeo/descuadre */
}

#omni-cfg-menu.is-open .omni-cfg-panel-l1 {
  display: block;
}

#omni-cfg-menu.is-open.has-l2 .omni-cfg-panel-l2 {
  display: block;
  z-index: 10064;
}

#omni-cfg-menu .omni-cfg-panel-head {
  padding: 0.4rem 0.9rem 0.45rem;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#omni-cfg-menu .omni-cfg-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  margin: 0;
  padding: 0.52rem 1.85rem 0.52rem 0.85rem;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 0.88rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

#omni-cfg-menu .omni-cfg-item:hover,
#omni-cfg-menu .omni-cfg-item.is-hot,
#omni-cfg-menu .omni-cfg-item.is-active {
  background: #2563eb;
  color: #fff;
}

#omni-cfg-menu .omni-cfg-item.is-selected {
  background: rgba(37, 99, 235, 0.35);
  color: #f8fafc;
  font-weight: 600;
}

#omni-cfg-menu .omni-cfg-item.is-selected:hover {
  background: #2563eb;
  color: #fff;
}

#omni-cfg-menu .omni-cfg-item-ico {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.45;
  flex: 0 0 auto;
}

#omni-cfg-menu .omni-cfg-item-label {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Flecha ▶ a la derecha (como WP / menú Windows) */
#omni-cfg-menu .omni-cfg-item-arrow {
  position: absolute;
  right: 0.7rem;
  top: 50%;
  width: 0;
  height: 0;
  margin-top: -4px;
  border-style: solid;
  border-width: 4px 0 4px 5px;
  border-color: transparent transparent transparent currentColor;
  opacity: 0.7;
}

#omni-cfg-menu .omni-cfg-item-l1.is-leaf .omni-cfg-item-arrow {
  display: none;
}

/* Triángulo blanco del lado del panel activo (puente visual WP) */
#omni-cfg-menu .omni-cfg-item-l1.is-hot::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 50%;
  margin-top: -7px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 7px 0 7px 8px;
  border-color: transparent transparent transparent #2563eb;
  z-index: 2;
  filter: drop-shadow(1px 0 0 #1e293b);
}

#omni-cfg-menu.opens-left .omni-cfg-item-l1.is-hot::after {
  right: auto;
  left: -1px;
  border-width: 7px 8px 7px 0;
  border-color: transparent #2563eb transparent transparent;
}




/* ——— Reportes: mismo flyout que Configuración ——— */
html.omni-rpt-route [data-omni-rpt-tabrow] {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  max-height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  pointer-events: none !important;
}

html.omni-rpt-agent [data-omni-rpt-agent-hide] {
  display: none !important;
}

/* Reporte de Llamadas: compactar hueco del SPA y subir contenido */
html.omni-rpt-llamadas [data-omni-rpt-llamadas-hide] {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
}
html.omni-rpt-llamadas [data-omni-rpt-llamadas] {
  margin-top: 0.15rem !important;
  background: #0a0f1a !important;
}
html.omni-rpt-llamadas [style*="grid-area: main"],
html.omni-rpt-llamadas main [style*="grid-area: main"],
html.omni-rpt-llamadas main {
  background: #0a0f1a !important;
}
html.omni-rpt-llamadas [style*="grid-area: main"] > .flex.flex-col,
html.omni-rpt-llamadas main [style*="grid-area: main"] > .flex.flex-col {
  gap: 0.35rem !important;
  background: transparent !important;
}
html.omni-rpt-llamadas #omni-reportes-llamadas-frame {
  background: #0a0f1a !important;
  color-scheme: dark;
}

nav[style*="grid-area: sidebar"] a.omni-rpt-root,
nav[style*="grid-area:sidebar"] a.omni-rpt-root {
  position: relative !important;
}

nav[style*="grid-area: sidebar"] a.omni-rpt-root .omni-cfg-root-arrow,
nav[style*="grid-area:sidebar"] a.omni-rpt-root .omni-cfg-root-arrow {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  width: 0;
  height: 0;
  margin-top: -5px;
  border-style: solid;
  border-width: 5px 0 5px 6px;
  border-color: transparent transparent transparent rgba(226, 232, 240, 0.55);
  pointer-events: none;
  z-index: 2;
}

nav[style*="grid-area: sidebar"] a.omni-rpt-root:hover .omni-cfg-root-arrow,
nav[style*="grid-area:sidebar"] a.omni-rpt-root:hover .omni-cfg-root-arrow,
nav[style*="grid-area: sidebar"] a.omni-rpt-root.is-hot .omni-cfg-root-arrow,
nav[style*="grid-area:sidebar"] a.omni-rpt-root.is-hot .omni-cfg-root-arrow,
html.omni-rpt-route nav[style*="grid-area: sidebar"] a.omni-rpt-root .omni-cfg-root-arrow,
html.omni-rpt-route nav[style*="grid-area:sidebar"] a.omni-rpt-root .omni-cfg-root-arrow {
  border-left-color: #fff;
}

#omni-rpt-menu {
  position: fixed;
  inset: 0;
  z-index: 10060;
  pointer-events: none;
}

#omni-rpt-menu .omni-cfg-bridge,
#omni-rpt-menu .omni-cfg-panel {
  pointer-events: auto;
}

#omni-rpt-menu .omni-cfg-bridge {
  position: fixed;
  z-index: 10061;
  background: transparent;
}

#omni-rpt-menu .omni-cfg-bridge-l2 {
  z-index: 10062;
  display: none;
}

#omni-rpt-menu .omni-cfg-panel {
  position: fixed;
  z-index: 10063;
  display: none;
  min-width: 260px;
  width: 260px;
  max-width: 300px;
  max-height: min(78vh, 620px);
  overflow: auto;
  padding: 0.4rem 0;
  border: 1px solid #1e293b;
  border-radius: 10px;
  background: #0c1222;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(148, 163, 184, 0.06);
  color: #cbd5e1;
  scrollbar-width: thin;
}

#omni-rpt-menu.is-open .omni-cfg-panel-l1 {
  display: block;
}

#omni-rpt-menu.is-open.has-l2 .omni-cfg-panel-l2 {
  display: block;
}

#omni-rpt-menu .omni-cfg-panel-head {
  padding: 0.4rem 0.9rem 0.45rem;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#omni-rpt-menu .omni-cfg-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  margin: 0;
  padding: 0.52rem 0.85rem;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 0.88rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

#omni-rpt-menu .omni-cfg-item:hover,
#omni-rpt-menu .omni-cfg-item.is-hot {
  background: #2563eb;
  color: #fff;
}

#omni-rpt-menu .omni-cfg-item.is-selected {
  background: rgba(37, 99, 235, 0.35);
  color: #f8fafc;
  font-weight: 600;
}

#omni-rpt-menu .omni-cfg-item.is-selected:hover {
  background: #2563eb;
  color: #fff;
}

#omni-rpt-menu .omni-cfg-item.is-premium {
  border-bottom: 1px solid #1e293b;
  margin-bottom: 0.15rem;
  padding-bottom: 0.55rem;
}

#omni-rpt-menu .omni-cfg-item-ico {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.45;
  flex: 0 0 auto;
}

#omni-rpt-menu .omni-cfg-item-label {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#omni-rpt-menu .omni-cfg-item-arrow {
  position: absolute;
  right: 0.7rem;
  top: 50%;
  width: 0;
  height: 0;
  margin-top: -4px;
  border-style: solid;
  border-width: 4px 0 4px 5px;
  border-color: transparent transparent transparent currentColor;
  opacity: 0.7;
}

#omni-rpt-menu .omni-cfg-item-l1.is-hot::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 50%;
  margin-top: -7px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 7px 0 7px 8px;
  border-color: transparent transparent transparent #2563eb;
  z-index: 2;
  filter: drop-shadow(1px 0 0 #1e293b);
}

#omni-rpt-menu.opens-left .omni-cfg-item-l1.is-hot::after {
  right: auto;
  left: -1px;
  border-width: 7px 8px 7px 0;
  border-color: transparent #2563eb transparent transparent;
}


/* ——— MOBILE NAV DRAWER ——— */
/* El bundle usa `hidden md:flex` → en celular el menú no existía. */
@media (max-width: 767px) {
  nav[style*="grid-area: sidebar"],
  nav[style*="grid-area:sidebar"] {
    display: flex !important;
    flex-direction: column !important;
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: min(300px, 86vw) !important;
    max-width: 300px !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    z-index: 1400 !important;
    margin: 0 !important;
    padding: 0.85rem 0.75rem !important;
    transform: translateX(-105%) !important;
    transition: transform 0.28s ease !important;
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.45) !important;
    background: #0a0f1a !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    pointer-events: auto !important;
    visibility: visible !important;
  }

  html.omni-mobile-nav-open nav[style*="grid-area: sidebar"],
  html.omni-mobile-nav-open nav[style*="grid-area:sidebar"] {
    transform: translateX(0) !important;
  }

  #omni-mobile-nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1350;
    background: rgba(2, 6, 14, 0.62);
    backdrop-filter: blur(2px);
    border: 0;
    padding: 0;
    margin: 0;
  }
  html.omni-mobile-nav-open #omni-mobile-nav-backdrop {
    display: block;
  }

  #omni-mobile-nav-toggle {
    display: inline-flex !important;
    position: fixed !important;
    left: 0.7rem !important;
    top: 0.7rem !important;
    z-index: 1450 !important;
    width: 44px !important;
    height: 44px !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 12px !important;
    border: 1px solid rgba(148, 163, 184, 0.35) !important;
    background: linear-gradient(160deg, #1e293b, #0f172a) !important;
    color: #e2e8f0 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
    cursor: pointer !important;
  }
  html.omni-mobile-nav-open #omni-mobile-nav-toggle {
    left: min(312px, calc(86vw + 0.55rem)) !important;
  }

  [style*="grid-area: header"],
  [style*="grid-area:header"],
  nav.w-full.h-fit {
    padding-left: 3.4rem !important;
  }

  nav[style*="grid-area: sidebar"] > div:last-child,
  nav[style*="grid-area:sidebar"] > div:last-child {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    clip: auto !important;
    overflow: visible !important;
    display: flex !important;
  }
}

@media (min-width: 768px) {
  #omni-mobile-nav-toggle,
  #omni-mobile-nav-backdrop {
    display: none !important;
  }
}


/* ——— Submenús Config/Reportes en responsive ——— */
/* En ≤1023px: acordeón DENTRO del menú lateral (fácil de tocar). Flyouts desktop se ocultan. */
@media (max-width: 1023px) {
  #omni-cfg-menu,
  #omni-rpt-menu {
    display: none !important;
  }

  .omni-side-inline {
    display: block;
    width: 100%;
    margin: 0.15rem 0 0.45rem;
    padding: 0.25rem 0.2rem 0.35rem;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(51, 65, 85, 0.7);
  }
  .omni-side-inline[hidden] {
    display: none !important;
  }

  .omni-inl-group {
    margin: 0.1rem 0;
  }

  .omni-inl-l1,
  .omni-inl-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 0.55rem 0.7rem;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #cbd5e1;
    font-size: 0.92rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .omni-inl-l1:active,
  .omni-inl-item:active {
    background: rgba(37, 99, 235, 0.35);
  }
  .omni-inl-l1.is-open,
  .omni-inl-l1.is-active {
    background: rgba(37, 99, 235, 0.22);
    color: #f8fafc;
  }
  .omni-inl-chev {
    width: 0.45rem;
    height: 0.45rem;
    border-right: 2px solid #94a3b8;
    border-bottom: 2px solid #94a3b8;
    transform: rotate(-45deg);
    transition: transform 0.18s ease;
    flex: 0 0 auto;
  }
  .omni-inl-l1.is-open .omni-inl-chev {
    transform: rotate(45deg);
    border-color: #7dd3fc;
  }

  .omni-inl-l2 {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    padding: 0.15rem 0.2rem 0.35rem 0.55rem;
    margin: 0 0 0.25rem;
    border-left: 2px solid rgba(56, 189, 248, 0.35);
  }
  .omni-inl-l2[hidden] {
    display: none !important;
  }

  .omni-inl-item {
    justify-content: flex-start;
    min-height: 42px;
    font-weight: 500;
    font-size: 0.88rem;
    color: #94a3b8;
    padding-left: 0.85rem;
  }
  .omni-inl-item.is-selected,
  .omni-inl-item.is-premium.is-selected {
    background: #2563eb;
    color: #fff;
    font-weight: 700;
  }
  .omni-inl-item.is-premium {
    color: #fde68a;
  }
  .omni-inl-flat {
    border-radius: 10px;
  }

  a.omni-cfg-root.is-inline-open,
  a.omni-rpt-root.is-inline-open {
    background: rgba(37, 99, 235, 0.28) !important;
    color: #fff !important;
  }

  /* Contenido config/telephony: full width */
  html.omni-cfg-route [style*="grid-area: main"],
  html.omni-cfg-route [style*="grid-area:main"] {
    padding: 0.35rem 0.45rem !important;
    padding-right: 0.45rem !important;
    justify-items: stretch !important;
  }
  html.omni-wp-sidebar.omni-cfg-route [style*="grid-area: main"],
  html.omni-wp-sidebar.omni-cfg-route [style*="grid-area:main"],
  html.omni-wp-sidebar.omni-wp-rail-open.omni-cfg-route [style*="grid-area: main"],
  html.omni-wp-sidebar.omni-wp-rail-open.omni-cfg-route [style*="grid-area:main"] {
    padding-right: 0.45rem !important;
  }
  html.omni-cfg-route [style*="grid-area: main"] > div,
  html.omni-cfg-route [style*="grid-area:main"] > div,
  html.omni-cfg-route [style*="grid-area: main"] .flex.flex-col.gap-3,
  html.omni-cfg-route [style*="grid-area:main"] .flex.flex-col.gap-3,
  html.omni-cfg-route [style*="grid-area: main"] iframe,
  html.omni-cfg-route [style*="grid-area:main"] iframe,
  html.omni-cfg-route [style*="grid-area: main"] .rounded-xl,
  html.omni-cfg-route [style*="grid-area:main"] .rounded-xl,
  html.omni-cfg-route[data-omni-cfg-path="/telephony"] [style*="grid-area: main"] > div,
  html.omni-cfg-route[data-omni-cfg-path="/telephony"] [style*="grid-area:main"] > div,
  html.omni-cfg-route[data-omni-cfg-path="/telephony"] [style*="grid-area: main"] iframe,
  html.omni-cfg-route[data-omni-cfg-path="/telephony"] [style*="grid-area:main"] iframe {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  html.omni-cfg-route [style*="grid-area: main"] iframe,
  html.omni-cfg-route [style*="grid-area:main"] iframe {
    min-height: calc(100dvh - 5.5rem) !important;
  }
}

@media (max-width: 767px) {
  nav[style*="grid-area: sidebar"] a,
  nav[style*="grid-area:sidebar"] a,
  nav[style*="grid-area: sidebar"] button,
  nav[style*="grid-area:sidebar"] button {
    min-height: 44px !important;
  }
  nav[style*="grid-area: sidebar"] a span,
  nav[style*="grid-area:sidebar"] a span,
  nav[style*="grid-area: sidebar"] a p,
  nav[style*="grid-area:sidebar"] a p {
    display: inline !important;
    opacity: 1 !important;
    width: auto !important;
    max-width: none !important;
    overflow: visible !important;
    font-size: 0.92rem !important;
  }
  html.omni-wp-sidebar [style*="grid-area: main"],
  html.omni-wp-sidebar [style*="grid-area:main"],
  html.omni-wp-sidebar.omni-wp-rail-open [style*="grid-area: main"],
  html.omni-wp-sidebar.omni-wp-rail-open [style*="grid-area:main"] {
    padding-right: 0.35rem !important;
  }
}

/* Desktop: no mostrar acordeón inline */
@media (min-width: 1024px) {
  .omni-side-inline {
    display: none !important;
  }
}


/* ——— IVR fullscreen desde iframe entrantes ——— */
html.omni-ivr-overlay #omni-phone-hub,
html.omni-ivr-overlay #omni-wp-mode-toggle,
html.omni-ivr-overlay #omni-mobile-nav-toggle,
html.omni-ivr-overlay #omni-mobile-nav-backdrop {
  display: none !important;
  pointer-events: none !important;
}
html.omni-ivr-overlay nav[style*="grid-area: sidebar"],
html.omni-ivr-overlay nav[style*="grid-area:sidebar"] {
  display: none !important;
}
html.omni-ivr-overlay [style*="grid-area: main"],
html.omni-ivr-overlay [style*="grid-area:main"] {
  padding: 0 !important;
  margin: 0 !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 5000 !important;
  width: 100vw !important;
  height: 100dvh !important;
  max-width: none !important;
  background: #070b14 !important;
}
html.omni-ivr-overlay [style*="grid-area: main"] iframe,
html.omni-ivr-overlay [style*="grid-area:main"] iframe,
html.omni-ivr-overlay [style*="grid-area: main"] .rounded-xl,
html.omni-ivr-overlay [style*="grid-area:main"] .rounded-xl,
html.omni-ivr-overlay [style*="grid-area: main"] > div,
html.omni-ivr-overlay [style*="grid-area:main"] > div {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  min-height: 100% !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border: 0 !important;
}

/* Responsive: webphone NO empuja el layout (overlay); evita descuadre */
@media (max-width: 1023px) {
  html.omni-wp-sidebar [style*="grid-area: header"],
  html.omni-wp-sidebar [style*="grid-area:header"],
  html.omni-wp-sidebar nav.w-full.h-fit,
  html.omni-wp-sidebar.omni-wp-rail-open [style*="grid-area: header"],
  html.omni-wp-sidebar.omni-wp-rail-open [style*="grid-area:header"],
  html.omni-wp-sidebar.omni-wp-rail-open nav.w-full.h-fit {
    padding-right: 0.5rem !important;
  }
  html.omni-wp-sidebar [style*="grid-area: main"],
  html.omni-wp-sidebar [style*="grid-area:main"],
  html.omni-wp-sidebar.omni-wp-rail-open [style*="grid-area: main"],
  html.omni-wp-sidebar.omni-wp-rail-open [style*="grid-area:main"],
  html.omni-wp-sidebar.omni-cfg-route [style*="grid-area: main"],
  html.omni-wp-sidebar.omni-cfg-route [style*="grid-area:main"],
  html.omni-wp-sidebar.omni-wp-rail-open.omni-cfg-route [style*="grid-area: main"],
  html.omni-wp-sidebar.omni-wp-rail-open.omni-cfg-route [style*="grid-area:main"] {
    padding-right: 0.45rem !important;
  }
}

/* (replaced below) */

/* Troncales modal: alto al contenido (sin hueco vacío) + patrones visibles */
.modalContainer .modal {
  width: min(96vw, 980px) !important;
  max-width: 980px !important;
  height: fit-content !important;
  max-height: 94vh !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
  padding: 14px 18px 12px !important;
  box-sizing: border-box !important;
}
.modalContainer .modal .modalContent {
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  flex: 0 0 auto !important;
  overflow: visible !important;
  gap: 10px !important;
}
.modalContainer .modal form.omni-trunk-form {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.55rem !important;
  flex: 0 0 auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}
.modalContainer .modal .omni-trunk-form-actions {
  position: relative !important;
  bottom: auto !important;
  z-index: 2 !important;
  margin-top: 0.25rem !important;
  padding: 0.45rem 0 0 !important;
  background: transparent !important;
  border-top: 1px solid var(--fvtDarkerWhite, #e6e8ea) !important;
  flex-shrink: 0 !important;
}

/* Usuarios: columna troncal sin scroll horizontal */
html.omni-cfg-route[data-omni-cfg-path="/admin"] table.table,
html.omni-cfg-route table.table {
  table-layout: auto;
  width: 100%;
  font-size: 0.875rem;
}
html.omni-cfg-route[data-omni-cfg-path="/admin"] table.table th,
html.omni-cfg-route[data-omni-cfg-path="/admin"] table.table td {
  padding: 0.45rem 0.5rem !important;
  vertical-align: middle;
}
html.omni-cfg-route[data-omni-cfg-path="/admin"] .overflow-x-auto,
html.omni-cfg-route[data-omni-cfg-path="/admin"] [class*="overflow-x"] {
  overflow-x: visible !important;
}
