/* =============================================================
   Lato en GWT CellTable (SimpleGrid). GWT NO setea role="grid" en
   la version del proyecto, pero mantiene las class names literales
   (cellTableWidget, cellTableCell, cellTableHeader) en el bundle
   compilado -- son @external o no-obfuscated en el ClientBundle.
   Los usamos directo aca sin depender de attributes ARIA.

   Argon.css tiene body{font-family:Open Sans} que gana por cascada
   si no le ponemos !important. Este override lo mata desde CSS
   externo (sin GWT compile). */
.cellTableWidget,
.cellTableWidget * {
	font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

/* Lato en widgets operacionales: SimpleGrid, Chat, SendMessage,
   Conversacion2 (dentro de Chat), y demas cards que comparten esta
   marker class (StatsSearchCases, Atenciones, ConfigUsers, ModernDialog).
   Los 4 target del usuario + un puñado extra por consistencia -- todos
   son surfaces operacionales que ganan en homogeneidad tipografica. */
.om-surface-card,
.om-surface-card * {
	font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}
.om-surface-card i.fa,
.om-surface-card i.fas,
.om-surface-card i.far,
.om-surface-card i.fab,
.om-surface-card span.fa,
.om-surface-card span.fas,
.om-surface-card span.far,
.om-surface-card span.fab {
	font-family: 'Font Awesome 5 Free', 'Font Awesome 5 Brands', FontAwesome !important;
}
/* Monospace preservado dentro de om-surface-card (code, pre, kbd, samp)
   -- inputs de codigo, snippets JSON en Configuracion, etc. */
.om-surface-card code,
.om-surface-card pre,
.om-surface-card kbd,
.om-surface-card samp {
	font-family: ui-monospace, SFMono-Regular, 'SF Mono', Consolas,
		'Liberation Mono', Menlo, monospace !important;
}
/* Fallback ancho: si el nombre de la clase cambia con GWT compile,
   cualquier <table> descendiente de la clase raiz de SimpleGrid
   (gridRoot -- que aplicamos via addStyleNames en la ui.xml) hereda
   Lato. */
[class*="gridRoot"] table,
[class*="gridRoot"] table * {
	font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}
/* Iconos FontAwesome dentro del CellTable: sin este override
   los iconos renderizarian como cuadrados en Lato. Specificity mas
   alta (2 classes + element) gana el tie-break. */
.cellTableWidget i.fa,
.cellTableWidget i.fas,
.cellTableWidget i.far,
.cellTableWidget i.fab,
.cellTableWidget span.fa,
.cellTableWidget span.fas,
.cellTableWidget span.far,
.cellTableWidget span.fab,
[class*="gridRoot"] i.fa,
[class*="gridRoot"] i.fas,
[class*="gridRoot"] i.far,
[class*="gridRoot"] i.fab {
	font-family: 'Font Awesome 5 Free', 'Font Awesome 5 Brands', FontAwesome !important;
}

/* =============================================================
   Lato font (self-hosted en war/assets/fonts/lato/) -- disponible
   globalmente para cualquier widget que la use. Antes solo se
   registraba desde TeamChatV2Panel.injectCssNative (nunca cargaba
   si el operador no entraba a TCv2). Ahora la carga es universal.
   woff2 solo (100% soporte en browsers 2020+), 2 subsets por weight
   (latin base + latin-extended), font-display:swap para evitar FOIT.
   ============================================================= */
@font-face { font-family:'Lato'; font-style:normal; font-weight:400; font-display:swap;
  src:url('../assets/fonts/lato/Lato-Regular.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,
    U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,
    U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:'Lato'; font-style:normal; font-weight:400; font-display:swap;
  src:url('../assets/fonts/lato/Lato-Regular-Ext.woff2') format('woff2');
  unicode-range:U+0100-02AF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,
    U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family:'Lato'; font-style:normal; font-weight:700; font-display:swap;
  src:url('../assets/fonts/lato/Lato-Bold.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,
    U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,
    U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:'Lato'; font-style:normal; font-weight:700; font-display:swap;
  src:url('../assets/fonts/lato/Lato-Bold-Ext.woff2') format('woff2');
  unicode-range:U+0100-02AF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,
    U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family:'Lato'; font-style:normal; font-weight:900; font-display:swap;
  src:url('../assets/fonts/lato/Lato-Black.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,
    U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,
    U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:'Lato'; font-style:normal; font-weight:900; font-display:swap;
  src:url('../assets/fonts/lato/Lato-Black-Ext.woff2') format('woff2');
  unicode-range:U+0100-02AF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,
    U+2113,U+2C60-2C7F,U+A720-A7FF; }

/* =============================================================
   OneMarketer theme tokens + dark mode overrides (v1).

   Strategy:
     1. Tokens on :root for light, overridden under html.om-dark.
     2. Direct body / common-surface overrides under html.om-dark
        so legacy areas with hardcoded light values still flip.
     3. Per-screen migration happens incrementally -- a screen
        that adopts var(--om-bg-card) etc. just works in both modes.

   No filter inversion (the previous pivot to filter blew up the
   layout). Tradeoff: legacy white cards / modals that haven't
   been migrated stay light. Acceptable for v1; we migrate the
   visible ones one by one.
   ============================================================= */

:root {
	--om-bg-app:        #f5f7fb;
	--om-bg-card:       #ffffff;
	--om-bg-soft:       #f8fafc;
	--om-bg-elev:       #f1f5f9;
	--om-bg-inset:      #fafbfd;
	/* Neutral slate-blue-gray canvas for shortcut content panels
	   (Channels, Adjusts, etc). Distinct from bg-app so operators
	   see a clear delineation between the sidebar and the opened
	   content area. Inverse (dark slate) in dark mode below. */
	--om-bg-canvas:     #e6ecf4;

	--om-text-primary:   #1e293b;
	--om-text-secondary: #475569;
	--om-text-muted:     #64748b;
	--om-text-on-accent: #ffffff;

	--om-border:        #e2e8f0;
	--om-border-strong: #cbd5e1;
	--om-border-soft:   rgba(30, 60, 114, 0.10);

	--om-accent:        #25d366;
	--om-accent-strong: #128c7e;
	--om-blue:          #1e3c72;
	--om-blue-strong:   #2a5298;

	--om-danger:        #b91c1c;
	--om-danger-soft:   #fef2f2;
	--om-danger-border: #fecaca;

	--om-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
	--om-shadow:    0 1px 3px rgba(15, 23, 42, 0.06);
	--om-shadow-md: 0 4px 14px rgba(15, 23, 42, 0.10);
	--om-shadow-lg: 0 24px 64px rgba(15, 23, 42, 0.32),
	                0 4px 12px rgba(0, 0, 0, 0.12);

	--om-focus-ring: rgba(37, 211, 102, 0.18);
}

:root.om-dark, body.om-dark {
	--om-bg-app:        #1e293b;
	--om-bg-card:       #1e293b;
	--om-bg-soft:       #1e293b;
	--om-bg-elev:       #1e293b;
	--om-bg-inset:      #1e293b;
	/* Inverse of light-mode canvas: a lighter slate against the very
	   dark app background, so opened content still feels distinct. */
	--om-bg-canvas:     #2c3a4f;

	--om-text-primary:   #f1f5f9;
	--om-text-secondary: #cbd5e1;
	--om-text-muted:     #94a3b8;
	--om-text-on-accent: #ffffff;

	--om-border:        #334155;
	--om-border-strong: #475569;
	--om-border-soft:   rgba(255, 255, 255, 0.08);

	--om-accent:        #25d366;
	--om-accent-strong: #128c7e;
	--om-blue:          #4d96ff;
	--om-blue-strong:   #6fb0ff;

	--om-danger:        #fca5a5;
	--om-danger-soft:   rgba(239, 68, 68, 0.10);
	--om-danger-border: rgba(252, 165, 165, 0.40);

	--om-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.40);
	--om-shadow:    0 1px 3px rgba(0, 0, 0, 0.45);
	--om-shadow-md: 0 4px 14px rgba(0, 0, 0, 0.55);
	--om-shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.70),
	                0 4px 12px rgba(0, 0, 0, 0.45);

	--om-focus-ring: rgba(37, 211, 102, 0.32);
}

/* ---- Global surface overrides for dark mode ----------------
   Legacy CSS (ombase.css / onemarketer.css) hard-codes light
   values on body + common bootstrap surfaces with high
   specificity. These rules win under html.om-dark via !important.
   ----------------------------------------------------------- */
html.om-dark body, body.om-dark {
	background-color: var(--om-bg-app) !important;
	color: var(--om-text-primary) !important;
}

html.om-dark .card,
html.om-dark .modal-content,
html.om-dark .dropdown-menu,
html.om-dark .list-group-item,
html.om-dark .panel,
html.om-dark .popover {
	background-color: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
	border-color: var(--om-border) !important;
}

html.om-dark .form-control,
html.om-dark .form-select,
html.om-dark input.form-control,
html.om-dark textarea.form-control,
html.om-dark select.form-control {
	background-color: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
	border-color: var(--om-border-strong) !important;
}
html.om-dark .form-control::placeholder { color: var(--om-text-muted) !important; }

html.om-dark .table { color: var(--om-text-primary) !important; }
html.om-dark .table thead th,
html.om-dark .table tbody td { border-color: var(--om-border) !important; }
html.om-dark .table-striped tbody tr:nth-of-type(odd) {
	background-color: var(--om-bg-soft) !important;
}

html.om-dark hr { border-color: var(--om-border) !important; }

html.om-dark a { color: var(--om-blue) !important; }
html.om-dark a:hover { color: var(--om-blue-strong) !important; }

/* ---- GWT widget defaults ----------------------------------
   GWT bare widgets render with system colors (white bg, black
   text) which stays light in dark mode. Force the tokens to
   apply across every GWT-prefixed standard widget. */
html.om-dark .gwt-Label,
html.om-dark .gwt-HTML,
html.om-dark .gwt-CheckBox label,
html.om-dark .gwt-RadioButton label {
	color: var(--om-text-primary) !important;
}

html.om-dark .gwt-TextBox,
html.om-dark .gwt-PasswordTextBox,
html.om-dark .gwt-TextArea,
html.om-dark .gwt-ListBox,
html.om-dark .gwt-SuggestBox,
html.om-dark input.gwt-TextBox,
html.om-dark input.gwt-PasswordTextBox,
html.om-dark select.gwt-ListBox,
html.om-dark textarea.gwt-TextArea {
	background-color: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
	border-color: var(--om-border-strong) !important;
}

html.om-dark .gwt-TextBox::placeholder,
html.om-dark .gwt-PasswordTextBox::placeholder,
html.om-dark .gwt-TextArea::placeholder {
	color: var(--om-text-muted) !important;
}

/* Disabled inputs: browser dims to ~60% opacity which on dark surfaces
   leaves text barely readable. Force a high-contrast secondary color
   and full opacity so read-only fields (e.g. the Login column in the
   ConfigUsers "Config Users" tab) stay legible. */
html.om-dark .gwt-TextBox:disabled,
html.om-dark .gwt-PasswordTextBox:disabled,
html.om-dark .gwt-TextArea:disabled,
html.om-dark .gwt-ListBox:disabled,
html.om-dark input:disabled,
html.om-dark select:disabled,
html.om-dark textarea:disabled {
	color: var(--om-text-secondary) !important;
	background-color: var(--om-bg-elev) !important;
	border-color: var(--om-border) !important;
	opacity: 1 !important;
	-webkit-text-fill-color: var(--om-text-secondary) !important; /* Safari/Chrome */
}

/* ---- om-tabs (modern tab bar used across the app) ----------
   Hardcoded in onemarketer.css; flip the slate text + hover
   tinting under dark so the active tab is still readable. */
html.om-dark .om-tabs .gwt-TabBar {
	border-bottom-color: var(--om-border) !important;
}
html.om-dark .om-tabs .gwt-TabBar .gwt-TabBarItem {
	color: var(--om-text-secondary) !important;
}
html.om-dark .om-tabs .gwt-TabBar .gwt-TabBarItem:hover {
	color: var(--om-text-primary) !important;
	background-color: rgba(255, 255, 255, 0.05) !important;
}
html.om-dark .om-tabs .gwt-TabBar .gwt-TabBarItem-selected {
	color: var(--om-text-primary) !important;
	border-bottom-color: var(--om-accent) !important;
}
html.om-dark .om-tabs .gwt-TabPanelBottom {
	background-color: transparent !important;
}

/* ---- Toast / popups ---------------------------------------- */
html.om-dark .gwt-PopupPanel,
html.om-dark .gwt-DialogBox {
	background-color: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
}

/* ---- Buttons baseline ------------------------------------- */
html.om-dark button.gwt-Button:not([class*="btn-"]):not([class*="om-"]) {
	background-color: var(--om-bg-elev) !important;
	color: var(--om-text-primary) !important;
	border-color: var(--om-border-strong) !important;
}

/* ---- Theme marker classes (added from Java) ----------------
   Screens add these non-obfuscated classes to bypass GWT
   CssResource obfuscation. CssResource sometimes strips var()
   inside <ui:style>, so per-screen tokenization in the .ui.xml
   may not flip. These rules guarantee surfaces flip regardless. */
html.om-dark .om-surface-card {
	background-color: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
}
html.om-dark .om-surface-inset {
	background-color: var(--om-bg-inset) !important;
	color: var(--om-text-primary) !important;
	border-color: #0f172a !important;
}
/* SendMessage textarea border specifically — a touch darker than the
   card so it reads as recessed instead of floating. */
html.om-dark textarea.om-surface-inset,
html.om-dark textarea[class*="chatarea"] {
	border-color: #0b1220 !important;
}
html.om-dark .om-surface-elev {
	background-color: var(--om-bg-elev) !important;
	color: var(--om-text-primary) !important;
}

/* GWT ScrollPanel default has no bg, but its inner element does.
   Force the inset color universally on ScrollPanel hosts. */
html.om-dark .gwt-ScrollPanel {
	background-color: var(--om-bg-inset) !important;
	color: var(--om-text-primary) !important;
}

/* ---- DEV-MODE pretty CssResource name catch-all -------------
   In GWT dev mode classes inside <ui:style> get pretty names like
   `com-...-BinderImpl_GenCss_style-<className>`. We rely on that
   to dark-mode common surfaces across Composites/Dialogs without
   touching each Java file individually. In production these get
   obfuscated and these selectors stop matching -- by then most
   screens should have a marker class (see om-surface-*). */
html.om-dark [class*="_BinderImpl_GenCss_style-panel"],
html.om-dark [class*="_BinderImpl_GenCss_style-detail"],
html.om-dark [class*="_BinderImpl_GenCss_style-root"],
html.om-dark [class*="_BinderImpl_GenCss_style-card"],
html.om-dark [class*="_BinderImpl_GenCss_style-container"],
html.om-dark [class*="_BinderImpl_GenCss_style-body"],
html.om-dark [class*="_BinderImpl_GenCss_style-host"],
html.om-dark [class*="_BinderImpl_GenCss_style-wrapper"],
html.om-dark [class*="_BinderImpl_GenCss_style-main"],
html.om-dark [class*="_BinderImpl_GenCss_style-content"] {
	background-color: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
}
html.om-dark [class*="_BinderImpl_GenCss_style-scrollpanel"],
html.om-dark [class*="_BinderImpl_GenCss_style-inset"],
html.om-dark [class*="_BinderImpl_GenCss_style-soft"],
html.om-dark [class*="_BinderImpl_GenCss_style-toolbar"],
html.om-dark [class*="_BinderImpl_GenCss_style-tableHeader"],
html.om-dark [class*="_BinderImpl_GenCss_style-header"],
html.om-dark [class*="_BinderImpl_GenCss_style-footer"] {
	background-color: var(--om-bg-elev) !important;
	color: var(--om-text-primary) !important;
}
html.om-dark [class*="_BinderImpl_GenCss_style-textbox"],
html.om-dark [class*="_BinderImpl_GenCss_style-box"],
html.om-dark [class*="_BinderImpl_GenCss_style-input"],
html.om-dark [class*="_BinderImpl_GenCss_style-select"],
html.om-dark [class*="_BinderImpl_GenCss_style-listbox"],
html.om-dark [class*="_BinderImpl_GenCss_style-textarea"],
html.om-dark [class*="_BinderImpl_GenCss_style-softSelect"] {
	background-color: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
	border-color: var(--om-border-strong) !important;
}
html.om-dark [class*="_BinderImpl_GenCss_style-label"],
html.om-dark [class*="_BinderImpl_GenCss_style-title"],
html.om-dark [class*="_BinderImpl_GenCss_style-subtitle"],
html.om-dark [class*="_BinderImpl_GenCss_style-headCell"],
html.om-dark [class*="_BinderImpl_GenCss_style-tname"] {
	color: var(--om-text-primary) !important;
}
html.om-dark [class*="_BinderImpl_GenCss_style-muted"],
html.om-dark [class*="_BinderImpl_GenCss_style-hint"],
html.om-dark [class*="_BinderImpl_GenCss_style-sub"],
html.om-dark [class*="_BinderImpl_GenCss_style-idCell"],
html.om-dark [class*="_BinderImpl_GenCss_style-kpiLabel"],
html.om-dark [class*="_BinderImpl_GenCss_style-kpiHint"],
html.om-dark [class*="_BinderImpl_GenCss_style-headerSubtitle"],
html.om-dark [class*="_BinderImpl_GenCss_style-opsField"] {
	color: var(--om-text-muted) !important;
}

/* ---- Context / popup menus across the app -------------------
   ChatElement context menu (right-click on a bubble) and any other
   <ui:style> with classes named `contextMenu` / `popupMenu` /
   `popupMenuItem`. The popupMenuItem hover MUST be a translucent
   overlay -- since the unified dark bg tokens collapse card/elev to
   the same value, a plain bg switch is invisible. */
html.om-dark [class*="_BinderImpl_GenCss_style-contextMenu"],
html.om-dark [class*="_BinderImpl_GenCss_style-popupMenu"] {
	background: #334155 !important;
	border-color: rgba(255, 255, 255, 0.10) !important;
	color: var(--om-text-primary) !important;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.50),
	            0 4px 12px rgba(0, 0, 0, 0.30) !important;
}
html.om-dark [class*="_BinderImpl_GenCss_style-popupMenuItem"] {
	background: transparent !important;
	color: var(--om-text-primary) !important;
}
html.om-dark [class*="_BinderImpl_GenCss_style-popupMenuItem"]:hover {
	background: rgba(255, 255, 255, 0.10) !important;
	color: #ffffff !important;
}
html.om-dark [class*="_BinderImpl_GenCss_style-popupMenuItem"]:disabled {
	opacity: 0.45 !important;
	color: var(--om-text-muted) !important;
}

/* =============================================================
   Dashboard surfaces (chart cards, KPI tiles, toolbar, sparklines).
   These classes live in <ui:style>, GWT pre-substitutes var() so
   we target their dev-mode pretty names directly.
   ============================================================= */
html.om-dark [class*="_BinderImpl_GenCss_style-kpiCard"],
html.om-dark [class*="_BinderImpl_GenCss_style-kpiBand"],
html.om-dark [class*="_BinderImpl_GenCss_style-chartCard"],
html.om-dark [class*="_BinderImpl_GenCss_style-tile"],
html.om-dark [class*="_BinderImpl_GenCss_style-cardItem"],
html.om-dark [class*="_BinderImpl_GenCss_style-section"],
html.om-dark [class*="_BinderImpl_GenCss_style-dash"] {
	background-color: var(--om-bg-card) !important;
	background-image: none !important;
	border-color: var(--om-border) !important;
	color: var(--om-text-primary) !important;
}
html.om-dark [class*="_BinderImpl_GenCss_style-opsToolbar"],
html.om-dark [class*="_BinderImpl_GenCss_style-refreshBadge"] {
	background: var(--om-bg-elev) !important;
	border-color: var(--om-border) !important;
	color: var(--om-text-primary) !important;
}
html.om-dark [class*="_BinderImpl_GenCss_style-kpiValue"],
html.om-dark [class*="_BinderImpl_GenCss_style-headerTitle"] {
	color: var(--om-text-primary) !important;
}
/* Chart canvas hosts have no class but sit inside a card; the card
   bg flip above already darkens the surround. Chart.js draws on a
   transparent canvas so the bg shows through. */

/* =============================================================
   TeamChat floating dialog (TeamChatDialog.java injects its CSS).
   All classes use the `om-teamchat__*` BEM convention -- not
   obfuscated since they're static strings. Cover every surface.
   ============================================================= */
html.om-dark .om-teamchat {
	background: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55),
	            0 4px 14px rgba(0, 0, 0, 0.35) !important;
}
/* Header gradient stays brand. */
html.om-dark .om-teamchat__sidebar {
	background: var(--om-bg-elev) !important;
	border-right-color: var(--om-border) !important;
}
html.om-dark .om-teamchat__search {
	background: var(--om-bg-card) !important;
	border-bottom-color: var(--om-border) !important;
}
html.om-dark .om-teamchat__search input {
	color: var(--om-text-primary) !important;
	background: transparent !important;
}
html.om-dark .om-teamchat__section {
	color: var(--om-text-muted) !important;
}
html.om-dark .om-teamchat__chat:hover {
	background: var(--om-bg-inset) !important;
}
html.om-dark .om-teamchat__chat--active {
	background: rgba(99, 102, 241, 0.15) !important;
	border-left-color: #818cf8 !important;
}
html.om-dark .om-teamchat__chat--unread {
	background: rgba(239, 68, 68, 0.10) !important;
	border-left-color: #ef4444 !important;
}
html.om-dark .om-teamchat__chat--unread .om-teamchat__chatname {
	color: var(--om-text-primary) !important;
	font-weight: 800 !important;
}
html.om-dark .om-teamchat__chat--active.om-teamchat__chat--unread {
	background: rgba(239, 68, 68, 0.18) !important;
	border-left-color: #f87171 !important;
}
html.om-dark .om-teamchat__chatname {
	color: var(--om-text-primary) !important;
}
html.om-dark .om-teamchat__chatrole,
html.om-dark .om-teamchat__convsub,
html.om-dark .om-teamchat__placeholder {
	color: var(--om-text-muted) !important;
}
html.om-dark .om-teamchat__main {
	background: var(--om-bg-card) !important;
	background-image: none !important;
}
html.om-dark .om-teamchat__convhead {
	background: var(--om-bg-card) !important;
	border-bottom-color: var(--om-border) !important;
}
html.om-dark .om-teamchat__convname {
	color: var(--om-text-primary) !important;
}
html.om-dark .om-teamchat__bubble {
	background: var(--om-bg-elev) !important;
	color: var(--om-text-primary) !important;
	border-color: rgba(255, 255, 255, 0.08) !important;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.30) !important;
}
/* Self bubble keeps brand gradient. */
html.om-dark .om-teamchat__bubble--omnia {
	background: rgba(126, 34, 206, 0.20) !important;
	border-color: rgba(126, 34, 206, 0.40) !important;
	color: var(--om-text-primary) !important;
}
html.om-dark .om-teamchat__omnia-sources {
	color: #c4b5fd !important;
	border-top-color: rgba(196, 181, 253, 0.30) !important;
}
html.om-dark .om-teamchat__copybtn {
	background: rgba(126, 34, 206, 0.18) !important;
	border-color: rgba(126, 34, 206, 0.35) !important;
	color: #c4b5fd !important;
}
html.om-dark .om-teamchat__copybtn:hover {
	background: rgba(126, 34, 206, 0.28) !important;
	color: #ddd6fe !important;
}
html.om-dark .om-teamchat__bubbleauthor {
	color: #a5b4fc !important;
}
html.om-dark .om-teamchat__bubblefile {
	background: var(--om-bg-inset) !important;
	color: var(--om-text-secondary) !important;
}
html.om-dark .om-teamchat__composer {
	background: var(--om-bg-card) !important;
	border-top-color: var(--om-border) !important;
}
html.om-dark .om-teamchat__composer input[type='text'] {
	background: var(--om-bg-elev) !important;
	color: var(--om-text-primary) !important;
	border-color: var(--om-border-strong) !important;
}
html.om-dark .om-teamchat__composer .om-teamchat__hbtn {
	background: var(--om-bg-elev) !important;
	color: var(--om-text-secondary) !important;
}
html.om-dark .om-teamchat__composer .om-teamchat__hbtn:hover {
	background: var(--om-bg-inset) !important;
	color: var(--om-text-primary) !important;
}
html.om-dark .om-teamchat__status {
	border-color: var(--om-bg-card) !important;
}

/* =============================================================
   SenderTemplate (Java-injected om-tpl-* classes).
   Root already has om-surface-card; cover internal surfaces.
   ============================================================= */
html.om-dark .om-tpl-panel {
	background: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
	box-shadow: 0 20px 60px rgba(0,0,0,0.55),
	            0 6px 20px rgba(0,0,0,0.35) !important;
}
/* Header keeps the brand gradient (intentional accent). */
html.om-dark .om-tpl-body {
	background: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
}
html.om-dark .om-tpl-body::-webkit-scrollbar-thumb {
	background: #475569 !important;
}
html.om-dark .om-tpl-body::-webkit-scrollbar-track {
	background: #0f172a !important;
}
html.om-dark .om-tpl-footer {
	background: #0f172a !important;
	border-top-color: rgba(255,255,255,0.08) !important;
}
html.om-dark .om-tpl-input {
	background: #2d3b54 !important;
	color: var(--om-text-primary) !important;
	border-color: rgba(255,255,255,0.15) !important;
}
html.om-dark .om-tpl-input:focus {
	border-color: var(--om-blue) !important;
	box-shadow: 0 0 0 3px rgba(77,150,255,0.20) !important;
}
html.om-dark .om-tpl-preview {
	background: #0f172a !important;
	color: var(--om-text-secondary) !important;
	border-color: rgba(255,255,255,0.10) !important;
}
html.om-dark .om-tpl-btn--ghost {
	background: var(--om-bg-card) !important;
	color: var(--om-blue) !important;
	border-color: rgba(255,255,255,0.18) !important;
}
html.om-dark .om-tpl-btn--ghost:hover {
	background: #2d3b54 !important;
}

/* =============================================================
   OmCrmTicketPanel (`om-crm-ticket__*` BEM) — operator CRM context.
   ============================================================= */
