/* ============================================================
   styles.css — Pharmago · Sistema de Gestión Farmacéutica
   Secciones: 1.Variables · 2.Reset · 3.Layout · 4.Sidebar
              5.Header · 6.Main · 7.Cards · 8.Componentes
              9.Módulo Ventas POS · 10.Dashboard · 11.Responsive
   ============================================================ */

/* ── 1. VARIABLES ─────────────────────────────────────────── */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Lato:wght@400;700&family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Roboto:wght@400;500;700&display=swap");
/* ── 1. IMPORTANDO LA RUTA DE LOS CSSs ─────────────────────────────────────────── */
@import url("./caja.css");
@import url("./clientes.css");
@import url("./comprobantes.css");
@import url("./compras.css");
@import url("./productos.css");
@import url("./egreso_ingreso.css");
@import url("./entradas_salidas.css");
@import url("./inventarios.css");
@import url("./servicios.css");
@import url("./proveedores.css");
@import url("./mantenimiento.css");
@import url("./metodos_pago.css");
@import url("./notificaciones.css");
@import url("./ventas.css");
@import url("./empresa.css");
@import url("./reporteventas_analisis.css");
@import url("./reporteventas_valorizados.css");
@import url("./reporteventas_cajaefectivo.css");
/* Importación unificada en la cabecera */
@import url("./reporteventas_ingresosclientes.css");
@import url("./reporteventas_productosusuarios.css");
@import url("./reporteinventario_productos.css");
@import url("./usuarios.css");
@import url("./dashboard.css");
@import url("./sistema.css");
@import url("./puntos.css");
@import url("./estilos_temas.css");

:root {
  /* --- Variables de Estructura y Tipografía (Globales) --- */
  
  /* Marca Madre base corporativa unificada de Cicorp Business (Azul Oscuro de tu logo) */
  --sidebar-bg: #0C2850; 
  --sidebar-logo-bg: #2F4DAA; /* Tu Azul Cicorpgo Corporativo AZUL BUK*/
  
  /* Variable dinámica maestra: Cambia automáticamente por JS/Backend según el giro.
     Por defecto inicia en el morado de Pharmago */
  --color-giro-acento: #3b82f6;

  /* Lógica inteligente: El hover y active toman el color del giro seleccionado
     y le aplican transparencia nativa para que sea un fondo tenue muy elegante */
  --sidebar-hover: cubic-bezier(0, 0, 0, 0); /* No tocar, abajo se procesa el color */
  --sidebar-hover-bg: color-mix(in srgb, var(--color-giro-acento) 22%, transparent);
  --sidebar-active-bg: color-mix(in srgb, var(--color-giro-acento) 40%, transparent);
  
  --sidebar-text: #ffffff; /* Blanco nítido */
  --sidebar-dim: #e5e7eb;
  
  /* Medidas fijas */
  --sidebar-w: 264px;     /* Aumentado 10% de 240px */
  --sidebar-col: 66px;    /* Aumentado 10% de 60px */
  --header-height: 66px;
  --t: 0.2s ease;


  /* Variable de tiempo para transiciones */
  --app-font-family: "Plus Jakarta Sans", system-ui, sans-serif;

  /* --- Paleta de Colores Base (Consistente en ambos modos) --- */
  --logo-red: #e63946;
  --bg-app: #f4f5f9;
  --bg-card: #ffffff;
  --border: #e5e7eb;
  --radius: 12px;
  --radius-sm: 8px;
  --text-1: #0c2850;
  --blue: #3b82f6;
  --blue-dk: #1d4ed8;
  --green: #10b981;
  --green-dk: #065f46;
  --amber: #f59e0b;
  --amber-dk: #92400e;
  --orange: #f97316;
  --orange-dk: #9a3412;
  --red: #ef4444;
  --red-dk: #991b1b;
  --sidebar-logo-bg: #8b5cf6;
  --sidebar-logo-bg-dk: #5b21b6;
  --indigo: #6366f1;
  --indigo-dk: #4338ca;
  --rose: #f43f5e;
  --rose-dk: #be123c;
  --black: #1e293b;
  --black-dk: #0f172a;

  /* Variables que antes estaban en .light-mode */
  --text-2: #6b7280;
  --text-3: #9ca3af;
  --blue-lt: #eff6ff;
  --green-lt: #ecfdf5;
  --amber-lt: #fffbeb;
  --orange-lt: #fff7ed;
  --red-lt: #fef2f2;
  --sidebar-logo-bg-lt: #f5f3ff;
  --rose-lt: #fff1f2;
  --indigo-lt: #eef2ff;
  --black-lt: #f1f5f9;
  --bg-overlay: rgba(15, 23, 42, 0.5);
  --blue-lt-hover: #dbeafe;
  --green-lt-hover: #d1fae5;
  --amber-lt-hover: #fef3c7;
  --orange-lt-hover: #ffedd5;
  --red-lt-hover: #fee2e2;
  --sidebar-logo-bg-lt-hover: #ede9fe;
  --rose-lt-hover: #ffe4e6;
  --indigo-lt-hover: #e0e7ff;
  --black-lt-hover: #f3f4f6;
}

/* ── 2. RESET & BASE ──────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  height: 100%;
}

html,
body {
  max-width: 100%;
  overflow: hidden;
  height: 100%;
}

body {
  font-family: var(--app-font-family);
  background: var(--bg-app);
  color: var(--text-1);
  line-height: 1.5;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

ul,
ol {
  list-style: none;
}

table {
  width: 100%;
  border-collapse: collapse;
}

/* ── 3. LAYOUT PRINCIPAL ──────────────────────────────────── */
#app-layout {
  display: flex;
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: var(--bg-app);
}

/* ── 4. SIDEBAR ───────────────────────────────────────────── */
#sidebar {
  background: var(--sidebar-bg);
  width: var(--sidebar-w);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width var(--t);
  z-index: 200;
  flex-shrink: 0;
}

#sidebar.collapsed {
  width: var(--sidebar-col);
}

/*LOGO CUADRADO*/
.sidebar-logo {
  display: flex;
  background: var(--sidebar-logo-bg);
  /* Morado vibrante corporativo */
  align-items: center;
  gap: 0.6rem;
  padding: 0 20px;
  height: var(--header-height);
  box-sizing: border-box;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  flex-shrink: 0;
}

.logo-icon {
  background: var(--logo-red);
  color: #fff;
  font-size: 1rem;
  /* Aumentamos un poco la letra/icono interno */
  font-weight: 700;
  border-radius: 8px;
  /* Un redondeado suave para que parezca un App Icon cuadrado */
  width: 40px;
  /* Aumentado para que llene mejor el espacio */
  height: 40px;
  /* Altura igual al ancho para que sea cuadrado perfecto */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-text {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  transition:
    opacity var(--t),
    width var(--t);
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 224px;
}

.sidebar-logo-brand {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.sidebar-logo-img {
  max-height: 48px;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

#sidebar-logo-long:not(.hidden) {
  animation: pm-fade-in 0.8s ease both;
}

.sidebar-logo-img.hidden {
  display: none;
}

/* New styles for text branding in sidebar */
.sidebar-text-brand {
  color: #ffffff;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  /* Use flex to center content */
  align-items: center;
  justify-content: center;
  height: 100%;
  /* To fill the parent container */
  box-sizing: border-box;
  /* Include padding in element's total width and height */
}

.sidebar-text-long {
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0;
  text-align: center;
  width: 100%;
  max-width: 224px;
  /* Espacio útil real (264px - 40px padding) */
  line-height: 1.2;
  color: #fff;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0 auto;
}

.sidebar-text-small {
  font-size: 1.2rem;
  /* Larger for small icon-like display */
  width: 53px;
  /* Match the small logo size */
  height: 53px;
  /* Match the small logo size */
  border-radius: 8px;
  /* Rounded corners */
  background: rgba(255, 255, 255, 0.15);
  /* Subtle background */
  text-align: center;
  line-height: 1;
  /* Center vertically */
  display: flex;
  /* Ensure flex properties apply */
  align-items: center;
  justify-content: center;
}

/* Ensure existing logo-icon and logo-text are hidden by default and only shown if no other branding */
.sidebar-logo .logo-icon,
.sidebar-logo .logo-text {
  display: none !important;
  /* Always hide these by default, JS will show if needed as ultimate fallback */
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.3rem 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
  height: auto !important;
}

.sidebar-nav::-webkit-scrollbar {
  width: 2px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

/* Nivel 1 */
.nav-item {
  position: relative;
  height: auto !important;
  /* Cambiado de 52px a auto */
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.48rem 0.85rem;
  color: #ffffff;
  /* Blanco nítido */
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.15s ease;
  position: relative;
  user-select: none;
  min-height: 44px;
  border-radius: 10px;
  margin: 4px 10px;
}

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

.nav-link:hover .nav-icon {
  transform: scale(1.15);
}

.nav-link:hover .nav-icon {
  transform: scale(1.15);
}

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

.nav-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15%;
  bottom: 15%;
  width: 3px;
  background: #ffffff;
  border-radius: 0 3px 3px 0;
}

.nav-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  color: #ffffff;
  opacity: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.nav-label {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  transition:
    opacity var(--t),
    width var(--t);
  font-weight: 700;
}

.nav-arrow {
  width: 12px;
  height: 12px;
  color: #ffffff;
  transition: transform var(--t);
  flex-shrink: 0;
}

.nav-arrow.open {
  transform: rotate(90deg);
}

/* Nivel 2 */
.submenu-l2 {
  position: relative !important;
  overflow: visible !important;
  max-height: 0;
  height: auto;
  transition:
    max-height 0.3s ease,
    opacity 0.3s ease;
  background: rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
}

.submenu-l2.open {
  max-height: 600px;
  opacity: 1;
  pointer-events: auto;
}

.sub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.42rem 0.85rem 0.42rem 2.55rem;
  color: #ffffff;
  font-size: 0.73rem;
  font-weight: 400;
  cursor: pointer;
  transition:
    background var(--t),
    color var(--t);
  user-select: none;
  white-space: nowrap;
}

.sub-header:hover {
  background: var(--sidebar-hover-bg);
  color: #fff;
}

.sub-header {
  margin: 2px 10px;
  border-radius: 8px;
}

.sub-header .sub-arrow {
  width: 11px;
  height: 11px;
  color: rgba(255, 255, 255, 0.7);
  transition: transform var(--t);
  flex-shrink: 0;
}

.sub-header .sub-arrow.open {
  transform: rotate(90deg);
}

.sub-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem 0.85rem 0.38rem 2.55rem;
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 400;
  cursor: pointer;
  transition:
    background var(--t),
    color var(--t);
  white-space: nowrap;
  user-select: none;
}

