/* =====================================
TOPBAR XPERTECH
===================================== */

/* fila principal */

.menu-x .nav {
  align-items: center;
}

/* boton menu */

/* chips */

.x-sucursal-chip,
.x-user-nav,
.x-renovar-chip {
  display: flex !important;
  align-items: center;
  gap: 8px;
  padding: 8px 12px !important;
  /* border-radius: 12px; */
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  color: #e5e7eb !important;
  height: 48px;
}

/* icono sucursal */

.x-sucursal-chip i {
  color: #93c5fd;
  font-size: 13px;
}

/* avatar */

.x-user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, .15);
}

/* texto */

.x-sucursal-chip span,
.x-user-nav span {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* dropdown */


/* =====================================
MOBILE
===================================== */

@media (max-width:768px) {

  .x-sucursal-chip span {
    max-width: 120px;
  }

  .x-user-nav span {
    display: none;
  }

}

/* MOBILE */
@media (max-width: 991.98px) {

  .x-topbar {
    padding: 8px 10px;
    min-height: 62px;
  }

  .x-topbar__center {
    overflow: hidden;
  }

  .x-topbar__center>* {
    max-width: 100%;
  }

  .x-sucursal-chip {
    padding: 0 10px !important;
  }

  .x-sucursal-chip__text {
    max-width: 92px;
    font-size: 13px;
  }

  .x-user-nav {
    padding: 0 10px !important;
  }

  .x-user-nav__name {
    display: none;
  }

  .x-topbar__nav {
    gap: 8px;
  }
}

/* MOBILE PEQUEÑO */
@media (max-width: 575.98px) {

  .x-topbar {
    gap: 8px;
  }

  .x-topbar__center {
    min-width: 0;
    max-width: 120px;
  }

  .x-topbar__center>* {
    transform: scale(.92);
    transform-origin: left center;
  }

  .x-sucursal-chip {
    min-width: 44px;
    padding: 0 10px !important;
  }

  .x-sucursal-chip__text {
    max-width: 70px;
  }

  .x-user-nav {
    min-width: 44px;
    padding: 0 6px !important;
  }

  .x-topbar__nav {
    gap: 6px;
  }
}

.x-topbar {
  background: rgba(14, 15, 32, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  min-height: 64px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: nowrap;
  z-index: 1040;
}

.x-topbar__left,
.x-topbar__center,
.x-topbar__right {
  display: flex;
  align-items: center;
  min-width: 0;
}

.x-topbar__left {
  flex: 0 0 auto;
}

.x-topbar__center {
  flex: 1 1 auto;
  overflow: hidden;
}

.x-topbar__right {
  flex: 0 0 auto;
}

.x-topbar__nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.x-topbar__item {
  list-style: none;
}

.x-topbar__menu {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .08);
  text-decoration: none !important;
}

.x-sucursal-chip,
.x-notify-btn,
.x-user-nav {
  min-height: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px !important;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .08);
  color: #fff !important;
  text-decoration: none !important;
}

.x-sucursal-chip__text {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.x-notify-btn {
  width: 42px;
  min-width: 42px;
  justify-content: center;
  padding: 0 !important;
  position: relative;
}

.x-notify-badge {
  position: absolute;
  top: 4px;
  right: 2px;
}

.x-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.x-user-nav__name {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* BADGE SAAS */
.x-saas-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 10px;
  border-radius: 14px;
  border: 1px solid transparent;
  white-space: nowrap;
  overflow: hidden;
  max-width: 100%;
}

.x-saas-status__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.x-saas-status__text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
  font-size: 13px;
}

.x-saas-status__action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border-radius: 10px;
  text-decoration: none !important;
  font-weight: 800;
  font-size: 12px;
  margin-left: 4px;
}

.x-saas-success {
  background: rgba(16, 185, 129, .14);
  border-color: rgba(16, 185, 129, .22);
  color: #86efac;
}

.x-saas-warning {
  background: rgba(245, 158, 11, .14);
  border-color: rgba(245, 158, 11, .24);
  color: #fcd34d;
}

