.loader-container {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999999;
  opacity: 1;
  transition: opacity .35s ease;
}

.loader-container.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  text-align: center;
  max-width: 320px;
}

.loader-brand {
  width: 64px;
  height: 64px;
  object-fit: contain;
  opacity: .9;
}

.loader-spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 4px solid rgba(0, 89, 78, 0.15);
  border-top-color: #00594e;
  animation: loaderSpin 0.9s linear infinite;
}

.loader-text {
  margin: 0;
  font-family: 'Open Sans', system-ui, sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: #00594e;
  letter-spacing: .2px;
}

.loader-subtext {
  margin: 0;
  font-family: 'Open Sans', system-ui, sans-serif;
  font-size: .82rem;
  color: #6b7280;
}

/* Compatibilidad: si algún módulo aún usa <img class="loader-img"> */
.loader-img {
  width: 35%;
  max-width: 220px;
}

@keyframes loaderSpin {
  to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
  .loader-content { max-width: 280px; gap: .85rem; }
  .loader-brand { width: 56px; height: 56px; }
  .loader-spinner { width: 42px; height: 42px; }
  .loader-text { font-size: .95rem; }
  .loader-subtext { font-size: .78rem; }
}

@media (prefers-reduced-motion: reduce) {
  .loader-spinner { animation-duration: 2.4s; }
  .loader-container { transition: none; }
}

.module-shell-bg {
  background: url("/datalab/assets/img/datalab/bg-green.png") no-repeat center center/cover;
}

#sidenav-main.module-shell-sidenav {
  background:
    radial-gradient(circle at top left, rgba(181, 161, 96, 0.18), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f8fbfa 100%);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  width: 18rem;
}

#sidenav-main.module-shell-sidenav .sidenav-header {
  padding-bottom: 0.6rem;
  display: flex;
  justify-content: center;
}

.module-shell-brand {
  width: 100%;
  gap: 0.75rem;
  justify-content: center;
  text-align: center;
}

.module-shell-brand .navbar-brand {
  margin-inline: auto !important;
  justify-content: center !important;
}

.module-shell-brand .navbar-brand-img {
  display: block;
  margin: 0 auto;
  max-height: 2rem;
}

.module-shell-divider {
  margin-block: 0.25rem 0.85rem;
}

.module-shell-nav {
  overflow-x: hidden;
  max-height: calc(100vh - 19rem);
  padding-bottom: 0.75rem;
}

#sidenav-main.module-shell-sidenav .navbar-nav {
  gap: 0.15rem;
}

#sidenav-main.module-shell-sidenav .nav-link {
  border-radius: 14px;
  padding: 0.64rem 0.85rem;
  margin-inline: 0.45rem;
  transition: background 0.18s ease, transform 0.18s ease;
}

#sidenav-main.module-shell-sidenav .nav-link:hover {
  background: rgba(0, 89, 78, 0.06);
  transform: translateX(2px);
}

#sidenav-main.module-shell-sidenav .nav-link.active,
#sidenav-main.module-shell-sidenav .module-shell-submenu .nav-link.active {
  background: rgba(0, 89, 78, 0.1);
  color: #00594e;
  font-weight: 700;
}

#sidenav-main.module-shell-sidenav .icon-shape {
  background: linear-gradient(180deg, #ffffff 0%, #eef5f2 100%);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

#sidenav-main.module-shell-sidenav .module-shell-submenu .nav-link {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  margin-bottom: 0.15rem;
}

#sidenav-main.module-shell-sidenav .module-shell-submenu .nav-link i {
  width: 16px;
  text-align: center;
}

.module-shell-section-title {
  padding-inline: 1.35rem;
  margin: 0.85rem 0 0.1rem;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
}

.module-shell-footer {
  padding-top: 0.6rem;
}

.module-shell-unitropico-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 0.8rem;
  margin-bottom: 0.75rem;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.88);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.module-shell-unitropico-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  border-color: rgba(0, 89, 78, 0.16);
}

.module-shell-unitropico-logo {
  width: min(150px, 100%);
  height: auto;
}

.module-shell-footer-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 248, 246, 0.98));
}

.module-shell-footer-card h6 {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
}

.module-shell-footer-card p {
  color: #64748b;
}

.module-shell-action-panel {
  margin-top: 0.85rem;
  padding: 0.8rem;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.module-shell-action-heading {
  display: block;
  margin-bottom: 0.65rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
}

.module-shell-action-grid {
  display: grid;
  gap: 0.7rem;
}

.module-shell-action-auth-slot {
  display: flex;
  justify-content: center;
}

.module-shell-action-auth-slot .btn,
.module-shell-action-auth-slot a {
  width: 100% !important;
  border-radius: 16px;
  padding-block: 0.65rem;
}

.module-shell-action-card {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding: 0.85rem 0.95rem;
  border-radius: 18px;
  text-decoration: none;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.module-shell-action-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.1);
}

