/* ════════════════════════════════════════════════════════════════════════
   GEIMSER ITSM — DESIGN SYSTEM v4 (dual theme)
   ──────────────────────────────────────────────────────────────────────────
   Reescritura completa del overlay sobre Zammad 7.

   ARQUITECTURA
   1. Tipografía única: Inter (variable, self-hosted en /assets/geimser-fonts).
   2. Tokens semánticos --gx-*: TODO color del sistema sale de aquí.
      - html[data-theme="light"] (y por defecto) → tema claro
      - html[data-theme="dark"]                  → tema oscuro
      El toggle nativo de Zammad (perfil → Apariencia) cambia data-theme y
      el tema completo conmuta sin recargar.
   3. Las variables core de Zammad (--background-*, --text-*) se mapean a
      los tokens, de modo que los componentes nativos siguen el tema.
   4. Secciones: TOKENS → BASE → FUNCIONAL GEIMSER (login, shortcuts, CMDB,
      remoto, popup) → NAV → COMPONENTES → PÁGINAS → ADAPTACIÓN OSCURA.
   5. Prohibido: hex hardcodeado fuera de las definiciones de tokens
      (excepto los bloques funcionales heredados, adaptados al final).
   ════════════════════════════════════════════════════════════════════════ */

/* ─── 0. TIPOGRAFÍA ÚNICA ────────────────────────────────────────────────── */
/* Forum utiliza Benton Sans. No se distribuye aquí por licencia; si el equipo
   la instala corporativamente se toma primero y, si no, se mantiene una
   alternativa métrica y legible. */

/* ─── 1. TOKENS ──────────────────────────────────────────────────────────── */
:root,
html[data-theme="light"],
html[data-theme="light"] body,
html[data-theme="light"] #app,
body,
#app {
  /* Superficies */
  --gx-bg: #f4f7f8;
  --gx-panel: #ffffff;
  --gx-panel-2: #f8fafb;
  --gx-panel-3: #e8f0f4;
  --gx-line: #d5e1e8;
  --gx-line-strong: #b9ccd8;
  /* Texto */
  --gx-text: #0f172a;
  --gx-text-2: #334155;
  --gx-text-3: #64748b;
  --gx-text-inverse: #ffffff;
  /* Marca */
  --gx-brand: #072146;
  --gx-brand-2: #004481;
  --gx-brand-strong: #061a36;
  --gx-brand-soft: #d5edfb;
  --gx-brand-soft-2: #b9e4fa;
  --gx-on-brand: #ffffff;
  --gx-accent: #5bbeff;
  --gx-accent-strong: #237aba;
  --gx-link: #004481;
  --gx-link-hover: #072146;
  /* Estados */
  --gx-danger: #b42318;
  --gx-danger-soft: #fde8e6;
  --gx-success: #1f7a4d;
  --gx-success-soft: #e6f7ee;
  --gx-warning: #b86e00;
  --gx-warning-soft: #fdf2df;
  /* Interacción */
  --gx-hover: #f1f5fa;
  --gx-row-hover: #f4f8fd;
  --gx-focus-ring: 0 0 0 3px rgba(0, 112, 210, 0.30);
  --gx-selection: rgba(0, 112, 210, 0.18);
  /* Inputs */
  --gx-input-bg: #ffffff;
  --gx-input-border: #cbd5e1;
  --gx-input-text: #0f172a;
  --gx-placeholder: #8593a8;
  /* Sombras */
  --gx-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05), 0 1px 4px rgba(15, 23, 42, 0.04);
  --gx-shadow-md: 0 2px 6px rgba(15, 23, 42, 0.06), 0 10px 28px rgba(15, 23, 42, 0.08);
  --gx-shadow-lg: 0 8px 24px rgba(15, 23, 42, 0.10), 0 24px 64px rgba(15, 23, 42, 0.14);
  /* Nav lateral (oscura también en tema claro: identidad del producto) */
  --gx-nav-bg: #072146;
  --gx-nav-bg-2: #061a36;
  --gx-nav-text: #d5edfb;
  --gx-nav-text-strong: #ffffff;
  --gx-nav-line: rgba(255, 255, 255, 0.08);
  --gx-nav-hover: rgba(255, 255, 255, 0.07);
  --gx-nav-active: rgba(91, 190, 255, 0.25);
  --gx-nav-input-bg: rgba(255, 255, 255, 0.08);
  /* Geometría */
  --gx-radius: 10px;
  --gx-radius-sm: 8px;
  --gx-radius-lg: 14px;
  /* Mapeo de variables core de Zammad → tokens */
  --background-primary: var(--gx-bg);
  --background-secondary: var(--gx-panel);
  --background-tertiary: var(--gx-panel-3);
  --background-modifier-accent: var(--gx-line);
  --background-modifier-accent-light: var(--gx-brand-soft);
  --border: var(--gx-line);
  --text-normal: var(--gx-text);
  --text-muted: var(--gx-text-3);
  --text-light: var(--gx-text-3);
  --text-link: var(--gx-link);
  --text-inverted: var(--gx-text-inverse);
  color-scheme: light;
}

html[data-theme="dark"],
html[data-theme="dark"] body,
html[data-theme="dark"] #app {
  /* Superficies */
  --gx-bg: #0e1320;
  --gx-panel: #161d2e;
  --gx-panel-2: #1b2336;
  --gx-panel-3: #212b41;
  --gx-line: rgba(148, 163, 184, 0.16);
  --gx-line-strong: rgba(148, 163, 184, 0.32);
  /* Texto */
  --gx-text: #eef3fb;
  --gx-text-2: #c2cddd;
  --gx-text-3: #8fa0b8;
  --gx-text-inverse: #0e1320;
  /* Marca */
  --gx-brand: #5bbeff;
  --gx-brand-2: #93d5ff;
  --gx-brand-strong: #c7ebff;
  --gx-brand-soft: rgba(91, 190, 255, 0.16);
  --gx-brand-soft-2: rgba(91, 190, 255, 0.28);
  --gx-on-brand: #06101c;
  --gx-accent: #5bbeff;
  --gx-accent-strong: #93d5ff;
  --gx-link: #93d5ff;
  --gx-link-hover: #c7ebff;
  /* Estados */
  --gx-danger: #ff8a7e;
  --gx-danger-soft: rgba(244, 63, 46, 0.16);
  --gx-success: #5ed39a;
  --gx-success-soft: rgba(34, 160, 94, 0.18);
  --gx-warning: #ffc35c;
  --gx-warning-soft: rgba(245, 166, 35, 0.14);
  /* Interacción */
  --gx-hover: rgba(124, 160, 210, 0.10);
  --gx-row-hover: rgba(124, 160, 210, 0.08);
  --gx-focus-ring: 0 0 0 3px rgba(124, 192, 255, 0.35);
  --gx-selection: rgba(124, 192, 255, 0.25);
  /* Inputs */
  --gx-input-bg: #121929;
  --gx-input-border: rgba(148, 163, 184, 0.34);
  --gx-input-text: #eef3fb;
  --gx-placeholder: #7f90a8;
  /* Sombras */
  --gx-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.30), 0 1px 4px rgba(0, 0, 0, 0.24);
  --gx-shadow-md: 0 2px 6px rgba(0, 0, 0, 0.32), 0 10px 28px rgba(0, 0, 0, 0.36);
  --gx-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.40), 0 24px 64px rgba(0, 0, 0, 0.46);
  /* Nav lateral */
  --gx-nav-bg: #0a0e16;
  --gx-nav-bg-2: #060910;
  --gx-nav-text: #b9c6d6;
  --gx-nav-text-strong: #ffffff;
  --gx-nav-line: rgba(255, 255, 255, 0.07);
  --gx-nav-hover: rgba(255, 255, 255, 0.06);
  --gx-nav-active: rgba(95, 173, 242, 0.24);
  --gx-nav-input-bg: rgba(255, 255, 255, 0.07);
  /* Mapeo core Zammad */
  --background-primary: var(--gx-bg);
  --background-secondary: var(--gx-panel);
  --background-tertiary: var(--gx-panel-3);
  --background-modifier-accent: var(--gx-line);
  --background-modifier-accent-light: var(--gx-brand-soft);
  --border: var(--gx-line);
  --text-normal: var(--gx-text);
  --text-muted: var(--gx-text-3);
  --text-light: var(--gx-text-3);
  --text-link: var(--gx-link);
  --text-inverted: var(--gx-text-inverse);
  color-scheme: dark;
}

/* ─── 2. BASE ────────────────────────────────────────────────────────────── */
html,
body,
#app,
#app input,
#app textarea,
#app select,
#app button {
  font-family: "BentonSans-Regular", "Benton Sans", "Helvetica Neue", Arial, Helvetica, sans-serif !important;
}

body {
  background: var(--gx-bg);
  color: var(--gx-text);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app ::selection {
  background: var(--gx-selection) !important;
  color: inherit !important;
}

#app a:focus-visible,
#app button:focus-visible,
#app [role="button"]:focus-visible,
#app input:focus-visible,
#app select:focus-visible,
#app textarea:focus-visible,
.hero-unit a:focus-visible,
.hero-unit button:focus-visible {
  box-shadow: var(--gx-focus-ring) !important;
  outline: none !important;
}

#app *::-webkit-scrollbar { width: 6px !important; height: 6px !important; }
#app *::-webkit-scrollbar-track { background: transparent !important; }
#app *::-webkit-scrollbar-thumb {
  background: var(--gx-line-strong) !important;
  border-radius: 99px !important;
}
#app .geimser-nav-surface *::-webkit-scrollbar-thumb {
  background: var(--gx-nav-line) !important;
}

/* Superficie principal de contenido */
#app,
#app .content,
#app .main,
#app .main-content,
#app .page,
#app .dashboard,
#app .overview,
#app .ticketZoom,
#app .settings,
#app .admin,
#app .reporting,
#app .knowledge-base {
  background: var(--gx-bg) !important;
  color: var(--gx-text) !important;
}

#app .content h1,
#app .content h2,
#app .content h3,
#app .content h4,
#app .content h5,
#app .content h6 {
  color: var(--gx-text) !important;
  letter-spacing: -0.01em;
}

#app .content label,
#app .content legend,
#app .content .formGroup-label {
  color: var(--gx-text-2) !important;
}

#app.geimser-route-map .content.active,
#app.geimser-route-map .content.horizontal,
#app.geimser-route-map .main-content {
  overflow: hidden !important;
  position: relative !important;
}

#geimser-map-container.geimser-map-container {
  background: #0f1522 !important;
  box-sizing: border-box !important;
  color: #ffffff !important;
  display: block;
  inset: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

#geimser-map-container .geimser-map-shellbar {
  align-items: center;
  background: #111827;
  border-bottom: 1px solid #334155;
  box-sizing: border-box;
  color: #ffffff;
  display: flex;
  gap: 16px;
  height: 48px;
  justify-content: space-between;
  padding: 8px 14px;
}

#geimser-map-container .geimser-map-shellbar h3 {
  color: #ffffff !important;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}

#geimser-map-container .geimser-map-shellbar a {
  border: 1px solid #93c5fd;
  border-radius: 6px;
  color: #bfdbfe !important;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  padding: 8px 12px;
  text-decoration: none !important;
  white-space: nowrap;
}

#geimser-map-container iframe {
  background: #0f1522;
  border: 0;
  box-sizing: border-box;
  display: block;
  height: calc(100% - 48px);
  width: 100%;
}

#app .content small,
#app .content .small,
#app .content .text-muted,
#app .content .hint,
#app .content .help-block,
#app .content .meta,
#app .content time {
  color: var(--gx-text-3) !important;
}

#app .content a:not(.btn):not([class*="button"]):not([class*="Button"]) {
  color: var(--gx-link) !important;
  text-decoration: none !important;
}

#app .content a:not(.btn):not([class*="button"]):not([class*="Button"]):hover {
  color: var(--gx-link-hover) !important;
}

/* ════════════════════════════════════════════════════════════════════════
   BLOQUES FUNCIONALES GEIMSER (heredados, probados en producción)
   Logo/branding, shortcuts del sidebar, login, toma remota, CMDB,
   popup de perfil, layout de actividad y workspace de ticket.
   Sus superficies se re-skinean en las secciones 4-7 (tokens).
   ════════════════════════════════════════════════════════════════════════ */
img[alt="Forum ITSM"],
img[alt="Forum"] {
  display: none !important;
}

.hero-unit .company-logo {
  display: none !important;
}

.hero-unit::before {
  content: "FORUM";
  display: block;
  width: fit-content;
  margin: 0 auto 26px;
  padding: 5px 10px 4px;
  border-radius: 2px;
  background: #072146;
  color: #ffffff;
  font: 800 20px/1 Arial, sans-serif;
  letter-spacing: 0.06em;
}

.splash > .icon-logo {
  width: 44px !important;
  height: 44px !important;
  background: url("/assets/images/geimser-logo-mark.png") center / contain no-repeat !important;
}

.splash > .icon-logo use {
  display: none !important;
}

.geimser-sidebar-brand {
  position: fixed;
  top: 4px;
  right: var(--forum-right-sidebar-offset, 66px);
  bottom: auto;
  left: auto;
  /* z-index mínimo: debe quedar debajo de absolutamente todo lo interactivo */
  z-index: 50 !important;
  display: block !important;
  align-items: center;
  width: 146px;
  height: 48px;
  max-width: 146px;
  background: #072146;
  border: 2px solid #5bbeff;
  border-radius: 2px;
  color: #ffffff;
  font: 800 18px/44px Arial, sans-serif;
  letter-spacing: 0.06em;
  text-align: center;
  pointer-events: none;
  transition: right 180ms ease;
}

/* Los indicadores del dashboard no son estados operativos: usan el azul
   corporativo Forum en vez del verde genérico de Zammad. */
#app .dashboard svg.supergood-color {
  fill: var(--gx-brand-2) !important;
  color: var(--gx-brand-2) !important;
}

.geimser-sidebar-brand img {
  display: none !important;
}

.geimser-sidebar-brand.is-compact img {
  display: none !important;
}

.geimser-sidebar-brand.is-compact {
  z-index: 20 !important;
  display: block !important;
  width: 146px;
  background: #072146;
  border-color: #5bbeff;
  color: #ffffff;
}

.geimser-sidebar-shortcuts {
  display: grid !important;
  gap: 2px;
  width: 100%;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.geimser-sidebar-shortcuts.is-fixed {
  position: fixed;
  top: 178px;
  left: var(--geimser-sidebar-left, 0);
  z-index: 40;
  width: var(--geimser-sidebar-width, 305px);
  max-width: 360px;
  margin: 0;
  pointer-events: auto;
}

.geimser-sidebar-shortcut {
  display: flex !important;
  align-items: center;
  gap: 22px;
  min-height: 58px;
  width: 100%;
  padding: 0 25px !important;
  color: #e9f1f8 !important;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.1;
  text-decoration: none !important;
  background: transparent !important;
  border: 0 !important;
  border-left: 3px solid transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  letter-spacing: 0;
}

.geimser-sidebar-shortcut:hover,
.geimser-sidebar-shortcut:focus,
.geimser-sidebar-shortcut.is-active {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border-left-color: var(--geimser-orange) !important;
  outline: none;
}

.geimser-sidebar-shortcuts.is-compact {
  align-items: center;
  display: grid !important;
  justify-items: center;
  gap: 6px;
  margin: 8px 0;
  width: 100%;
}

.geimser-sidebar-shortcuts.is-compact .geimser-sidebar-shortcut {
  align-items: center !important;
  border-left: 0 !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  gap: 0;
  height: 42px;
  justify-content: center !important;
  min-height: 42px;
  padding: 0 !important;
  width: 42px;
}

.geimser-sidebar-shortcuts.is-compact .geimser-sidebar-shortcut span:last-child {
  display: none !important;
}

.geimser-sidebar-shortcuts.is-compact .geimser-sidebar-shortcut-icon {
  flex-basis: 24px;
  height: 24px;
  width: 24px;
}

.geimser-sidebar-shortcut-icon {
  position: relative;
  display: inline-block;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  color: currentColor;
}

.geimser-sidebar-shortcut-icon-users::before,
.geimser-sidebar-shortcut-icon-users::after,
.geimser-sidebar-shortcut-icon-cmdb::before,
.geimser-sidebar-shortcut-icon-cmdb::after,
.geimser-sidebar-shortcut-icon-remote::before,
.geimser-sidebar-shortcut-icon-remote::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}

.geimser-sidebar-shortcut-icon-users::before {
  top: 3px;
  left: 8px;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow: -8px 4px 0 -3px currentColor, 8px 4px 0 -3px currentColor;
}

.geimser-sidebar-shortcut-icon-users::after {
  left: 3px;
  bottom: 3px;
  width: 22px;
  height: 11px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 14px 14px 3px 3px;
}

.geimser-sidebar-shortcut-icon-cmdb::before {
  inset: 4px;
  border: 2px solid currentColor;
  border-radius: 5px;
  box-shadow: 0 7px 0 -5px currentColor, 0 -7px 0 -5px currentColor;
}

.geimser-sidebar-shortcut-icon-cmdb::after {
  top: 9px;
  left: 9px;
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.geimser-sidebar-shortcut-icon-remote::before {
  top: 5px;
  left: 3px;
  width: 22px;
  height: 15px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.geimser-sidebar-shortcut-icon-remote::after {
  left: 9px;
  bottom: 3px;
  width: 10px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  box-shadow: 0 -4px 0 -1px currentColor;
}

.hero-unit {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--geimser-line);
  border-radius: 8px;
  box-shadow: 0 16px 44px rgba(0, 31, 61, 0.1);
  color: var(--geimser-text);
  color-scheme: light;
  backdrop-filter: blur(24px);
  max-width: 430px;
  width: min(430px, calc(100vw - 40px));
  margin: 20px auto 0;
  padding: 28px 28px 24px;
}

.hero-unit .company-logo {
  display: block;
  margin: 0 auto 26px;
}

.hero-unit label,
.hero-unit .formGroup-label,
.formGroup-label {
  color: var(--geimser-muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

.hero-unit input.form-control,
.hero-unit textarea.form-control,
.hero-unit .form-control {
  appearance: none;
  -webkit-appearance: none;
  color-scheme: light;
  min-height: 46px;
  background: #fff !important;
  background-color: #fff !important;
  border: 1px solid rgba(0, 31, 61, 0.14) !important;
  border-radius: 8px !important;
  color: var(--geimser-text) !important;
  font-size: 16px;
  box-shadow: inset 0 1px 2px rgba(0, 31, 61, 0.04) !important;
}

.hero-unit input.form-control:focus,
.hero-unit textarea.form-control:focus,
.hero-unit .form-control:focus {
  background: #fff !important;
  background-color: #fff !important;
  border-color: #007aff !important;
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.16) !important;
}

.geimser-password-field,
.hero-unit .geimser-password-field,
.login .geimser-password-field,
.geimser-force-password-form .geimser-password-field {
  position: relative;
}

.geimser-force-password-form .geimser-password-field {
  display: block;
}

.geimser-force-password-form label .geimser-password-field {
  width: 100%;
}

.geimser-password-field input,
.hero-unit .geimser-password-field input,
.login .geimser-password-field input,
.geimser-force-password-form .geimser-password-field input {
  width: 100%;
  padding-right: 48px !important;
}

.geimser-password-toggle,
.hero-unit .geimser-password-toggle,
.login .geimser-password-toggle,
.geimser-force-password-form .geimser-password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-height: 36px;
  margin: 0;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  background: transparent !important;
  color: #526070 !important;
  box-shadow: none !important;
  cursor: pointer;
}

.geimser-password-toggle:hover,
.geimser-password-toggle:focus-visible,
.hero-unit .geimser-password-toggle:hover,
.login .geimser-password-toggle:hover,
.hero-unit .geimser-password-toggle:focus-visible,
.login .geimser-password-toggle:focus-visible,
.geimser-force-password-form .geimser-password-toggle:hover,
.geimser-force-password-form .geimser-password-toggle:focus-visible {
  background: rgba(0, 75, 141, 0.09) !important;
  color: #004b8d !important;
  outline: none;
}

.geimser-password-toggle svg,
.hero-unit .geimser-password-toggle svg,
.login .geimser-password-toggle svg,
.geimser-force-password-form .geimser-password-toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.geimser-temp-password-banner {
  display: grid;
  gap: 6px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid rgba(68, 154, 255, 0.45);
  border-radius: 8px;
  background: #eaf5ff !important;
  color: #102033 !important;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.geimser-temp-password-banner strong {
  color: #0b3a68 !important;
  font-weight: 800;
}

.geimser-temp-password-banner span,
.geimser-temp-password-banner code {
  color: #102033 !important;
}

.geimser-temp-password-banner code {
  padding: 2px 6px;
  border-radius: 6px;
  background: #ffffff !important;
  border: 1px solid rgba(0, 75, 141, 0.18);
  font-weight: 800;
}

.geimser-temp-password-note {
  margin-top: 7px;
  padding: 8px 10px;
  border-radius: 7px;
  background: #102033 !important;
  color: #eef7ff !important;
  font-size: 12px;
  line-height: 1.35;
}

.geimser-temp-password-note strong {
  color: #8bd8ff !important;
  font-weight: 800;
}

#app .geimser-temp-password-input {
  background: #ffffff !important;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  border-color: #2f8de4 !important;
  box-shadow: 0 0 0 3px rgba(47, 141, 228, 0.16) !important;
}