.x-saas-danger {
  background: rgba(239, 68, 68, .14);
  border-color: rgba(239, 68, 68, .24);
  color: #fca5a5;
}

.x-saas-warning .x-saas-status__action,
.x-saas-danger .x-saas-status__action {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .08);
  color: #fff;
}

/* TABLET */
@media (max-width: 991.98px) {
  .x-sucursal-chip__text {
    max-width: 95px;
  }

  .x-user-nav__name {
    display: none;
  }
}

/* MOBILE */
@media (max-width: 575.98px) {
  .x-topbar {
    min-height: 56px;
    padding: 6px 8px;
    gap: 6px;
  }

  .x-topbar__nav {
    gap: 6px;
  }

  .x-topbar__menu {
    width: 38px;
    height: 38px;
    /* border-radius: 12px; */
  }

  .x-sucursal-chip,
  .x-notify-btn,
  .x-user-nav {
    min-height: 38px;
    height: 38px;
    /* border-radius: 12px; */
  }

  .x-sucursal-chip {
    padding: 0 10px !important;
  }

  .x-sucursal-chip__text {
    max-width: 80px;
    font-size: 12px;
  }

  .x-user-nav {
    padding: 0 6px !important;
  }

  .x-user-avatar {
    width: 30px;
    height: 30px;
  }

  .x-saas-status {
    min-height: 38px;
    padding: 0 8px;
    /* border-radius: 12px; */
    gap: 6px;
  }

  .x-saas-status__text {
    max-width: 78px;
    font-size: 12px;
  }

  .x-saas-status__action {
    height: 28px;
    padding: 0 8px;
    font-size: 11px;
  }

  .x-saas-status__action span {
    display: none;
  }

  .x-notify-badge {
    transform: scale(.88);
    top: 2px;
    right: 1px;
  }
}

@media (max-width: 430px) {
  .x-topbar__center {
    max-width: 120px;
  }

  .x-sucursal-chip__text {
    max-width: 68px;
  }

  .x-saas-status__text {
    max-width: 64px;
  }

  .x-user-nav.dropdown-toggle::after {
    display: none;
  }
}


.x-notify-toast-stack {
  position: fixed;
  top: 76px;
  right: 18px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(380px, calc(100vw - 24px));
  pointer-events: none;
}

.x-notify-toast {
  pointer-events: auto;
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 14px 14px 14px 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, .16), transparent 28%),
    linear-gradient(180deg, rgba(10, 14, 25, .98), rgba(13, 18, 32, .98));
  box-shadow:
    0 20px 50px rgba(0, 0, 0, .34),
    inset 0 1px 0 rgba(255, 255, 255, .05);
  display: flex;
  gap: 12px;
  transform: translateX(30px) scale(.98);
  opacity: 0;
  animation: xToastIn .28s ease forwards;
}

.x-notify-toast.is-leaving {
  animation: xToastOut .22s ease forwards;
}

@keyframes xToastIn {
  to {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}

@keyframes xToastOut {
  to {
    transform: translateX(24px) scale(.98);
    opacity: 0;
  }
}

.x-notify-toast__accent {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #60a5fa, #2563eb);
}

.x-notify-toast--success .x-notify-toast__accent {
  background: linear-gradient(180deg, #4ade80, #16a34a);
}

.x-notify-toast--warning .x-notify-toast__accent {
  background: linear-gradient(180deg, #facc15, #f59e0b);
}

.x-notify-toast--danger .x-notify-toast__accent {
  background: linear-gradient(180deg, #fb7185, #ef4444);
}

.x-notify-toast--info .x-notify-toast__accent {
  background: linear-gradient(180deg, #67e8f9, #06b6d4);
}

.x-notify-toast__icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  flex: 0 0 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  color: #fff;
  background: rgba(255, 255, 255, .08);
}

.x-notify-toast__body {
  min-width: 0;
  flex: 1;
}

.x-notify-toast__title {
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 4px;
}

.x-notify-toast__text {
  color: rgba(255, 255, 255, .76);
  font-size: 13px;
  line-height: 1.35;
  margin-bottom: 8px;
}

.x-notify-toast__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.x-notify-toast__time {
  color: rgba(255, 255, 255, .45);
  font-size: 11px;
}

.x-notify-toast__open {
  border: none;
  background: transparent;
  color: #60a5fa;
  font-size: 12px;
  font-weight: 800;
  padding: 0;
  cursor: pointer;
}

.x-notify-toast__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, .05);
  color: rgba(255, 255, 255, .72);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: .18s ease;
}

.x-notify-toast__close:hover {
  background: rgba(255, 255, 255, .10);
  color: #fff;
}

.x-notify-toast__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, .06);
  overflow: hidden;
}