.sub-link:hover {
  background: var(--sidebar-hover-bg);
  color: #fff;
}

.sub-link:hover .sub-dot {
  transform: scale(1.6);
  background: #fff;
}

.sub-link.active {
  color: #fff;
  background: var(--sidebar-active-bg);
}

.sub-link {
  margin: 2px 10px;
  border-radius: 8px;
}

.sub-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
  margin-left: 2px;
  transition: transform 0.2s ease;
}

/* Nivel 3 */
.submenu-l3 {
  position: relative !important;
  overflow: visible !important;
  max-height: 0;
  height: auto;
  transition:
    max-height 0.25s ease,
    opacity 0.25s ease;
  background: rgba(0, 0, 0, 0.12);
  opacity: 0;
  pointer-events: none;
}

.submenu-l3.open {
  max-height: 400px;
  opacity: 1;
  pointer-events: auto;
}

.subsub-link {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.85rem 0.32rem 3.6rem;
  color: #ffffff;
  font-size: 0.71rem;
  font-weight: 400;
  cursor: pointer;
  transition:
    background var(--t),
    color var(--t);
  white-space: nowrap;
  user-select: none;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  margin-left: 2.55rem;
}

.subsub-link:hover {
  background: var(--sidebar-hover-bg);
  color: rgba(255, 255, 255, 0.85);
}

.subsub-link:hover .subsub-dot {
  transform: scale(1.8);
  background: #fff;
}

.subsub-link.active {
  color: #fff;
  background: var(--sidebar-active-bg);
}

.subsub-link {
  margin: 2px 10px 2px 40px;
  border-radius: 6px;
}

.subsub-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

/* Estado colapsado */
#sidebar.collapsed .nav-label,
#sidebar.collapsed .nav-arrow,
#sidebar.collapsed .logo-text,
#sidebar.collapsed .submenu-l2,
#sidebar.collapsed .sidebar-footer-text {
  display: none !important;
  /* Cambiado de opacity a none para que no ocupe espacio */
}

#sidebar.collapsed .nav-link {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 0 !important;
  margin: 6px 8px !important;
  width: calc(100% - 16px) !important;
  height: 52px !important;
  border-radius: 10px !important;
}

/* Tamaño de los iconos de la barra reducido para que sea más elegante */
#sidebar.collapsed .nav-icon {
  margin: 0 !important;
  width: 28px !important;
  /* Ancho fijo para asegurar el centro */
  height: 28px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transform: scale(1.1);
  /* Aumento del 10% */
}

/* Hover en collapsed para que el fondo cubra todo el ancho */
#sidebar.collapsed .nav-link:hover {
  background: var(--sidebar-hover-bg) !important;
  color: #fff;
  transform: none;
  /* Evita que el link entero se mueva, solo el icono si quieres */
}

#sidebar.collapsed .nav-link:hover .nav-icon {
  transform: scale(1.25);
}

/* Logo centrado en collapsed-Sidebar Caudrado */
#sidebar.collapsed .sidebar-logo {
  display: flex;
  justify-content: center !important;
  align-items: center !important;
  padding: 0;
  height: var(--header-height) !important;
}

/* Ajuste del logo pequeño cuando el sidebar está plegado */
#sidebar.collapsed #sidebar-logo-small {
  width: 53px !important;
  height: 53px !important;
  max-height: 53px !important;
  object-fit: contain !important;
}

#sidebar.collapsed #sidebar-logo-small:not(.hidden) {
  animation: logo-pulse 2.5s infinite ease-in-out;
}

@keyframes logo-pulse {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }

  50% {
    transform: scale(1.1);
    filter: brightness(1.15);
  }

  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

/* Footer centrado en collapsed */
#sidebar.collapsed .sidebar-footer-inner {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  padding: 0 !important;
}

/* Tooltip sidebar colapsado */
.nav-item .tooltip {
  position: fixed;
  left: calc(var(--sidebar-col) + 12px);
  background: #0c2850;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.15s ease,
    visibility 0.15s ease;
  z-index: 9999;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

#sidebar.collapsed .nav-item:hover .tooltip,
#sidebar.collapsed .nav-item.tooltip-visible .tooltip {
  opacity: 1;
  visibility: visible;
}

.tooltip-simple {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 0.75rem !important;
}

.tooltip-simple-icon,
.tooltip-main-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.tooltip-simple-label,
.tooltip-main-label {
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 600;
}

/* Tooltip expandido con submenus jerárquicos */
.nav-item .tooltip-expanded {
  position: fixed;
  left: calc(var(--sidebar-col) + 12px);
  background: #0c2850;
  color: #fff;
  padding: 0;
  border-radius: 8px;
  pointer-events: auto;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
  z-index: 9999;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  min-width: 200px;
  max-width: 300px;
  max-height: 600px;
  overflow-y: auto;
}

#sidebar.collapsed .nav-item:hover .tooltip-expanded,
#sidebar.collapsed .nav-item.tooltip-visible .tooltip-expanded {
  opacity: 1;
  visibility: visible;
}

#sidebar.collapsed .nav-item:hover .nav-link.has-sub+.tooltip,
#sidebar.collapsed .nav-item.tooltip-visible .nav-link.has-sub+.tooltip {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Ajuste cuando el tooltip se abre hacia arriba */
.tooltip-expanded.tooltip-top {
  transform: translateY(-8px);
}

/* Indentado interno para sub-submenus dentro del tooltip */
.tooltip-submenu-item {
  padding: 0.45rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: background 0.2s ease;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  user-select: none;
}

.tooltip-submenu-item {
  padding-left: 1.5rem;
}

.tooltip-submenu-l3 .tooltip-submenu-item {
  padding-left: 2.3rem;
}

/* Cabecera principal del tooltip con icono y nombre del menú */
.tooltip-main-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--sidebar-hover-bg);
}

.tooltip-main-icon {
  width: 12px;
  height: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #ffffff;
}

.tooltip-main-icon svg {
  width: 100%;
  height: 100%;
  stroke-width: 2;
}

.tooltip-main-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Header con flecha para expandir/contraer en tooltip */
.tooltip-submenu-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: background 0.2s ease;
  font-size: 0.75rem;
  font-weight: 600;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  user-select: none;
}

.tooltip-submenu-header:hover {
  background: var(--sidebar-hover-bg);
}

.tooltip-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  font-size: 1rem;
  transition: transform 0.2s ease;
  color: #ffffff;
  flex-shrink: 0;
}

.tooltip-arrow.open {
  transform: rotate(90deg);
}

/* Submenu nivel 3 en tooltip (contraído por defecto) */
.tooltip-submenu-l3 {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.3s ease,
    opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.tooltip-submenu-l3.open {
  max-height: 400px;
  opacity: 1;
  pointer-events: auto;
}

/* Items dentro del tooltip */
.tooltip-submenu-item {
  padding: 0.45rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: background 0.2s ease;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  user-select: none;
}

.tooltip-submenu-item:hover {
  background: var(--sidebar-hover-bg);
}

.tooltip-submenu-item .sub-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.tooltip-submenu-item:hover .sub-dot {
  background: #fff;
}

/* Footer sidebar */
.sidebar-footer {
  padding: 0.5rem 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
}

.sidebar-footer-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.1rem;
  min-height: 36px;
}

