/* ═══════════════════════════════════════════════════════════════════
   Bixci POS — Panel Interno de Ventas
   Diseño premium, modo oscuro, glassmorphism
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Design Tokens ──────────────────────────────────────────────── */
:root {
  --bpos-bg:          #0f172a;
  --bpos-surface:     #1e293b;
  --bpos-surface2:    #273347;
  --bpos-border:      rgba(148, 163, 184, 0.12);
  --bpos-border-glow: rgba(59, 130, 246, 0.3);
  --bpos-primary:     #3b82f6;
  --bpos-primary-dk:  #2563eb;
  --bpos-secondary:   #6366f1;
  --bpos-success:     #22c55e;
  --bpos-warning:     #f59e0b;
  --bpos-danger:      #ef4444;
  --bpos-text:        #f1f5f9;
  --bpos-text-muted:  #94a3b8;
  --bpos-text-dim:    #64748b;
  --bpos-radius:      10px;
  --bpos-radius-sm:   6px;
  --bpos-shadow:      0 4px 24px rgba(0, 0, 0, 0.4);
  --bpos-shadow-card: 0 2px 12px rgba(0, 0, 0, 0.25);
  --bpos-transition:  0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Reset ──────────────────────────────────────────────────────── */
#bixci-pos-app,
#bixci-pos-app * {
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ─── App Container ──────────────────────────────────────────────── */
#bixci-pos-app {
  background: var(--bpos-bg);
  min-height: 100vh;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  color: var(--bpos-text);
  box-sizing: border-box;
}

body.wp-admin #bixci-pos-app {
  margin: -10px -20px -20px;
  width: calc(100% + 40px);
}

/* ─── Header ─────────────────────────────────────────────────────── */
.bpos-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-bottom: 1px solid var(--bpos-border);
  position: sticky;
  top: 32px;
  z-index: 100;
}

.bpos-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bpos-logo {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--bpos-text);
}

.bpos-version {
  font-size: 0.65rem;
  background: var(--bpos-surface2);
  color: var(--bpos-text-muted);
  padding: 2px 7px;
  border-radius: 20px;
  font-weight: 600;
}

.bpos-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bpos-seller-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--bpos-text-muted);
  background: var(--bpos-surface);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--bpos-border);
}

/* ─── Main Grid ──────────────────────────────────────────────────── */
.bpos-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 20px;
  padding: 20px 28px;
  min-height: calc(100vh - 68px);
  align-items: start;
}

/* ─── Panels ─────────────────────────────────────────────────────── */
.bpos-panel {
  background: var(--bpos-surface);
  border: 1px solid var(--bpos-border);
  border-radius: var(--bpos-radius);
  padding: 20px;
  box-shadow: var(--bpos-shadow-card);
}

.bpos-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--bpos-text);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--bpos-border);
}

/* ─── Form Elements ──────────────────────────────────────────────── */
.bpos-field-group {
  margin-bottom: 14px;
}

.bpos-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.bpos-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--bpos-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 5px;
}

.bpos-input,
.bpos-select,
.bpos-textarea {
  width: 100%;
  background: var(--bpos-surface2);
  border: 1.5px solid var(--bpos-border);
  border-radius: var(--bpos-radius-sm);
  padding: 8px 11px;
  font-size: 0.85rem;
  color: var(--bpos-text);
  outline: none;
  transition: border-color var(--bpos-transition);
}

.bpos-input::placeholder,
.bpos-textarea::placeholder {
  color: var(--bpos-text-dim);
}

.bpos-input:focus,
.bpos-select:focus,
.bpos-textarea:focus {
  border-color: var(--bpos-primary);
  box-shadow: 0 0 0 3px var(--bpos-border-glow);
}

.bpos-select option {
  background: var(--bpos-surface2);
  color: var(--bpos-text);
}

.bpos-textarea {
  resize: vertical;
  line-height: 1.4;
}

.bpos-input-search {
  padding-left: 36px;
}

/* ─── Search Bar ─────────────────────────────────────────────────── */
.bpos-product-search-wrap,
.bpos-search-wrap,
.bpos-d-search-wrap {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  position: relative !important;
  display: flex !important;
  align-items: center !important;
}

.bpos-search-icon {
  position: absolute !important;
  left: 12px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: var(--bpos-text-dim, #94a3b8) !important;
  pointer-events: none !important;
  z-index: 5 !important;
  flex-shrink: 0 !important;
  width: 18px !important;
  height: 18px !important;
}

.bpos-search-icon.bpos-search-clear-icon {
  pointer-events: auto !important;
  cursor: pointer !important;
  color: #ef4444 !important;
  transition: transform 0.15s ease, color 0.15s ease !important;
}

.bpos-search-icon.bpos-search-clear-icon:hover {
  color: #dc2626 !important;
  transform: translateY(-50%) scale(1.25) !important;
}

/* Fila deslizable horizontal en una sola línea para categorías */
.bpos-stock-cat-row {
  display: flex !important;
  gap: 6px !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  padding-bottom: 2px !important;
}

.bpos-stock-cat-row::-webkit-scrollbar {
  display: none !important;
}

.bpos-stock-cat-chip {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  transition: background 0.15s ease, transform 0.15s ease !important;
}

.bpos-stock-cat-chip:hover {
  background: #7c3aed !important;
  transform: translateY(-1px) !important;
}

/* Input dentro de search-wrap: empuja texto a la derecha del ícono */
.bpos-search-wrap .bpos-input,
.bpos-input-search,
#bpos-product-search,
#bpos-stock-search-input,
#bpos-picking-search-input {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  padding-left: 38px !important;
  padding-right: 36px !important;
  height: 44px !important;
  min-height: 44px !important;
  border-radius: 10px !important;
  font-size: 16px !important; /* Prevents auto-zoom on iOS Safari */
  line-height: 1.3 !important;
  flex: 1 !important;
  min-width: 0 !important;
}

.bpos-search-spinner {
  position: absolute;
  right: 12px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--bpos-border);
  border-top-color: var(--bpos-primary);
  border-radius: 50%;
  animation: bpos-spin 0.6s linear infinite;
}

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

/* ─── Dropdown Results ───────────────────────────────────────────── */
.bpos-dropdown-results {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #1e293b;
  border: 1px solid var(--bpos-border);
  border-radius: var(--bpos-radius-sm);
  box-shadow: var(--bpos-shadow);
  max-height: 260px;
  overflow-y: auto;
  z-index: 200;
  margin-top: 3px;
}

.bpos-product-search-wrap {
  position: relative;
  margin-bottom: 14px;
}

.bpos-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--bpos-border);
  transition: background var(--bpos-transition);
}

.bpos-result-item:last-child {
  border-bottom: none;
}

.bpos-result-item:hover {
  background: var(--bpos-surface2);
}

.bpos-result-thumb {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 5px;
  background: var(--bpos-surface2);
  flex-shrink: 0;
}

.bpos-result-info {
  flex: 1;
  min-width: 0;
}

.bpos-result-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--bpos-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bpos-result-meta {
  font-size: 0.72rem;
  color: var(--bpos-text-muted);
  margin-top: 1px;
}

.bpos-result-price {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--bpos-primary);
  white-space: nowrap;
}

.bpos-result-stock-low {
  color: var(--bpos-warning);
}

.bpos-result-out {
  opacity: 0.45;
  pointer-events: none;
}