.x-notify-toast__progress>span {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left center;
  background: linear-gradient(90deg, rgba(96, 165, 250, .92), rgba(37, 99, 235, .92));
  animation: xToastProgress linear forwards;
}

.x-notify-toast--success .x-notify-toast__progress>span {
  background: linear-gradient(90deg, rgba(74, 222, 128, .92), rgba(22, 163, 74, .92));
}

.x-notify-toast--warning .x-notify-toast__progress>span {
  background: linear-gradient(90deg, rgba(250, 204, 21, .92), rgba(245, 158, 11, .92));
}

.x-notify-toast--danger .x-notify-toast__progress>span {
  background: linear-gradient(90deg, rgba(251, 113, 133, .92), rgba(239, 68, 68, .92));
}

.x-notify-toast--info .x-notify-toast__progress>span {
  background: linear-gradient(90deg, rgba(103, 232, 249, .92), rgba(6, 182, 212, .92));
}

@keyframes xToastProgress {
  from {
    transform: scaleX(1);
  }

  to {
    transform: scaleX(0);
  }
}

/* @media (max-width: 768px) {
  .x-notify-toast-stack {
    top: 66px;
    right: 12px;
    left: 12px;
    width: auto;
  }
} */

/* Desktop: oculto */
.x-topbar__menu {
  display: none !important;
}

/* Tablet / móvil: visible y centrado */
@media (max-width: 1350px) {
  .x-topbar__left {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  a.x-topbar__menu,
  .x-topbar__menu {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 42px;
    height: 42px;
    min-width: 42px;
    padding: 0 !important;
    line-height: 1 !important;
    text-decoration: none !important;
  }

  .x-topbar__menu i {
    display: block;
    font-size: 18px;
    line-height: 1 !important;
    margin: 0 !important;
  }
}

.side-nav .logo-wrappers a {
  display: flex;
  align-items: center;
  justify-content: center;
  /* 🔥 ESTE ES EL CLAVE */
  height: 5.75rem;
  width: 100%;
  padding: 12px 5px;
}

.side-nav .logo-wrappers img {
  display: block;
  margin: 0 auto;
  /* 🔥 respaldo por si flex falla */

  max-width: 100%;
  max-height: 80px;
  object-fit: contain;
}

/* =====================================
FIX TOPBAR (NO ROMPER DISEÑO ORIGINAL)
===================================== */

/* Mantener tamaño original */
.x-topbar {
  min-height: 64px !important;
  height: auto !important;
  padding: 8px 12px !important;
}

/* Evitar que se deforme con estilos nuevos */
.x-topbar__left,
.x-topbar__center,
.x-topbar__right {
  align-items: center !important;
}

/* Mantener proporción de elementos */
.x-sucursal-chip,
.x-user-nav,
.x-notify-trigger {
  height: 42px !important;
  min-height: 42px !important;
}

/* Botón menú consistente */
.x-topbar__menu {
  width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
}

/* Avatar correcto */
.x-user-avatar {
  width: 32px !important;
  height: 32px !important;
}

/* Badge no se desplace */
.x-notify-badge {
  top: 4px !important;
  right: 2px !important;
}

/* TOPBAR GLASS PREMIUM */
.x-topbar {
  background:
    radial-gradient(circle at 15% 0%, rgba(59, 130, 246, .10), transparent 32%),
    rgba(7, 17, 31, .88) !important;
  border: 1px solid rgba(96, 165, 250, .14) !important;
  box-shadow: 0 16px 46px rgba(0, 0, 0, .30) !important;
}

.x-sucursal-chip,
.x-user-nav,
.x-notify-trigger,
.x-topbar__menu {
  background: rgba(15, 23, 42, .72) !important;
  border: 1px solid rgba(96, 165, 250, .14) !important;
  color: #e5edff !important;
}

.x-sucursal-chip:hover,
.x-user-nav:hover,
.x-notify-trigger:hover,
.x-topbar__menu:hover {
  background: rgba(59, 130, 246, .13) !important;
  border-color: rgba(96, 165, 250, .28) !important;
}

.x-sucursal-chip i,
.x-topbar__menu i,
.x-notify-trigger i {
  color: #93c5fd !important;
}

.x-user-avatar {
  border: 2px solid rgba(96, 165, 250, .38) !important;
  box-shadow: 0 0 14px rgba(59, 130, 246, .18);
}

/* =====================================
SIDEBAR GLASS PREMIUM (MATCH TOPBAR)
===================================== */

.x-sidepro {
  background:
    radial-gradient(circle at 20% 0%, rgba(59, 130, 246, .10), transparent 30%),
    rgba(7, 17, 31, .92) !important;

  border: 1px solid rgba(96, 165, 250, .12) !important;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .35) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* SECCIONES */
.x-sidepro__group-title,
.x-sidepro__section-label {
  color: #64748b !important;
}

/* LINKS BASE */
.x-sidepro__link {
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8 !important;
}

/* HOVER */
.x-sidepro__link:hover {
  background: rgba(59, 130, 246, .12);
  border-color: rgba(96, 165, 250, .18);
  color: #e0f2fe !important;
}

/* ICONOS */
.x-sidepro__icon {
  color: #7dd3fc;
}

/* ACTIVO */
.x-sidepro__link.is-active,
li.is-active>.x-sidepro__link {
  background:
    radial-gradient(circle at 10% 50%, rgba(96, 165, 250, .22), transparent 45%),
    rgba(59, 130, 246, .18);

  border-color: rgba(96, 165, 250, .35);
  color: #fff !important;
}

.x-sidepro__link.is-active::before,
li.is-active>.x-sidepro__link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 0 999px 999px 0;
  background: #60a5fa;
}