.sidebar-footer-text {
  transition: opacity var(--t);
  overflow: hidden;
}

.footer-name {
  font-size: 0.73rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

.footer-role {
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
}

/* ── 5. HEADER ────────────────────────────────────────────── */
#app-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  height: var(--header-height);
  box-sizing: border-box;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;
  flex-shrink: 0;
  width: 100%;
  transition:
    background 0.3s ease,
    backdrop-filter 0.3s ease,
    box-shadow 0.3s ease;
}

#app-header.scrolled {
  background: rgba(255, 255, 255, 0.75); /* Fallback para navegadores sin backdrop-filter */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.5);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

#sidebar-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  border: 1px solid var(--border);
  transition: background var(--t);
}

#sidebar-toggle:hover {
  background: var(--sidebar-logo-bg-lt);
  color: var(--sidebar-logo-bg);
  animation: nv-confirm-pulse 1.5s infinite ease-in-out;
  transition: all var(--t);
}

#sidebar-toggle svg {
  width: 22px;
  height: 22px;
}

#sidebar-toggle .icon-mobile {
  display: none;
}

#sidebar-toggle .icon-desktop {
  display: block;
}

.breadcrumb {
  font-size: 0.78rem;
  color: var(--text-3);
  display: none;
}

.breadcrumb span {
  color: var(--text-1);
  font-weight: 500;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-icon-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  transition: background var(--t);
}

.header-icon-btn:hover {
  background: var(--bg-app);
}

.header-icon-btn svg {
  width: 18px;
  height: 18px;
}

.header-icon-btn svg {
  width: 20px;
  height: 20px;
}

/* Aumentado 15% */
.badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 16px;
  height: 16px;
  background: var(--logo-red);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
  box-shadow: 0 0 0 2px #fff;
  /* Marco blanco para resaltar el círculo completo */
  animation: badge-blink 2.2s infinite ease-in-out;
  z-index: 10;
}

@keyframes badge-blink {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}

/* Ocultar badges vacíos (sin número) */
.badge:empty {
  display: none;
}

.header-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
  margin: 0 0.25rem;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--t);
}

.header-user:hover {
  background: var(--bg-app);
}

.header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sidebar-logo-bg), var(--blue));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}

.header-user-info {
  display: none;
}

.header-user-name {
  font-size: 0.8rem;
  font-weight: 600;
}

.header-user-role {
  font-size: 0.65rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── 6. MAIN & UTILIDADES ─────────────────────────────────── */
/* Contenedor principal que se ajusta al sidebar */
.main-wrapper {
  margin-left: var(--sidebar-w);
  width: calc(100% - var(--sidebar-w));
  height: 100%;
  display: flex;
  flex-direction: column;
  transition:
    margin-left var(--t),
    width var(--t);
  overflow: hidden;
  position: relative;
}

#app-layout.sidebar-collapsed .main-wrapper {
  margin-left: var(--sidebar-col);
  width: calc(100% - var(--sidebar-col));
}

#app-main {
  padding: calc(var(--header-height) + 0.75rem) 2rem 0.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

#main-content {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}
/*============= DISEÑO DEL SPINNER DE ALTA DENSIDAD=========*/
.loading-spinner {
  position: fixed;
  inset: 0;
  background: #0c2850;
  /* Fondo del Spinner - Morado-negro corporativo */
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.5s ease,
    visibility 0.5s;
}

.nv-loader-ring-container {
  position: relative;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nv-loader-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 8px solid #2F4DAA;
  border-top: 8px solid #fff;
  /* Anillo del Spinner - Azul Cicorpgo corporativo */
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 1;
}

.nv-loader-text-inner {
  display: none;
  font-size: 10px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nv-loader-text-bottom {
  margin-top: 1.5rem;
  color: #ffffff;
  font-weight: 700;
  font-size: 25px;
  /* Texto Cargando... Spinner - Aumentado 40% de 15px */
  letter-spacing: 0.5px;
}

.nv-dots::after {
  content: "";
  animation: nv-dots-anim 2s infinite;
}

@keyframes nv-dots-anim {
  0% {
    content: "";
  }

  25% {
    content: ".";
  }

  50% {
    content: "..";
  }

  75% {
    content: "...";
  }

  100% {
    content: "";
  }
}

.nv-loader-hidden {
  opacity: 0 !important;
  visibility: hidden !important;
}

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

.spin {
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.1rem;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.page-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.badge-num {
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--blue-lt);
  color: var(--blue-dk);
  padding: 0.2rem 0.5rem;
  border-radius: 20px;
}

.page-subtitle {
  font-size: 0.8rem;
  color: var(--text-3);
  margin-top: 0.2rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  background: var(--sidebar-bg);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  transition: background var(--t);
}

.btn-primary:hover {
  background: var(--sidebar-hover);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-2);
  background: var(--bg-card);
  transition: background var(--t);
}

.btn-outline:hover {
  background: var(--bg-app);
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  background: #fef2f2;
  color: var(--red-dk);
  border: 1px solid #fca5a5;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  width: 100%;
  justify-content: center;
  margin-top: 0.5rem;
  transition: background var(--t);
}

.btn-danger:hover {
  background: #fee2e2;
}

#overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 150;
  opacity: 0;
  transition: opacity var(--t);
}

#overlay.active {
  display: block;
  opacity: 1;
}

/* ============== DISEÑO DEL SHOWTOAST=============
DISEÑO DE ALTA DENSIDAD PARA LAS NOTIFICACIONES DE CONFIRMACIÓN*/
#toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  position: relative;
  padding: 1.1rem 1.25rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 340px;
  box-sizing: border-box;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateX(100%) scale(0.98);
  transition:
    opacity 0.4s ease,
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.toast.show {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.toast.hide {
  opacity: 0;
  transform: translateX(20px) scale(0.98);
}
/* SHOWTOAST EXITO - VERDE*/
.toast-success {
  --toast-color: #22c55e;
  background: rgba(34, 197, 94, 0.26);
  color: var(--toast-color);
}
/* SHOWTOAST ERROR - ROJO*/
.toast-error {
  --toast-color: #ef4444;
  background: rgba(239, 68, 68, 0.26);
  color: var(--toast-color);
}
/* SHOWTOAST INFORMACIÓN - AZUL*/
.toast-info {
  --toast-color: #3b82f6;
  background: rgba(59, 130, 246, 0.26);
  color: var(--toast-color);
}
/* SHOWTOAST ALERTA - AMARILLO*/
.toast-warning {
  --toast-color: #f59e0b;
  background: rgba(245, 158, 11, 0.26);
  color: var(--toast-color);
}

.toast::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 0 0 10px 10px;
  background: var(--toast-color);
}

.toast-icon {
  flex-shrink: 0;
  color: var(--toast-color);
}

.toast-icon svg {
  width: 18px;
  height: 18px;
}

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
  color: var(--toast-color);
}

.toast-message {
  font-size: 0.82rem;
  line-height: 1.4;
  font-weight: 500;
  color: var(--toast-color);
}

.toast-close {
  background: none;
  border: none;
  padding: 4px;
  margin: 0;
  cursor: pointer;
  color: inherit;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.toast-close:hover {
  opacity: 1;
}

.toast-close svg {
  width: 21px;
  height: 21px;
}

@media (max-width: 479px) {
  #toast-container {
    top: 0.75rem;
    right: 0.75rem;
    left: 0.75rem;
  }

  .toast {
    width: 100%;
    max-width: none;
  }
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-box {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1rem;
  font-weight: 700;
}

.modal-close {
  color: var(--text-3);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background var(--t);
}

.modal-close:hover {
  background: var(--bg-app);
}

/* Placeholder */
@keyframes modalFadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

.modal-fade-out {
  animation: modalFadeOut 0.3s ease-out forwards;
}

.placeholder-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-app);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  gap: 0.75rem;
}

