/*
  GeoSales - GS Window Manager
  ------------------------------------------------------------
  - Ventanas flotantes no modales (múltiples simultáneas)
  - Soporta: mover, redimensionar, minimizar, fullscreen, cerrar
  - Dock/Bar:
      * Web: se incrusta en la barra de breadcrumbs (izquierda)
      * Fallback: dock inferior fijo (si no existe breadcrumbs)
*/

/* ==============================
   Layer (overlay) - pantalla completa
   ============================== */
#gsWinLayer {
  position: fixed;
  inset: 0;
  z-index: 1040; /* encima del layout normal, debajo de modales (1055) */
  pointer-events: none; /* permite interactuar con la app cuando no se está sobre una ventana */
}

/* ==============================
   Z-Index: dropdown del usuario siempre encima de las ventanas
   (requerimiento: menú al hacer click en el nombre de usuario debe quedar por encima)
   ============================== */
.mind-user-dropdown .dropdown-menu,
.mind-user-menu {
  z-index: 3000 !important;
}

/* ==============================
   Dock / Winbar (Top)
   ============================== */
#gsWinDock.gs-dock {
  display: none; /* JS lo activa cuando aplica */
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

#gsWinDock.gs-dock--top {
  position: relative;
  /* Se ubica como item flex a la derecha de la barra */
  margin-left: auto;
  margin-right: 12px;
  padding-left: 10px;
  border-left: 1px solid rgba(15, 23, 42, 0.10);
}

/* Botón Workspaces (top) */
#gsWinDock.gs-dock--top .gs-dock__btn {
  height: 30px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: rgba(15, 23, 42, 0.03);
  color: #0f172a;
  border-radius: 10px;
  padding: 0 10px;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#gsWinDock.gs-dock--top .gs-dock__btn:hover {
  background: rgba(29, 78, 216, 0.08);
  border-color: rgba(29, 78, 216, 0.22);
}

#gsWinDock.gs-dock--top .gs-dock__btn-text {
  white-space: nowrap;
  font-weight: 600;
  text-transform: none;
}

/* Lista de ventanas en breadcrumbs */
#gsWinDock.gs-dock--top .gs-dock__wins {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  max-width: 58vw;
}

#gsWinDock.gs-dock--top .gs-dock__wins::-webkit-scrollbar {
  height: 6px;
}
#gsWinDock.gs-dock--top .gs-dock__wins::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.18);
  border-radius: 99px;
}

/* ==============================
   Dock (Bottom) - fallback
   ============================== */
#gsWinDock.gs-dock--bottom {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 46px;
  z-index: 1032;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  background: rgba(15, 15, 15, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

body.gs-dock-visible {
  padding-bottom: 56px;
}

#gsWinDock.gs-dock--bottom .gs-dock__left {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#gsWinDock.gs-dock--bottom .gs-dock__wins {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
}

#gsWinDock.gs-dock--bottom .gs-dock__btn {
  height: 40px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#gsWinDock.gs-dock--bottom .gs-dock__btn:hover { background: rgba(255,255,255,0.18); }
#gsWinDock.gs-dock--bottom .gs-dock__btn:active { background: rgba(255,255,255,0.22); }

/* Item de ventana en dock/lista */
.gs-dock-item {
  height: 30px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: rgba(15, 23, 42, 0.03);
  color: #0f172a;
  border-radius: 10px;
  padding: 0 10px;
  font-size: 12px;
  line-height: 1;
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.gs-dock-item:hover {
  background: rgba(29, 78, 216, 0.08);
  border-color: rgba(29, 78, 216, 0.22);
}

.gs-dock-item.is-active {
  background: rgba(29, 78, 216, 0.16);
  border-color: rgba(29, 78, 216, 0.35);
}

.gs-dock-item.is-min { opacity: 0.82; }

/* Ajustes visuales cuando el dock está abajo */
#gsWinDock.gs-dock--bottom .gs-dock-item {
  height: 34px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.10);
  color: #fff;
  border-radius: 8px;
}

#gsWinDock.gs-dock--bottom .gs-dock-item:hover { background: rgba(255,255,255,0.16); }
#gsWinDock.gs-dock--bottom .gs-dock-item.is-active {
  background: rgba(0, 123, 255, 0.35);
  border-color: rgba(0, 123, 255, 0.55);
}

