/**
 * =====================================================================
 * REZZ Carnicería - Panel Administrativo & Back-Office Ejecutivo
 * Estilo: Light Architectural Glassmorphism (Executive High-End UI)
 * 
 * - Fondo arquitectónico claro con refracciones sutiles ambientales
 * - Barra lateral de navegación en vidrio blanco esmerilado
 * - Píldora activa en blanco con acento carmesí (#881337) e íconos outline
 * - Paneles y tarjetas de vidrio esmerilado blanco con sombras suaves (16px)
 * - Botones de acción precisos: Verificar (Verde), Rechazar (Ámbar), Ajustar (Azul), Cambiar (Vino)
 * - Tablas claras de alta legibilidad y números grandes tabulares
 * =====================================================================
 */

:root {
  /* Atmósfera & Lienzo Soft UI (#F4F5F9) */
  --adm-bg: #F4F5F9;
  --adm-canvas-mesh: none;

  /* Superficies Flotantes Blanco Puro (#FFFFFF) con Doble Sombra Difuminada */
  --glass-panel-bg: #FFFFFF;
  --glass-panel-bg-hover: #FFFFFF;
  --glass-panel-border: rgba(255, 255, 255, 0.9);
  --glass-panel-border-highlight: #e2e8f0;
  --glass-panel-shadow: 0px 8px 24px rgba(149, 157, 165, 0.12);
  --glass-inner-shadow: inset 2px 2px 5px rgba(163, 177, 198, 0.3);
  --glass-blur: none;

  /* Barra Lateral & Cabecera Soft UI */
  --glass-sidebar-bg: #FFFFFF;
  --glass-sidebar-border: rgba(226, 232, 240, 0.8);
  --glass-header-bg: #FFFFFF;

  /* Tipografía y Jerarquía */
  --adm-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --adm-text-primary: #0f172a;
  --adm-text-secondary: #334155;
  --adm-text-muted: #64748b;
  --adm-text-dim: #94a3b8;

  /* Paleta Funcional */
  --adm-emerald: #16a34a;
  --adm-emerald-light: #15803d;
  --adm-emerald-bg: #dcfce7;
  --adm-emerald-border: #86efac;

  --adm-gold: #d97706;
  --adm-gold-light: #b45309;
  --adm-gold-bg: #fef3c7;
  --adm-gold-border: #fde68a;

  --adm-blue: #0284c7;
  --adm-blue-light: #0369a1;
  --adm-blue-bg: #e0f2fe;
  --adm-blue-border: #7dd3fc;

  --adm-rose: #be123c;
  --adm-rose-light: #881337;
  --adm-rose-bg: #ffe4e6;
  --adm-rose-border: #fecdd3;

  /* Radios de Esquinas */
  --radius-panel: 16px;
  --radius-card: 14px;
  --radius-pill: 9999px;
  --radius-btn: 10px;

  /* Altura Sincronizada para Simetría Exacta de Línea Divisoria */
  --admin-header-height: 64px;
}

/* Reset y Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--adm-font) !important;
  background-color: var(--adm-bg) !important;
  background-image: var(--adm-canvas-mesh) !important;
  background-attachment: fixed !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  color: var(--adm-text-primary) !important;
  min-height: 100vh;
  display: flex;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =====================================================================
   1. BARRA LATERAL EN VIDRIO CLARO (LIGHT FROSTED SIDEBAR)
   ===================================================================== */
.admin-sidebar {
  width: 268px;
  background: var(--glass-sidebar-bg) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  border-right: 1px solid var(--glass-sidebar-border) !important;
  color: var(--adm-text-primary);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.03);
  overflow-y: auto;
}

.admin-sidebar::-webkit-scrollbar {
  width: 5px;
}

.admin-sidebar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.sidebar-brand {
  height: var(--admin-header-height);
  min-height: var(--admin-header-height);
  max-height: var(--admin-header-height);
  padding: 0 16px;
  border-bottom: 1px solid #e2e8f0 !important;
  display: flex;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
}

.sidebar-brand-logo,
.sidebar-brand img {
  height: 30px;
  width: auto;
  max-width: 82px;
  object-fit: contain;
  flex-shrink: 0;
}

.sidebar-brand-title,
.sidebar-brand h2 {
  font-size: 1.02rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
  letter-spacing: -0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.sidebar-brand span {
  display: none !important;
}

.sidebar-menu {
  list-style: none;
  padding: 18px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-item {
  margin-bottom: 0;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-btn);
  color: #475569;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.sidebar-link svg {
  stroke: #64748b;
  transition: stroke 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}

.sidebar-link:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #e2e8f0;
}