.module-shell-action-card.is-docs:hover {
  border-color: rgba(37, 99, 235, 0.22);
}

.module-shell-action-card.is-datalab:hover {
  border-color: rgba(5, 150, 105, 0.22);
}

.module-shell-action-card.is-support:hover {
  border-color: rgba(220, 38, 38, 0.18);
}

.module-shell-action-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

.module-shell-action-card.is-datalab .module-shell-action-icon {
  background: rgba(5, 150, 105, 0.12);
  color: #059669;
}

.module-shell-action-card.is-support .module-shell-action-icon {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

.module-shell-action-name {
  font-size: 0.84rem;
  font-weight: 800;
  color: #0f172a;
}

.module-shell-action-copy {
  font-size: 0.74rem;
  line-height: 1.45;
  color: #64748b;
}

.module-shell-navbar {
  background-color: #00594e;
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}

.module-shell-navbar .container-fluid {
  gap: 1rem;
}

.module-shell-navbar .nav-link,
.module-shell-navbar .nav-link:hover {
  color: #ffffff;
}

.module-shell-hero {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  width: min(100%, 560px);
  padding: 0.95rem 1rem;
  border-radius: 22px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.16), transparent 26%),
    linear-gradient(145deg, #00594e 0%, #083630 100%);
  color: #ffffff;
  box-shadow: 0 16px 28px rgba(0, 89, 78, 0.18);
}

.module-shell-hero.w-25 {
  width: 25% !important;
  min-width: 280px;
}

.module-shell-hero-top {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.module-shell-hero-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}

.module-shell-hero-kicker {
  display: block;
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 0.15rem;
}

.module-shell-hero-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.module-shell-hero-title {
  color: #ffffff;
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.15;
}

.module-shell-hero-meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  width: fit-content;
  margin-top: 0.55rem;
  padding: 0.45rem 0.65rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.module-shell-hero-meta-label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.module-shell-hero-meta-value {
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.4;
  color: #ffffff;
}

.module-shell-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.module-shell-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.52rem 0.7rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.module-shell-chip:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.module-shell-chip.is-active {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.3);
}

.module-shell-navbar-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-left: auto;
}

.module-shell-navbar-end .navbar-nav {
  flex-direction: row;
  align-items: center;
  gap: 0.2rem;
}

.module-shell-navbar-end .nav-item {
  display: flex;
  align-items: center;
}

.module-shell-navbar-end .fixed-plugin-button-nav {
  font-size: 1rem;
}

.module-shell-navbar-end .user-menu-trigger {
  min-height: 44px;
}

@media (max-width: 991.98px) {
  .module-shell-hero.w-25 {
    width: 100% !important;
    min-width: 0;
  }

  .module-shell-navbar-end {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 768px) {
  .ocultar {
    display: none !important;
  }

  .margin-top-5 {
    margin-top: 5%;
  }

  #sidenav-main.module-shell-sidenav {
    width: 16.75rem;
  }

  .module-shell-navbar {
    padding-top: 0.8rem;
    padding-bottom: 0.95rem;
    border-radius: 0 !important;
    margin-inline: 0 !important;
  }

  .module-shell-hero {
    width: 100%;
  }
}

@media (max-width: 576px) {
  .module-shell-hero {
    padding: 0.85rem;
  }

  .module-shell-hero-top {
    gap: 0.65rem;
  }

  .module-shell-hero-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .module-shell-hero-title {
    font-size: 0.92rem;
  }

  .module-shell-hero-meta {
    width: 100%;
    padding: 0.45rem 0.55rem;
  }

  .module-shell-hero-actions {
    width: 100%;
  }

  .module-shell-chip {
    flex: 1 1 140px;
  }
}

/* ── Tablet / iPad responsive additions ─────────────────── */
@media (max-width: 1199.98px) {
  #sidenav-main.module-shell-sidenav {
    width: 17rem;
  }
  .module-shell-nav {
    max-height: calc(100vh - 17rem);
  }
}

@media (max-width: 479.98px) {
  .module-shell-hero {
    padding: 0.75rem;
    border-radius: 14px;
  }
  .module-shell-hero-title {
    font-size: 0.88rem;
  }
  .module-shell-hero-kicker {
    font-size: 0.58rem;
  }
  .module-shell-hero-meta {
    padding: 0.38rem 0.5rem;
  }
  .module-shell-chip {
    font-size: 0.68rem;
    padding: 0.4rem 0.55rem;
  }
}

/* =========================================================
   🔔 Accesos útiles — ancho unificado y estilo de trigger
   ========================================================= */
#accesosUtilesModal .modal-dialog {
  max-width: 72vw;
  width: 72vw;
}

@media (max-width: 991.98px) {
  #accesosUtilesModal .modal-dialog {
    max-width: 92vw;
    width: 92vw;
  }
}