.geimser-force-password-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(3, 7, 18, 0.78);
  backdrop-filter: blur(8px);
}

.geimser-force-password-card {
  width: min(520px, 100%);
  border: 1px solid rgba(125, 211, 252, 0.38);
  border-radius: 10px;
  background: #0f172a !important;
  color: #f8fafc !important;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  overflow: hidden;
}

.geimser-force-password-header {
  padding: 24px 26px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.geimser-force-password-header span {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #7dd3fc !important;
  color: #082f49 !important;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.geimser-force-password-header h2 {
  margin: 0 0 8px;
  color: #ffffff !important;
  font-size: 25px;
  line-height: 1.1;
  font-weight: 900;
}

.geimser-force-password-header p {
  margin: 0;
  color: #cbd5e1 !important;
  font-size: 14px;
  line-height: 1.5;
}

.geimser-force-password-form {
  display: grid;
  gap: 14px;
  padding: 22px 26px 26px;
}

.geimser-force-password-form label {
  display: grid;
  gap: 7px;
  color: #dbeafe !important;
  font-size: 13px;
  font-weight: 800;
}

.geimser-force-password-form input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(125, 211, 252, 0.55) !important;
  border-radius: 8px;
  background: #ffffff !important;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  font-size: 15px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08) !important;
}

.geimser-force-password-form input:focus {
  outline: none;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.25) !important;
}

.geimser-force-password-error {
  padding: 10px 12px;
  border-radius: 8px;
  background: #fee2e2 !important;
  color: #7f1d1d !important;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
}

.geimser-force-password-form button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: #16a34a !important;
  color: #ffffff !important;
  font-weight: 900;
  cursor: pointer;
}

.geimser-force-password-form button:hover,
.geimser-force-password-form button:focus-visible {
  background: #15803d !important;
  outline: none;
}

.geimser-force-password-form button:disabled {
  opacity: 0.68;
  cursor: wait;
}

.geimser-force-password-modal.is-success .geimser-force-password-card {
  border-color: rgba(74, 222, 128, 0.65);
}

.hero-unit button[type="submit"] {
  min-height: 46px;
  margin-top: 18px;
  width: 100%;
}

.hero-unit a {
  color: var(--geimser-blue);
  font-weight: 500;
}

.hero-unit a:hover {
  color: var(--geimser-blue-deep);
}

.splash,
html:has(.hero-unit),
body:has(.hero-unit) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(245, 245, 247, 0.96)),
    var(--geimser-surface) !important;
  color-scheme: light;
}

body:has(.hero-unit) {
  color: var(--geimser-text) !important;
}

.login.fullscreen {
  background: var(--geimser-surface) !important;
}

body:has(.hero-unit) .message,
body:has(.hero-unit) [class*="message"],
body:has(.hero-unit) [class*="alert"] {
  max-width: 430px;
  width: min(430px, calc(100vw - 40px));
  margin: 24px auto 14px;
  padding: 15px 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(245, 166, 35, 0.38);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0, 31, 61, 0.08);
  color: var(--geimser-text);
  line-height: 1.4;
}

body:has(.hero-unit) .message strong,
body:has(.hero-unit) [class*="message"] strong,
body:has(.hero-unit) [class*="alert"] strong {
  color: var(--geimser-blue);
}

body:has(.hero-unit) p,
body:has(.hero-unit) .poweredBy,
body:has(.hero-unit) .separator {
  color: var(--geimser-muted);
}

body:has(.hero-unit) > p,
body:has(.hero-unit) > hr,
body:has(.hero-unit) > a[href="https://zammad.org"],
body:has(.hero-unit) .poweredBy,
body:has(.hero-unit) .separator,
body:has(.hero-unit) a[href="https://zammad.org"] {
  display: none !important;
}

body:has(.hero-unit) .hero-unit + p,
body:has(.hero-unit) .hero-unit ~ p,
body:has(.hero-unit) .hero-unit ~ hr {
  display: none !important;
}

@media (max-width: 720px) {
  .hero-unit {
    width: calc(100vw - 32px);
    padding: 26px 22px 22px;
  }

  body:has(.hero-unit) .message,
  body:has(.hero-unit) [class*="message"],
  body:has(.hero-unit) [class*="alert"] {
    width: calc(100vw - 32px);
  }
}

.fullscreen-body {
  box-sizing: border-box;
  min-height: 100vh;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.fullscreen-body > p,
.fullscreen-body > .js-footer {
  display: none !important;
}

.fullscreen-body > .hero-unit {
  width: min(430px, calc(100vw - 32px));
  max-width: 430px;
  margin: 0;
}

.fullscreen-body > .js-maintenanceLogin {
  padding: 14px 18px;
  box-shadow: 0 10px 28px rgba(0, 31, 61, 0.08);
}

.fullscreen-body > .hero-unit:not(.js-maintenanceLogin) {
  padding: 26px 26px 24px;
}

.fullscreen-body > .hero-unit:not(.js-maintenanceLogin) .company-logo {
  width: 132px;
  margin-bottom: 24px;
}


.geimser-ticket-remote-action {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 34px !important;
  margin: 8px 0 0 !important;
  padding: 0 13px !important;
  border: 1px solid rgba(255, 255, 255, 0.24) !important;
  border-radius: 8px !important;
  background: linear-gradient(160deg, #0067c0 0%, #0057a8 100%) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  line-height: 1 !important;
  text-shadow: none !important;
  box-shadow: none !important;
  cursor: pointer !important;
}

.geimser-ticket-remote-action:hover,
.geimser-ticket-remote-action:focus {
  background: linear-gradient(160deg, #0070d2 0%, #0067c0 100%) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.geimser-remote-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  background: rgba(12, 17, 29, 0.64);
}

.geimser-remote-modal.is-open {
  display: block;
}

.geimser-remote-panel {
  position: relative;
  width: 100vw;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
  font-size: 12px;
}

.geimser-remote-header {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 8px;
  background: #20232b;
  color: #f3f7fb;
}

.geimser-remote-actions {
  width: 100%;
  display: flex;
  gap: 6px;
  align-items: center;
}

.geimser-remote-actions a,
.geimser-remote-actions button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: transparent;
  color: #f3f7fb;
  font-size: 11px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}

.geimser-remote-actions .geimser-remote-open {
  margin-left: auto;
}

.geimser-remote-actions .geimser-remote-close {
  width: 30px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

.geimser-remote-actions a:hover,
.geimser-remote-actions button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.geimser-remote-actions .geimser-remote-register {
  background: #004b8d;
  border-color: #4bb3f0;
  color: #ffffff;
}

.geimser-remote-body {
  flex: 1;
  min-height: 0;
  display: block;
  background: #f5f7fb;
}

.geimser-remote-modal.is-session-active .geimser-remote-header {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  min-height: 0;
  padding: 0;
  background: transparent;
  pointer-events: none;
}

.geimser-remote-modal.is-session-active .geimser-remote-actions {
  width: auto;
  justify-content: flex-end;
  pointer-events: auto;
}

.geimser-remote-modal.is-session-active .geimser-remote-home,
.geimser-remote-modal.is-session-active .geimser-remote-register {
  display: none;
}

.geimser-remote-modal.is-session-active .geimser-remote-open,
.geimser-remote-modal.is-session-active .geimser-remote-close {
  background: rgba(16, 24, 39, 0.82);
  border-color: rgba(255, 255, 255, 0.28);
}

.geimser-remote-workflow {
  min-width: 0;
  padding: 16px;
  overflow: auto;
  border-right: 1px solid rgba(0, 31, 61, 0.12);
  background: #ffffff;
}

.geimser-remote-flow {
  width: 100%;
  min-height: 64px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: start;
  margin: 0 0 10px;
  padding: 10px;
  border: 1px solid rgba(0, 31, 61, 0.12);
  border-radius: 8px;
  background: #f8fafc;
  color: #1d1d1f;
  text-align: left;
  cursor: pointer;
}

.geimser-remote-flow:hover {
  background: #eef6ff;
  border-color: rgba(0, 75, 141, 0.25);
}

.geimser-remote-flow.is-active {
  background: #eaf4fc;
  border-color: #004b8d;
  box-shadow: inset 4px 0 0 #004b8d;
}

.geimser-remote-flow span {
  grid-row: 1 / span 2;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #004b8d;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
}

.geimser-remote-flow strong {
  color: #102033;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
}

.geimser-remote-flow small {
  display: block;
  margin-top: 4px;
  color: #536171;
  font-size: 11px;
  line-height: 1.35;
}

.geimser-remote-note,
.geimser-remote-install-help {
  margin: 16px 0 12px;
  padding: 12px;
  border: 1px solid rgba(31, 122, 77, 0.18);
  border-radius: 8px;
  background: #eef8f2;
  color: #183e2a;
  font-size: 11px;
  line-height: 1.45;
}

.geimser-remote-install-help {
  margin-top: 0;
  border-color: rgba(0, 75, 141, 0.16);
  background: #eef6ff;
  color: #17324a;
}

.geimser-remote-install-help strong,
.geimser-remote-install-help span {
  display: block;
}

.geimser-remote-install-help span {
  margin-top: 4px;
}

.geimser-remote-copy {
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(0, 75, 141, 0.22);
  border-radius: 8px;
  background: #004b8d;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.geimser-remote-copy:hover {
  background: #005daa;
}

.geimser-remote-stage {
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.geimser-remote-banner {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid #c7d3df;
  background: #fff8e6;
  color: #16324a;
  font-size: 12px;
  line-height: 1.4;
}

.geimser-remote-banner strong {
  flex: 0 0 auto;
  color: #102033;
  font-weight: 800;
}

.geimser-remote-banner span {
  color: #34495e;
}

.geimser-remote-frame-shell {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #ffffff;
}

.geimser-remote-modal.is-equipment-flow .geimser-remote-frame-shell {
  display: none;
}

.geimser-remote-modal.is-session-active .geimser-remote-assets,
.geimser-remote-modal.is-session-active .geimser-remote-install {
  display: none;
}

.geimser-remote-modal.is-session-active .geimser-remote-frame-shell {
  display: block;
  flex: 1 1 auto;
}

.geimser-remote-assets {
  flex: 1 1 auto;
  max-height: none;
  overflow: auto;
  padding: 12px;
  background: #f8fafc;
}

.geimser-remote-assets[hidden] {
  display: none;
}

.geimser-remote-install[hidden] {
  display: none;
}

.geimser-remote-install {
  flex: 0 0 auto;
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #d9e2ec;
  background: #f8fafc;
}

.geimser-remote-install-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(0, 75, 141, 0.18);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(16, 32, 51, 0.06);
}

.geimser-remote-install-card strong {
  display: block;
  color: #102033;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 850;
}

.geimser-remote-install-card span {
  display: block;
  max-width: 640px;
  margin-top: 4px;
  color: #536171;
  font-size: 12px;
  line-height: 1.45;
}

.geimser-remote-install-actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.geimser-remote-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}

.geimser-remote-install-actions a,
.geimser-remote-install-actions button,
.geimser-remote-empty-actions a,
.geimser-remote-empty-actions button,
.geimser-remote-empty button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(0, 75, 141, 0.22);
  border-radius: 8px;
  background: #004b8d;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.geimser-remote-install-actions button,
.geimser-remote-install-actions a:not(.is-primary),
.geimser-remote-empty-actions button,
.geimser-remote-empty-actions a + a {
  background: #ffffff;
  color: #004b8d;
}

.geimser-remote-install-actions a:hover,
.geimser-remote-empty-actions a:first-child:hover,
.geimser-remote-empty button:hover {
  background: #005daa;
}

.geimser-remote-install-actions button:hover,
.geimser-remote-install-actions a:not(.is-primary):hover,
.geimser-remote-empty-actions button:hover,
.geimser-remote-empty-actions a + a:hover {
  background: #eef6ff;
}

.geimser-remote-install-steps {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0 0 0 20px;
  color: #34495e;
  font-size: 12px;
  line-height: 1.45;
}

.geimser-remote-install-steps strong {
  color: #102033;
  font-weight: 800;
}

.geimser-remote-assets-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.geimser-remote-assets-head strong {
  color: #102033;
  font-size: 13px;
  font-weight: 800;
}

.geimser-remote-assets-head span {
  color: #536171;
  font-size: 11px;
  font-weight: 650;
}

.geimser-remote-asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px;
}

.geimser-remote-asset {
  display: grid;
  gap: 6px;
  padding: 9px;
  border: 1px solid #d8e2ec;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(16, 32, 51, 0.05);
}

.geimser-remote-asset.is-online {
  border-color: rgba(31, 122, 77, 0.35);
}

.geimser-remote-asset strong {
  display: block;
  color: #102033;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 800;
}

.geimser-remote-asset span {
  display: block;
  color: #536171;
  font-size: 11px;
  line-height: 1.35;
}

.geimser-remote-asset-meta {
  display: grid;
  gap: 2px;
}

.geimser-remote-asset-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.geimser-remote-asset-actions em {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef2f7;
  color: #536171;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.geimser-remote-asset.is-online .geimser-remote-asset-actions em {
  background: #e6f7ee;
  color: #1f7a4d;
}

.geimser-remote-asset-actions button {
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(0, 75, 141, 0.2);
  border-radius: 8px;
  background: #004b8d;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.geimser-remote-asset-actions button:hover {
  background: #005daa;
}

.geimser-cmdb-nav {
  width: calc(100% - 24px);
  min-height: 46px;
  display: grid;
  gap: 2px;
  margin: 10px 12px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #16324a;
  color: #ffffff;
  text-align: left;
  cursor: pointer;
}

.geimser-cmdb-nav:hover {
  background: #004b8d;
}

.geimser-cmdb-nav span {
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.1;
}

.geimser-cmdb-nav small {
  color: #b9c7d5;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.1;
}

.geimser-cmdb-shell {
  width: min(1280px, 100%);
  height: min(820px, calc(100vh - 48px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: #f5f7fb;
  box-shadow: 0 24px 80px rgba(0, 20, 40, 0.34);
}

.geimser-cmdb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  background: #102033;
  color: #ffffff;
}

.geimser-cmdb-kicker {
  color: #8fd3ff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.geimser-cmdb-header h1 {
  margin: 2px 0 4px;
  color: #ffffff;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 850;
}

.geimser-cmdb-header p {
  max-width: 680px;
  margin: 0;
  color: #c7d3df;
  font-size: 13px;
  line-height: 1.4;
}

.geimser-cmdb-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.geimser-cmdb-actions button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: transparent;
  color: #ffffff;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.geimser-cmdb-actions button:hover,
.geimser-cmdb-actions .geimser-cmdb-register {
  background: #004b8d;
  border-color: #4bb3f0;
}

.geimser-cmdb-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 22px 0;
}

.geimser-cmdb-stats article {
  min-height: 82px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 14px;
  border: 1px solid #d8e2ec;
  border-radius: 8px;
  background: #ffffff;
}

.geimser-cmdb-stats span {
  color: #536171;
  font-size: 12px;
  font-weight: 750;
}

.geimser-cmdb-stats strong {
  color: #102033;
  font-size: 30px;
  line-height: 1;
  font-weight: 850;
}

.geimser-cmdb-content {
  flex: 1;
  min-height: 0;
  padding: 16px 22px 22px;
  overflow: auto;
}

.geimser-cmdb-table {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d8e2ec;
  border-radius: 8px;
  background: #ffffff;
}

.geimser-cmdb-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.25fr) minmax(70px, 0.55fr) minmax(170px, 1.1fr) minmax(170px, 1.05fr) minmax(92px, 0.5fr) minmax(134px, 0.6fr);
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px 14px;
  border-top: 1px solid #edf1f5;
  color: #24364a;
  font-size: 12px;
}

.geimser-cmdb-row.is-selected {
  background: #eef6ff;
}

.geimser-cmdb-row:first-child {
  border-top: 0;
}

.geimser-cmdb-row-head {
  min-height: 42px;
  background: #eef2f7;
  color: #536171;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.geimser-cmdb-row strong {
  display: block;
  color: #102033;
  font-size: 13px;
  line-height: 1.25;
}

.geimser-cmdb-row small {
  display: block;
  margin-top: 2px;
  color: #6b7785;
  font-size: 11px;
  line-height: 1.25;
}

.geimser-cmdb-row em {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef2f7;
  color: #536171;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.geimser-cmdb-row em.is-online {
  background: #e6f7ee;
  color: #1f7a4d;
}

.geimser-cmdb-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.geimser-cmdb-row button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(0, 75, 141, 0.2);
  border-radius: 8px;
  background: #004b8d;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.geimser-cmdb-row button:hover {
  background: #005daa;
}

.geimser-cmdb-row-actions button:first-child {
  background: #ffffff;
  color: #004b8d;
}

.geimser-cmdb-row-actions button:first-child:hover {
  background: #eef6ff;
}

.geimser-cmdb-detail-slot {
  margin-top: 16px;
}

.geimser-cmdb-detail {
  border: 1px solid #c9d8e6;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.geimser-cmdb-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid #e7edf3;
  background: #f8fafc;
}

.geimser-cmdb-detail-head span {
  display: block;
  margin-bottom: 4px;
  color: #536171;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.geimser-cmdb-detail-head strong {
  color: #102033;
  font-size: 18px;
  line-height: 1.2;
}

.geimser-cmdb-detail-head em {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef2f7;
  color: #536171;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  text-transform: uppercase;
}

.geimser-cmdb-detail-head em.is-online {
  background: #e6f7ee;
  color: #1f7a4d;
}

.geimser-cmdb-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: #e7edf3;
}

.geimser-cmdb-detail-grid article {
  min-height: 74px;
  padding: 13px 14px;
  background: #ffffff;
}

.geimser-cmdb-detail-grid span {
  display: block;
  margin-bottom: 6px;
  color: #536171;
  font-size: 11px;
  font-weight: 800;
}

.geimser-cmdb-detail-grid strong {
  color: #102033;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.geimser-cmdb-detail-actions {
  display: flex;
  justify-content: flex-end;
  padding: 14px 16px;
  border-top: 1px solid #e7edf3;
}

.geimser-cmdb-detail-actions button {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(0, 75, 141, 0.2);
  border-radius: 8px;
  background: #004b8d;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.geimser-cmdb-detail-actions button:hover {
  background: #005daa;
}

.geimser-cmdb-empty {
  padding: 18px;
  border: 1px dashed #bed0df;
  border-radius: 8px;
  background: #ffffff;
  color: #34495e;
}

.geimser-cmdb-empty strong,
.geimser-cmdb-empty span {
  display: block;
}

.geimser-cmdb-empty strong {
  color: #102033;
  font-size: 14px;
  font-weight: 850;
}

.geimser-cmdb-empty span {
  margin-top: 5px;
  color: #536171;
  font-size: 12px;
  line-height: 1.4;
}

.geimser-cmdb-empty.is-error {
  border-color: #f4b4a8;
  background: #fff5f2;
}

.geimser-native-cmdb-assets {
  width: 100%;
  margin: 0;
  border: 1px solid #dce5ee;
  border-radius: 8px;
  background: #f8fafc;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(14, 31, 53, 0.08);
}

.geimser-native-cmdb-layout {
  width: 100%;
  max-width: 1480px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin: 18px 0 44px;
}

.geimser-native-cmdb-main,
.geimser-native-cmdb-side {
  min-width: 0;
}

.geimser-native-cmdb-side {
  display: grid;
  grid-template-columns: minmax(420px, 1.15fr) minmax(300px, 0.85fr);
  gap: 16px;
}

.geimser-native-cmdb-settings,
.geimser-native-cmdb-logs {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 16px !important;
  border: 1px solid #dce5ee !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  box-shadow: 0 14px 34px rgba(14, 31, 53, 0.07) !important;
  overflow: hidden !important;
}