.sidebar-link:hover svg {
  stroke: #0f172a;
}

/* Item activo exacto a Imagen 2: Píldora blanca con sombra y acento carmesí */
.sidebar-link.activo {
  background: #ffffff !important;
  color: #881337 !important;
  font-weight: 700 !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

.sidebar-link.activo svg {
  stroke: #881337 !important;
}

.sidebar-badge-count {
  margin-left: auto;
  background: #ffe4e6;
  color: #881337;
  border: 1px solid #fecdd3;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-weight: 800;
}

/* Envoltorio de Enlace con Botón Toggle de Submenú */
.sidebar-link-wrap {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
}

.sidebar-link-wrap .sidebar-link {
  flex: 1;
  padding-right: 28px;
}

.btn-toggle-subfiltros {
  position: absolute;
  right: 6px;
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: all 0.15s ease;
  line-height: 1;
  z-index: 2;
}

.btn-toggle-subfiltros:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #0f172a;
}

/* Contenedor del Submenú de Filtros Integrado en el Sidebar */
.sidebar-subfiltros {
  display: none;
  padding: 8px 4px 10px 10px;
  margin-top: 4px;
  margin-bottom: 6px;
  border-left: 2px solid #fecdd3;
  margin-left: 14px;
  animation: fadeInSub 0.2s ease;
}

.sidebar-subfiltros.abierto {
  display: block;
}

@keyframes fadeInSub {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.subfiltro-alerta-box {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #ef4444;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.alerta-dot-mini {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  flex-shrink: 0;
  animation: pulsoAlerta 1.5s infinite;
}

.subfiltro-search-form {
  margin-bottom: 8px;
}

.subfiltro-search-inner {
  position: relative;
  display: flex;
  align-items: center;
}

.subfiltro-search-input {
  width: 100% !important;
  padding: 7px 28px 7px 12px !important;
  font-size: 0.78rem !important;
  background: #ffffff !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 9px !important;
  color: #0f172a !important;
  outline: none;
  box-sizing: border-box;
  transition: all 0.15s ease;
}

.subfiltro-search-input:hover {
  border-color: #94a3b8 !important;
}

.subfiltro-search-input:focus {
  background: #ffffff !important;
  border-color: #4f46e5 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
}

.subfiltro-search-btn {
  position: absolute;
  right: 3px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.74rem;
  padding: 2px 4px;
  color: #64748b;
}

.subfiltro-search-btn:hover {
  color: #0284c7;
}

.subfiltro-estados-header {
  font-size: 0.64rem;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 6px 0 3px 2px;
}

.subfiltro-estados-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.subfiltro-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 7px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  color: #475569;
  transition: all 0.12s ease;
  border: 1px solid transparent;
}

.subfiltro-item:hover {
  background: #f1f5f9;
  color: #0f172a;
  transform: translateX(2px);
}

.subfiltro-item.activo {
  background: #ffffff !important;
  color: #0f172a !important;
  font-weight: 800 !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

.subfiltro-item-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 9999px;
  background: #f1f5f9;
  color: #64748b;
}

.subfiltro-item.activo .subfiltro-item-badge {
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #cbd5e1;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid #e2e8f0;
  font-size: 0.82rem;
  background: #f8fafc;
}

.sidebar-footer .user-nombre {
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
}