/* ─── Boleta/Factura Tab Switch ──────────────────────────────────── */
.bpos-tab-switch {
  display: flex;
  background: var(--bpos-surface2);
  border-radius: var(--bpos-radius-sm);
  padding: 3px;
  gap: 3px;
  border: 1px solid var(--bpos-border);
}

.bpos-tab {
  flex: 1;
  padding: 7px 10px;
  border: none;
  background: transparent;
  color: var(--bpos-text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 5px;
  cursor: pointer;
  transition: all var(--bpos-transition);
}

.bpos-tab.active {
  background: var(--bpos-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* ─── Cart Table ─────────────────────────────────────────────────── */
.bpos-cart-table-wrap {
  overflow-x: auto;
  border-radius: var(--bpos-radius-sm);
  border: 1px solid var(--bpos-border);
  margin-bottom: 14px;
}

.bpos-cart-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}

.bpos-cart-table th {
  background: var(--bpos-surface2);
  color: var(--bpos-text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 9px 12px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--bpos-border);
}

.bpos-cart-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--bpos-border);
  color: var(--bpos-text);
  vertical-align: middle;
}

.bpos-cart-table tbody tr:last-child td {
  border-bottom: none;
}

.bpos-cart-table tbody tr:hover td {
  background: rgba(59, 130, 246, 0.04);
}

.bpos-th-product { min-width: 140px; }
.bpos-th-qty     { width: 60px; text-align: center; }
.bpos-th-price   { width: 110px; }
.bpos-th-total   { width: 80px; text-align: right; }
.bpos-th-remove  { width: 32px; }

/* Editable Price Input */
.bpos-price-input {
  width: 90px;
  padding: 5px 8px;
  background: var(--bpos-bg);
  border: 1.5px solid var(--bpos-border);
  border-radius: var(--bpos-radius-sm);
  color: var(--bpos-primary);
  font-size: 0.85rem;
  font-weight: 700;
  text-align: right;
  transition: all var(--bpos-transition);
}

.bpos-price-input:focus {
  border-color: var(--bpos-primary);
  box-shadow: 0 0 0 3px var(--bpos-border-glow);
  outline: none;
}

.bpos-price-input.overridden {
  color: var(--bpos-warning);
  border-color: var(--bpos-warning);
}

/* Qty Input */
.bpos-qty-input {
  width: 52px;
  padding: 5px 6px;
  background: var(--bpos-bg);
  border: 1.5px solid var(--bpos-border);
  border-radius: var(--bpos-radius-sm);
  color: var(--bpos-text);
  font-size: 0.85rem;
  text-align: center;
  transition: border-color var(--bpos-transition);
}

.bpos-qty-input:focus {
  border-color: var(--bpos-primary);
  outline: none;
}

.bpos-remove-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--bpos-text-dim);
  cursor: pointer;
  transition: all var(--bpos-transition);
}

.bpos-remove-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  color: var(--bpos-danger);
}

/* Empty cart */
.bpos-empty-cart {
  text-align: center;
  padding: 32px 20px;
  color: var(--bpos-text-dim);
}

.bpos-empty-cart p {
  font-size: 0.82rem;
  margin-top: 10px;
}

/* ─── Totals ─────────────────────────────────────────────────────── */
.bpos-totals {
  background: var(--bpos-surface2);
  border: 1px solid var(--bpos-border);
  border-radius: var(--bpos-radius-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.bpos-totals-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.83rem;
  color: var(--bpos-text-muted);
  margin-bottom: 6px;
}

.bpos-totals-row:last-child {
  margin-bottom: 0;
}

.bpos-totals-igv {
  font-size: 0.78rem;
  color: var(--bpos-text-dim);
}

.bpos-totals-final {
  border-top: 1.5px dashed rgba(59, 130, 246, 0.3);
  padding-top: 10px;
  margin-top: 6px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--bpos-text);
}

.bpos-totals-final strong {
  color: var(--bpos-primary);
  font-size: 1.1rem;
}

/* ─── Buttons ────────────────────────────────────────────────────── */
.bpos-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: var(--bpos-radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--bpos-transition);
  text-decoration: none;
  white-space: nowrap;
}

.bpos-btn-sm {
  padding: 7px 12px;
  font-size: 0.78rem;
}

.bpos-btn-primary {
  background: var(--bpos-primary);
  color: #fff;
  padding: 8px 16px;
}

.bpos-btn-primary:hover:not(:disabled) {
  background: var(--bpos-primary-dk);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.bpos-btn-secondary {
  background: var(--bpos-secondary);
  color: #fff;
  padding: 8px 16px;
}

.bpos-btn-secondary:hover:not(:disabled) {
  background: #4f46e5;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.bpos-btn-outline {
  background: transparent;
  color: var(--bpos-text-muted);
  border: 1.5px solid var(--bpos-border);
  padding: 6px 12px;
}

.bpos-btn-outline:hover {
  border-color: var(--bpos-primary);
  color: var(--bpos-primary);
}

.bpos-btn:disabled,
.bpos-btn[disabled] {
  opacity: 0.38;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.bpos-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.bpos-btn-action {
  padding: 10px 8px;
  font-size: 0.84rem;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  white-space: normal;
  line-height: 1.2;
}

/* ─── Badge ──────────────────────────────────────────────────────── */
.bpos-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--bpos-primary);
  color: #fff;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 800;
}

/* ─── Modal ──────────────────────────────────────────────────────── */
.bpos-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 400px 0;
}



.bpos-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.bpos-modal-box {
  position: relative;
  background: var(--bpos-surface);
  border: 1px solid var(--bpos-border);
  border-radius: 14px;
  width: 90%;
  max-width: 500px;
  margin: 0 auto;
  box-shadow: var(--bpos-shadow);
  animation: bpos-modal-in 0.2s ease;
}

@keyframes bpos-modal-in {
  from { opacity: 0; transform: scale(0.92) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.bpos-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--bpos-border);
  font-weight: 700;
  font-size: 1rem;
}

.bpos-modal-close {
  background: none;
  border: none;
  color: var(--bpos-text-muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all var(--bpos-transition);
}

.bpos-modal-close:hover {
  background: var(--bpos-surface2);
  color: var(--bpos-text);
}

.bpos-modal-body {
  padding: 22px;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--bpos-text-muted);
}

.bpos-modal-footer {
  display: flex;
  gap: 8px;
  padding: 14px 22px;
  border-top: 1px solid var(--bpos-border);
  justify-content: flex-end;
}

.bpos-modal-footer:empty {
  display: none !important;
}

/* ─── Stock Window (70% Height Limit) ────────────────────────────── */
.bpos-stock-modal-70vh,
.bpos-modal-box:has(.bpos-stock-mgr-wrap) {
  max-height: 70vh !important;
  height: 70vh !important;
  max-width: 740px !important;
  width: 92% !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.bpos-stock-modal-70vh .bpos-modal-body,
.bpos-modal-box:has(.bpos-stock-mgr-wrap) .bpos-modal-body {
  flex: 1 1 auto !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 14px 18px !important;
}

.bpos-stock-modal-70vh .bpos-stock-mgr-wrap,
.bpos-modal-box:has(.bpos-stock-mgr-wrap) .bpos-stock-mgr-wrap {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  max-height: 100% !important;
  overflow: hidden !important;
}

.bpos-stock-modal-70vh #bpos-stock-list-container,
.bpos-modal-box:has(.bpos-stock-mgr-wrap) #bpos-stock-list-container {
  flex: 1 1 auto !important;
  max-height: calc(70vh - 170px) !important;
  overflow-y: auto !important;
  touch-action: pan-y !important;
  -webkit-overflow-scrolling: touch !important;
  pointer-events: auto !important;
  outline: none !important;
  scrollbar-width: thin;
}