/* ==============================
   Ventana
   ============================== */
.gs-win {
  position: absolute;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.25);
  box-shadow: 0 10px 24px rgba(0,0,0,0.25);
  border-radius: 14px;
  overflow: hidden;
  min-width: 320px;
  min-height: 220px;
  pointer-events: auto; /* re-habilita interacción */
}

.gs-win.is-focused {
  border-color: rgba(29, 78, 216, 0.55);
  box-shadow: 0 12px 28px rgba(0,0,0,0.30);
}

/* Barra de título (ajustada) */
.gs-win__titlebar {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  background: #10416b; /* consistente con la app */
  color: #fff;
  user-select: none;
  cursor: move;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

/* ==============================
   Ventanas internas (sistema)
   - Workspaces y Paneles: estilo más "menu" (similar al dropdown del usuario)
   ============================== */
.gs-win[data-gswin-type="workspace-manager"],
.gs-win[data-gswin-type="tile-manager"] {
  border-radius: 12px;
  border-color: rgba(15,23,42,0.18);
  box-shadow: 0 10px 24px rgba(15,23,42,0.18);
}

.gs-win[data-gswin-type="workspace-manager"] .gs-win__titlebar,
.gs-win[data-gswin-type="tile-manager"] .gs-win__titlebar {
  background: #ffffff;
  color: #0f172a;
  border-bottom: 1px solid rgba(15,23,42,0.10);
  cursor: default;
}

/* En ventanas de sistema, solo mostramos Cerrar (más similar a un popover)
   - Mantiene UX consistente y evita botones confusos en configuración */
.gs-win[data-gswin-type="workspace-manager"] .gs-win__btn-min,
.gs-win[data-gswin-type="workspace-manager"] .gs-win__btn-max,
.gs-win[data-gswin-type="workspace-manager"] .gs-win__btn-screen,
.gs-win[data-gswin-type="tile-manager"] .gs-win__btn-min,
.gs-win[data-gswin-type="tile-manager"] .gs-win__btn-max,
.gs-win[data-gswin-type="tile-manager"] .gs-win__btn-screen {
  display: none !important;
}

/* Botones en popovers de sistema (titlebar blanco) */
.gs-win[data-gswin-type="workspace-manager"] .gs-win__btn,
.gs-win[data-gswin-type="tile-manager"] .gs-win__btn {
  border: 1px solid rgba(15,23,42,0.18);
  background: rgba(15,23,42,0.06);
  color: #0f172a;
}

.gs-win[data-gswin-type="workspace-manager"] .gs-win__btn-close,
.gs-win[data-gswin-type="tile-manager"] .gs-win__btn-close {
  background: rgba(220, 53, 69, 0.14);
  border-color: rgba(220, 53, 69, 0.35);
  color: #dc3545;
}

.gs-win[data-gswin-type="workspace-manager"] .gs-win__btn-close:hover,
.gs-win[data-gswin-type="tile-manager"] .gs-win__btn-close:hover {
  background: rgba(220, 53, 69, 0.18);
}

.gs-win__title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.gs-win__title i { font-size: 14px; opacity: 0.95; }

.gs-win__title-text {
  font-size: 13px;
  line-height: 1;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Controles */
.gs-win__controls {
  display: inline-flex;
  gap: 6px;
}

.gs-win__btn {
  width: 34px;
  height: 30px;
  border: 1px solid rgba(255,255,255,0.20);
  border-radius: 10px;
  background: rgba(255,255,255,0.10);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.gs-win__btn i { font-size: 14px; }

.gs-win__btn-min { background: rgba(255,255,255,0.10); }
.gs-win__btn-max {
  background: rgba(13, 110, 253, 0.25);
  border-color: rgba(13, 110, 253, 0.45);
}

/* Pantalla completa real (Fullscreen API) */
.gs-win__btn-screen {
  background: rgba(25, 135, 84, 0.22);
  border-color: rgba(25, 135, 84, 0.40);
}
.gs-win__btn-close {
  background: rgba(220, 53, 69, 0.25);
  border-color: rgba(220, 53, 69, 0.45);
}

.gs-win__btn.is-disabled,
.gs-win__btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: none !important;
}

.gs-win__btn:hover { filter: brightness(1.08); }
.gs-win__btn:active { filter: brightness(1.15); }

/* Cuerpo */
.gs-win__body {
  flex: 1;
  background: #fff;
  position: relative;
  min-height: 0; /* FIX: permite scroll interno correcto en contenedores flex */
}

.gs-win__shield {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none;
  background: transparent;
}

.gs-win__iframe {
  display: block; /* evita gaps/overflow raro en algunos navegadores */
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

/* Contenido interno (sin iframe) */
.gs-win__content {
  width: 100%;
  height: 100%;
  overflow: auto;
  background: #fff;
}

/* Estado minimizado */
.gs-win.is-minimized { display: none; }

/* Fullscreen (maximizar a pantalla completa) */
.gs-win.is-fullscreen {
  border-radius: 0;
  border: 0;
  box-shadow: none;
}

/* ==============================
   Resizable (jQuery UI) - FIX "pegado"
   - Handles internos (no negativos) para que no "se vaya" el click al fondo
   ============================== */
.gs-win.ui-resizable .ui-resizable-handle {
  z-index: 6;
  pointer-events: auto;
  background: transparent;
}

/* Overrides de posiciones (jQuery UI usa negativos en bordes) */
.gs-win.ui-resizable .ui-resizable-e { right: 0; width: 10px; top: 0; height: 100%; }
.gs-win.ui-resizable .ui-resizable-w { left: 0; width: 10px; top: 0; height: 100%; }
.gs-win.ui-resizable .ui-resizable-s { bottom: 0; height: 10px; left: 0; width: 100%; }
.gs-win.ui-resizable .ui-resizable-n { top: 0; height: 10px; left: 0; width: 100%; }

.gs-win.ui-resizable .ui-resizable-se { right: 0; bottom: 0; width: 18px; height: 18px; }
.gs-win.ui-resizable .ui-resizable-sw { left: 0; bottom: 0; width: 18px; height: 18px; }
.gs-win.ui-resizable .ui-resizable-ne { right: 0; top: 0; width: 18px; height: 18px; }
.gs-win.ui-resizable .ui-resizable-nw { left: 0; top: 0; width: 18px; height: 18px; }

/* Grip visual (esquina inferior derecha) */
.gs-win.ui-resizable .ui-resizable-se:after {
  content: '';
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(0,0,0,0.25);
  border-bottom: 2px solid rgba(0,0,0,0.25);
}

/* ==============================
   Workspaces panel
   ============================== */
#gsWinDock .gs-ws-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: 380px;
  max-width: calc(100vw - 20px);
  background: #ffffff;
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
  padding: 10px;
}

/* En top/right, anclar el panel a la derecha para que no se salga de pantalla */
#gsWinDock.gs-dock--top .gs-ws-panel {
  left: auto;
  right: 0;
}

/* En modo top (dock a la derecha), el panel debe abrir hacia la izquierda */
#gsWinDock.gs-dock--top .gs-ws-panel {
  left: auto;
  right: 0;
}