/* ICONO ACTIVO */
.x-sidepro__link.is-active .x-sidepro__icon {
  color: #93c5fd;
}

/* PADRE ABIERTO */
li.is-open>.x-sidepro__link,
li.is-current-parent>.x-sidepro__link {
  background: rgba(59, 130, 246, .08);
  border-color: rgba(96, 165, 250, .12);
  color: #cbd5f5 !important;
}

/* SUBMENU */
.x-sidepro__subnav {
  border-left: 1px solid rgba(96, 165, 250, .14);
}

.x-sidepro__subnav a {
  color: #8fa3c7 !important;
}

.x-sidepro__subnav a:hover {
  background: rgba(59, 130, 246, .10);
  color: #dbeafe !important;
}

.x-sidepro__subnav a.is-active {
  background: rgba(59, 130, 246, .18);
  border: 1px solid rgba(59, 130, 246, .25);
  color: #bfdbfe !important;
}

/* ACCESOS RAPIDOS */
.x-sidepro__quick-btn {
  background: rgba(15, 23, 42, .75);
  border: 1px solid rgba(96, 165, 250, .16);
}

.x-sidepro__quick-btn:hover {
  background: rgba(59, 130, 246, .15);
  border-color: rgba(96, 165, 250, .35);
}

/* SCROLL */
.x-sidepro .custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(96, 165, 250, .25);
}

/* 🚫 ELIMINAR GRIS DEL ITEM ABIERTO */
.x-sidepro li.is-open>.x-sidepro__link {
  background: transparent !important;
  border-color: transparent !important;
  color: #94a3b8 !important;
}

/* 🔵 SI QUIERES EFECTO SUAVE (recomendado) */
.x-sidepro li.is-current-parent>.x-sidepro__link {
  background: rgba(59, 130, 246, .10) !important;
  border-color: rgba(96, 165, 250, .18) !important;
  color: #cbd5f5 !important;
}