html.om-dark .om-crm-ticket {
	background: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
	box-shadow: 0 20px 60px rgba(0,0,0,0.55),
	            0 6px 20px rgba(0,0,0,0.35) !important;
}
/* Header gradient stays brand. */
html.om-dark .om-crm-ticket__body {
	background: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
}
html.om-dark .om-crm-ticket__customer,
html.om-dark .om-crm-ticket__fields {
	background: #2d3b54 !important;
	color: var(--om-text-primary) !important;
	border-color: rgba(255,255,255,0.10) !important;
}
html.om-dark .om-crm-ticket__cmeta,
html.om-dark .om-crm-ticket__flabel {
	color: var(--om-text-muted) !important;
}
html.om-dark .om-crm-ticket__cname,
html.om-dark .om-crm-ticket__fvalue {
	color: var(--om-text-primary) !important;
}
html.om-dark .om-crm-ticket__finput {
	background: #0f172a !important;
	color: var(--om-text-primary) !important;
	border-color: rgba(255,255,255,0.18) !important;
}
html.om-dark .om-crm-ticket__hbtn {
	background: rgba(255,255,255,0.10) !important;
	color: #ffffff !important;
}
html.om-dark .om-crm-ticket__hbtn:hover {
	background: rgba(255,255,255,0.20) !important;
}
html.om-dark .om-crm-ticket__blendrow {
	background: #2d3b54 !important;
	border-color: rgba(255,255,255,0.08) !important;
}
html.om-dark .om-crm-ticket__blendtext {
	color: var(--om-text-primary) !important;
}
html.om-dark .om-crm-ticket__blendtime,
html.om-dark .om-crm-ticket__blendch {
	color: var(--om-text-muted) !important;
}
html.om-dark .om-crm-ticket__linkform {
	background: #2d3b54 !important;
	border-color: rgba(255,255,255,0.10) !important;
}
html.om-dark .om-crm-ticket__linkform-help {
	color: var(--om-text-muted) !important;
}
/* Admin sub-panel (OmCrmAdmin renders inside the ticket panel). */
html.om-dark .om-crm-admin__table {
	background: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
}
html.om-dark .om-crm-admin__table th,
html.om-dark .om-crm-admin__table td {
	border-color: rgba(255,255,255,0.08) !important;
	color: var(--om-text-primary) !important;
}
html.om-dark .om-crm-admin__th--num,
html.om-dark .om-crm-admin__th--actions {
	background: #0f172a !important;
}
html.om-dark .om-crm-admin__rowbtn {
	background: rgba(255,255,255,0.06) !important;
	color: var(--om-text-primary) !important;
	border-color: rgba(255,255,255,0.12) !important;
}
html.om-dark .om-crm-admin__rowbtn:hover {
	background: rgba(255,255,255,0.14) !important;
}
html.om-dark .om-crm-admin__badge {
	background: #0f172a !important;
	color: var(--om-text-secondary) !important;
}
html.om-dark .om-crm-admin__code {
	background: #0f172a !important;
	color: #c4b5fd !important;
}

/* =============================================================
   AssetPickerDialog grid tiles + buttons.
   Dialog root already has om-surface-card from ModernDialog.
   The grid + tiles use inline styles via Java; the catch-all
   for white inline bg covers most. Just polish the button. */
html.om-dark .om-asset-btn {
	background: linear-gradient(135deg, #2a5298 0%, #4d96ff 100%) !important;
	color: #ffffff !important;
}
html.om-dark .om-asset-btn:hover {
	background: linear-gradient(135deg, #4d96ff 0%, #6fb0ff 100%) !important;
}

/* AssetPickerDialog grid host — inline background:#fff set from Java
   is normalised to rgb(255,255,255) so attribute selectors can't reach
   it. Marker class added in Java drives this. */
html.om-dark .om-asset-grid {
	background: var(--om-bg-card) !important;
	border-color: rgba(255, 255, 255, 0.10) !important;
}
/* Asset tile labels + text inside the grid -- inline color overrides
   from Java would also need help. Catch by descendant scope. */
html.om-dark .om-asset-grid * {
	color: var(--om-text-primary);
}

/* =============================================================
   WhatsAppGroups + WhatsAppGroupEditor (CellTable + New Group form)
   ============================================================= */
/* The CellTable in WhatsAppGroups uses a custom TableStyle that
   inherits from CellTable.Style. The border between cells comes
   from a hardcoded light value; force a dark token border. */
html.om-dark [class*="WhatsAppGroups_TableRes"],
html.om-dark [class*="WhatsAppGroups_TableRes"] *,
html.om-dark [class*="WhatsAppGroups_BinderImpl_GenCss_style"] {
	border-color: rgba(255, 255, 255, 0.10) !important;
}
html.om-dark [class*="WhatsAppGroups_BinderImpl_GenCss_style"] {
	color: var(--om-text-primary) !important;
}
/* New Group dialog inner labels / inputs / preview area. */
html.om-dark [class*="WhatsAppGroupEditor_BinderImpl_GenCss_style"] {
	color: var(--om-text-primary) !important;
}
html.om-dark [class*="WhatsAppGroupEditor_BinderImpl_GenCss_style-label"],
html.om-dark [class*="WhatsAppGroupEditor_BinderImpl_GenCss_style-hint"],
html.om-dark [class*="WhatsAppGroupEditor_BinderImpl_GenCss_style-sub"] {
	color: var(--om-text-muted) !important;
}
html.om-dark [class*="WhatsAppGroupEditor_BinderImpl_GenCss_style-input"],
html.om-dark [class*="WhatsAppGroupEditor_BinderImpl_GenCss_style-textbox"],
html.om-dark [class*="WhatsAppGroupEditor_BinderImpl_GenCss_style-textarea"] {
	background: var(--om-bg-elev) !important;
	color: var(--om-text-primary) !important;
	border-color: rgba(255, 255, 255, 0.15) !important;
}

/* =============================================================
   BotManager / Graph editor — top chrome + Actions dropdown.

   Toolbar shell (`.om-bot-shell`/`om-bot-toolbar`) has inline
   `background: rgb(239,244,248)` for both light and dark fallback;
   we beat the inline via the html.om-dark + marker selector + the
   light-mode polish gets a thin brand bottom border.
   ============================================================= */

/* Light mode polish (no html.om-dark prefix). */
.om-bot-shell {
	transition: background-color 140ms ease;
}
.om-bot-toolbar {
	border-bottom: 1px solid rgba(30, 60, 114, 0.10) !important;
	box-shadow: 0 1px 3px rgba(30, 60, 114, 0.05);
}
.om-bot-title {
	padding: 6px 0 2px 0;
}

/* Dark mode for the Graph shell + toolbar. */
html.om-dark .om-bot-shell {
	background: var(--om-bg-app) !important;
}
html.om-dark .om-bot-toolbar,
html.om-dark .om-bot-title {
	background: var(--om-bg-card) !important;
	border-bottom-color: rgba(255, 255, 255, 0.08) !important;
	color: var(--om-text-primary) !important;
}
html.om-dark .om-bot-title {
	color: var(--om-blue) !important;
}
html.om-dark .om-bot-toolbar .input-group-text {
	background: transparent !important;
	color: var(--om-text-primary) !important;
}
html.om-dark .om-bot-toolbar .nav-pills .nav-link {
	color: var(--om-text-secondary) !important;
}
html.om-dark .om-bot-toolbar .nav-pills .nav-link.active {
	background: linear-gradient(135deg, #1e3c72, #2a5298) !important;
	color: #ffffff !important;
}
html.om-dark #omGraphCounts {
	color: var(--om-text-muted) !important;
}

/* Actions dropdown (`#om-actions-menu` + `.om-actions-item`). */
.om-actions-item {
	color: #1f2937;
}
.om-actions-item__icon {
	color: #1e3c72;
}
.om-actions-item:hover {
	background: rgba(30, 60, 114, 0.08);
	color: #1e3c72;
}
.om-actions-item:hover .om-actions-item__icon {
	color: #1e3c72;
}

html.om-dark #om-actions-menu {
	background: #334155 !important;
	border-color: rgba(255, 255, 255, 0.10) !important;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.50),
	            0 4px 12px rgba(0, 0, 0, 0.30) !important;
}
html.om-dark .om-actions-item {
	color: var(--om-text-primary) !important;
}
html.om-dark .om-actions-item__icon {
	color: #4d96ff !important;
}
html.om-dark .om-actions-item:hover {
	background: rgba(255, 255, 255, 0.10) !important;
	color: #ffffff !important;
}
html.om-dark .om-actions-item:hover .om-actions-item__icon {
	color: #ffffff !important;
}

/* ---- Graph node palette (#myPaletteDiv) -------------------
   The palette panel has inline `background-color:#eff4f8` which
   reads bright on dark. Force a slate canvas matching the editor. */
html.om-dark #myPaletteDiv {
	background-color: #0a1428 !important;
	border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
}
/* Inspector panel (the right-side properties panel when a node is
   selected). Same #eff4f8 origin. */
html.om-dark #myInspectorDiv {
	background-color: #1e293b !important;
	color: var(--om-text-primary) !important;
	border-left: 1px solid rgba(255, 255, 255, 0.06) !important;
}
html.om-dark #myInspectorDiv * {
	color: var(--om-text-primary);
}
html.om-dark #myInspectorDiv input,
html.om-dark #myInspectorDiv select,
html.om-dark #myInspectorDiv textarea {
	background: #0f1a2c !important;
	color: var(--om-text-primary) !important;
	border-color: rgba(255, 255, 255, 0.15) !important;
}

/* ---- Slot pills (Production / Slot 1..7) ------------------
   Bootstrap .nav-pills .nav-link defaults to dark text on a
   transparent bg, which inverts to "invisible" on dark mode. We
   give the inactive pills a slate-elevated chip + white text, and
   the active one a brand gradient for clear selection. */
html.om-dark .om-bot-toolbar .nav-pills .nav-item {
	margin: 0 3px;
}
html.om-dark .om-bot-toolbar .nav-pills .nav-link,
html.om-dark .om-bot-toolbar .nav-pills > li > a {
	background: rgba(255, 255, 255, 0.05) !important;
	color: var(--om-text-primary) !important;
	border: 1px solid rgba(255, 255, 255, 0.08) !important;
	border-radius: 6px !important;
	padding: 6px 14px !important;
	font-weight: 600 !important;
	font-size: 12px !important;
	transition: background 140ms ease, border-color 140ms ease !important;
}
html.om-dark .om-bot-toolbar .nav-pills .nav-link:hover {
	background: rgba(255, 255, 255, 0.12) !important;
	border-color: rgba(255, 255, 255, 0.20) !important;
}
html.om-dark .om-bot-toolbar .nav-pills .nav-link.active,
html.om-dark .om-bot-toolbar .nav-pills .active > a {
	background: linear-gradient(135deg, #1e3c72, #2a5298) !important;
	color: #ffffff !important;
	border-color: transparent !important;
	box-shadow: 0 2px 8px rgba(30, 60, 114, 0.40) !important;
}

/* ---- EnviosMasivos (Reach & Engage) modernized shell -------
   New layout matches FlowV2Manager: hero header on white card,
   body with search row + tableCard wrapping CellTable + Pager.
   The inline <ui:style> bakes light hex into obfuscated classes,
   so we re-paint via marker classes added from Java. */
html.om-dark .om-em-shell {
	background-color: var(--om-bg-app) !important;
	color: var(--om-text-primary) !important;
}
/* Header row sits as the first direct child of the shell. */
html.om-dark .om-em-shell > div:first-child {
	background-color: var(--om-bg-card) !important;
	border-bottom: 1px solid var(--om-border) !important;
}
html.om-dark .om-em-shell > div:first-child > div {
	color: var(--om-text-primary) !important;
}
html.om-dark .om-em-shell input[type='text'] {
	background-color: var(--om-bg-inset) !important;
	color: var(--om-text-primary) !important;
	border-color: var(--om-border) !important;
}
html.om-dark .om-em-shell input[type='text']::placeholder {
	color: var(--om-text-muted) !important;
}
html.om-dark .om-em-tablecard {
	background-color: var(--om-bg-card) !important;
	border: 1px solid var(--om-border) !important;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .35) !important;
}
html.om-dark .om-em-tablecard,
html.om-dark .om-em-tablecard * {
	color: var(--om-text-primary);
}

/* ---- Details Campaign tabs (DetailsCampaign) ----------------
   Static-class tabs so DetailsCampaign.java can swap the
   active state without fighting Bootstrap's tab plugin. */
.om-dc-tabs {
	display: flex;
	gap: 4px;
	margin-bottom: 14px;
	border-bottom: 1px solid #e2e8f0;
}
.om-dc-tab {
	padding: 9px 16px;
	border: 0;
	background: transparent;
	color: #64748b;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	border-bottom: 2px solid transparent;
	transition: color .14s ease, border-color .14s ease;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
}
.om-dc-tab:hover { color: #1e3c72; text-decoration: none; }
.om-dc-tab i { margin-right: 6px; font-size: 12px; }
.om-dc-tab--active,
.om-dc-tab--active:hover {
	color: #1e3c72;
	border-bottom-color: #2a5298;
}
html.om-dark .om-dc-tab { color: var(--om-text-muted); }
html.om-dark .om-dc-tab:hover { color: var(--om-text-primary); }
html.om-dark .om-dc-tab--active,
html.om-dark .om-dc-tab--active:hover {
	color: #93c5fd;
	border-bottom-color: #60a5fa;
}

/* ---- Quick Campaign modal (CreateCampaignTemplate) ---------
   TeamChat-style custom modal: the qcRoot card is appended to
   RootPanel directly, and this backdrop is appended to body.
   The card itself (rounded corners, shadow, hero strip, X) is
   styled in CreateCampaignTemplate.ui.xml via CssResource —
   only the backdrop lives in static CSS so we can address it
   by stable class name from Java. */
.qc-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.45);
	z-index: 2147483600;
	animation: qcBackdropFadeIn .18s ease;
}
@keyframes qcBackdropFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* =============================================================
   Application chrome — Mail.ui.xml layout shells.

   Sidebar and footer use .bg-om (intentional brand gradient
   blue) and are already dark-friendly out of the box. We only
   need to handle the white center column.
   ============================================================= */

/* Center area (panelBackground hosts SimpleGrid + Chat + SendMessage). */
html.om-dark .panelBackground {
	background-color: var(--om-bg-app) !important;
}
html.om-dark .mainScreen,
html.om-dark .mainScreen > div {
	background-color: var(--om-bg-app) !important;
}

/* GWT DockLayoutPanel / VerticalPanel / HorizontalPanel / FlowPanel /
   HTMLPanel / DataGrid / CellTable do NOT emit a gwt-* class. They
   render as bare divs (verified by inspecting the compiled cache.js).
   The only GWT-class panels in the build are SplitLayoutPanel and
   StackLayoutPanel. Tokenizing the bare-div containers happens via
   Java-side marker classes (om-surface-card / om-surface-inset). */
html.om-dark .gwt-SplitLayoutPanel,
html.om-dark .gwt-StackLayoutPanel {
	background-color: var(--om-bg-app) !important;
	color: var(--om-text-primary) !important;
}

/* =============================================================
   Conversacion2 chat backdrop.

   Conversacion2.setBackground() writes an inline `background`
   style on a ScrollPanel tagged with the `om-chat-back` class.
   Inline styles win unless we use !important here. */
html.om-dark .om-chat-back {
	/* Match the Chat container bg so the header → backdrop seam is
	   seamless. Bubble contrast is achieved by making the bubbles
	   slightly LIGHTER than the backdrop instead. */
	background: var(--om-bg-card) !important;
	background-image: none !important;
	color: var(--om-text-primary) !important;
}

/* =============================================================
   Chat (Chat.java / Conversacion2.java / chat.css)
   ============================================================= */
html.om-dark .chat-card,
html.om-dark .main-chat-card-body,
html.om-dark .chat-card .card,
html.om-dark .list-card,
html.om-dark .list-card .card-body {
	background-color: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
	border-color: var(--om-border) !important;
}
html.om-dark .chat-card .media .user-name,
html.om-dark .chat-card .media .user-status {
	color: var(--om-text-primary) !important;
}
html.om-dark .chat-card .main-chat-card-body .card p {
	color: var(--om-text-primary) !important;
}

/* Incoming / outgoing chat bubbles — give them subtle contrast on dark. */
html.om-dark .chat-card .main-chat-card-body .justify-content-start .card {
	background-color: var(--om-bg-elev) !important;
	color: var(--om-text-primary) !important;
}
html.om-dark .chat-card .main-chat-card-body .justify-content-end .card {
	background-color: var(--om-accent-strong) !important;
	color: #ffffff !important;
}
html.om-dark .chat-card .control-message {
	color: var(--om-text-muted) !important;
}

/* =============================================================
   SimpleGrid (the conversation list table)

   CellTable does NOT emit a gwt-CellTable class. It renders as
   <table>...</table>. Plus the tenant CellTable.css uses literal
   classes like cellTableHeader / cellTableCell / cellTableEven
   /OddRow / cellTableHoveredRow / cellTableSelectedRow. Those
   ARE present in the output -- target them directly without the
   gwt-CellTable ancestor selector.

   We also tag the SimpleGrid Composite root with `om-surface-card`
   from Java so the whole grid area flips, and any descendant table
   inherits the dark surface. */
html.om-dark .om-surface-card table {
	background-color: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
}
html.om-dark .om-surface-card thead,
html.om-dark .om-surface-card th,
html.om-dark .cellTableHeader,
html.om-dark .GJ7G3MOBJDB,
html.om-dark .GJ7G3MOBKDB {
	background-color: var(--om-bg-elev) !important;
	color: var(--om-text-secondary) !important;
	border-color: var(--om-border) !important;
}
html.om-dark .om-surface-card tbody tr,
html.om-dark .om-surface-card td,
html.om-dark .cellTableCell,
html.om-dark .cellTableEvenRow,
html.om-dark .cellTableOddRow {
	background-color: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
	border-color: var(--om-border) !important;
}
/* Hover state — scoped strictly to CellTable's own row classes so it
   doesn't bleed into Chat / Conversacion2 layouts (which also use
   <tr> for non-list arrangements and got grayed-out hover before).
   GWT CellTable adds `cellTableHoveredRow` programmatically on mouse
   enter, AND the :hover pseudo also fires on the row. */
html.om-dark .cellTableHoveredRow,
html.om-dark .cellTableHoveredRow > td,
html.om-dark [class*="cellTableHoveredRow"],
html.om-dark [class*="cellTableHoveredRow"] > td,
html.om-dark [class*="cellTableEvenRow"]:hover,
html.om-dark [class*="cellTableEvenRow"]:hover > td,
html.om-dark [class*="cellTableOddRow"]:hover,
html.om-dark [class*="cellTableOddRow"]:hover > td {
	background-color: rgba(255, 255, 255, 0.12) !important;
	cursor: pointer !important;
}
/* Selected row — subtle lighter shade of the dark canvas plus a
   brand-blue left strip for orientation. The TR-level selector also
   paints every <td> inside so the even/odd row backgrounds (which
   carry their own !important from CellTable.css) don't bleed through. */
html.om-dark .cellTableSelectedRow,
html.om-dark .cellTableSelectedRow > td,
html.om-dark tr[class*="cellTableSelectedRow"]:not([class*="Cell"]),
html.om-dark tr[class*="cellTableSelectedRow"]:not([class*="Cell"]) > td,
html.om-dark tr[class*="cellTableKeyboardSelectedRow"]:not([class*="Cell"]),
html.om-dark tr[class*="cellTableKeyboardSelectedRow"]:not([class*="Cell"]) > td {
	background: #2d3b54 !important;
	color: var(--om-text-primary) !important;
}
/* Brand strip on the first cell only -- a thin vertical accent so the
   user can spot the selected row at a glance. */
html.om-dark .cellTableSelectedRow > td:first-child,
html.om-dark tr[class*="cellTableSelectedRow"]:not([class*="Cell"]) > td:first-child,
html.om-dark tr[class*="cellTableKeyboardSelectedRow"]:not([class*="Cell"]) > td:first-child {
	box-shadow: inset 3px 0 0 0 #4d96ff !important;
}
/* Per-cell keyboard cursor: no outline (matches the legacy
   CellTable.css `outline: none`). The previous yellow outline I
   introduced was bleeding onto every cell of the selected row. */
html.om-dark [class*="cellTableKeyboardSelectedRowCell"] {
	outline: none !important;
}
/* Unread / pending message row indicator (.noread is the class
   SimpleGrid adds via setRowStyles). The tenant-configurable
   unread_style_css visualOpt was being clobbered by my CellTable
   overrides; re-apply a clear blue strip indicator. */
html.om-dark .noread,
html.om-dark tr.noread,
html.om-dark .noread > td {
	background: linear-gradient(90deg, rgba(77, 150, 255, 0.20) 0%,
	                                   rgba(77, 150, 255, 0.06) 100%) !important;
	box-shadow: inset 3px 0 0 0 #4d96ff !important;
}
html.om-dark .noread:hover,
html.om-dark tr.noread:hover {
	background: linear-gradient(90deg, rgba(77, 150, 255, 0.28) 0%,
	                                   rgba(77, 150, 255, 0.10) 100%) !important;
}

/* ---- CellTable / DataGrid wildcards (obfuscation-resilient) -------
   CellTable.Style methods (cellTableHeader / cellTableCell /
   cellTableEvenRow / cellTableOddRow) and DataGrid.Style methods
   (dataGridHeader / dataGridCell / dataGridEvenRow / dataGridOddRow)
   get obfuscated in production to names ending with the literal
   method name (e.g. `Mub-h-...-cellTableHeader` or `Mab-...-dataGridHeader`).
   These [class*="..."] wildcards match either family with no per-screen
   wiring. AiCallManager uses DataGrid; SimpleGrid uses CellTable. */
html.om-dark [class*="cellTableHeader"],
html.om-dark [class*="dataGridHeader"] {
	background: var(--om-bg-elev) !important;
	background-image: none !important;
	color: var(--om-text-secondary) !important;
	border-color: var(--om-border) !important;
}
html.om-dark [class*="cellTableHeader"]:hover,
html.om-dark [class*="dataGridHeader"]:hover {
	background: rgba(255, 255, 255, 0.05) !important;
	color: var(--om-text-primary) !important;
}
html.om-dark [class*="cellTableCell"],
html.om-dark [class*="dataGridCell"] {
	color: var(--om-text-primary) !important;
	border-color: var(--om-border) !important;
}
html.om-dark [class*="cellTableEvenRow"],
html.om-dark [class*="cellTableEvenRow"] > td,
html.om-dark [class*="cellTableOddRow"],
html.om-dark [class*="cellTableOddRow"] > td,
html.om-dark [class*="dataGridEvenRow"],
html.om-dark [class*="dataGridEvenRow"] > td,
html.om-dark [class*="dataGridOddRow"],
html.om-dark [class*="dataGridOddRow"] > td {
	background-color: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
}
/* Slight zebra striping so rows are still distinguishable on the
   collapsed-token dark canvas. */
html.om-dark [class*="cellTableOddRow"],
html.om-dark [class*="cellTableOddRow"] > td,
html.om-dark [class*="dataGridOddRow"],
html.om-dark [class*="dataGridOddRow"] > td {
	background-color: rgba(255, 255, 255, 0.02) !important;
}
/* DataGrid hover + selected row variants (mirror the CellTable wildcards
   already present further above for cellTableHoveredRow / SelectedRow). */
html.om-dark [class*="dataGridHoveredRow"],
html.om-dark [class*="dataGridHoveredRow"] > td,
html.om-dark [class*="dataGridEvenRow"]:hover,
html.om-dark [class*="dataGridEvenRow"]:hover > td,
html.om-dark [class*="dataGridOddRow"]:hover,
html.om-dark [class*="dataGridOddRow"]:hover > td {
	background-color: rgba(255, 255, 255, 0.12) !important;
	cursor: pointer !important;
}
html.om-dark [class*="dataGridSelectedRow"],
html.om-dark [class*="dataGridSelectedRow"] > td,
html.om-dark tr[class*="dataGridKeyboardSelectedRow"]:not([class*="Cell"]),
html.om-dark tr[class*="dataGridKeyboardSelectedRow"]:not([class*="Cell"]) > td {
	background: #2d3b54 !important;
	color: var(--om-text-primary) !important;
}
html.om-dark [class*="dataGridKeyboardSelectedRowCell"] {
	outline: none !important;
}
/* Kill the 2px white/light border that default DataGrid.Style and
   CellTable.Style paint around every cell -- those borders show up as
   bright stripes on alternate rows under the dark canvas. */
html.om-dark [class*="dataGridEvenRowCell"],
html.om-dark [class*="dataGridOddRowCell"],
html.om-dark [class*="cellTableEvenRowCell"],
html.om-dark [class*="cellTableOddRowCell"] {
	border: 0 !important;
}

/* =============================================================
   AiCallManager (AI WhatsApp Calling)

   The .om-aicall marker is added to the screen root from its
   UiBinder. Tabs / toolbar / pager wrap carry their own markers
   so we can flip backgrounds without touching obfuscated
   <ui:style> class names (GWT's CssResource strips
   `html.om-dark` selectors from ui:style blocks).
   ============================================================= */
html.om-dark .om-aicall-tabs {
	background-color: var(--om-bg-elev) !important;
	border-bottom: 1px solid var(--om-border) !important;
}
html.om-dark .om-aicall-tabs .nav-link {
	color: var(--om-text-muted) !important;
	background: transparent !important;
}
html.om-dark .om-aicall-tabs .nav-link:hover {
	background: rgba(255, 255, 255, 0.06) !important;
	color: var(--om-text-primary) !important;
}
html.om-dark .om-aicall-tabs .nav-link.active {
	color: #34d399 !important;
	background: transparent !important;
	border-bottom-color: #25d366 !important;
}
html.om-dark .om-aicall-toolbar {
	background-color: var(--om-bg-elev) !important;
	border-bottom-color: var(--om-border) !important;
}
html.om-dark .om-aicall-pager {
	background-color: var(--om-bg-card) !important;
	border-bottom-color: var(--om-border) !important;
}
/* Search input + Excel/Back toolbar buttons inside this screen. */
html.om-dark .om-aicall input[type="text"] {
	background-color: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
	border-color: var(--om-border-strong) !important;
}
html.om-dark .om-aicall input[type="text"]::placeholder {
	color: var(--om-text-muted) !important;
}
/* Pager arrows / page-number text. SimplePager renders <table> + images;
   ensure the surrounding text is readable. */