.geimser-native-cmdb-settings::before,
.geimser-native-cmdb-logs::before {
  display: block;
  margin: -16px -16px 14px;
  padding: 9px 16px;
  background: #f3f7fb;
  color: #536171;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.geimser-native-cmdb-settings::before {
  content: "Configuracion del conector";
}

.geimser-native-cmdb-logs::before {
  content: "Actividad";
}

.geimser-native-cmdb-settings h1,
.geimser-native-cmdb-settings h2,
.geimser-native-cmdb-settings h3,
.geimser-native-cmdb-logs h1,
.geimser-native-cmdb-logs h2,
.geimser-native-cmdb-logs h3 {
  margin: 0 0 12px !important;
  color: #102033 !important;
  font-size: 16px !important;
  line-height: 1.2 !important;
  font-weight: 850 !important;
}

.geimser-native-cmdb-settings table {
  width: 100% !important;
  min-width: 0 !important;
  border: 1px solid #e4ebf2 !important;
  border-radius: 8px !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  overflow: hidden !important;
  table-layout: fixed !important;
}

.geimser-native-cmdb-settings th {
  padding: 10px 12px !important;
  background: #eef3f8 !important;
  color: #334155 !important;
  border-color: #e4ebf2 !important;
  font-size: 11px !important;
}

.geimser-native-cmdb-settings th:first-child,
.geimser-native-cmdb-settings td:first-child {
  width: 190px !important;
}

.geimser-native-cmdb-settings td {
  padding: 8px 10px !important;
  border-color: #e4ebf2 !important;
  color: #172235 !important;
  font-size: 12px !important;
  overflow-wrap: anywhere !important;
}

.geimser-native-cmdb-settings input,
.geimser-native-cmdb-settings select {
  min-height: 34px !important;
  border: 1px solid #d8e2ec !important;
  border-radius: 7px !important;
  background: #ffffff !important;
  box-shadow: none !important;
  font-size: 12px !important;
}

.geimser-native-cmdb-settings button {
  min-height: 36px !important;
  padding: 0 14px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 850 !important;
}

.geimser-native-cmdb-logs {
  color: #2d3b4d !important;
}

.geimser-native-cmdb-logs > *:last-child {
  margin-bottom: 0 !important;
}

.geimser-native-cmdb-assets-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid #d8e2ec;
  background: var(--gx-brand);
  color: #ffffff;
}

.geimser-native-cmdb-assets-head span {
  display: block;
  margin-bottom: 4px;
  color: #8fd3ff;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.geimser-native-cmdb-assets-head h2 {
  margin: 0;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 850;
}

.geimser-native-cmdb-assets-head button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: var(--gx-brand-2);
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.geimser-native-cmdb-assets-head button:hover {
  background: #005b9f;
}

.geimser-native-cmdb-assets-head button:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}

html[data-theme="dark"] .geimser-native-cmdb-assets-head {
  background: var(--gx-brand-strong);
  border-color: var(--gx-brand-2);
}

html[data-theme="dark"] .geimser-native-cmdb-assets-head h2 {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.geimser-native-cmdb-assets .geimser-cmdb-stats {
  padding: 16px 18px 0;
}

.geimser-native-cmdb-assets .geimser-cmdb-content {
  max-width: 100%;
  padding: 16px 18px 18px;
  overflow-x: visible;
}

.geimser-native-cmdb-assets .geimser-cmdb-detail-slot {
  min-width: 0;
}

@media (max-width: 1120px) {
  .geimser-cmdb-table {
    min-width: 760px;
  }

  .geimser-native-cmdb-assets .geimser-cmdb-content {
    overflow-x: auto;
  }

  .geimser-native-cmdb-side {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 860px) {
  .geimser-cmdb-shell {
    height: calc(100vh - 20px);
  }

  .geimser-cmdb-header {
    align-items: stretch;
    flex-direction: column;
    padding: 16px;
  }

  .geimser-cmdb-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px 16px 0;
  }

  .geimser-cmdb-content {
    padding: 12px 16px 16px;
  }

  .geimser-cmdb-detail-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .geimser-cmdb-detail-grid {
    grid-template-columns: 1fr;
  }

  .geimser-native-cmdb-assets-head {
    align-items: stretch;
    flex-direction: column;
  }

  .geimser-native-cmdb-layout {
    width: 100%;
    grid-template-columns: 1fr;
    margin: 14px 0 30px;
  }

  .geimser-native-cmdb-main {
    order: 1;
  }

  .geimser-native-cmdb-side {
    order: 2;
  }

  .geimser-native-cmdb-assets .geimser-cmdb-detail-slot {
    min-width: 0;
  }

}

.geimser-remote-empty {
  padding: 14px;
  border: 1px dashed #bed0df;
  border-radius: 8px;
  background: #ffffff;
  color: #34495e;
}

.geimser-remote-empty strong,
.geimser-remote-empty span {
  display: block;
}

.geimser-remote-empty strong {
  color: #102033;
  font-size: 13px;
  font-weight: 800;
}

.geimser-remote-empty span {
  margin-top: 4px;
  color: #536171;
  font-size: 11px;
  line-height: 1.4;
}

.geimser-remote-empty button {
  margin-top: 12px;
}

.geimser-remote-empty.is-error {
  border-color: #f4b4a8;
  background: #fff5f2;
}

.geimser-remote-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #ffffff;
}

.geimser-remote-modal.is-session-active .geimser-remote-frame {
  display: block;
}

@media (max-width: 760px) {
  .geimser-remote-panel {
    width: 100vw;
    height: 100dvh;
  }

  .geimser-remote-header {
    padding: 6px;
  }

  .geimser-remote-actions {
    flex-wrap: wrap;
  }

  .geimser-remote-actions .geimser-remote-open {
    margin-left: 0;
  }

  .geimser-remote-install-card {
    align-items: stretch;
    flex-direction: column;
  }

  .geimser-remote-install-actions {
    justify-content: flex-start;
  }
}

#app .geimser-activity-surface .activity-body,
#app .geimser-activity-surface .activity-message,
#app .geimser-activity-surface .activity-text,
#app .geimser-activity-surface .activity-time,
#app .geimser-activity-surface .humanTimeFromNow.activity-time,
#app .geimser-activity-surface .activity-body *,
#app .geimser-activity-surface .activity-message *,
#app .geimser-activity-surface .activity-text *,
#app .geimser-activity-surface .activity-time * {
  color: #111827 !important;
  text-shadow: none !important;
}

#app .geimser-activity-surface .activity-body a,
#app .geimser-activity-surface .activity-message a,
#app .geimser-activity-surface .activity-text a {
  color: #003d7a !important;
}

#app .geimser-activity-surface .activity-time,
#app .geimser-activity-surface .humanTimeFromNow.activity-time {
  color: #4b5563 !important;
}

#app .geimser-activity-surface .activity .avatar,
#app .geimser-activity-surface .activity .js-avatar {
  color: #071c2b !important;
}


/* ─── PERFIL / CUENTA — contraste estable por perfil ───────────
   El JS marca el popup real con estas clases para no depender de
   nombres internos de Zammad ni del rol del usuario. */
#app .geimser-popup-surface,
#app .geimser-profile-popup {
  --geimser-popup-bg: #ffffff;
  --geimser-popup-bg-soft: #f8fafc;
  --geimser-popup-text: #111827;
  --geimser-popup-muted: #5b6676;
  --geimser-popup-border: rgba(0, 31, 61, 0.12);
  --geimser-popup-hover: #edf6ff;
  --geimser-popup-link: #004b8d;
  box-sizing: border-box !important;
  z-index: 1100 !important;
  background: var(--geimser-popup-bg) !important;
  background-color: var(--geimser-popup-bg) !important;
  color: var(--geimser-popup-text) !important;
  border: 1px solid var(--geimser-popup-border) !important;
  border-radius: 12px !important;
  box-shadow: 0 18px 46px rgba(0, 20, 50, 0.20), 0 4px 12px rgba(0, 20, 50, 0.10) !important;
}

#app .geimser-profile-popup[data-geimser-popup-theme="dark"] {
  --geimser-popup-bg: #10141f;
  --geimser-popup-bg-soft: #161d2b;
  --geimser-popup-text: #f8fbff;
  --geimser-popup-muted: #b8c4d4;
  --geimser-popup-border: rgba(210, 225, 245, 0.16);
  --geimser-popup-hover: #20344f;
  --geimser-popup-link: #ffffff;
}

#app .geimser-profile-popup {
  width: min(320px, calc(100vw - 28px)) !important;
  min-width: min(248px, calc(100vw - 28px)) !important;
  max-width: calc(100vw - 28px) !important;
  max-height: min(420px, calc(100vh - 28px)) !important;
  padding: 6px !important;
  overflow: auto !important;
}

#app .geimser-profile-popup,
#app .geimser-profile-popup * {
  box-sizing: border-box !important;
  color: var(--geimser-popup-text) !important;
}

#app .geimser-profile-popup > *,
#app .geimser-profile-popup li {
  max-width: 100% !important;
}

#app .geimser-profile-popup li {
  display: block !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
}

#app .geimser-profile-popup a,
#app .geimser-profile-popup button:not([role="switch"]),
#app .geimser-profile-popup [role="menuitem"],
#app .geimser-profile-popup [role="option"] {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  min-height: 38px !important;
  padding: 8px 10px !important;
  border-radius: 8px !important;
  background: transparent !important;
  background-color: transparent !important;
  color: var(--geimser-popup-text) !important;
  font-size: 14px !important;
  font-weight: 650 !important;
  line-height: 1.35 !important;
}

#app .geimser-profile-popup a:hover,
#app .geimser-profile-popup button:not([role="switch"]):hover,
#app .geimser-profile-popup [role="menuitem"]:hover,
#app .geimser-profile-popup [role="option"]:hover {
  background: var(--geimser-popup-hover) !important;
  background-color: var(--geimser-popup-hover) !important;
  color: var(--geimser-popup-link) !important;
}

#app .geimser-profile-popup [class*="header"],
#app .geimser-profile-popup [class*="Header"],
#app .geimser-profile-popup :has(> .avatar),
#app .geimser-profile-popup :has(> [class*="avatar"]) {
  background: var(--geimser-popup-bg-soft) !important;
  background-color: var(--geimser-popup-bg-soft) !important;
  color: var(--geimser-popup-text) !important;
  border-radius: 8px !important;
}

#app .geimser-profile-popup .avatar,
#app .geimser-profile-popup [class*="avatar"],
#app .geimser-profile-popup [class*="Avatar"] {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 40px !important;
  border-radius: 50% !important;
  background: #f28c18 !important;
  background-color: #f28c18 !important;
  color: #ffffff !important;
  overflow: hidden !important;
}

#app .geimser-profile-popup img {
  max-width: 112px !important;
  max-height: 48px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}

#app .geimser-profile-popup hr,
#app .geimser-profile-popup .divider {
  background: var(--geimser-popup-border) !important;
  border-color: var(--geimser-popup-border) !important;
  margin: 6px 4px !important;
}

#app .geimser-profile-popup [role="switch"],
#app .geimser-profile-popup input[type="checkbox"] {
  color: inherit !important;
}

#app .geimser-profile-popup small,
#app .geimser-profile-popup [class*="muted"],
#app .geimser-profile-popup [class*="hint"],
#app .geimser-profile-popup [class*="meta"] {
  color: var(--geimser-popup-muted) !important;
}

#app .geimser-profile-popup {
  min-width: min(280px, calc(100vw - 24px)) !important;
  max-height: min(420px, calc(100dvh - 24px)) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  z-index: 1100 !important;
  pointer-events: auto !important;
}

#app .geimser-profile-popup a,
#app .geimser-profile-popup button,
#app .geimser-profile-popup [role="menuitem"],
#app .geimser-profile-popup [class*="logout"],
#app .geimser-profile-popup [class*="Logout"],
#app .geimser-profile-popup [class*="signOut"],
#app .geimser-profile-popup [class*="SignOut"] {
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  color: var(--geimser-popup-text) !important;
}

#app .geimser-profile-popup a:hover,
#app .geimser-profile-popup button:not([role="switch"]):hover,
#app .geimser-profile-popup [role="menuitem"]:hover,
#app .geimser-profile-popup [role="option"]:hover,
#app .geimser-profile-popup li:hover {
  background: var(--geimser-popup-hover) !important;
  background-color: var(--geimser-popup-hover) !important;
  color: var(--geimser-popup-link) !important;
}

#app .geimser-profile-popup a:hover *,
#app .geimser-profile-popup button:not([role="switch"]):hover *,
#app .geimser-profile-popup [role="menuitem"]:hover *,
#app .geimser-profile-popup [role="option"]:hover *,
#app .geimser-profile-popup li:hover * {
  color: var(--geimser-popup-link) !important;
  fill: currentColor !important;
  stroke: currentColor !important;
}

#app .geimser-profile-popup a[href*="logout"],
#app .geimser-profile-popup a[href*="sign_out"],
#app .geimser-profile-popup button[class*="logout"],
#app .geimser-profile-popup button[class*="Logout"],
#app .geimser-profile-popup [data-method="delete"] {
  border-top: 1px solid var(--geimser-popup-border) !important;
  margin-top: 6px !important;
  color: #b42318 !important;
}

#app .geimser-profile-popup[data-geimser-popup-theme="dark"] a[href*="logout"],
#app .geimser-profile-popup[data-geimser-popup-theme="dark"] a[href*="sign_out"],
#app .geimser-profile-popup[data-geimser-popup-theme="dark"] button[class*="logout"],
#app .geimser-profile-popup[data-geimser-popup-theme="dark"] button[class*="Logout"],
#app .geimser-profile-popup[data-geimser-popup-theme="dark"] [data-method="delete"] {
  color: #ffb4a8 !important;
}

#app .geimser-profile-popup a[href*="logout"]:hover,
#app .geimser-profile-popup a[href*="sign_out"]:hover,
#app .geimser-profile-popup button[class*="logout"]:hover,
#app .geimser-profile-popup button[class*="Logout"]:hover,
#app .geimser-profile-popup [data-method="delete"]:hover {
  background: #b42318 !important;
  background-color: #b42318 !important;
  color: #ffffff !important;
}

@media (max-width: 860px) {
  .geimser-sidebar-shortcuts.is-fixed {
    position: static !important;
    width: 100% !important;
    max-width: none !important;
  }

  .geimser-sidebar-brand,
  .geimser-sidebar-brand.is-compact {
    display: none !important;
  }

  #app .geimser-profile-popup {
    max-height: calc(100dvh - 16px) !important;
  }

}

@media (max-width: 520px) {
  .geimser-sidebar-brand,
  .geimser-sidebar-brand.is-compact {
    display: none !important;
  }

  #app .geimser-profile-popup {
    width: calc(100vw - 16px) !important;
    min-width: 0 !important;
    max-width: calc(100vw - 16px) !important;
  }
}

.geimser-sidebar-shortcut[data-geimser-shortcut="cmdb"] span:last-child {
  font-size: 0 !important;
}

.geimser-sidebar-shortcut[data-geimser-shortcut="cmdb"] span:last-child::after {
  content: "CMDB ITSM";
  font-size: 13.5px;
}

#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional .activity-entries,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional .activity-entry {
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #111827 !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  text-shadow: none !important;
}

#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional .activity-entry {
  box-sizing: border-box !important;
  padding: 12px 14px !important;
}

#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional .activity-body,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional .activity-message,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional .activity-text,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional .activity-time {
  box-sizing: border-box !important;
  display: block !important;
  left: auto !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-wrap: anywhere !important;
  position: static !important;
  right: auto !important;
  transform: none !important;
  white-space: normal !important;
  width: 100% !important;
}

#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional .activity-icon {
  display: none !important;
}

#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional h1,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional h2,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional h3,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional p,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional span,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional div,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional time,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional small {
  color: #111827 !important;
  text-shadow: none !important;
}

#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional a,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional .link {
  color: #003d7a !important;
}

#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional small,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional time,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional [class*="meta"],
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional [class*="Meta"],
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional [class*="time"],
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional [class*="Time"] {
  color: #4b5563 !important;
}

#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional .avatar,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional [class*="avatar"],
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional [class*="Avatar"] {
  background: #f28c18 !important;
  background-color: #f28c18 !important;
  color: #071c2b !important;
}

#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional .activity-avatar {
  background: transparent !important;
  background-color: transparent !important;
  border-radius: 0 !important;
  color: #111827 !important;
}

#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional .activity-avatar .avatar,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional .activity-avatar [class*="avatar"],
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional .activity-avatar [class*="Avatar"] {
  align-items: center !important;
  background: #f28c18 !important;
  background-color: #f28c18 !important;
  border-radius: 50% !important;
  color: #071c2b !important;
  display: inline-flex !important;
  height: 40px !important;
  justify-content: center !important;
  max-height: 40px !important;
  max-width: 40px !important;
  min-height: 40px !important;
  min-width: 40px !important;
  overflow: hidden !important;
  width: 40px !important;
}

/* Activity flow hard lock: keep Zammad's native timeline readable. */
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional {
  box-sizing: border-box !important;
  display: block !important;
  flex: 0 0 58px !important;
  max-width: 58px !important;
  min-width: 58px !important;
  width: 58px !important;
  padding: 12px 10px !important;
  border-left: 1px solid rgba(0, 31, 61, 0.10) !important;
  position: relative !important;
  overflow: visible !important;
  transition: flex-basis 180ms ease, width 180ms ease, min-width 180ms ease, max-width 180ms ease, padding 180ms ease !important;
}

#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional::before {
  align-items: center !important;
  background: var(--gx-panel-2) !important;
  border: 1px solid var(--gx-line) !important;
  border-radius: 999px !important;
  box-shadow: var(--gx-shadow-sm) !important;
  color: var(--gx-text) !important;
  content: "" !important;
  display: flex !important;
  height: 38px !important;
  justify-content: center !important;
  left: 10px !important;
  position: absolute !important;
  top: 12px !important;
  width: 38px !important;
  z-index: 8 !important;
}

#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional::after {
  border-right: 2px solid var(--gx-text) !important;
  border-top: 2px solid var(--gx-text) !important;
  content: "" !important;
  display: block !important;
  height: 9px !important;
  left: 23px !important;
  position: absolute !important;
  top: 26px !important;
  transform: rotate(225deg) !important;
  transition: transform 180ms ease !important;
  width: 9px !important;
  z-index: 9 !important;
}

#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional:hover,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional:focus-within {
  flex: 0 0 min(390px, calc(100vw - 320px)) !important;
  max-width: min(390px, calc(100vw - 320px)) !important;
  min-width: min(320px, calc(100vw - 320px)) !important;
  padding: 18px 20px !important;
  width: min(390px, calc(100vw - 320px)) !important;
}

#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional:hover::before,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional:focus-within::before {
  left: 20px !important;
  top: 18px !important;
}

#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional:hover::after,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional:focus-within::after {
  left: 33px !important;
  top: 32px !important;
  transform: rotate(45deg) !important;
}

#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional > * {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 120ms ease !important;
}

#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional:hover > *,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional:focus-within > * {
  opacity: 1 !important;
  pointer-events: auto !important;
}

#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional .activity-entries,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional ul,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional ol {
  box-sizing: border-box !important;
  display: grid !important;
  gap: 12px !important;
  width: 100% !important;
  margin: 14px 0 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional .activity-entry,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional li[class*="activity"],
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional div[class*="activity-entry"] {
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) !important;
  align-items: start !important;
  gap: 12px !important;
  min-height: 0 !important;
  height: auto !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 10px 0 12px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(0, 31, 61, 0.08) !important;
  position: relative !important;
}

#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional .activity-entry::before,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional .activity-entry::after,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional li[class*="activity"]::before,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional li[class*="activity"]::after,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional div[class*="activity-entry"]::before,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional div[class*="activity-entry"]::after {
  display: none !important;
  content: none !important;
}

#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional .activity-avatar,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional [class*="activity-avatar"],
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional [class*="ActivityAvatar"] {
  grid-column: 1 !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  width: 42px !important;
  min-width: 42px !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  position: static !important;
  transform: none !important;
}

#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional .activity-body,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional .activity-message,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional .activity-text,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional [class*="activity-body"],
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional [class*="activity-message"],
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional [class*="activity-text"] {
  grid-column: 2 !important;
  display: block !important;
  min-width: 0 !important;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  position: static !important;
  transform: none !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: anywhere !important;
  line-height: 1.38 !important;
}