/* FIX DEFINITIVO: ACTIVO SIEMPRE AZUL, NO GRIS */
.x-sidepro .x-sidepro__link.is-active,
.x-sidepro li.is-active>.x-sidepro__link,
.x-sidepro .x-sidepro__link.nav-active,
.x-sidepro li.nav-active>.x-sidepro__link {
  background:
    radial-gradient(circle at 10% 50%, rgba(96, 165, 250, .20), transparent 45%),
    linear-gradient(135deg, rgba(37, 99, 235, .32), rgba(30, 64, 175, .18)) !important;
  border-color: rgba(96, 165, 250, .38) !important;
  color: #eaf2ff !important;
  box-shadow: none !important;
}

.x-sidepro .x-sidepro__link.is-active::before,
.x-sidepro li.is-active>.x-sidepro__link::before,
.x-sidepro .x-sidepro__link.nav-active::before,
.x-sidepro li.nav-active>.x-sidepro__link::before {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  top: 8px !important;
  bottom: 8px !important;
  width: 4px !important;
  border-radius: 0 999px 999px 0 !important;
  background: #60a5fa !important;
  display: block !important;
}

.x-sidepro .x-sidepro__link.is-active .x-sidepro__icon,
.x-sidepro li.is-active>.x-sidepro__link .x-sidepro__icon,
.x-sidepro .x-sidepro__link.nav-active .x-sidepro__icon,
.x-sidepro li.nav-active>.x-sidepro__link .x-sidepro__icon {
  color: #93c5fd !important;
}

/* Padre abierto NO debe ponerse gris */
.x-sidepro li.is-open>.x-sidepro__link:not(.is-active):not(.nav-active),
.x-sidepro li.is-current-parent>.x-sidepro__link:not(.is-active):not(.nav-active) {
  background: transparent !important;
  border-color: transparent !important;
  color: #94a3b8 !important;
  box-shadow: none !important;
}

/*=============================================
TOPBAR ESTADO CAJA
=============================================*/
.x-top-caja-item {
  display: flex;
  align-items: center;
}

.x-top-caja-chip {
  height: 42px;
  padding: 0 14px !important;
  border-radius: 16px;

  display: inline-flex !important;
  align-items: center;
  gap: 9px;

  background: rgba(15, 23, 42, .72);
  border: 1px solid rgba(148, 163, 184, .20);
  color: #dbeafe !important;

  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  text-decoration: none !important;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .05),
    0 10px 26px rgba(0, 0, 0, .18);
}

.x-top-caja-chip:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.x-top-caja-chip i {
  font-size: 13px;
}

.x-top-caja-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.x-top-caja-chip--open {
  background:
    radial-gradient(circle at top left, rgba(0, 255, 157, .15), transparent 42%),
    rgba(6, 20, 47, .82);
  border-color: rgba(0, 255, 157, .28);
}

.x-top-caja-chip--open .x-top-caja-dot {
  background: #00ff9d;
  /* box-shadow: 0 0 14px rgba(0, 255, 157, .75); */
}

.x-top-caja-chip--open i {
  /* color: #74ffc8; */
}

.x-top-caja-chip--closed {
  background:
    /* radial-gradient(circle at top left, rgba(239, 68, 68, .14), transparent 42%), */
    rgba(6, 20, 47, .82);
  border-color: rgba(239, 68, 68, .30);
}

.x-top-caja-chip--closed .x-top-caja-dot {
  background: #ef4444;
  /* box-shadow: 0 0 14px rgba(239, 68, 68, .65); */
}

.x-top-caja-chip--closed i {
  /* color: #fca5a5; */
}

/* .x-top-caja-chip--warning {
  background:
    radial-gradient(circle at top left, rgba(250, 204, 21, .18), transparent 42%),
    rgba(6, 20, 47, .82);
  border-color: rgba(250, 204, 21, .32);
} */

.x-top-caja-chip--warning .x-top-caja-dot {
  background: #facc15;
  box-shadow: 0 0 14px rgba(250, 204, 21, .70);
}

.x-top-caja-chip--warning i {
  color: #fde68a;
}