html.om-dark .om-aicall-pager,
html.om-dark .om-aicall-pager * {
	color: var(--om-text-primary);
}

/* ---- AiCallManager status pill color tokens -----------------------
   The pills are emitted with inline styles from Java, so they can't be
   overridden by class rules. Instead the inline styles reference these
   tokens via var(--om-pill-*-bg / -fg / -dot) and the values flip
   under html.om-dark to dark-mode-friendly translucent pills. */
:root {
	--om-pill-blue-bg:   #dbeafe;
	--om-pill-blue-fg:   #1e40af;
	--om-pill-blue-dot:  #3b82f6;
	--om-pill-green-bg:  #dcfce7;
	--om-pill-green-fg:  #166534;
	--om-pill-green-dot: #16a34a;
	--om-pill-red-bg:    #fee2e2;
	--om-pill-red-fg:    #991b1b;
	--om-pill-red-dot:   #dc2626;
	--om-pill-yellow-bg: #fef9c3;
	--om-pill-yellow-fg: #854d0e;
	--om-pill-yellow-dot:#ca8a04;
	--om-pill-gray-bg:   #f1f5f9;
	--om-pill-gray-fg:   #475569;
	--om-pill-gray-dot:  #94a3b8;
}
:root.om-dark, body.om-dark {
	--om-pill-blue-bg:   rgba(59, 130, 246, 0.18);
	--om-pill-blue-fg:   #93c5fd;
	--om-pill-blue-dot:  #60a5fa;
	--om-pill-green-bg:  rgba(34, 197, 94, 0.18);
	--om-pill-green-fg:  #86efac;
	--om-pill-green-dot: #4ade80;
	--om-pill-red-bg:    rgba(239, 68, 68, 0.18);
	--om-pill-red-fg:    #fca5a5;
	--om-pill-red-dot:   #f87171;
	--om-pill-yellow-bg: rgba(234, 179, 8, 0.18);
	--om-pill-yellow-fg: #fde68a;
	--om-pill-yellow-dot:#facc15;
	--om-pill-gray-bg:   rgba(148, 163, 184, 0.18);
	--om-pill-gray-fg:   #cbd5e1;
	--om-pill-gray-dot:  #94a3b8;
}

/* ---- SimpleGrid CssResource classes (debug-mode pretty names) ----
   GWT dev mode names CssResource classes as
   com-<fq.class>_BinderImpl_GenCss_style-<name>. We can pin them
   directly so dark mode flips without recompiling Java. */

/* The top white panel that wraps the search row + filters + pager. */
html.om-dark .com-onemarketer-social-client-SimpleGrid_BinderImpl_GenCss_style-panel {
	background-color: var(--om-bg-card) !important;
	border-bottom-color: var(--om-border) !important;
}
/* Options strip (filters / radios / checkbox row inside .panel). */
html.om-dark .com-onemarketer-social-client-SimpleGrid_BinderImpl_GenCss_style-options {
	background-color: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
}
/* Pager wrapper (per-page selector + nav). */
html.om-dark .com-onemarketer-social-client-SimpleGrid_BinderImpl_GenCss_style-pager {
	background-color: transparent !important;
	color: var(--om-text-secondary) !important;
}
/* Column-header strip on the table. */
html.om-dark .com-onemarketer-social-client-SimpleGrid_BinderImpl_GenCss_style-header {
	background-color: var(--om-bg-elev) !important;
	border-bottom-color: var(--om-blue) !important;
}
html.om-dark .com-onemarketer-social-client-SimpleGrid_BinderImpl_GenCss_style-header td {
	color: var(--om-text-secondary) !important;
}
/* Table cells (the rows). */
html.om-dark .com-onemarketer-social-client-SimpleGrid_BinderImpl_GenCss_style-table td {
	color: var(--om-text-primary) !important;
	border-bottom-color: var(--om-border) !important;
}
/* Inner table tint. */
html.om-dark .com-onemarketer-social-client-SimpleGrid_BinderImpl_GenCss_style-inner {
	background-color: var(--om-bg-elev) !important;
}
/* Radios / checkbox / pager anchors. */
html.om-dark .com-onemarketer-social-client-SimpleGrid_BinderImpl_GenCss_style-anchor,
html.om-dark .com-onemarketer-social-client-SimpleGrid_BinderImpl_GenCss_style-anchor label {
	color: var(--om-text-secondary) !important;
}
html.om-dark .com-onemarketer-social-client-SimpleGrid_BinderImpl_GenCss_style-anchor:hover {
	background-color: var(--om-bg-elev) !important;
}
/* Page-size ListBox in the pager. */
html.om-dark .com-onemarketer-social-client-SimpleGrid_BinderImpl_GenCss_style-listsmall {
	background-color: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
	border-color: var(--om-border-strong) !important;
}
/* Search textbox. */
html.om-dark .com-onemarketer-social-client-SimpleGrid_BinderImpl_GenCss_style-box {
	background-color: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
	border-color: var(--om-border-strong) !important;
}
/* Popup menu opened from list-actions (per-list admin actions). */
html.om-dark .com-onemarketer-social-client-SimpleGrid_BinderImpl_GenCss_style-popupMenu {
	background-color: var(--om-bg-card) !important;
	border-color: var(--om-border) !important;
}
html.om-dark .com-onemarketer-social-client-SimpleGrid_BinderImpl_GenCss_style-popupMenuItem {
	color: var(--om-text-primary) !important;
}
html.om-dark .com-onemarketer-social-client-SimpleGrid_BinderImpl_GenCss_style-popupMenuItem:hover {
	background-color: var(--om-bg-elev) !important;
	color: var(--om-text-primary) !important;
}
/* SimplePagerBox pill. */
html.om-dark .com-onemarketer-social-client-SimpleGrid_BinderImpl_GenCss_style-simplePagerBox {
	background-color: var(--om-bg-elev) !important;
	border-color: var(--om-border) !important;
	color: var(--om-text-secondary) !important;
}

/* ---- CellTable header (the column titles row) -----------------
   `cellTableHeader` survives obfuscation (verified via grep on
   cache.js). The dev-mode pretty name is also matched for safety. */
html.om-dark .cellTableHeader,
html.om-dark th.cellTableHeader,
html.om-dark [class*="cellTableHeader"] {
	background: var(--om-bg-elev) !important;
	background-image: none !important;
	color: var(--om-text-secondary) !important;
	border-bottom-color: var(--om-border) !important;
}
html.om-dark .cellTableHeader:hover,
html.om-dark th.cellTableHeader:hover,
html.om-dark [class*="cellTableHeader"]:hover {
	background: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
}
/* Row backgrounds (even/odd) — they're obfuscated in prod but the
   dev-mode pretty names contain the substring; rely on a generic
   substring matcher. */
html.om-dark [class*="cellTableEvenRow"],
html.om-dark [class*="cellTableOddRow"] {
	background-color: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
}
html.om-dark [class*="cellTableEvenRow"]:hover,
html.om-dark [class*="cellTableOddRow"]:hover {
	background-color: var(--om-bg-elev) !important;
}
html.om-dark [class*="cellTableCell"] {
	color: var(--om-text-primary) !important;
	border-bottom-color: var(--om-border) !important;
}

/* ---- SimpleGrid list title (the <h2 nameList>) ----------------
   The list name above the toolbar. Default <h2> color comes from
   ombase.css (#525f7f) which reads barely visible on dark. Force
   primary text so it pops. */
html.om-dark .om-surface-card h2,
html.om-dark .com-onemarketer-social-client-SimpleGrid_BinderImpl_GenCss_style-panel h2 {
	color: var(--om-text-primary) !important;
	font-weight: 700 !important;
}

/* ---- TopPanel (navbar) ------------------------------------------
   `.bg-om` is the brand blue gradient. In dark mode we keep brand
   blue but flatten to a single slate-blue tone that reads as
   "dark mode chrome" rather than the bright daytime gradient. */
html.om-dark .bg-om,
html.om-dark .navbar.bg-om {
	/* Same subtle brand-tinted gradient as .sidebar but diagonal so it
	   reads on a wide-and-short bar (TopPanel is 90px tall; footer is
	   28px — both also use .bg-om). Brand blue corner fading into the
	   unified dark surface keeps OneMarketer identity without breaking
	   the rest of the dark chrome. */
	background: linear-gradient(135deg, #1e3c72 0%, #1e293b 35%, #1e293b 100%) !important;
	border-color: rgba(255, 255, 255, 0.06) !important;
}

/* Navbar inner text + anchors stay readable. */
html.om-dark .navbar .nav-link,
html.om-dark .navbar .nav-link span,
html.om-dark .navbar .nav-link i,
html.om-dark .navbar .navbar-nav .nav-link,
html.om-dark .navbar-text {
	color: rgba(255, 255, 255, 0.92) !important;
}

/* User account / status menu trigger area inside the navbar. */
html.om-dark .navbar .media-body span,
html.om-dark .navbar .badge-dot .status,
html.om-dark .navbar .badge-dot .timeStatus {
	color: rgba(255, 255, 255, 0.95) !important;
}

/* TopPanel user-account dropdown.

   The legacy onemarketer.css has:
     .bg-om .dropdown-menu, .bg-om .dropdown-menu *,
     .bg-om .dropdown-menu a, .bg-om .dropdown-menu h6 {
        color: #172b4d !important;
     }
   That rule sets EVERY descendant to dark navy (#172b4d) and on a
   dark card background that's the dark-on-dark invisibility the
   user is reporting. We override with higher specificity:
     html.om-dark .bg-om .dropdown-menu (0,3,2) > legacy (0,2,1)
*/
html.om-dark .bg-om .dropdown-menu,
html.om-dark .bg-om .dropdown-menu *,
html.om-dark .bg-om .dropdown-menu a,
html.om-dark .bg-om .dropdown-menu a span,
html.om-dark .bg-om .dropdown-menu .gwt-Anchor,
html.om-dark .bg-om .dropdown-menu .dropdown-item,
html.om-dark .bg-om .dropdown-menu .dropdown-item span,
html.om-dark .bg-om .dropdown-menu .dropdown-item i,
html.om-dark .bg-om .dropdown-menu h6,
html.om-dark .bg-om .dropdown-menu h3,
html.om-dark .bg-om .dropdown-menu h3 span,
html.om-dark .dropdown-menu,
html.om-dark .dropdown-menu *,
html.om-dark .dropdown-menu a,
html.om-dark .dropdown-menu .gwt-Anchor,
html.om-dark .dropdown-menu h6,
html.om-dark .dropdown-menu h3,
html.om-dark .dropdown-menu h3 span {
	color: var(--om-text-primary) !important;
}
/* Dropdown background + border. Bumped a notch lighter than --om-bg-card
   so the floating menu visibly detaches from the rest of the dark
   chrome (the user wants it not to blend with the page background). */
html.om-dark .bg-om .dropdown-menu,
html.om-dark .dropdown-menu {
	background-color: #334155 !important;
	border-color: rgba(255, 255, 255, 0.08) !important;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45),
	            0 4px 12px rgba(0, 0, 0, 0.25) !important;
}
/* Hover state recalibrated against the lighter menu background. */
html.om-dark .bg-om .dropdown-menu .dropdown-item:hover,
html.om-dark .bg-om .dropdown-menu .dropdown-item:focus,
html.om-dark .bg-om .dropdown-menu a:hover,
html.om-dark .bg-om .dropdown-menu .gwt-Anchor:hover,
html.om-dark .dropdown-menu a:hover,
html.om-dark .dropdown-menu .gwt-Anchor:hover,
html.om-dark .dropdown-menu .dropdown-item:hover {
	background-color: rgba(255, 255, 255, 0.08) !important;
	color: var(--om-text-primary) !important;
}
/* Dropdown-header (the "Welcome / nombre asesor" block at the top). */
html.om-dark .bg-om .dropdown-menu .dropdown-header,
html.om-dark .dropdown-menu .dropdown-header {
	color: var(--om-text-secondary) !important;
	background-color: transparent !important;
}
/* Hover + focus on the lighter dropdown bg. The legacy onemarketer.css
   has `.bg-om .dropdown-menu .dropdown-item:hover { background: #f6f9fc
   !important; color: #1e3c72 !important; }` which we beat via the
   `html.om-dark` prefix (higher specificity at same !important).
   Highlight pattern: very light pill background with brand-blue text
   so the hovered item reads as a tappable target on the dark menu. */
html.om-dark .bg-om .dropdown-menu .dropdown-item:hover,
html.om-dark .bg-om .dropdown-menu .dropdown-item:focus,
html.om-dark .bg-om .dropdown-menu a:hover,
html.om-dark .bg-om .dropdown-menu a:focus,
html.om-dark .bg-om .dropdown-menu .gwt-Anchor:hover,
html.om-dark .bg-om .dropdown-menu .gwt-Anchor:focus,
html.om-dark .dropdown-menu .dropdown-item:hover,
html.om-dark .dropdown-menu .dropdown-item:focus,
html.om-dark .dropdown-menu a:hover,
html.om-dark .dropdown-menu a:focus,
html.om-dark .dropdown-menu .gwt-Anchor:hover,
html.om-dark .dropdown-menu .gwt-Anchor:focus {
	background-color: #f1f5f9 !important;
	color: #1e3c72 !important;
}
/* Also paint the descendants (spans, icons) so they don't keep the
   white text inherited from the menulink CssResource class. */
html.om-dark .bg-om .dropdown-menu .dropdown-item:hover *,
html.om-dark .bg-om .dropdown-menu a:hover *,
html.om-dark .bg-om .dropdown-menu .gwt-Anchor:hover *,
html.om-dark .dropdown-menu .dropdown-item:hover *,
html.om-dark .dropdown-menu a:hover *,
html.om-dark .dropdown-menu .gwt-Anchor:hover * {
	color: #1e3c72 !important;
}

/* ----- Sidebar (containerSidebar DockLayoutPanel) ----------
   Mail.ui.xml puts `styleName="sidebar"` but no CSS rule defines a
   background for it -- the visual gradient comes from each inner
   stack panel. In dark mode the container shows the white
   panelBackground through, so we paint it dark explicitly. */
html.om-dark .sidebar {
	/* Subtle vertical brand-tinted gradient: a hint of the OneMarketer
	   blue at the top fading into the unified dark surface. Makes the
	   sidebar feel like a deliberate panel instead of flat black. */
	background: linear-gradient(180deg, #1e3c72 0%, #1e293b 35%, #1e293b 100%) !important;
}
/* The center column behind everything (was #ffffff in global.css). */
html.om-dark .panelBackground {
	background-color: var(--om-bg-app) !important;
}

/* ----- ChatElement system-message chip (.chat_forDate) ----
   global.css gives it a white-translucent chip with slate text.
   On dark the chip blends and text reads as too light. Repaint
   with a dark chip + bright primary text so day separators and
   "Transferred to..." style messages pop. */
html.om-dark .chat_forDate {
	background: rgba(15, 23, 42, 0.75) !important;
	color: var(--om-text-primary) !important;
	border-color: rgba(255, 255, 255, 0.10) !important;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.40) !important;
}

/* ----- ChatElement bubbles (global.css classes) --------------
   - chat_forRemote: incoming private (client → operator)
   - chat_forLocal:  outgoing private (operator → client)
   - chat_forRemotePublic / chat_forLocalPublic: social comments
   The Public variants already use the brand blue gradient so they
   read fine on dark; only the private ones need surface flipping. */
html.om-dark .chat_forRemote {
	/* Slightly lighter than the unified --om-bg-card (#1e293b) so the
	   bubble reads as elevated on the matching Chat/Conversacion2 bg. */
	background: #2d3b54 !important;
	color: var(--om-text-primary) !important;
	border-color: rgba(255, 255, 255, 0.10) !important;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.40) !important;
}
html.om-dark .chat_forLocal {
	background: #128c7e !important;          /* WhatsApp green outgoing */
	color: #ffffff !important;
	border-color: rgba(255, 255, 255, 0.10) !important;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.40) !important;
}
/* Meta line (timestamps / status icons inside bubbles). */
html.om-dark .chat_forRemote .chat_meta,
html.om-dark .chat_forLocal .chat_meta {
	color: rgba(255, 255, 255, 0.65) !important;
}
/* Text content inside bubbles — global.css doesn't always paint a
   text color on inner spans/divs; force readable. */
html.om-dark .chat_forRemote *,
html.om-dark .chat_forLocal * {
	color: inherit !important;
}

/* Chat root container (.detail from Chat.ui.xml). Tagged with
   om-surface-card from Chat.java. */
html.om-dark .om-surface-card.gwt-DockLayoutPanel,
html.om-dark .om-surface-card {
	background-color: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
}

/* Chat header strip (.panel inside Chat.ui.xml renders white-to-light
   gradient). The CssResource class is obfuscated so target via the
   dev-mode pretty name plus a generic descendant rule. */
html.om-dark .com-onemarketer-social-client-Chat_BinderImpl_GenCss_style-panel,
html.om-dark .om-surface-card > [class*="GenCss_style-panel"] {
	background: var(--om-bg-card) !important;
	background-image: none !important;
	border-bottom-color: var(--om-border) !important;
}
html.om-dark .com-onemarketer-social-client-Chat_BinderImpl_GenCss_style-headerItem {
	color: var(--om-blue) !important;
}
html.om-dark .com-onemarketer-social-client-Chat_BinderImpl_GenCss_style-lastSeen {
	color: var(--om-text-muted) !important;
}
html.om-dark .com-onemarketer-social-client-Chat_BinderImpl_GenCss_style-sp {
	background-color: var(--om-bg-elev) !important;
}
html.om-dark .com-onemarketer-social-client-Chat_BinderImpl_GenCss_style-textbox,
html.om-dark .com-onemarketer-social-client-Chat_BinderImpl_GenCss_style-listsuggest,
html.om-dark .com-onemarketer-social-client-Chat_BinderImpl_GenCss_style-listsmall {
	background-color: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
	border-color: var(--om-border-strong) !important;
}
html.om-dark .com-onemarketer-social-client-Chat_BinderImpl_GenCss_style-btnsmall {
	background-color: var(--om-bg-elev) !important;
	color: var(--om-text-primary) !important;
	border-color: var(--om-border-strong) !important;
}
html.om-dark .com-onemarketer-social-client-Chat_BinderImpl_GenCss_style-btnsmall:hover {
	background-color: var(--om-bg-inset) !important;
}
html.om-dark .com-onemarketer-social-client-Chat_BinderImpl_GenCss_style-lblsmall {
	color: var(--om-text-muted) !important;
}
html.om-dark .com-onemarketer-social-client-Chat_BinderImpl_GenCss_style-lblsesion,
html.om-dark .com-onemarketer-social-client-Chat_BinderImpl_GenCss_style-lblsesion2 {
	color: var(--om-text-primary) !important;
}

/* ----- Chat header session-state badge (.badge-dot) ------------
   The "Caso abierto" / "Caso cerrado" pill in the chat header is
   an <h6 class="badge badge-dot"> with a <strong> child. Bootstrap
   ombase.css paints the strong dark navy (#32325d) which on a dark
   surface reads as invisible. */
html.om-dark .badge-dot,
html.om-dark .badge-dot strong,
html.om-dark h6.badge,
html.om-dark h6.badge strong,
html.om-dark .om-surface-card .badge,
html.om-dark .om-surface-card .badge strong,
html.om-dark .om-surface-card h6 {
	color: var(--om-text-primary) !important;
}

/* =============================================================
   SendMessage (composer at the bottom)

   The textarea + toolbar live there. The textarea uses
   contenteditable or .gwt-TextArea. Buttons may be unstyled.
   ============================================================= */
html.om-dark .sendmessage,
html.om-dark .send-message,
html.om-dark [class*="sendMessage"],
html.om-dark [class*="send-message"] {
	background-color: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
	border-color: var(--om-border) !important;
}
html.om-dark .sendmessage textarea,
html.om-dark .sendmessage [contenteditable="true"] {
	background-color: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
}

/* =============================================================
   Sidebar stack panels (Mailboxes / Tasks / Adjusts / etc.)

   The sidebar gradient already reads dark; we just need to make
   sure nested labels, dropdowns and inputs stay readable.
   ============================================================= */
html.om-dark .sidebar .form-control,
html.om-dark .sidebar input,
html.om-dark .sidebar select {
	background-color: rgba(255, 255, 255, 0.06) !important;
	color: rgba(255, 255, 255, 0.92) !important;
	border-color: rgba(255, 255, 255, 0.18) !important;
}

/* GWT Tree (used by Mailboxes) — items are styled inline; this is a
   safety net for default tree colors. */
html.om-dark .gwt-Tree .gwt-TreeItem {
	color: rgba(255, 255, 255, 0.92) !important;
}

/* =============================================================
   Generic catch-all: any inline white background written from Java.

   Java code that does setProperty("background", "#ffffff") or
   "background-color: #fff" ends up as inline style. Catch the
   common literals here so legacy widgets that hadn't been
   migrated still flip. Covers #fff, #ffffff, #FFF, #FFFFFF,
   "white", rgb(255,255,255) and rgba(255,255,255,1).
   ============================================================= */
html.om-dark [style*="background-color: #fff"],
html.om-dark [style*="background-color:#fff"],
html.om-dark [style*="background-color: #FFF"],
html.om-dark [style*="background-color:#FFF"],
html.om-dark [style*="background-color: white"],
html.om-dark [style*="background-color:white"],
html.om-dark [style*="background: #fff"],
html.om-dark [style*="background:#fff"],
html.om-dark [style*="background: #FFF"],
html.om-dark [style*="background:#FFF"],
html.om-dark [style*="background: white"],
html.om-dark [style*="background:white"],
html.om-dark [style*="background-color: rgb(255"],
html.om-dark [style*="background-color: rgba(255, 255, 255, 1"] {
	background-color: var(--om-bg-card) !important;
	background-image: none !important;
}

/* Inline near-white backgrounds (legacy hex palette: #f8fafc, #f5f5f5,
   #f1f5f9, #fafbfd, #f8f9fe, #fcfcfc, etc.). They appear in dozens of
   setProperty calls across legacy screens. Catch each one explicitly so
   the corresponding card / panel goes dark inset. */
html.om-dark [style*="background-color: #f8fafc"],
html.om-dark [style*="background-color: #fafbfd"],
html.om-dark [style*="background-color: #f8f9fe"],
html.om-dark [style*="background-color: #f1f5f9"],
html.om-dark [style*="background-color: #f5f5f5"],
html.om-dark [style*="background-color: #f4f6fb"],
html.om-dark [style*="background-color: #eef2fa"],
html.om-dark [style*="background-color: #f0f0f0"],
html.om-dark [style*="background:#f8fafc"],
html.om-dark [style*="background:#fafbfd"],
html.om-dark [style*="background:#f8f9fe"],
html.om-dark [style*="background:#f1f5f9"] {
	background-color: var(--om-bg-inset) !important;
	background-image: none !important;
}

/* Dark text on light surfaces — inline color: #525f7f / #344054 / #1e293b
   etc. would stay dark on dark in dark mode. Flip them to primary text. */
html.om-dark [style*="color: #525f7f"],
html.om-dark [style*="color:#525f7f"],
html.om-dark [style*="color: #344054"],
html.om-dark [style*="color:#344054"],
html.om-dark [style*="color: #1e293b"],
html.om-dark [style*="color:#1e293b"],
html.om-dark [style*="color: #0f172a"],
html.om-dark [style*="color:#0f172a"],
html.om-dark [style*="color: #334155"],
html.om-dark [style*="color:#334155"],
html.om-dark [style*="color: #1f3041"],
html.om-dark [style*="color:#1f3041"],
html.om-dark [style*="color: #212529"],
html.om-dark [style*="color:#212529"],
html.om-dark [style*="color: #000"],
html.om-dark [style*="color:#000"],
html.om-dark [style*="color: black"],
html.om-dark [style*="color:black"] {
	color: var(--om-text-primary) !important;
}

/* Mid-tone text (#475569 / #6b7c93 / #64748b) → secondary so still
   readable but with hierarchy. */
html.om-dark [style*="color: #475569"],
html.om-dark [style*="color:#475569"],
html.om-dark [style*="color: #6b7c93"],
html.om-dark [style*="color:#6b7c93"],
html.om-dark [style*="color: #64748b"],
html.om-dark [style*="color:#64748b"] {
	color: var(--om-text-secondary) !important;
}

/* Brand blue / primary blue (#1e3c72 / #2a5298) used as accent text →
   flip to lighter blue token in dark for legibility. */
html.om-dark [style*="color: #1e3c72"],
html.om-dark [style*="color:#1e3c72"],
html.om-dark [style*="color: #2a5298"],
html.om-dark [style*="color:#2a5298"],
html.om-dark [style*="color: #0085da"],
html.om-dark [style*="color:#0085da"],
html.om-dark [style*="color: #0085DA"],
html.om-dark [style*="color:#0085DA"] {
	color: var(--om-blue) !important;
}

/* Inline borders: rgba(30, 60, 114, 0.X) → token border. */
html.om-dark [style*="border: 1px solid rgba(30, 60, 114"],
html.om-dark [style*="border: 1px solid #e2e8f0"],
html.om-dark [style*="border:1px solid #e2e8f0"],
html.om-dark [style*="border: 1px solid #f1f5f9"],
html.om-dark [style*="border-color: #e2e8f0"],
html.om-dark [style*="border-color:#e2e8f0"],
html.om-dark [style*="border-color: #f1f5f9"],
html.om-dark [style*="border-bottom: 1px solid #f1f5f9"],
html.om-dark [style*="border-top: 1px solid #f1f5f9"] {
	border-color: var(--om-border) !important;
}

/* =============================================================
   Bootstrap / Argon "btn-*" + general button surfaces.
   Many Java widgets call setClassName("btn btn-sm btn-default")
   etc.; the default + light variants render white in dark.
   ============================================================= */