/* Ticket workspace v2: preserve Zammad's layout and theme only its surfaces. */
#app.geimser-route-ticket .ticketZoom .ticket-title-update,
#app.geimser-route-ticket .ticketZoom .js-objectTitle {
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #172033 !important;
  -webkit-text-fill-color: #172033 !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
}

#app.geimser-route-ticket .ticketZoom .scrollPageHeader {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border-bottom: 1px solid #dbe3ec !important;
  color: #172033 !important;
}

#app.geimser-route-ticket .ticketZoom .scrollPageHeader *,
#app.geimser-route-ticket .ticketZoom .ticket-number-copy-header,
#app.geimser-route-ticket .ticketZoom .ticket-number {
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
}

#app.geimser-route-ticket .tabsSidebar > .sidebar,
#app.geimser-route-ticket .tabsSidebar .sidebar.bottom-form-shadow {
  background: #ffffff !important;
  background-color: #ffffff !important;
  backdrop-filter: none !important;
  border-left: 1px solid #dbe3ec !important;
  color: #172033 !important;
}

#app.geimser-route-ticket .tabsSidebar > .sidebar .sidebar-header,
#app.geimser-route-ticket .tabsSidebar .sidebar.bottom-form-shadow .sidebar-header {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border-bottom: 1px solid #dbe3ec !important;
  border-color: #dbe3ec !important;
  color: #172033 !important;
}

#app.geimser-route-ticket .tabsSidebar .sidebar-header-headline,
#app.geimser-route-ticket .tabsSidebar .sidebar-header-headline *,
#app.geimser-route-ticket .tabsSidebar .sidebar-header-actions,
#app.geimser-route-ticket .tabsSidebar .sidebar-header-actions *,
#app.geimser-route-ticket .tabsSidebar .tabsSidebar-close,
#app.geimser-route-ticket .tabsSidebar .tabsSidebar-close * {
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
}

#app.geimser-route-ticket .tabsSidebar .sidebar-header-actions .dropdown,
#app.geimser-route-ticket .tabsSidebar .sidebar-header-actions .dropdown-toggle,
#app.geimser-route-ticket .tabsSidebar .sidebar-header-actions #userAction,
#app.geimser-route-ticket .tabsSidebar .tabsSidebar-close {
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

#app.geimser-route-ticket .tabsSidebar .sidebar-header-actions .dropdown-toggle:hover,
#app.geimser-route-ticket .tabsSidebar .sidebar-header-actions .dropdown-toggle:focus,
#app.geimser-route-ticket .tabsSidebar .tabsSidebar-close:hover {
  background: #eef3f8 !important;
  background-color: #eef3f8 !important;
}

#app.geimser-route-ticket .tabsSidebar .formGroup-label,
#app.geimser-route-ticket .tabsSidebar .formGroup-label *,
#app.geimser-route-ticket .tabsSidebar label,
#app.geimser-route-ticket .tabsSidebar label *,
#app.geimser-route-ticket .tabsSidebar .text-muted,
#app.geimser-route-ticket .tabsSidebar .js-tags a,
#app.geimser-route-ticket .tabsSidebar .js-tags a * {
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
}

#app.geimser-route-ticket .tabsSidebar input,
#app.geimser-route-ticket .tabsSidebar select,
#app.geimser-route-ticket .tabsSidebar textarea,
#app.geimser-route-ticket .tabsSidebar .form-control {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  color: #172033 !important;
  -webkit-text-fill-color: #172033 !important;
}

#app.geimser-route-ticket .tabsSidebar-tab {
  background: #252a32 !important;
  background-color: #252a32 !important;
  border-color: #363d48 !important;
  color: #e7edf5 !important;
  -webkit-text-fill-color: #e7edf5 !important;
}

#app.geimser-route-ticket .tabsSidebar-tab *,
#app.geimser-route-ticket .tabsSidebar-tab svg,
#app.geimser-route-ticket .tabsSidebar-tab svg use,
#app.geimser-route-ticket .tabsSidebar-tab svg path {
  color: #e7edf5 !important;
  fill: currentColor !important;
  stroke: currentColor !important;
  -webkit-text-fill-color: #e7edf5 !important;
}

#app.geimser-route-ticket .tabsSidebar-tab:hover {
  background: #303844 !important;
  background-color: #303844 !important;
}

#app.geimser-route-ticket .tabsSidebar-tab.active,
#app.geimser-route-ticket .tabsSidebar-tab.is-active {
  background: #245b95 !important;
  background-color: #245b95 !important;
}

#app.geimser-route-ticket .geimser-ticket-remote-action {
  background: #1f5fa8 !important;
  background-color: #1f5fa8 !important;
  border: 1px solid #1a518f !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  height: 38px !important;
  margin: 0 !important;
  min-height: 38px !important;
  padding: 0 14px !important;
}

#app.geimser-route-ticket .ticketZoom {
  --geimser-ticket-card-width: min(1280px, calc(100% - 64px));
}

#app.geimser-route-ticket .ticketZoom .ticket-article,
#app.geimser-route-ticket .ticketZoom .article-new {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 1px solid #dbe3ec !important;
  border-radius: 8px !important;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08) !important;
  box-sizing: border-box !important;
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: var(--geimser-ticket-card-width) !important;
  overflow: visible !important;
  width: var(--geimser-ticket-card-width) !important;
}

#app.geimser-route-ticket .ticketZoom .ticket-article {
  margin-bottom: 16px !important;
  padding: 0 !important;
}

#app.geimser-route-ticket .ticketZoom .article-new {
  margin-bottom: 84px !important;
  margin-top: 0 !important;
  min-height: 268px !important;
  overflow: visible !important;
  padding: 0 !important;
  position: relative !important;
}

#app.geimser-route-ticket .ticketZoom .ticket-article > .ticket-article-item,
#app.geimser-route-ticket .ticketZoom .ticket-article .article-content,
#app.geimser-route-ticket .ticketZoom .ticket-article .bubble-gap,
#app.geimser-route-ticket .ticketZoom .ticket-article .internal-border,
#app.geimser-route-ticket .ticketZoom .article-new .article-add,
#app.geimser-route-ticket .ticketZoom .article-new .article-content,
#app.geimser-route-ticket .ticketZoom .article-new .internal-border,
#app.geimser-route-ticket .ticketZoom .article-new .textBubble,
#app.geimser-route-ticket .ticketZoom .article-new .article-actions {
  box-sizing: border-box !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  width: 100% !important;
}

@media (max-width: 900px) {
  #app.geimser-route-ticket .ticketZoom {
    --geimser-ticket-card-width: calc(100% - 32px);
  }
}

#app.geimser-route-ticket .ticketZoom .js-writeArea {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  color: #172033 !important;
}

#app.geimser-route-ticket .ticketZoom .article-new .article-add,
#app.geimser-route-ticket .ticketZoom .article-new .article-content {
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  min-height: 220px !important;
  overflow: visible !important;
}

#app.geimser-route-ticket .ticketZoom .article-new .internal-border {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border-radius: 0 !important;
  min-height: 220px !important;
  overflow: visible !important;
}

#app.geimser-route-ticket .ticketZoom .article-new .editControls {
  align-items: center !important;
  background: #f7f9fc !important;
  background-color: #f7f9fc !important;
  border-bottom: 1px solid #dbe3ec !important;
  box-sizing: border-box !important;
  display: flex !important;
  gap: 8px !important;
  left: auto !important;
  min-height: 48px !important;
  padding: 6px 12px !important;
  position: static !important;
  top: auto !important;
  width: 100% !important;
  z-index: 4 !important;
}

#app.geimser-route-ticket .ticketZoom .article-new .editControls button,
#app.geimser-route-ticket .ticketZoom .article-new .editControls [role="button"] {
  box-sizing: border-box !important;
  margin: 0 !important;
  position: static !important;
}

#app.geimser-route-ticket .ticketZoom .article-actions {
  align-items: center !important;
  display: flex !important;
  justify-content: space-around !important;
  min-height: 42px !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

#app.geimser-route-ticket .ticketZoom .article-actions .article-action {
  align-items: center !important;
  display: inline-flex !important;
  gap: 5px !important;
  justify-content: center !important;
  min-width: 0 !important;
  width: auto !important;
}

#app.geimser-route-ticket .ticketZoom .article-actions .article-action-name {
  color: #334155 !important;
  display: inline !important;
  font-size: 11px !important;
  -webkit-text-fill-color: #334155 !important;
  white-space: nowrap !important;
}

/* NOTA: el color de .ticket-article/.article-content/.textBubble ya NO se
   fija aquí. Ese rol es de la capa de tokens de tema en la sección 5.3 (más
   abajo, "gana al bloque funcional por orden") + del normalizador JS
   normalizeArticleContentContrast(), que corrige por contraste real el
   contenido externo (correos) que trae sus propios colores inline. Fijar
   colores duros aquí (#172033, #64748b...) quedó muerto bajo el tema oscuro
   real de v4 y solo generaba confusión — ver geimser-itsm-frontend memoria. */

#app.geimser-route-ticket .ticketZoom .article-new label,
#app.geimser-route-ticket .ticketZoom .article-new label *,
#app.geimser-route-ticket .ticketZoom .article-new .formGroup-label,
#app.geimser-route-ticket .ticketZoom .article-new .formGroup-label *,
#app.geimser-route-ticket .ticketZoom .article-new .text-muted,
#app.geimser-route-ticket .ticketZoom .article-new .text-muted * {
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

#app.geimser-route-ticket .ticketZoom .article-new input,
#app.geimser-route-ticket .ticketZoom .article-new textarea,
#app.geimser-route-ticket .ticketZoom .article-new .form-control,
#app.geimser-route-ticket .ticketZoom .article-new .token,
#app.geimser-route-ticket .ticketZoom .article-new .token *,
#app.geimser-route-ticket .ticketZoom .article-new [class*="recipient"],
#app.geimser-route-ticket .ticketZoom .article-new [class*="recipient"] *,
#app.geimser-route-ticket .ticketZoom .article-new [class*="select"] input {
  color: #172033 !important;
  -webkit-text-fill-color: #172033 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

#app.geimser-route-ticket .ticketZoom .article-new .token,
#app.geimser-route-ticket .ticketZoom .article-new [class*="recipient"] {
  background: #e8eef6 !important;
  background-color: #e8eef6 !important;
  border-color: #cbd5e1 !important;
  border-radius: 4px !important;
}

#app.geimser-route-ticket .ticketZoom .article-new .token .close,
#app.geimser-route-ticket .ticketZoom .article-new .token [class*="remove"],
#app.geimser-route-ticket .ticketZoom .article-new [class*="recipient"] .close,
#app.geimser-route-ticket .ticketZoom .article-new [class*="recipient"] [class*="remove"] {
  color: #1f5fa8 !important;
  -webkit-text-fill-color: #1f5fa8 !important;
}

#app.geimser-route-ticket .ticketZoom .article-new input::placeholder,
#app.geimser-route-ticket .ticketZoom .article-new textarea::placeholder {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
  opacity: 1 !important;
}

#app.geimser-route-ticket .ticketZoom .textBubble.js-writeArea {
  display: flex !important;
  flex-direction: column !important;
  border: 0 !important;
  border-radius: 0 0 8px 8px !important;
  box-shadow: none !important;
  min-height: 210px !important;
  outline: 0 !important;
  overflow: visible !important;
}

#app.geimser-route-ticket .ticketZoom .textBubble.js-writeArea:focus-within {
  border-color: #1f5fa8 !important;
  box-shadow: 0 0 0 3px rgba(31, 95, 168, 0.14) !important;
}

#app.geimser-route-ticket .ticketZoom .js-writeArea .articleNewEdit-body,
#app.geimser-route-ticket .ticketZoom .js-writeArea .js-textarea.richtext-content,
#app.geimser-route-ticket .ticketZoom .js-writeArea [contenteditable="true"] {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 0 !important;
  box-shadow: none !important;
  caret-color: #1f5fa8 !important;
  color: #172033 !important;
  flex: 1 1 auto !important;
  -webkit-text-fill-color: #172033 !important;
  min-height: 145px !important;
  overflow: auto !important;
  padding: 12px !important;
}

#app.geimser-route-ticket .ticketZoom .js-writeArea .article-attachment {
  align-items: center !important;
  background: #f7f9fc !important;
  background-color: #f7f9fc !important;
  border-top: 1px solid #dbe3ec !important;
  box-sizing: border-box !important;
  color: #475569 !important;
  display: flex !important;
  flex: 0 0 auto !important;
  min-height: 48px !important;
  overflow: visible !important;
  position: static !important;
  width: 100% !important;
}

#app.geimser-route-ticket .ticketZoom .js-writeArea .attachmentPlaceholder {
  align-items: center !important;
  box-sizing: border-box !important;
  display: flex !important;
  gap: 8px !important;
  justify-content: flex-start !important;
  margin: 0 !important;
  min-height: 48px !important;
  overflow: visible !important;
  padding: 10px 14px !important;
  position: relative !important;
  width: 100% !important;
}

#app.geimser-route-ticket .ticketZoom .js-writeArea .attachmentPlaceholder-inputHolder,
#app.geimser-route-ticket .ticketZoom .js-writeArea .attachmentPlaceholder-label,
#app.geimser-route-ticket .ticketZoom .js-writeArea .attachmentPlaceholder-hint {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  line-height: 1.3 !important;
  margin: 0 !important;
  min-width: 0 !important;
  overflow: visible !important;
  padding: 0 !important;
  position: static !important;
  width: auto !important;
  white-space: nowrap !important;
}

#app.geimser-route-ticket .ticketZoom .js-writeArea .attachmentPlaceholder-inputHolder input[type="file"] {
  cursor: pointer !important;
  height: 100% !important;
  inset: 0 !important;
  opacity: 0 !important;
  padding: 0 !important;
  position: absolute !important;
  width: 100% !important;
}

#app.geimser-route-ticket .attributeBar {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border-top: 1px solid #dbe3ec !important;
  bottom: 0 !important;
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.12) !important;
  color: #334155 !important;
  min-height: 64px !important;
  position: sticky !important;
  z-index: 120 !important;
}

#app.geimser-route-ticket .attributeBar *,
#app.geimser-route-ticket .attributeBar .btn {
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
}

#app.geimser-route-ticket .attributeBar .btn--primary,
#app.geimser-route-ticket .attributeBar .btn--primary *,
#app.geimser-route-ticket .attributeBar button[type="submit"],
#app.geimser-route-ticket .attributeBar button[type="submit"] * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

#app.geimser-route-ticket .attributeBar .js-submit,
#app.geimser-route-ticket .attributeBar .btn--primary,
#app.geimser-route-ticket .attributeBar button[type="submit"] {
  background: #1f5fa8 !important;
  background-color: #1f5fa8 !important;
  border: 1px solid #1a518f !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  color: #ffffff !important;
  display: block !important;
  min-height: 40px !important;
  opacity: 1 !important;
  visibility: visible !important;
}

#app.geimser-route-ticket .main.tabsSidebar-sidebarSpacer {
  padding-bottom: 84px !important;
  scroll-padding-bottom: 84px !important;
}

@media (max-width: 1100px) {
  #app.geimser-route-ticket .ticketZoom .article-actions .article-action-name {
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    height: 1px !important;
    overflow: hidden !important;
    position: absolute !important;
    white-space: nowrap !important;
    width: 1px !important;
  }

}
/* ─── 3. NAV LATERAL PRINCIPAL ──────────────────────────────────────────── */
#app .geimser-nav-surface {
  background: var(--gx-nav-bg) !important;
  background-image: none !important;
  border-right: 1px solid var(--gx-nav-line) !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  overflow-x: visible !important;
  color: var(--gx-nav-text) !important;
}

#app .geimser-nav-surface * {
  box-sizing: border-box !important;
  color: var(--gx-nav-text) !important;
}

#app .geimser-nav-surface a,
#app .geimser-nav-surface button,
#app .geimser-nav-surface [role="button"] {
  color: var(--gx-nav-text) !important;
  font-weight: 500 !important;
  font-size: 13.5px !important;
  border-radius: var(--gx-radius-sm) !important;
  transition: background 0.12s ease, color 0.12s ease !important;
}

#app .geimser-nav-surface a:hover,
#app .geimser-nav-surface button:hover,
#app .geimser-nav-surface [role="button"]:hover {
  background: var(--gx-nav-hover) !important;
  color: var(--gx-nav-text-strong) !important;
}

#app .geimser-nav-surface .is-active,
#app .geimser-nav-surface .active {
  background: var(--gx-nav-active) !important;
  border-left: 3px solid var(--gx-accent) !important;
}

#app .geimser-nav-surface .is-active,
#app .geimser-nav-surface .active,
#app .geimser-nav-surface .is-active *,
#app .geimser-nav-surface .active * {
  color: var(--gx-nav-text-strong) !important;
}

#app .geimser-nav-surface h1,
#app .geimser-nav-surface h2,
#app .geimser-nav-surface h3 {
  color: var(--gx-nav-text-strong) !important;
}

/* Búsqueda en la nav */
#app .geimser-nav-surface input,
#app .geimser-nav-surface textarea,
#app .geimser-nav-surface .form-control,
#app .geimser-sidebar-search-control {
  background: var(--gx-nav-input-bg) !important;
  background-color: var(--gx-nav-input-bg) !important;
  border: 1px solid var(--gx-nav-line) !important;
  border-radius: var(--gx-radius-sm) !important;
  color: var(--gx-nav-text-strong) !important;
  caret-color: var(--gx-brand-2) !important;
  -webkit-text-fill-color: var(--gx-nav-text-strong) !important;
  padding: 8px 12px !important;
  font-size: 13px !important;
}

#app .geimser-nav-surface input::placeholder,
#app .geimser-sidebar-search-control::placeholder {
  color: var(--gx-nav-text) !important;
  -webkit-text-fill-color: var(--gx-nav-text) !important;
  opacity: 0.75 !important;
}

#app .geimser-nav-surface input:focus,
#app .geimser-sidebar-search-control:focus {
  border-color: var(--gx-brand-2) !important;
  box-shadow: var(--gx-focus-ring) !important;
}

/* Resultados de búsqueda del sidebar: panel temable */
#app .navigation [class*="search"] [class*="result"],
#app .navigation [class*="search"] [class*="suggest"],
#app .navigation .js-results,
#app .geimser-nav-surface [class*="search"] [class*="result"],
#app .geimser-nav-surface [class*="search"] [class*="suggest"] {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 1050 !important;
  max-height: 60vh !important;
  overflow-y: auto !important;
  background: var(--gx-panel) !important;
  color: var(--gx-text) !important;
  border: 1px solid var(--gx-line) !important;
  border-radius: var(--gx-radius) !important;
  box-shadow: var(--gx-shadow-lg) !important;
}

#app .navigation [class*="search"] [class*="result"] *,
#app .navigation .js-results *,
#app .geimser-nav-surface [class*="search"] [class*="result"] * {
  color: var(--gx-text) !important;
}

#app .geimser-sidebar-search-shell {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: visible !important;
  position: relative !important;
}

#app .geimser-sidebar-search-control {
  display: block !important;
  width: calc(100% - 16px) !important;
  max-width: calc(100% - 16px) !important;
  margin: 0 8px !important;
}

/* Footer / dock del sidebar */
#app .geimser-sidebar-footer,
#app .geimser-sidebar-dock {
  align-items: center !important;
  background: var(--gx-nav-bg-2) !important;
  background-color: var(--gx-nav-bg-2) !important;
  border-radius: 0 !important;
  border-top: 1px solid var(--gx-nav-line) !important;
  box-shadow: none !important;
  color: var(--gx-nav-text) !important;
  display: flex !important;
  gap: 0 !important;
  min-height: 52px !important;
  overflow: hidden !important;
}

#app .geimser-sidebar-dock-item,
#app .geimser-sidebar-footer a,
#app .geimser-sidebar-footer button,
#app .geimser-sidebar-footer [role="button"] {
  align-items: center !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--gx-nav-text) !important;
  display: inline-flex !important;
  flex: 0 0 52px !important;
  height: 52px !important;
  justify-content: center !important;
  margin: 0 !important;
  min-height: 52px !important;
  min-width: 52px !important;
  padding: 0 !important;
  width: 52px !important;
}

#app .geimser-sidebar-dock-item:hover,
#app .geimser-sidebar-footer a:hover,
#app .geimser-sidebar-footer button:hover {
  background: var(--gx-nav-hover) !important;
  color: var(--gx-nav-text-strong) !important;
}