.placeholder-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--sidebar-logo-bg-lt);
  color: var(--sidebar-logo-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder-icon svg {
  width: 28px;
  height: 28px;
}

.placeholder-section h2 {
  font-size: 1.1rem;
  font-weight: 700;
}

.placeholder-section p {
  font-size: 0.85rem;
  color: var(--text-2);
  max-width: 360px;
}

/* ── 7. CARDS INICIO ──────────────────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition:
    border-color var(--t),
    transform var(--t),
    background-color var(--t),
    box-shadow var(--t);
  animation: fadeUp 0.3s ease both;
}

.summary-card:hover {
  border-color: #d0d5dd;
  transform: translateY(-4px);
  box-shadow:
    0 12px 20px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

.summary-card:nth-child(1) {
  animation-delay: 0.04s;
}

.summary-card:nth-child(2) {
  animation-delay: 0.08s;
}

.summary-card:nth-child(3) {
  animation-delay: 0.12s;
}

.summary-card:nth-child(4) {
  animation-delay: 0.16s;
}

.summary-card:nth-child(5) {
  animation-delay: 0.2s;
}

.summary-card:nth-child(6) {
  animation-delay: 0.24s;
}

.card-top {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.card-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-icon-wrap svg {
  width: 20px;
  height: 20px;
  transition: transform var(--t);
}

.summary-card:hover .card-icon-wrap svg {
  transform: scale(1.15);
}

.card-body {
  flex: 1;
}

.card-label {
  font-size: 0.78rem;
  color: var(--text-2);
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.card-value {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1;
}

.card-action {
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

/* Efectos de hover para cada color de tarjeta */
.summary-card.summary-card--blue:hover {
  background-color: var(--blue-lt-hover);
}

.summary-card.summary-card--green:hover {
  background-color: var(--green-lt-hover);
}

.summary-card.summary-card--amber:hover {
  background-color: var(--amber-lt-hover);
}

.summary-card.summary-card--orange:hover {
  background-color: var(--orange-lt-hover);
}

.summary-card.summary-card--red:hover {
  background-color: var(--red-lt-hover);
}

.summary-card.summary-card--sidebar-logo-bg:hover {
  background-color: var(--sidebar-logo-bg-lt-hover);
}

.summary-card.summary-card--rose:hover {
  background-color: var(--rose-lt-hover);
}

.summary-card.summary-card--black:hover {
  background-color: var(--black-lt-hover);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.78rem;
  font-weight: 600;
  transition: gap var(--t);
}

.summary-card--sidebar-logo-bg-solid {
  background-color: #6b21a8 !important;
  border-color: #5b21b6 !important;
  color: #ffffff !important;
  cursor: default !important;
}

.summary-card--sidebar-logo-bg-solid .card-label,
.summary-card--sidebar-logo-bg-solid .card-value {
  color: #ffffff !important;
}

.summary-card--sidebar-logo-bg-solid .card-icon-wrap {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}

.summary-card--sidebar-logo-bg-solid:hover {
  transform: none !important;
  box-shadow: none !important;
  background-color: #6b21a8 !important;
}

.card-link:hover {
  gap: 0.45rem;
}

/* Mantiene el efecto de gap para el texto "Ver más" */
.icon-blue {
  background: var(--blue-lt);
  color: var(--blue);
}

.icon-green {
  background: var(--green-lt);
  color: var(--green);
}

.icon-amber {
  background: var(--amber-lt);
  color: var(--amber);
}

.icon-orange {
  background: var(--orange-lt);
  color: var(--orange);
}

.icon-red {
  background: var(--red-lt);
  color: var(--red);
}

.icon-purple {
  background: var(--sidebar-logo-bg-lt);
  color: var(--sidebar-logo-bg);
}

/* Mantener para el icono de purple-solid */
.icon-indigo {
  background: var(--indigo-lt);
  color: var(--indigo);
}

.icon-rose {
  background: var(--rose-lt);
  color: var(--rose);
}

.icon-black {
  background: var(--black-lt);
  color: var(--black);
}

.link-blue {
  color: var(--blue-dk);
}

.link-green {
  color: var(--green-dk);
}

.link-amber {
  color: var(--amber-dk);
}

.link-orange {
  color: var(--orange-dk);
}

.link-red {
  color: var(--red-dk);
}

.link-purple {
  color: var(--sidebar-logo-bg-dk);
}

.link-indigo {
  color: var(--indigo-dk);
}

.link-rose {
  color: var(--rose-dk);
}

.link-black {
  color: var(--black-dk);
}

/* ── 8. COMPONENTES GENERALES ─────────────────────────────── */
.card-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.panel-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.panel-title svg {
  width: 16px;
  height: 16px;
  color: var(--text-2);
}

/* Formularios */
.form-card {
  width: 100%;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.form-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.form-row .form-group {
  min-width: 140px;
}

.form-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-2);
}

.input-field {
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-family: inherit;
  color: var(--text-1);
  background: var(--bg-card);
  transition: border-color var(--t);
  outline: none;
  width: 100%;
}
.input-field:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.phm-form-input,
.cl-form-input {
  width: 100%;
  height: 40px;
  padding: 0 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-1);
  font-size: 0.84rem;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
  transition: border-color var(--t), box-shadow var(--t);
}
/*======CLASE MAESTRA FOCUS PARA LOS INPUTS========*/
.phm-form-input:focus,
.cl-form-input:focus {
  border-color: #2F4DAA;
  box-shadow: 0 0 0 3px rgba(47, 77, 170, 0.12);
}

textarea.input-field {
  resize: vertical;
}

.form-hint {
  font-size: 0.72rem;
  color: var(--text-3);
  margin-top: 0.25rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.84rem;
  cursor: pointer;
}

.checkbox-label input {
  width: 16px;
  height: 16px;
  accent-color: var(--sidebar-bg);
}

.form-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Tablas globales */
.data-table th {
  text-align: left;
  padding: 0.6rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-2);
  background: #fafafa;
  border-bottom: 2px solid var(--border);
}

.data-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}

.data-table tr:hover td {
  background: #fafeff;
}

.data-table code {
  background: #f1f5f9;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.78rem;
}

.td-actions {
  display: flex;
  gap: 0.4rem;
}

.table-responsive-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-responsive-wrap::-webkit-scrollbar {
  height: 4px;
}

.table-responsive-wrap::-webkit-scrollbar-thumb {
  background: #c4c9d4;
  border-radius: 2px;
}

/* Badges estado */
.badge-estado {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
}

.badge-estado.completada {
  background: var(--sidebar-logo-bg-lt);
  color: var(--sidebar-logo-bg-dk);
}

.badge-estado.recibida {
  background: var(--blue-lt);
  color: var(--blue-dk);
}

.badge-estado.anulada {
  background: var(--red-lt);
  color: var(--red-dk);
}

.stock-ok {
  color: var(--sidebar-logo-bg-dk);
  font-weight: 600;
}

.stock-low {
  color: var(--red);
  font-weight: 600;
}

/* Semáforo de Stock Global */
.stock-badge {
  padding: 3px 10px;
  border-radius: 9999px;
  font-weight: 800;
  font-size: 11px;
  white-space: nowrap;
  display: inline-block;
  border: 1px solid transparent;
}

.stock-badge-blue {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #dbeafe;
}

.stock-badge-orange {
  background: #fff7ed;
  color: #c2410c;
  border-color: #ffedd5;
}

.stock-badge-red {
  background: #fef2f2;
  color: #ef4444;
  border-color: #fecaca;
}

/* Lista cards (proveedores, clientes, usuarios) */
.cards-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.list-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: border-color var(--t);
}

.list-card:hover {
  border-color: #d0d5dd;
}

.list-card-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.list-card-icon svg {
  width: 20px;
  height: 20px;
}

.list-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.list-card-body strong {
  font-size: 0.9rem;
  color: var(--text-1);
}

.list-card-body span {
  font-size: 0.78rem;
  color: var(--text-2);
}

.list-card-actions {
  display: flex;
  gap: 0.4rem;
}

.btn-icon-edit,
.btn-icon-del,
.btn-icon-toggle {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background var(--t),
    color var(--t);
}

.btn-icon-edit svg,
.btn-icon-del svg,
.btn-icon-toggle svg {
  width: 15px;
  height: 15px;
}

.btn-icon-edit {
  color: var(--blue);
}

.btn-icon-edit:hover {
  background: var(--blue-lt);
}

.btn-icon-del {
  color: var(--text-3);
}

.btn-icon-del:hover {
  color: var(--red);
  background: var(--red-lt);
}

.btn-icon-toggle {
  color: var(--sidebar-logo-bg);
}

.btn-icon-toggle:hover {
  background: var(--sidebar-logo-bg-lt);
}

.badge-rol {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 600;
}

.badge-rol.administrador {
  background: var(--sidebar-logo-bg-lt);
  color: var(--sidebar-logo-bg-dk);
}

.badge-rol.cajero {
  background: var(--blue-lt);
  color: var(--blue-dk);
}

.badge-rol.almacén {
  background: var(--amber-lt);
  color: var(--amber-dk);
}

.badge-rol.farmacéutico {
  background: var(--sidebar-logo-bg-lt);
  color: var(--sidebar-logo-bg-dk);
}

/* Layouts compras/ventas */
.venta-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.venta-left,
.venta-right {
  display: flex;
  flex-direction: column;
}

/* ── 11. RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 479px) {
  .cards-grid {
    grid-template-columns: 1fr !important;
  }

  .summary-card {
    padding: 0.85rem 1rem;
  }

  .card-value {
    font-size: 1.3rem;
  }

  /* No se aplica a db-kpi-card */
  .page-header {
    margin-bottom: 0.75rem;
  }

  .page-title {
    font-size: 1.1rem;
  }
}