.bpos-stock-modal-70vh .bpos-modal-close,
.bpos-modal-box:has(.bpos-stock-mgr-wrap) .bpos-modal-close,
.bpos-stock-modal-70vh .bpos-modal-footer,
.bpos-modal-box:has(.bpos-stock-mgr-wrap) .bpos-modal-footer {
  display: none !important;
}

/* Modal content blocks */
.bpos-modal-order-id {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--bpos-success);
  margin-bottom: 4px;
}

.bpos-modal-link-box {
  background: var(--bpos-surface2);
  border: 1px dashed var(--bpos-border-glow);
  border-radius: var(--bpos-radius-sm);
  padding: 10px 14px;
  font-size: 0.8rem;
  word-break: break-all;
  color: var(--bpos-primary);
  margin: 10px 0;
  cursor: pointer;
}

.bpos-modal-link-box:hover {
  background: rgba(59, 130, 246, 0.08);
}

.bpos-modal-wa-btn {
  background: #25d366;
  color: #fff;
}

.bpos-modal-wa-btn:hover {
  background: #1da851;
}

/* ─── Scrollbar ──────────────────────────────────────────────────── */
.bpos-dropdown-results::-webkit-scrollbar,
.bpos-cart-table-wrap::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

.bpos-dropdown-results::-webkit-scrollbar-track,
.bpos-cart-table-wrap::-webkit-scrollbar-track {
  background: var(--bpos-surface);
}

.bpos-dropdown-results::-webkit-scrollbar-thumb,
.bpos-cart-table-wrap::-webkit-scrollbar-thumb {
  background: var(--bpos-text-dim);
  border-radius: 3px;
}

/* ─── Toast Notifications ────────────────────────────────────────── */
.bpos-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999999;
  background: var(--bpos-surface);
  border: 1px solid var(--bpos-border);
  border-radius: var(--bpos-radius-sm);
  padding: 12px 18px;
  font-size: 0.83rem;
  color: var(--bpos-text);
  box-shadow: var(--bpos-shadow);
  animation: bpos-toast-in 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 320px;
}

.bpos-toast.success { border-left: 3px solid var(--bpos-success); }
.bpos-toast.error   { border-left: 3px solid var(--bpos-danger); }
.bpos-toast.info    { border-left: 3px solid var(--bpos-primary); }

@keyframes bpos-toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .bpos-grid {
    grid-template-columns: 320px 1fr;
  }
}


@media (max-width: 900px) {
  .bpos-grid {
    grid-template-columns: 1fr;
    padding: 14px;
  }
}

/* ─── Delivery Mode Panel ─────────────────────────────────────── */
.bpos-delivery-panel {
  background: var(--bpos-surface);
  border: 1px solid var(--bpos-border);
  border-radius: var(--bpos-radius);
  margin-top: 12px;
  overflow: visible !important;
  position: relative;
  transition: border-color var(--bpos-transition);
}

.bpos-delivery-panel.is-expanded {
  border-color: var(--bpos-primary);
}

.bpos-delivery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
  background: var(--bpos-surface2);
  transition: background var(--bpos-transition);
  margin-bottom: 0;
}

.bpos-delivery-header:hover {
  background: rgba(59, 130, 246, 0.08);
}

.bpos-d-header-left {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--bpos-text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.bpos-d-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bpos-d-summary-badge {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 99px;
  background: rgba(59, 130, 246, 0.12);
  color: var(--bpos-primary);
  border: 1px solid rgba(59, 130, 246, 0.25);
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bpos-d-chevron {
  color: var(--bpos-text-dim);
  transition: transform var(--bpos-transition);
  flex-shrink: 0;
}

.bpos-delivery-panel.is-expanded .bpos-d-chevron {
  transform: rotate(180deg);
}

.bpos-delivery-body {
  padding: 14px 16px;
  border-top: 1px solid var(--bpos-border);
  overflow: visible !important;
  position: relative;
}


/* Mode Pills: Lima / Provincia / Recojo */
.bpos-d-pills {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.bpos-d-pill {
  flex: 1;
  padding: 7px 10px;
  border: 1.5px solid var(--bpos-border);
  border-radius: var(--bpos-radius-sm);
  background: transparent;
  color: var(--bpos-text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--bpos-transition);
  text-align: center;
}

.bpos-d-pill:hover {
  border-color: var(--bpos-primary);
  color: var(--bpos-text);
  background: rgba(59, 130, 246, 0.08);
}

.bpos-d-pill.active {
  border-color: var(--bpos-primary);
  background: rgba(59, 130, 246, 0.15);
  color: var(--bpos-primary);
}

/* Mode panels */
.bpos-d-mode-panel {
  animation: bpos-fadeIn 0.15s ease;
}

/* District Search */
.bpos-d-search-wrap {
  position: relative;
}

.bpos-clear-btn {
  background: none;
  border: none;
  color: var(--bpos-text-muted);
  cursor: pointer;
  padding: 0 6px;
  font-size: 0.8rem;
  line-height: 1;
  transition: color var(--bpos-transition);
}
.bpos-clear-btn:hover { color: var(--bpos-danger); }

/* Express / Programada Cards */
.bpos-d-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.bpos-d-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid var(--bpos-border);
  border-radius: var(--bpos-radius);
  background: var(--bpos-surface);
  cursor: pointer;
  transition: all var(--bpos-transition);
}

.bpos-d-card:hover {
  border-color: var(--bpos-primary);
  background: rgba(59, 130, 246, 0.07);
  transform: translateY(-1px);
}

.bpos-d-card.active {
  border-color: var(--bpos-primary);
  background: rgba(59, 130, 246, 0.12);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.bpos-d-card-icon {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
}

.bpos-d-card-body { flex: 1; min-width: 0; }

.bpos-d-card-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--bpos-text);
}

.bpos-d-card-sub {
  font-size: 0.7rem;
  color: var(--bpos-text-dim);
  margin: 2px 0;
}

.bpos-d-card-price {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--bpos-primary);
  margin-top: 4px;
}

.bpos-d-card-price.bpos-price-free {
  color: var(--bpos-success);
}

/* Provincia Fields */
.bpos-d-prov-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--bpos-warning);
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--bpos-radius-sm);
  padding: 8px 12px;
  margin-bottom: 10px;
}

.bpos-d-prov-fields { display: flex; flex-direction: column; gap: 0; }

/* Recojo Card */
.bpos-d-recojo-card {
  background: var(--bpos-surface);
  border: 1.5px solid var(--bpos-success);
  border-radius: var(--bpos-radius);
  padding: 14px 16px;
}

.bpos-d-recojo-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.bpos-d-recojo-icon { font-size: 1.8rem; }

.bpos-d-recojo-tag {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--bpos-success);
  text-transform: uppercase;
}

.bpos-d-recojo-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--bpos-text);
  margin-top: 2px;
}

.bpos-d-recojo-detail {
  font-size: 0.78rem;
  color: var(--bpos-text-muted);
  margin-bottom: 4px;
}

.bpos-d-recojo-free {
  font-size: 0.85rem;
  color: var(--bpos-success);
  font-weight: 600;
  margin-top: 10px;
  border-top: 1px dashed rgba(34, 197, 94, 0.25);
  padding-top: 8px;
}