#app .geimser-sidebar-dock-item svg,
#app .geimser-sidebar-footer svg,
#app .geimser-sidebar-dock-item [class*="icon"],
#app .geimser-sidebar-footer [class*="icon"] {
  color: var(--gx-nav-text) !important;
  fill: currentColor !important;
  stroke: currentColor !important;
}

#app .geimser-agent-hidden {
  display: none !important;
}

#app .geimser-new-ticket-button {
  align-items: center !important;
  border-radius: var(--gx-radius-sm) !important;
  display: inline-flex !important;
  gap: 8px !important;
  justify-content: center !important;
  min-width: 118px !important;
  width: auto !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
  white-space: nowrap !important;
}

#app .geimser-sidebar-dock-item.geimser-new-ticket-button,
#app .geimser-sidebar-footer .geimser-new-ticket-button {
  flex: 1 1 132px !important;
  min-width: 132px !important;
  width: auto !important;
  padding-left: 10px !important;
  padding-right: 10px !important;
}

#app .geimser-sidebar-dock:has(.geimser-new-ticket-button),
#app .geimser-sidebar-footer:has(.geimser-new-ticket-button) {
  display: flex !important;
  grid-template-columns: none !important;
}

#app .geimser-sidebar-dock:has(.geimser-new-ticket-button) > :not(.geimser-new-ticket-button),
#app .geimser-sidebar-footer:has(.geimser-new-ticket-button) > :not(.geimser-new-ticket-button) {
  flex: 0 0 52px !important;
}

#app .geimser-new-ticket-label {
  color: inherit !important;
  display: inline-block !important;
  font-size: 12.5px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  max-width: 104px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

@media (max-width: 760px) {
  #app .geimser-new-ticket-button {
    min-width: 104px !important;
  }

  #app .geimser-new-ticket-label {
    max-width: 82px !important;
  }
}

/* Avatares de marca */
#app .geimser-sidebar-footer .avatar,
#app .geimser-sidebar-footer [class*="avatar"],
#app .geimser-sidebar-dock-item .avatar,
#app .geimser-sidebar-dock-item [class*="avatar"] {
  align-items: center !important;
  background: var(--gx-accent) !important;
  background-color: var(--gx-accent) !important;
  border-radius: 50% !important;
  color: #1d1303 !important;
  display: inline-flex !important;
  flex: 0 0 34px !important;
  font-weight: 800 !important;
  height: 34px !important;
  justify-content: center !important;
  margin: 0 !important;
  min-height: 34px !important;
  min-width: 34px !important;
  width: 34px !important;
}

/* Shortcuts Geimser (CMDB, Toma remota) */
.geimser-sidebar-shortcut {
  border-radius: var(--gx-radius-sm) !important;
  min-height: 42px !important;
  font-size: 13.5px !important;
  font-weight: 550 !important;
  color: var(--gx-nav-text) !important;
  gap: 12px !important;
  padding: 0 14px !important;
  transition: background 0.12s ease, color 0.12s ease !important;
}

.geimser-sidebar-shortcut:hover,
.geimser-sidebar-shortcut:focus,
.geimser-sidebar-shortcut.is-active {
  background: var(--gx-nav-active) !important;
  border-left-color: var(--gx-accent) !important;
  color: var(--gx-nav-text-strong) !important;
  outline: none;
}

/* Dropdowns dentro de la nav: oscuros, coherentes con la nav */
#app .geimser-nav-surface .dropdown-menu,
#app .geimser-nav-surface [role="menu"],
#app .geimser-nav-surface [role="listbox"],
#app .geimser-sidebar-overlay {
  z-index: 1050 !important;
  background: var(--gx-nav-bg) !important;
  background-color: var(--gx-nav-bg) !important;
  border: 1px solid var(--gx-nav-line) !important;
  border-radius: var(--gx-radius) !important;
  color: var(--gx-nav-text-strong) !important;
  box-shadow: var(--gx-shadow-lg) !important;
  max-width: min(360px, calc(100vw - 16px)) !important;
  max-height: min(480px, calc(100dvh - 24px)) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

#app .geimser-nav-surface .dropdown-menu *,
#app .geimser-nav-surface [role="menu"] *,
#app .geimser-sidebar-overlay * {
  color: var(--gx-nav-text-strong) !important;
  background-color: transparent !important;
}

#app .geimser-nav-surface .dropdown-menu a:hover,
#app .geimser-nav-surface [role="menu"] a:hover,
#app .geimser-sidebar-overlay a:hover {
  background: var(--gx-nav-active) !important;
}

/* Contador de notificaciones */
#app .activity-counter,
#app .js-notificationsCounter,
#app [class*="notificationsCounter"] {
  background: #d92d20 !important;
  background-color: #d92d20 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  font-weight: 750 !important;
  text-shadow: none !important;
}

/* Ocultar marca Zammad */
#app .navigation img[src*="zammad"],
#app .navigation img[src*="logo"],
#app .geimser-nav-surface img[src*="zammad"],
#app .geimser-nav-surface img[src*="logo"] {
  display: none !important;
}

#app .geimser-hide-zammad-brand {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
/* ─── 4. COMPONENTES ────────────────────────────────────────────────────── */

/* 4.1 Page header (todas las páginas, incl. variantes overview de alta
   especificidad para ganar a reglas core) */
#app .page-header,
#app .pageHeader,
#app .content .page-header,
#app .main .page-header,
#app .content .overview-table .page-header,
#app .content [class*="overview"] .page-header,
#app .content [class*="Overview"] .page-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  min-height: 56px !important;
  margin: 0 0 14px !important;
  padding: 10px 18px !important;
  background: var(--gx-panel) !important;
  background-color: var(--gx-panel) !important;
  border: 1px solid var(--gx-line) !important;
  border-radius: var(--gx-radius) !important;
  box-shadow: var(--gx-shadow-sm) !important;
  color: var(--gx-text) !important;
  -webkit-text-fill-color: var(--gx-text) !important;
}

#app .page-header *,
#app .pageHeader *,
#app .content .overview-table .page-header *,
#app .content [class*="overview"] .page-header *,
#app .content [class*="Overview"] .page-header * {
  background: transparent !important;
  background-color: transparent !important;
  color: var(--gx-text) !important;
  -webkit-text-fill-color: var(--gx-text) !important;
  text-shadow: none !important;
}

#app .page-header h1,
#app .page-header h2,
#app .page-header .page-header-title,
#app .content .overview-table .page-header h1,
#app .content .overview-table .page-header h2,
#app .content [class*="overview"] .page-header h1,
#app .content [class*="overview"] .page-header h2 {
  margin: 0 !important;
  color: var(--gx-text) !important;
  -webkit-text-fill-color: var(--gx-text) !important;
  font-size: 17px !important;
  font-weight: 750 !important;
  letter-spacing: -0.01em !important;
  line-height: 1.25 !important;
}

#app .page-header small,
#app .page-header .page-header-meta,
#app .content .overview-table .page-header .page-header-meta,
#app .content [class*="overview"] .page-header .page-header-meta {
  color: var(--gx-text-3) !important;
  -webkit-text-fill-color: var(--gx-text-3) !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
}

#app .page-header .btn,
#app .btn.btn--action,
#app .content .overview-table .page-header .btn,
#app .content [class*="overview"] .page-header .btn {
  background: var(--gx-panel) !important;
  background-color: var(--gx-panel) !important;
  border: 1px solid var(--gx-line-strong) !important;
  border-radius: var(--gx-radius-sm) !important;
  box-shadow: none !important;
  color: var(--gx-text-2) !important;
  -webkit-text-fill-color: var(--gx-text-2) !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  min-height: 32px !important;
  padding: 5px 12px !important;
}

#app .page-header .btn:hover,
#app .btn.btn--action:hover {
  background: var(--gx-hover) !important;
  background-color: var(--gx-hover) !important;
  color: var(--gx-text) !important;
  -webkit-text-fill-color: var(--gx-text) !important;
  transform: none !important;
}

/* 4.2 Tablas */
#app .table-overview,
#app .content .page-content {
  background: var(--gx-panel) !important;
  background-color: var(--gx-panel) !important;
}

#app .content table,
#app .content .table {
  background: var(--gx-panel) !important;
  border: 1px solid var(--gx-line) !important;
  border-radius: var(--gx-radius) !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  box-shadow: var(--gx-shadow-sm) !important;
  overflow: hidden !important;
  color: var(--gx-text) !important;
}

#app thead,
#app thead tr,
#app .content table thead,
#app .content table thead tr,
#app .content .table thead,
#app .content .table thead tr,
#app .content [class*="table"] [class*="header"],
#app .content [class*="Table"] [class*="Header"],
#app .content [class*="overview"] [class*="header"]:not(.page-header),
#app .content [class*="Overview"] [class*="Header"]:not(.page-header) {
  background: var(--gx-panel-2) !important;
  background-color: var(--gx-panel-2) !important;
  color: var(--gx-text-3) !important;
  -webkit-text-fill-color: var(--gx-text-3) !important;
  text-shadow: none !important;
}

#app thead th,
#app table thead th,
#app .content table thead th,
#app .content .table thead th,
#app .js-tableHead,
#app .table-column-title,
#app th .table-column-title,
#app .table .js-tableHead,
#app .table .table-column-title,
#app [role="columnheader"] {
  background: var(--gx-panel-2) !important;
  background-color: var(--gx-panel-2) !important;
  border-bottom: 1px solid var(--gx-line) !important;
  color: var(--gx-text-3) !important;
  -webkit-text-fill-color: var(--gx-text-3) !important;
  font-size: 11px !important;
  font-weight: 750 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
}

#app thead th,
#app .content table thead th {
  padding: 10px 14px !important;
}

#app thead th *,
#app .content table thead th *,
#app .content .table thead th * {
  background: transparent !important;
  background-color: transparent !important;
  color: var(--gx-text-3) !important;
  -webkit-text-fill-color: var(--gx-text-3) !important;
}

#app .content table tbody td,
#app .content .table tbody td {
  border-bottom: 1px solid var(--gx-line) !important;
  color: var(--gx-text) !important;
  font-size: 13.5px !important;
  padding: 11px 14px !important;
  vertical-align: middle !important;
}

#app .content table tbody tr:hover td,
#app .content .table tbody tr:hover td {
  background: var(--gx-row-hover) !important;
}

#app .content table tbody tr:last-child td {
  border-bottom: 0 !important;
}

#app .content table tbody tr.item-unread td,
#app .content table tbody tr[class*="unread"] td {
  font-weight: 650 !important;
}

/* 4.3 Nav de overviews (segunda columna) */
#app .content > .sidebar:not(.NavBarAdmin),
#app .content.overviews > .sidebar {
  background: var(--gx-panel) !important;
  background-color: var(--gx-panel) !important;
  border-right: 1px solid var(--gx-line) !important;
  color: var(--gx-text-2) !important;
}

#app .content .sidebar .nav.nav-pills.nav-stacked {
  display: grid !important;
  gap: 2px !important;
  padding: 10px 14px 10px 8px !important;
}

#app .content .sidebar .nav-pills li { margin: 0 !important; }

#app .content .sidebar .nav-pills li a {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  box-sizing: border-box !important;
  min-height: 38px !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  padding: 8px 28px 8px 12px !important;
  position: relative !important;
  width: 100% !important;
  border-radius: var(--gx-radius-sm) !important;
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  box-shadow: inset 3px 0 0 transparent !important;
  color: var(--gx-text-2) !important;
  -webkit-text-fill-color: var(--gx-text-2) !important;
  font-size: 13.5px !important;
  font-weight: 550 !important;
  line-height: 1.3 !important;
  text-decoration: none !important;
  transition: background 0.12s ease, color 0.12s ease !important;
}

#app .content .sidebar .nav-pills li a > .local,
#app .content .sidebar .nav-pills li a > .tab-name,
#app .content .sidebar .nav-pills li a > span:first-child {
  display: block !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#app .content .sidebar .nav-pills li a *,
#app .content .sidebar .nav-pills li a span {
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
}

#app .content .sidebar .nav-pills li a:hover {
  background: var(--gx-hover) !important;
  background-color: var(--gx-hover) !important;
  color: var(--gx-text) !important;
  -webkit-text-fill-color: var(--gx-text) !important;
}

#app .content .sidebar .nav-pills li.active a,
#app .content .sidebar .nav-pills li.is-active a {
  background: var(--gx-brand-soft) !important;
  background-color: var(--gx-brand-soft) !important;
  box-shadow: inset 3px 0 0 var(--gx-accent) !important;
  color: var(--gx-brand-strong) !important;
  -webkit-text-fill-color: var(--gx-brand-strong) !important;
  font-weight: 700 !important;
}

#app .content .sidebar .nav-pills li.active a *,
#app .content .sidebar .nav-pills li.is-active a * {
  color: var(--gx-brand-strong) !important;
  -webkit-text-fill-color: var(--gx-brand-strong) !important;
}

#app .content .sidebar .nav-pills li a > .badge,
#app .content .sidebar .nav-pills li a > .tab-badge,
#app .content .sidebar .nav-pills li a > .counter {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  flex: 0 0 auto !important;
  height: 22px !important;
  left: auto !important;
  margin-left: auto !important;
  margin-right: 24px !important;
  min-width: 28px !important;
  min-height: 22px !important;
  max-width: none !important;
  padding: 1px 7px !important;
  position: static !important;
  right: auto !important;
  top: auto !important;
  transform: none !important;
  border-radius: 999px !important;
  background: var(--gx-panel-3) !important;
  background-color: var(--gx-panel-3) !important;
  color: var(--gx-text-3) !important;
  -webkit-text-fill-color: var(--gx-text-3) !important;
  font-size: 11px !important;
  font-weight: 750 !important;
}

#app .content .sidebar .nav-pills li.active a .badge,
#app .content .sidebar .nav-pills li.active a > .tab-badge {
  background: var(--gx-brand-soft-2) !important;
  background-color: var(--gx-brand-soft-2) !important;
  color: var(--gx-brand-strong) !important;
  -webkit-text-fill-color: var(--gx-brand-strong) !important;
}

#app .content.overviews .tabs--inline .tab {
  align-items: center !important;
  box-sizing: border-box !important;
  display: flex !important;
  gap: 12px !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  padding-right: 28px !important;
}

#app .content.overviews .tabs--inline .tab-name {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-align: left !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#app .content.overviews .tabs--inline .tab-badge {
  align-items: center !important;
  background: var(--gx-panel-3) !important;
  background-color: var(--gx-panel-3) !important;
  border-radius: 999px !important;
  box-sizing: border-box !important;
  color: var(--gx-text-3) !important;
  display: inline-flex !important;
  flex: 0 0 auto !important;
  font-size: 11px !important;
  font-weight: 750 !important;
  height: 22px !important;
  justify-content: center !important;
  line-height: 1 !important;
  margin-left: auto !important;
  margin-right: 0 !important;
  min-width: 28px !important;
  padding: 1px 7px !important;
  position: static !important;
  transform: none !important;
  -webkit-text-fill-color: var(--gx-text-3) !important;
}

#app .content.overviews .tabs--inline .tab.active .tab-badge {
  background: var(--gx-brand-soft-2) !important;
  background-color: var(--gx-brand-soft-2) !important;
  color: var(--gx-brand-strong) !important;
  -webkit-text-fill-color: var(--gx-brand-strong) !important;
}

/* Zammad overview sidebar: keep the native flex badge contract, but restore
   the right gutter that its nav-pills active/hover state expects. */
#app .content.overviews > .sidebar:not(.NavBarAdmin) {
  box-sizing: border-box !important;
  overflow: visible !important;
  padding-right: 18px !important;
}

#app .content.overviews > .sidebar:not(.NavBarAdmin) .nav.nav-pills.nav-stacked {
  box-sizing: border-box !important;
  padding: 10px 0 10px 8px !important;
  width: 100% !important;
}

#app .content.overviews > .sidebar:not(.NavBarAdmin) .nav-pills.nav-stacked > li > a,
#app .content.overviews > .sidebar:not(.NavBarAdmin) .nav-pills.nav-stacked > li > a:hover,
#app .content.overviews > .sidebar:not(.NavBarAdmin) .nav-pills.nav-stacked > li > a:focus,
#app .content.overviews > .sidebar:not(.NavBarAdmin) .nav-pills.nav-stacked > li.active > a,
#app .content.overviews > .sidebar:not(.NavBarAdmin) .nav-pills.nav-stacked > li.active > a:hover,
#app .content.overviews > .sidebar:not(.NavBarAdmin) .nav-pills.nav-stacked > li.active > a:focus {
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100% !important;
}

#app .content.overviews > .sidebar:not(.NavBarAdmin) .nav-pills > li > a > .badge,
#app .content.overviews > .sidebar:not(.NavBarAdmin) .nav-pills > li > a > .badge.badge--text {
  margin-left: auto !important;
  margin-right: 24px !important;
}

/* 4.4 Botones */
#app button,
#app .btn,
#app a.btn,
#app [role="button"] {
  border-radius: var(--gx-radius-sm) !important;
  font-weight: 600 !important;
  font-size: 13.5px !important;
  transition: background 0.13s ease, box-shadow 0.13s ease, color 0.13s ease !important;
}

#app .content .btn:not(.btn--primary):not(.btn-primary):not(.button--primary):not([type="submit"]):not(.btn--danger):not(.btn-danger):not(.btn--success):not(.btn-success),
#app .modal .btn:not(.btn--primary):not(.btn-primary):not([type="submit"]):not(.btn--danger):not(.btn--success) {
  background: var(--gx-panel) !important;
  background-color: var(--gx-panel) !important;
  border: 1px solid var(--gx-line-strong) !important;
  box-shadow: none !important;
  color: var(--gx-text-2) !important;
}

#app .content .btn:not(.btn--primary):not(.btn-primary):not(.button--primary):not([type="submit"]):not(.btn--danger):not(.btn-danger):not(.btn--success):not(.btn-success):hover {
  background: var(--gx-hover) !important;
  background-color: var(--gx-hover) !important;
  color: var(--gx-text) !important;
  transform: none !important;
}

#app .btn--primary,
#app .button--primary,
#app .btn-primary,
#app button[type="submit"],
#app input[type="submit"] {
  background: linear-gradient(160deg, var(--gx-brand-2) 0%, var(--gx-brand) 100%) !important;
  background-color: var(--gx-brand) !important;
  border: none !important;
  color: var(--gx-on-brand) !important;
  -webkit-text-fill-color: var(--gx-on-brand) !important;
  box-shadow: 0 2px 8px rgba(0, 87, 168, 0.25) !important;
  padding: 9px 18px !important;
}

#app .btn--primary *,
#app .button--primary *,
#app .btn-primary *,
#app button[type="submit"] * {
  color: var(--gx-on-brand) !important;
  -webkit-text-fill-color: var(--gx-on-brand) !important;
}

#app .btn--primary:hover,
#app .button--primary:hover,
#app .btn-primary:hover,
#app button[type="submit"]:hover {
  filter: brightness(1.08);
  box-shadow: 0 4px 14px rgba(0, 87, 168, 0.32) !important;
}

#app .btn--danger, #app .btn-danger, #app .button--danger {
  background: var(--gx-danger) !important;
  border-color: var(--gx-danger) !important;
  color: var(--gx-text-inverse) !important;
}

#app .btn--success, #app .btn-success, #app .button--success {
  background: var(--gx-success) !important;
  border-color: var(--gx-success) !important;
  color: var(--gx-text-inverse) !important;
}

/* 4.5 Formularios en contenido */
#app .content input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="file"]),
#app .content textarea,
#app .content select,
#app .content .form-control,
#app .modal input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
#app .modal textarea,
#app .modal select,
#app .modal .form-control {
  background: var(--gx-input-bg) !important;
  background-color: var(--gx-input-bg) !important;
  border: 1px solid var(--gx-input-border) !important;
  border-radius: var(--gx-radius-sm) !important;
  color: var(--gx-input-text) !important;
  -webkit-text-fill-color: var(--gx-input-text) !important;
  caret-color: var(--gx-brand-2) !important;
  font-size: 14px !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

#app .content input:focus,
#app .content textarea:focus,
#app .content select:focus,
#app .content .form-control:focus,
#app .modal input:focus,
#app .modal textarea:focus {
  border-color: var(--gx-brand-2) !important;
  box-shadow: var(--gx-focus-ring) !important;
  outline: none !important;
}