@media (min-width: 480px) and (max-width: 899px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (min-width: 600px) {
  .breadcrumb {
    display: block;
  }

  .header-user-info {
    display: block;
  }

  .venta-layout {
    grid-template-columns: 1fr 320px;
  }

  .caja-layout {
    grid-template-columns: 320px 1fr;
  }

  .db-kpi-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.65rem;
  }
}

@media (min-width: 900px) {
  .cards-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  #app-main {
    padding: calc(var(--header-height) + 1.25rem) 1.5rem 1.25rem;
  }

  .page-title {
    font-size: 1.25rem;
  }
}

@media (max-width: 767px) {

  .main-wrapper,
  #app-layout.sidebar-collapsed .main-wrapper {
    margin-left: 0;
    width: 100%;
  }

  #sidebar-toggle {
    color: var(--sidebar-logo-bg) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    animation: nv-confirm-pulse 2s infinite ease-in-out;
  }

  #sidebar-toggle .icon-mobile {
    display: block !important;
  }

  #sidebar-toggle .icon-desktop {
    display: none !important;
  }

  #sidebar-toggle svg {
    width: 20px !important;
    height: 20px !important;
  }

  #sidebar {
    transform: translateX(-100%);
    transition: transform var(--t);
    width: var(--sidebar-w) !important;
  }

  #sidebar.mobile-open {
    transform: translateX(0);
  }

  .tooltip {
    display: none !important;
  }

  .form-row {
    flex-direction: column;
  }

  .venta-layout,
  .caja-layout,
  .nv-layout {
    grid-template-columns: 1fr;
  }

  #app-main {
    overflow-x: hidden;
    padding: calc(var(--header-height) + 0.65rem) 0.75rem 0.65rem;
  }

  .card-panel,
  .data-table,
  .db-table {
    min-width: 0;
  }

  .card-panel {
    overflow-x: auto;
  }

  .data-table {
    min-width: 540px;
  }
}

/* Scrollbar global */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Menú Contextual */
.context-menu {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 160px;
  z-index: 1000;
  overflow: hidden;
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: none;
  background: transparent;
  color: var(--text-1);
  font-size: 0.78rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background var(--t);
  font-family: inherit;
}

.context-menu-item:hover {
  background: var(--bg-app);
}

/* ── 12. MEJORAS INICIO (LIVE CLOCK & MOBILE) ─────────────── */
.dynamic-subtitle {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  white-space: nowrap;
}

.greeting-container {
  color: var(--sidebar-logo-bg);
  font-weight: 800;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
}

.greeting-container i,
.greeting-container svg {
  width: 14px;
  height: 14px;
}

.subtitle-sep {
  display: inline;
  color: var(--text-3);
  opacity: 0.5;
}

.clock-span {
  font-size: 0.8rem;
  color: var(--text-3);
}

@media (max-width: 479px) {
  .dynamic-subtitle {
    flex-direction: row;
    align-items: center;
    gap: 4px;
    overflow: hidden;
  }

  .greeting-container {
    font-size: 0.62rem;
    gap: 3px;
  }

  .greeting-container i,
  .greeting-container svg {
    width: 12px;
    height: 12px;
  }

  .clock-span {
    font-size: 0.62rem;
  }

  .subtitle-sep {
    display: inline;
    margin: 0 1px;
  }

  .quick-access-group {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 4px;
    width: 100%;
  }

  .quick-access-group::after {
    display: none;
  }

  .quick-access-info {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex: 1 1 auto;
    min-width: 0;
  }

  .quick-access-info::after {
    content: "";
    display: inline-flex;
    flex: 1 1 auto;
    min-width: 0;
    height: 1px;
    background: var(--border);
    margin-left: 0.75rem;
    opacity: 1;
  }

  .quick-access-counter {
    font-size: 0.78rem;
    margin-top: 0;
    text-align: right;
    flex-shrink: 0;
  }
}

/* ── CLASE MAESTRA DE BUSCADOR PROFESIONAL ─────────────────────────────── */
/*
  Diseño reutilizable para buscadores en cualquier módulo.
  Esta clase encapsula la apariencia visual del buscador de clientes,
  manteniendo un estilo limpio y consistente para escritorio y móvil.

  Características:
  - Contenedor con altura fija, fondo blanco y bordes suaves.
  - Icono interno alineado a la izquierda con color neutro que reacciona al foco.
  - Campo de texto sin borde visible, con tipografía clara y legible.
  - Estado hover y focus con borde Azul Cicorpgo y sombra tenue.
  - Adaptación responsiva: en pantallas pequeñas ocupa todo el ancho disponible.
*/
.phm-search-master {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 220px;
  max-width: 450px;
  height: 40px;
  padding: 0 0.95rem 0 2.45rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-sizing: border-box;
  transition:
    border-color var(--t),
    box-shadow var(--t),
    background-color var(--t);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.phm-search-master:hover {
  border-color: #cbd5e1; /* Borde un poco más definido al pasar el mouse */
  background: #FAFAFF;    /* Tono blanquecino azulado ultra sutil */
}

/* Enfoque: Cambia al Azul Cicorpgo con su respectiva sombra de dispersión */
.phm-search-master:focus-within {
  border-color: #2F4DAA; /* Azul Cicorpgo Corporativo */
  box-shadow: 0 0 0 3px rgba(47, 77, 170, 0.12);
  background: #ffffff;
}

/* Ajuste responsivo para la altura del buscador en móviles */
@media (max-width: 767px) {
  .phm-search-master {
    padding-top: 0;
    padding-bottom: 0;
  }
}

.phm-search-master__icon {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--text-3);
  pointer-events: none;
  flex-shrink: 0;
  transition: color var(--t); /* Transición suave para el color del icono */
}

/* El icono se ilumina de color azul cuando se está escribiendo o el input está activo */
.phm-search-master:focus-within .phm-search-master__icon {
  color: #2F4DAA;
}

.phm-search-master__input {
  width: 100%;
  height: 100% !important;
  /* Asegura que el input llene el contenedor */
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-1);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  padding: 0;
  box-shadow: none;
}

.phm-search-master__input::placeholder {
  color: var(--text-3);
  font-weight: 500;
}

@media (max-width: 768px) {
  .phm-search-master {
    height: 40px;
    min-width: 0;
    max-width: none;
    width: 100%;
    padding-left: 2.3rem;
  }

  .phm-search-master__icon {
    left: 0.75rem;
    width: 13px;
    height: 13px;
  }

  .phm-search-master__input {
    font-size: 0.8rem;
  }
}


/* ── CLASE MAESTRA DE BOTÓN DE ACCIÓN ICONO COLUMNA, FILTROS Y EXPORTAR ────────────────── */
/*
  Diseño reutilizable para botones de toolbar tipo icono.
  Solo encapsula DISEÑO VISUAL: tamaño, colores, border, hover, estado activo.
  Cada módulo define su propio icono según su función.
*/
.phm-toolbar-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  color: var(--text-2);
  cursor: pointer;
  flex-shrink: 0;
  transition:
    background var(--t),
    border-color var(--t),
    color var(--t),
    box-shadow var(--t);
  box-sizing: border-box;
}

/* Al pasar el mouse o cuando el desplegable está abierto: Azul Cicorpgo Corporativo */
.phm-toolbar-btn:hover,
.phm-toolbar-btn.is-open {
  background: #2F4DAA; /* Azul Cicorpgo Corporativo */
  border-color: #2F4DAA;
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(47, 77, 170, 0.16); /* Sombra azulada sutil */
}

.phm-toolbar-btn:focus-visible {
  outline: none;
  border-color: #2F4DAA;
  box-shadow: 0 0 0 3px rgba(47, 77, 170, 0.12);
}

/* Cuando el filtro o columna está activo/aplicado: Azul muy claro de fondo, texto azul oscuro */
.phm-toolbar-btn.is-active {
  background: #EFF3FF; /* Tonalidad azul muy clara de fondo */
  border-color: #2F4DAA; /* Borde con tu Azul Corporativo */
  color: #0C2850;        /* Texto/Icono en tu Azul Oscuro */
  font-weight: 600;
}

.phm-toolbar-btn__icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.phm-toolbar-btn__badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #ffffff;
  background: var(--red);
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}

.phm-toolbar-btn__badge:empty {
  display: none;
}

.phm-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--sidebar-bg);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease,
    visibility 0.15s ease;
  z-index: 1000;
  line-height: 1.2;
}

.phm-tooltip.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.phm-tooltip-arrow {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 4px;
  border-style: solid;
  border-color: var(--sidebar-bg) transparent transparent transparent;
  width: 0;
  height: 0;
}

/* ── CLASE MAESTRA DE PANEL DE FILTRO/COLUMNAS ────────────── */
/*
  Diseño reutilizable para paneles tipo drawer o dropdown de filtros/columnas.
  Sirve para mostrar opciones sobre un botón icono sin depender del contenido interno.
*/
.phm-toolbar-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 190px;
  padding: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 9px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.phm-toolbar-panel__item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.32rem 0.5rem;
  border-radius: 5px;
  font-size: 0.76rem;
  color: var(--text-1);
  cursor: pointer;
  transition:
    background var(--t),
    color var(--t);
}

