.bggradient{
  background: linear-gradient(135deg,#f8fafc,#eef2f7);
}

/* ===== Tablas: separación de filas visible + encabezado marcado (look profesional) ===== */
.table {
  --ins-table-border-color: #e5e9f0;                 /* borde entre filas visible (antes casi invisible) */
  --ins-table-hover-bg: rgba(101, 88, 221, .05);     /* hover con tinte primario sutil */
}
.table > thead > tr > th {
  border-bottom: 2px solid #dde2ea;                  /* subrayado del encabezado más marcado */
  font-weight: 600;
  white-space: nowrap;
  color: #495364;
}
.table > tbody > tr {
  border-bottom: 1px solid #eceff4;                  /* refuerza la línea entre filas */
}
.table > tbody > tr:last-child { border-bottom: 0; }

.ql-toolbar{
  background: #f8f8f8!important;
}

.ql-container{
  background: #fff !important;
}
/****************AJUSTES TEMA**********************************/
body{

  min-height:100vh;

  background: #f4f4f4;

}


/* Sub-ítems del menú: icono compacto + espacio para el conector de árbol */
.side-nav .sub-menu .side-nav-item .side-nav-link {
    font-size: var(--ins-sidenav-sub-item-font-size);
    font-weight: var(--ins-sidenav-sub-item-font-weight);
    font-family: var(--ins-font-sans-serif);
    gap: 8px;
    padding: var(--ins-sidenav-sub-item-padding-y) var(--ins-sidenav-item-padding-x) var(--ins-sidenav-sub-item-padding-y) 34px;
    background: transparent;
}
/* El icono del sub-ítem NO usa la columna ancha del ítem padre */
.side-nav .sub-menu .side-nav-link .menu-icon {
    min-width: auto;
    font-size: 1rem;
    line-height: 1;
}

/* ---- Conectores tipo árbol en los submenús (estilo .sitemap-list de Ubold:
   trazo punteado con el color de borde del tema) ---- */
.side-nav .sub-menu {
  --tree-x: 20px;         /* posición de la línea vertical */
  position: relative;
}
.side-nav .sub-menu .side-nav-item {
  position: relative;
}
/* Segmento vertical que atraviesa cada item */
.side-nav .sub-menu .side-nav-item::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--tree-x);
  border-left: 1px dashed var(--ins-border-color);
}
/* Ramal horizontal hacia el icono del sub-ítem */
.side-nav .sub-menu .side-nav-item::after {
  content: "";
  position: absolute;
  top: 50%;
  left: var(--tree-x);
  width: 10px;
  border-top: 1px dashed var(--ins-border-color);
}
/* El último item corta la vertical a la altura del ramal (no cuelga) */
.side-nav .sub-menu .side-nav-item:last-child::before {
  bottom: auto;
  height: 50%;
}


.card:focus-within{
  z-index: 20;
}

.card{

  background-color: #ffffff;
  border-radius: 7px;
  box-shadow:
    0 10px 25px rgba(0,0,0,0.08),
    0 2px 6px rgba(0,0,0,0.05);
  transition: all .25s ease;
  border: 1px solid #eef2f7;
  will-change: height;
}



.card-header{
  background: transparent;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  font-weight: 600;
  padding: 16px 20px;
}

.table tbody tr{
  background: rgba(255,255,255,0.1)!important;
  backdrop-filter: blur(17px);
  -webkit-backdrop-filter: blur(17px);

  transition: all .18s ease;

}

.table{
  border-collapse: separate;
  border-spacing: 0 4px;
}

/*.table tbody tr:hover{
  background: rgba(255,255,255,0.3);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}*/

.table td,
.table th{
  border: none;
  padding: 14px 16px;
  vertical-align: middle;
  background: transparent !important;
}


.btnFloat{
  position: fixed;
  right: 10px;
  top: 50%;
  z-index: 1050;
}


.form-control,
.form-select{
  background: rgba(255,255,255,0.7);
  border:1px solid rgba(0,0,0,0.08);
  padding:10px 12px;
  transition: all .2s ease;

}


.form-control:focus,
.form-select:focus{
  border-color:#7c3aed;
  box-shadow:0 0 0 3px rgba(124,58,237,0.15);
}


/******************FIN AJUSTES********************************/

/* Aplica a TODA tabla DataTables (productos, facturas, clientes y futuras):
   DataTables colapsa la tabla y pisa el border-spacing general, así que se
   restaura el look de filas separadas del tema. */
table.dataTable{
  border-collapse: separate!important;
  border-spacing: 0 4px!important;
}

.table-container {
    max-height: 600px;
    min: 400px;
    overflow-y: auto;
}

.table td {
  padding: 7px 16px!important;
}

.table-container thead th {
    position: sticky;
    top: 0;
    background: #fff!important;
    z-index: 2;
}

.table-container thead th:first-child{
  border-top-left-radius: 8px;
}