#app .content input::placeholder,
#app .content textarea::placeholder,
#app .modal input::placeholder {
  color: var(--gx-placeholder) !important;
  -webkit-text-fill-color: var(--gx-placeholder) !important;
  opacity: 1 !important;
}

/* Tokens de destinatario / tags de formulario */
#app .token,
#app [class*="recipient"] .token {
  background: var(--gx-brand-soft) !important;
  border: 1px solid var(--gx-line-strong) !important;
  border-radius: 6px !important;
  color: var(--gx-text) !important;
  -webkit-text-fill-color: var(--gx-text) !important;
}

/* 4.6 Tabs */
#app [role="tablist"],
#app .nav-tabs {
  border-bottom: 2px solid var(--gx-line) !important;
  gap: 2px !important;
}

#app [role="tab"],
#app .nav-tabs .nav-link,
#app .tabs .tab {
  border-radius: var(--gx-radius-sm) var(--gx-radius-sm) 0 0 !important;
  color: var(--gx-text-3) !important;
  -webkit-text-fill-color: var(--gx-text-3) !important;
  font-weight: 600 !important;
  font-size: 13.5px !important;
  transition: color 0.13s ease, background 0.13s ease !important;
}

#app [role="tab"]:hover,
#app .tabs .tab:hover {
  color: var(--gx-text) !important;
  -webkit-text-fill-color: var(--gx-text) !important;
  background: var(--gx-hover) !important;
}

#app [role="tab"][aria-selected="true"],
#app .nav-tabs .active,
#app .nav-tabs .is-active,
#app .tabs .tab.active,
#app .tabs .tab.is-active {
  background: var(--gx-panel) !important;
  color: var(--gx-brand-strong) !important;
  -webkit-text-fill-color: var(--gx-brand-strong) !important;
  border-bottom: 2px solid var(--gx-brand) !important;
  font-weight: 700 !important;
}

#app .tabs.tabs-wide,
#app .tabs.type-tabs {
  background: var(--gx-bg) !important;
  background-color: var(--gx-bg) !important;
  color: var(--gx-text) !important;
}

/* 4.7 Dropdowns / popovers / menús (fuera de la nav) */
#app .dropdown-menu,
#app .popover,
#app [role="menu"]:not(.geimser-profile-popup),
#app [role="listbox"],
#app [class*="contextMenu"],
#app [class*="ContextMenu"] {
  background: var(--gx-panel) !important;
  background-color: var(--gx-panel) !important;
  color: var(--gx-text) !important;
  border: 1px solid var(--gx-line) !important;
  border-radius: var(--gx-radius) !important;
  box-shadow: var(--gx-shadow-md) !important;
}

#app .dropdown-menu *,
#app .popover *,
#app [role="menu"]:not(.geimser-profile-popup) *,
#app [role="listbox"] * {
  color: var(--gx-text) !important;
  background-color: transparent !important;
}

#app .dropdown-menu li:hover,
#app .dropdown-menu a:hover,
#app [role="menu"] [role="menuitem"]:hover,
#app [role="listbox"] [role="option"]:hover {
  background: var(--gx-hover) !important;
  background-color: var(--gx-hover) !important;
  color: var(--gx-link) !important;
}

#app .dropdown-menu .divider,
#app .dropdown-menu hr,
#app [role="menu"] hr {
  background: var(--gx-line) !important;
  border-color: var(--gx-line) !important;
  margin: 4px 0 !important;
}

/* 4.8 Modales */
#app .modal-content,
#app .modal-dialog,
#app .modal-body,
#app .modal-footer,
#app [role="dialog"] {
  background: var(--gx-panel) !important;
  color: var(--gx-text) !important;
  border-radius: var(--gx-radius-lg) !important;
  border-color: var(--gx-line) !important;
}

#app .modal-header {
  background: var(--gx-panel-2) !important;
  border-bottom: 1px solid var(--gx-line) !important;
  border-radius: var(--gx-radius-lg) var(--gx-radius-lg) 0 0 !important;
  color: var(--gx-text) !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  padding: 18px 22px !important;
}

#app .modal-content *,
#app .modal-body * {
  color: var(--gx-text);
}

#app .modal-content a,
#app .modal-body a {
  color: var(--gx-link) !important;
}

/* 4.9 Tooltips */
#app [class*="tooltip"],
#app [class*="Tooltip"] {
  background: var(--gx-text) !important;
  color: var(--gx-bg) !important;
  border-radius: 7px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  padding: 5px 10px !important;
  box-shadow: var(--gx-shadow-md) !important;
}

/* 4.10 Badges, tags y estados */
#app .badge,
#app [class*="badge"]:not([class*="notificationsCounter"]) {
  border-radius: 999px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  padding: 2px 8px !important;
}

#app .js-tag,
#app .tag,
#app [class*="ticketTag"] {
  background: var(--gx-brand-soft) !important;
  border: 1px solid var(--gx-line) !important;
  border-radius: 999px !important;
  color: var(--gx-brand-strong) !important;
  -webkit-text-fill-color: var(--gx-brand-strong) !important;
  font-size: 11.5px !important;
  font-weight: 650 !important;
  padding: 2px 9px !important;
}

/* 4.11 Paginación */
#app .pagination a,
#app .pagination .btn,
#app .js-pager a,
#app .js-page {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 30px !important;
  min-height: 30px !important;
  padding: 0 9px !important;
  border: 1px solid transparent !important;
  border-radius: var(--gx-radius-sm) !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  color: var(--gx-text-2) !important;
  -webkit-text-fill-color: var(--gx-text-2) !important;
  font-size: 13px !important;
  font-weight: 650 !important;
}

#app .pagination a:hover,
#app .js-page:hover {
  background: var(--gx-hover) !important;
  border-color: var(--gx-line) !important;
}

#app .pagination .active a,
#app .pagination a.active,
#app .js-page.is-selected,
#app .js-page.active {
  background: var(--gx-brand) !important;
  background-color: var(--gx-brand) !important;
  border-color: var(--gx-brand) !important;
  color: var(--gx-on-brand) !important;
  -webkit-text-fill-color: var(--gx-on-brand) !important;
}

/* 4.12 Notificaciones noty */
.noty_bar,
.noty_body,
.noty_text,
.noty_message {
  color: #ffffff !important;
  border-radius: var(--gx-radius) !important;
  text-shadow: none !important;
}

.noty_bar.noty_type__success { background-color: rgba(20, 96, 50, 0.95) !important; }
.noty_bar.noty_type__error { background-color: rgba(150, 27, 27, 0.95) !important; }
.noty_bar.noty_type__warning { background-color: rgba(116, 53, 14, 0.95) !important; }
.noty_bar.noty_type__info,
.noty_bar.noty_type__information { background-color: rgba(27, 60, 166, 0.95) !important; }

.noty_bar .icon,
.noty_bar svg { color: #ffffff !important; fill: #ffffff !important; }

/* 4.13 Avatares (marca) */
#app .avatar,
#app [class*="avatar"]:not([class*="avatarHolder"]),
#app [class*="Avatar"] {
  border-radius: 50% !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
}

#app .ticketZoom .avatar,
#app .ticketZoom .js-avatar,
#app .attributeBar .avatar,
#app .article-new .avatar {
  flex: 0 0 auto !important;
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  line-height: 1 !important;
}

#app .ticketZoom .avatar.size-50 {
  width: 50px !important;
  min-width: 50px !important;
  max-width: 50px !important;
  height: 50px !important;
  min-height: 50px !important;
  max-height: 50px !important;
}

/* 4.14 Prioridades */
#app [class*="priority-1"], #app .u-priority-1 { border-left-color: var(--gx-text-3) !important; }
#app [class*="priority-2"], #app .u-priority-2 { border-left-color: var(--gx-brand-2) !important; }
#app [class*="priority-3"], #app .u-priority-3 { border-left-color: var(--gx-accent) !important; }
#app [class*="priority-4"], #app .u-priority-4 { border-left-color: var(--gx-danger) !important; }

/* 4.15 Texto blanco heredado sobre superficies claras (correo HTML) */
html[data-theme="light"] #app .content span[style*="color: rgb(255, 255, 255)"],
html[data-theme="light"] #app .content span[style*="color: white"] {
  color: var(--gx-text) !important;
}
/* ─── 5. PÁGINAS ────────────────────────────────────────────────────────── */

/* 5.1 Dashboard */
#app .dashboard .tabs--big,
#app .content .dashboard .tabs--big {
  display: inline-flex !important;
  gap: 3px !important;
  margin: 16px auto 4px !important;
  padding: 3px !important;
  background: var(--gx-panel-3) !important;
  background-color: var(--gx-panel-3) !important;
  border: 1px solid var(--gx-line) !important;
  border-radius: var(--gx-radius) !important;
  box-shadow: none !important;
}

#app .dashboard .tabs--big .tab,
#app .content .dashboard .tabs--big .tab {
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  border-radius: var(--gx-radius-sm) !important;
  box-shadow: none !important;
  color: var(--gx-text-2) !important;
  -webkit-text-fill-color: var(--gx-text-2) !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  padding: 7px 18px !important;
}

#app .dashboard .tabs--big .tab *,
#app .content .dashboard .tabs--big .tab * {
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
}

#app .dashboard .tabs--big .tab.active,
#app .dashboard .tabs--big .tab.is-active,
#app .content .dashboard .tabs--big .tab.active,
#app .content .dashboard .tabs--big .tab.is-active {
  background: var(--gx-panel) !important;
  background-color: var(--gx-panel) !important;
  box-shadow: var(--gx-shadow-sm) !important;
  color: var(--gx-text) !important;
  -webkit-text-fill-color: var(--gx-text) !important;
  font-weight: 700 !important;
}

#app .dashboard .tabs--big .tab.active *,
#app .content .dashboard .tabs--big .tab.active *,
#app .dashboard .tabs--big .tab.is-active *,
#app .content .dashboard .tabs--big .tab.is-active * {
  color: var(--gx-text) !important;
  -webkit-text-fill-color: var(--gx-text) !important;
}

#app .dashboard [class*="stat-widget"],
#app .dashboard .box,
#app .content .card,
#app .content .panel,
#app .content .widget,
#app .content .overviewItem,
#app .content .dashboardWidget {
  background: var(--gx-panel) !important;
  border: 1px solid var(--gx-line) !important;
  border-radius: 12px !important;
  box-shadow: var(--gx-shadow-sm) !important;
  color: var(--gx-text) !important;
  transition: box-shadow 0.15s ease !important;
}

#app .dashboard [class*="stat-widget"]:hover,
#app .dashboard .box:hover {
  box-shadow: var(--gx-shadow-md) !important;
}

#app .dashboard .stat-widget .stat-title,
#app .dashboard .stat-widget h2,
#app .dashboard .stat-widget h3 {
  color: var(--gx-text-3) !important;
  font-size: 11px !important;
  font-weight: 750 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
}

#app .geimser-dashboard-inventory {
  margin: 16px 0 0 !important;
  padding: 16px !important;
  background: var(--gx-panel) !important;
  background-color: var(--gx-panel) !important;
  border: 1px solid var(--gx-line) !important;
  border-radius: var(--gx-radius-sm) !important;
  box-shadow: var(--gx-shadow-sm) !important;
  color: var(--gx-text) !important;
}

#app .geimser-dashboard-inventory-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin: 0 0 14px !important;
}

#app .geimser-dashboard-inventory-head span {
  display: block !important;
  margin: 0 0 3px !important;
  color: var(--gx-text-3) !important;
  font-size: 11px !important;
  font-weight: 750 !important;
  text-transform: uppercase !important;
}

#app .geimser-dashboard-inventory-head h2 {
  margin: 0 !important;
  color: var(--gx-text) !important;
  font-size: 18px !important;
  font-weight: 750 !important;
}

#app .geimser-dashboard-inventory-refresh,
#app .geimser-dashboard-inventory-row button {
  min-height: 34px !important;
  padding: 0 12px !important;
  background: var(--gx-brand) !important;
  background-color: var(--gx-brand) !important;
  border: 1px solid var(--gx-brand-strong) !important;
  border-radius: var(--gx-radius-sm) !important;
  color: var(--gx-on-brand) !important;
  font-size: 12px !important;
  font-weight: 750 !important;
}

#app .geimser-dashboard-inventory-stats {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin-bottom: 12px !important;
}

#app .geimser-dashboard-inventory-toolbar {
  margin: 0 0 12px !important;
}

#app .geimser-dashboard-inventory-search {
  width: 100% !important;
  min-height: 38px !important;
  padding: 0 12px !important;
  background: var(--gx-input-bg) !important;
  background-color: var(--gx-input-bg) !important;
  border: 1px solid var(--gx-input-border) !important;
  border-radius: var(--gx-radius-sm) !important;
  color: var(--gx-input-text) !important;
  font-size: 13px !important;
  outline: none !important;
}

#app .geimser-dashboard-inventory-search:focus {
  border-color: var(--gx-brand) !important;
  box-shadow: var(--gx-focus-ring) !important;
}

#app .geimser-dashboard-inventory-stats article {
  min-height: 64px !important;
  padding: 10px 12px !important;
  background: var(--gx-panel-2) !important;
  background-color: var(--gx-panel-2) !important;
  border: 1px solid var(--gx-line) !important;
  border-radius: var(--gx-radius-sm) !important;
}

#app .geimser-dashboard-inventory-stats span {
  display: block !important;
  color: var(--gx-text-3) !important;
  font-size: 11px !important;
  font-weight: 750 !important;
  text-transform: uppercase !important;
}

#app .geimser-dashboard-inventory-stats strong {
  display: block !important;
  margin-top: 5px !important;
  color: var(--gx-text) !important;
  font-size: 24px !important;
  font-weight: 800 !important;
}

#app .geimser-dashboard-inventory-list {
  display: grid !important;
  gap: 7px !important;
  max-height: 360px !important;
  overflow: auto !important;
  padding-right: 4px !important;
}

#app .geimser-dashboard-inventory-row {
  display: grid !important;
  grid-template-columns: 10px minmax(180px, 1.5fr) minmax(150px, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 54px !important;
  padding: 8px 10px !important;
  background: var(--gx-panel-2) !important;
  background-color: var(--gx-panel-2) !important;
  border: 1px solid var(--gx-line) !important;
  border-radius: var(--gx-radius-sm) !important;
}

#app .geimser-dashboard-inventory-dot {
  width: 9px !important;
  height: 9px !important;
  border-radius: 50% !important;
  background: var(--gx-danger) !important;
}

#app .geimser-dashboard-inventory-row.is-online .geimser-dashboard-inventory-dot {
  background: var(--gx-success) !important;
}

#app .geimser-dashboard-inventory-main,
#app .geimser-dashboard-inventory-meta {
  min-width: 0 !important;
}

#app .geimser-dashboard-inventory-main strong,
#app .geimser-dashboard-inventory-main small,
#app .geimser-dashboard-inventory-meta span,
#app .geimser-dashboard-inventory-meta em {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#app .geimser-dashboard-inventory-main strong {
  color: var(--gx-text) !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

#app .geimser-dashboard-inventory-main small,
#app .geimser-dashboard-inventory-meta span {
  color: var(--gx-text-3) !important;
  font-size: 12px !important;
}

#app .geimser-dashboard-inventory-meta em {
  color: var(--gx-text-2) !important;
  font-size: 11px !important;
  font-style: normal !important;
  font-weight: 750 !important;
  text-transform: uppercase !important;
}

#app .geimser-dashboard-inventory-empty {
  padding: 16px !important;
  background: var(--gx-panel-2) !important;
  background-color: var(--gx-panel-2) !important;
  border: 1px dashed var(--gx-line-strong) !important;
  border-radius: var(--gx-radius-sm) !important;
  color: var(--gx-text-2) !important;
}

#app .geimser-dashboard-inventory-empty strong,
#app .geimser-dashboard-inventory-empty span {
  display: block !important;
}

#app .geimser-dashboard-inventory-empty strong {
  color: var(--gx-text) !important;
  margin-bottom: 4px !important;
}

#app .geimser-dashboard-inventory-empty.is-error {
  border-color: var(--gx-danger) !important;
}

#app .geimser-native-inventory-hidden {
  display: none !important;
}

#app .geimser-native-inventory-panel {
  margin: 0 0 18px !important;
}

@media (max-width: 900px) {
  #app .geimser-dashboard-inventory-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #app .geimser-dashboard-inventory-row {
    grid-template-columns: 10px minmax(0, 1fr) !important;
  }

  #app .geimser-dashboard-inventory-meta,
  #app .geimser-dashboard-inventory-row button {
    grid-column: 2 !important;
  }

  #app .geimser-dashboard-inventory-row button {
    justify-self: start !important;
  }
}

/* Flujo de actividad (columna derecha del dashboard) */
#app .content.horizontal > .sidebar.optional,
#app .geimser-activity-surface {
  background: var(--gx-panel) !important;
  background-color: var(--gx-panel) !important;
  color: var(--gx-text) !important;
  border-left: 1px solid var(--gx-line) !important;
}

#app .content.horizontal > .sidebar.optional h2 {
  color: var(--gx-text) !important;
  font-size: 15px !important;
  font-weight: 750 !important;
}

#app .content.horizontal > .sidebar.optional .activity-entry,
#app .geimser-activity-surface .activity-entry {
  border-bottom: 1px solid var(--gx-line) !important;
  color: var(--gx-text) !important;
}

#app .content.horizontal > .sidebar.optional .activity-body,
#app .content.horizontal > .sidebar.optional .activity-message,
#app .content.horizontal > .sidebar.optional .activity-text {
  color: var(--gx-text) !important;
}

#app .content.horizontal > .sidebar.optional a,
#app .geimser-activity-surface a {
  color: var(--gx-link) !important;
}

#app .content.horizontal > .sidebar.optional .activity-time,
#app .content.horizontal > .sidebar.optional time,
#app .content.horizontal > .sidebar.optional small {
  color: var(--gx-text-3) !important;
}

#app .content.horizontal > .sidebar.optional .avatar,
#app .geimser-activity-surface .avatar {
  background: var(--gx-accent) !important;
  background-color: var(--gx-accent) !important;
  color: #1d1303 !important;
}

/* 5.2 Ticket zoom — encabezado fijo (vive FUERA de .ticketZoom) */
#app .scrollPageHeader {
  background: var(--gx-panel) !important;
  background-color: var(--gx-panel) !important;
  border-bottom: 1px solid var(--gx-line) !important;
  color: var(--gx-text) !important;
  box-shadow: var(--gx-shadow-sm) !important;
}

#app .scrollPageHeader *,
#app.geimser-route-ticket .ticketZoom .scrollPageHeader * {
  color: var(--gx-text-2) !important;
  -webkit-text-fill-color: var(--gx-text-2) !important;
  text-shadow: none !important;
}

#app .scrollPageHeader .ticket-title-update,
#app .scrollPageHeader .js-objectTitle,
#app.geimser-route-ticket .ticketZoom .ticket-title-update,
#app.geimser-route-ticket .ticketZoom .js-objectTitle {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--gx-text) !important;
  -webkit-text-fill-color: var(--gx-text) !important;
  font-size: 17px !important;
  font-weight: 750 !important;
  letter-spacing: -0.01em !important;
}

#app .scrollPageHeader .btn,
#app .scrollPageHeader [role="button"] {
  background: var(--gx-panel) !important;
  background-color: var(--gx-panel) !important;
  border: 1px solid var(--gx-line-strong) !important;
  border-radius: var(--gx-radius-sm) !important;
  box-shadow: none !important;
}

#app .scrollPageHeader .btn:hover,
#app .scrollPageHeader [role="button"]:hover {
  background: var(--gx-hover) !important;
  background-color: var(--gx-hover) !important;
}

/* 5.3 Ticket zoom — artículos y compositor (gana al bloque funcional por orden) */
#app.geimser-route-ticket .ticketZoom .ticket-article,
#app.geimser-route-ticket .ticketZoom .article-new {
  background: var(--gx-panel) !important;
  background-color: var(--gx-panel) !important;
  border: 1px solid var(--gx-line) !important;
  box-shadow: var(--gx-shadow-sm) !important;
}

#app.geimser-route-ticket .ticketZoom .ticket-article,
#app.geimser-route-ticket .ticketZoom .ticket-article *,
#app.geimser-route-ticket .ticketZoom .article-content,
#app.geimser-route-ticket .ticketZoom .article-content *,
#app.geimser-route-ticket .ticketZoom .textBubble,
#app.geimser-route-ticket .ticketZoom .textBubble * {
  color: var(--gx-text) !important;
  -webkit-text-fill-color: var(--gx-text) !important;
  text-shadow: none !important;
}