@media (max-width: 992px) {
  .x-top-caja-text {
    display: none;
  }

  .x-top-caja-chip {
    width: 42px;
    justify-content: center;
    padding: 0 !important;
  }

  .x-top-caja-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 7px;
    height: 7px;
  }
}

/* ==============================
   SAAS STATUS TOPBAR
============================== */

.x-saas-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;

  min-height: 42px;
  padding: 7px 13px 7px 8px;

  border-radius: 16px;
  text-decoration: none !important;

  border: 1px solid rgba(148, 163, 184, .18);
  background: rgba(15, 23, 42, .72);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .05),
    0 12px 28px rgba(0, 0, 0, .18);

  transition:
    transform .18s ease,
    border-color .18s ease,
    background .18s ease,
    box-shadow .18s ease;
}

.x-saas-status:hover {
  transform: translateY(-1px);
  text-decoration: none !important;
}

.x-saas-status__icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;

  border-radius: 999px;
  font-size: 13px;

  background: rgba(255, 255, 255, .08);
}

.x-saas-status__body {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  gap: 3px;
}

.x-saas-status__text {
  color: #f8fafc;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: -.01em;
}

.x-saas-status__meta {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

/* Activa */
.x-saas-success {
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, .18), transparent 42%),
    rgba(6, 78, 59, .42);
  border-color: rgba(34, 197, 94, .28);
}

.x-saas-success .x-saas-status__icon {
  color: #86efac;
  background: rgba(34, 197, 94, .14);
}

.x-saas-success .x-saas-status__meta {
  color: #bbf7d0;
}

/* Trial */
.x-saas-trial {
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, .20), transparent 42%),
    rgba(30, 64, 175, .34);
  border-color: rgba(96, 165, 250, .28);
}

.x-saas-trial .x-saas-status__icon {
  color: #bfdbfe;
  background: rgba(59, 130, 246, .16);
}

.x-saas-trial .x-saas-status__meta {
  color: #bfdbfe;
}

/* Warning */
.x-saas-warning {
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, .18), transparent 42%),
    rgba(120, 53, 15, .36);
  border-color: rgba(245, 158, 11, .30);
}

.x-saas-warning .x-saas-status__icon {
  color: #fbbf24;
  background: rgba(245, 158, 11, .16);
}

.x-saas-warning .x-saas-status__meta {
  color: #fde68a;
}

/* Vencida */
.x-saas-danger {
  background:
    radial-gradient(circle at top left, rgba(239, 68, 68, .18), transparent 42%),
    rgba(127, 29, 29, .34);
  border-color: rgba(239, 68, 68, .30);
}

.x-saas-danger .x-saas-status__icon {
  color: #fca5a5;
  background: rgba(239, 68, 68, .15);
}

.x-saas-danger .x-saas-status__meta {
  color: #fecaca;
}

.x-saas-status-wrap-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.x-saas-renew-mini {
  min-height: 34px;
  padding: 0 12px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;

  border-radius: 999px;
  border: 1px solid rgba(147, 197, 253, .24);

  background: rgba(37, 99, 235, .14);
  color: #bfdbfe !important;

  font-size: 11px;
  font-weight: 900;
  text-decoration: none !important;
  white-space: nowrap;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .06),
    0 10px 24px rgba(0, 0, 0, .16);

  transition:
    transform .18s ease,
    background .18s ease,
    border-color .18s ease,
    color .18s ease;
}

.x-saas-renew-mini i {
  font-size: 11px;
  color: #93c5fd;
}

.x-saas-renew-mini:hover {
  transform: translateY(-1px);
  background: rgba(37, 99, 235, .22);
  border-color: rgba(147, 197, 253, .42);
  color: #f8fafc !important;
}

/* ==============================
   SAAS STATUS + BOTÓN RENOVAR
============================== */

.x-saas-status-wrap-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.x-saas-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;

  min-height: 38px;
  padding: 7px 13px 7px 8px;

  border-radius: 15px;
  text-decoration: none !important;

  border: 1px solid rgba(148, 163, 184, .18);
  background: rgba(15, 23, 42, .72);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .05),
    0 12px 28px rgba(0, 0, 0, .18);

  transition:
    transform .18s ease,
    border-color .18s ease,
    background .18s ease,
    box-shadow .18s ease;
}