#gsWinDock.gs-dock--bottom .gs-ws-panel {
  top: auto;
  bottom: 54px;
  background: rgba(20, 20, 20, 0.95);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 12px 30px rgba(0,0,0,0.45);
}

.gs-ws__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.gs-ws__title {
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.gs-ws__close {
  border: 0;
  background: transparent;
  color: rgba(15,23,42,0.7);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

#gsWinDock.gs-dock--bottom .gs-ws__close { color: rgba(255,255,255,0.9); }

.gs-ws__close:hover { background: rgba(15,23,42,0.06); }
#gsWinDock.gs-dock--bottom .gs-ws__close:hover { background: rgba(255,255,255,0.10); }

.gs-ws__save {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.gs-ws__input {
  flex: 1;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(15,23,42,0.14);
  background: rgba(15,23,42,0.03);
  color: #0f172a;
  padding: 0 10px;
  font-size: 12px;
  outline: none;
}

#gsWinDock.gs-dock--bottom .gs-ws__input {
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.gs-ws__input::placeholder { color: rgba(15,23,42,0.45); }
#gsWinDock.gs-dock--bottom .gs-ws__input::placeholder { color: rgba(255,255,255,0.55); }

.gs-ws__btn {
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(15,23,42,0.14);
  background: rgba(15,23,42,0.04);
  color: #0f172a;
  font-size: 12px;
  cursor: pointer;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#gsWinDock.gs-dock--bottom .gs-ws__btn {
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.gs-ws__btn:hover { background: rgba(29, 78, 216, 0.08); border-color: rgba(29, 78, 216, 0.22); }
#gsWinDock.gs-dock--bottom .gs-ws__btn:hover { background: rgba(255,255,255,0.18); }

.gs-ws__btn--small {
  width: 34px;
  padding: 0;
  justify-content: center;
}

#gsWinDock .gs-ws__btn--danger:hover {
  background: rgba(220, 53, 69, 0.18);
  border-color: rgba(220, 53, 69, 0.32);
}

#gsWinDock.gs-dock--bottom .gs-ws__btn--danger:hover {
  background: rgba(220, 53, 69, 0.55);
  border-color: rgba(220, 53, 69, 0.70);
}

.gs-ws__list {
  max-height: 260px;
  overflow: auto;
  border-top: 1px solid rgba(15,23,42,0.10);
  padding-top: 8px;
}

#gsWinDock.gs-dock--bottom .gs-ws__list {
  border-top: 1px solid rgba(255,255,255,0.10);
}

.gs-ws__empty {
  font-size: 12px;
  color: rgba(15,23,42,0.55);
  padding: 10px 4px;
}

#gsWinDock.gs-dock--bottom .gs-ws__empty {
  color: rgba(255,255,255,0.65);
}