#app.geimser-route-ticket .ticketZoom .ticket-article a,
#app.geimser-route-ticket .ticketZoom .article-content a {
  color: var(--gx-link) !important;
  -webkit-text-fill-color: var(--gx-link) !important;
}

#app.geimser-route-ticket .ticketZoom .ticket-article .text-muted,
#app.geimser-route-ticket .ticketZoom .ticket-article [class*="muted"],
#app.geimser-route-ticket .ticketZoom .ticket-article time,
#app.geimser-route-ticket .ticketZoom .article-meta,
#app.geimser-route-ticket .ticketZoom .article-meta * {
  color: var(--gx-text-3) !important;
  -webkit-text-fill-color: var(--gx-text-3) !important;
}

#app.geimser-route-ticket .ticketZoom .js-writeArea,
#app.geimser-route-ticket .ticketZoom .textBubble.js-writeArea {
  background: var(--gx-panel) !important;
  background-color: var(--gx-panel) !important;
  color: var(--gx-input-text) !important;
}

#app.geimser-route-ticket .ticketZoom .js-writeArea [contenteditable="true"],
#app.geimser-route-ticket .ticketZoom .js-writeArea .articleNewEdit-body,
#app.geimser-route-ticket .ticketZoom .js-writeArea .js-textarea.richtext-content {
  background: var(--gx-panel) !important;
  background-color: var(--gx-panel) !important;
  color: var(--gx-input-text) !important;
  -webkit-text-fill-color: var(--gx-input-text) !important;
  caret-color: var(--gx-brand-2) !important;
}

#app.geimser-route-ticket .ticketZoom .js-writeArea [contenteditable="true"] *,
#app.geimser-route-ticket .ticketZoom .js-writeArea .richtext-content * {
  color: var(--gx-input-text) !important;
  -webkit-text-fill-color: var(--gx-input-text) !important;
}

#app.geimser-route-ticket .ticketZoom .js-writeArea [contenteditable="true"]:empty::before,
#app.geimser-route-ticket .ticketZoom .js-writeArea [contenteditable="true"][data-placeholder]::before {
  color: var(--gx-placeholder) !important;
  -webkit-text-fill-color: var(--gx-placeholder) !important;
}

#app.geimser-route-ticket .ticketZoom .article-new .editControls,
#app.geimser-route-ticket .ticketZoom .js-writeArea .article-attachment {
  background: var(--gx-panel-2) !important;
  background-color: var(--gx-panel-2) !important;
  border-color: var(--gx-line) !important;
  color: var(--gx-text-2) !important;
}

#app.geimser-route-ticket .ticketZoom .article-new label,
#app.geimser-route-ticket .ticketZoom .article-new .formGroup-label,
#app.geimser-route-ticket .ticketZoom .attachmentPlaceholder-label,
#app.geimser-route-ticket .ticketZoom .attachmentPlaceholder-hint {
  color: var(--gx-text-2) !important;
  -webkit-text-fill-color: var(--gx-text-2) !important;
}

#app.geimser-route-ticket .ticketZoom .article-actions .article-action-name {
  color: var(--gx-text-2) !important;
  -webkit-text-fill-color: var(--gx-text-2) !important;
}

/* 5.4 Ticket zoom — sidebar de atributos */
#app.geimser-route-ticket .tabsSidebar,
#app.geimser-route-ticket .tabsSidebar > .sidebar,
#app.geimser-route-ticket .tabsSidebar .sidebar.bottom-form-shadow {
  background: var(--gx-panel) !important;
  background-color: var(--gx-panel) !important;
  backdrop-filter: none !important;
  border-left: 1px solid var(--gx-line) !important;
  color: var(--gx-text) !important;
}

#app.geimser-route-ticket .tabsSidebar .sidebar-header,
#app.geimser-route-ticket .tabsSidebar > .sidebar .sidebar-header {
  background: var(--gx-panel) !important;
  background-color: var(--gx-panel) !important;
  border-bottom: 1px solid var(--gx-line) !important;
  color: var(--gx-text) !important;
}

#app.geimser-route-ticket .tabsSidebar .sidebar-header-headline,
#app.geimser-route-ticket .tabsSidebar .sidebar-header-headline *,
#app.geimser-route-ticket .tabsSidebar .sidebar-header-actions,
#app.geimser-route-ticket .tabsSidebar .sidebar-header-actions *,
#app.geimser-route-ticket .tabsSidebar .tabsSidebar-close,
#app.geimser-route-ticket .tabsSidebar .tabsSidebar-close * {
  color: var(--gx-text-2) !important;
  -webkit-text-fill-color: var(--gx-text-2) !important;
}

#app.geimser-route-ticket .tabsSidebar .formGroup-label,
#app.geimser-route-ticket .tabsSidebar .formGroup-label *,
#app.geimser-route-ticket .tabsSidebar label,
#app.geimser-route-ticket .tabsSidebar label *,
#app.geimser-route-ticket .tabsSidebar .text-muted,
#app.geimser-route-ticket .tabsSidebar .js-tags a,
#app.geimser-route-ticket .tabsSidebar .sidebar-header-headline {
  color: var(--gx-text-2) !important;
  -webkit-text-fill-color: var(--gx-text-2) !important;
}

#app.geimser-route-ticket .tabsSidebar input,
#app.geimser-route-ticket .tabsSidebar select,
#app.geimser-route-ticket .tabsSidebar textarea,
#app.geimser-route-ticket .tabsSidebar .form-control {
  background: var(--gx-input-bg) !important;
  background-color: var(--gx-input-bg) !important;
  border: 1px solid var(--gx-input-border) !important;
  border-radius: var(--gx-radius-sm) !important;
  color: var(--gx-input-text) !important;
  -webkit-text-fill-color: var(--gx-input-text) !important;
}

/* Rail de pestañas del sidebar de ticket */
#app.geimser-route-ticket .tabsSidebar-tab {
  background: var(--gx-panel-3) !important;
  background-color: var(--gx-panel-3) !important;
  border-color: var(--gx-line) !important;
  color: var(--gx-text-2) !important;
  -webkit-text-fill-color: var(--gx-text-2) !important;
}

#app.geimser-route-ticket .tabsSidebar-tab *,
#app.geimser-route-ticket .tabsSidebar-tab svg,
#app.geimser-route-ticket .tabsSidebar-tab svg use,
#app.geimser-route-ticket .tabsSidebar-tab svg path {
  color: var(--gx-text-2) !important;
  fill: currentColor !important;
  stroke: currentColor !important;
  -webkit-text-fill-color: var(--gx-text-2) !important;
}

#app.geimser-route-ticket .tabsSidebar-tab:hover {
  background: var(--gx-hover) !important;
  background-color: var(--gx-hover) !important;
}

#app.geimser-route-ticket .tabsSidebar-tab.active,
#app.geimser-route-ticket .tabsSidebar-tab.is-active {
  background: var(--gx-brand) !important;
  background-color: var(--gx-brand) !important;
}

#app.geimser-route-ticket .tabsSidebar-tab.active *,
#app.geimser-route-ticket .tabsSidebar-tab.is-active * {
  color: var(--gx-on-brand) !important;
  -webkit-text-fill-color: var(--gx-on-brand) !important;
}

#app.geimser-route-ticket .tabsSidebar-tab .badge,
#app.geimser-route-ticket .tabsSidebar-tab .tabsSidebar-tab-count {
  background: var(--gx-panel) !important;
  background-color: var(--gx-panel) !important;
  color: var(--gx-text) !important;
  -webkit-text-fill-color: var(--gx-text) !important;
}

/* Barra de atributos inferior */
#app.geimser-route-ticket .attributeBar {
  background: var(--gx-panel) !important;
  background-color: var(--gx-panel) !important;
  border-top: 1px solid var(--gx-line) !important;
  box-shadow: var(--gx-shadow-md) !important;
  color: var(--gx-text-2) !important;
}

#app.geimser-route-ticket .attributeBar *,
#app.geimser-route-ticket .attributeBar .btn {
  color: var(--gx-text-2) !important;
  -webkit-text-fill-color: var(--gx-text-2) !important;
}

#app.geimser-route-ticket .attributeBar .js-submit,
#app.geimser-route-ticket .attributeBar .btn--primary,
#app.geimser-route-ticket .attributeBar button[type="submit"],
#app.geimser-route-ticket .attributeBar .btn--primary *,
#app.geimser-route-ticket .attributeBar button[type="submit"] * {
  background: linear-gradient(160deg, var(--gx-brand-2) 0%, var(--gx-brand) 100%) !important;
  background-color: var(--gx-brand) !important;
  border: 0 !important;
  border-radius: var(--gx-radius-sm) !important;
  color: var(--gx-on-brand) !important;
  -webkit-text-fill-color: var(--gx-on-brand) !important;
  min-height: 40px !important;
}

#app.geimser-route-ticket .geimser-ticket-remote-action {
  background: linear-gradient(160deg, var(--gx-brand-2) 0%, var(--gx-brand) 100%) !important;
  background-color: var(--gx-brand) !important;
  border: 0 !important;
  border-radius: var(--gx-radius-sm) !important;
  color: var(--gx-on-brand) !important;
  -webkit-text-fill-color: var(--gx-on-brand) !important;
}

/* 5.5 Ticket create */
#app.geimser-route-ticket-create form,
#app.geimser-route-ticket-create fieldset,
#app.geimser-route-ticket-create [class*="ticketCreate"],
#app.geimser-route-ticket-create [class*="TicketCreate"] {
  background: var(--gx-panel) !important;
  background-color: var(--gx-panel) !important;
  color: var(--gx-text) !important;
}

#app.geimser-route-ticket-create label,
#app.geimser-route-ticket-create legend,
#app.geimser-route-ticket-create [class*="label"] {
  color: var(--gx-text-2) !important;
}

#app.geimser-route-ticket-create .sidebar:not(.geimser-nav-surface),
#app.geimser-route-ticket-create aside:not(.geimser-nav-surface) {
  background: var(--gx-panel-2) !important;
  background-color: var(--gx-panel-2) !important;
  border-left: 1px solid var(--gx-line) !important;
  color: var(--gx-text) !important;
}

#app.geimser-route-ticket-create .sidebar:not(.geimser-nav-surface) *,
#app.geimser-route-ticket-create aside:not(.geimser-nav-surface) * {
  color: var(--gx-text-2) !important;
}

/* 5.6 Admin */
#app .sidebar.NavBarAdmin {
  background: var(--gx-panel) !important;
  background-color: var(--gx-panel) !important;
  border-right: 1px solid var(--gx-line) !important;
}

#app .sidebar.NavBarAdmin,
#app .sidebar.NavBarAdmin a,
#app .sidebar.NavBarAdmin a *,
#app .sidebar.NavBarAdmin li,
#app .sidebar.NavBarAdmin span,
#app .sidebar.NavBarAdmin div,
#app .sidebar.NavBarAdmin .link {
  color: var(--gx-text-2) !important;
  -webkit-text-fill-color: var(--gx-text-2) !important;
  text-shadow: none !important;
}

#app .sidebar.NavBarAdmin h1,
#app .sidebar.NavBarAdmin h2,
#app .sidebar.NavBarAdmin h3,
#app .sidebar.NavBarAdmin h4,
#app .sidebar.NavBarAdmin .menu-header {
  color: var(--gx-text-3) !important;
  -webkit-text-fill-color: var(--gx-text-3) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0.07em !important;
  text-transform: uppercase !important;
}

#app .sidebar.NavBarAdmin a {
  border-radius: var(--gx-radius-sm) !important;
  font-size: 13.5px !important;
  font-weight: 550 !important;
}

#app .sidebar.NavBarAdmin a:hover,
#app .sidebar.NavBarAdmin li:hover > a {
  background: var(--gx-hover) !important;
  background-color: var(--gx-hover) !important;
  color: var(--gx-text) !important;
  -webkit-text-fill-color: var(--gx-text) !important;
}

#app .sidebar.NavBarAdmin .active,
#app .sidebar.NavBarAdmin .is-active,
#app .sidebar.NavBarAdmin .active a,
#app .sidebar.NavBarAdmin .is-active a,
#app .sidebar.NavBarAdmin .active a *,
#app .sidebar.NavBarAdmin .is-active a *,
#app.geimser-route-cmdb .sidebar.NavBarAdmin .active a,
#app.geimser-route-cmdb .sidebar.NavBarAdmin .is-active a {
  background: var(--gx-brand-soft) !important;
  background-color: var(--gx-brand-soft) !important;
  color: var(--gx-brand-strong) !important;
  -webkit-text-fill-color: var(--gx-brand-strong) !important;
  font-weight: 700 !important;
}

#app.geimser-route-cmdb .sidebar.NavBarAdmin,
#app.geimser-route-cmdb .sidebar.NavBarAdmin *:not(.geimser-admin-focus-toggle) {
  color: var(--gx-text-2) !important;
  -webkit-text-fill-color: var(--gx-text-2) !important;
}

#app.geimser-route-cmdb .geimser-admin-focus-panel {
  border-bottom: 1px solid var(--gx-line) !important;
}

#app.geimser-route-cmdb .geimser-admin-focus-panel strong {
  color: var(--gx-text) !important;
  -webkit-text-fill-color: var(--gx-text) !important;
}

#app.geimser-route-cmdb .geimser-admin-focus-toggle {
  background: var(--gx-panel-2) !important;
  background-color: var(--gx-panel-2) !important;
  border: 1px solid var(--gx-line-strong) !important;
  color: var(--gx-text-2) !important;
  -webkit-text-fill-color: var(--gx-text-2) !important;
}

#app.geimser-route-cmdb .geimser-admin-focus-toggle:hover {
  background: var(--gx-brand-soft) !important;
  color: var(--gx-brand-strong) !important;
  -webkit-text-fill-color: var(--gx-brand-strong) !important;
}

/* 5.7 Perfil / detalle de usuario */
#app.geimser-route-profile .content,
#app.geimser-route-profile .main,
#app.geimser-route-profile .page {
  background: var(--gx-bg) !important;
  background-color: var(--gx-bg) !important;
  color: var(--gx-text) !important;
}

#app .geimser-user-detail-surface,
#app.geimser-route-profile .geimser-user-detail-surface {
  background: var(--gx-panel) !important;
  background-color: var(--gx-panel) !important;
  color: var(--gx-text) !important;
  border: 1px solid var(--gx-line) !important;
  border-radius: var(--gx-radius) !important;
  box-shadow: var(--gx-shadow-md) !important;
  text-shadow: none !important;
}

#app .geimser-user-detail-surface div,
#app .geimser-user-detail-surface section,
#app .geimser-user-detail-surface article,
#app .geimser-user-detail-surface header,
#app .geimser-user-detail-surface footer,
#app .geimser-user-detail-surface aside {
  background-color: transparent !important;
  background-image: none !important;
  color: var(--gx-text) !important;
  -webkit-text-fill-color: var(--gx-text) !important;
  text-shadow: none !important;
}

#app .geimser-user-detail-surface small,
#app .geimser-user-detail-surface time,
#app .geimser-user-detail-surface label,
#app .geimser-user-detail-surface [class*="muted"],
#app .geimser-user-detail-surface [class*="meta"] {
  color: var(--gx-text-3) !important;
  -webkit-text-fill-color: var(--gx-text-3) !important;
}

#app .geimser-user-detail-surface a,
#app.geimser-route-profile .content a {
  color: var(--gx-link) !important;
  -webkit-text-fill-color: var(--gx-link) !important;
}

#app .geimser-user-detail-surface .avatar,
#app .geimser-user-detail-surface [class*="avatar"],
#app.geimser-route-profile .content .avatar {
  align-items: center !important;
  background: var(--gx-accent) !important;
  background-color: var(--gx-accent) !important;
  border-radius: 50% !important;
  color: #1d1303 !important;
  -webkit-text-fill-color: #1d1303 !important;
  display: inline-flex !important;
  font-weight: 800 !important;
  height: 64px !important;
  justify-content: center !important;
  max-height: 64px !important;
  max-width: 64px !important;
  min-height: 64px !important;
  min-width: 64px !important;
  overflow: hidden !important;
  width: 64px !important;
}

/* 5.8 Overlay de búsqueda global */
#app [class*="searchOverlay"],
#app [class*="globalSearch"] {
  background: rgba(8, 12, 20, 0.66) !important;
  backdrop-filter: blur(8px) !important;
}

#app [class*="searchOverlay"] [class*="results"],
#app [class*="globalSearch"] [class*="results"] {
  background: var(--gx-panel) !important;
  border-radius: var(--gx-radius-lg) !important;
  box-shadow: var(--gx-shadow-lg) !important;
  color: var(--gx-text) !important;
}

#app [class*="searchOverlay"] [class*="results"] *,
#app [class*="globalSearch"] [class*="results"] * {
  color: var(--gx-text) !important;
}

/* ─── 6. LOGIN (re-skin con tokens; layout en bloque funcional) ─────────── */
.hero-unit {
  background: var(--gx-panel) !important;
  border: 1px solid var(--gx-line) !important;
  border-radius: 16px !important;
  box-shadow: var(--gx-shadow-lg) !important;
  color: var(--gx-text) !important;
}

.hero-unit label,
.hero-unit .formGroup-label {
  color: var(--gx-text-3) !important;
}

.hero-unit input.form-control,
.hero-unit .form-control {
  background: var(--gx-input-bg) !important;
  background-color: var(--gx-input-bg) !important;
  border: 1px solid var(--gx-input-border) !important;
  border-radius: var(--gx-radius) !important;
  color: var(--gx-input-text) !important;
}

.hero-unit input.form-control:focus,
.hero-unit .form-control:focus {
  border-color: var(--gx-brand-2) !important;
  box-shadow: var(--gx-focus-ring) !important;
}

.hero-unit button[type="submit"] {
  background: linear-gradient(160deg, var(--gx-brand-2) 0%, var(--gx-brand) 100%) !important;
  border: 0 !important;
  border-radius: var(--gx-radius) !important;
  color: var(--gx-on-brand) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}

.hero-unit a {
  color: var(--gx-link) !important;
}

.splash,
html:has(.hero-unit),
body:has(.hero-unit),
.login.fullscreen {
  background: var(--gx-bg) !important;
}

body:has(.hero-unit) .message,
body:has(.hero-unit) [class*="message"],
body:has(.hero-unit) [class*="alert"] {
  background: var(--gx-panel) !important;
  border: 1px solid var(--gx-warning) !important;
  color: var(--gx-text) !important;
}

/* ─── 7. ADAPTACIÓN OSCURA DE BLOQUES FUNCIONALES HEREDADOS ─────────────
   Los widgets remoto/CMDB heredan estilos claros; aquí se conmutan. */
html[data-theme="dark"] .geimser-remote-panel,
html[data-theme="dark"] .geimser-remote-workflow,
html[data-theme="dark"] .geimser-remote-frame-shell {
  background: var(--gx-panel) !important;
  color: var(--gx-text) !important;
}

html[data-theme="dark"] .geimser-remote-body,
html[data-theme="dark"] .geimser-remote-assets,
html[data-theme="dark"] .geimser-remote-install {
  background: var(--gx-bg) !important;
  color: var(--gx-text) !important;
}

html[data-theme="dark"] .geimser-remote-flow,
html[data-theme="dark"] .geimser-remote-install-card,
html[data-theme="dark"] .geimser-remote-asset,
html[data-theme="dark"] .geimser-remote-empty,
html[data-theme="dark"] .geimser-cmdb-stats article,
html[data-theme="dark"] .geimser-cmdb-table,
html[data-theme="dark"] .geimser-cmdb-detail,
html[data-theme="dark"] .geimser-cmdb-empty,
html[data-theme="dark"] .geimser-native-cmdb-settings,
html[data-theme="dark"] .geimser-native-cmdb-logs {
  background: var(--gx-panel) !important;
  border-color: var(--gx-line) !important;
  color: var(--gx-text) !important;
  box-shadow: var(--gx-shadow-sm) !important;
}

html[data-theme="dark"] .geimser-remote-flow strong,
html[data-theme="dark"] .geimser-remote-install-card strong,
html[data-theme="dark"] .geimser-remote-asset strong,
html[data-theme="dark"] .geimser-cmdb-stats strong,
html[data-theme="dark"] .geimser-cmdb-row strong,
html[data-theme="dark"] .geimser-cmdb-detail-head strong,
html[data-theme="dark"] .geimser-cmdb-detail-grid strong,
html[data-theme="dark"] .geimser-cmdb-empty strong,
html[data-theme="dark"] .geimser-remote-empty strong {
  color: var(--gx-text) !important;
}