.sidebar-footer .user-rol {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* =====================================================================
   2. CABECERA PRINCIPAL EN VIDRIO CLARO
   ===================================================================== */
.admin-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-header {
  height: var(--admin-header-height);
  min-height: var(--admin-header-height);
  max-height: var(--admin-header-height);
  padding: 0 28px;
  box-sizing: border-box;
  background: var(--glass-header-bg) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  border-bottom: 1px solid #e2e8f0 !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.admin-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.4px;
}

.admin-user-info {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.88rem;
}

.tasa-bcv-badge {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #334155;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.tasa-bcv-badge strong {
  color: #16a34a;
  font-weight: 800;
}

.btn-salir {
  background: #ffe4e6 !important;
  color: #9f1239 !important;
  border: 1px solid #fecdd3 !important;
  padding: 7px 18px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.82rem;
  box-shadow: 0 2px 6px rgba(159, 18, 57, 0.08);
  transition: all 0.2s ease;
}

.btn-salir:hover {
  background: #fecdd3 !important;
  color: #881337 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(159, 18, 57, 0.15);
}

.admin-body {
  padding: 14px 18px !important;
  flex: 1;
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
}

/* =====================================================================
   3. PANELES Y TARJETAS EN VIDRIO BLANCO ESMERILADO
   ===================================================================== */
.admin-card,
.card-seccion-admin,
.glass-pane,
.soft-card {
  background: #FFFFFF !important;
  border-radius: 14px !important;
  box-shadow: 0px 8px 24px rgba(149, 157, 165, 0.12) !important;
  border: 1px solid rgba(255, 255, 255, 0.9) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.totales-soft-card {
  background: #FFFFFF !important;
  border-radius: 14px !important;
  box-shadow: 0px 8px 24px rgba(149, 157, 165, 0.12) !important;
  border: 1px solid rgba(255, 255, 255, 0.9) !important;
  padding: 16px 22px !important;
  min-width: 270px;
}

.totales-fila {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.totales-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #64748B;
}

.totales-monto-usd {
  font-size: 1.45rem;
  font-weight: 900;
  color: #0F172A;
}

.totales-monto-bs {
  font-size: 1.05rem;
  font-weight: 800;
  color: #15803D;
}

.totales-bcv-ref {
  font-size: 0.74rem;
  font-weight: 600;
  color: #94A3B8;
  text-align: right;
  margin-top: 4px;
}

.admin-card:hover,
.card-seccion-admin:hover,
.glass-pane:hover,
.soft-card:hover {
  border-color: var(--glass-panel-border-highlight) !important;
}

.card-seccion-titulo {
  font-size: 0.98rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.2px;
}

/* =====================================================================
   4. PANEL DE "GESTIÓN Y TRANSICIÓN DE ESTADOS" (BOTONES FROSTED)
   ===================================================================== */
.panel-estados-wrap {
  background: var(--glass-panel-bg) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  border: 1px solid var(--glass-panel-border) !important;
  box-shadow: var(--glass-panel-shadow) !important;
  border-radius: var(--radius-panel) !important;
  padding: 18px 22px;
  margin-bottom: 24px;
}

.panel-estados-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* =====================================================================
   5. BOTONES DE ACCIÓN (IDÉNTICOS A IMAGEN 2)
   ===================================================================== */
.btn-accion {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  line-height: 1.3;
}

.btn-accion:hover {
  transform: translateY(-1px);
}

/* Botón Acción Positiva / Guardar / Verificar (Fondo Gris Pizarra, Texto Verde Pastel) */
.btn-accion.verde,
.btn-accion.pastel-verde {
  background: #0f172a !important;
  color: #4ade80 !important;
  border: 1px solid #1e293b !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}
.btn-accion.verde:hover,
.btn-accion.pastel-verde:hover {
  background: #1e293b !important;
  color: #86efac !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12) !important;
}

/* Botón Alerta / Rechazar / Cancelar (Fondo Gris Suave, Texto Rojo Pastel) */
.btn-accion.ambar,
.btn-accion.oro,
.btn-accion.rojo,
.btn-accion.rose,
.btn-accion.pastel-rojo,
.btn-accion.pastel-ambar {
  background: #f1f5f9 !important;
  color: #ef4444 !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}
.btn-accion.ambar:hover,
.btn-accion.oro:hover,
.btn-accion.rojo:hover,
.btn-accion.rose:hover,
.btn-accion.pastel-rojo:hover,
.btn-accion.pastel-ambar:hover {
  background: #fee2e2 !important;
  color: #dc2626 !important;
  border-color: #fca5a5 !important;
}

/* Botón Neutro / Proponer Ajuste / Ticket / Buscar (Fondo Gris Suave, Texto Pizarra) */
.btn-accion.azul,
.btn-accion.slate,
.btn-accion.gris,
.btn-accion.pastel-azul,
.btn-accion.pastel-gris {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}
.btn-accion.azul:hover,
.btn-accion.slate:hover,
.btn-accion.gris:hover,
.btn-accion.pastel-azul:hover,
.btn-accion.pastel-gris:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

/* =====================================================================
   6. TABLAS DE PRODUCTOS Y PEDIDOS (CLARAS Y LEGIBLES)
   ===================================================================== */
.tabla-card {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  overflow-x: auto;
  margin-bottom: 24px;
  padding: 4px 0;
}

.tabla-admin {
  width: 100%;
  border-collapse: separate !important;
  border-spacing: 0 10px !important; /* Espacio tridimensional entre filas independientes */
  font-size: 0.86rem;
  background: transparent !important;
}

.tabla-admin thead th {
  background: transparent !important;
  padding: 8px 18px;
  text-align: left;
  font-size: 0.78rem;
  text-transform: none;
  color: #64748b;
  font-weight: 600;
  letter-spacing: 0.2px;
  border-bottom: none !important;
  white-space: nowrap;
}

.tabla-admin tbody tr {
  background: #ffffff !important;
  border-radius: 12px;
  box-shadow: 0px 4px 16px rgba(149, 157, 165, 0.10), 0px 1px 3px rgba(0, 0, 0, 0.02);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tabla-admin tbody tr:hover {
  transform: translateY(-2px);
  box-shadow: 0px 8px 24px rgba(149, 157, 165, 0.18), 0px 2px 6px rgba(0, 0, 0, 0.03);
}

.tabla-admin tbody td {
  padding: 14px 18px;
  border: none !important;
  vertical-align: middle;
  color: #1e293b;
  background: #ffffff;
  font-size: 0.86rem;
}

.tabla-admin input[type=number],
.tabla-admin input[type=text],
.tabla-num-simple,
.cant-corte-sin-contenedor,
#cant-corte-combo {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  border-width: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  outline: none !important;
  outline-width: 0 !important;
  outline-style: none !important;
  outline-color: transparent !important;
  -webkit-appearance: textfield !important;
  -moz-appearance: textfield !important;
  appearance: textfield !important;
}

.tabla-admin input[type=number]:focus,
.tabla-admin input[type=number]:focus-visible,
.tabla-num-simple:focus,
.tabla-num-simple:focus-visible,
.cant-corte-sin-contenedor:focus,
.cant-corte-sin-contenedor:focus-visible,
#cant-corte-combo:focus,
#cant-corte-combo:focus-visible,
#cant-corte-combo:active {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  border-width: 0 !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  outline: none !important;
  outline-width: 0 !important;
}

.tabla-admin input[type=number]::-webkit-inner-spin-button,
.tabla-admin input[type=number]::-webkit-outer-spin-button,
.tabla-num-simple::-webkit-inner-spin-button,
.tabla-num-simple::-webkit-outer-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
  display: none !important;
}

.tabla-admin tbody td:first-child {
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

.tabla-admin tbody td:last-child {
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

.tabla-admin.tabla-centrada th,
.tabla-admin.tabla-centrada td {
  text-align: center;
}

/* Checkbox estilizado moderno */
.tabla-checkbox {
  width: 17px;
  height: 17px;
  border-radius: 4px;
  border: 1.5px solid #cbd5e1;
  cursor: pointer;
  accent-color: #0f172a;
  vertical-align: middle;
}

/* Avatar de Iniciales Circular (Columna Employee) */
.tabla-avatar-cell {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.tabla-avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  user-select: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.tabla-avatar-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tabla-avatar-nombre {
  font-weight: 600;
  color: #0f172a;
  font-size: 0.88rem;
}

.tabla-avatar-sub {
  font-size: 0.74rem;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Metadatos y montos en tablas */
.tabla-meta-txt {
  color: #475569;
  font-size: 0.84rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tabla-monto-usd {
  font-weight: 700;
  color: #0f172a;
  font-size: 0.92rem;
  letter-spacing: -0.2px;
}

.tabla-monto-bs {
  font-size: 0.74rem;
  color: #64748b;
  font-weight: 500;
}

/* Status Pills Exactos a la Referencia (Columna Payment Status) */
.badge,
.badge-pill {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  padding: 4px 12px !important;
  border-radius: 9999px !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.3px !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  line-height: 1.25 !important;
  border: none !important;
  box-shadow: none !important;
}

.badge i,
.badge-pill i {
  font-size: 0.78rem !important;
  line-height: 1 !important;
}

/* PAID / PAGADO / ENTREGADO - Verde Pastel */
.badge-pill-paid,
.badge-pill-verde,
.badge-verde,
.badge-gris-verde,
.badge-pagado {
  background: #dcfce7 !important;
  color: #15803d !important;
}

/* PENDING / PENDIENTE / EN VERIFICACIÓN - Azul Pastel */
.badge-pill-pending,
.badge-pill-azul,
.badge-azul,
.badge-pendiente,
.badge-verificando {
  background: #eff6ff !important;
  color: #2563eb !important;
}

/* NEGOTIATING / AJUSTE - Ámbar Pastel */
.badge-pill-negotiating,
.badge-pill-amarillo,
.badge-amarillo,
.badge-ajuste {
  background: #fef3c7 !important;
  color: #d97706 !important;
}

/* FAILED / CANCELADO / RECHAZADO - Rojo Pastel */
.badge-pill-failed,
.badge-pill-rojo,
.badge-rojo,
.badge-gris-rojo,
.badge-cancelado {
  background: #fee2e2 !important;
  color: #dc2626 !important;
}

/* OVERDUE / LISTO - Púrpura Pastel */
.badge-pill-overdue,
.badge-pill-purpura,
.badge-purpura,
.badge-listo {
  background: #f3e8ff !important;
  color: #7c3aed !important;
}

/* PREPARING / EN PROCESO - Naranja Pastel */
.badge-pill-preparacion,
.badge-pill-naranja,
.badge-naranja {
  background: #ffedd5 !important;
  color: #ea580c !important;
}

/* ON THE WAY / EN CAMINO - Cian Pastel */
.badge-pill-camino,
.badge-pill-cian,
.badge-cian {
  background: #e0f2fe !important;
  color: #0284c7 !important;
}

/* RETIRO / GENÉRICO - Gris Pizarra */
.badge-pill-gris,
.badge-gris,
.badge-retiro {
  background: #f1f5f9 !important;
  color: #475569 !important;
}

/* Switch iOS Minimalista y Moderno */
.switch-ios {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  vertical-align: middle;
}

.switch-ios input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-ios .slider-ios {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 22px;
}

.switch-ios .slider-ios:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

.switch-ios input:checked + .slider-ios {
  background-color: #10b981;
}

.switch-ios input:checked + .slider-ios:before {
  transform: translateX(16px);
}

/* Botón Rojo Sólido (Eliminar / Acción Crítica) */
.btn-accion.pastel-rojo {
  background: #be123c !important;
  color: #ffffff !important;
  border: 1px solid #9f1239 !important;
  box-shadow: 0 1px 3px rgba(190, 18, 60, 0.25) !important;
  transition: all 0.2s ease !important;
}

.btn-accion.pastel-rojo:hover {
  background: #9f1239 !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(190, 18, 60, 0.35) !important;
}

/* =====================================================================
   SOFT UI KPI CARDS & SUNKEN INPUTS (ESTILO REFERENCIA)
   ===================================================================== */
.kpi-grid,
.pedidos-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card,
.stat-kpi-card {
  position: relative !important;
  overflow: hidden !important;
  background: #ffffff !important;
  border-radius: 14px !important;
  box-shadow: 0px 8px 24px rgba(149, 157, 165, 0.12) !important;
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
  padding: 20px 22px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  min-height: 105px !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

/* Efecto Glassmorphism en la esquina superior derecha donde se ubica el icono */
.kpi-card::before,
.stat-kpi-card::before {
  content: "";
  position: absolute;
  top: -24px;
  right: -24px;
  width: 95px;
  height: 95px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(241, 245, 249, 0.95) 0%, rgba(226, 232, 240, 0.45) 55%, rgba(255, 255, 255, 0) 75%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
  z-index: 0;
  box-shadow: inset 1px -1px 3px rgba(255, 255, 255, 0.8);
}

.kpi-card:hover,
.stat-kpi-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0px 12px 30px rgba(149, 157, 165, 0.18) !important;
}

.kpi-card-header,
.stat-kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.kpi-card-val,
.stat-kpi-valor {
  font-size: 1.55rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.kpi-card-sub,
.stat-kpi-label {
  font-size: 0.78rem !important;
  color: #64748b !important;
  font-weight: 500 !important;
  margin-top: 4px;
}

.kpi-card-icon,
.stat-kpi-icon {
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  background: #eef2f6 !important;
  color: #6366f1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 15px !important;
  box-shadow: 2px 2px 5px rgba(163, 177, 198, 0.2), -2px -2px 5px rgba(255, 255, 255, 0.8) !important;
}

/* Insumos Planos Modernos y Elegantes (.input-sunken) */
.input-sunken {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  border-radius: 10px !important;
  padding: 8px 14px !important;
  color: #0f172a !important;
  outline: none !important;
  box-sizing: border-box !important;
  transition: all 0.15s ease !important;
}

.input-sunken:hover {
  border-color: #94a3b8 !important;
}

.input-sunken:focus {
  background: #ffffff !important;
  border-color: #4f46e5 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12) !important;
}

/* Insumos estándar limpios, planos y modernos */
input[type=text]:not(.tabla-num-simple):not(.cant-corte-sin-contenedor):not(#cant-corte-combo),
input[type=search],
input[type=email],
input[type=password],
input[type=date],
input[type=number]:not(.tabla-num-simple):not(.cant-corte-sin-contenedor):not(#cant-corte-combo),
select,
textarea,
.form-input {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  border-radius: 9px;
  padding: 8px 12px;
  color: #0f172a;
  outline: none;
  box-sizing: border-box;
  transition: all 0.15s ease;
}

input[type=text]:not(.tabla-num-simple):not(.cant-corte-sin-contenedor):not(#cant-corte-combo):hover,
input[type=search]:hover,
input[type=email]:hover,
input[type=password]:hover,
input[type=date]:hover,
input[type=number]:not(.tabla-num-simple):not(.cant-corte-sin-contenedor):not(#cant-corte-combo):hover,
select:hover,
textarea:hover,
.form-input:hover {
  border-color: #94a3b8;
}

input[type=text]:not(.tabla-num-simple):not(.cant-corte-sin-contenedor):not(#cant-corte-combo):focus,
input[type=search]:focus,
input[type=email]:focus,
input[type=password]:focus,
input[type=date]:focus,
input[type=number]:not(.tabla-num-simple):not(.cant-corte-sin-contenedor):not(#cant-corte-combo):focus,
select:focus,
textarea:focus,
.form-input:focus {
  background: #ffffff;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12) !important;
}

/* Modales Soft UI Tridimensionales */
.modal-box,
.modal-content,
.swal2-popup:not(.swal2-toast) {
  background: #ffffff !important;
  border-radius: 18px !important;
  box-shadow: 0px 24px 60px rgba(149, 157, 165, 0.25), 0px 4px 16px rgba(0, 0, 0, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.9) !important;
  padding: 24px !important;
}

body.swal2-toast-shown .swal2-container,
.swal2-container.swal2-top-end,
.swal2-container.swal2-top-start {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  pointer-events: none !important;
}

/* =====================================================================
   7. DESGLOSE DE TOTALES (INSET LIGHT BOX - IMAGEN 2)
   ===================================================================== */
.totales-glass-box {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: var(--radius-card) !important;
  padding: 16px 20px;
  min-width: 280px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.totales-fila {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.totales-label {
  font-size: 0.84rem;
  color: #64748b;
  font-weight: 600;
}

.totales-monto-usd {
  font-size: 1.45rem;
  font-weight: 900;
  color: #881337;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
}

.totales-monto-bs {
  font-size: 1.15rem;
  font-weight: 800;
  color: #881337;
  letter-spacing: -0.3px;
  font-variant-numeric: tabular-nums;
}

.totales-bcv-ref {
  font-size: 0.74rem;
  color: #94a3b8;
  text-align: right;
  margin-top: 4px;
}

/* =====================================================================
   8. TARJETAS LATERALES: CLIENTE, PAGO Y MAPA (IMAGEN 2)
   ===================================================================== */
.cliente-nombre-destacado {
  font-size: 1.8rem;
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.cliente-dato-linea {
  font-size: 0.88rem;
  color: #334155;
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.cliente-dato-linea strong {
  color: #64748b;
  font-weight: 600;
  min-width: 75px;
}

.cliente-dato-linea a {
  color: #0284c7;
  text-decoration: none;
  font-weight: 700;
}

.pago-referencia-pill {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  padding: 3px 9px;
  border-radius: 6px;
  font-family: monospace;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 1px;
}

/* =====================================================================
   9. TARJETAS DE ESTADÍSTICAS (KPI) EN BANDEJA DE PEDIDOS
   ===================================================================== */
/* =====================================================================
   9. TARJETAS DE ESTADÍSTICAS (KPI) EN BANDEJA DE PEDIDOS FULL-WIDTH
   ===================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr) !important;
  gap: 12px;
  margin-bottom: 16px;
  width: 100% !important;
  max-width: 100% !important;
}

@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
  }
}

.stat-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: var(--radius-card) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
  padding: 12px 15px;
  display: flex;
  align-items: center;
  gap: 11px;
  transition: transform 0.2s ease, border-color 0.2s ease;
  min-width: 0;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1 !important;
}

.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.stat-val {
  font-size: 1.35rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.1;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-label {
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 2px;
  white-space: nowrap;
}

/* =====================================================================
   10. WORKSPACE DE PEDIDOS: SIDEBAR INTELIGENTE + TABLA FULL-WIDTH
   ===================================================================== */
.pedidos-workspace {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  width: 100%;
  margin-bottom: 20px;
}

/* Sidebar de Filtros y Búsqueda (Izquierda) */
.pedidos-sidebar-filtros {
  width: 260px;
  flex-shrink: 0;
  background: var(--glass-panel-bg) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  border: 1px solid var(--glass-panel-border) !important;
  border-radius: var(--radius-panel) !important;
  box-shadow: var(--glass-panel-shadow) !important;
  padding: 14px;
  position: sticky;
  top: 75px;
  max-height: calc(100vh - 95px);
  overflow-y: auto;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.pedidos-sidebar-filtros.colapsado {
  width: 0 !important;
  padding: 0 !important;
  border: none !important;
  margin: 0 !important;
  overflow: hidden !important;
  opacity: 0;
  pointer-events: none;
}

.sidebar-filtros-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}

.sidebar-filtros-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-toggle-sidebar-filtros {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.15s ease;
  font-weight: 700;
}

.btn-toggle-sidebar-filtros:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Banner de Alerta cuando hay Pedidos Activos */
.sidebar-alerta-activos {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.76rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.25;
}

.sidebar-alerta-activos .alerta-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  flex-shrink: 0;
  animation: pulsoAlerta 1.5s infinite;
}

@keyframes pulsoAlerta {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

/* Buscador dentro del Sidebar */
.sidebar-search-box {
  margin-bottom: 14px;
}

.sidebar-search-input {
  width: 100%;
  padding: 7px 11px;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  font-size: 0.82rem !important;
  color: #0f172a !important;
  box-sizing: border-box;
  margin-bottom: 6px;
  outline: none;
  font-family: inherit;
  transition: all 0.2s ease;
}

.sidebar-search-input:focus {
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15) !important;
}

.sidebar-search-actions {
  display: flex;
  gap: 6px;
}

.btn-sidebar-buscar {
  flex: 1;
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.btn-sidebar-buscar:hover {
  background: #bae6fd;
  color: #0c4a6e;
}

.btn-sidebar-limpiar {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.btn-sidebar-limpiar:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Leyenda de Estados en el Sidebar */
.sidebar-estados-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-estado-seccion-title {
  font-size: 0.66rem;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 10px 0 4px 4px;
}

.sidebar-estado-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.sidebar-estado-item:hover {
  transform: translateX(2px);
}

.sidebar-estado-item.activo {
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.sidebar-estado-item.estado-todos { background: #f8fafc; color: #334155; border-color: #e2e8f0; }
.sidebar-estado-item.estado-todos.activo { background: #ffffff; border-color: #0f172a; color: #0f172a; }

.sidebar-estado-item.estado-pendiente { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.sidebar-estado-item.estado-pendiente.activo { background: #fef3c7; border-color: #d97706; font-weight: 800; }

.sidebar-estado-item.estado-pago_verificado { background: #f0f9ff; color: #0369a1; border-color: #bae6fd; }
.sidebar-estado-item.estado-pago_verificado.activo { background: #e0f2fe; border-color: #0284c7; }

.sidebar-estado-item.estado-en_preparacion { background: #fff1f2; color: #9f1239; border-color: #fecdd3; }
.sidebar-estado-item.estado-en_preparacion.activo { background: #ffe4e6; border-color: #be123c; }

.sidebar-estado-item.estado-listo { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.sidebar-estado-item.estado-listo.activo { background: #ffedd5; border-color: #ea580c; }

.sidebar-estado-item.estado-en_camino { background: #ecfeff; color: #0e7490; border-color: #a5f3fc; }
.sidebar-estado-item.estado-en_camino.activo { background: #cffafe; border-color: #0891b2; }

.sidebar-estado-item.estado-entregado { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.sidebar-estado-item.estado-entregado.activo { background: #dcfce7; border-color: #16a34a; }

.sidebar-estado-item.estado-cancelado { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.sidebar-estado-item.estado-cancelado.activo { background: #fee2e2; border-color: #dc2626; }

.sidebar-estado-count {
  padding: 1px 7px;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Área Principal de la Tabla */
.pedidos-main-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.pedidos-top-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 10px;
}

.btn-abrir-sidebar-filtros {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-abrir-sidebar-filtros:hover {
  background: #bae6fd;
}

/* =====================================================================
   11. FILAS DE TABLA EN UNA SOLA LÍNEA (SINGLE-LINE HIGH DENSITY)
   ===================================================================== */
/* Tabla de Pedidos Ampliada, Centrada y Compacta (100% de pantalla) */
.tabla-pedidos-amplia th {
  text-align: center !important;
  padding: 8px 6px !important;
  font-size: 0.69rem !important;
  font-weight: 800;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.tabla-pedidos-amplia td {
  text-align: center !important;
  vertical-align: middle !important;
  padding: 7px 6px !important;
  font-size: 0.76rem !important;
  white-space: nowrap;
}

.cliente-en-linea {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.cliente-en-linea .cliente-nombre-txt {
  font-weight: 700;
  color: #0f172a;
  font-size: 0.78rem;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cliente-en-linea .cliente-meta-chip {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.67rem;
  color: #64748b;
  font-weight: 600;
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
}

.btn-wa-chip {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 17px !important;
  height: 17px !important;
  background: #22c55e !important;
  color: #ffffff !important;
  border-radius: 50% !important;
  font-size: 0.62rem !important;
  text-decoration: none !important;
  margin-left: 5px !important;
  box-shadow: 0 1px 3px rgba(34, 197, 94, 0.4) !important;
  transition: transform 0.15s ease, background 0.15s ease !important;
  cursor: pointer !important;
}

.btn-wa-chip:hover {
  background: #16a34a !important;
  transform: scale(1.25) !important;
}

.fecha-en-linea {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}

.totales-en-linea {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
}

.totales-en-linea .total-usd {
  font-weight: 900;
  font-size: 0.84rem;
  color: #16a34a !important;
}

.totales-en-linea .total-bs {
  font-size: 0.70rem;
  color: #15803d !important;
  font-weight: 700;
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  padding: 1px 5px;
  border-radius: 4px;
}

.pago-en-linea {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  font-size: 0.74rem;
}

.pago-en-linea .pago-referencia-pill {
  padding: 1px 5px !important;
  font-size: 0.66rem !important;
  border-radius: 4px !important;
}

.filtro-btn {
  text-decoration: none;
  background: #ffffff;
  color: #475569;
  border: 1px solid #e2e8f0;
  padding: 7px 15px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.filtro-btn:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #cbd5e1;
}

.filtro-btn.activo {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
  font-weight: 800 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.filtro-count {
  background: #f1f5f9;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #475569;
}

.form-input,
.form-textarea,
.form-select {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: var(--radius-btn) !important;
  padding: 9px 14px !important;
  color: #0f172a !important;
  font-family: inherit !important;
  font-size: 0.88rem !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none !important;
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
}

.form-select option {
  background-color: #ffffff;
  color: #0f172a;
}

/* Badges Minimalistas: Fondo Gris Neutro con Texto Verde o Rojo Pastel */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  line-height: 1.2;
  box-shadow: none;
}
.badge .badge-icon {
  font-size: 0.86rem;
  line-height: 1;
}

/* Badges de Estado Activo / Verificado / Entregado: Texto Verde Pastel */
.badge-gris-verde,
.badge-verde,
.badge-azul,
.badge-purpura,
.badge-cian {
  background: #f1f5f9 !important;
  color: #16a34a !important;
  border: 1px solid #cbd5e1 !important;
}

/* Badges de Estado Pendiente / Alerta / Cancelado: Texto Rojo Pastel */
.badge-gris-rojo,
.badge-rojo,
.badge-amarillo,
.badge-naranja {
  background: #f1f5f9 !important;
  color: #ef4444 !important;
  border: 1px solid #cbd5e1 !important;
}

/* Badge Neutro */
.badge-gris {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border: 1px solid #cbd5e1 !important;
}

/* Form Group & Grids */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
  letter-spacing: 0.2px;
}

.form-help {
  display: block;
  font-size: 0.76rem;
  color: #64748b;
  margin-top: 5px;
  line-height: 1.4;
}

.grid-dos-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.input-tabla-delicado {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  padding: 3px 8px !important;
  height: 28px !important;
  box-sizing: border-box !important;
  color: #0f172a !important;
  font-family: inherit !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  font-variant-numeric: tabular-nums;
  transition: all 0.2s ease !important;
  line-height: 1 !important;
}

.input-tabla-delicado:focus {
  outline: none !important;
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
}

/* Filas más finas y estilizadas en Inventario */
#tabla-inventario tbody td {
  padding: 8px 14px !important;
}


/* Responsive */
@media (max-width: 900px) {
  html, body {
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }
  body {
    flex-direction: column !important;
  }
  .admin-sidebar {
    width: calc(100% - 16px) !important;
    min-height: auto !important;
    position: relative !important;
  }
  .sidebar-menu {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    padding: 6px 8px !important;
  }
}

/* Buscador Plano Moderno */
.input-sunken {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  border-radius: 10px !important;
  color: #0f172a !important;
  outline: none !important;
  box-sizing: border-box !important;
  transition: all 0.15s ease !important;
}

.input-sunken:hover {
  border-color: #94a3b8 !important;
}

.input-sunken:focus {
  background: #ffffff !important;
  border-color: #4f46e5 !important;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15) !important;
}