.table-container thead th:last-child{
  border-top-right-radius: 8px;
}



.pointer{
	cursor: pointer!important;
}

.img-variante {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
}


#global-preloader{
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,1);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

/* Barra */
.loader-bar{
  width: 160px;
  height: 4px;
  background: #e5e5e5;
  overflow: hidden;
  position: relative;
  border-radius: 2px;
}

.loader-bar::after{
  content:'';
  position:absolute;
  left:-40%;
  width:40%;
  height:100%;
  background:#000;
  animation: barMove 1.2s ease-in-out infinite;
}

@keyframes barMove{
  to { left:100%; }
}

/* Texto */
.loader-text{
  font-size: 14px;
  color: #333;
}



/******************************/

/*Miniaturas cargar imágenes*/



/*sortable IMAGES*/

.sortable-ghost {
  opacity: 0.2;
}
.img-fluid{
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

#imagenes-producto > .imagen-item:first-child img {
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}


#imagenes-producto .imagen-item:first-of-type .drag-handle {
  display: none;
}


/* Texto superpuesto SOLO en la primera imagen */
#imagenes-producto .imagen-item:first-of-type::after {
  content: "Imagen principal";
  position: absolute;
  bottom: 0;
  left: 0%;
  background: rgba(200, 0, 0, 0.75);
  padding: 0 3px 0 3px;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  pointer-events: none;
  z-index: 5;
  width: 100%;
  text-align: center;
}


.imagen-item > a > img{
  border: 5px solid #fff!important;
}

.imagen-item {
  position: relative;
  height: 160px;
}

.imagen-item a {
  display: block;
  width: 100%;
  height: 100%;
}

.imagen-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


.imagen-item:hover img{
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}


.drag-handle {
  position: absolute;
  bottom: 7px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  background: rgba(234,0,0,0.7);
  color: #fff;
  padding: 2px 12px;
  border-radius: 4px;
  cursor: grab;
  user-select: none;
  z-index: 10;
}