.gs-ws__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 6px;
  border-radius: 10px;
}

.gs-ws__item:hover { background: rgba(15,23,42,0.04); }
#gsWinDock.gs-dock--bottom .gs-ws__item:hover { background: rgba(255,255,255,0.06); }

.gs-ws__item-main { min-width: 0; flex: 1; }

/* ==============================
   Vista móvil: sin ventanas ni Workspaces
   ============================== */
@media (max-width: 991.98px) {
  #gsWinLayer,
  #gsWinDock {
    display: none !important;
  }

  /* Ocultar la opción de menú Workspaces */
  .mind-user-workspaces {
    display: none !important;
  }

  body.gs-dock-visible {
    padding-bottom: 0 !important;
  }
}

.gs-ws__item-name {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gs-ws__item-meta {
  margin-top: 2px;
  font-size: 11px;
  color: rgba(15,23,42,0.55);
}

#gsWinDock.gs-dock--bottom .gs-ws__item-meta {
  color: rgba(255,255,255,0.65);
}

.gs-ws__item-actions {
  display: inline-flex;
  gap: 6px;
}

.gs-ws__hint {
  margin-top: 8px;
  font-size: 11px;
  color: rgba(15,23,42,0.45);
}

#gsWinDock.gs-dock--bottom .gs-ws__hint {
  color: rgba(255,255,255,0.55);
}

/* ==============================
   Workspace Manager (ventana)
   ============================== */
.gs-wsm {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  color: #0f172a;
}

.gs-wsm__toolbar {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.gs-wsm__field {
  flex: 1;
  min-width: 220px;
}

.gs-wsm__label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
  color: rgba(15,23,42,0.65);
}

.gs-wsm__input {
  width: 100%;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(15,23,42,0.14);
  background: rgba(15,23,42,0.03);
  color: #0f172a;
  padding: 0 10px;
  font-size: 12px;
  outline: none;
}

.gs-wsm__input::placeholder { color: rgba(15,23,42,0.45); }