/* Al pasar el mouse: fondo sutil del sistema y texto resalta en el azul oscuro corporativo */
.phm-toolbar-panel__item:hover {
  background: var(--bg-app);
  color: #0C2850; /* Azul Oscuro para mayor legibilidad y enfoque */
}

/* Ajuste del acento para los inputs internos (Checkbox, Radio buttons) */
.phm-toolbar-panel__item input {
  width: 14px;
  height: 14px;
  accent-color: #2F4DAA; /* Azul Cicorpgo Corporativo unificado */
  cursor: pointer;
}


/* ── CLASE MAESTRA DE TOOLTIP PARA BOTONES ICONO ─────────── */
/*
  Tooltip visual para botones de toolbar, con el mismo estilo premium corporativo.
*/
.phm-toolbar-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 6px 10px;
  border-radius: 6px;
  background: #0C2850; /* Azul Oscuro Corporativo Unificado */
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(12, 40, 80, 0.2); /* Sombra adaptada al azul oscuro */
  transition:
    opacity 0.15s ease,
    transform 0.15s ease,
    visibility 0.15s ease;
  z-index: 1000;
}

.phm-toolbar-tooltip.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.phm-toolbar-tooltip__arrow {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-width: 4px;
  border-style: solid;
  border-color: #0C2850 transparent transparent transparent; /* Flecha con el mismo azul oscuro */
}

@media (max-width: 768px) {
  .phm-toolbar-btn {
    width: 40px;
    height: 40px;
  }

  .phm-toolbar-panel {
    min-width: 170px;
  }
}


/* ── CLASE MAESTRA DE BOTÓN DE ACCIÓN PRINCIPAL AGREGAR ────────────── */
/*
  Diseño reutilizable para botones primarios de acción (Cicorpgo Master).
  Estilo corporativo premium basado en el azul tecnológico de alta gama.
  Fondo azul real, texto blanco y efecto hover sutil con tono más oscuro.
*/
.phm-primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  height: 40px;
  padding: 0 1.2rem;
  border: none; /* Quitamos el borde para un diseño plano y limpio */
  border-radius: 10px;
  background: #2F4DAA; /* Azul Real Corporativo (Estilo Buk)#2F5DF7 - #2F4DAA  */
  color: #ffffff;      /* Letras blancas fijas */
  font-size: 0.78rem;
  font-weight: 700;
  font-family: inherit;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background var(--t),
    transform var(--t),
    box-shadow var(--t);
  box-shadow: 0 4px 12px rgba(47, 93, 247, 0.2); /* Sombra suave azulada */
  flex-shrink: 0;
}

/* Al pasar el mouse: solo cambia el fondo a un azul más oscuro y mantiene letras blancas */
.phm-primary-btn:hover {
  background: #0c2850; /* Azul tecnológico más oscuro */
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(29, 78, 216, 0.25);
}

.phm-primary-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 93, 247, 0.3);
}

.phm-primary-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  line-height: 1;
}

@media (max-width: 768px) {
  .phm-primary-btn {
    height: 40px;
    padding: 0 1rem;
    font-size: 0.76rem;
  }
}


/* ── CLASE MAESTRA DE TABLA PROFESIONAL ─────────────────────── */
/*
  Diseño reutilizable para tablas tipo CRM.
  Encapsula la apariencia visual de la tabla de clientes/proveedores:
  contenedor blanco, scroll interno, cabezales con tono claro,
  filas con hover sutil, paginador inferior y contador de resultados.

  Características:
  - Diseño limpio y profesional para escritorio y móvil.
  - Scroll interno vertical y horizontal con barras de 10px.
  - Hover de fila interactivo con borde indicador en Azul Cicorpgo.
  - Encabezados con fondo azul pastel e indicadores de orden activos.
  - Paginador con trigger, menú y botones de navegación unificados.
  - Indicador de página alineado a la derecha.
*/
.phm-table-shell {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 11px;
  overflow: hidden;
  box-sizing: border-box;
  position: relative;
}

.phm-table-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.phm-table-scroll::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.phm-table-scroll::-webkit-scrollbar-track {
  background: var(--bg-app);
}

.phm-table-scroll::-webkit-scrollbar-thumb {
  background: #c4c9d4;
  border-radius: 3px;
}

.phm-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 0.78rem;
}

/* Cabecera con fondo azul pastel de tonalidad baja (Estilo Interfarma) */
.phm-table__head th,
.phm-table__header {
  padding: 0.55rem 0.75rem;
  text-align: left;
  font-size: 0.68rem;
  font-weight: 700;
  color: #0C2850;      /* Texto principal en Azul Oscuro */
  background: #EFF3FF; /* Fondo Azul de tonalidad baja */
  border-bottom: 2px solid #E2E8F0;
  white-space: nowrap;
  user-select: none;
  transition:
    color var(--t),
    background var(--t);
}

/* Hover general de cabecera: texto cambia a Azul Corporativo */
.phm-table__head th:hover,
.phm-table__header:hover {
  color: #2F4DAA;
}

.phm-table__head th.phm-table__sortable,
.phm-table__header.phm-table__sortable {
  cursor: pointer;
  transition:
    background var(--t),
    color var(--t);
}

.phm-table__head th.phm-table__sortable:hover,
.phm-table__header.phm-table__sortable:hover {
  background: #E4ECFF; /* Fondo un poco más oscuro al pasar el mouse por columnas ordenables */
  color: #2F4DAA;
}

/* Estado activo cuando la columna está ordenando los datos */
.phm-table__head th.is-active,
.phm-table__header.is-active {
  color: #2F4DAA;
  background: #E4ECFF;
}

.phm-table__sort-ico {
  width: 11px;
  height: 11px;
  vertical-align: middle;
  margin-left: 0.25rem;
  opacity: 0.55;
  transition: color var(--t), opacity var(--t);
}

.phm-table__head th.phm-table__sortable:hover .phm-table__sort-ico,
.phm-table__header.phm-table__sortable:hover .phm-table__sort-ico,
.phm-table__head th.is-active .phm-table__sort-ico,
.phm-table__header.is-active .phm-table__sort-ico {
  opacity: 1;
  color: #2F4DAA;
}

.phm-table__body tr {
  position: relative;
  transition: background var(--t);
}

/* Hover dinámico de filas (Estilo Interfarma: fondo sutil y texto claro) */
.phm-table__body tr:hover {
  background: #F4F7FF; /* Fondo azul/celeste sumamente claro */
}

.phm-table__body tr:not(:last-child) td {
  border-bottom: 1px solid #E2E8F0;
}

.phm-table__cell,
.phm-table__body td {
  padding: 0.65rem 0.75rem; /* Un poco más de altura para un look más limpio y espaciado */
  vertical-align: middle;
  white-space: nowrap;
  color: var(--text-1);
}

.phm-table__cell--mono {
  font-family: "Courier New", monospace;
  font-size: 0.76rem;
  color: #0C2850; /* Código RUC en azul oscuro para destacar */
  letter-spacing: 0.02em;
}

.phm-table__cell--name {
  font-weight: 600;
  color: #0C2850; /* Nombre del Proveedor/Cliente en tono de énfasis */
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phm-table__cell--muted {
  color: var(--text-2);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.74rem;
}

.phm-table__badge {
  display: inline-block;
  background: #EFF3FF; /* Fondo unificado */
  color: #2F4DAA;      /* Texto en tu Azul Corporativo */
  font-size: 0.66rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

/* ──────────────── PÁGINA INFERIOR (PAGINADOR) ──────────────── */
.phm-table__pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.9rem;
  border-top: 1px solid var(--border);
  background: var(--bg-app);
  flex-wrap: wrap;
  flex-shrink: 0;
  position: relative;
  z-index: 20;
  overflow: visible;
}

.phm-table__pager-left,
.phm-table__pager-right {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.phm-table__pager-right {
  margin-left: auto;
  justify-content: flex-end;
}

.phm-table__pager-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.phm-table__pager-custom {
  position: relative;
}

.phm-table__pager-trigger {
  min-width: 92px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  border: 1px solid #d9dce7;
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-1);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0 0.7rem;
  outline: none;
  cursor: pointer;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
  transition:
    border-color var(--t),
    box-shadow var(--t),
    background-color var(--t);
}

.phm-table__pager-trigger:hover,
.phm-table__pager-trigger:focus,
.phm-table__pager-trigger.is-open {
  border-color: #2F4DAA; /* Borde Azul Corporativo */
  box-shadow: 0 0 0 3px rgba(47, 77, 170, 0.12);
  background-color: var(--bg-app);
}

/* Iconos de navegación del paginador */
.phm-table__pager-trigger i,
.phm-table__pager-trigger svg {
  color: #2F4DAA; /* Cambiado a tu Azul Corporativo */
  flex-shrink: 0;
}

.phm-table__pager-menu {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  min-width: 92px;
  background: var(--bg-card);
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  z-index: 50;
  display: block;
}

.phm-table__pager-menu.hidden {
  display: none;
}

.phm-table__pager-option {
  width: 100%;
  border: none;
  background: var(--bg-card);
  color: var(--text-1);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.6rem 0.7rem;
  text-align: left;
  cursor: pointer;
  transition:
    background var(--t),
    color var(--t);
}

.phm-table__pager-option:hover,
.phm-table__pager-option.is-active {
  background: #2F4DAA; /* Fondo Azul Corporativo al seleccionar filas a mostrar */
  color: #ffffff;
}

.phm-table__pager-page {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-1);
}