html.om-dark .btn-default,
html.om-dark .btn-light,
html.om-dark .btn-secondary,
html.om-dark .btn-outline-default,
html.om-dark .btn-outline-light,
html.om-dark .btn-outline-secondary {
	background-color: var(--om-bg-elev) !important;
	color: var(--om-text-primary) !important;
	border-color: var(--om-border-strong) !important;
}
html.om-dark .btn-default i,
html.om-dark .btn-light i,
html.om-dark .btn-secondary i,
html.om-dark .btn-outline-default i,
html.om-dark .btn-outline-light i,
html.om-dark .btn-outline-secondary i {
	color: var(--om-text-primary) !important;
}

/* Cards & wells. */
html.om-dark .card-header,
html.om-dark .card-footer,
html.om-dark .card-body {
	background-color: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
	border-color: var(--om-border) !important;
}

/* Bootstrap badges: pure-color badges keep their hue, but light ones
   need contrast tweaks. */
html.om-dark .badge-light,
html.om-dark .badge-secondary,
html.om-dark .badge-default {
	background-color: var(--om-bg-elev) !important;
	color: var(--om-text-primary) !important;
}

/* Dropdowns. */
html.om-dark .dropdown-menu {
	background-color: var(--om-bg-card) !important;
	border-color: var(--om-border) !important;
}
html.om-dark .dropdown-item,
html.om-dark .dropdown-menu .gwt-Anchor,
html.om-dark .dropdown-menu a {
	color: var(--om-text-primary) !important;
}
html.om-dark .dropdown-item:hover,
html.om-dark .dropdown-item:focus,
html.om-dark .dropdown-menu a:hover {
	background-color: var(--om-bg-elev) !important;
	color: var(--om-text-primary) !important;
}
html.om-dark .dropdown-divider {
	border-color: var(--om-border) !important;
}
html.om-dark .dropdown-header,
html.om-dark .dropdown-header.noti-title,
html.om-dark .dropdown-header h6 {
	color: var(--om-text-secondary) !important;
	background-color: transparent !important;
}
/* TopPanel dropdowns nest a media-body with status pills (pause / online).
   The "status" span text is part of the dropdown menu, force readable. */
html.om-dark .dropdown-menu .status,
html.om-dark .dropdown-menu .timeStatus,
html.om-dark .dropdown-menu .badge-dot span {
	color: var(--om-text-primary) !important;
}

/* GWT split bars (the drag handle between center / east / south of the
   main split layout). They render as a tiny div with no class but
   inline gradient. Force a dark sliver. */
html.om-dark .gwt-SplitLayoutPanel-HDragger,
html.om-dark .gwt-SplitLayoutPanel-VDragger {
	background-color: var(--om-border) !important;
}

/* GWT TabPanel content area (not just our .om-tabs). */
html.om-dark .gwt-TabPanel,
html.om-dark .gwt-TabPanelBottom {
	background-color: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
}
html.om-dark .gwt-TabBar {
	background-color: var(--om-bg-card) !important;
}
html.om-dark .gwt-TabBarItem {
	color: var(--om-text-secondary) !important;
}
html.om-dark .gwt-TabBarItem-selected {
	color: var(--om-text-primary) !important;
}

/* ToggleButton (Adjusts menu items). */
html.om-dark .gwt-ToggleButton {
	color: var(--om-text-primary) !important;
}

/* DataGrid (used in some admin tables alongside CellTable). */
html.om-dark .gwt-DataGrid,
html.om-dark .gwt-DataGrid th,
html.om-dark .gwt-DataGrid td {
	background-color: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
	border-color: var(--om-border) !important;
}
html.om-dark .gwt-DataGrid thead th {
	background-color: var(--om-bg-elev) !important;
}

/* Smooth swap — restricted to the key surfaces only. Applying the
   transition to every element (`body *`) made the dark-mode toggle
   stall under heavy DOMs (hundreds of bubbles, table rows, etc.):
   the browser tried to animate every background-color change in
   parallel, click events queued, and the user had to click 3 times
   for the toggle to register. Scoping to the chrome containers
   keeps the visual fade without the layout thrash. */
body,
.om-surface-card,
.om-surface-inset,
.om-surface-elev,
.bg-om,
.sidebar,
.dropdown-menu,
.card,
.modal-content {
	transition-property: background-color, color, border-color;
	transition-duration: 140ms;
	transition-timing-function: ease;
}

/* =============================================================
   Tenant login logo (chip container). El logo del cliente es
   un asset externo con colores propios; hay que preservarlos y
   asegurar contraste contra card blanca (light) o card slate
   (dark). Sin backdrop, un PNG con fondo blanco se ve invisible
   sobre la card blanca ("cuadro blanco").
   ============================================================= */