.gs-wsm__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.gs-wsm__btn {
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(15,23,42,0.14);
  background: rgba(15,23,42,0.04);
  color: #0f172a;
  font-size: 12px;
  cursor: pointer;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.gs-wsm__btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.gs-wsm__btn:hover:not(:disabled) {
  background: rgba(29, 78, 216, 0.08);
  border-color: rgba(29, 78, 216, 0.22);
}

.gs-wsm__btn--danger {
  background: rgba(220, 53, 69, 0.10);
  border-color: rgba(220, 53, 69, 0.22);
  color: #b42318;
}

.gs-wsm__btn--danger:hover:not(:disabled) {
  background: rgba(220, 53, 69, 0.18);
  border-color: rgba(220, 53, 69, 0.32);
}

.gs-wsm__btn--small {
  width: 34px;
  padding: 0;
  justify-content: center;
}

.gs-wsm__list {
  flex: 1;
  overflow: auto;
  border-top: 1px solid rgba(15,23,42,0.10);
  padding-top: 8px;
}

.gs-wsm__empty {
  font-size: 12px;
  color: rgba(15,23,42,0.55);
  padding: 10px 4px;
}

.gs-wsm__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 6px;
  border-radius: 10px;
  cursor: pointer;
}

.gs-wsm__item:hover { background: rgba(15,23,42,0.04); }

.gs-wsm__item.is-selected {
  background: rgba(29,78,216,0.10);
  outline: 1px solid rgba(29,78,216,0.22);
}

.gs-wsm__item-main { min-width: 0; flex: 1; }