.phm-table__pager-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--t);
}

.phm-table__pager-btn:hover:not(:disabled) {
  background: #2F4DAA; /* Botones de navegación en Azul Corporativo */
  border-color: #2F4DAA;
  color: #ffffff;
}

.phm-table__pager-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.phm-table__footer-count {
  margin-top: 0.55rem;
  font-size: 0.73rem;
  color: var(--text-3);
  text-align: right;
  flex-shrink: 0;
}

.phm-table__footer-count strong {
  color: var(--text-1);
}

.phm-table__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 3.5rem 1rem;
  color: var(--text-3);
  font-size: 0.84rem;
}

.phm-table__empty i {
  width: 36px;
  height: 36px;
  opacity: 0.25;
}

/* ──────────────── CONFIGURACIÓN RESPONSIVA ──────────────── */
@media (max-width: 768px) {
  .phm-table-shell {
    border-radius: 10px;
  }

  .phm-table {
    min-width: 760px; /* Asegura un ancho responsivo correcto para scroll horizontal en tablets */
  }

  .phm-table__pager {
    padding: 0.65rem 0.75rem;
    gap: 0.75rem;
  }

  .phm-table__pager-right {
    margin-left: 0;
    width: 100%;
    justify-content: flex-end;
  }

  .phm-table__pager-trigger {
    min-width: 84px;
    height: 32px;
  }
}

/* ── CLASE MAESTRA DE BOTÓN SECUNDARIO MODAL (CANCELAR) ────────────── */
/*
  Diseño reutilizable para el botón secundario de los modales.
  Sirve para acciones como Cancelar, Descartar o Cerrar en cualquier módulo.
  Mantiene un estilo unificado de marca madre con animación sigilosa de tonos bajos.

  Características:
  - Fondo azul/gris hielo muy claro con borde gris suave y texto neutro.
  - Hover "sigiloso": un relleno degradado azul pastel crece desde la izquierda
    animando background-size, cambiando el texto al azul oscuro de Cicorpgo.
  - Ligera elevación (translateY) y sombra difusa adaptada al pasar el cursor.
  - Estado :active que devuelve el botón a su sitio con sensación táctil.
*/
.phm-modal-btn-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 40px;
  padding: 0 1rem;
  border: 1px solid #E2E8F0; /* Borde gris suave de la tabla */
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600; /* Subido ligeramente a 600 para mejorar la lectura en tonos bajos */
  font-family: inherit;
  line-height: 1;
  color: #475569; /* Color de texto inicial neutro y profesional */
  cursor: pointer;
  box-sizing: border-box;
  /* Relleno sigiloso: el degradado azul pastel crece desde la izquierda */
  background-color: #F8FAFC; /* Fondo azul/gris hielo sutil */
  background-image: linear-gradient(135deg, #EFF3FF 0%, #E4ECFF 100%); /* Degradado pastel suave */
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 0% 100%;
  transition:
    background-size 0.55s cubic-bezier(0.22, 0.61, 0.36, 1),
    color 0.45s ease,
    border-color 0.45s ease,
    box-shadow 0.45s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Al pasar el mouse: se expande el fondo azul pastel, el borde se acentúa y el texto pasa a azul oscuro */
.phm-modal-btn-cancel:hover {
  color: #0C2850;        /* Texto cambia a tu Azul Oscuro */
  border-color: #2F4DAA;  /* Borde cambia a tu Azul Corporativo */
  background-size: 100% 100%;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -6px rgba(47, 77, 170, 0.25); /* Sombra azulada muy tenue */
}

.phm-modal-btn-cancel:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px -3px rgba(47, 77, 170, 0.2);
}

.phm-modal-btn-cancel:focus-visible {
  outline: 2px solid #2F4DAA; /* Enfoque en sintonía con el sistema */
  outline-offset: 2px;
}

/* ── CLASE MAESTRA DE BOTÓN PRIMARIO MODAL (GUARDAR) ──────────────── */
/*
  Diseño reutilizable para el botón primario de los modales.
  Sirve para acciones como Guardar, Crear o Confirmar en cualquier módulo.
  Mantiene un estilo unificado de marca madre con animación sigilosa.

  Características:
  - Fondo Azul Cicorpgo con texto blanco en negrita.
  - Hover "sigiloso": el tono azul oscuro (#0C2850) crece desde la izquierda
    animando background-size, sin tapar el texto.
  - Ligera elevación (translateY) y sombra difusa adaptada al azul al pasar el cursor.
  - Estado :active que devuelve el botón a su sitio con sensación táctil.
*/
.phm-modal-btn-save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 40px;
  padding: 0 1.1rem;
  border: none;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: inherit;
  line-height: 1;
  color: #ffffff;
  cursor: pointer;
  box-sizing: border-box;
  /* Relleno sigiloso adaptado: el tono azul oscuro crece desde la izquierda. */
  background-color: #2F4DAA; /* Azul Cicorpgo base */
  background-image: linear-gradient(135deg, #0C2850 0%, #112A6C 100%); /* Gradiente basado en tu Azul Oscuro */
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 0% 100%;
  transition:
    background-size 0.55s cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 0.45s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Al pasar el mouse: la animación se expande al 100% y se oscurece con el gradiente azul */
.phm-modal-btn-save:hover {
  background-size: 100% 100%;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -6px rgba(12, 40, 80, 0.55); /* Sombra adaptada al azul oscuro */
}

.phm-modal-btn-save:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px -3px rgba(12, 40, 80, 0.5);
}

.phm-modal-btn-save:focus-visible {
  outline: 2px solid #2F4DAA; /* Enfoque con Azul Cicorpgo */
  outline-offset: 2px;
}

.phm-modal-btn-save:disabled,
.phm-modal-btn-save:disabled:hover {
  background-color: #d1d5db;
  /* gris-300 de Tailwind */
  background-image: none;
  color: #9ca3af;
  /* gris-400 de Tailwind */
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ── CLASE MAESTRA DE PANEL LATERAL FILTROS (DRAWER) ────────────── */
/*
  Diseño reutilizable para paneles laterales tipo drawer de filtros.
  Se abre desde la derecha cubriendo el 30% del ancho de pantalla.
  Incluye overlay semi-transparente y animación suave.

  Estructura recomendada:
  - .phm-filter-overlay (fondo semi-transparente)
  - .phm-filter-panel (contenedor del panel)
    - .phm-filter-header (título + botón cerrar)
    - .phm-filter-body (opciones de filtro)
    - .phm-filter-footer (botones Limpiar/Aplicar) — opcional
*/

.phm-filter-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 2400;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.phm-filter-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.phm-filter-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  height: 100dvh;
  max-height: 100dvh;
  background: var(--bg-card);
  box-shadow: -15px 0 40px rgba(12, 40, 80, 0.1); /* Sombra adaptada a la base azul */
  z-index: 2401;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  overflow: hidden;
}

.phm-filter-panel.is-open {
  transform: translateX(0);
}

.phm-filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.phm-filter-header h2 {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0C2850; /* Título principal en tu Azul Oscuro */
  margin: 0;
}

.phm-filter-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: none;
  background: var(--bg-app);
  color: var(--text-3);
  cursor: pointer;
  transition: all 0.2s ease;
}

.phm-filter-close:hover {
  background: #EFF3FF; /* Fondo azul pastel suave */
  color: #2F4DAA;      /* Icono en tu Azul Corporativo */
  transform: rotate(90deg);
}

.phm-filter-body {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.phm-filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.phm-filter-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.phm-filter-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  user-select: none;
}

.phm-filter-option:hover {
  background: var(--bg-app);
  color: #0C2850; /* El texto se resalta en azul oscuro al pasar el cursor */
}

.phm-filter-option input {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #2F4DAA; /* Checkbox unificado con tu Azul Corporativo */
}

.phm-filter-option label {
  flex: 1;
  font-size: 0.85rem;
  color: var(--text-1);
  cursor: pointer;
  margin: 0;
}

.phm-filter-footer {
  display: flex;
  gap: 0.8rem;
  padding: 1.2rem 1.5rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg-card);
}

.phm-filter-btn {
  flex: 1;
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-1);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Botón Secundario (Limpiar filtros) */
.phm-filter-btn:hover {
  background: var(--bg-app);
  border-color: #2F4DAA; /* Borde Azul Corporativo */
  color: #2F4DAA;        /* Texto Azul Corporativo */
}