.om-login-tenant-logo img {
	background: #ffffff;
	padding: 8px 12px;
	border-radius: 10px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.10),
	            0 1px 2px rgba(0, 0, 0, 0.06);
}
html.om-dark .om-login-tenant-logo img {
	/* Dark mode: backdrop blanco para que el logo (colorido o
	   transparente) se vea sobre la card oscura. Sombra reducida
	   para que no compita con el glow del card ring. */
	background: rgba(255, 255, 255, 0.96);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
/* CRITICAL: la regla generica `html.om-dark .om-login-shell .card img`
   aplica un filter brightness(0) invert(1) drop-shadow que rompe los
   colores del logo del tenant (convierte a silueta blanca). Excluimos
   explicitamente el tenant logo -- queremos preservar la paleta del
   cliente. La del OneMarketer y powered-by siguen invirtiendose. */
html.om-dark .om-login-shell .card .om-login-tenant-logo img {
	filter: none !important;
}
/* Class marker que se agrega desde Login.java cuando hay tenant logo
   -- fuerza display:none con specificity 3 clases (0-0-3-0) + !important
   para ganarle a `.om-login-shell .om-login-logo { display: inline-block
   !important; }` que aplica el mobile media query. */
.om-login-shell .om-login-logo.om-login-logo--hidden,
.om-login-logo--hidden {
	display: none !important;
}

/* =============================================================
   "Powered by OneMarketer" mini-badge al pie del card. Solo se
   pinta cuando el tenant tiene logo propio (Login.java maneja
   la logica). Muy sutil -- opacity baja + font chico. En dark
   mode la img se invierte via la regla existente de .card img.
   ============================================================= */
.om-login-powered-by {
	margin-top: 10px;
}
.om-login-powered-by-inner {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 10px;
	font-weight: 500;
	letter-spacing: 0.5px;
	color: #94a3b8;
	opacity: 0.75;
	text-transform: uppercase;
}
.om-login-powered-by-inner img {
	height: 14px;
	width: auto;
	display: inline-block;
	vertical-align: middle;
	opacity: 0.85;
}
.om-login-powered-by-inner:hover {
	opacity: 1;
}
/* Dark mode: el texto se ve mejor un poco mas claro contra la
   card slate. La img la maneja `.card img` filter existente. */
html.om-dark .om-login-powered-by-inner {
	color: #cbd5e1;
	opacity: 0.7;
}

/* =============================================================
   Login background photo layer. `.om-login-bg` es un <div> que
   Login.java inserta al inicio del root loginBody. El server
   (getPublicSsoConfig) devuelve `loginBgUrl` = Bing Image of the
   Day (rota una vez por dia). Java setea background-image inline.
   Si el server devuelve "" -> Java no toca la propiedad -> el div
   queda vacio, transparente, y solo se ve el gradient azul detras.
   ============================================================= */
.om-login-bg {
	position: absolute;
	top: 0; right: 0; bottom: 0; left: 0;
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
	opacity: 0.22;
	pointer-events: none;
	z-index: 0;
}

/* =============================================================
   Login screen — dark variant.

   The Login UiBinder bakes brand-blue hexes into obfuscated
   CssResource class names, so we can't reskin those classes
   from here. Instead, Login.java tags the root with the static
   marker class `om-login-shell` and we override via structural
   selectors anchored on that marker.

   Mail.jsp pre-paint sets `html.om-dark` before any stylesheet
   matches, so this paints on the first frame with no flash.
   ============================================================= */
html.om-dark .om-login-shell {
	background: radial-gradient(ellipse at top left,  #1d2a4a 0%, transparent 55%),
	            radial-gradient(ellipse at bottom right, #1a3a52 0%, transparent 55%),
	            linear-gradient(135deg, #0a0e1a 0%, #0f172a 50%, #0a0e1a 100%) !important;
	background-size: 200% 200%, 200% 200%, 200% 200% !important;
	color: #e2e8f0;
}
/* Subtle dot-grid stays, but on dark we make it slightly cooler.
   Doble selector:
   (a) `.om-login-bg + div` -> cuando Login.java inyecto el div de foto,
       el dot-grid quedo como segundo hijo; lo targetamos por sibling.
   (b) `> div:first-child:not(.om-login-bg)` -> fallback para cuando el
       div de foto NO existe (fetch de Bing fallo temprano, o versiones
       anteriores del client). Preserva la semantica original. */
html.om-dark .om-login-shell > .om-login-bg + div,
html.om-dark .om-login-shell > div:first-child:not(.om-login-bg) {
	background-image:
		radial-gradient(circle at 18% 30%, rgba(96, 165, 250, 0.10) 1.5px, transparent 2px),
		radial-gradient(circle at 78% 22%, rgba(96, 165, 250, 0.08) 1.5px, transparent 2px),
		radial-gradient(circle at 62% 70%, rgba(167, 139, 250, 0.08) 1.5px, transparent 2px),
		radial-gradient(circle at 28% 78%, rgba(34, 211, 238, 0.08) 1.5px, transparent 2px),
		radial-gradient(circle at 88% 56%, rgba(167, 139, 250, 0.08) 1.5px, transparent 2px) !important;
}
/* Floating social icons — brighten just enough on dark for them
   to read against the deeper navy without being noisy. */
html.om-dark .om-login-shell .fab,
html.om-dark .om-login-shell .fas {
	color: rgba(148, 184, 255, 0.13) !important;
	text-shadow: 0 0 22px rgba(96, 165, 250, 0.18) !important;
}
/* The auth card itself — slate panel + cyan glow ring. */
html.om-dark .om-login-shell .card {
	background-color: rgba(15, 23, 42, 0.78) !important;
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border: 1px solid rgba(96, 165, 250, 0.18) !important;
	box-shadow:
		0 24px 64px rgba(0, 0, 0, 0.55),
		0 8px 24px rgba(0, 0, 0, 0.35),
		0 0 0 1px rgba(96, 165, 250, 0.06) inset !important;
}
html.om-dark .om-login-shell .card * { color: #e2e8f0; }
html.om-dark .om-login-shell .card p { color: #cbd5e1 !important; }
/* Title + subtitle override the inline hex values from the
   obfuscated CssResource. */
html.om-dark .om-login-shell .card p:first-of-type {
	color: #f1f5f9 !important;
}
html.om-dark .om-login-shell .card p:nth-of-type(2) {
	color: #94a3b8 !important;
}
/* Logo lockup — the brand mark is dark blue letters on transparent,
   which disappears on the dark card. Invert to pure white so the
   wordmark still reads. (Same trick used for the spinner via
   inline filter in Login.java.) */
html.om-dark .om-login-shell .card img {
	filter: brightness(0) invert(1) drop-shadow(0 0 18px rgba(96,165,250,0.35));
}
/* Form inputs — borderless dark inset that blends with the card.
   Border-color matches the input's own background so the 1px frame
   is invisible at rest; only the focus state lights up a cyan ring
   to show the active field. */
html.om-dark .om-login-shell input[type='text'],
html.om-dark .om-login-shell input[type='email'],
html.om-dark .om-login-shell input[type='password'] {
	background-color: #0f1a2c !important;
	color: #e2e8f0 !important;
	border: 1px solid #0f1a2c !important;
	box-shadow: none !important;
}
html.om-dark .om-login-shell input[type='text']:focus,
html.om-dark .om-login-shell input[type='email']:focus,
html.om-dark .om-login-shell input[type='password']:focus {
	border-color: #60a5fa !important;
	box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.20) !important;
	background-color: #0f1a2c !important;
}
html.om-dark .om-login-shell input::placeholder {
	color: #64748b !important;
}
/* Input-group addons (icons left of email/password). Border
   matches the input fill so the group reads as one chip. */
html.om-dark .om-login-shell .input-group-text,
html.om-dark .om-login-shell .input-group-prepend .input-group-text,
html.om-dark .om-login-shell .input-group-append .input-group-text {
	background-color: #0f1a2c !important;
	border-color: #0f1a2c !important;
	color: #94a3b8 !important;
}
/* Bootstrap wraps inputs in .input-group / .form-group; some
   themes also paint a border on those wrappers. Neutralize. */
html.om-dark .om-login-shell .input-group,
html.om-dark .om-login-shell .form-group {
	border: 0 !important;
	box-shadow: none !important;
}
/* Form labels + small text. */
html.om-dark .om-login-shell label,
html.om-dark .om-login-shell .text-muted,
html.om-dark .om-login-shell small { color: #94a3b8 !important; }
/* Primary submit button — brighter cyan/indigo gradient on dark. */
html.om-dark .om-login-shell button.btn-primary,
html.om-dark .om-login-shell input[type='submit'],
html.om-dark .om-login-shell .btn-info,
html.om-dark .om-login-shell .btn-success {
	background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%) !important;
	border: 0 !important;
	color: #ffffff !important;
	box-shadow: 0 6px 18px rgba(59, 130, 246, 0.42) !important;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
html.om-dark .om-login-shell button.btn-primary:hover,
html.om-dark .om-login-shell input[type='submit']:hover {
	background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%) !important;
	box-shadow: 0 10px 26px rgba(59, 130, 246, 0.55) !important;
}
/* Anchor links inside the card (forgot password, register, etc.) */
html.om-dark .om-login-shell .card a {
	color: #93c5fd !important;
	text-decoration: none;
}
html.om-dark .om-login-shell .card a:hover {
	color: #bfdbfe !important;
	text-decoration: underline;
}
/* Top-right language nav — keep visible on dark. */
html.om-dark .om-login-shell .navbar .nav-link { color: #cbd5e1 !important; }
html.om-dark .om-login-shell .navbar .dropdown-menu {
	background-color: #1e293b !important;
	border: 1px solid rgba(96, 165, 250, 0.18) !important;
}
html.om-dark .om-login-shell .navbar .dropdown-item { color: #e2e8f0 !important; }
html.om-dark .om-login-shell .navbar .dropdown-item:hover {
	background-color: rgba(96, 165, 250, 0.10) !important;
	color: #ffffff !important;
}
/* Footer cert badges + links — tone down brightness on dark. */
html.om-dark .om-login-shell footer a,
html.om-dark .om-login-shell footer span { color: #cbd5e1 !important; }
html.om-dark .om-login-shell footer span[title] {
	background-color: rgba(96, 165, 250, 0.08) !important;
	border-color: rgba(96, 165, 250, 0.22) !important;
}
html.om-dark .om-login-shell footer a:hover { color: #ffffff !important; }
/* Error message strip. */
html.om-dark .om-login-shell .alert,
html.om-dark .om-login-shell .alert-danger {
	background-color: rgba(239, 68, 68, 0.12) !important;
	border-color: rgba(239, 68, 68, 0.35) !important;
	color: #fecaca !important;
}

/* ============================================================
   Login screen -- Mobile treatment.
   Producto: gradient azul oscuro limpio, sin nada mas. Sin foto,
   sin iconos flotantes, sin dot-grid, sin aurora. En dark solo
   cambia la paleta a un navy mas profundo. Cualquier decoracion
   heredada de desktop la matamos aca con !important.
   ============================================================ */
@media (max-width: 768px) {
	/* Nuke a cualquier decoracion que se pudiera colar desde
	   desktop o ui:style. Foto Bing, dot-grid, y los avatares
	   de RRSS flotantes -- todos apagados desde este stylesheet
	   externo (que se puede refrescar sin recompilar GWT). */
	.om-login-bg { display: none !important; }
	/* bgConnections = primer div despues de om-login-bg (o el
	   primer child si no hay bgDiv).
	   bgDecor = segundo div despues de om-login-bg (o segundo
	   child sin bgDiv). Contiene los avatares fab/fas de las
	   RRSS. Ambos ocultos completo -- display:none tumba tambien
	   background-image, asi no hace falta la regla vieja. */
	.om-login-shell > .om-login-bg + div,
	.om-login-shell > .om-login-bg + div + div,
	.om-login-shell > div:first-child:not(.om-login-bg),
	.om-login-shell > div:first-child:not(.om-login-bg) + div {
		display: none !important;
	}

	/* Mobile + dark: gradient navy simple, sin blobs ni animacion. */
	html.om-dark .om-login-shell {
		background:
			linear-gradient(160deg,
				#050914 0%,
				#0a1024 50%,
				#04070f 100%) !important;
		animation: none !important;
	}

	/* Padding + flex-start del card-body para que el logo pinne arriba
	   (dejar espacio para bajar el bloque de inputs sin re-centrar
	   toda la stack de vlogin). Sin mover el logo de su posicion top. */
	html .om-login-shell .om-login-cardbody,
	html .om-login-shell .card-body {
		padding-top: 32px !important;
		justify-content: flex-start !important;
	}
	/* Bajar SOLO el bloque de inputs + login button en mobile.
	   VerticalPanel de Login.java renderiza como <table>: la primera
	   tabla anidada dentro del card-body es vlogin (logo/tenantSlot/
	   form/errormessage). La SEGUNDA tabla anidada es la vp interna
	   del form, cuyas filas son:
	     tr:nth-child(1) = hidden csfr (invisible)
	     tr:nth-child(2) = username input-group
	     tr:nth-child(3) = password input-group
	     tr:nth-child(4) = login button
	   Padding-top en la fila 2 crea el gap arriba de username y
	   arrastra password + button hacia abajo por flow natural. */
	html .om-login-shell .card-body table table > tbody > tr:nth-child(2) > td,
	html .om-login-shell .om-login-cardbody table table > tbody > tr:nth-child(2) > td {
		padding-top: 32px !important;
	}
	/* Tenant logo mas compacto en mobile -- el chip no debe robar
	   el hero space; deja lugar para inputs + button + powered-by. */
	.om-login-tenant-logo img {
		max-height: 60px !important;
		max-width: 200px !important;
		padding: 6px 10px !important;
		margin: 4px auto 8px auto !important;
	}
	/* Cajas mas pequenas en mobile (44px = min recommended para touch
	   pero deja mas breathing room que los 50px que estaban antes).
	   Beat las reglas al 4844 con misma specificity + orden posterior. */
	html .om-login-shell .om-login-card .form-control {
		height: 44px !important;
		font-size: 14px !important;
		padding: 10px 12px !important;
	}
	html .om-login-shell .om-login-card .btn-primary {
		min-height: 46px !important;
		padding: 10px !important;
		font-size: 15px !important;
		margin: 14px auto 6px auto !important;
	}
}
/* Smartphones muy chicos (iPhone SE etc): padding-top mas conservador
   + inputs/button aun mas compactos por espacio limitado. */
@media (max-width: 400px) {
	html .om-login-shell .card-body table table > tbody > tr:nth-child(2) > td,
	html .om-login-shell .om-login-cardbody table table > tbody > tr:nth-child(2) > td {
		padding-top: 20px !important;
	}
	.om-login-tenant-logo img {
		max-height: 50px !important;
		max-width: 170px !important;
	}
	html .om-login-shell .om-login-card .form-control {
		height: 40px !important;
	}
	html .om-login-shell .om-login-card .btn-primary {
		min-height: 42px !important;
	}
}

/* ============================================================
   Federated SSO buttons (Google + Microsoft) below the Login
   card. `ssoSlot` (UiField) is a wrapper below the card so the
   buttons get breathing room + a clear visual break from the
   primary auth form.
   Rendered from Login.java always -- disabled state is a class
   marker so the button still shows even when SSO is off for the
   tenant, giving admins a visual hint of what's available.

   Base = light mode: dark gray (#2d3748, slate-800) with white
   text; matches other providers' recommended contrast on white
   surfaces without being pure black.
   Dark mode: shifts to a lighter surface (#334155) so the buttons
   read against the already-dark auth card. Border picks up a soft
   cyan tint to align with the card's glow ring.
   ============================================================ */
.om-sso-slot {
	max-width: 380px;
	margin: 18px auto 0;
	padding: 0 12px;
	box-sizing: border-box;
	/* Flex column con gap explicito para evitar el collapse de margins
	 * verticales entre buttons hermanos en block context (que daria 6px
	 * en vez de la separacion pedida). */
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.om-sso-divider {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0; /* slot flex gap ya separa del boton siguiente */
	color: #94a3b8;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 1px;
	font-weight: 600;
}
.om-sso-divider::before,
.om-sso-divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: rgba(148, 163, 184, 0.35);
}
.om-sso-divider--mobile {
	margin: 4px 0 6px;
	font-size: 10px;
	letter-spacing: 1.5px;
}
/* Sub-specificity + !important defensivo -- sin esto, Bootstrap `button`
 * reset o el `gwt-Button` default pintaban el boton con fondo claro y
 * texto casi invisible en modo light. Con !important siempre gana la
 * paleta oscura. */
html .om-login-shell .om-sso-btn,
.om-sso-btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 10px 14px;
	margin: 0; /* .om-sso-slot gap handles vertical separation */
	background: #1f2937 !important;
	color: #ffffff !important;
	border: 1px solid #111827 !important;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.2px;
	cursor: pointer;
	transition: background 120ms ease, border-color 120ms ease,
	            transform 120ms ease, box-shadow 120ms ease;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
html .om-login-shell .om-sso-btn:hover,
.om-sso-btn:hover {
	background: #111827 !important;
	border-color: #030712 !important;
	box-shadow: 0 4px 14px rgba(15, 23, 42, 0.40);
}
/* SVG del proveedor: por defecto GWT/Bootstrap le puede aplicar
 * fill:currentColor a los path -- forzamos el fill original del SVG
 * asi los colores de Google/Microsoft se preservan. */
html .om-login-shell .om-sso-btn svg,
.om-sso-btn svg {
	flex: none;
}
html .om-login-shell .om-sso-btn .om-sso-btn-inner span,
.om-sso-btn .om-sso-btn-inner span {
	color: #ffffff !important;
}
.om-sso-btn:active { transform: translateY(1px); }
.om-sso-btn-inner {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	justify-content: center;
}
/* Compact icon-only pill for mobile -- two side-by-side circles that
   preserve the provider logo but drop the label. */
.om-sso-btns--mobile {
	display: flex;
	gap: 12px;
	justify-content: center;
	margin: 4px 0 8px;
}
.om-sso-btn--icon {
	width: 44px !important;
	height: 44px;
	padding: 0 !important;
	margin: 0 !important;
	border-radius: 50%;
	flex: none;
}
/* Disabled: kept fully visible but greyed + not-allowed. Tooltip on
   the button element explains why (SSO not configured for tenant). */
.om-sso-btn--disabled,
.om-sso-btn--disabled:hover {
	background: #94a3b8 !important;
	border-color: #94a3b8 !important;
	color: #f1f5f9 !important;
	cursor: not-allowed !important;
	opacity: 0.55;
	box-shadow: none !important;
	transform: none !important;
}
.om-sso-btn--disabled svg,
.om-sso-btn--disabled .om-sso-btn-inner svg {
	filter: grayscale(1);
}

/* Dark mode: lighter, cyan-tinted surface so the button stands out
   from the deep-navy auth card. Disabled stays greyed but shifts to
   a translucent slate to match the darker background. */
html.om-dark .om-sso-btn {
	background: #334155 !important;
	color: #f1f5f9 !important;
	border: 1px solid rgba(96, 165, 250, 0.30) !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
html.om-dark .om-sso-btn:hover {
	background: #3f5169 !important;
	border-color: rgba(96, 165, 250, 0.55) !important;
	box-shadow: 0 6px 18px rgba(59, 130, 246, 0.30);
}
html.om-dark .om-sso-btn--disabled,
html.om-dark .om-sso-btn--disabled:hover {
	background: rgba(51, 65, 85, 0.45) !important;
	border-color: rgba(148, 163, 184, 0.25) !important;
	color: #94a3b8 !important;
	box-shadow: none !important;
}
html.om-dark .om-sso-divider {
	color: #94a3b8;
}
html.om-dark .om-sso-divider::before,
html.om-dark .om-sso-divider::after {
	background: rgba(148, 163, 184, 0.25);
}

/* ============================================================
   TipificacionSelector (Category Selector dialog) — dark variant.
   Marker class om-tip-selector is added from Java; the inline
   <ui:style> bakes white + brand-blue hexes that can't react to
   dark mode, so we override structurally here.
   ============================================================ */
html.om-dark .om-tip-selector,
html.om-dark .om-tip-selector > div {
	background-color: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
}
/* Section dividers (header / footer borders) — light borders look
   harsh on dark; soft them down. */
html.om-dark .om-tip-selector .header,
html.om-dark .om-tip-selector > div > div:first-child {
	border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}
html.om-dark .om-tip-selector .footer,
html.om-dark .om-tip-selector > div > div:last-child {
	border-top-color: rgba(255, 255, 255, 0.08) !important;
}
/* Section titles + form labels — always light on dark. */
html.om-dark .om-tip-selector div,
html.om-dark .om-tip-selector span,
html.om-dark .om-tip-selector label,
html.om-dark .om-tip-selector p {
	color: var(--om-text-primary);
}
html.om-dark .om-tip-selector label {
	color: var(--om-text-secondary) !important;
}
/* The brand-tinted subtitle / chevron accents come back as light. */
html.om-dark .om-tip-selector label i { color: #60a5fa !important; }

/* Textarea + any inputs inside (comments, future filter, etc.) */
html.om-dark .om-tip-selector textarea,
html.om-dark .om-tip-selector input[type='text'],
html.om-dark .om-tip-selector input[type='search'],
html.om-dark .om-tip-selector select {
	background-color: var(--om-bg-inset) !important;
	color: var(--om-text-primary) !important;
	border-color: rgba(255, 255, 255, 0.12) !important;
}
html.om-dark .om-tip-selector textarea::placeholder,
html.om-dark .om-tip-selector input::placeholder {
	color: var(--om-text-muted) !important;
}
html.om-dark .om-tip-selector textarea:focus,
html.om-dark .om-tip-selector input:focus,
html.om-dark .om-tip-selector select:focus {
	border-color: #60a5fa !important;
	box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.20) !important;
}

/* The category tree / list inside #tipologia_panel is built at
   runtime as raw HTML. Catch any background-color: white or near-
   white the legacy renderer ships with inline styles. */
html.om-dark .om-tip-selector #tipologia_panel,
html.om-dark .om-tip-selector #tipologia_panel * {
	color: var(--om-text-primary);
}
html.om-dark .om-tip-selector #tipologia_panel [style*="background-color: #fff"],
html.om-dark .om-tip-selector #tipologia_panel [style*="background-color:#fff"],
html.om-dark .om-tip-selector #tipologia_panel [style*="background-color: white"],
html.om-dark .om-tip-selector #tipologia_panel [style*="background:#fff"],
html.om-dark .om-tip-selector #tipologia_panel [style*="background: white"] {
	background-color: var(--om-bg-elev) !important;
}
/* Borders inside the tree → tone them down too. */
html.om-dark .om-tip-selector #tipologia_panel [style*="border:"] {
	border-color: rgba(255, 255, 255, 0.10) !important;
}

/* "Selection" breadcrumb row — has hardcoded #eef2fb light bg in
   the obfuscated .summary class. Marker om-tip-summary added in
   TipificacionSelector.ui.xml lets us flip just this strip without
   touching the per-chip styling or anything else in the dialog. */
html.om-dark .om-tip-summary {
	background: rgba(255, 255, 255, 0.05) !important;
	border-color: rgba(255, 255, 255, 0.12) !important;
}
html.om-dark .om-tip-summary > span {
	color: var(--om-text-secondary) !important;
}

/* Soft-button (cancel) reads as transparent on dark — give it a
   light slate fill so it actually shows. */
html.om-dark .om-tip-selector .om-soft-btn {
	background-color: rgba(255, 255, 255, 0.06) !important;
	color: var(--om-text-primary) !important;
	border-color: rgba(255, 255, 255, 0.12) !important;
}
html.om-dark .om-tip-selector .om-soft-btn:hover {
	background-color: rgba(255, 255, 255, 0.12) !important;
}

/* The hosting DialogBox itself — its caption + 9-cell decoration
   should be dark too. .om-tip-selector-host is added on the dialog
   root from Java so we can scope the dialog chrome without bleeding
   into other modals. */
html.om-dark .om-tip-selector-host,
html.om-dark .om-tip-selector-host .popupContent {
	background-color: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
}
html.om-dark .om-tip-selector-host .Caption {
	background-color: #0f172a !important;
	color: var(--om-text-primary) !important;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* ============================================================
   Message tag bubble — dark variant. The base + per-chat-theme
   styles live in global.css; dark mode dims the saturation so
   the callout doesn't burn the eyes against a slate backdrop.
   ============================================================ */
html.om-dark .om-msg-tag--note {
	background: linear-gradient(135deg, #b45309, #78350f) !important;
	color: #fef3c7 !important;
	box-shadow: 0 4px 10px rgba(180, 83, 9, 0.45),
	            0 1px 3px rgba(0, 0, 0, 0.30) !important;
}
html.om-dark .om-msg-tag--note .om-msg-tag__tail {
	background: #78350f !important;
}
html.om-dark .om-msg-tag--error {
	background: linear-gradient(135deg, #991b1b, #7f1d1d) !important;
	color: #fecaca !important;
	box-shadow: 0 4px 10px rgba(153, 27, 27, 0.45),
	            0 1px 3px rgba(0, 0, 0, 0.30) !important;
}
html.om-dark .om-msg-tag--error .om-msg-tag__tail {
	background: #7f1d1d !important;
}
html.om-dark .om-msg-tag__btn,
html.om-dark .om-msg-tag__expand {
	background: rgba(255, 255, 255, 0.14) !important;
}
html.om-dark .om-msg-tag__btn:hover,
html.om-dark .om-msg-tag__expand:hover {
	background: rgba(255, 255, 255, 0.26) !important;
}
html.om-dark .om-msg-tag__btn i,
html.om-dark .om-msg-tag__expand i {
	color: #ffffff !important;
}

/* ============================================================
   Multi-chat workspace — sidebar rows (static classes added
   from MultiChatWorkspace renderer). Dark variant lives at
   the bottom of this same block.
   ============================================================ */
.om-mc-sidebar-row {
	padding: 9px 12px;
	margin: 2px 4px;
	border-radius: 8px;
	cursor: pointer;
	transition: background-color .14s ease, transform .12s ease;
	border: 1px solid transparent;
}
.om-mc-sidebar-row:hover {
	background: #eef2fb;
	border-color: #c7d6f0;
	transform: translateX(2px);
}
.om-mc-sidebar-row--open {
	background: #f0fdf4;
	border-color: #bbf7d0;
}
.om-mc-sidebar-row--open:hover {
	background: #dcfce7;
}
.om-mc-sidebar-row__title {
	font-size: 13px;
	font-weight: 700;
	color: #0f172a;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin-bottom: 3px;
}
.om-mc-sidebar-row__meta {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 11px;
	color: #64748b;
}
.om-mc-sidebar-row__meta i { margin-right: 4px; }
.om-mc-sidebar-row__pin {
	margin-left: auto;
	color: #10b981;
}
.om-mc-sidebar-row__unread {
	display: inline-flex; align-items: center; gap: 4px;
	background: linear-gradient(135deg, #ef4444, #b91c1c);
	color: #ffffff;
	font-size: 9.5px;
	font-weight: 800;
	letter-spacing: .4px;
	padding: 2px 7px;
	border-radius: 9px;
	box-shadow: 0 1px 2px rgba(239, 68, 68, .35);
	animation: om-mc-pulse 1.5s ease-in-out infinite;
}
.om-mc-sidebar-row__unread i { font-size: 9px; }
/* Whole row gets a soft red bath + left accent when unread, so it
   reads as "needs attention" even before you parse the badge. */
.om-mc-sidebar-row--unread {
	background: linear-gradient(90deg, rgba(239,68,68,.10), rgba(239,68,68,0) 65%);
	border-left: 3px solid #ef4444;
	padding-left: 7px;
}
.om-mc-sidebar-row--unread .om-mc-sidebar-row__title {
	color: #b91c1c;
	font-weight: 700;
}
html.om-dark .om-mc-sidebar-row--unread {
	background: linear-gradient(90deg, rgba(239,68,68,.22), rgba(239,68,68,0) 65%);
}
html.om-dark .om-mc-sidebar-row--unread .om-mc-sidebar-row__title {
	color: #fca5a5;
}
.om-mc-sidebar-row__net {
	margin-right: 6px;
	font-size: 12px;
	color: #2a5298;
	vertical-align: middle;
}
.om-mc-sidebar-row--open .om-mc-sidebar-row__net { color: #047857; }
html.om-dark .om-mc-sidebar-row__net { color: #60a5fa; }

/* ── Canned-responses chooser ────────────────────────────────────────
   Dark-mode re-skin for ShortCutChooser. The chooser sets the marker
   class om-canned-popup on its PopupPanel root and the GWT obfuscated
   button class is whatever .btnimg gets, so we hit it through the
   stable child <button> tag inside om-canned-popup. */
html.om-dark .om-canned-popup,
html.om-dark .om-canned-popup * {
	color: #e2e8f0;
}
html.om-dark .om-canned-popup > div {
	background: #1e293b !important;
}
html.om-dark .om-canned-popup button {
	background: #0f172a !important;
	color: #e2e8f0 !important;
	border-color: transparent !important;
}
html.om-dark .om-canned-popup button:hover {
	background: #1e3a5f !important;
	color: #93c5fd !important;
	border-color: #1e3c72 !important;
}

/* ── Multi-chat tile dark mode ───────────────────────────────────────
   The tile header is a gradient that already works on both themes.
   We only need to dim the body + footer surfaces and the composer
   input so they don't blast white in dark mode. The .om-mc-tile-msgs
   scope tags the message host; .om-mc-tile is set in Java on the
   ChatTile root so we can target its descendants stably. */
html.om-dark .om-mc-tile {
	background: #1e293b !important;
	border-color: #334155 !important;
}
html.om-dark .om-mc-tile-msgs {
	background: transparent !important;
}
/* Dark mode bubble overrides — gated on NOT having a chat theme so
   WhatsApp / Mosaic / Sketch keep their own (bubble bg + text) pair.
   Without this gate, the forced light text bled into chat-theme
   bubbles that have light backgrounds (e.g., WhatsApp outgoing
   #d9fdd3) and made the operator's messages illegible. */
html.om-dark:not(.om-chat-whatsapp):not(.om-chat-mosaic):not(.om-chat-sketch) .om-mc-tile-msgs .chat_forLocal,
html.om-dark:not(.om-chat-whatsapp):not(.om-chat-mosaic):not(.om-chat-sketch) .om-mc-tile-msgs .chat_forLocalPublic {
	background: #0f172a !important;
	color: #e2e8f0 !important;
}
html.om-dark:not(.om-chat-whatsapp):not(.om-chat-mosaic):not(.om-chat-sketch) .om-mc-tile-msgs .chat_forRemote,
html.om-dark:not(.om-chat-whatsapp):not(.om-chat-mosaic):not(.om-chat-sketch) .om-mc-tile-msgs .chat_forRemotePublic {
	background: #334155 !important;
	color: #e2e8f0 !important;
}
html.om-dark .om-mc-tile-body { background: #0f172a !important; }
html.om-dark .om-mc-tile-footer {
	background: #1e293b !important;
	border-top-color: #334155 !important;
}
html.om-dark .om-mc-tile-input {
	background: #0f172a !important;
	color: #e2e8f0 !important;
	border-color: #334155 !important;
}

/* Workspace shell + sidebar dark mode. The light defaults live as
   inline styles inside the GWT-generated ui:style block so we override
   them with !important on the stable marker classes added in the
   ui.xml (om-mc-shell, om-mc-sidebar, om-mc-strip, etc.). */
html.om-dark .om-mc-shell {
	background: #0b1220 !important;
	color: #e2e8f0 !important;
}
html.om-dark .om-mc-sidebar {
	background: #1e293b !important;
	border-right-color: #334155 !important;
}
html.om-dark .om-mc-sidebar-header {
	border-bottom-color: #334155 !important;
}
html.om-dark .om-mc-sidebar-header,
html.om-dark .om-mc-sidebar-header * {
	color: #e2e8f0 !important;
}
html.om-dark .om-mc-sidebar-count {
	background: #334155 !important;
	color: #cbd5e1 !important;
}
html.om-dark .om-mc-sidebar-foot {
	background: #0f172a !important;
	border-top-color: #334155 !important;
}
html.om-dark .om-mc-mode-toggle {
	background: #1e293b !important;
	border-color: #334155 !important;
	color: #cbd5e1 !important;
}
html.om-dark .om-mc-mode-toggle:hover {
	background: #1e3a5f !important;
	border-color: #1e3c72 !important;
	color: #93c5fd !important;
}
html.om-dark .om-mc-mode-toggle i { color: #60a5fa !important; }
html.om-dark .om-mc-strip {
	background: transparent !important;
}
html.om-dark .om-mc-sidebar-row {
	color: #e2e8f0 !important;
}
html.om-dark .om-mc-sidebar-row:hover {
	background: rgba(96, 165, 250, .08) !important;
}
html.om-dark .om-mc-sidebar-row--open {
	background: rgba(16, 185, 129, .14) !important;
}

/* ── Multichat tile popups (actions / attach / body context menu) ──
   All three popups get the marker class om-mc-popup on the
   PopupPanel root in ChatTile.java. The inline-styled HTML inside is
   hard to swap wholesale, so we use high-specificity overrides on the
   common selectors (the divs use inline `background:#ffffff` etc.). */
html.om-dark .om-mc-popup > div {
	background: #1e293b !important;
	color: #e2e8f0 !important;
}
html.om-dark .om-mc-popup .om-mc-act-row,
html.om-dark .om-mc-popup .om-mc-ctx-row {
	color: #e2e8f0 !important;
}
html.om-dark .om-mc-popup .om-mc-act-row:hover,
html.om-dark .om-mc-popup .om-mc-ctx-row:hover {
	background: #1e3a5f !important;
}
html.om-dark .om-mc-popup .om-mc-act-row i,
html.om-dark .om-mc-popup .om-mc-ctx-row i {
	color: #60a5fa !important;
}
/* The attach menu rows live in nested inline-styled <div>s without the
   om-mc-act-row class — target them by being children of the popup
   that have a child with id starting with om-mc-att-. */
html.om-dark .om-mc-popup [id^='om-mc-att-'] > div > div:first-child {
	color: #e2e8f0 !important;
}
html.om-dark .om-mc-popup [id^='om-mc-att-'] > div > div:nth-child(2) {
	color: #94a3b8 !important;
}
html.om-dark .om-mc-popup [id^='om-mc-att-']:hover {
	background: #1e3a5f !important;
}

/* Reply banner above the composer in a tile. */
html.om-dark .om-mc-reply-banner {
	background: rgba(30, 60, 114, .35) !important;
	border-top-color: #334155 !important;
	border-left-color: #60a5fa !important;
	color: #e2e8f0 !important;
}
html.om-dark .om-mc-reply-banner i { color: #60a5fa !important; }
html.om-dark .om-mc-reply-banner button { color: #cbd5e1 !important; }

/* ── CustomerInfo dialog ──────────────────────────────────────────── */
html.om-dark .om-customer-info {
	background: #1e293b !important;
}
html.om-dark .om-customer-info > div:nth-child(2) {
	/* The body div (after the gradient header). */
	background: #1e293b !important;
}
/* The .fields grid + .k/.v cells (obfuscated names — match by structure). */
html.om-dark .om-customer-info > div:nth-child(2) > div[style*='grid'],
html.om-dark .om-customer-info > div:nth-child(2) > div:not([style]) {
	background: #0f172a !important;
	border-color: #334155 !important;
	color: #e2e8f0 !important;
}
html.om-dark .om-customer-info > div:nth-child(2) > div > div {
	background: #1e293b !important;
	color: #e2e8f0 !important;
	border-color: #334155 !important;
}
html.om-dark .om-customer-info > div:nth-child(2) > div > div:nth-child(odd) {
	/* Key column — slightly different shade for contrast. */
	background: #0f172a !important;
	color: #94a3b8 !important;
	border-right-color: #334155 !important;
}

/* ── Legacy toolbars (SimpleGrid + Chat) ──────────────────────────────
   The obfuscated `.panel` ui:style classes in SimpleGrid.ui.xml and
   Chat.ui.xml hardcode white backgrounds (and Chat adds a light
   gradient on top). Stable marker classes added in those ui.xml files
   give us a hook to flip them in dark mode. */
html.om-dark .om-list-toolbar {
	background-color: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
	border-bottom-color: var(--om-border) !important;
}
html.om-dark .om-list-toolbar h2,
html.om-dark .om-list-toolbar h1,
html.om-dark .om-list-toolbar h3,
html.om-dark .om-list-toolbar > h2 {
	color: var(--om-text-primary) !important;
}
/* The search-row HorizontalPanel renders as a table with white inline
   background from .options — flip those too. */
html.om-dark .om-list-toolbar table,
html.om-dark .om-list-toolbar tbody,
html.om-dark .om-list-toolbar tr,
html.om-dark .om-list-toolbar td {
	background-color: transparent !important;
	color: var(--om-text-primary) !important;
}

html.om-dark .om-chat-toolbar {
	background: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
	border-bottom-color: var(--om-border) !important;
}
html.om-dark .om-chat-toolbar table,
html.om-dark .om-chat-toolbar tbody,
html.om-dark .om-chat-toolbar tr,
html.om-dark .om-chat-toolbar td {
	background-color: transparent !important;
}

/* GWT CellTable column header — robust selectors that don't depend on
   the obfuscated build-specific class names (which change per build,
   so a war packaged from an older compile would miss them). Anchored
   on stable hooks: .gwt-CellTable, role='rowgroup', and the well-known
   om-surface-card marker that lives on the SimpleGrid root + tagged
   tables. !important wins over inline GWT styles. */
html.om-dark .gwt-CellTable thead,
html.om-dark .gwt-CellTable > thead,
html.om-dark thead[role='rowgroup'],
html.om-dark .om-surface-card > table > thead,
html.om-dark .om-surface-card table > thead {
	background-color: var(--om-bg-elev) !important;
	background-image: none !important;
}
html.om-dark .gwt-CellTable thead th,
html.om-dark .gwt-CellTable thead td,
html.om-dark thead[role='rowgroup'] th,
html.om-dark thead[role='rowgroup'] td,
html.om-dark .om-surface-card thead th,
html.om-dark .om-surface-card thead td {
	background-color: var(--om-bg-elev) !important;
	background-image: none !important;
	color: var(--om-text-secondary) !important;
	border-color: var(--om-border) !important;
}
/* Row hover — robust replacement for the obfuscated cellTableHoveredRow
   rule above. The newer .om-surface-card tbody tr rule sets a fixed
   bg-card with !important; without a same-specificity :hover with
   !important the hover never wins. */
/* Scoped to the actual data grid — NOT every <table> under
   .om-surface-card, because GWT HorizontalPanel toolbars also render
   as tables and would pick up the hover otherwise. */
html.om-dark .om-surface-card .gwt-CellTable tbody tr:hover,
html.om-dark .om-surface-card .gwt-CellTable tbody tr:hover > td {
	background-color: rgba(255, 255, 255, 0.08) !important;
	cursor: pointer !important;
}

/* ── SimpleGrid: enable horizontal overflow so the table can grow past
   the viewport (otherwise GWT's width="100%" + auto layout squeezes
   columns). The sticky pinning of the right-side semaforo/pending
   block is done from JS (pinStickyTail in Mail.jsp) so the cumulative
   right offsets are computed from real cell widths regardless of how
   many right-side columns are configured. */
.om-surface-card .gwt-CellTable {
	width: auto !important;
	min-width: 100% !important;
}
/* Class added by the JS pinner to each cell in the sticky tail.
   The right offset + position:sticky are inline-styled so they
   adapt to the real column widths; the class only carries the
   z-index, background fallback, and shadow on the boundary cell. */
/* Pending column: width locked so the button never collapses, ignoring
   the table's auto-layout pressure when there are many columns or the
   viewport is narrow. Targeted by class added in SimpleGrid.java. */
.om-col-pending {
	min-width: 78px !important;
	max-width: 78px !important;
	width: 78px !important;
	box-sizing: border-box !important;
	white-space: nowrap !important;
}

.om-pin-tail-cell {
	background-color: #ffffff;
	z-index: 2;
}
.om-pin-tail-head {
	background-color: #f8fafc !important;
	z-index: 3;
}
.om-pin-tail-edge {
	box-shadow: -4px 0 6px -3px rgba(15, 23, 42, .15);
}
.om-surface-card .gwt-CellTable tbody tr:hover .om-pin-tail-cell {
	background-color: #eef2fb;
}
html.om-dark .om-pin-tail-cell {
	background-color: var(--om-bg-card);
}
html.om-dark .om-pin-tail-head {
	background-color: var(--om-bg-elev) !important;
}
html.om-dark .om-pin-tail-edge {
	box-shadow: -4px 0 8px -3px rgba(0, 0, 0, .55);
}
html.om-dark .om-surface-card .gwt-CellTable tbody tr:hover .om-pin-tail-cell {
	background-color: #2a3a55;
}

/* ── Atenciones report (StatsAtencion) ─────────────────────────────
   The DockLayoutPanel root hardcodes background:white in its
   ui:style; the stable om-atenciones-dock marker added in the ui.xml
   lets dark mode flip the whole shell plus the conversation slot. */
html.om-dark .om-atenciones-dock,
html.om-dark .om-atenciones-dock > div,
html.om-dark .om-atenciones-dock .gwt-LayoutPanel {
	background-color: var(--om-bg-card) !important;
}

/* ── Search Cases by Id report (StatsSearchCases) ──────────────────
   The .om-scs-* classes are injected at runtime by Java (see
   injectSearchCasesStyles in StatsSearchCases.java) with hardcoded
   white backgrounds. These overrides flip them in dark mode without
   touching the Java — the classes are already in the DOM at runtime
   regardless of GWT compile state. */
html.om-dark .om-scs-controls,
html.om-dark .om-scs-pager-wrap,
html.om-dark .om-scs-grid-wrap,
html.om-dark .om-scs-grid {
	background: var(--om-bg-card) !important;
	border-color: var(--om-border) !important;
	color: var(--om-text-primary) !important;
}
html.om-dark .om-scs-input {
	background: var(--om-bg-elev) !important;
	color: var(--om-text-primary) !important;
	border-color: var(--om-border) !important;
}
html.om-dark .om-scs-input:focus {
	border-color: #60a5fa !important;
	box-shadow: 0 0 0 3px rgba(96, 165, 250, .22) !important;
}
html.om-dark .om-scs-btn-ghost {
	background: var(--om-bg-elev) !important;
	color: #93c5fd !important;
	border-color: rgba(96, 165, 250, .35) !important;
}
html.om-dark .om-scs-btn-ghost:hover {
	background: #1e3a5f !important;
}
html.om-dark .om-scs-btn-ghost[disabled] {
	background: var(--om-bg-elev) !important;
	color: #64748b !important;
	border-color: var(--om-border) !important;
}
html.om-dark .om-scs-chip {
	background: rgba(96, 165, 250, .18) !important;
	color: #93c5fd !important;
}
html.om-dark .om-scs-chip-empty {
	background: var(--om-bg-elev) !important;
	color: #94a3b8 !important;
}
html.om-dark .om-scs-chip-error {
	background: rgba(239, 68, 68, .18) !important;
	color: #fca5a5 !important;
}
/* The expand-toggle in long report cells (ReportColumnHelper) is also
   hardcoded white — flip in dark. */
html.om-dark .om-rep-cell-toggle {
	background: var(--om-bg-elev) !important;
	border-color: var(--om-border) !important;
	color: #93c5fd !important;
}
html.om-dark .om-rep-cell-toggle:hover {
	background: #1e3a5f !important;
}
html.om-dark .om-rep-cell-expanded .om-rep-cell-toggle {
	background: #1e3c72 !important;
	border-color: #60a5fa !important;
	color: #ffffff !important;
}

/* ── Atenciones report controls (StatsAtencion.injectAtencionToolbarStyles) ─ */
html.om-dark .om-stat-select {
	background-color: var(--om-bg-elev) !important;
	color: var(--om-text-primary) !important;
	border-color: var(--om-border) !important;
}
html.om-dark .om-stat-select:hover {
	border-color: #60a5fa !important;
}
html.om-dark .om-stat-select:focus {
	border-color: #60a5fa !important;
	box-shadow: 0 0 0 3px rgba(96, 165, 250, .22) !important;
}
html.om-dark .om-stat-select:disabled {
	background-color: var(--om-bg-card) !important;
	color: #64748b !important;
}
html.om-dark .om-stat-select option {
	background-color: var(--om-bg-elev) !important;
	color: var(--om-text-primary) !important;
}
html.om-dark .om-stat-lbl {
	color: #cbd5e1 !important;
}
html.om-dark .om-stat-check,
html.om-dark .om-stat-check label {
	color: var(--om-text-primary) !important;
}

/* ── Chat-card preview that opens from reports ─────────────────────
   .om-chat-card-root is the stable wrapper Java applies to the chat
   preview that opens from the Atenciones / Search-by-id reports.
   The inner conversation panel uses the legacy Conversacion's
   obfuscated .back ui:style class with #f0f2f5 hardcoded — we hit
   it via attribute selector so this works without a GWT recompile. */
html.om-dark .om-chat-card-root {
	background: var(--om-bg-card) !important;
	border-color: var(--om-border) !important;
}
html.om-dark .om-chat-card-root [class*="Conversacion_BinderImpl_GenCss_style-back"],
html.om-dark .om-chat-card-root [class*="Conversacion2_BinderImpl_GenCss_style-back"],
html.om-dark .om-chat-card-root .om-chat-back {
	background: var(--om-bg-card) !important;
}
/* Fallback: any descendant text inside the card defaults to light. */
html.om-dark .om-chat-card-root,
html.om-dark .om-chat-card-root b,
html.om-dark .om-chat-card-root span,
html.om-dark .om-chat-card-root div {
	color: var(--om-text-primary);
}

/* Header column wrappers (some GWT skins wrap label in inner div). */
html.om-dark .om-surface-card thead th *,
html.om-dark .om-surface-card thead td *,
html.om-dark thead[role='rowgroup'] th *,
html.om-dark thead[role='rowgroup'] td * {
	color: var(--om-text-secondary) !important;
	background-color: transparent !important;
}

/* ── OMWAD (WhatsApp Flow Designer / Manager) ─────────────────────────
   FlowV2Designer / FlowV2Manager hardcode light backgrounds (#f8fafc,
   #fff, etc.) in their <ui:style>. The .om-omwad markers added in the
   ui.xml roots let us flip the surface + descendants in dark mode
   without touching the obfuscated per-style classes. */
html.om-dark .om-omwad {
	background: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
}
html.om-dark .om-omwad > div,
html.om-dark .om-omwad > div > div {
	background-color: transparent !important;
	color: var(--om-text-primary) !important;
}
html.om-dark .om-omwad input[type='text'],
html.om-dark .om-omwad input[type='search'],
html.om-dark .om-omwad textarea,
html.om-dark .om-omwad select {
	background: var(--om-bg-elev) !important;
	color: var(--om-text-primary) !important;
	border-color: var(--om-border) !important;
}
html.om-dark .om-omwad input[type='text']::placeholder,
html.om-dark .om-omwad textarea::placeholder {
	color: var(--om-text-muted) !important;
}
html.om-dark .om-omwad button {
	background: var(--om-bg-elev) !important;
	color: var(--om-text-primary) !important;
	border-color: var(--om-border) !important;
}
html.om-dark .om-omwad button:hover {
	background: #1e3a5f !important;
	border-color: #1e3c72 !important;
}
/* Brand primary buttons keep their gradient even in dark mode. */
html.om-dark .om-omwad button[class*='btnPrimary'],
html.om-dark .om-omwad button[class*='Primary'] {
	background: linear-gradient(135deg, #25d366, #128c7e) !important;
	color: #ffffff !important;
}
/* Cards / sections inside OMWAD. */
html.om-dark .om-omwad table,
html.om-dark .om-omwad thead,
html.om-dark .om-omwad tbody,
html.om-dark .om-omwad tr,
html.om-dark .om-omwad td,
html.om-dark .om-omwad th {
	background-color: transparent !important;
	color: var(--om-text-primary) !important;
	border-color: var(--om-border) !important;
}
html.om-dark .om-omwad thead {
	background-color: var(--om-bg-elev) !important;
}
html.om-dark .om-omwad thead th {
	color: var(--om-text-secondary) !important;
}
html.om-dark .om-omwad b,
html.om-dark .om-omwad strong,
html.om-dark .om-omwad h1,
html.om-dark .om-omwad h2,
html.om-dark .om-omwad h3,
html.om-dark .om-omwad h4 {
	color: var(--om-text-primary) !important;
}
/* Palette logo overlay inside the OMWAD designer — defaults to white;
   flip to the dark card surface so it doesn't punch a bright hole in
   the canvas in dark mode. */
html.om-dark .om-omwad-palette-logo,
html.om-dark .om-omwad-canvas-top-mask {
	background: var(--om-bg-card) !important;
}

/* ── Chat panel — robust dark coverage that does NOT depend on the new
   om-chat-toolbar marker (a war built before the ui.xml change won't
   have it). Anchored on .om-surface-card, which the Chat root always
   carries (Chat.java line ~240). */

/* TextBox search in the Chat north toolbar (and any other text input
   inside the chat surface). Force the dark fill + light text. */
html.om-dark .om-surface-card .gwt-TextBox,
html.om-dark .om-surface-card input[type='text'],
html.om-dark .om-surface-card input[type='search'] {
	background-color: var(--om-bg-elev) !important;
	color: var(--om-text-primary) !important;
	border-color: var(--om-border) !important;
}
html.om-dark .om-surface-card .gwt-TextBox::placeholder,
html.om-dark .om-surface-card input[type='text']::placeholder {
	color: var(--om-text-muted) !important;
}

/* gwt-Label inside the Chat surface — covers "Categories:", "Rut:", etc.
   The ui.xml hardcodes color:#344054 which disappears in dark. */
html.om-dark .om-surface-card .gwt-Label {
	color: var(--om-text-secondary) !important;
}

/* Chat top header — waid (recipient/visible_info) + lastSeen. Both
   sit inside the north VerticalPanel of Chat.ui.xml; the .headerItem
   and .lastSeen ui:style classes hardcode dark colors that vanish in
   dark mode. Target by structural pattern: spans + the "last seen" b
   element inside .om-surface-card's north panel.

   We can't reach the obfuscated .headerItem/.lastSeen names directly,
   so we target every span + bold inside the GWT-VerticalPanel that
   contains the avatar img. The avatar has the stable .avatar class
   from Bootstrap, so its parent chain is identifiable. */
html.om-dark .om-surface-card .avatar ~ * span,
html.om-dark .om-surface-card .avatar ~ * b,
html.om-dark .om-surface-card .avatar ~ * div {
	color: var(--om-text-secondary) !important;
}
/* Stronger override for the recipient/visible_info row (first row after
   the avatar) — share the same light slate as last-seen so they read
   as one block. */
html.om-dark .om-surface-card .avatar ~ div span {
	color: var(--om-text-primary) !important;
}

.om-mc-sidebar-row__waid {
	font-size: 10.5px;
	color: #94a3b8;
	font-weight: 500;
	margin-top: 2px;
	margin-bottom: 4px;
	display: flex; align-items: center; gap: 5px;
	font-family: 'Menlo', 'Consolas', monospace;
	letter-spacing: .2px;
}
.om-mc-sidebar-row__waid i { color: #cbd5e1; font-size: 10px; }
html.om-dark .om-mc-sidebar-row__waid { color: var(--om-text-muted); }
html.om-dark .om-mc-sidebar-row__waid i { color: var(--om-text-muted); opacity: .6; }

/* Dark variants */
html.om-dark .om-mc-sidebar-row:hover {
	background: rgba(96, 165, 250, 0.10);
	border-color: rgba(96, 165, 250, 0.25);
}
html.om-dark .om-mc-sidebar-row--open {
	background: rgba(16, 185, 129, 0.10);
	border-color: rgba(16, 185, 129, 0.30);
}
html.om-dark .om-mc-sidebar-row--open:hover {
	background: rgba(16, 185, 129, 0.18);
}
html.om-dark .om-mc-sidebar-row__title { color: var(--om-text-primary); }
html.om-dark .om-mc-sidebar-row__meta  { color: var(--om-text-muted); }

/* Semaforo dot — used in both the sidebar row title and the tile SLA pill. */
.om-mc-dot {
	display: inline-block;
	width: 8px; height: 8px;
	border-radius: 50%;
	margin-right: 7px;
	vertical-align: middle;
	box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06);
}
.om-mc-dot--green    { background: #16a34a; box-shadow: 0 0 6px rgba(22,163,74,.45); }
.om-mc-dot--yellow   { background: #f59e0b; box-shadow: 0 0 6px rgba(245,158,11,.45); }
.om-mc-dot--red      { background: #ef4444; box-shadow: 0 0 6px rgba(239,68,68,.50);
                       animation: om-mc-dot-pulse 1.4s ease-in-out infinite; }
.om-mc-dot--celeste  { background: #38bdf8; box-shadow: 0 0 6px rgba(56,189,248,.45); }
@keyframes om-mc-dot-pulse {
	0%, 100% { box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06), 0 0 6px rgba(239,68,68,.45); }
	50%      { box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06), 0 0 12px rgba(239,68,68,.85); }
}

@keyframes om-mc-pulse {
	0%, 100% { transform: scale(1);    box-shadow: 0 1px 2px rgba(0,0,0,.25), 0 0 0 0 rgba(239,68,68,.55); }
	50%      { transform: scale(1.08); box-shadow: 0 1px 2px rgba(0,0,0,.25), 0 0 0 5px rgba(239,68,68,0); }
}

.om-mc-elapsed {
	display: inline-flex; align-items: center; gap: 4px;
	padding: 1px 6px;
	border-radius: 6px;
	font-weight: 700;
	font-size: 10.5px;
	background: #f1f5f9;
	color: #475569;
}
.om-mc-elapsed--green   { background: #dcfce7; color: #166534; }
.om-mc-elapsed--yellow  { background: #fef3c7; color: #92400e; }
.om-mc-elapsed--red     { background: #fee2e2; color: #991b1b; }
.om-mc-elapsed--celeste { background: #e0f2fe; color: #075985; }
.om-mc-elapsed i { font-size: 9px; opacity: .85; }

html.om-dark .om-mc-elapsed         { background: rgba(255,255,255,.06); color: var(--om-text-primary); }
html.om-dark .om-mc-elapsed--green  { background: rgba(22,163,74,.18);  color: #bbf7d0; }
html.om-dark .om-mc-elapsed--yellow { background: rgba(245,158,11,.18); color: #fde68a; }
html.om-dark .om-mc-elapsed--red    { background: rgba(239,68,68,.20);  color: #fecaca; }
html.om-dark .om-mc-elapsed--celeste{ background: rgba(56,189,248,.18); color: #bae6fd; }

/* SLA pill anchored in the tile header — same colors, white background. */
.om-mc-tile-sla {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 7px;
	border-radius: 9px;
	font-size: 10.5px;
	font-weight: 700;
	background: rgba(255,255,255,.18);
	color: #ffffff;
	margin-right: 4px;
}
.om-mc-tile-sla .om-mc-dot { margin-right: 0; }
.om-mc-tile-sla--green    { background: rgba(34, 197, 94, .25); }
.om-mc-tile-sla--yellow   { background: rgba(245, 158, 11, .30); }
.om-mc-tile-sla--red      { background: rgba(239, 68, 68, .35); }
.om-mc-tile-sla--celeste  { background: rgba(56, 189, 248, .25); }

/* Multi-chat tile message overrides — scoped to .om-mc-tile-msgs so
   they don't bleed into the legacy chat. */

/* Bubble container font size — targeted, not a catch-all, so inline
   font-sizes on the hour div (which are SMALLER) stay smaller. */
.om-mc-tile-msgs .chat_forRemote,
.om-mc-tile-msgs .chat_forLocal,
.om-mc-tile-msgs .chat_forRemotePublic,
.om-mc-tile-msgs .chat_forLocalPublic {
	font-size: 11px !important;
	line-height: 1.32 !important;
	max-width: 92% !important;
	min-width: 0 !important;
	margin-bottom: 4px !important;
	padding: 6px 9px 5px 9px !important;
}

/* Operator outgoing bubbles — force a consistent slate gray regardless
   of whether they were just sent or come from history. (The "blue" of
   the fresh-send variant was the inline-styled chat_forLocal default.)
   Gated on the root NOT having a chat-theme set, so WhatsApp / Mosaic /
   Sketch styles can paint their own bubble colors and win. */
html:not(.om-chat-whatsapp):not(.om-chat-mosaic):not(.om-chat-sketch) .om-mc-tile-msgs .chat_forRemote,
html:not(.om-chat-whatsapp):not(.om-chat-mosaic):not(.om-chat-sketch) .om-mc-tile-msgs .chat_forRemotePublic {
	background: #f1f5f9 !important;
	color: #0f172a !important;
	border-color: rgba(15, 23, 42, 0.08) !important;
}

/* Hour badge: smaller than the message body. The legacy renderer
   sets font-size:10px INLINE on a <div align="right">, which the
   above bubble rule doesn't touch (different scope). We force smaller
   here via attribute selector — works across all message types. */
.om-mc-tile-msgs div[align='right'],
.om-mc-tile-msgs .chat_meta {
	font-size: 8.5px !important;
	line-height: 1 !important;
}

/* Pull the two speakers closer: shave inner GWT panel padding. */
.om-mc-tile-msgs .gwt-VerticalPanel,
.om-mc-tile-msgs .gwt-FlowPanel,
.om-mc-tile-msgs .gwt-HorizontalPanel {
	padding: 0 !important;
}

/* AudioRecorder mic visual recording state — applied via JS when the
   user clicks Record, removed on Stop. Pulses red. */
.om-mic-rec {
	background: linear-gradient(135deg, #fee2e2, #fecaca) !important;
	color: #b91c1c !important;
	box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.14),
	            0 0 0 14px rgba(239, 68, 68, 0.06) !important;
	animation: omMicRecPulse 1.5s ease-in-out infinite;
}
@keyframes omMicRecPulse {
	0%, 100% { transform: scale(1); }
	50%      { transform: scale(1.05); }
}

/* Dark overrides for the AudioRecorder host dialog. */
html.om-dark .om-audrec-host,
html.om-dark .om-audrec-host .popupContent {
	background: var(--om-bg-card) !important;
}

/* ============================================================
   Sidebar shortcuts — responsive font scaling on short viewports.
   Markers .om-sidebar-shortcuts and .om-sidebar-collapsed are
   added from Shortcuts.java. We only shrink when the drawer is
   EXPANDED (no .om-sidebar-collapsed) because the collapsed mode
   already hides labels — shrinking icon-only would be pointless.

   Strategy: set font-size on the marker root so descendants that
   use em or inherit naturally scale down; override the few
   explicit-px sizes via attribute selectors on the GWT pretty
   class names (relies on CssResource.style=pretty being active).
   ============================================================ */
/* All selectors below use the unprefixed [class*="_BinderImpl_GenCss_style-X"]
   form so they hit ALL UiBinder CssResources that defined .X — not only
   Shortcuts. That way Tasks.item, StatPanel.dateFilterCard, etc. all
   shrink in lock-step with the parent root font. */
@media (max-height: 800px) {
	.om-sidebar-shortcuts:not(.om-sidebar-collapsed) {
		font-size: 12px;
	}
	.om-sidebar-shortcuts:not(.om-sidebar-collapsed)
	[class*="_BinderImpl_GenCss_style-item"],
	.om-sidebar-shortcuts:not(.om-sidebar-collapsed)
	[class*="_BinderImpl_GenCss_style-itemSelected"] {
		font-size: 11px !important;
		margin-top: 5px !important;
	}
	.om-sidebar-shortcuts:not(.om-sidebar-collapsed)
	[class*="_BinderImpl_GenCss_style-stackHeaderLite"] {
		padding-top: .45em !important;
		padding-bottom: .25em !important;
	}
	/* StatPanel date filter card — shrink the gradient pill + the
	   datetime trigger pickers so they fit on shorter screens.
	   Selector matches any obfuscated class ENDING with the method
	   name, regardless of prefix (covers BinderImpl_GenCss + Style_GenCss
	   variants GWT may emit). */
	.om-sidebar-shortcuts:not(.om-sidebar-collapsed) [class*="-dateFilterCard"] {
		padding: 6px 8px !important;
	}
	.om-sidebar-shortcuts:not(.om-sidebar-collapsed) [class*="-periodo"] {
		font-size: 10px !important;
		margin-bottom: 4px !important;
	}
	.om-sidebar-shortcuts:not(.om-sidebar-collapsed) [class*="-dtLbl"] {
		font-size: 9.5px !important;
		width: 38px !important;
	}
	.om-sidebar-shortcuts:not(.om-sidebar-collapsed) [class*="-dtInput"],
	.om-sidebar-shortcuts:not(.om-sidebar-collapsed) [class*="-dtTrigger"],
	.om-sidebar-shortcuts:not(.om-sidebar-collapsed) [class*="-dtTriggerText"] {
		font-size: 10px !important;
		padding: 3px 6px !important;
	}
	.om-sidebar-shortcuts:not(.om-sidebar-collapsed) [class*="-preset"] {
		font-size: 9.5px !important;
		padding: 2px 8px !important;
	}
	.om-sidebar-shortcuts:not(.om-sidebar-collapsed) [class*="-cleanBtn"] {
		font-size: 10px !important;
		padding: 3px 8px !important;
	}
}
@media (max-height: 700px) {
	.om-sidebar-shortcuts:not(.om-sidebar-collapsed) {
		font-size: 11px;
	}
	.om-sidebar-shortcuts:not(.om-sidebar-collapsed)
	[class*="_BinderImpl_GenCss_style-item"],
	.om-sidebar-shortcuts:not(.om-sidebar-collapsed)
	[class*="_BinderImpl_GenCss_style-itemSelected"] {
		font-size: 10px !important;
		margin-top: 3px !important;
		padding-left: 10px !important;
	}
	.om-sidebar-shortcuts:not(.om-sidebar-collapsed)
	[class*="_BinderImpl_GenCss_style-stackHeaderLite"] {
		padding-top: .3em !important;
		padding-bottom: .15em !important;
	}
	.om-sidebar-shortcuts:not(.om-sidebar-collapsed) [class*="-dateFilterCard"] {
		padding: 3px 5px !important;
		margin: 0 0 3px 4px !important;
		border-radius: 6px !important;
	}
	.om-sidebar-shortcuts:not(.om-sidebar-collapsed) [class*="-periodo"] {
		font-size: 8.5px !important;
		margin-bottom: 2px !important;
		letter-spacing: 0.5px !important;
	}
	.om-sidebar-shortcuts:not(.om-sidebar-collapsed) [class*="-dtRow"] {
		margin-bottom: 2px !important;
		gap: 4px !important;
	}
	.om-sidebar-shortcuts:not(.om-sidebar-collapsed) [class*="-dtLbl"] {
		font-size: 8.5px !important;
		width: 30px !important;
	}
	.om-sidebar-shortcuts:not(.om-sidebar-collapsed) [class*="-dtInput"],
	.om-sidebar-shortcuts:not(.om-sidebar-collapsed) [class*="-dtTrigger"],
	.om-sidebar-shortcuts:not(.om-sidebar-collapsed) [class*="-dtTriggerText"] {
		font-size: 9px !important;
		padding: 1px 4px !important;
	}
	.om-sidebar-shortcuts:not(.om-sidebar-collapsed) [class*="-presetsRow"] {
		gap: 3px !important;
		margin-top: 4px !important;
	}
	.om-sidebar-shortcuts:not(.om-sidebar-collapsed) [class*="-preset"] {
		font-size: 8.5px !important;
		padding: 1px 5px !important;
	}
	.om-sidebar-shortcuts:not(.om-sidebar-collapsed) [class*="-actionRow"] {
		margin-top: 4px !important;
		gap: 4px !important;
	}
	.om-sidebar-shortcuts:not(.om-sidebar-collapsed) [class*="-cleanBtn"] {
		font-size: 9px !important;
		padding: 1px 5px !important;
	}
	.om-sidebar-shortcuts:not(.om-sidebar-collapsed)
	.gwt-ToggleButton,
	.om-sidebar-shortcuts:not(.om-sidebar-collapsed)
	button {
		font-size: 10px !important;
	}
}
@media (max-height: 600px) {
	.om-sidebar-shortcuts:not(.om-sidebar-collapsed) {
		font-size: 10px;
	}
	.om-sidebar-shortcuts:not(.om-sidebar-collapsed)
	[class*="_BinderImpl_GenCss_style-item"],
	.om-sidebar-shortcuts:not(.om-sidebar-collapsed)
	[class*="_BinderImpl_GenCss_style-itemSelected"] {
		font-size: 9px !important;
		margin-top: 2px !important;
	}
}

/* Period card collapse — toggled from StatPanel.java via the small
   chevron next to the PERIODO label. Class lands on the StatPanel
   root; we hide every descendant of the card except the header row
   (label + toggle button) and shave the card padding. */
.om-period-collapsed [class*="-dateFilterCard"] {
	padding-top: 4px !important;
	padding-bottom: 4px !important;
}
.om-period-collapsed [class*="-dateFilterCard"] > *:not(:first-child) {
	display: none !important;
}

/* Sidebar section that overflows the StackLayoutPanel slot — give it
   its own vertical scroll instead of clipping the bottom items.
   Marker .om-sidebar-section-scroll is added in Java to the PARENT of
   the section root (StackLayoutPanel content wrapper), because the
   section root itself is often a CellPanel <table> and tables don't
   honor overflow. */
.om-sidebar-section-scroll {
	overflow-y: auto !important;
	overflow-x: hidden !important;
	scrollbar-width: thin;
}
.om-sidebar-section-scroll::-webkit-scrollbar {
	width: 6px;
}
.om-sidebar-section-scroll::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.18);
	border-radius: 3px;
}
.om-sidebar-section-scroll::-webkit-scrollbar-thumb:hover {
	background: rgba(255, 255, 255, 0.3);
}

/* =============================================================
   AIAgentManager (AI Agents screen)

   All styles live in an inline <style id="om-aia-styles"> block
   injected from AIAgentManager.injectStyles(). Class names are
   raw `om-aia-*` (no obfuscation), so we can target them here
   directly. Colors were hard-coded light originally; overrides
   below flip surfaces / text / borders under html.om-dark.
   ============================================================= */
html.om-dark .om-aia-shell {
	background: var(--om-bg-app) !important;
	color: var(--om-text-primary) !important;
}
html.om-dark .om-aia-left {
	background: var(--om-bg-card) !important;
	border-right-color: var(--om-border) !important;
}
html.om-dark .om-aia-left-head {
	border-bottom-color: var(--om-border) !important;
}
html.om-dark .om-aia-left-head h3 {
	color: var(--om-text-primary) !important;
}
html.om-dark .om-aia-row {
	border-bottom-color: var(--om-border) !important;
	color: var(--om-text-primary) !important;
}
html.om-dark .om-aia-row:hover {
	background: rgba(255, 255, 255, 0.06) !important;
}
html.om-dark .om-aia-row--active {
	background: rgba(99, 102, 241, 0.18) !important;
	border-left-color: #818cf8 !important;
}
html.om-dark .om-aia-row-title {
	color: var(--om-text-primary) !important;
}
html.om-dark .om-aia-row-sub,
html.om-dark .om-aia-empty {
	color: var(--om-text-muted) !important;
}

/* Right pane -- form + sections. */
html.om-dark .om-aia-title {
	color: var(--om-text-primary) !important;
}
html.om-dark .om-aia-h2 {
	color: var(--om-text-primary) !important;
	border-bottom-color: var(--om-border) !important;
}
html.om-dark .om-aia-row2 label {
	color: var(--om-text-secondary) !important;
}
html.om-dark .om-aia-row2 input,
html.om-dark .om-aia-row2 select,
html.om-dark .om-aia-row2 textarea {
	background: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
	border-color: var(--om-border-strong) !important;
}
html.om-dark .om-aia-row2 input::placeholder,
html.om-dark .om-aia-row2 textarea::placeholder {
	color: var(--om-text-muted) !important;
}

/* Buttons. Primary keeps its brand gradient; ghost + danger swap
   to dark surfaces with brighter text. */
html.om-dark .om-aia-btn-ghost {
	background: var(--om-bg-elev) !important;
	color: var(--om-text-primary) !important;
	border-color: var(--om-border-strong) !important;
}
html.om-dark .om-aia-btn-ghost:hover {
	background: rgba(255, 255, 255, 0.08) !important;
}
html.om-dark .om-aia-btn-danger {
	background: rgba(239, 68, 68, 0.10) !important;
	color: #fca5a5 !important;
	border-color: rgba(252, 165, 165, 0.40) !important;
}
html.om-dark .om-aia-btn-danger:hover {
	background: rgba(239, 68, 68, 0.18) !important;
}

/* Try It panel. */
html.om-dark .om-aia-try {
	background: var(--om-bg-elev) !important;
	border-color: var(--om-border) !important;
}
html.om-dark .om-aia-stats {
	color: var(--om-text-muted) !important;
}
html.om-dark .om-aia-chat-host {
	background: var(--om-bg-card) !important;
	border-color: var(--om-border) !important;
}
html.om-dark .om-aia-chat-empty {
	color: var(--om-text-muted) !important;
}
html.om-dark .om-aia-chat-bubble-assistant {
	background: var(--om-bg-elev) !important;
	color: var(--om-text-primary) !important;
	border-color: var(--om-border) !important;
}
html.om-dark .om-aia-chat-bubble-error {
	background: rgba(239, 68, 68, 0.14) !important;
	color: #fca5a5 !important;
	border-color: rgba(252, 165, 165, 0.40) !important;
}
html.om-dark .om-aia-chat-bubble-pending {
	background: var(--om-bg-elev) !important;
	color: var(--om-text-muted) !important;
	border-color: var(--om-border-strong) !important;
}
html.om-dark .om-aia-chat-input {
	background: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
	border-color: var(--om-border-strong) !important;
}
html.om-dark .om-aia-chat-input::placeholder {
	color: var(--om-text-muted) !important;
}

/* RAG functions + API tokens list. */
html.om-dark .om-aia-fn-list {
	background: var(--om-bg-card) !important;
	border-color: var(--om-border) !important;
}
html.om-dark .om-aia-fn-row {
	border-bottom-color: var(--om-border) !important;
}
html.om-dark .om-aia-fn-row:hover {
	background: rgba(255, 255, 255, 0.06) !important;
}
html.om-dark .om-aia-fn-title {
	color: var(--om-text-primary) !important;
}
html.om-dark .om-aia-fn-sub {
	color: var(--om-text-muted) !important;
}
html.om-dark .om-aia-fn-disabled {
	color: #fca5a5 !important;
}
html.om-dark .om-aia-fn-sep {
	background: rgba(16, 185, 129, 0.14) !important;
	color: #6ee7b7 !important;
	border-top-color: rgba(110, 231, 183, 0.30) !important;
	border-bottom-color: rgba(110, 231, 183, 0.30) !important;
}
html.om-dark .om-aia-fn-builtin {
	background: rgba(16, 185, 129, 0.10) !important;
}
html.om-dark .om-aia-fn-builtin:hover {
	background: rgba(16, 185, 129, 0.18) !important;
}
html.om-dark .om-aia-fn-builtin .om-aia-fn-title {
	color: #6ee7b7 !important;
}

/* Usage & Costs report cards + tag chip. */
html.om-dark .om-aia-card {
	background: var(--om-bg-card) !important;
	border-color: var(--om-border) !important;
}
html.om-dark .om-aia-card-icon {
	color: #93c5fd !important;
}
html.om-dark .om-aia-card-label {
	color: var(--om-text-muted) !important;
}
html.om-dark .om-aia-card-value {
	color: var(--om-text-primary) !important;
}
html.om-dark .om-aia-tag {
	background: rgba(99, 102, 241, 0.20) !important;
	color: #c7d2fe !important;
}

/* Inline-styled fragments in AIAgentManager.ui.xml. The graph wrap +
   cover carry hard-coded `#fafafa` inline; override by id (specificity
   0,1,0 + !important beats the inline `background:...`). The List/Graph
   toggle buttons hard-code `#e2e8f0`/`#0f172a` inline -- my earlier
   .om-aia-btn-ghost !important rule already flips those. */
html.om-dark #om-aia-fn-graph-wrap {
	background: var(--om-bg-card) !important;
	border-color: var(--om-border) !important;
}
html.om-dark #om-aia-fn-graph-cover {
	background: var(--om-bg-card) !important;
}

/* =============================================================
   AIKbAdmin (AI Knowledge Base screen)

   Styles live in an inline <style> block injected from
   AIKbAdmin.injectStyles(). Class names are raw `om-aikb-*`
   (no obfuscation), so overrides go straight to them here.
   ============================================================= */
html.om-dark .om-aikb-root {
	background: var(--om-bg-app) !important;
	color: var(--om-text-primary) !important;
}
html.om-dark .om-aikb-head {
	border-bottom-color: var(--om-border) !important;
}
html.om-dark .om-aikb-title {
	color: var(--om-text-primary) !important;
}
html.om-dark .om-aikb-title i {
	color: #93c5fd !important;
}
html.om-dark .om-aikb-sub {
	color: var(--om-text-muted) !important;
}
html.om-dark .om-aikb-section {
	background: var(--om-bg-card) !important;
	border-color: var(--om-border) !important;
}
html.om-dark .om-aikb-secthead {
	color: var(--om-text-primary) !important;
}
html.om-dark .om-aikb-secthead i {
	color: #93c5fd !important;
}

/* Provider / collection / document tables. */
html.om-dark .om-aikb-tbl th {
	background: var(--om-bg-elev) !important;
	color: var(--om-text-secondary) !important;
	border-bottom-color: var(--om-border) !important;
}
html.om-dark .om-aikb-tbl td {
	border-bottom-color: var(--om-border) !important;
	color: var(--om-text-primary) !important;
}
html.om-dark .om-aikb-tbl tr:hover td {
	background: rgba(255, 255, 255, 0.06) !important;
}
html.om-dark .om-aikb-empty {
	color: var(--om-text-muted) !important;
}

/* Buttons -- primary keeps its brand gradient; ghost / danger flip. */
html.om-dark .om-aikb-btn-ghost {
	background: var(--om-bg-elev) !important;
	color: var(--om-text-primary) !important;
	border-color: var(--om-border-strong) !important;
}
html.om-dark .om-aikb-btn-ghost:hover {
	background: rgba(255, 255, 255, 0.08) !important;
}
html.om-dark .om-aikb-btn-danger {
	background: rgba(239, 68, 68, 0.14) !important;
	color: #fca5a5 !important;
	border-color: rgba(252, 165, 165, 0.40) !important;
}
html.om-dark .om-aikb-btn-danger:hover {
	background: rgba(239, 68, 68, 0.22) !important;
}

/* Tag + status pills. */
html.om-dark .om-aikb-tag {
	background: rgba(59, 130, 246, 0.20) !important;
	color: #93c5fd !important;
}
html.om-dark .om-aikb-status.ok {
	background: rgba(34, 197, 94, 0.18) !important;
	color: #86efac !important;
}
html.om-dark .om-aikb-status.err {
	background: rgba(239, 68, 68, 0.18) !important;
	color: #fca5a5 !important;
}
html.om-dark .om-aikb-status.wait {
	background: rgba(234, 179, 8, 0.18) !important;
	color: #fde68a !important;
}

/* Modal (new / edit provider / collection / document). Header keeps
   its brand gradient. Body + footer flip to dark surfaces. */
html.om-dark .om-aikb-modal {
	background: var(--om-bg-card) !important;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.70) !important;
}
html.om-dark .om-aikb-modal-b {
	color: var(--om-text-primary) !important;
}
html.om-dark .om-aikb-modal-f {
	background: var(--om-bg-elev) !important;
	border-top-color: var(--om-border) !important;
}
html.om-dark .om-aikb-f label {
	color: var(--om-text-secondary) !important;
}
html.om-dark .om-aikb-f input,
html.om-dark .om-aikb-f select,
html.om-dark .om-aikb-f textarea {
	background: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
	border-color: var(--om-border-strong) !important;
}
html.om-dark .om-aikb-f input::placeholder,
html.om-dark .om-aikb-f textarea::placeholder {
	color: var(--om-text-muted) !important;
}
html.om-dark .om-aikb-chk {
	color: var(--om-text-primary) !important;
}

/* =============================================================
   om_crm module (Admin / Customers / Audit / Tickets / Reports)

   Styles live in OmCrmStyles.java (SHARED + ADMIN + CUSTOMERS +
   AUDIT + TICKET + REPORTS). All classes are raw `om-crm-*`
   BEM. Brand-gradient headers stay as-is (they look correct on
   both themes). Only the light surfaces / text / borders flip.
   ============================================================= */

/* ---- Root shells ---- */
html.om-dark .om-crm-admin,
html.om-dark .om-crm-cust,
html.om-dark .om-crm-audit,
html.om-dark .om-crm-rep {
	background: var(--om-bg-app) !important;
	color: var(--om-text-primary) !important;
}

/* ---- SHARED: buttons ---- */
html.om-dark .om-crm-admin__btn {
	background: var(--om-bg-elev) !important;
	color: var(--om-text-primary) !important;
	border-color: var(--om-border-strong) !important;
}
html.om-dark .om-crm-admin__btn:hover {
	background: rgba(255, 255, 255, 0.08) !important;
}
html.om-dark .om-crm-admin__btn--danger {
	color: #fca5a5 !important;
	border-color: rgba(252, 165, 165, 0.40) !important;
}
html.om-dark .om-crm-admin__btn--danger:hover {
	background: rgba(239, 68, 68, 0.14) !important;
}
html.om-dark .om-crm-admin__rowbtn {
	background: var(--om-bg-elev) !important;
	color: var(--om-text-primary) !important;
	border-color: var(--om-border) !important;
}
html.om-dark .om-crm-admin__rowbtn:hover {
	background: rgba(255, 255, 255, 0.08) !important;
}
html.om-dark .om-crm-admin__rowbtn--danger {
	color: #fca5a5 !important;
	border-color: rgba(252, 165, 165, 0.40) !important;
}
html.om-dark .om-crm-admin__rowbtn--danger:hover {
	background: rgba(239, 68, 68, 0.14) !important;
}
html.om-dark .om-crm-admin__navbtn {
	background: var(--om-bg-elev) !important;
	color: var(--om-text-primary) !important;
	border-color: var(--om-border-strong) !important;
}
html.om-dark .om-crm-admin__navbtn:hover:not([disabled]) {
	background: rgba(255, 255, 255, 0.10) !important;
	border-color: #93c5fd !important;
}

/* ---- SHARED: inputs ---- */
html.om-dark .om-crm-admin__input,
html.om-dark .om-crm-modal__input,
html.om-dark .om-crm-admin__select,
html.om-dark .om-crm-modal__select {
	background: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
	border-color: var(--om-border-strong) !important;
}
html.om-dark .om-crm-admin__input::placeholder,
html.om-dark .om-crm-modal__input::placeholder {
	color: var(--om-text-muted) !important;
}

/* ---- SHARED: tables ---- */
html.om-dark .om-crm-admin__tablewrap {
	background: var(--om-bg-card) !important;
	border-color: var(--om-border) !important;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35) !important;
}
html.om-dark .om-crm-admin__table {
	background: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
}
html.om-dark .om-crm-admin__table thead th {
	background: var(--om-bg-elev) !important;
	color: var(--om-text-secondary) !important;
	border-bottom-color: var(--om-border) !important;
}
html.om-dark .om-crm-admin__table tbody tr:nth-child(odd) {
	background: rgba(255, 255, 255, 0.03) !important;
}
html.om-dark .om-crm-admin__table tbody tr:hover {
	background: rgba(255, 255, 255, 0.08) !important;
}
html.om-dark .om-crm-admin__table td {
	border-bottom-color: var(--om-border) !important;
	color: var(--om-text-primary) !important;
}
html.om-dark .om-crm-admin__empty {
	color: var(--om-text-muted) !important;
}
html.om-dark .om-crm-admin__rownum {
	color: var(--om-text-secondary) !important;
}
html.om-dark .om-crm-admin__code {
	background: var(--om-bg-elev) !important;
	color: #93c5fd !important;
}

/* ---- SHARED: tags / badges (translucent dark variants) ---- */
html.om-dark .om-crm-admin__type {
	background: rgba(99, 102, 241, 0.20) !important;
	color: #c7d2fe !important;
}
html.om-dark .om-crm-admin__badge--ok {
	background: rgba(34, 197, 94, 0.18) !important;
	color: #86efac !important;
}
html.om-dark .om-crm-admin__badge--muted {
	background: rgba(148, 163, 184, 0.18) !important;
	color: #cbd5e1 !important;
}
html.om-dark .om-crm-admin__badge--warn {
	background: rgba(234, 179, 8, 0.18) !important;
	color: #fde68a !important;
}
html.om-dark .om-crm-admin__badge--danger {
	background: rgba(239, 68, 68, 0.18) !important;
	color: #fca5a5 !important;
}

/* ---- SHARED: modals ---- */
html.om-dark .om-crm-modal-wrap.gwt-DialogBox {
	background: var(--om-bg-card) !important;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.70) !important;
}
html.om-dark .om-crm-modal-wrap .dialogContent,
html.om-dark .om-crm-modal-wrap .dialogMiddleCenter,
html.om-dark .om-crm-modal-wrap .dialogMiddleCenterInner {
	background: var(--om-bg-card) !important;
}
html.om-dark .om-crm-modal__body {
	color: var(--om-text-primary) !important;
}
html.om-dark .om-crm-modal__row > label {
	color: var(--om-text-secondary) !important;
}
html.om-dark .om-crm-modal__row--inline > label {
	color: var(--om-text-primary) !important;
}
html.om-dark .om-crm-modal__chip {
	background: var(--om-bg-elev) !important;
	color: var(--om-text-primary) !important;
}
html.om-dark .om-crm-modal__chip:hover {
	background: rgba(255, 255, 255, 0.10) !important;
}
html.om-dark .om-crm-modal__hint {
	background: var(--om-bg-elev) !important;
	color: var(--om-text-muted) !important;
}
html.om-dark .om-crm-modal__hint code {
	background: var(--om-bg-card) !important;
	color: #93c5fd !important;
}
html.om-dark .om-crm-modal__footer {
	background: var(--om-bg-elev) !important;
	border-top-color: var(--om-border) !important;
}
html.om-dark .om-crm-modal__optrow {
	background: var(--om-bg-elev) !important;
	border-color: var(--om-border-strong) !important;
}
html.om-dark .om-crm-modal__sep {
	color: var(--om-text-muted) !important;
}

/* ---- ADMIN: toolbar / label / status ---- */
html.om-dark .om-crm-admin__toolbar {
	background: var(--om-bg-card) !important;
	border-color: var(--om-border) !important;
}
html.om-dark .om-crm-admin__label {
	color: var(--om-text-secondary) !important;
}
html.om-dark .om-crm-admin__status {
	color: var(--om-text-muted) !important;
}

/* ---- CUSTOMERS: toolbar / detail / edit sections ---- */
html.om-dark .om-crm-cust__toolbar {
	background: var(--om-bg-card) !important;
	border-color: var(--om-border) !important;
}
html.om-dark .om-crm-cust__pager {
	color: var(--om-text-muted) !important;
}
html.om-dark .om-crm-detail__section {
	background: var(--om-bg-card) !important;
	border-color: var(--om-border) !important;
}
html.om-dark .om-crm-detail__sectitle {
	color: var(--om-text-muted) !important;
}
html.om-dark .om-crm-detail__flabel {
	color: var(--om-text-secondary) !important;
}
html.om-dark .om-crm-detail__fvalue {
	color: var(--om-text-primary) !important;
}
html.om-dark .om-crm-detail__fvalue--empty {
	color: var(--om-text-muted) !important;
}
html.om-dark .om-crm-detail__actions {
	background: var(--om-bg-elev) !important;
	border-top-color: var(--om-border) !important;
}

/* ---- CUSTOMER DETAIL Composite (om-crm-cd) ---- */
html.om-dark .om-crm-cd {
	background: var(--om-bg-app) !important;
	color: var(--om-text-primary) !important;
}
html.om-dark .om-crm-cd__tabs {
	background: var(--om-bg-card) !important;
	border-bottom-color: var(--om-border) !important;
}
html.om-dark .om-crm-cd__tab {
	color: var(--om-text-muted) !important;
}
html.om-dark .om-crm-cd__tab:hover {
	color: var(--om-text-primary) !important;
}
html.om-dark .om-crm-cd__tab--active {
	color: #93c5fd !important;
	border-bottom-color: #4d96ff !important;
}
html.om-dark .om-crm-cd__tab--active i {
	color: #93c5fd !important;
}
html.om-dark .om-crm-cd__tab:disabled {
	color: var(--om-text-muted) !important;
}
html.om-dark .om-crm-cd__card {
	background: var(--om-bg-card) !important;
	border-color: var(--om-border) !important;
}
html.om-dark .om-crm-cd__sectitle {
	color: var(--om-text-muted) !important;
}
html.om-dark .om-crm-cd__flabel {
	color: var(--om-text-secondary) !important;
}
html.om-dark .om-crm-cd__fvalue {
	color: var(--om-text-primary) !important;
}
html.om-dark .om-crm-cd__fvalue--empty {
	color: var(--om-text-muted) !important;
}
html.om-dark .om-crm-cd__editbar {
	border-top-color: var(--om-border) !important;
}

/* ---- Conversation viewer dialog (om-crm-cv) ---- */
html.om-dark .om-crm-cv-wrap.gwt-DialogBox {
	background: var(--om-bg-card) !important;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.70) !important;
}
html.om-dark .om-crm-cv-wrap .dialogContent,
html.om-dark .om-crm-cv-wrap .dialogMiddleCenter,
html.om-dark .om-crm-cv-wrap .dialogMiddleCenterInner {
	background: var(--om-bg-card) !important;
}
html.om-dark .om-crm-cv {
	background: var(--om-bg-card) !important;
}
html.om-dark .om-crm-cv__tabs {
	background: var(--om-bg-elev) !important;
	border-bottom-color: var(--om-border) !important;
}
html.om-dark .om-crm-cv__tab {
	color: var(--om-text-muted) !important;
}
html.om-dark .om-crm-cv__tab:hover {
	color: var(--om-text-primary) !important;
	background: rgba(255, 255, 255, 0.06) !important;
}
html.om-dark .om-crm-cv__tab--active {
	color: #93c5fd !important;
	border-bottom-color: #4d96ff !important;
	background: var(--om-bg-card) !important;
}
html.om-dark .om-crm-cv__tab--active i {
	color: #93c5fd !important;
}
html.om-dark .om-crm-cv__body {
	background: var(--om-bg-app) !important;
}

/* ---- AUDIT ---- */
html.om-dark .om-crm-audit__filters {
	background: var(--om-bg-card) !important;
	border-color: var(--om-border) !important;
}
html.om-dark .om-crm-audit__filters label {
	color: var(--om-text-muted) !important;
}
html.om-dark .om-crm-audit__pager {
	color: var(--om-text-muted) !important;
}
html.om-dark .om-crm-audit__diff {
	color: var(--om-text-secondary) !important;
}
html.om-dark .om-crm-audit__diff--before {
	color: var(--om-text-muted) !important;
}
html.om-dark .om-crm-audit__diff--after {
	color: var(--om-text-primary) !important;
}
html.om-dark .om-crm-audit__act--create,
html.om-dark .om-crm-audit__act--activate {
	background: rgba(34, 197, 94, 0.18) !important;
	color: #86efac !important;
}
html.om-dark .om-crm-audit__act--update {
	background: rgba(59, 130, 246, 0.20) !important;
	color: #93c5fd !important;
}
html.om-dark .om-crm-audit__act--delete,
html.om-dark .om-crm-audit__act--deactivate {
	background: rgba(239, 68, 68, 0.18) !important;
	color: #fca5a5 !important;
}
html.om-dark .om-crm-audit__act--link {
	background: rgba(99, 102, 241, 0.22) !important;
	color: #c7d2fe !important;
}
html.om-dark .om-crm-audit__act--unlink {
	background: rgba(234, 179, 8, 0.18) !important;
	color: #fde68a !important;
}
html.om-dark .om-crm-audit__act--merge {
	background: rgba(217, 70, 239, 0.20) !important;
	color: #f0abfc !important;
}
html.om-dark .om-crm-audit__act--other {
	background: var(--om-bg-elev) !important;
	color: var(--om-text-secondary) !important;
}

/* ---- TICKET (floating operator ticket panel) ---- */
html.om-dark .om-crm-ticket {
	background: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.70) !important;
}
html.om-dark .om-crm-ticket__tabs {
	background: var(--om-bg-elev) !important;
	border-bottom-color: var(--om-border) !important;
}
html.om-dark .om-crm-ticket__tab {
	color: var(--om-text-muted) !important;
}
html.om-dark .om-crm-ticket__tab:hover {
	color: var(--om-text-primary) !important;
	background: rgba(255, 255, 255, 0.06) !important;
}
html.om-dark .om-crm-ticket__tab--active {
	color: #93c5fd !important;
	border-bottom-color: #4d96ff !important;
	background: var(--om-bg-card) !important;
}
html.om-dark .om-crm-ticket__tab--active i {
	color: #93c5fd !important;
}
html.om-dark .om-crm-ticket__section {
	border-bottom-color: var(--om-border) !important;
}
html.om-dark .om-crm-ticket__sectitle {
	color: var(--om-text-muted) !important;
}
html.om-dark .om-crm-ticket__cname {
	color: var(--om-text-primary) !important;
}
html.om-dark .om-crm-ticket__cmeta {
	color: var(--om-text-muted) !important;
}
html.om-dark .om-crm-ticket__unlinked {
	background: rgba(234, 179, 8, 0.14) !important;
	border-color: rgba(253, 224, 71, 0.40) !important;
	color: #fde68a !important;
}
html.om-dark .om-crm-ticket__flabel {
	color: var(--om-text-secondary) !important;
}
html.om-dark .om-crm-ticket__fvalue {
	color: var(--om-text-primary) !important;
}
html.om-dark .om-crm-ticket__fvalue--empty {
	color: var(--om-text-muted) !important;
}
html.om-dark .om-crm-ticket__finput {
	background: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
	border-color: var(--om-border-strong) !important;
}
html.om-dark .om-crm-ticket__finput:disabled {
	background: var(--om-bg-elev) !important;
	color: var(--om-text-muted) !important;
}
html.om-dark .om-crm-ticket__blendrow {
	border-bottom-color: var(--om-border) !important;
}
html.om-dark .om-crm-ticket__blendtime {
	color: var(--om-text-muted) !important;
}
html.om-dark .om-crm-ticket__blendch {
	color: #93c5fd !important;
}
html.om-dark .om-crm-ticket__blendtext,
html.om-dark .om-crm-ticket__blendtext--in {
	color: var(--om-text-primary) !important;
}
html.om-dark .om-crm-ticket__blendtext--out {
	color: #7dd3fc !important;
}
html.om-dark .om-crm-ticket__linkform {
	background: rgba(234, 88, 12, 0.10) !important;
	border-color: rgba(253, 186, 116, 0.40) !important;
}
html.om-dark .om-crm-ticket__linkform-title {
	color: #fdba74 !important;
}
html.om-dark .om-crm-ticket__linkform-title i {
	color: #fb923c !important;
}
html.om-dark .om-crm-ticket__linkform-help {
	color: var(--om-text-muted) !important;
}
html.om-dark .om-crm-ticket__linkform-help b {
	color: #93c5fd !important;
}
html.om-dark .om-crm-ticket__linkform-input {
	background: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
	border-color: rgba(253, 186, 116, 0.40) !important;
}
html.om-dark .om-crm-ticket__linkform-status--info {
	background: rgba(59, 130, 246, 0.18) !important;
	color: #93c5fd !important;
}
html.om-dark .om-crm-ticket__linkform-status--ok {
	background: rgba(34, 197, 94, 0.18) !important;
	color: #86efac !important;
}
html.om-dark .om-crm-ticket__linkform-status--warn {
	background: rgba(234, 179, 8, 0.18) !important;
	color: #fde68a !important;
}
html.om-dark .om-crm-ticket__linkform-status--error {
	background: rgba(239, 68, 68, 0.18) !important;
	color: #fca5a5 !important;
}

/* ---- REPORTS ---- */
html.om-dark .om-crm-rep__kpi,
html.om-dark .om-crm-rep__card {
	background: var(--om-bg-card) !important;
	border-color: var(--om-border) !important;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35) !important;
}
html.om-dark .om-crm-rep__kpi-label,
html.om-dark .om-crm-rep__cardtitle {
	color: var(--om-text-muted) !important;
}
html.om-dark .om-crm-rep__kpi-value {
	color: var(--om-text-primary) !important;
}
html.om-dark .om-crm-rep__kpi-accent {
	color: #93c5fd !important;
}
html.om-dark .om-crm-rep__search {
	background: var(--om-bg-card) !important;
	border-color: var(--om-border) !important;
}
html.om-dark .om-crm-rep__bartrack {
	background: var(--om-bg-elev) !important;
}
html.om-dark .om-crm-rep__barcount {
	color: var(--om-text-secondary) !important;
}

/* =============================================================
   CRM Knowledge Base (KnowledgeBaseAdmin — kbadmin__* prefix)

   Injected inline from KnowledgeBaseAdmin.injectStyles(). Classes
   are raw. Primary accent is `#2c5cff` (distinct from the om_crm
   admin brand blue); we keep the primary button gradient roughly
   the same in dark mode but flip everything else.
   ============================================================= */
html.om-dark .kbadmin {
	background: var(--om-bg-app) !important;
	color: var(--om-text-primary) !important;
}
html.om-dark .kbadmin__header {
	border-bottom-color: var(--om-border) !important;
}
html.om-dark .kbadmin__brand {
	color: #93c5fd !important;
}
html.om-dark .kbadmin__tab {
	color: var(--om-text-muted) !important;
}
html.om-dark .kbadmin__tab:hover {
	background: rgba(255, 255, 255, 0.06) !important;
	color: var(--om-text-primary) !important;
}
html.om-dark .kbadmin__tab.is-active {
	background: #4d96ff !important;
	color: #fff !important;
}

/* Buttons: primary keeps its brand blue; ghost + danger flip. */
html.om-dark .kbadmin__btn--ghost {
	background: var(--om-bg-elev) !important;
	color: var(--om-text-primary) !important;
	border-color: var(--om-border-strong) !important;
}
html.om-dark .kbadmin__btn--ghost:hover {
	background: rgba(255, 255, 255, 0.08) !important;
}

/* Tables. */
html.om-dark .kbadmin__table {
	background: var(--om-bg-card) !important;
	border-color: var(--om-border) !important;
	color: var(--om-text-primary) !important;
}
html.om-dark .kbadmin__table th {
	background: var(--om-bg-elev) !important;
	color: var(--om-text-secondary) !important;
	border-bottom-color: var(--om-border) !important;
}
html.om-dark .kbadmin__table td {
	border-bottom-color: var(--om-border) !important;
	color: var(--om-text-primary) !important;
}

/* Forms. */
html.om-dark .kbadmin__form {
	background: var(--om-bg-card) !important;
	border-color: var(--om-border) !important;
}
html.om-dark .kbadmin__field label {
	color: var(--om-text-muted) !important;
}
html.om-dark .kbadmin__input {
	background: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
	border-color: var(--om-border-strong) !important;
}
html.om-dark .kbadmin__input::placeholder {
	color: var(--om-text-muted) !important;
}
html.om-dark .kbadmin__input:focus {
	border-color: #4d96ff !important;
}

/* Status pills (ready / failed / pending). */
html.om-dark .kbadmin__pill--ready {
	background: rgba(34, 197, 94, 0.18) !important;
	color: #86efac !important;
}
html.om-dark .kbadmin__pill--failed {
	background: rgba(239, 68, 68, 0.18) !important;
	color: #fca5a5 !important;
}
html.om-dark .kbadmin__pill--pending,
html.om-dark .kbadmin__pill--extracting,
html.om-dark .kbadmin__pill--embedding {
	background: rgba(234, 179, 8, 0.18) !important;
	color: #fde68a !important;
}

/* Query results + hits. */
html.om-dark .kbadmin__results {
	background: var(--om-bg-card) !important;
	border-color: var(--om-border) !important;
}
html.om-dark .kbadmin__hit {
	border-bottom-color: var(--om-border) !important;
}
html.om-dark .kbadmin__hit-title {
	color: var(--om-text-primary) !important;
}
html.om-dark .kbadmin__hit-score {
	color: var(--om-text-muted) !important;
}
html.om-dark .kbadmin__hit-text {
	color: var(--om-text-primary) !important;
}
html.om-dark .kbadmin__empty {
	color: var(--om-text-muted) !important;
}

/* Chat card. */
html.om-dark .kbadmin__chatcard {
	background: var(--om-bg-card) !important;
	border-color: var(--om-border) !important;
}
html.om-dark .kbadmin__chathead {
	border-bottom-color: var(--om-border) !important;
}
html.om-dark .kbadmin__chatmode {
	color: var(--om-text-muted) !important;
}
html.om-dark .kbadmin__msg--bot {
	background: var(--om-bg-elev) !important;
	color: var(--om-text-primary) !important;
	border-color: var(--om-border) !important;
}
html.om-dark .kbadmin__msg--err {
	background: rgba(239, 68, 68, 0.14) !important;
	color: #fca5a5 !important;
	border-color: rgba(252, 165, 165, 0.40) !important;
}
html.om-dark .kbadmin__sources {
	border-top-color: var(--om-border-strong) !important;
}
html.om-dark .kbadmin__src {
	color: var(--om-text-muted) !important;
}
html.om-dark .kbadmin__src b {
	color: var(--om-text-primary) !important;
}
html.om-dark .kbadmin__src-text {
	background: var(--om-bg-card) !important;
	color: var(--om-text-primary) !important;
	border-color: var(--om-border) !important;
}
html.om-dark .kbadmin__meta {
	color: var(--om-text-muted) !important;
}
html.om-dark .kbadmin__chatform {
	border-top-color: var(--om-border) !important;
}
html.om-dark .kbadmin__typing {
	color: var(--om-text-muted) !important;
}

/* ============================================================
   Login page — mobile layout (viewport up to 768px)
   ============================================================
   Kept here (not inside Login.ui.xml <ui:style>) so GWT's CSS
   obfuscation and hot-deploy behavior can't hide the rules.
   Hooks are stable class names added directly in Login.ui.xml
   (om-login-card / om-login-logo / etc). All specificity here
   is single-class + !important so it wins over the inline
   styles Login.java sets via Element.getStyle().setProperty. */

/* Mobile login = full-screen edge-to-edge (nuevo paradigma 2026-08).
   Antes el card se ACHICABA a max-width:300px centrado en el viewport
   -- resultado se veia perdido en pantallas modernas de 400px+.
   Ahora ocupa TODO el viewport del telefono: card blanco 100vw x
   min-height calc(100vh - 80px), sin bordes redondos, sin sombra,
   footer fijo abajo. Inputs y boton escalados a tamano thumb-friendly.

   TRUCO: para que "full height" funcione, TODA la cadena de padres
   (container -> row -> col -> card) debe ser flex-column con flex:1.
   Sin eso, el "min-height calc(100vh)" del card no propaga porque los
   padres siguen siendo display:block (defaults de Bootstrap). Ademas
   el card-body es un <table> (GWT renderea HorizontalPanel asi) --
   por eso centramos el contenido con justify-content:center a nivel
   card, no a nivel card-body. */
/* Mobile operator conversation font-size (per-sesion, via
   data-mobop-fontsize en #mobop-root). 3 presets. Aplica a los
   bubbles del chat (Conversacion2 render). Reglas con !important
   porque global.css tiene reglas per-tema con specificity alta
   (html.om-chat-whatsapp .chat_forRemote {font-size:14px} etc). */
#mobop-root[data-mobop-fontsize="small"] .chat_forRemote,
#mobop-root[data-mobop-fontsize="small"] .chat_forLocal,
#mobop-root[data-mobop-fontsize="small"] .chat_forRemotePublic,
#mobop-root[data-mobop-fontsize="small"] .chat_forLocalPublic {
	font-size: 12px !important;
}
#mobop-root[data-mobop-fontsize="small"] .chat_meta {
	font-size: 10px !important;
}
#mobop-root[data-mobop-fontsize="large"] .chat_forRemote,
#mobop-root[data-mobop-fontsize="large"] .chat_forLocal,
#mobop-root[data-mobop-fontsize="large"] .chat_forRemotePublic,
#mobop-root[data-mobop-fontsize="large"] .chat_forLocalPublic {
	font-size: 17px !important;
	line-height: 1.45 !important;
}
#mobop-root[data-mobop-fontsize="large"] .chat_meta {
	font-size: 12px !important;
}
/* "normal" (default) no lleva override -- deja los tamanos default del
   tema activo (whatsapp / classic / mosaic / etc). */

/* Desktop / tablet (>=769px): baja el card verticalmente para quedar
   centrado en el viewport. Antes el `margin-top: 5%` del ui:style lo
   dejaba muy pegado arriba en pantallas grandes. Uso flex-center sobre
   el container -- funciona sin importar la altura del card.
   NO seteo min-height explicito: el body ya es flex-column min-height:100vh
   y este container tiene flex:1 0 auto (del ui:style .loginContent), asi
   que crece automatico entre el nav absoluto y el footer. Setear min-height
   ademas del content-box padding causaba overflow del footer bajo el fold. */
@media (min-width: 769px) {
	.om-login-shell .om-login-container {
		display: flex !important;
		flex-direction: column !important;
		justify-content: center !important;
		margin-top: 0 !important;
		padding-top: 0 !important;
		padding-bottom: 0 !important;
	}
}

@media (max-width: 768px) {
	/* Body shell: flex column full-viewport. Fondo azul uniforme con
	   degradacion sutil diagonal (navy -> lighter navy). NO animado --
	   el shifting distraia sin aportar. La degradacion es del 15% del
	   canal luminosidad, tenue pero da profundidad. */
	.om-login-shell {
		min-height: 100vh !important;
		display: flex !important;
		flex-direction: column !important;
		background: linear-gradient(160deg, #1a3568 0%, #2a5298 100%) !important;
		background-image: linear-gradient(160deg, #1a3568 0%, #2a5298 100%) !important;
		animation: none !important;
	}
	/* Ocultar los ~30 iconos animados + el layer de connections dots.
	   Structural selectors porque las clases viven en ui:style obfuscado. */
	.om-login-shell > div:nth-child(1),
	.om-login-shell > div:nth-child(2) {
		display: none !important;
	}
	/* CARD transparente: la pantalla completa es azul uniforme, no queremos
	   un "recuadro blanco" cortando el gradient. El card sigue existiendo
	   estructuralmente (mantiene layout flex del form) pero es invisible. */
	.om-login-shell .om-login-card {
		background-color: transparent !important;
		background: transparent !important;
	}
	/* Texto del card body debe ser legible sobre el azul. Titulo blanco,
	   subtitulo con alpha para jerarquia visual. */
	.om-login-shell .om-login-title {
		color: #ffffff !important;
	}
	.om-login-shell .om-login-sub {
		color: rgba(255,255,255,0.72) !important;
	}
	/* Inputs "glassy": bg semi-transparente + borde blanco tenue + texto
	   blanco. Placeholder gris claro con alpha para no competir con el
	   texto real. Focus resalta el borde a blanco pleno. */
	.om-login-shell .om-login-card .form-control {
		background-color: rgba(255,255,255,0.10) !important;
		border: 1px solid rgba(255,255,255,0.25) !important;
		color: #ffffff !important;
		box-shadow: none !important;
	}
	.om-login-shell .om-login-card .form-control:focus {
		background-color: rgba(255,255,255,0.16) !important;
		border-color: rgba(255,255,255,0.6) !important;
		outline: none !important;
	}
	.om-login-shell .om-login-card .form-control::placeholder {
		color: rgba(255,255,255,0.55) !important;
	}
	/* Input-group icon prefix box a juego con el input. */
	.om-login-shell .om-login-card .input-group-text {
		background-color: rgba(255,255,255,0.06) !important;
		border: 1px solid rgba(255,255,255,0.25) !important;
		color: rgba(255,255,255,0.78) !important;
	}
	/* Submit button contrastante: fondo blanco + texto navy. Es la unica
	   pieza "solida" en la pantalla, actua como CTA claro. */
	.om-login-shell .om-login-card .btn-primary {
		background-color: #ffffff !important;
		background-image: none !important;
		color: #1e3c72 !important;
		border: 0 !important;
		font-weight: 700 !important;
		box-shadow: 0 4px 14px rgba(0,0,0,0.18) !important;
	}
	.om-login-shell .om-login-card .btn-primary:hover,
	.om-login-shell .om-login-card .btn-primary:focus {
		background-color: #f0f4fa !important;
		color: #1e3c72 !important;
	}
	/* Logo blanco sobre el azul: si el asset original es color, invertimos
	   filter para forzarlo a blanco. Sin esto, el logo azul-sobre-azul
	   queda invisible. Excepcion: si el <img> tiene la clase
	   om-login-logo--white (Login.java pinta la variante blanca del SVG
	   ya con fill=#fff), no aplicamos filter -- Samsung Internet no lo
	   renderiza consistente. */
	.om-login-shell .om-login-logo:not(.om-login-logo--white) {
		filter: brightness(0) invert(1) !important;
		opacity: 0.95 !important;
	}
	.om-login-shell .om-login-logo.om-login-logo--white {
		filter: none !important;
		opacity: 1 !important;
	}
}

@media (max-width: 768px) {
	/* Container: flex column, grows CONSTRAINED (flex-basis 0 -- no
	   basar en content size sino en share proporcional). Asi no
	   desborda el viewport y no empuja el footer bajo el fold. */
	.om-login-shell .om-login-container {
		margin: 0 !important;
		padding: 0 !important;
		width: 100% !important;
		max-width: 100% !important;
		display: flex !important;
		flex-direction: column !important;
		flex: 1 1 0 !important;
		min-height: 0 !important;
	}
	.om-login-shell .om-login-row {
		margin: 0 !important;
		width: 100% !important;
		display: flex !important;
		flex-direction: column !important;
		flex: 1 1 0 !important;
		min-height: 0 !important;
	}
	.om-login-shell .om-login-col {
		padding: 0 !important;
		max-width: 100% !important;
		flex: 1 1 0 !important;
		min-height: 0 !important;
		display: flex !important;
		flex-direction: column !important;
	}
	.om-login-shell .om-login-card {
		max-width: none !important;
		width: 100% !important;
		margin: 0 !important;
		border-radius: 0 !important;
		box-shadow: none !important;
		/* Bg transparente -- se ve el gradient azul del shell debajo.
		   El white-card previo fue reemplazado por la nueva regla en el
		   bloque de arriba (mobile blue theme). */
		background-color: transparent !important;
		display: flex !important;
		flex-direction: column !important;
		justify-content: center !important;
		align-items: stretch !important;
		flex: 1 1 0 !important;
		min-height: 0 !important;
		overflow-y: auto !important;
	}
	.om-login-shell .om-login-cardbody {
		padding: 24px 20px !important;
		width: 100% !important;
		margin: 0 auto !important;
	}

	/* FOOTER mobile: stack vertical + badges visibles + compacto en
	   altura (~55px) para no comerse mucho del card. Reglas aca (en
	   CSS externo) para no depender de GWT compile del ui:style. */
	.om-login-shell footer#footer-main {
		padding: 8px 12px !important;
		flex-shrink: 0 !important;
	}
	.om-login-shell footer#footer-main > div {
		flex-direction: column !important;
		gap: 4px !important;
		align-items: center !important;
		text-align: center !important;
	}
	.om-login-shell footer#footer-main > div > div {
		flex: 0 0 auto !important;
		justify-content: center !important;
	}
	.om-login-shell footer#footer-main a {
		font-size: 11px !important;
		padding: 0 6px !important;
	}
	/* Cert badges (WhatsApp Inc / Meta / ISO 27001): fila comprimida,
	   siempre visible. Font mas chica para que las 3 entren en 435px. */
	.om-login-shell footer#footer-main span {
		font-size: 9.5px !important;
		padding: 3px 7px !important;
		white-space: nowrap !important;
	}
	.om-login-shell .om-login-logo {
		height: 56px !important;
		width: auto !important;
		max-width: 65% !important;
		display: inline-block !important;
		vertical-align: middle !important;
		margin: 0 auto 20px auto !important;
	}
	.om-login-shell .om-login-title {
		font-size: 22px !important;
		margin: 8px 0 4px !important;
		text-align: center !important;
	}
	.om-login-shell .om-login-sub {
		font-size: 14px !important;
		margin-bottom: 24px !important;
		text-align: center !important;
	}
	/* Input-group: ancho comodo (no capped a 240px como antes). */
	.om-login-shell .om-login-card .input-group {
		max-width: 420px !important;
		width: 100% !important;
		margin: 0 auto 12px auto !important;
	}
	/* Input thumb-friendly (50px altura, cumple >=44px iOS/Android). */
	.om-login-shell .om-login-card .form-control {
		height: 50px !important;
		font-size: 15px !important;
		padding: 12px 14px !important;
		border-radius: 8px !important;
	}
	.om-login-shell .om-login-card .input-group-text {
		padding: 8px 12px !important;
	}
	/* Boton submit full width + 52px altura. */
	.om-login-shell .om-login-card .btn-primary {
		width: 100% !important;
		max-width: 420px !important;
		display: block !important;
		margin: 20px auto 8px auto !important;
		padding: 14px !important;
		font-size: 16px !important;
		min-height: 52px !important;
		border-radius: 10px !important;
	}
}

/* Extra compacto para smartphones muy chicos. */
@media (max-width: 400px) {
	.om-login-shell .om-login-cardbody {
		padding: 24px 18px !important;
	}
	.om-login-shell .om-login-logo {
		height: 48px !important;
		margin-bottom: 16px !important;
	}
	.om-login-shell .om-login-title {
		font-size: 20px !important;
	}
}

/* Landscape en mobile: el 100vh queda muy apretado vertical -- volver
   al card flotante clasico centrado. */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
	.om-login-shell .om-login-card {
		min-height: auto !important;
		border-radius: 12px !important;
		margin: 12px !important;
		max-width: 500px !important;
	}
	.om-login-shell .om-login-container {
		min-height: 100vh;
		justify-content: center !important;
	}
	.om-login-shell .om-login-logo {
		height: 40px !important;
		margin-bottom: 8px !important;
	}
	.om-login-shell .om-login-title {
		font-size: 18px !important;
	}
	.om-login-shell .om-login-sub {
		margin-bottom: 12px !important;
	}
}

/* ============================================================
   Slack theme (html.om-chat-slack)
   Aubergine sidebar + dark navy topbar, echoing the Slack
   workspace look. Applies only in LIGHT mode -- dark falls
   back to CLASSIC via OmChatTheme.reconcileWithDark.
   Palette:
     #3F0E40 sidebar aubergine
     #350D36 topbar / hover
     #1164A3 active accent
     #E01E5A badge red
     #D1D2D3 muted text
   ============================================================ */

/* Topbar (uses .bg-om across the app) */
html.om-chat-slack .bg-om,
html.om-chat-slack .navbar-top.bg-om {
	background: #350D36 !important;
	background-image: none !important;
	border-color: rgba(255,255,255,0.06) !important;
	box-shadow: 0 1px 0 rgba(0,0,0,0.35) !important;
}
html.om-chat-slack .bg-om .navbar-brand,
html.om-chat-slack .bg-om .nav-link,
html.om-chat-slack .bg-om a {
	color: #ffffff !important;
}

/* Full left sidebar container -- includes the sidenav-header (logo area)
 * AND the shortcuts widget below. Without this, the .sidebar rule in
 * global.css keeps its blue gradient underneath and the logo strip shows
 * through since .sidenav-header has no background of its own. */
html.om-chat-slack .sidebar {
	background: #3F0E40 !important;
	background-image: none !important;
}
html.om-chat-slack .sidenav-header {
	background: #3F0E40 !important;
	border-bottom-color: rgba(255,255,255,0.08) !important;
}
/* Sidebar toggler bars: keep them visible against aubergine. */
html.om-chat-slack .sidenav-toggler-line {
	background-color: rgba(255,255,255,0.85) !important;
}

/* Shortcuts sidebar */
html.om-chat-slack .om-sidebar-shortcuts {
	background: #3F0E40 !important;
	color: #D1D2D3 !important;
}
html.om-chat-slack .om-sidebar-shortcuts a,
html.om-chat-slack .om-sidebar-shortcuts .gwt-Label,
html.om-chat-slack .om-sidebar-shortcuts .gwt-HTML {
	color: #D1D2D3 !important;
}
html.om-chat-slack .om-sidebar-shortcuts .main_menu_item {
	color: #D1D2D3 !important;
	transition: background 120ms ease;
}
html.om-chat-slack .om-sidebar-shortcuts .main_menu_item:hover {
	background: #350D36 !important;
	color: #ffffff !important;
}

/* Active / selected row in the sidebar */
html.om-chat-slack .om-sidebar-shortcuts .active,
html.om-chat-slack .om-sidebar-shortcuts [class*="-active"] {
	background: #1164A3 !important;
	color: #ffffff !important;
}

/* Sidebar section headers subtly lighter */
html.om-chat-slack .om-sidebar-shortcuts .section-header,
html.om-chat-slack .om-sidebar-shortcuts h5 {
	color: rgba(255,255,255,0.7) !important;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* Any "Solid brand" gradient card the topbar depends on */
html.om-chat-slack .card-header.bg-om {
	background: #350D36 !important;
	background-image: none !important;
}

/* NOTE: the --om-bg-canvas variable stays defined above so future
   opt-in usage is possible, but the aggressive selectors (.om-canvas,
   .om-canvas .gwt-HTMLPanel, [class*="ChannelSelector"] .card) were
   removed on 2026-07-31 because they matched too broadly and altered
   backgrounds across the whole app. Any panel that WANTS the canvas
   look now has to set the bg locally in its own .ui.xml. */

/* =============================================================
   TeamChat V2 dark-mode overrides
   All rules scoped to explicit tcv2-* marker classes so nothing
   here can affect other parts of the app. Every attribute
   selector uses [style*="..."] to catch the inline hardcoded
   colors that the Java widgets set at construction time. Rule
   of thumb: dark bg = #1e293b (surface) / #0f172a (deep) /
   #334155 (elevated); text = #f1f5f9 (primary) / #cbd5e1 (dim);
   accent brand green stays #4ade80 / #22c55e.
   ============================================================= */

/* -- Typing bar (floating pill above composer) --------------- */
html.om-dark .tcv2-typing-bar {
    background: #334155 !important;
    border-color: #475569 !important;
    color: #cbd5e1 !important;
}

/* -- 3-dot menu ---------------------------------------------- */
.tcv2-msg-menu-item:hover {
    background-color: #f3f4f6;
}
html.om-dark .tcv2-msg-menu {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}
html.om-dark .tcv2-msg-menu .tcv2-msg-menu-item { color: #f1f5f9 !important; }
html.om-dark .tcv2-msg-menu .tcv2-msg-menu-item:hover { background-color: #334155 !important; }

/* -- Help modal (openTcHelp + buildTcHelpHtml) --------------- */
html.om-dark .tcv2-help-modal {
    background: #1e293b !important;
    color: #e2e8f0 !important;
    box-shadow: 0 20px 60px rgba(0,0,0,.7) !important;
}
html.om-dark .tcv2-help-hdr { color: #ffffff !important; }
html.om-dark .tcv2-help-tabs {
    background: #0b1220 !important;
    border-bottom: 1px solid #334155 !important;
}
html.om-dark .tcv2-help-tabs button {
    color: #94a3b8 !important;
    background: transparent !important;
}
html.om-dark .tcv2-help-tabs button[style*="background:#fff"],
html.om-dark .tcv2-help-tabs button[style*="background: #fff"] {
    background: #1e293b !important;
    color: #4ade80 !important;
    border-bottom-color: #4ade80 !important;
}
html.om-dark .tcv2-help-body {
    background: #0f172a !important;
    color: #e2e8f0 !important;
}
html.om-dark .tcv2-help-body div[style*="background:#fff"],
html.om-dark .tcv2-help-body div[style*="background: #fff"],
html.om-dark .tcv2-help-body div[style*="background:#f0fdf4"],
html.om-dark .tcv2-help-body div[style*="background: #f0fdf4"],
html.om-dark .tcv2-help-body div[style*="background:#f7fdf9"],
html.om-dark .tcv2-help-body div[style*="background: #f7fdf9"] {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}
html.om-dark .tcv2-help-body b { color: #f1f5f9 !important; }
html.om-dark .tcv2-help-body .tcv2-help-chev { color: #94a3b8 !important; }
html.om-dark .tcv2-help-body p,
html.om-dark .tcv2-help-body li,
html.om-dark .tcv2-help-body td,
html.om-dark .tcv2-help-body span,
html.om-dark .tcv2-help-body div[style*="color:#1e3a2b"],
html.om-dark .tcv2-help-body div[style*="color: #1e3a2b"] {
    color: #e2e8f0 !important;
}
html.om-dark .tcv2-help-body a { color: #93c5fd !important; }
html.om-dark .tcv2-help-body code,
html.om-dark .tcv2-help-body pre {
    background: #0b1220 !important;
    color: #fde68a !important;
    border-color: #334155 !important;
}

/* -- Members dialog ------------------------------------------ */
html.om-dark .tcv2-members-dialog {
    background: #1e293b !important;
    color: #e2e8f0 !important;
}
html.om-dark .tcv2-members-dialog input {
    background: #0f172a !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}
html.om-dark .tcv2-members-dialog div[style*="background:#fff"],
html.om-dark .tcv2-members-dialog div[style*="background: #fff"] {
    background: #0f172a !important;
    border-color: #334155 !important;
}
html.om-dark .tcv2-members-dialog div { color: #e2e8f0 !important; }
html.om-dark .tcv2-members-dialog button {
    background: #334155 !important;
    color: #f1f5f9 !important;
    border-color: #475569 !important;
}
html.om-dark .tcv2-members-dialog div[style*="text-transform:uppercase"],
html.om-dark .tcv2-members-dialog div[style*="text-transform: uppercase"] {
    color: #94a3b8 !important;
}

/* -- Options screens (Mentions, Saved, Scheduled, Theme,
      Notifications, Huddle recordings, Apps, OMNiaCoder stats,
      OMNiaCoder history, Mentions/DMs reports, Profile...)
      All are rendered into `optionsBody` which carries the
      `tcv2-opt-body` marker (see buildLayout line 1522).
      Same treatment: force dark bg + light text on any container
      with inline light bg, and swap muted dark text to light. -- */
html.om-dark .tcv2-opt-header {
    background: #0b1220 !important;
    border-bottom-color: #334155 !important;
    color: #f1f5f9 !important;
}
html.om-dark .tcv2-opt-header div,
html.om-dark .tcv2-opt-header span,
html.om-dark .tcv2-opt-header b {
    color: #f1f5f9 !important;
}
html.om-dark .tcv2-opt-body {
    background: #0f172a !important;
    color: #e2e8f0 !important;
}
/* Any container inside the option body with an inline light bg. */
html.om-dark .tcv2-opt-body [style*="background:#fff"],
html.om-dark .tcv2-opt-body [style*="background: #fff"],
html.om-dark .tcv2-opt-body [style*="background:#ffffff"],
html.om-dark .tcv2-opt-body [style*="background: #ffffff"],
html.om-dark .tcv2-opt-body [style*="background:#f9fafb"],
html.om-dark .tcv2-opt-body [style*="background: #f9fafb"],
html.om-dark .tcv2-opt-body [style*="background:#f3f4f6"],
html.om-dark .tcv2-opt-body [style*="background: #f3f4f6"],
html.om-dark .tcv2-opt-body [style*="background:#f8fafc"],
html.om-dark .tcv2-opt-body [style*="background: #f8fafc"] {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}
html.om-dark .tcv2-opt-body [style*="background:#fef3c7"],
html.om-dark .tcv2-opt-body [style*="background: #fef3c7"] {
    background: #78350f !important;
    color: #fef3c7 !important;
}
html.om-dark .tcv2-opt-body [style*="background:#faf5ff"],
html.om-dark .tcv2-opt-body [style*="background: #faf5ff"] {
    background: #4a1d5c !important;
    border-color: #7e22ce !important;
    color: #f3e8ff !important;
}
html.om-dark .tcv2-opt-body [style*="background:#dcfce7"],
html.om-dark .tcv2-opt-body [style*="background: #dcfce7"] {
    background: #14532d !important;
    color: #bbf7d0 !important;
}
html.om-dark .tcv2-opt-body [style*="background:#fee2e2"],
html.om-dark .tcv2-opt-body [style*="background: #fee2e2"] {
    background: #7f1d1d !important;
    color: #fecaca !important;
}
html.om-dark .tcv2-opt-body [style*="background:#dbeafe"],
html.om-dark .tcv2-opt-body [style*="background: #dbeafe"] {
    background: #1e3a8a !important;
    color: #dbeafe !important;
}
/* Text colors inside option bodies. */
html.om-dark .tcv2-opt-body [style*="color:#111827"],
html.om-dark .tcv2-opt-body [style*="color: #111827"],
html.om-dark .tcv2-opt-body [style*="color:#0f172a"],
html.om-dark .tcv2-opt-body [style*="color: #0f172a"],
html.om-dark .tcv2-opt-body [style*="color:#1e293b"],
html.om-dark .tcv2-opt-body [style*="color: #1e293b"],
html.om-dark .tcv2-opt-body [style*="color:#334155"],
html.om-dark .tcv2-opt-body [style*="color: #334155"],
html.om-dark .tcv2-opt-body [style*="color:#374151"],
html.om-dark .tcv2-opt-body [style*="color: #374151"] {
    color: #f1f5f9 !important;
}
html.om-dark .tcv2-opt-body [style*="color:#6b7280"],
html.om-dark .tcv2-opt-body [style*="color: #6b7280"],
html.om-dark .tcv2-opt-body [style*="color:#64748b"],
html.om-dark .tcv2-opt-body [style*="color: #64748b"],
html.om-dark .tcv2-opt-body [style*="color:#94a3b8"],
html.om-dark .tcv2-opt-body [style*="color: #94a3b8"] {
    color: #94a3b8 !important;
}
/* Inputs / textareas / selects always dark. */
html.om-dark .tcv2-opt-body input,
html.om-dark .tcv2-opt-body textarea,
html.om-dark .tcv2-opt-body select {
    background: #0b1220 !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}
/* Buttons: neutral ones (no explicit brand bg) go dark, colored
   ones keep their inline gradient / hue. */
html.om-dark .tcv2-opt-body button[style*="background:#fff"],
html.om-dark .tcv2-opt-body button[style*="background: #fff"],
html.om-dark .tcv2-opt-body button[style*="background:#f3f4f6"],
html.om-dark .tcv2-opt-body button[style*="background: #f3f4f6"] {
    background: #334155 !important;
    color: #f1f5f9 !important;
    border-color: #475569 !important;
}
/* Tables inside option bodies (Mentions/DMs reports, stats etc). */
html.om-dark .tcv2-opt-body table,
html.om-dark .tcv2-opt-body th,
html.om-dark .tcv2-opt-body td {
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}
html.om-dark .tcv2-opt-body thead,
html.om-dark .tcv2-opt-body th {
    background: #1e293b !important;
}
html.om-dark .tcv2-opt-body tr:nth-child(even) {
    background: rgba(255,255,255,0.02) !important;
}

/* SimpleGrid toolbar buttons (Buscar / Limpiar / Recargar / List actions).
   Filled gradient pill with icon, hover lift, active press. Applied via
   `om-sg-toolbar-btn` class from SimpleGrid.java so all three buttons share
   the exact same look and pseudo-states. */
.om-sg-toolbar-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 30px;
    padding: 0 14px;
    margin: 0 3px;
    border: 0 !important;
    border-radius: 20px !important;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%) !important;
    color: #ffffff !important;
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-size: 12px;
    font-weight: 600 !important;
    letter-spacing: 0.2px;
    text-shadow: none !important;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(30, 60, 114, .28);
    transition: transform .12s ease, box-shadow .12s ease, filter .12s ease, background .12s ease;
}
.om-sg-toolbar-btn i,
.om-sg-toolbar-btn .fa,
.om-sg-toolbar-btn .fas,
.om-sg-toolbar-btn .far,
.om-sg-toolbar-btn .fab {
    margin-right: 0 !important;
    font-size: 11px;
    opacity: 0.95;
}
.om-sg-toolbar-btn:hover {
    background: linear-gradient(135deg, #2a5298 0%, #3a6bb8 100%) !important;
    box-shadow: 0 2px 6px rgba(30, 60, 114, .28);
    filter: brightness(1.08);
    color: #ffffff !important;
}
.om-sg-toolbar-btn:active {
    box-shadow: 0 1px 3px rgba(30, 60, 114, .35);
    filter: brightness(.96);
}
.om-sg-toolbar-btn:focus,
.om-sg-toolbar-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 60, 114, .25), 0 2px 6px rgba(30, 60, 114, .28);
}
.om-sg-toolbar-btn:disabled,
.om-sg-toolbar-btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    filter: grayscale(.2);
}
/* Dark mode: soften the gradient so it sits against the dark surface. */
html.om-dark .om-sg-toolbar-btn {
    background: linear-gradient(135deg, #2a5298 0%, #3a6bb8 100%) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .45);
}
html.om-dark .om-sg-toolbar-btn:hover {
    background: linear-gradient(135deg, #22467f 0%, #325a9c 100%) !important;
}