.gs-wsm__item-name {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gs-wsm__item-meta {
  margin-top: 2px;
  font-size: 11px;
  color: rgba(15,23,42,0.55);
}

.gs-wsm__item-actions {
  display: inline-flex;
  gap: 6px;
}

.gs-wsm__hint {
  margin-top: 2px;
  font-size: 11px;
  color: rgba(15,23,42,0.45);
}

/* Responsive: en pantallas pequeñas, el texto del botón se oculta */
@media (max-width: 576px) {
  #gsWinDock.gs-dock--top .gs-dock__wins { max-width: 45vw; }
  .gs-dock__btn-text { display: none; }
  .gs-win { min-width: 240px; min-height: 180px; }
}


/* ==============================
   Paneles (Tiling) - Manager
   ============================== */
.gs-tm {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  color: #0f172a;
}

.gs-tm__toolbar {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.gs-tm__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gs-tm__label {
  font-size: 11px;
  font-weight: 700;
  color: rgba(15,23,42,0.65);
}

.gs-tm__select {
  height: 34px;
  border: 1px solid rgba(15,23,42,0.14);
  border-radius: 10px;
  padding: 0 10px;
  outline: none;
  background: #fff;
  font-size: 13px;
}

.gs-tm__actions {
  margin-left: auto;
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.gs-tm__btn {
  border: 1px solid rgba(15,23,42,0.12);
  background: #fff;
  border-radius: 10px;
  height: 34px;
  padding: 0 12px;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.gs-tm__btn:hover {
  background: rgba(15,23,42,0.04);
}

.gs-tm__btn--danger {
  border-color: rgba(239,68,68,0.35);
  color: #ef4444;
}

.gs-tm__btn--danger:hover {
  background: rgba(239,68,68,0.08);
}

.gs-tm__hint {
  margin-top: 2px;
  font-size: 11px;
  color: rgba(15,23,42,0.45);
}

.gs-tm__panels {
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 2px;
}

.gs-tm__panel {
  display: flex;
  gap: 10px;
  align-items: center;
  background: rgba(15,23,42,0.03);
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 12px;
  padding: 10px;
}

.gs-tm__panel-title {
  width: 78px;
  font-weight: 800;
  font-size: 12px;
  color: rgba(15,23,42,0.75);
}

.gs-tm__panel-select {
  flex: 1;
}

.gs-tm__empty {
  font-size: 12px;
  color: rgba(15,23,42,0.55);
  padding: 10px 0;
}

/* Ventanas en modo paneles */
.gs-win.is-tiled {
  border-radius: 0;
  box-shadow: none;
  min-width: 0 !important;
  min-height: 0 !important;
}

.gs-win.is-tiled .gs-win__titlebar {
  border-radius: 0;
}

/* ==========================
   Menú lateral derecho: Workspaces / Paneles
   ========================== */

.gs-rt-wrap {
  padding: 10px 12px 0 12px;
}

.gs-rt {
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(15,23,42,0.10);
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(15,23,42,0.08);
  overflow: hidden;
}

.gs-rt__section {
  padding: 10px 12px;
}

.gs-rt__section + .gs-rt__section {
  border-top: 1px solid rgba(15,23,42,0.08);
}

.gs-rt__section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13px;
  color: rgba(15,23,42,0.86);
  margin-bottom: 8px;
}

.gs-rt__section--highlight {
  box-shadow: inset 0 0 0 2px rgba(16,65,107,0.35);
  border-radius: 10px;
}

.gs-rt__section-body {
  font-size: 12px;
}

.gs-rt__label {
  font-size: 12px;
  font-weight: 700;
  color: rgba(15,23,42,0.72);
  margin-right: 6px;
}

.gs-rt__input,
.gs-rt__select {
  height: 30px;
  border-radius: 10px;
  border: 1px solid rgba(15,23,42,0.14);
  padding: 0 10px;
  outline: none;
  background: rgba(255,255,255,0.95);
  font-size: 12px;
}

.gs-rt__input {
  flex: 1;
  min-width: 140px;
}

.gs-rt__btn {
  height: 30px;
  border-radius: 10px;
  border: 1px solid rgba(15,23,42,0.12);
  background: rgba(255,255,255,0.92);
  padding: 0 10px;
  cursor: pointer;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.gs-rt__btn:hover {
  background: rgba(15,23,42,0.04);
}

.gs-rt__btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.gs-rt__btn--danger {
  border-color: rgba(239,68,68,0.35);
  color: rgba(239,68,68,0.92);
}

.gs-rt__list {
  margin-top: 8px;
}

.gs-rt__hint {
  margin-top: 8px;
  font-size: 11px;
  color: rgba(15,23,42,0.65);
}

.gs-rt__empty {
  font-size: 12px;
  color: rgba(15,23,42,0.60);
  padding: 6px 0;
}

.gs-rt-ws__toolbar,
.gs-rt-tm__toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.gs-rt-ws__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(15,23,42,0.10);
  border-radius: 12px;
  background: rgba(255,255,255,0.95);
  margin-bottom: 8px;
}

.gs-rt-ws__item.is-selected {
  border-color: rgba(16,65,107,0.35);
  box-shadow: 0 0 0 2px rgba(16,65,107,0.18);
}

.gs-rt-ws__name {
  font-weight: 700;
  font-size: 12px;
  color: rgba(15,23,42,0.86);
}

.gs-rt-ws__meta {
  font-size: 11px;
  color: rgba(15,23,42,0.58);
}

.gs-rt-ws__actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gs-rt-ws__btn {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid rgba(15,23,42,0.12);
  background: rgba(255,255,255,0.92);
  cursor: pointer;
}

.gs-rt-ws__btn--danger {
  border-color: rgba(239,68,68,0.35);
  color: rgba(239,68,68,0.92);
}

.gs-rt-tm__panel {
  border: 1px solid rgba(15,23,42,0.10);
  border-radius: 12px;
  padding: 8px 10px;
  margin-bottom: 8px;
  background: rgba(255,255,255,0.95);
}

.gs-rt-tm__panel-title {
  font-weight: 700;
  font-size: 12px;
  margin-bottom: 6px;
  color: rgba(15,23,42,0.78);
}

.gs-rt-tm__panel-select {
  width: 100%;
}

/* Ocultar estas herramientas en vista móvil */
@media (max-width: 767px) {
  #gsRightToolsWrap {
    display: none !important;
  }
}

/* ==========================
   Resizing de paneles: splitters (solo mosaico)
   ========================== */

#gsTileOverlay {
  position: fixed;
  z-index: 1053;
  pointer-events: none;
}

#gsTileOverlay .gs-tile-overlay__shield {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  display: none;
  pointer-events: auto;
  background: transparent;
}

#gsTileOverlay .gs-tile-split {
  position: absolute;
  pointer-events: auto;
  background: rgba(16,65,107,0.12);
  border: 1px solid rgba(16,65,107,0.25);
  border-radius: 10px;
  box-shadow: 0 6px 12px rgba(15,23,42,0.08);
}

#gsTileOverlay .gs-tile-split:hover {
  background: rgba(16,65,107,0.18);
}