/* Botón Primario (Aplicar filtros) */
.phm-filter-btn--primary {
  background: #2F4DAA; /* Fondo Azul Cicorpgo */
  color: #ffffff;
  border-color: #2F4DAA;
}

.phm-filter-btn--primary:hover {
  background: #0C2850;     /* Cambia sutilmente a tu Azul Oscuro corporativo */
  border-color: #0C2850;
  color: #ffffff;
}

@media (max-width: 768px) {
  .phm-filter-panel {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-left: none;
  }

  .phm-filter-body {
    padding: 1rem;
    padding-bottom: calc(6.2rem + env(safe-area-inset-bottom));
  }

  .phm-filter-footer {
    position: sticky;
    bottom: 0;
    z-index: 2;
    padding: 0.9rem 1rem calc(0.9rem + env(safe-area-inset-bottom));
    box-shadow: 0 -6px 18px rgba(12, 40, 80, 0.06); /* Sombra responsiva azulada sutil */
  }
}


/* ── CLASE MAESTRA DE MODAL DE EXPORTACIÓN ───────────────────────────── */
/*
  Sistema maestro reutilizable para modales de exportación en todos los módulos.
  Este bloque define solo diseño/estilo visual (no lógica de negocio).

  Objetivo:
  - Unificar apariencia de exportación en Ventas, Compras, Inventario, etc.
  - Mantener una UI consistente: origen de datos + formatos de salida.
  - Evitar duplicar CSS por módulo.
*/
.phm-export-overlay,
.v-exp-overlay {
  position: fixed;
  inset: 0;
  z-index: 3200;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.phm-export-modal,
.v-exp-modal {
  width: 100%;
  max-width: 560px;
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 20px 50px rgba(12, 40, 80, 0.18); /* Sombra adaptada a la base azul */
  padding: 1rem 1.1rem 1.05rem;
  position: relative;
  animation: fadeUp 0.2s ease;
}

.phm-export-close,
.v-exp-close {
  position: absolute;
  top: 0.72rem;
  right: 0.72rem;
  border: none;
  background: none;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color var(--t);
}

.phm-export-close:hover,
.v-exp-close:hover {
  color: #0C2850; /* Cierre interactivo con tu Azul Oscuro */
}

.phm-export-close i,
.phm-export-close svg,
.v-exp-close i,
.v-exp-close svg {
  width: 18px;
  height: 18px;
}

.phm-export-title,
.v-exp-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #0C2850; /* Título principal en tu Azul Oscuro */
}

.phm-export-subtitle,
.v-exp-subtitle {
  margin-top: 0.7rem;
  margin-bottom: 0.58rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.02em;
}

.phm-export-source-grid,
.v-exp-source-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.phm-export-source,
.v-exp-source {
  border: 1px solid #d5d9e2;
  border-radius: 10px;
  background: var(--bg-card);
  min-height: 68px;
  padding: 0.62rem 0.72rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  align-items: center;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.phm-export-source-ico,
.v-exp-source-ico {
  width: 33px;
  height: 33px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.phm-export-source-ico i,
.phm-export-source-ico svg,
.v-exp-source-ico i,
.v-exp-source-ico svg {
  width: 15px;
  height: 15px;
}

.phm-export-source-text,
.v-exp-source-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.phm-export-source-text strong,
.v-exp-source-text strong {
  font-size: 0.98rem;
  font-weight: 800;
  color: #0c2850; /* Texto fuerte en azul oscuro */
  line-height: 1.2;
}

.phm-export-source-text small,
.v-exp-source-text small {
  font-size: 0.82rem;
  font-weight: 500;
  color: #64748b;
  line-height: 1.2;
}

/* El icono check interno pasa a ser tu Azul Cicorpgo */
.phm-export-source-check,
.v-exp-source-check {
  color: #2F4DAA;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.phm-export-source-check i,
.phm-export-source-check svg,
.v-exp-source-check i,
.v-exp-source-check svg {
  width: 18px;
  height: 18px;
}

.phm-export-source:hover,
.v-exp-source:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 16px rgba(12, 40, 80, 0.05);
}

/* Estado Activo: Origen seleccionado cambia al Azul Cicorpgo */
.phm-export-source.is-active,
.v-exp-source.is-active {
  border-color: #2F4DAA;
  background: #EFF3FF; /* Fondo azul pastel de tonalidad baja */
}

.phm-export-source.is-active .phm-export-source-text strong,
.phm-export-source.is-active .phm-export-source-text small,
.phm-export-source.is-active .phm-export-source-ico,
.v-exp-source.is-active .v-exp-source-text strong,
.v-exp-source.is-active .v-exp-source-text small,
.v-exp-source.is-active .v-exp-source-ico {
  color: #0C2850; /* Textos e iconos se acentúan en tu Azul Oscuro */
}

.phm-export-source.is-active .phm-export-source-check,
.v-exp-source.is-active .v-exp-source-check {
  opacity: 1;
}

.phm-export-divider,
.v-exp-divider {
  margin: 0.72rem 0 0.62rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 500;
}

.phm-export-divider::before,
.phm-export-divider::after,
.v-exp-divider::before,
.v-exp-divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid #dbe1ea;
}

.phm-export-format-grid,
.v-exp-format-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.phm-export-format,
.v-exp-format {
  height: 34px;
  border-radius: 11px;
  border: 1px solid #d5d9e2;
  background: var(--bg-card);
  color: #334155;
  font-size: 0.82rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.phm-export-format i,
.phm-export-format svg,
.v-exp-format i,
.v-exp-format svg {
  width: 14px;
  height: 14px;
}

/* Excel conserva Verde nativo de su marca */
.phm-export-format.is-excel,
.v-exp-format.is-excel {
  color: #047857;
  border-color: #a7f3d0;
  background: #ecfdf5;
}

/* PDF conserva Rojo nativo de su formato */
.phm-export-format.is-pdf,
.v-exp-format.is-pdf {
  color: #dc2626;
  border-color: #fecaca;
  background: #fef2f2;
}

/* CSV se unifica a tus colores de sistema Azul Cicorpgo */
.phm-export-format.is-csv,
.v-exp-format.is-csv {
  color: #2F4DAA;
  border-color: #EFF3FF;
  background: #EFF3FF;
}

/* Imprimir se mantiene neutro */
.phm-export-format.is-print,
.v-exp-format.is-print {
  color: #475569;
  border-color: #cbd5e1;
  background: #f8fafc;
}

.phm-export-format:hover:not(.is-disabled),
.v-exp-format:hover:not(.is-disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(12, 40, 80, 0.08);
}

.phm-export-format.is-disabled,
.phm-export-format:disabled,
.v-exp-format.is-disabled,
.v-exp-format:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  box-shadow: none;
}

@media (max-width: 760px) {
  .phm-export-modal,
  .v-exp-modal {
    max-width: 96vw;
    padding: 0.95rem;
    border-radius: 12px;
  }

  .phm-export-title,
  .v-exp-title {
    font-size: 1rem;
  }

  .phm-export-subtitle,
  .v-exp-subtitle {
    font-size: 0.75rem;
  }

  .phm-export-source-grid,
  .v-exp-source-grid {
    grid-template-columns: 1fr;
  }

  .phm-export-source-text strong,
  .v-exp-source-text strong {
    font-size: 0.92rem;
  }

  .phm-export-source-text small,
  .v-exp-source-text small {
    font-size: 0.8rem;
  }

  .phm-export-divider,
  .v-exp-divider {
    font-size: 0.72rem;
  }

  .phm-export-format-grid,
  .v-exp-format-grid {
    grid-template-columns: 1fr 1fr;
  }

  .phm-export-format,
  .v-exp-format {
    font-size: 0.78rem;
    height: 32px;
  }
}


/* ── CLASE MAESTRA DE INTERRUPTOR (TOGGLE SWITCH) INTERRUPTORES ────────── */
/*
  Diseño reutilizable para interruptores de activación/desactivación.
  Encapsula el estilo visual de los toggles de "Por defecto" o "Activo".

  Estructura HTML esperada:
  <label class="phm-toggle-switch">
    <input type="checkbox">
    <span class="phm-toggle-slider"></span>
  </label>
*/
.phm-toggle-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
}

.phm-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.phm-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #e5e7eb; /* Gris claro apagado */
  border-radius: 999px;
  transition: all 0.2s ease;
}

.phm-toggle-slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
  transition: all 0.2s ease;
}

/* Al estar activo: Fondo de barra azul pastel de tonalidad baja */
.phm-toggle-switch input:checked+.phm-toggle-slider {
  background-color: #EFF3FF; 
}

/* Al estar activo: La esfera se desplaza y toma tu Azul Cicorpgo Corporativo */
.phm-toggle-switch input:checked+.phm-toggle-slider::before {
  transform: translateX(20px);
  background-color: #2F4DAA; 
}