.module-shell-help-trigger {
  display: block;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid rgba(0, 89, 78, 0.12);
  background:
    radial-gradient(circle at top right, rgba(80, 185, 234, 0.18), transparent 42%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(240, 247, 245, 0.98));
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.module-shell-help-trigger:hover,
.module-shell-help-trigger:focus {
  transform: translateY(-2px);
  box-shadow: 0 20px 34px rgba(0, 89, 78, 0.14);
  border-color: rgba(0, 89, 78, 0.24);
  text-decoration: none;
}

.module-shell-help-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.85rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(0, 89, 78, 0.08);
  color: #00594e;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Fallbacks por si el módulo no embebe su propio <style> */
.module-shell-help-modal {
  border: 0;
  border-radius: 28px;
  overflow: hidden;
  background: #f5faf8;
  box-shadow: 0 28px 80px rgba(13, 47, 41, 0.28);
}

.module-shell-help-hero {
  position: relative;
  padding: 1.9rem 2rem 1.35rem;
  background:
    radial-gradient(circle at top left, rgba(80, 234, 206, 0.35), transparent 34%),
    radial-gradient(circle at bottom right, rgba(181, 161, 96, 0.34), transparent 30%),
    linear-gradient(135deg, #00594e 0%, #0d7164 55%, #1b8c7b 100%);
  color: #fff;
}

.module-shell-help-close {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  opacity: 0.92;
}

.module-shell-help-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.module-shell-help-title {
  margin: 1rem 0 0.55rem;
  font-size: 1.7rem;
  line-height: 1.1;
  font-weight: 800;
  color: #fff;
}

.module-shell-help-copy {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.98rem;
  line-height: 1.6;
}

.module-shell-help-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.module-shell-help-badges span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.48rem 0.78rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
}

.module-shell-help-modal .modal-body {
  padding: 1.5rem;
}

.module-shell-help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.module-shell-help-account-card,
.module-shell-help-modal .module-shell-action-card {
  min-height: 100%;
  border: 1px solid rgba(0, 89, 78, 0.1);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(8, 47, 41, 0.08);
}

.module-shell-help-account-card {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.module-shell-help-account-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0, 89, 78, 0.14), rgba(80, 185, 234, 0.16));
  color: #00594e;
  font-size: 1.05rem;
}

.module-shell-help-account-title {
  font-size: 1rem;
  font-weight: 800;
  color: #153f39;
}

.module-shell-help-account-copy {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.55;
  color: #647a72;
}

.module-shell-help-auth-slot .btn,
.module-shell-help-auth-slot a {
  width: 100% !important;
  margin: 0 !important;
}

.module-shell-help-modal .module-shell-action-card {
  padding: 1.15rem;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  color: #143d38;
}

.module-shell-help-modal .module-shell-action-card:hover,
.module-shell-help-modal .module-shell-action-card:focus {
  transform: translateY(-3px);
  box-shadow: 0 20px 34px rgba(9, 43, 38, 0.12);
  text-decoration: none;
}

.module-shell-help-modal .module-shell-action-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0, 89, 78, 0.14), rgba(80, 185, 234, 0.16));
  color: #00594e;
  font-size: 1.05rem;
}

.module-shell-help-modal .module-shell-action-card.is-docs .module-shell-action-icon {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.14), rgba(167, 139, 250, 0.2));
  color: #5b21b6;
}

.module-shell-help-modal .module-shell-action-card.is-support .module-shell-action-icon {
  background: linear-gradient(135deg, rgba(240, 165, 0, 0.14), rgba(245, 158, 11, 0.2));
  color: #b45309;
}

.module-shell-help-modal .module-shell-action-name {
  font-size: 1rem;
  font-weight: 800;
  color: #153f39;
}

.module-shell-help-modal .module-shell-action-copy {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.55;
  color: #647a72;
}

/* =========================================================
   📣 Banner fijo: anuncio de documentación publicada
   ========================================================= */
.datalab-docs-banner {
  margin: 0.5rem 1.75rem 0.25rem;
  padding: 10px 16px;
  border-radius: 14px;
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, 0.18), transparent 50%),
    linear-gradient(135deg, #0d7164 0%, #00594e 100%);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.88rem;
  box-shadow: 0 14px 28px rgba(0, 89, 78, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.datalab-docs-banner[hidden] { display: none !important; }

.datalab-docs-banner-icon {
  flex: 0 0 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #fff;
}

.datalab-docs-banner-body {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}

.datalab-docs-banner-body strong {
  display: inline-block;
  margin-right: 6px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.datalab-docs-banner-body span {
  opacity: 0.9;
}

.datalab-docs-banner-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.82rem;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.datalab-docs-banner-cta:hover {
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
  text-decoration: none;
}

.datalab-docs-banner-dismiss {
  appearance: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  border: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.datalab-docs-banner-dismiss:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

@media (max-width: 768px) {
  .datalab-docs-banner {
    margin: 0.5rem 1rem 0.25rem;
    font-size: 0.8rem;
    gap: 10px;
    padding: 9px 12px;
  }
  .datalab-docs-banner-cta span {
    display: none;
  }
}