#gsTileOverlay .gs-tile-split--v {
  width: 10px;
  cursor: col-resize;
}

#gsTileOverlay .gs-tile-split--h {
  height: 10px;
  cursor: row-resize;
}

/* ==========================
   UX Modo Paneles (Tile)
   - En modo paneles, evitamos que el layout base (#content-body)
     scrollee. El scroll debe ocurrir dentro de cada ventana/panel.
   ========================== */
body.gs-tile-active #content-body {
  overflow-y: hidden !important;
  overflow-x: hidden !important;
}

/* ==========================
   Snap Overlay (estilo Windows 11)
   - Se muestra al arrastrar una ventana hacia esquinas/laterales.
   ========================== */
#gsSnapOverlay {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1052; /* debajo del overlay de splitters (1053), encima de ventanas */
  display: none;
  pointer-events: none;
}

#gsSnapOverlay .gs-snap-bg {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.04);
}

#gsSnapOverlay .gs-snap-hint {
  position: absolute;
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
  font-size: 12px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  color: rgba(15, 23, 42, 0.78);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.10);
}

#gsSnapOverlay .gs-snap-grid {
  position: absolute;
  display: grid;
  gap: 10px;
  padding: 10px;
  box-sizing: border-box;
}

#gsSnapOverlay[data-layout="2"] .gs-snap-grid {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr;
}

#gsSnapOverlay[data-layout="4"] .gs-snap-grid {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

#gsSnapOverlay .gs-snap-cell {
  border: 2px solid rgba(16, 65, 107, 0.28);
  background: rgba(16, 65, 107, 0.08);
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

#gsSnapOverlay .gs-snap-cell.is-active {
  border-color: rgba(16, 65, 107, 0.55);
  background: rgba(16, 65, 107, 0.18);
}

/* ============================================================
   FIX V12 - Maximizacion normal dentro del area de reportes
   ------------------------------------------------------------
   .is-fullscreen      = maximizada dentro de #content-body
   .is-screenfull      = pantalla completa real del navegador
   ============================================================ */
.gs-win.is-report-maximized {
  border-radius: 0;
}

.gs-win.is-screenfull,
.gs-win:fullscreen,
.gs-win:-webkit-full-screen,
.gs-win:-moz-full-screen {
  position: fixed !important;
  left: 0 !important;
  top: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  border-radius: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  z-index: 2147483000 !important;
}

.gs-win.is-screenfull .gs-win__iframe,
.gs-win:fullscreen .gs-win__iframe,
.gs-win:-webkit-full-screen .gs-win__iframe,
.gs-win:-moz-full-screen .gs-win__iframe {
  width: 100% !important;
  height: 100% !important;
}

.gs-win.is-screenfull .gs-win__body,
.gs-win:fullscreen .gs-win__body,
.gs-win:-webkit-full-screen .gs-win__body,
.gs-win:-moz-full-screen .gs-win__body {
  min-height: 0 !important;
}

/* ============================================================
   FIX V12 - Offcanvas/menu lateral por encima de ventanas
   ------------------------------------------------------------
   Al abrir el menu lateral, se pausa la capa de ventanas para que
   el offcanvas y su backdrop reciban los clicks correctamente.
   ============================================================ */
body.gs-offcanvas-active #gsWinLayer,
body.gs-offcanvas-active #gsWinDock {
  z-index: 10 !important;
  pointer-events: none !important;
}

body.gs-offcanvas-active #gsWinLayer .gs-win,
body.gs-offcanvas-active #gsWinLayer .gs-win * {
  pointer-events: none !important;
}

#offcanvasMenu.mind-offcanvas-menu,
.offcanvas.mind-offcanvas-menu {
  z-index: 2147483500 !important;
  pointer-events: auto !important;
}

body.gs-offcanvas-active .offcanvas-backdrop,
.offcanvas-backdrop.show {
  z-index: 2147483490 !important;
}

body.gs-offcanvas-active #offcanvasMenu,
body.gs-offcanvas-active .offcanvas.show,
body.gs-offcanvas-active .offcanvas.showing {
  z-index: 2147483500 !important;
  pointer-events: auto !important;
}