html[data-theme="dark"] .geimser-remote-flow small,
html[data-theme="dark"] .geimser-remote-install-card span,
html[data-theme="dark"] .geimser-remote-asset span,
html[data-theme="dark"] .geimser-cmdb-stats span,
html[data-theme="dark"] .geimser-cmdb-row,
html[data-theme="dark"] .geimser-cmdb-row small,
html[data-theme="dark"] .geimser-cmdb-detail-head span,
html[data-theme="dark"] .geimser-cmdb-detail-grid span,
html[data-theme="dark"] .geimser-cmdb-empty span,
html[data-theme="dark"] .geimser-remote-empty span,
html[data-theme="dark"] .geimser-remote-install-steps {
  color: var(--gx-text-2) !important;
}

html[data-theme="dark"] .geimser-cmdb-row {
  border-top-color: var(--gx-line) !important;
}

html[data-theme="dark"] .geimser-cmdb-row-head,
html[data-theme="dark"] .geimser-cmdb-detail-head,
html[data-theme="dark"] .geimser-native-cmdb-settings::before,
html[data-theme="dark"] .geimser-native-cmdb-logs::before,
html[data-theme="dark"] .geimser-native-cmdb-settings th {
  background: var(--gx-panel-2) !important;
  color: var(--gx-text-3) !important;
  border-color: var(--gx-line) !important;
}

html[data-theme="dark"] .geimser-cmdb-row em,
html[data-theme="dark"] .geimser-remote-asset-actions em {
  background: var(--gx-panel-3) !important;
  color: var(--gx-text-2) !important;
}

html[data-theme="dark"] .geimser-cmdb-row em.is-online,
html[data-theme="dark"] .geimser-remote-asset.is-online .geimser-remote-asset-actions em {
  background: var(--gx-success-soft) !important;
  color: var(--gx-success) !important;
}

html[data-theme="dark"] .geimser-remote-banner {
  background: var(--gx-warning-soft) !important;
  border-color: var(--gx-line) !important;
  color: var(--gx-text) !important;
}

html[data-theme="dark"] .geimser-remote-banner strong { color: var(--gx-text) !important; }
html[data-theme="dark"] .geimser-remote-banner span { color: var(--gx-text-2) !important; }

html[data-theme="dark"] .geimser-remote-note { background: var(--gx-success-soft) !important; border-color: var(--gx-line) !important; color: var(--gx-text-2) !important; }
html[data-theme="dark"] .geimser-remote-install-help { background: var(--gx-brand-soft) !important; border-color: var(--gx-line) !important; color: var(--gx-text-2) !important; }

html[data-theme="dark"] .geimser-native-cmdb-settings td,
html[data-theme="dark"] .geimser-native-cmdb-logs {
  color: var(--gx-text-2) !important;
  border-color: var(--gx-line) !important;
}

html[data-theme="dark"] .geimser-native-cmdb-settings input,
html[data-theme="dark"] .geimser-native-cmdb-settings select {
  background: var(--gx-input-bg) !important;
  border-color: var(--gx-input-border) !important;
  color: var(--gx-input-text) !important;
}

html[data-theme="dark"] .geimser-remote-install-actions button,
html[data-theme="dark"] .geimser-remote-install-actions a:not(.is-primary),
html[data-theme="dark"] .geimser-remote-empty-actions button,
html[data-theme="dark"] .geimser-remote-empty-actions a + a,
html[data-theme="dark"] .geimser-cmdb-row-actions button:first-child {
  background: var(--gx-panel-2) !important;
  border-color: var(--gx-line-strong) !important;
  color: var(--gx-link) !important;
}

html[data-theme="dark"] .geimser-native-cmdb-assets {
  background: var(--gx-panel) !important;
  border-color: var(--gx-line) !important;
}

/* ─── 8. RESPONSIVE ─────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .geimser-sidebar-shortcuts.is-fixed {
    position: static !important;
    width: 100% !important;
    max-width: none !important;
  }
}

/* ─── 9. PULIDO QA PRODUCCIÓN ───────────────────────────────────────────── */
/* Degradado "ver más" de artículos truncados: era blanco fijo de Zammad y
   en oscuro lavaba el texto. Ahora desvanece hacia el panel del tema. */
#app .ticketZoom .textBubble-overflowContainer,
#app .ticketZoom .textBubble .js-toggleFold,
#app .ticketZoom [class*="overflowContainer"] {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--gx-panel) 80%) !important;
  color: var(--gx-link) !important;
}

#app .ticketZoom .textBubble-overflowContainer .btn,
#app .ticketZoom [class*="overflowContainer"] .btn {
  background: var(--gx-panel-2) !important;
  background-color: var(--gx-panel-2) !important;
  border: 1px solid var(--gx-line-strong) !important;
  color: var(--gx-text-2) !important;
  -webkit-text-fill-color: var(--gx-text-2) !important;
}

/* Cuerpo de artículos: el contenido enriquecido siempre sobre el panel
   del tema con texto del tema (incluye richtext de lectura). */
#app.geimser-route-ticket .ticketZoom .ticket-article .textBubble,
#app.geimser-route-ticket .ticketZoom .ticket-article .richtext-content,
#app.geimser-route-ticket .ticketZoom .ticket-article .article-body {
  background: var(--gx-panel) !important;
  background-color: var(--gx-panel) !important;
  color: var(--gx-text) !important;
  -webkit-text-fill-color: var(--gx-text) !important;
}

/* NOTA: antes había aquí una lista de tags (richtext-content p/div/span/pre,
   article-body p/div/span/pre) repitiendo el mismo color. Es 100%
   redundante con ".ticket-article *" más arriba (sección 5.3), que ya
   cubre cualquier descendiente sin importar el tag — exactamente el patrón
   de parche-sobre-parche que generaba ruido sin cambiar nada en pantalla.
   El contraste real contra contenido externo (HTML de correos con sus
   propios estilos inline, a veces con !important) lo resuelve ahora
   normalizeArticleContentContrast() en geimser.js. */

/* Avatares generados por Zammad (color por usuario): asegurar texto legible */
#app .avatar.user-popover,
#app .ticketZoom .avatar {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35) !important;
}

/* Headline del sidebar de ticket ("Ticket") con jerarquía clara */
#app.geimser-route-ticket .tabsSidebar .sidebar-header-headline,
#app.geimser-route-ticket .tabsSidebar .sidebar-header-headline.js-headline {
  color: var(--gx-text) !important;
  -webkit-text-fill-color: var(--gx-text) !important;
  font-size: 15px !important;
  font-weight: 750 !important;
}

/* ─── 10. FLUJO DE ACTIVIDAD — tematizado (anula el lock heredado) ──────
   El bloque funcional heredado fija #ffffff con especificidad (1,5,0);
   aquí se replican sus selectores con tokens para que el panel siga el
   tema activo. Mismo peso, posterior en el archivo → gana. */
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional .activity-entries,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional .activity-entry,
#app.geimser-route-profile .activity-stream,
#app.geimser-route-profile .activityStream,
#app.geimser-route-profile .activity-list,
#app.geimser-route-activity-flow .geimser-activity-surface,
#app .geimser-activity-surface,
#app .geimser-activity-surface article,
#app .geimser-activity-surface li,
#app .geimser-activity-surface [class*="item"] {
  background: var(--gx-panel) !important;
  background-color: var(--gx-panel) !important;
  color: var(--gx-text) !important;
}

#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional .activity-entry,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional li[class*="activity"] {
  border-bottom: 1px solid var(--gx-line) !important;
}

#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional h1,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional h2,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional h3,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional p,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional span,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional div,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional .activity-body,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional .activity-message,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional .activity-text,
#app .geimser-activity-surface .activity-body,
#app .geimser-activity-surface .activity-message,
#app .geimser-activity-surface .activity-text {
  color: var(--gx-text) !important;
  -webkit-text-fill-color: var(--gx-text) !important;
}

#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional a,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional .link,
#app .geimser-activity-surface a,
#app .geimser-activity-surface .link,
#app .geimser-activity-surface .activity-body a,
#app .geimser-activity-surface .activity-message a,
#app .geimser-activity-surface .activity-text a {
  color: var(--gx-link) !important;
  -webkit-text-fill-color: var(--gx-link) !important;
  font-weight: 650 !important;
}

#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional small,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional time,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional [class*="meta"],
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional [class*="time"],
#app .geimser-activity-surface small,
#app .geimser-activity-surface time,
#app .geimser-activity-surface .activity-time,
#app .geimser-activity-surface .humanTimeFromNow.activity-time,
#app .geimser-activity-surface [class*="meta"],
#app .geimser-activity-surface [class*="time"] {
  color: var(--gx-text-3) !important;
  -webkit-text-fill-color: var(--gx-text-3) !important;
}

#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional .avatar,
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional [class*="avatar"],
#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional .activity-avatar .avatar,
#app .geimser-activity-surface .avatar,
#app .geimser-activity-surface [class*="avatar"] {
  background: var(--gx-accent) !important;
  background-color: var(--gx-accent) !important;
  color: #1d1303 !important;
  -webkit-text-fill-color: #1d1303 !important;
  text-shadow: none !important;
}

#app.geimser-route-activity-flow .content.horizontal > .sidebar.optional .activity-avatar {
  background: transparent !important;
  background-color: transparent !important;
}

/* ─── 11. CMDB — selección y hover de filas tematizados ─────────────────
   El bloque heredado fijaba #eef6ff en .is-selected: ilegible en oscuro. */
.geimser-cmdb-row:hover {
  background: var(--gx-row-hover) !important;
  background-color: var(--gx-row-hover) !important;
}

.geimser-cmdb-row.is-selected {
  background: var(--gx-brand-soft) !important;
  background-color: var(--gx-brand-soft) !important;
  box-shadow: inset 3px 0 0 var(--gx-accent) !important;
}

.geimser-cmdb-row.is-selected,
.geimser-cmdb-row.is-selected strong,
.geimser-cmdb-row.is-selected small {
  color: var(--gx-text) !important;
  -webkit-text-fill-color: var(--gx-text) !important;
}

html[data-theme="dark"] .geimser-cmdb-row.is-selected small {
  color: var(--gx-text-2) !important;
  -webkit-text-fill-color: var(--gx-text-2) !important;
}

/* Botones de fila CMDB coherentes en ambos temas */
.geimser-cmdb-row button {
  background: var(--gx-brand) !important;
  border: 0 !important;
  border-radius: var(--gx-radius-sm) !important;
  color: var(--gx-on-brand) !important;
  -webkit-text-fill-color: var(--gx-on-brand) !important;
}

.geimser-cmdb-row-actions button:first-child {
  background: var(--gx-panel-2) !important;
  border: 1px solid var(--gx-line-strong) !important;
  color: var(--gx-link) !important;
  -webkit-text-fill-color: var(--gx-link) !important;
}

/* ─── 12. MENÚ DE ACCIONES EN TABLAS — no clipear dropdowns ─────────────
   El overflow:hidden que redondeaba esquinas recortaba el menú de los
   3 puntos. Las esquinas se redondean por celda y el overflow se libera. */
#app .content table,
#app .content .table,
#app .table-overview,
#app .content .page-content {
  overflow: visible !important;
}

#app .content table thead th:first-child,
#app .content .table thead th:first-child {
  border-top-left-radius: var(--gx-radius) !important;
}

#app .content table thead th:last-child,
#app .content .table thead th:last-child {
  border-top-right-radius: var(--gx-radius) !important;
}

#app .content table tbody tr:last-child td:first-child,
#app .content .table tbody tr:last-child td:first-child {
  border-bottom-left-radius: var(--gx-radius) !important;
}

#app .content table tbody tr:last-child td:last-child,
#app .content .table tbody tr:last-child td:last-child {
  border-bottom-right-radius: var(--gx-radius) !important;
}

/* El menú contextual de acciones siempre por encima de la tabla */
#app .content table .dropdown-menu,
#app .content .table .dropdown-menu,
#app .table-overview .dropdown-menu,
#app .content td .dropdown-menu,
#app .content [class*="action"] .dropdown-menu {
  z-index: 1100 !important;
}

/* --- Custom Login Styling to match Screenshot --- */

.login.fullscreen {
  background-color: #0f1522 !important;
  background-image: none !important;
}

.login.fullscreen .fullscreen-body > p {
  display: none !important;
}

.login.fullscreen .js-maintenanceLogin {
  background: transparent !important;
  border: 1px solid #e19535 !important;
  border-radius: 12px !important;
  color: #ffffff !important;
  padding: 24px !important;
  text-align: left !important;
  box-shadow: none !important;
}

.login.fullscreen .hero-unit:not(.js-maintenanceLogin) {
  background-color: #1a2235 !important;
  border: none !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5) !important;
  padding: 40px !important;
}

.login.fullscreen .hero-unit .form-group label,
.login.fullscreen .hero-unit .checkbox-replacement .label-text {
  color: #a0aec0 !important;
  font-weight: 500 !important;
}

.login.fullscreen .hero-unit input.form-control {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 1px solid #6fb8ff !important;
  border-radius: 8px !important;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  caret-color: #0f172a !important;
  color-scheme: light;
  padding: 10px 12px !important;
}

.login.fullscreen .hero-unit input.form-control::placeholder {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
}

.login.fullscreen .hero-unit input.form-control:focus {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border-color: #50a0f0 !important;
  box-shadow: 0 0 0 4px rgba(80, 160, 240, 0.22) !important;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
}

.login.fullscreen .hero-unit input.form-control:-webkit-autofill,
.login.fullscreen .hero-unit input.form-control:-webkit-autofill:hover,
.login.fullscreen .hero-unit input.form-control:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
  -webkit-text-fill-color: #0f172a !important;
  caret-color: #0f172a !important;
}

.login.fullscreen .hero-unit button[type="submit"] {
  background: #50a0f0 !important;
  color: #000000 !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  border: none !important;
  padding: 12px !important;
  height: auto !important;
  margin-top: 15px !important;
}

.login.fullscreen .hero-unit a {
  color: #50a0f0 !important;
  font-weight: bold !important;
}

.login.fullscreen .poweredBy {
  display: none !important;
}

/* --- Secretos Seguros --- */
#geimser-secrets-container.geimser-secrets-container {
  position: absolute;
  inset: 0;
  z-index: 998;
  overflow: auto;
  background: var(--gx-bg);
  color: var(--gx-text);
}

.geimser-secrets-page {
  min-height: 100%;
  padding: 28px;
  display: grid;
  gap: 18px;
  font-family: "BentonSans-Regular", "Benton Sans", "Helvetica Neue", Arial, Helvetica, sans-serif;
}

.geimser-secrets-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--gx-line);
}

.geimser-secrets-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--gx-brand-soft);
  color: var(--gx-brand-strong);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.geimser-secrets-header h1 {
  margin: 0;
  color: var(--gx-text);
  font-size: 28px;
  font-weight: 850;
  letter-spacing: 0;
}

.geimser-secrets-header p {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--gx-text-2);
  font-size: 14px;
  line-height: 1.45;
}

.geimser-secrets-close,
.geimser-secrets-primary,
.geimser-secrets-secondary,
.geimser-secrets-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.geimser-secrets-close,
.geimser-secrets-secondary {
  padding: 0 14px;
  border: 1px solid var(--gx-line-strong);
  background: var(--gx-panel-2);
  color: var(--gx-link);
}

.geimser-secrets-primary {
  width: 100%;
  border: 0;
  background: var(--gx-brand);
  color: var(--gx-on-brand);
}

.geimser-secrets-primary:disabled {
  opacity: .72;
  cursor: wait;
}

.geimser-secrets-danger {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--gx-danger);
  background: var(--gx-danger-soft);
  color: var(--gx-danger);
}

.geimser-secrets-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.15fr) minmax(280px, .85fr);
  gap: 18px;
  align-items: start;
}

.geimser-secrets-card {
  border: 1px solid var(--gx-line);
  border-radius: 10px;
  background: var(--gx-panel);
  box-shadow: var(--gx-shadow-sm);
}

.geimser-secrets-form,
.geimser-secrets-result,
.geimser-secrets-history {
  padding: 18px;
}

.geimser-secrets-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.geimser-secrets-card-head h2 {
  margin: 0;
  color: var(--gx-text);
  font-size: 17px;
  font-weight: 850;
  letter-spacing: 0;
}

.geimser-secrets-card-head span {
  color: var(--gx-text-3);
  font-size: 12px;
  line-height: 1.35;
  text-align: right;
}

.geimser-secrets-form {
  display: grid;
  gap: 14px;
}

.geimser-secrets-form label {
  display: grid;
  gap: 7px;
  color: var(--gx-text-2);
  font-size: 12px;
  font-weight: 750;
}

.geimser-secrets-form input,
.geimser-secrets-form select,
.geimser-secrets-form textarea,
.geimser-secrets-linkbox input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--gx-input-border);
  border-radius: 8px;
  background: var(--gx-input-bg);
  color: var(--gx-input-text);
  -webkit-text-fill-color: var(--gx-input-text);
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  color-scheme: dark;
}

html[data-theme="light"] .geimser-secrets-form input,
html[data-theme="light"] .geimser-secrets-form select,
html[data-theme="light"] .geimser-secrets-form textarea,
html[data-theme="light"] .geimser-secrets-linkbox input {
  color-scheme: light;
}

.geimser-secrets-form input:focus,
.geimser-secrets-form select:focus,
.geimser-secrets-form textarea:focus,
.geimser-secrets-linkbox input:focus {
  outline: none;
  border-color: var(--gx-brand);
  box-shadow: var(--gx-focus-ring);
}

.geimser-secret-textarea-wrap {
  position: relative;
}

.geimser-secret-textarea-wrap textarea {
  min-height: 148px;
  resize: vertical;
  padding-right: 86px;
}

.geimser-secret-textarea.is-masked {
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: 0 0 9px var(--gx-input-text);
}

.geimser-secret-eye {
  position: absolute;
  top: 8px;
  right: 8px;
  min-height: 32px;
  border: 1px solid var(--gx-line-strong);
  border-radius: 8px;
  background: var(--gx-panel-2);
  color: var(--gx-link);
  font-weight: 800;
}

.geimser-secrets-two {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 12px;
}

.geimser-secrets-message {
  min-height: 18px;
  margin: 0;
  color: var(--gx-text-3);
  font-size: 13px;
}

.geimser-secrets-message.is-error {
  color: var(--gx-danger);
}

.geimser-secrets-message.is-ok {
  color: var(--gx-success);
}

.geimser-secrets-empty {
  padding: 22px;
  border: 1px dashed var(--gx-line-strong);
  border-radius: 8px;
  color: var(--gx-text-3);
  text-align: center;
}

.geimser-secrets-linkbox {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.geimser-secrets-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.geimser-secrets-summary div {
  padding: 12px;
  border-radius: 8px;
  background: var(--gx-panel-2);
  border: 1px solid var(--gx-line);
}

.geimser-secrets-summary dt {
  margin: 0 0 5px;
  color: var(--gx-text-3);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.geimser-secrets-summary dd {
  margin: 0;
  color: var(--gx-text);
  font-size: 13px;
  font-weight: 750;
}

.geimser-secrets-table-wrap {
  overflow: auto;
}

.geimser-secrets-history table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 780px;
}

.geimser-secrets-history th,
.geimser-secrets-history td {
  padding: 12px 11px;
  border-bottom: 1px solid var(--gx-line);
  color: var(--gx-text-2);
  text-align: left;
  font-size: 13px;
}

.geimser-secrets-history th {
  color: var(--gx-text-3);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.geimser-secrets-history td strong {
  color: var(--gx-text);
}

.geimser-secrets-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.geimser-secrets-status.is-active {
  background: var(--gx-success-soft);
  color: var(--gx-success);
}

.geimser-secrets-status.is-consumed {
  background: var(--gx-brand-soft);
  color: var(--gx-brand-strong);
}

.geimser-secrets-status.is-expired,
.geimser-secrets-status.is-deleted {
  background: var(--gx-warning-soft);
  color: var(--gx-warning);
}

@media (max-width: 980px) {
  .geimser-secrets-page {
    padding: 18px;
  }

  .geimser-secrets-grid,
  .geimser-secrets-two,
  .geimser-secrets-linkbox,
  .geimser-secrets-summary {
    grid-template-columns: 1fr;
  }

  .geimser-secrets-header {
    flex-direction: column;
  }

  .geimser-secrets-card-head {
    display: grid;
  }

  .geimser-secrets-card-head span {
    text-align: left;
  }
}