/* ─── Shalom Cascading Search ─────────────────────────────── */
.bpos-shalom-field-wrap {
  margin-top: 6px;
  position: relative;
}

.bpos-shalom-field-wrap:first-child { margin-top: 0; }

/* Shared dropdown results (Floating menu with z-index overlay & scroll) */
.bpos-dropdown-results,
#bpos-shalom-agency-dd {
  position: absolute !important;
  top: calc(100% + 4px) !important;
  left: 0 !important;
  right: 0 !important;
  background: #0f172a !important;
  border: 1.5px solid #3b82f6 !important;
  border-radius: 10px !important;
  max-height: 280px !important;
  overflow-y: auto !important;
  z-index: 999999 !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9), 0 0 20px rgba(59, 130, 246, 0.35) !important;
  backdrop-filter: blur(12px);
}

.bpos-result-item {
  padding: 9px 13px;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--bpos-text);
  border-bottom: 1px solid var(--bpos-border);
  transition: background var(--bpos-transition);
}

.bpos-result-item:last-child { border-bottom: none; }

.bpos-result-item:hover {
  background: rgba(59, 130, 246, 0.12);
  color: var(--bpos-primary);
}

/* Agency item: 3 lines */
.bpos-shalom-agency-item {
  padding: 10px 13px;
}

.bpos-agency-name {
  font-weight: 700;
  font-size: 0.83rem;
  color: var(--bpos-text);
  margin-bottom: 2px;
}

.bpos-agency-addr {
  font-size: 0.74rem;
  color: var(--bpos-text-muted);
  margin-bottom: 2px;
}

.bpos-agency-path {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--bpos-primary);
}

/* Loading / empty states */
.bpos-dd-loading,
.bpos-dd-empty {
  padding: 12px 14px;
  font-size: 0.82rem;
  color: var(--bpos-text-dim);
}
.bpos-dd-loading { color: var(--bpos-primary); font-weight: 700; }

/* Agency confirmation card */
.bpos-shalom-agency-card {
  background: var(--bpos-surface);
  border: 1.5px solid var(--bpos-primary);
  border-radius: var(--bpos-radius);
  padding: 12px 14px;
  margin-top: 10px;
}

.bpos-shalom-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.bpos-shalom-card-header > div { flex: 1; min-width: 0; }

.bpos-shalom-change-btn {
  background: var(--bpos-surface2);
  border: 1px solid var(--bpos-border);
  border-radius: var(--bpos-radius-sm);
  color: var(--bpos-text-muted);
  cursor: pointer;
  padding: 5px 8px;
  font-size: 0.78rem;
  flex-shrink: 0;
  transition: all var(--bpos-transition);
}
.bpos-shalom-change-btn:hover {
  border-color: var(--bpos-primary);
  color: var(--bpos-primary);
}

.bpos-shalom-card-path {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--bpos-primary);
  margin-top: 6px;
}

/* ─── DNI / RUC Lookup Button & Status Badges ─────────────────── */
.bpos-lookup-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bpos-surface2);
  border: 1px solid var(--bpos-primary);
  border-radius: var(--bpos-radius-sm);
  color: var(--bpos-primary);
  cursor: pointer;
  padding: 0 12px;
  height: 38px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--bpos-transition);
  letter-spacing: 0.02em;
}

.bpos-lookup-btn:hover {
  background: var(--bpos-primary);
  color: #fff;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.35);
}

.bpos-lookup-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.bpos-lookup-btn svg {
  flex-shrink: 0;
}

/* Status badge shown in the field label */
.bpos-doc-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
  vertical-align: middle;
  margin-left: 4px;
  line-height: 1.5;
}