@media (pointer: coarse) {/*Móvil*/
  .drag-handle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

@media (pointer: fine) {/*Desktop*/
  .drag-handle {

  }
}

.imagen-item:active {
  cursor: grabbing;
}

.imagen-item.activa {
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.contentPrincipal{
  background: linear-gradient(180deg, #f5f5f5 0%, #e0e0e0 100%);
}

.contentPrincipal > img{
  border: 5px solid #fff!important;
}


/******************************/

.seo-file-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  height: 44px;
  padding: 0 18px;
  border-radius: 5px;

  background: linear-gradient(180deg, #7b5cff, #5a3ee6);
  color: #fff;

  font-size: 15px;
  font-weight: 600;
  letter-spacing: .2px;

  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;

  box-shadow:
    0 6px 12px rgba(90,62,230,.35),
    inset 0 -1px 0 rgba(255,255,255,.15);

  transition:
    transform .12s ease,
    box-shadow .12s ease,
    background .12s ease;
}

/* Press (mobile + desktop) */
.seo-file-label:active {
  transform: scale(.96);
  box-shadow:
    0 3px 6px rgba(90,62,230,.25),
    inset 0 2px 4px rgba(0,0,0,.2);
}

/* Hover solo en desktop */
@media (hover: hover) {
  .seo-file-label:hover {
    box-shadow:
      0 8px 16px rgba(90,62,230,.4),
      inset 0 -1px 0 rgba(255,255,255,.15);
  }
}

.seo-icon {
  font-size: 18px;
  line-height: 1;
}

/******************************/

.check-showinweb{
  position: absolute;
  top: 15px;
  left:27px;
  transform: scale(1.4);
  cursor: pointer;
  z-index: 10;
}

@media (pointer: fine) {
  .check-showinweb{
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }

  .imagen-item:hover .check-showinweb{
    opacity: 1;
    pointer-events: auto;
  }
}

/******************************/

.btn-del-image-product{
  position: absolute;
  right: 24px;
  top: 12px;
  width: 20px;
  height: 20px;
  z-index: 15;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;    /* centra vertical */
  justify-content: center;/* centra horizontal */
}

/* Desktop: ocultar */
@media (pointer: fine) {
  .btn-del-image-product{
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }

  /* Mostrar solo al hover del contenedor */
  .imagen-item:hover .btn-del-image-product{
    opacity: 1;
    pointer-events: auto;
  }
}



.dropzone {
  min-height: 150px!important;
  /*border: 3px dashed rgb(71 7 232 / 80%)!important;*/
  width: 100%!important;
  padding: 15px!important;
}



@media (pointer: coarse) {/*Móvil*/
  .dropzone .dz-preview.dz-image-preview {
    background: #fffafa;
    border-radius: 15px;
    width: 100%;
    height: 200px;
  }

  .dropzone .dz-preview .dz-image {
      width: 100%!important;
      height: 100%!important;
  }

  .dropzone .dz-preview .dz-image img {
      display: block;
      width: 100%;
      height: auto;
  }

  .dropzone .dz-preview.dz-image-preview {
      left: -15px!important;
  }
}


.skeleton-box {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  background: linear-gradient(
    100deg,
    #e4e4e4 40%,
    #f2f2f2 50%,
    #e4e4e4 60%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.1s infinite;
}

@keyframes skeleton-loading {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}



/************* Otros estilos *********************/

.content-miniaturas{
  overflow-y: auto;  max-height: 450px; padding: 25px;border-radius: 4px;
  /*background-image: url(https://goroutecr.com/assets/images/stock/add-product.jpg);*/
  background-size: cover;
  background-position: center;
  min-height: 150px;
}

.inset-shadow1 {
  box-shadow:
  inset 0 2px 4px rgba(0, 0, 0, 0.18),
  inset 0 -2px 6px rgba(255, 255, 255, 0.7);
}


/**************************************/

.form-control-sm {
    max-height: 15px!important;
  }

/*.form-control {
  border: 1px solid lightslategrey;
  padding: 0.7rem 0.9rem;
  font-size: 0.9rem;
  transition: background-color .15s ease, box-shadow .15s ease;
  box-shadow: inset 2px 2px 3px rgba(0, 0, 0, 0.1);
}*/

.form-control:hover {
  background-color: #f1f3f9;
  border-color: #d0d5f7;
}

.form-control:focus {
  transition: background-color .15s ease, box-shadow .15s ease;
  box-shadow: inset 2px 2px 6px rgba(0, 0, 0, 0.1);
}


/*****************/

.variante-bloqueada {
  opacity: 0.3;
  pointer-events: none; /* evita interacción */
  transition: opacity 0.2s ease;
}

.variante-bloqueada input {
  background-color: #f5f5f5 !important;
}

/* El mensaje de validación se saca del flujo para que aparecer no empuje el resto del
   formulario hacia abajo. Sin `top`/`left` se queda en su posición estática —justo debajo del
   campo—, así que en un contenedor normal no se nota. */
.invalid-feedback{
  position:absolute!important;
}

/* …pero dentro de un `input-group` sí se nota, y feo. Por especificación, un hijo absoluto de un
   contenedor FLEX no se queda en su posición estática: se ancla al origen del contenedor, o sea
   la esquina superior izquierda del grupo, y el mensaje termina encima del campo.
   Acá se devuelve al flujo: `.input-group` es flex con `flex-wrap`, y como `.invalid-feedback`
   es `width:100%`, baja solo a la línea siguiente. Es el comportamiento que espera Bootstrap
   —por eso el grupo lleva `has-validation`— y el que muestra `form-validation.html`. */
.input-group .invalid-feedback{
  position:static!important;
}

/*******************/

.contnotfounddata{
  padding: 0px;
  min-height: 450px;
}


.crop-container{
    width:100%;
    max-height:500px;
    overflow:hidden;
}

.crop-container img{
    max-width:100%;
}

#preview{
  width:48px;
  height:48px;
  min-width:48px;
  min-height:48px;
  background: #cdcdcd;
  background-image: url('../images/image-placeholder.jpg');
  background-size: cover;
}

.preview-md{
    overflow:hidden;
    background:#eee;
    width:73px;
    height:73px;
}

/* ─────────────────────────────────────────────────────────────
   Acciones de cabecera en MÓVIL — convención de Mario (2026-08-15)
   Los botones de acción de una pantalla NUNCA se apilan uno por fila:
   van de dos en dos, al 50 % exacto y alineados entre sí, para no
   comerse el alto de la pantalla. El texto de cada botón se mantiene
   al mínimo (una palabra) para que no salte a dos líneas.
   Uso: <div class="acciones-cabecera d-flex flex-wrap gap-2 justify-content-end">
        dentro de un contenedor con flex-wrap.
   ───────────────────────────────────────────────────────────── */
@media (max-width: 767.98px) {
  .acciones-cabecera {
    width: 100%;
    margin-top: .5rem;
  }
  /* flex-grow en 0: un botón impar se queda al 50 % y NO se estira a fila completa. */
  .acciones-cabecera > .btn {
    flex: 0 0 calc(50% - .25rem);
    max-width: calc(50% - .25rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Flecha del menú lateral: el tema la rota con DOS reglas —`.side-nav-item.active` (la sección
   de la página actual) y `[aria-expanded=true]`— pero no tiene ninguna que la devuelva a 0. Al
   colapsar a mano una sección que además es la activa, la primera regla la deja apuntando hacia
   arriba como si siguiera abierta.
   El estado real de un desplegable lo dice `aria-expanded`, así que esa es la que manda. */
.side-nav .side-nav-item > a[aria-expanded="false"] .menu-arrow {
  transform: rotate(0deg) !important;
}
