@charset "UTF-8";
:root {
  --sidebar-width: 250px;
  --sidebar-collapsed-width: 80px;
  --sidebar-bg: #222b32;
  --sidebar-hover-bg: rgba(255, 255, 255, 0.1);
  --sidebar-active-bg: #4db7cd;
  --tooltip-bg: #212529;
}

#sidebar {
  width: var(--sidebar-width);
  background-color: var(--sidebar-bg);
  transition: all 0.5s;
  z-index: 1000;
}

#sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
  overflow: visible;
  z-index: 9999;
}

/* #sidebar.collapsed ul li .sidebar-text {
  
} */

.sidebar-text {
  transition: all 0.5s;
}

#sidebar.collapsed .sidebar-text {
  opacity: 0;
  width: 0;
  font-size: 0;
  transition: all 0s;
}

.sidebar-header {
  margin-top: -20px;
  transition: all 5s;
  background-color: var(--sidebar-active-bg);
  padding: 0.75rem;
}

#sidebar.collapsed .sidebar-header h4 {
  font-size: 0;
  opacity: 0;
  /* transition: all 0.5s; */
}

.sidebar-logo {
  width: 35px;
  height: 35px;
  object-fit: contain;
  transition: all 0.5s;
  /* filter: brightness(0) invert(1); */
}

#sidebar.collapsed .sidebar-logo {
  width: 35px;
  height: 35px;
}

#content {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  transition: all 0.5s;
}

#content.expanded {
  margin-left: var(--sidebar-collapsed-width);
  width: calc(100% - var(--sidebar-collapsed-width));
}

.nav-link {
  position: relative;
}

.nav-link:hover {
  background-color: var(--sidebar-active-bg);
  color: white;
}

.nav-link .tooltip-text {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  left: 70px;
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--tooltip-bg);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 1000;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

#nav-link-cerrarsesion:hover {
  background-color: #eb0808;
  color: white;
}

.header-card {
  background: #f1f1f1;
  border-radius: 15px;
  padding: 25px 30px;
  margin-bottom: 25px;
  box-shadow: 0 2px 10px var(--shadow-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.header-title {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary-color) 0%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* color: var(--sidebar-active-bg); */
  font-size: 70px;
}

/* Solo mostrar tooltips en desktop cuando está colapsado */
@media (min-width: 769px) {
  #sidebar.collapsed .nav-link:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
  }
}
@media (max-width: 768px) {
  #sidebar {
    position: fixed;
    left: calc(var(--sidebar-width) * -1);
    z-index: 1050;
    height: 100vh;
  }
  #sidebar.show {
    left: 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
  }
  #sidebar.collapsed {
    width: var(--sidebar-width);
  }
  /* En móvil mostrar textos en blanco */
  #sidebar .nav-link {
    color: white !important;
  }
  /* Ocultar tooltips completamente en móvil */
  #sidebar .tooltip-text {
    display: none !important;
  }
  #content {
    margin-left: 0;
    width: 100%;
  }
  #content.expanded {
    margin-left: 0;
    width: 100%;
  }
  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    display: none;
  }
  .sidebar-overlay.show {
    display: block;
  }
}