.bpos-badge-ok {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.bpos-badge-err {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.bpos-badge-loading {
  background: rgba(59, 130, 246, 0.12);
  color: var(--bpos-primary);
  border: 1px solid rgba(59, 130, 246, 0.25);
  animation: bpos-pulse 1s ease-in-out infinite;
}

@keyframes bpos-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

/* Auto-filled readonly inputs look different from empty editable ones */
.bpos-input[readonly] {
  background: rgba(59, 130, 246, 0.05);
  border-color: rgba(59, 130, 246, 0.3);
  color: var(--bpos-text);
  cursor: default;
}

/* ─── Customer Search Result Badges ───────────────────────────── */
.bpos-result-customer {
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.bpos-result-customer:hover {
  background: var(--bpos-surface2);
}

.bpos-result-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 99px;
  vertical-align: middle;
  margin-left: 4px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.bpos-badge-reg {
  background: rgba(59, 130, 246, 0.15);
  color: var(--bpos-primary);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.bpos-badge-guest {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

/* DNI / RUC pill inside result row */
.bpos-result-doc {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  margin-top: 2px;
}

.bpos-doc-dni {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.bpos-doc-ruc {
  background: rgba(168, 85, 247, 0.12);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.25);
}

/* No-result row with hint */
.bpos-no-result {
  cursor: default;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bpos-result-hint {
  font-size: 0.72rem;
  color: var(--bpos-text-dim);
  opacity: 0.7;
}

/* ─── Carritos Pausados / En Espera ────────────────────────────── */
.bpos-btn-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.bpos-btn-warning:hover:not(:disabled) {
  background: #f59e0b;
  color: #fff;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.35);
}

.bpos-btn-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.bpos-btn-danger:hover:not(:disabled) {
  background: #ef4444;
  color: #fff;
}

.bpos-badge-count {
  display: inline-block;
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 99px;
  margin-left: 4px;
  vertical-align: middle;
  transition: all var(--bpos-transition);
}

.bpos-btn-held-badge.has-held .bpos-badge-count {
  background: #f59e0b;
  color: #1e293b;
  border-color: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

.bpos-held-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 4px;
}

.bpos-held-card {
  background: var(--bpos-surface2);
  border: 1px solid var(--bpos-border);
  border-radius: var(--bpos-radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color var(--bpos-transition);
}

.bpos-held-card:hover {
  border-color: var(--bpos-primary);
}

.bpos-held-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.bpos-held-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bpos-held-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--bpos-text);
}

.bpos-held-time {
  font-size: 0.75rem;
  color: var(--bpos-text-dim);
}

.bpos-held-total {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--bpos-primary);
}

.bpos-held-body {
  font-size: 0.8rem;
  color: var(--bpos-text-dim);
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(0,0,0,0.15);
  padding: 8px 10px;
  border-radius: var(--bpos-radius-sm);
}

.bpos-held-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

/* ─── Mobile Tab Switcher & Touch Optimization ───────────────────── */
.bpos-mobile-tabs {
  display: none;
}

.bpos-logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #ef4444 !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  text-decoration: none !important;
}

.bpos-logout-btn:hover {
  background: #ef4444 !important;
  color: #fff !important;
}

@media (max-width: 900px) {
  html, body, .bpos-standalone-body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  #bixci-pos-app {
    margin: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  .bpos-header {
    padding: 10px 12px !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    top: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .bpos-header-left {
    gap: 6px !important;
    flex-shrink: 1 !important;
  }

  .bpos-logo {
    font-size: 1.02rem !important;
  }

  .bpos-header-right {
    flex-wrap: wrap !important;
    gap: 4px !important;
    justify-content: flex-end !important;
  }

  .bpos-header-right .bpos-btn {
    padding: 6px 9px !important;
    font-size: 0.74rem !important;
  }

  .bpos-seller-badge {
    padding: 3px 8px !important;
    font-size: 0.72rem !important;
  }

  .bpos-mobile-tabs {
    display: flex !important;
    gap: 4px !important;
    margin: 8px 10px 0 10px !important;
    background: var(--bpos-surface2) !important;
    padding: 4px !important;
    border-radius: var(--bpos-radius) !important;
    width: calc(100% - 20px) !important;
    box-sizing: border-box !important;
  }

  .bpos-m-tab {
    flex: 1 !important;
    padding: 9px 8px !important;
    border: none !important;
    border-radius: var(--bpos-radius-sm) !important;
    background: transparent !important;
    color: var(--bpos-text-dim) !important;
    font-weight: 700 !important;
    font-size: 0.8rem !important;
    cursor: pointer !important;
    transition: all var(--bpos-transition) !important;
    text-align: center !important;
  }

  .bpos-m-tab.active {
    background: var(--bpos-primary) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35) !important;
  }

  .bpos-grid {
    grid-template-columns: 1fr !important;
    padding: 10px !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }

  .bpos-panel {
    padding: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .bpos-field-row {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .bpos-field-group {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .bpos-search-wrap {
    width: 100% !important;
    display: flex !important;
    box-sizing: border-box !important;
  }

  .bpos-search-wrap .bpos-input {
    flex: 1 !important;
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    font-size: 16px !important; /* Prevents auto-zoom on iOS safari */
  }

  .bpos-input, .bpos-btn, .bpos-d-pill {
    font-size: 16px !important;
    min-height: 42px;
  }

  .bpos-actions {
    position: sticky !important;
    bottom: 0 !important;
    background: var(--bpos-surface) !important;
    padding: 8px !important;
    margin: 10px 0 0 0 !important;
    border-top: 1px solid var(--bpos-border) !important;
    z-index: 99 !important;
    box-shadow: 0 -6px 20px rgba(0,0,0,0.4) !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    overflow: hidden !important;
  }

  .bpos-actions .bpos-btn-action {
    font-size: 0.78rem !important;
    padding: 8px 4px !important;
    min-height: 42px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    line-height: 1.15 !important;
    text-align: center !important;
    justify-content: center !important;
    word-break: break-word !important;
  }

  .bpos-d-pills {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  .bpos-d-pill {
    flex: 1 1 calc(50% - 6px) !important;
    min-width: 120px !important;
    text-align: center !important;
    justify-content: center !important;
  }

  .bpos-cart-table-wrap {
    overflow-x: auto !important;
    width: 100% !important;
    -webkit-overflow-scrolling: touch !important;
  }
}

/* ─── Login Screen (Frontend Standalone) ───────────────────────── */
.bpos-login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(circle at top, #1e293b 0%, #0f172a 100%);
  box-sizing: border-box;
}

.bpos-login-card {
  width: 100%;
  max-width: 400px;
  background: var(--bpos-surface);
  border: 1px solid var(--bpos-border);
  border-radius: 16px;
  padding: 30px 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  box-sizing: border-box;
}

.bpos-login-header {
  text-align: center;
  margin-bottom: 24px;
}

.bpos-login-logo {
  display: block;
  font-size: 1.6rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.bpos-login-sub {
  font-size: 0.78rem;
  color: var(--bpos-text-dim);
}

.bpos-login-error {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 10px 12px;
  border-radius: var(--bpos-radius-sm);
  font-size: 0.82rem;
  margin-bottom: 16px;
  text-align: center;
  font-weight: 600;
}

.bpos-login-submit {
  width: 100%;
  padding: 12px;
  font-size: 0.95rem;
  margin-top: 8px;
  justify-content: center;
}

.bpos-login-footer {
  text-align: center;
  margin-top: 16px;
  font-size: 0.75rem;
  color: var(--bpos-text-dim);
}

/* ─── Cart Table Product Preview Link & Compact Layout ───────── */
.bpos-product-name-link {
  font-weight: 600;
  font-size: 0.83rem;
  color: var(--bpos-primary);
  cursor: pointer;
  line-height: 1.25;
  text-decoration: underline;
  text-decoration-color: rgba(59, 130, 246, 0.4);
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}
.bpos-product-name-link:hover {
  color: #60a5fa;
  text-decoration-color: #60a5fa;
}

.bpos-cart-sku-sub {
  font-size: 0.7rem;
  color: var(--bpos-text-dim);
  margin-top: 1px;
}

.bpos-orig-price-badge {
  font-size: 0.65rem;
  color: #f59e0b;
  margin-top: 2px;
  text-align: center;
}

.bpos-remove-box-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #ef4444;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
}
.bpos-remove-box-btn:hover, .bpos-remove-box-btn:active {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}

@media (max-width: 900px) {
  .bpos-cart-table-wrap {
    overflow-x: hidden !important;
    width: 100% !important;
  }

  .bpos-cart-table {
    width: 100% !important;
    table-layout: fixed !important;
  }

  .bpos-cart-table th,
  .bpos-cart-table td {
    padding: 5px 2px !important;
    font-size: 0.74rem !important;
  }

  /* Omit tiny table thumbnail on mobile to maximize text space */
  .bpos-cart-thumb {
    display: none !important;
  }

  /* Compact Column Widths for Mobile */
  .bpos-th-product, .bpos-td-product {
    width: 39% !important;
    word-break: break-word !important;
  }
  .bpos-th-qty, .bpos-td-qty {
    width: 14% !important;
    padding: 4px 1px !important;
  }
  .bpos-th-price, .bpos-td-price {
    width: 21% !important;
    padding: 4px 1px !important;
  }
  .bpos-th-total, .bpos-td-total {
    width: 16% !important;
    font-size: 0.74rem !important;
    padding: 4px 1px !important;
    text-align: right !important;
  }
  .bpos-th-remove, .bpos-td-remove {
    width: 10% !important;
    padding: 4px 0 !important;
    text-align: center !important;
  }

  /* Ultra-Compact Inputs for Mobile Keypad */
  .bpos-cart-qty {
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 30px !important;
    min-height: 30px !important;
    padding: 2px 0 !important;
    font-size: 0.78rem !important;
    text-align: center !important;
  }

  .bpos-cart-price {
    width: 46px !important;
    min-width: 46px !important;
    max-width: 46px !important;
    height: 30px !important;
    min-height: 30px !important;
    padding: 2px 0 !important;
    font-size: 0.78rem !important;
    text-align: center !important;
  }

  .bpos-remove-box-btn {
    width: 24px !important;
    height: 24px !important;
  }

  .bpos-product-name-link {
    font-size: 0.76rem !important;
  }

  .bpos-cart-sku-sub {
    font-size: 0.65rem !important;
  }
}

/* ─── Bixci Stock Manager Styles ────────────────────────────── */
.bpos-stock-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bpos-stock-item-card {
  background: var(--bpos-surface-2, #1e293b);
  border: 1px solid var(--bpos-border, rgba(255,255,255,0.1));
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  transition: border-color 0.15s ease;
}

.bpos-stock-item-card:hover {
  border-color: var(--bpos-primary);
}

.bpos-stock-status-tag {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.bpos-stock-badge-ok {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.bpos-stock-badge-low {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.bpos-stock-badge-out {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* 🪗 Modo Lista Compacta Acordeón (Alternativa 1) */
.bpos-stock-accordion-card {
  background: var(--bpos-surface, #0f172a);
  border: 1px solid var(--bpos-border, #334155);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bpos-stock-accordion-card.is-expanded {
  border-color: #3b82f6 !important;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.15);
}

.bpos-stock-title {
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--bpos-text);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bpos-stock-accordion-card.is-expanded .bpos-stock-title {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-break: break-word !important;
}

.bpos-stock-accordion-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  cursor: pointer;
  user-select: none;
  min-height: 48px;
  box-sizing: border-box;
}

.bpos-stock-accordion-header:hover {
  background: rgba(255, 255, 255, 0.02);
}

.bpos-stock-accordion-body {
  display: none;
  padding: 6px 8px;
  border-top: 1px dashed var(--bpos-border, #334155);
  background: rgba(15, 23, 42, 0.5);
}

.bpos-stock-accordion-card.is-expanded .bpos-stock-accordion-body {
  display: block;
}

.bpos-stock-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 0.75rem;
  color: var(--bpos-text-dim, #94a3b8);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.bpos-stock-accordion-card.is-expanded .bpos-stock-chevron {
  transform: rotate(180deg);
  color: #3b82f6;
}

/* Sub-Almacenes & No Encontrado Styles */
.bpos-card-not-found {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.08) !important;
}

.bpos-pill-not-found.active {
  background: #dc2626 !important;
  color: #ffffff !important;
  border-color: #dc2626 !important;
}

.bpos-btn-not-found {
  font-size: 1.1rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--bpos-border, #334155);
  color: var(--bpos-text-dim, #94a3b8);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 34px;
}

.bpos-btn-not-found.active {
  background: #dc2626 !important;
  color: #ffffff !important;
  border-color: #f87171 !important;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}

.bpos-wh-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 3px 2px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.bpos-wh-cell:hover {
  background: rgba(59, 130, 246, 0.08);
}

.bpos-wh-cell.is-selected {
  background: rgba(59, 130, 246, 0.2) !important;
  box-shadow: 0 0 0 2px #3b82f6 !important;
  border-radius: 6px !important;
}

.bpos-wh-cell.is-selected label {
  color: #60a5fa !important;
  font-weight: 900 !important;
}

.bpos-wh-cell label {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--bpos-text-dim, #94a3b8);
  margin-bottom: 2px;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
}

.bpos-wh-input {
  width: 100% !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 4px 6px !important;
  text-align: center !important;
  font-size: 0.92rem !important;
  font-weight: 800 !important;
  border-radius: 6px !important;
  background: var(--bpos-surface2, #1e293b) !important;
  border: 1px solid var(--bpos-border, #334155) !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.bpos-wh-input:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25) !important;
  outline: none !important;
}

/* 📱 Optimización Móvil Avanzada para Control de Inventario */
@media (max-width: 640px) {
  .bpos-modal-box {
    width: 98% !important;
    max-width: 100% !important;
    margin: 16px auto !important;
    max-height: calc(100vh - 32px) !important;
    display: flex !important;
    flex-direction: column !important;
  }
  .bpos-modal-dialog,
  .bpos-stock-mgr-wrap {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  #bpos-stock-list-container {
    max-height: calc(100vh - 210px) !important;
  }
  .bpos-modal-body {
    padding: 8px 6px !important;
  }
  .bpos-modal-header,
  .bpos-modal-footer {
    padding: 10px 10px !important;
  }
  .bpos-stock-filter-pills {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    padding-bottom: 6px !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .bpos-stock-filter-pills::-webkit-scrollbar {
    display: none;
  }
  .bpos-stock-filter-pills button {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    font-size: 0.8rem !important;
    padding: 6px 10px !important;
    border-radius: 8px !important;
  }
  .bpos-wh-grid-wrap {
    padding: 4px !important;
  }
  .bpos-wh-inputs-row {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 3px !important;
    width: 100% !important;
  }
  .bpos-wh-cell {
    min-width: 0 !important;
    width: 100% !important;
  }
  .bpos-wh-cell label {
    font-size: 0.63rem !important;
    margin-bottom: 2px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .bpos-wh-input {
    width: 100% !important;
    height: 36px !important;
    min-height: 36px !important;
    font-size: 0.9rem !important;
    padding: 0 !important;
    border-radius: 6px !important;
  }
  .bpos-btn-not-found {
    min-width: 34px !important;
    height: 34px !important;
    font-size: 0.78rem !important;
    border-radius: 6px !important;
    padding: 0 8px !important;
  }
  .bpos-save-stock-btn {
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 10px !important;
    font-size: 0.78rem !important;
    border-radius: 6px !important;
  }
  .bpos-loc-img-btn {
    height: 34px !important;
    min-height: 34px !important;
    font-size: 0.75rem !important;
    border-radius: 6px !important;
  }
  .bpos-stock-accordion-card {
    border-radius: 8px !important;
  }
  .bpos-stock-accordion-header {
    padding: 6px 8px !important;
  }
  .bpos-stock-accordion-body {
    padding: 6px !important;
  }
}

/* ─── Módulo de Picking y Logística Styles (Vibrant Light Theme Suite) ─ */
#bpos-picking-view {
  background: #f1f5f9;
  border-radius: 16px;
  padding: 12px;
  color: #0f172a;
}

#bpos-picking-view .bpos-label {
  color: #334155 !important;
  font-weight: 800 !important;
  font-size: 0.73rem !important;
  letter-spacing: 0.3px !important;
}

.bpos-picking-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.bpos-picking-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bpos-picking-tab {
  background: #ffffff;
  color: #475569;
  border: 1px solid #cbd5e1;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.bpos-picking-tab:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.bpos-picking-tab.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.25);
}

.bpos-tab-urgencias.active { background: #dc2626 !important; border-color: #dc2626 !important; color:#ffffff !important; box-shadow: 0 3px 10px rgba(220, 38, 38, 0.3); }
.bpos-tab-flex.active      { background: #eab308 !important; border-color: #ca8a04 !important; color:#000000 !important; font-weight: 900 !important; box-shadow: 0 3px 10px rgba(234, 179, 8, 0.3); }
.bpos-tab-listos.active    { background: #16a34a !important; border-color: #16a34a !important; color:#ffffff !important; box-shadow: 0 3px 10px rgba(22, 163, 74, 0.3); }

.bpos-picking-master-detail {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
  align-items: start;
}

@media (max-width: 1024px) {
  .bpos-picking-master-detail {
    grid-template-columns: 1fr;
  }
}

.bpos-picking-master {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
}

.bpos-picking-table-wrap {
  max-height: calc(100vh - 130px);
  overflow-x: auto;
  overflow-y: auto;
  scrollbar-width: thin;
  border: 1px solid var(--bpos-border, #334155);
  border-radius: 12px;
  background: var(--bpos-surface2, #0f172a);
}

/* ─── Compact Order Cards (Fichas de Picking & Logística) ─────────────── */
.bpos-picking-cards-container {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bpos-picking-card-item {
  background: var(--bpos-surface, #1e293b);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  position: relative;
}

.bpos-picking-card-item:hover {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.08);
  transform: translateY(-1px);
}

.bpos-picking-card-item.selected {
  border: 2.5px solid #3b82f6 !important;
  background: rgba(59, 130, 246, 0.16) !important;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.35) !important;
}

/* Top Row */
.bpos-pcard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.bpos-pcard-order-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bpos-pcard-order-num {
  font-size: 1.35rem;
  font-weight: 900;
  color: #38bdf8;
  letter-spacing: -0.5px;
}

.bpos-pcard-date {
  font-size: 0.95rem;
  font-weight: 500;
  color: #94a3b8;
}

.bpos-pcard-pin-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid #334155;
  color: #f8fafc;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.bpos-pcard-pin-btn.is-pinned {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #000000;
  font-weight: 900;
}

/* Divider Line */
.bpos-pcard-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  margin: 8px 0 10px 0;
}

/* Customer Info */
.bpos-pcard-customer {
  font-size: 0.94rem;
  font-weight: 900;
  color: #f8fafc;
  margin-bottom: 8px;
  letter-spacing: 0.2px;
}

/* Pills Row */
.bpos-pcard-pills-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.bpos-pcard-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  line-height: 1.2;
  white-space: nowrap;
}

.bpos-pill-pagado {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1.5px solid #22c55e;
}

.bpos-pill-cobrar {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1.5px solid #ef4444;
  font-weight: 900;
}

.bpos-pill-shipping {
  background: #f3e8ff;
  color: #6b21a8;
  border: 1px solid #d8b4fe;
}

.bpos-pill-flex-kw {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  padding: 2px 8px;
}

.bpos-pcard-kw-input {
  background: transparent;
  border: none;
  color: #92400e;
  font-weight: 800;
  font-size: 0.75rem;
  outline: none;
  width: 90px;
}

.bpos-pcard-kw-input::placeholder {
  color: #b45309;
}

.bpos-pill-status {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

/* Bottom Line */
.bpos-pcard-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}

.bpos-pcard-delivered-status {
  font-size: 0.88rem;
  font-weight: 700;
}

.bpos-pcard-action-btn {
  background: #475569;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s ease;
}

.bpos-pcard-action-btn.bpos-btn-primary {
  background: #2563eb;
}

.bpos-pcard-action-btn:hover {
  opacity: 0.9;
}

.bpos-picking-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  min-width: 660px;
  background: #ffffff;
}

.bpos-picking-table th {
  background: #f1f5f9;
  color: #1e293b;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.4px;
  padding: 12px 10px;
  text-align: left;
  position: sticky;
  top: 0;
  z-index: 2;
  white-space: nowrap;
  border-bottom: 2px solid #cbd5e1;
}

.bpos-picking-table th:nth-child(1), .bpos-picking-table td:nth-child(1) { min-width: 110px; }
.bpos-picking-table th:nth-child(2), .bpos-picking-table td:nth-child(2) { min-width: 160px; }
.bpos-picking-table th:nth-child(3), .bpos-picking-table td:nth-child(3) { min-width: 120px; }
.bpos-picking-table th:nth-child(4), .bpos-picking-table td:nth-child(4) { min-width: 130px; }
.bpos-picking-table th:nth-child(5), .bpos-picking-table td:nth-child(5) { min-width: 140px; }

.bpos-picking-row {
  border-bottom: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.15s ease;
  background: #ffffff;
}

.bpos-picking-row:nth-child(even) {
  background: #f8fafc;
}

.bpos-picking-row td {
  padding: 12px 10px;
  vertical-align: middle;
  color: #0f172a;
}

.bpos-picking-row:hover {
  background: #eff6ff !important;
}

.bpos-picking-row.selected {
  background: #eff6ff !important;
  border-left: 5px solid #2563eb !important;
  box-shadow: inset 0 0 8px rgba(37, 99, 235, 0.08);
}

.bpos-picking-row.selected td {
  color: #0f172a !important;
}

.bpos-row-contra-entrega {
  background: #fef2f2 !important;
  border-left: 4px solid #ef4444;
}

.bpos-badge-giant-red {
  display: inline-block;
  background: #fee2e2;
  color: #991b1b;
  font-weight: 900;
  font-size: 0.75rem;
  padding: 5px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  margin-top: 3px;
  letter-spacing: 0.4px;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.15);
  border: 1.5px solid #fca5a5;
}

.bpos-inline-kw-input {
  height: 32px !important;
  min-height: 32px !important;
  font-size: 0.8rem !important;
  padding: 2px 8px !important;
  border: 1.5px solid #ca8a04 !important;
  background: #fefce8 !important;
  color: #854d0e !important;
  font-weight: 800 !important;
  border-radius: 6px !important;
}

.bpos-tag-shipping {
  font-size: 0.72rem;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 14px;
  display: inline-block;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.bpos-shipping-Meli_Flex         { background: #fef08a; color: #854d0e; font-weight: 900; border: 1px solid #fde047; }
.bpos-shipping-Moto_Externa_Lima { background: #dbeafe; color: #1e40af; font-weight: 900; border: 1px solid #bfdbfe; }
.bpos-shipping-Shalom            { background: #f3e8ff; color: #6b21a8; font-weight: 900; border: 1px solid #e9d5ff; }
.bpos-shipping-Urbano            { background: #fce7f3; color: #9d174d; font-weight: 900; border: 1px solid #fbcfe8; }
.bpos-shipping-Recojo_Tienda     { background: #f1f5f9; color: #334155; font-weight: 900; border: 1px solid #cbd5e1; }

.bpos-tag-status {
  font-size: 0.72rem;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 14px;
  display: inline-block;
  white-space: nowrap;
}

.bpos-status-1_Pendiente               { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.bpos-status-2_Alistando               { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.bpos-status-3_Pausado_Falta_Stock     { background: #fee2e2; color: #991b1b; font-weight: 900; border: 1px solid #fca5a5; }
.bpos-status-4_Pausado_Taller_Ensamblaje { background: #fef3c7; color: #92400e; font-weight: 900; border: 1px solid #fde68a; }
.bpos-status-5_Empacado_Listo          { background: #dcfce7; color: #15803d; font-weight: 900; border: 1px solid #86efac; }
.bpos-status-6_Despachado              { background: #d1fae5; color: #065f46; font-weight: 900; }

/* Detail Panel */
.bpos-picking-detail {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  position: sticky;
  top: 10px;
  max-height: calc(100vh - 85px);
  overflow-y: auto;
  scrollbar-width: thin;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
}

.bpos-picking-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 14px !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03) !important;
}

.bpos-picking-empty-state {
  text-align: center;
  padding: 50px 20px;
}

.bpos-picking-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--bpos-border, #1e293b);
}

.bpos-picking-card {
  background: var(--bpos-surface2, #1e293b);
  border: 1px solid var(--bpos-border, rgba(255,255,255,0.08));
  border-radius: 10px;
  padding: 12px;
}

@media (max-width: 1024px) {
  .bpos-mobile-only {
    display: block !important;
  }
  .bpos-picking-detail {
    position: static !important;
    max-height: none !important;
  }
  .bpos-picking-table-wrap {
    max-height: none !important;
  }
}

/* ─── Mobile-First Responsive Design for Picking & Logistics ───────── */
@media (max-width: 768px) {
  /* 1. Stack Top Bar & Search Input */
  .bpos-picking-top-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 8px 10px !important;
  }

  .bpos-picking-top-bar .bpos-search-wrap {
    width: 100% !important;
    flex-shrink: 1 !important;
  }

  .bpos-picking-tabs-scroll {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px !important;
  }

  /* 2. Responsive Layout Columns */
  .bpos-picking-master-detail {
    display: block !important;
  }

  #bpos-picking-master-col,
  #bpos-picking-detail-panel {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* 3. Table -> Card Stream Transformation */
  .bpos-picking-table-wrap {
    border: none !important;
    background: transparent !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .bpos-picking-table {
    display: block !important;
    min-width: 0 !important;
    width: 100% !important;
    border: none !important;
  }

  .bpos-picking-table thead {
    display: none !important;
  }

  .bpos-picking-table tbody {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
  }

  .bpos-picking-row {
    display: block !important;
    background: var(--bpos-surface2, #1e293b) !important;
    border: 1px solid var(--bpos-border, rgba(255, 255, 255, 0.12)) !important;
    border-radius: 12px !important;
    padding: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3) !important;
    position: relative !important;
  }

  .bpos-picking-row.selected {
    border-color: var(--bpos-primary, #3b82f6) !important;
    border-left: 6px solid var(--bpos-primary, #3b82f6) !important;
    background: rgba(59, 130, 246, 0.15) !important;
  }

  .bpos-picking-row td {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 4px 0 !important;
    box-sizing: border-box !important;
    border: none !important;
  }

  /* Cell 1: Order Number & Date Header */
  .bpos-picking-row td:nth-child(1) {
    border-bottom: 1px solid var(--bpos-border, rgba(255, 255, 255, 0.08)) !important;
    padding-bottom: 8px !important;
    margin-bottom: 6px !important;
  }

  /* Inline Keyword Input */
  .bpos-inline-kw-input {
    width: 100% !important;
    height: 36px !important;
    font-size: 0.82rem !important;
    margin-top: 4px !important;
    box-sizing: border-box !important;
  }
}

/* ─── Picking 2.0 Zero-Error Dispatch Suite ───────────────────────── */
.bpos-picking-progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.bpos-picking-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3b82f6, #22c55e);
  transition: width 0.3s ease;
}

.bpos-pd-item-row {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 8px;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.bpos-pd-item-row:hover {
  border-color: #2563eb;
}

.bpos-pd-item-row.is-checked {
  background: #f0fdf4 !important;
  border: 1.5px solid #22c55e !important;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.12);
}

.bpos-pd-item-row.is-checked * {
  color: #15803d !important;
}

.bpos-item-check-box {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 2px solid #2563eb;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 900;
  font-size: 1.05rem;
  color: #2563eb;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.bpos-item-check-box:hover {
  transform: scale(1.08);
  border-color: #1d4ed8;
}

.bpos-item-check-box.checked {
  background: #22c55e;
  border-color: #22c55e;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
}

.bpos-badge-giant-red {
  background: rgba(239, 68, 68, 0.15);
  border: 2px solid #ef4444;
  color: #f87171;
  font-weight: 900;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  text-align: center;
  animation: bposPulseRed 2s infinite ease-in-out;
}

@keyframes bposPulseRed {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Compact Segmented Filter Control Bar */
.bpos-picking-tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--bpos-surface2, rgba(15, 23, 42, 0.8));
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--bpos-border, rgba(255, 255, 255, 0.1));
}

.bpos-picking-tab {
  padding: 4px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--bpos-text-dim, #94a3b8);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
}

.bpos-picking-tab:hover {
  color: var(--bpos-text, #ffffff);
  background: rgba(255, 255, 255, 0.06);
}

.bpos-picking-tab.active {
  background: var(--bpos-primary, #3b82f6);
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.bpos-tab-badge {
  font-size: 0.68rem;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  color: inherit;
  line-height: 1;
}

.bpos-picking-tabs-scroll::-webkit-scrollbar {
  display: none;
}

/* ─── Bixci Stock Audit Styles ─────────────────────────────────── */
.bpos-audit-filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bpos-border, rgba(255, 255, 255, 0.1));
  color: var(--bpos-text-dim, #94a3b8);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.bpos-audit-filter-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.bpos-audit-filter-btn.active {
  background: #f59e0b;
  color: #000000;
  border-color: #f59e0b;
  font-weight: 900;
}

.bpos-stock-filter-btn {
  padding: 3px 5px !important;
  font-size: 0.72rem !important;
  line-height: 1.1 !important;
  flex: none !important;
  flex-shrink: 0 !important;
}

/* Scan Line Pulse Animation */
@keyframes bposScanPulse {
  0% { top: 15%; opacity: 0.8; }
  50% { top: 85%; opacity: 1; }
  100% { top: 15%; opacity: 0.8; }
}

/* Print Label Styling */
@media print {
  body * {
    visibility: hidden;
  }
  .bpos-label-preview-wrap,
  .bpos-label-preview-wrap * {
    visibility: visible;
  }
  .bpos-label-preview-wrap {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 20px;
    border: none !important;
    box-shadow: none !important;
  }
}

/* ── Floating Customer Search Modal & Cards ────────────────────── */
.bpos-customer-floating-backdrop {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: rgba(15, 23, 42, 0.75) !important;
  backdrop-filter: blur(6px) !important;
  z-index: 99999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  box-sizing: border-box !important;
}

.bpos-customer-floating-modal {
  background: #0f172a !important;
  border: 2px solid #3b82f6 !important;
  border-radius: 14px !important;
  width: 100% !important;
  max-width: 540px !important;
  max-height: 85vh !important;
  display: flex !important;
  flex-direction: column !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 20px rgba(59, 130, 246, 0.3) !important;
  overflow: hidden !important;
  animation: bposFadeScale 0.2s ease-out !important;
}

@keyframes bposFadeScale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.bpos-customer-floating-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 14px 18px !important;
  background: #1e293b !important;
  border-bottom: 1px solid #334155 !important;
}

.bpos-customer-floating-body {
  padding: 14px 16px !important;
  overflow-y: auto !important;
  max-height: 68vh !important;
}

.bpos-customer-floating-card {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  border-radius: 10px !important;
  padding: 14px !important;
  margin-bottom: 12px !important;
  cursor: pointer !important;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease !important;
}

.bpos-customer-floating-card:hover {
  border-color: #3b82f6 !important;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.25) !important;
  transform: translateY(-2px) !important;
}

/* ── Accordions para Detalles de Picking ────────────────────────── */
.bpos-accordion {
  background: var(--bpos-surface2, #1e293b) !important;
  border: 1px solid var(--bpos-border, rgba(255,255,255,0.08)) !important;
  border-radius: var(--bpos-radius, 10px) !important;
  margin-bottom: 12px !important;
  overflow: hidden !important;
  transition: border-color var(--bpos-transition) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.bpos-accordion-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 14px 16px !important;
  cursor: pointer !important;
  user-select: none !important;
  background: transparent !important;
  transition: background var(--bpos-transition) !important;
}

.bpos-accordion-header:hover {
  background: rgba(255, 255, 255, 0.03) !important;
}

.bpos-accordion-title {
  font-weight: 800 !important;
  font-size: 0.88rem !important;
  color: var(--bpos-text, #f1f5f9) !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.bpos-accordion-icon {
  width: 16px !important;
  height: 16px !important;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2.5 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  color: var(--bpos-text-muted, #94a3b8) !important;
}

.bpos-accordion.active .bpos-accordion-icon {
  transform: rotate(180deg) !important;
  color: var(--bpos-primary, #3b82f6) !important;
}

.bpos-accordion.active {
  border-color: var(--bpos-primary, #3b82f6) !important;
}

.bpos-accordion-content {
  max-height: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
  padding: 0 16px !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.bpos-accordion.active .bpos-accordion-content {
  max-height: 2000px !important; /* Suficiente para el contenido */
  opacity: 1 !important;
  padding: 4px 16px 16px 16px !important;
}

.bpos-accordion-content .bpos-field-group {
    margin-bottom: 12px !important;
}