.x-saas-status:hover {
  transform: translateY(-1px);
  text-decoration: none !important;
}

.x-saas-status__icon {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;

  border-radius: 999px;
  font-size: 13px;

  background: rgba(255, 255, 255, .08);
}

.x-saas-status__body--inline {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
  line-height: 1;
  white-space: nowrap;
}

.x-saas-status__text {
  color: #f8fafc;
  font-size: 12px;
  font-weight: 900;
}

.x-saas-status__meta {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
}

/* Activa */
.x-saas-success {
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, .18), transparent 42%),
    rgba(6, 78, 59, .42);
  border-color: rgba(34, 197, 94, .28);
}

.x-saas-success .x-saas-status__icon {
  color: #86efac;
  background: rgba(34, 197, 94, .14);
}

.x-saas-success .x-saas-status__meta {
  color: #bbf7d0;
}

/* Trial */
.x-saas-trial {
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, .20), transparent 42%),
    rgba(30, 64, 175, .34);
  border-color: rgba(96, 165, 250, .28);
}

.x-saas-trial .x-saas-status__icon {
  color: #bfdbfe;
  background: rgba(59, 130, 246, .16);
}

.x-saas-trial .x-saas-status__meta {
  color: #bfdbfe;
}

/* Warning */
.x-saas-warning {
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, .18), transparent 42%),
    rgba(120, 53, 15, .36);
  border-color: rgba(245, 158, 11, .30);
}

.x-saas-warning .x-saas-status__icon {
  color: #fbbf24;
  background: rgba(245, 158, 11, .16);
}

.x-saas-warning .x-saas-status__meta {
  color: #fde68a;
}

/* Vencida */
.x-saas-danger {
  background:
    radial-gradient(circle at top left, rgba(239, 68, 68, .18), transparent 42%),
    rgba(127, 29, 29, .34);
  border-color: rgba(239, 68, 68, .30);
}

.x-saas-danger .x-saas-status__icon {
  color: #fca5a5;
  background: rgba(239, 68, 68, .15);
}

.x-saas-danger .x-saas-status__meta {
  color: #fecaca;
}

/* Botón pequeño renovar */
.x-saas-renew-mini {
  min-height: 34px;
  padding: 0 12px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;

  border-radius: 999px;
  border: 1px solid rgba(147, 197, 253, .24);

  background: rgba(37, 99, 235, .14);
  color: #bfdbfe !important;

  font-size: 11px;
  font-weight: 900;
  text-decoration: none !important;
  white-space: nowrap;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .06),
    0 10px 24px rgba(0, 0, 0, .16);

  transition:
    transform .18s ease,
    background .18s ease,
    border-color .18s ease,
    color .18s ease;
}

.x-saas-renew-mini i {
  font-size: 11px;
  color: #93c5fd;
}

.x-saas-renew-mini:hover {
  transform: translateY(-1px);
  background: rgba(37, 99, 235, .22);
  border-color: rgba(147, 197, 253, .42);
  color: #f8fafc !important;
}

/* =========================================================
   FIX TOPBAR MOBILE - XPERTECH V2
   Evita que suscripción/caja/sucursal rompan el navbar
========================================================= */

.x-topbar {
  min-height: 64px;
  height: 64px;
  padding: 0 14px !important;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: visible;
}