/* ========== LOADING SCREEN ========== */
.Loading__Screen {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(15, 23, 30, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
}

.Loading__Screen.active {
  display: flex;
  animation: loaderFadeIn 0.2s ease forwards;
}

.Loading__Screen.hiding {
  animation: loaderFadeOut 0.3s ease forwards;
}

@keyframes loaderFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes loaderFadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

.loader-card {
  background: #fff;
  border-radius: 20px;
  padding: 40px 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  animation: loaderCardIn 0.25s cubic-bezier(.34,1.56,.64,1) forwards;
}

@keyframes loaderCardIn {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.loader-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 10px;
}

/* Spinner ring */
.loader-ring {
  display: inline-block;
  position: relative;
  width: 56px;
  height: 56px;
}
.loader-ring div {
  box-sizing: border-box;
  display: block;
  position: absolute;
  width: 48px;
  height: 48px;
  margin: 4px;
  border: 5px solid transparent;
  border-radius: 50%;
  animation: loaderSpin 1.1s cubic-bezier(.5,0,.5,1) infinite;
  border-top-color: var(--bs-primary, #4db7cd);
}
.loader-ring div:nth-child(1) { animation-delay: -0.45s; }
.loader-ring div:nth-child(2) { animation-delay: -0.3s;  border-top-color: color-mix(in srgb, var(--bs-primary, #4db7cd) 65%, transparent); }
.loader-ring div:nth-child(3) { animation-delay: -0.15s; border-top-color: color-mix(in srgb, var(--bs-primary, #4db7cd) 35%, transparent); }
.loader-ring div:nth-child(4) { animation-delay: 0s;     border-top-color: color-mix(in srgb, var(--bs-primary, #4db7cd) 15%, transparent); }

@keyframes loaderSpin {
  0%   { transform: rotate(0deg);   }
  100% { transform: rotate(360deg); }
}

.loader-text {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #555;
  letter-spacing: 0.5px;
}

.loader-dots::after {
  content: '';
  animation: loaderDots 1.4s steps(4, end) infinite;
}

@keyframes loaderDots {
  0%   { content: '';    }
  25%  { content: '.';   }
  50%  { content: '..';  }
  75%  { content: '...'; }
  100% { content: '';    }
}
/* ===================================== */

/*# sourceMappingURL=style.css.map */

.chk-factura,
.chk-all {
  width: 1.25rem; /* ~20px */
  height: 1.25rem;
  margin: 0.15rem;
  cursor: pointer;
}

td .form-check-input {
  transform: scale(1.1);
  margin: 0.25rem;
}

.form-check-input:checked {
  box-shadow: 0 0 0 0.15rem rgba(77, 183, 205, 0.18);
}

table.table-sm tbody tr td:first-child {
  cursor: pointer;
  vertical-align: middle;
}

/* ── Filas de facturas: resaltado al seleccionar ── */
tr.factura-row {
  transition: box-shadow 0.15s ease, transform 0.05s ease;
}

/* Cuando el checkbox de la factura está marcado */
tr.factura-selected {
  --bs-table-bg: #eaf7fb; /* fondo suave cuando está seleccionada (sobrescribe si no hay rowColor) */
  box-shadow: inset 3px 0 0 0 #4db7cd; /* barra lateral izquierda de acento */
}

/* Si la fila ya tenía color por CodigoDestino y además está seleccionada,
   respetamos el color pero aplicamos la barra lateral y un leve overlay */
tr.factura-selected[style*="--bs-table-bg"] {
  filter: brightness(0.97);
}

/* Contador (badge) al lado del checkbox maestro */
.chk-counter {
  font-size: 0.75rem;
  font-weight: 600;
  vertical-align: middle;
  min-width: 46px;
  display: inline-block;
  transition: background-color 0.2s ease;
}

/* Estilos para tabla de proveedores con collapse */
#tableProveedores .btn-link {
  text-decoration: none;
  color: #6c757d;
  transition: transform 0.2s ease;
}

#tableProveedores .btn-link[aria-expanded="true"] i {
  transform: rotate(180deg);
}

#tableProveedores .btn-link:hover {
  color: #4db7cd;
}

#tableProveedores tr.collapse.show {
  background-color: #f8f9fa;
}

/* Estilos para accordion de valores CXP */
#accordionValoresCxp .accordion-button {
  font-weight: 500;
  background-color: #f8f9fa;
}

#accordionValoresCxp .accordion-button:not(.collapsed) {
  background-color: #e7f5f8;
  color: #4db7cd;
}

#accordionValoresCxp .accordion-body {
  padding: 0.75rem;
}

#accordionValoresCxp .table {
  margin-bottom: 0;
}

#accordionValoresCxp .badge {
  font-size: 0.75rem;
}


