.view-panel table thead th,
.modal table thead th {
  position: sticky !important;
  top: 0 !important;
  background: #f1f5f9 !important;
  z-index: 10 !important;
  box-shadow: inset 0 -1.5px 0 #e2e8f0 !important;
}

:root {
  --bg-color: #ffffff;
  --text-color: #000000;
  --gray-light: #f0f0f0;
  --gray-mid: #cccccc;
  --gray-dark: #1e3a7a;
  --accent: #555555;
  --primary-blue: #1A316B;
  --secondary-blue: #1e3a7a;
  --gold-accent: #f59e0b;
}

/* REGLA GLOBAL: Cabeceras siempre en Azul Institucional */
.view-header {
  background: linear-gradient(135deg, #1A316B 0%, #1e3a7a 100%) !important;
  border-bottom: 2px solid #f59e0b !important;
  color: white !important;
}

.pharma-table thead tr {
  background: linear-gradient(135deg, #1A316B 0%, #1e3a7a 100%) !important;
}

.pharma-table thead th {
  color: white !important;
  background: linear-gradient(135deg, #1A316B 0%, #1e3a7a 100%) !important;
}

@keyframes pharmaSlideIn {
  from {
    transform: translateX(120%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes pharmaSlideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(120%);
    opacity: 0;
  }
}

.pharma-toast {
  min-width: 480px;
  max-width: 580px;
  background: white;
  color: #1e293b;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-left: 6px solid #ef4444;
  pointer-events: auto;
  animation: pharmaSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  font-family: 'Outfit', sans-serif;
  border: 1px solid #f1f5f9;
}

/* Standardizing Scrollbar for verification */
#exist-viewer-panel::-webkit-scrollbar,
#existFarmacia-viewer-panel::-webkit-scrollbar {
  width: 14px;
}

#exist-viewer-panel::-webkit-scrollbar-thumb,
#existFarmacia-viewer-panel::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}

/* Premium Dashboard Layout Designer Button */
#btn-edit-layout {
  background: white; 
  border: 1px solid #cbd5e1; 
  border-radius: 20px; 
  padding: 8px 16px; 
  font-size: 12px; 
  font-weight: 700; 
  color: #1e3a8a; 
  cursor: pointer; 
  display: flex; 
  align-items: center; 
  gap: 6px; 
  box-shadow: 0 1px 3px rgba(0,0,0,0.05); 
  transition: all 0.2s; 
  outline: none; 
  margin-left: 10px;
}
#btn-edit-layout:hover {
  background: #eff6ff;
}
#btn-edit-layout.active-edit {
  background: #10b981 !important;
  color: white !important;
  border-color: #10b981 !important;
}
#btn-edit-layout.active-edit:hover {
  background: #0d9488 !important;
}

/* Corel Draw Style Canvas Designer */
#dashboard-canvas {
  position: relative;
  width: 100%;
  min-height: 750px;
  background: #ffffff;
}
.designer-widget {
  position: absolute;
  box-sizing: border-box;
  user-select: none;
}
#widget-ventas-sucursal,
#widget-ventas-departamento,
#widget-ingresos-forma-pago {
  display: flex !important;
  flex-direction: column;
}
#widget-body-sucursal,
#widget-body-departamento,
#widget-body-forma-pago {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding-right: 4px;
}
#widget-body-sucursal::-webkit-scrollbar,
#widget-body-departamento::-webkit-scrollbar,
#widget-body-forma-pago::-webkit-scrollbar {
  width: 6px;
}
#widget-body-sucursal::-webkit-scrollbar-track,
#widget-body-departamento::-webkit-scrollbar-track,
#widget-body-forma-pago::-webkit-scrollbar-track {
  background: transparent;
}
#widget-body-sucursal::-webkit-scrollbar-thumb,
#widget-body-departamento::-webkit-scrollbar-thumb,
#widget-body-forma-pago::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}
#widget-body-sucursal::-webkit-scrollbar-thumb:hover,
#widget-body-departamento::-webkit-scrollbar-thumb:hover,
#widget-body-forma-pago::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
/* Sizing handle styles */
.resizer-r, .resizer-b, .resizer-br {
  display: none;
}
.active-edit .resizer-r, .active-edit .resizer-b, .active-edit .resizer-br {
  display: block;
}
.active-edit .designer-widget {
  outline: 2px dashed #3b82f6 !important;
  cursor: move !important;
}