.x-topbar__left {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.x-topbar__center {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.x-topbar__right {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  min-width: 0;
}

.x-topbar__nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  flex-wrap: nowrap;
}

.x-saas-status-wrap-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.x-saas-status {
  min-width: 0;
  max-width: 100%;
}

.x-saas-status__body--inline {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.x-saas-status__text,
.x-saas-status__meta {
  white-space: nowrap;
}

.x-top-caja-chip,
.x-sucursal-chip,
.x-notify-trigger,
.x-user-nav {
  white-space: nowrap;
}

/* =========================================================
   TABLET / MOBILE
========================================================= */
@media (max-width: 991px) {
  .x-topbar {
    height: 58px;
    min-height: 58px;
    padding: 0 10px !important;
    gap: 7px;
  }

  .x-topbar__menu {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
  }

  .x-topbar__center {
    flex: 1 1 auto;
    max-width: calc(100vw - 195px);
  }

  .x-saas-status-wrap-inline {
    gap: 6px;
    width: 100%;
  }

  .x-saas-status {
    height: 40px;
    max-width: 100%;
    padding: 0 10px;
    border-radius: 14px;
  }

  .x-saas-status__icon {
    width: 24px;
    min-width: 24px;
    height: 24px;
    font-size: 11px;
  }

  .x-saas-status__body {
    min-width: 0;
  }

  .x-saas-status__text {
    font-size: 12px;
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .x-saas-status__meta {
    font-size: 11px;
  }

  .x-saas-renew-mini {
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 14px;
    justify-content: center;
  }

  .x-saas-renew-mini span {
    display: none !important;
  }

  .x-topbar__nav {
    gap: 6px;
  }

  .x-top-caja-chip {
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0 !important;
    border-radius: 14px;
    justify-content: center;
  }

  .x-top-caja-dot,
  .x-top-caja-text {
    display: none !important;
  }

  .x-sucursal-chip {
    max-width: 122px;
    height: 40px;
    padding: 0 10px !important;
    border-radius: 14px;
  }

  .x-sucursal-chip__text {
    max-width: 78px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .x-notify-trigger {
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0 !important;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .x-user-nav {
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0 !important;
    border-radius: 14px;
    justify-content: center;
  }

  .x-user-nav__name {
    display: none !important;
  }

  .x-user-avatar {
    width: 28px;
    height: 28px;
    margin: 0 !important;
  }
}

/* =========================================================
   CELULARES PEQUEÑOS
========================================================= */
@media (max-width: 575px) {
  .x-topbar {
    padding: 0 8px !important;
    gap: 6px;
  }

  .x-topbar__center {
    max-width: calc(100vw - 178px);
  }

  .x-saas-status {
    height: 38px;
    padding: 0 8px;
  }

  .x-saas-status__icon {
    width: 22px;
    min-width: 22px;
    height: 22px;
    font-size: 10px;
  }

  .x-saas-status__text {
    max-width: 58px;
    font-size: 11px;
  }

  .x-saas-status__meta {
    font-size: 10px;
  }

  .x-saas-renew-mini {
    display: none !important;
  }

  .x-top-caja-chip {
    display: none !important;
  }

  .x-sucursal-chip {
    max-width: 95px;
    height: 38px;
  }

  .x-sucursal-chip__text {
    max-width: 55px;
    font-size: 11px;
  }

  .x-notify-trigger,
  .x-user-nav,
  .x-topbar__menu {
    width: 38px;
    min-width: 38px;
    height: 38px;
  }

  .x-notify-menu {
    position: fixed !important;
    top: 62px !important;
    right: 10px !important;
    left: 10px !important;
    width: auto !important;
    max-width: none !important;
    transform: none !important;
  }
}

/* =========================================================
   CELULARES MUY ANGOSTOS
========================================================= */
@media (max-width: 390px) {
  .x-topbar__center {
    max-width: calc(100vw - 145px);
  }

  .x-saas-status__meta {
    display: none !important;
  }

  .x-saas-status__text {
    max-width: 65px;
  }

  .x-sucursal-chip__text {
    display: none !important;
  }

  .x-sucursal-chip {
    width: 38px;
    min-width: 38px;
    padding: 0 !important;
    justify-content: center;
  }
}

.x-saas-status--readonly {
  cursor: default;
  pointer-events: none;
}

.x-saas-renew-mini--readonly {
  cursor: default;
  opacity: .95;
  background: rgba(251, 191, 36, .12);
  border: 1px solid rgba(251, 191, 36, .35);
  color: #FBBF24;
}

.x-sidepro__subnav a {
  padding-left: 18px !important;
  padding-right: 8px !important;
  display: flex !important;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.x-sidepro__subnav a i {
  width: 18px !important;
  min-width: 18px !important;
  margin-right: 6px !important;
  text-align: center;
  font-size: 13px;
}

.x-sidepro__subnav a span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}