* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--bundle-font-main);
  background-color: var(--bundle-bg);
  color: var(--bundle-text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
}

/* TOPBAR REFINEMENT */
.bundle-topbar {
  height: 60px;
  background-color: var(--bundle-surface);
  border-bottom: 1px solid var(--bundle-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
  box-sizing: border-box;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-hub-btn {
  text-decoration: none;
  height: 34px;
  padding: 0 12px;
  border-radius: var(--bundle-radius-sm);
  font-size: 12.5px;
  font-weight: 700;
  background: var(--bundle-surface-subtle);
  border: 1px solid var(--bundle-border);
  color: var(--bundle-text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.topbar-hub-btn:hover {
  color: var(--bundle-text-main);
  border-color: var(--bundle-accent);
}

.brand-badge {
  background: var(--bundle-primary);
  color: #ffffff;
  font-weight: 900;
  font-size: 13px;
  padding: 5px 9px;
  border-radius: var(--bundle-radius-sm);
  letter-spacing: 0.8px;
}

.topbar-brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.15;
}

.brand-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--bundle-text-main);
  letter-spacing: -0.2px;
}

.brand-store {
  font-size: 11px;
  color: var(--bundle-text-muted);
  font-weight: 500;
}

.topbar-nav {
  display: flex;
  gap: 6px;
  background: var(--bundle-surface-subtle);
  padding: 4px;
  border-radius: var(--bundle-radius-md);
  border: 1px solid var(--bundle-border);
}

.nav-btn {
  background: transparent;
  border: none;
  color: var(--bundle-text-muted);
  font-weight: 700;
  font-size: 13px;
  padding: 7px 14px;
  border-radius: var(--bundle-radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.nav-btn:hover {
  color: var(--bundle-text-main);
  background: rgba(255, 255, 255, 0.04);
}

.nav-btn.active {
  background: var(--bundle-primary);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.nav-badge {
  background: #f59e0b;
  color: #020617;
  font-size: 11px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-clock {
  height: 34px;
  display: inline-flex;
  align-items: center;
  font-family: monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--bundle-text-main);
  background: var(--bundle-surface-subtle);
  padding: 0 10px;
  border-radius: var(--bundle-radius-sm);
  border: 1px solid var(--bundle-border);
}

.shift-status-pill {
  height: 34px;
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  padding: 0 10px;
  border-radius: var(--bundle-radius-sm);
  background: rgba(16, 185, 129, 0.15);
  color: var(--bundle-success);
  font-weight: 700;
  border: 1px solid rgba(16, 185, 129, 0.25);
  box-sizing: border-box;
}

.connection-online {
  background: rgba(16, 185, 129, 0.15);
  color: var(--bundle-success);
}

.topbar-icon-btn {
  height: 34px;
  width: 34px;
  padding: 0;
  font-size: 14px;
  border-radius: var(--bundle-radius-sm);
  border: 1px solid var(--bundle-border);
  background: var(--bundle-surface-subtle);
  color: var(--bundle-text-main);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.topbar-icon-btn:hover {
  background: var(--bundle-surface);
  border-color: var(--bundle-accent);
}

.cashier-badge {
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bundle-surface-subtle);
  padding: 0 12px;
  border-radius: var(--bundle-radius-sm);
  cursor: pointer;
  border: 1px solid var(--bundle-border);
  font-size: 13px;
  font-weight: 600;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}

.cashier-badge:hover {
  border-color: var(--bundle-primary);
}

.cashier-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bundle-primary);
}

.topbar-apps-btn {
  height: 34px;
  padding: 0 12px;
  font-size: 12.5px;
  font-weight: 800;
  background: var(--bundle-surface-subtle);
  border: 1px solid var(--bundle-border);
  color: var(--bundle-text-main);
  border-radius: var(--bundle-radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.topbar-apps-btn:hover {
  border-color: var(--bundle-primary);
  background: var(--bundle-surface);
}

/* MAIN LAYOUT */
.bundle-main {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.view-container {
  flex: 1;
  display: none;
  height: 100%;
  overflow: hidden;
}

.view-container.active {
  display: flex;
}

/* POS TERMINAL VIEW */
.pos-layout {
  width: 100%;
  display: flex;
  height: 100%;
}

.pos-catalog-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 14px 18px;
  overflow: hidden;
}

.catalog-search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.search-input {
  flex: 1;
  background: var(--bundle-surface);
  border: 1px solid var(--bundle-border);
  color: var(--bundle-text-main);
  padding: 10px 14px;
  border-radius: var(--bundle-radius-md);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease;
}

.search-input:focus {
  border-color: var(--bundle-primary);
}

.categories-scroller {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 10px;
  flex-shrink: 0;
  scrollbar-width: none;
}

.categories-scroller::-webkit-scrollbar {
  display: none;
}

.category-chip {
  background: var(--bundle-surface);
  border: 1px solid var(--bundle-border);
  color: var(--bundle-text-muted);
  padding: 8px 16px;
  border-radius: var(--bundle-radius-full);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  user-select: none;
  touch-action: manipulation;
}

.category-chip:hover {
  color: var(--bundle-text-main);
  border-color: var(--bundle-text-muted);
}

.category-chip.active {
  background: #eab308;
  border-color: #eab308;
  color: #020617;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(234, 179, 8, 0.35);
}

.products-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: 108px;
  gap: 10px;
  overflow-y: auto;
  padding-right: 4px;
}

@media (max-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.product-card {
  background: var(--bundle-surface);
  border: 1px solid var(--bundle-border);
  border-radius: var(--bundle-radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: transform 0.1s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
  touch-action: manipulation;
  overflow: hidden;
  box-sizing: border-box;
}

.product-card:hover {
  border-color: var(--bundle-accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.product-card:active {
  transform: scale(0.97);
  border-color: var(--bundle-accent);
}

.product-card-category {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--bundle-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
  line-height: 1.2;
}

.product-card-title {
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--bundle-text-main);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 4px;
  margin-bottom: 4px;
}

.product-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  margin-top: auto;
}

.product-card-price {
  font-size: 14.5px;
  font-weight: 800;
  font-family: monospace;
  color: #38bdf8;
}

.product-card-stock {
  font-size: 10.5px;
  font-weight: 800;
  font-family: monospace;
  color: #020617;
  background: #eab308;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.2px;
}

/* CART / TICKET SIDEBAR (LEFT PANE IN NUBO ERGONOMICS) */
.pos-cart-pane {
  width: 380px;
  background: var(--bundle-surface);
  border-right: 1px solid var(--bundle-border);
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-shrink: 0;
}

.cart-header {
  height: 52px;
  padding: 0 16px;
  border-bottom: 1px solid var(--bundle-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
}

.cart-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--bundle-text-main);
}

.cart-badge-count {
  font-size: 11px;
  font-weight: 800;
  background: var(--bundle-surface-subtle);
  color: var(--bundle-text-muted);
  border: 1px solid var(--bundle-border);
  padding: 2px 7px;
  border-radius: 6px;
  font-family: monospace;
}

.cart-type-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--bundle-text-muted);
  background: var(--bundle-surface-subtle);
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--bundle-border);
}

.cart-btn-clear {
  height: 28px;
  padding: 0 10px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 6px;
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cart-btn-clear:hover {
  background: var(--bundle-danger);
  color: #ffffff;
}

.cart-items-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cart-empty-message {
  margin: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.cart-empty-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--bundle-text-main);
}

.cart-empty-subtitle {
  font-size: 12px;
  color: var(--bundle-text-muted);
}

.cart-item {
  background: var(--bundle-surface-subtle);
  border: 1px solid var(--bundle-border);
  border-radius: var(--bundle-radius-sm);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--bundle-text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-unit-price {
  font-size: 11.5px;
  color: var(--bundle-text-muted);
  font-family: monospace;
  margin-top: 2px;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--bundle-border);
  background: var(--bundle-surface);
  color: var(--bundle-text-main);
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  user-select: none;
  touch-action: manipulation;
}

.qty-btn:hover {
  border-color: var(--bundle-primary);
  background: var(--bundle-surface-subtle);
}

.cart-item-qty {
  font-weight: 800;
  font-size: 14px;
  font-family: monospace;
  min-width: 22px;
  text-align: center;
  color: var(--bundle-text-main);
}

.cart-item-total {
  font-size: 14.5px;
  font-weight: 800;
  font-family: monospace;
  min-width: 60px;
  text-align: right;
  color: #38bdf8;
}

.cart-footer {
  padding: 16px;
  border-top: 1px solid var(--bundle-border);
  background: var(--bundle-surface);
}

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

.cart-totals-row span:last-child {
  font-family: monospace;
  font-weight: 700;
}

.cart-totals-row.grand-total {
  margin-top: 10px;
  margin-bottom: 14px;
  padding-top: 10px;
  border-top: 1px dashed var(--bundle-border);
  color: var(--bundle-text-main);
}

.cart-totals-row.grand-total span:first-child {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.cart-totals-row.grand-total span:last-child {
  font-size: 24px;
  font-weight: 900;
  font-family: monospace;
  color: var(--bundle-text-main);
}

.cart-checkout-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-primary-checkout {
  width: 100%;
  background: var(--bundle-success);
  color: #ffffff;
  border: none;
  padding: 14px 16px;
  border-radius: var(--bundle-radius-md);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: filter 0.15s ease, transform 0.1s ease;
  user-select: none;
  touch-action: manipulation;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-primary-checkout:hover {
  filter: brightness(1.08);
}

.btn-primary-checkout:active {
  transform: scale(0.98);
}

.cart-quick-pay-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 8px;
}

.btn-pay-card-quick,
.btn-pay-cash-quick {
  border: 1px solid var(--bundle-border);
  padding: 10px 8px;
  border-radius: var(--bundle-radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.15s ease;
  touch-action: manipulation;
}

.btn-pay-card-quick {
  background: rgba(37, 99, 235, 0.15);
  color: #60a5fa;
  border-color: rgba(37, 99, 235, 0.35);
}

.btn-pay-card-quick:hover {
  background: var(--bundle-primary);
  color: #ffffff;
}

.btn-pay-cash-quick {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.35);
}

.btn-pay-cash-quick:hover {
  background: var(--bundle-success);
  color: #ffffff;
}

.btn-pay-cash {
  background: var(--bundle-success);
  color: #ffffff;
  border: none;
  padding: 14px 16px;
  border-radius: var(--bundle-radius-md);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: filter 0.15s ease, transform 0.1s ease;
  user-select: none;
  touch-action: manipulation;
}

.btn-pay-cash:hover {
  filter: brightness(1.08);
}

.btn-pay-cash:active {
  transform: scale(0.98);
}

.btn-pay-card {
  background: var(--bundle-primary);
  color: #ffffff;
  border: none;
  padding: 14px 16px;
  border-radius: var(--bundle-radius-md);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: filter 0.15s ease, transform 0.1s ease;
  user-select: none;
  touch-action: manipulation;
}

.btn-pay-card:hover {
  filter: brightness(1.08);
}

.btn-pay-card:active {
  transform: scale(0.98);
}

.btn-park-ticket {
  background: var(--bundle-surface-subtle);
  border: 1px solid var(--bundle-border);
  color: var(--bundle-text-muted);
  padding: 10px;
  border-radius: var(--bundle-radius-sm);
  font-weight: 600;
  cursor: pointer;
}

/* MODALS */
.bundle-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.bundle-modal-overlay.open {
  display: flex;
}

.bundle-modal-card {
  background: var(--bundle-surface);
  border: 1px solid var(--bundle-border);
  border-radius: var(--bundle-radius-lg);
  width: 90%;
  max-width: 480px;
  padding: 24px;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.3);
}

/* NUMPAD FOR CASH PAYMENT */
.cash-numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0;
}

.numpad-key {
  height: 54px;
  background: var(--bundle-surface-subtle);
  border: 1px solid var(--bundle-border);
  color: var(--bundle-text-main);
  font-size: 20px;
  font-weight: 700;
  border-radius: var(--bundle-radius-sm);
  cursor: pointer;
}

.bill-shortcuts {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.bill-chip {
  flex: 1;
  padding: 10px;
  background: var(--bundle-surface-subtle);
  border: 1px solid var(--bundle-border);
  color: var(--bundle-text-main);
  font-weight: 700;
  border-radius: var(--bundle-radius-sm);
  cursor: pointer;
  text-align: center;
}

/* ENCARGOS & MANAGEMENT VIEWS */
.management-view {
  width: 100%;
  padding: 24px;
  overflow-y: auto;
}

.view-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.management-card {
  background: var(--bundle-surface);
  border: 1px solid var(--bundle-border);
  border-radius: var(--bundle-radius-md);
  padding: 18px;
}

/* KANBAN BOARD (ENCARGOS EN 3 ESTADOS) */
.kanban-board-scroll {
  display: grid;
  grid-template-columns: repeat(4, minmax(280px, 1fr));
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  overscroll-behavior-x: contain;
}

@media (max-width: 1200px) {
  .kanban-board-scroll {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
  }
  .kanban-column {
    min-width: 300px;
    width: 320px;
    flex-shrink: 0;
  }
}

.kanban-column {
  background: var(--bundle-surface);
  border: 1px solid var(--bundle-border);
  border-radius: var(--bundle-radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  min-height: 480px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.kanban-col-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior-y: contain;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 10px;
  padding-right: 4px;
}

.kanban-card {
  background: var(--bundle-surface-subtle);
  border: 1px solid var(--bundle-border);
  border-radius: var(--bundle-radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  user-select: none;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.kanban-card:hover {
  border-color: #f59e0b;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.kanban-card:active {
  transform: scale(0.99);
}

.kanban-box {
  background: var(--bundle-surface);
  padding: 10px;
  border-radius: var(--bundle-radius-sm);
  border: 1px solid var(--bundle-border);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

/* RECIBOS & HISTORIAL DE VENTAS (FORMATO LISTA & DESGLOSE) */
.recibos-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  overflow-y: auto;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.recibos-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--bundle-surface);
  border: 1px solid var(--bundle-border);
  border-radius: var(--bundle-radius-md);
  padding: 12px 16px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-pill {
  background: var(--bundle-surface-subtle);
  border: 1px solid var(--bundle-border);
  color: var(--bundle-text-muted);
  border-radius: var(--bundle-radius-full);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.filter-pill:hover {
  color: var(--bundle-text-main);
  border-color: var(--bundle-primary);
}

.filter-pill.active {
  background: var(--bundle-accent);
  border-color: var(--bundle-accent);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.filter-pill.active-primary {
  background: var(--bundle-primary);
  border-color: var(--bundle-primary);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.recibos-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.recibos-kpi-card {
  background: var(--bundle-surface);
  border: 1px solid var(--bundle-border);
  border-radius: var(--bundle-radius-md);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.recibos-kpi-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--bundle-text-muted);
}

.recibos-kpi-value {
  font-size: 24px;
  font-weight: 800;
  font-family: monospace;
  margin-top: 4px;
}

.recibos-table-wrap {
  background: var(--bundle-surface);
  border: 1px solid var(--bundle-border);
  border-radius: var(--bundle-radius-md);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.recibos-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: var(--bundle-surface-subtle);
  border-bottom: 1px solid var(--bundle-border);
}

.recibos-table-title {
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.recibos-table-total {
  font-family: monospace;
  font-weight: 800;
  font-size: 16px;
  color: var(--bundle-success);
}

.recibos-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.recibos-table th {
  background: var(--bundle-surface);
  color: var(--bundle-text-muted);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--bundle-border);
}

.recibos-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--bundle-border);
  color: var(--bundle-text-main);
}

.recibos-table tr:last-child td {
  border-bottom: none;
}

.recibos-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.method-badge-cash {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(245, 158, 11, 0.15);
  color: var(--bundle-accent);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--bundle-radius-full);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.method-badge-card {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(37, 99, 235, 0.15);
  color: var(--bundle-primary);
  border: 1px solid rgba(37, 99, 235, 0.3);
  border-radius: var(--bundle-radius-full);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

#printable-receipt {
  display: none;
}

/* ==============================================================================
   MASTERS & CONFIGURATIONS ENGINE STYLES
   ============================================================================== */
.masters-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  overflow-y: auto;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.masters-subnav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px;
  background: var(--bundle-surface);
  border: 1px solid var(--bundle-border);
  border-radius: var(--bundle-radius-md);
  flex-shrink: 0;
}

.masters-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--bundle-radius-sm);
  background: transparent;
  border: none;
  color: var(--bundle-text-muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.masters-tab-btn:hover {
  color: var(--bundle-text-main);
  background: var(--bundle-surface-subtle);
}

.masters-tab-btn.active {
  color: #ffffff;
  background: var(--bundle-primary);
}

.masters-pane {
  display: none;
  flex-direction: column;
  gap: 16px;
}

.masters-pane.active {
  display: flex;
}

.switch-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bundle-surface);
  border: 1px solid var(--bundle-border);
  border-radius: var(--bundle-radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.switch-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

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

.slider-switch {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bundle-surface-subtle);
  border: 1px solid var(--bundle-border);
  transition: .3s;
  border-radius: 24px;
}

.slider-switch:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

.switch-toggle input:checked + .slider-switch {
  background-color: var(--bundle-success);
  border-color: var(--bundle-success);
}

.switch-toggle input:checked + .slider-switch:before {
  transform: translateX(20px);
}

.masters-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.masters-table th {
  text-align: left;
  padding: 12px 14px;
  background: var(--bundle-surface-subtle);
  color: var(--bundle-text-muted);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--bundle-border);
}

.masters-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--bundle-border);
  color: var(--bundle-text-main);
}

.masters-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.btn-action-sm {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--bundle-radius-sm);
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-action-sm:hover {
  opacity: 0.85;
}

/* ==============================================================================
   OPERATIONAL TPV: CASH ARQUEO CALCULATOR & PIN NUMPAD
   ============================================================================== */
.calc-denom-box {
  background: var(--bundle-surface-subtle);
  border: 1px solid var(--bundle-border);
  border-radius: var(--bundle-radius-sm);
  padding: 6px;
  text-align: center;
}

.denom-tag {
  font-size: 11px;
  font-weight: 800;
  color: var(--bundle-text-muted);
  display: block;
  margin-bottom: 4px;
}

.denom-input {
  width: 100%;
  text-align: center;
  font-weight: 700;
  padding: 6px 2px;
  font-size: 14px;
}

/* PIN Numpad */
.pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--bundle-border);
  background: transparent;
  transition: all 0.2s;
}

.pin-dot.filled {
  background: var(--bundle-primary);
  border-color: var(--bundle-primary);
  transform: scale(1.15);
}

.pin-key {
  height: 52px;
  font-size: 18px;
  font-weight: 800;
  border-radius: var(--bundle-radius-md);
  border: 1px solid var(--bundle-border);
  background: var(--bundle-surface);
  color: var(--bundle-text-main);
  cursor: pointer;
  transition: transform 0.1s, background 0.1s;
}

.pin-key:active {
  transform: scale(0.92);
  background: var(--bundle-surface-subtle);
}

/* Product Card Touch Feedback */
.product-card {
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.product-card.long-pressing {
  transform: scale(0.96);
  border-color: var(--bundle-accent) !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

/* ==============================================================================
   ARQUEO Y CIERRE DIARIO DE CAJA (Z) - NUBO RECONCILIATION DASHBOARD
   ============================================================================== */
.z-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

@media (max-width: 640px) {
  .z-dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.z-kpi-card {
  background: var(--bundle-surface-subtle);
  border: 1px solid var(--bundle-border);
  border-radius: var(--bundle-radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.z-kpi-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--bundle-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.z-kpi-value {
  font-size: 17px;
  font-weight: 800;
  font-family: monospace;
}

.z-expected-banner {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--bundle-radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.z-movements-box {
  background: var(--bundle-surface-subtle);
  border: 1px solid var(--bundle-border);
  border-radius: var(--bundle-radius-md);
  padding: 14px;
  margin-bottom: 16px;
}

.z-envelope-box {
  background: var(--bundle-surface);
  border: 2px solid rgba(245, 158, 11, 0.45);
  border-radius: var(--bundle-radius-lg);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.z-withdrawal-row {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--bundle-radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.z-mov-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--bundle-radius-sm);
  background: var(--bundle-surface);
  border: 1px solid var(--bundle-border);
  font-size: 12px;
}

/* PRINT RECEIPT MEDIA QUERY */
@media print {
  body * {
    visibility: hidden !important;
  }
  #printable-receipt, #printable-receipt *,
  #receiptContent, #receiptContent * {
    visibility: visible !important;
  }
  #printable-receipt,
  #receiptContent {
    display: block !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 76mm !important;
    max-width: 76mm !important;
    color: #000000 !important;
    background: #ffffff !important;
    font-family: monospace, 'Courier New', Courier !important;
    font-size: 11px !important;
    padding: 0 !important;
    margin: 0 auto !important;
    border: none !important;
    box-shadow: none !important;
  }
  #modalReceipt {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 80mm !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  #modalReceipt .modal-container,
  #modalReceipt .receipt-modal-card {
    border: none !important;
    box-shadow: none !important;
    background: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 80mm !important;
  }
  #modalReceipt .receipt-modal-header,
  #modalReceipt .receipt-modal-footer,
  #modalReceipt button {
    display: none !important;
  }
}

/* ==============================================================================
   NUBO APP SWITCHER DRAWER (3 CATEGORIES & RICH ROWS)
   ============================================================================== */
.drawer-container {
  max-width: 380px;
  width: 100%;
  margin-left: auto;
  height: 100vh;
  max-height: 100vh;
  border-radius: 20px 0 0 20px;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: var(--bundle-surface);
  border-left: 1px solid var(--bundle-border);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.4);
}

.drawer-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--bundle-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bundle-surface-subtle);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.drawer-category-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--bundle-text-muted);
  padding: 0 4px 6px 4px;
}

.drawer-category-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drawer-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--bundle-radius-md);
  background: var(--bundle-surface-subtle);
  border: 1px solid var(--bundle-border);
  color: var(--bundle-text-main);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.drawer-item-row:hover {
  border-color: var(--bundle-accent);
  background: rgba(245, 158, 11, 0.08);
}

.drawer-item-row.active {
  border-color: var(--bundle-accent);
  background: rgba(245, 158, 11, 0.15);
}

.drawer-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.drawer-icon-box {
  width: 36px;
  height: 36px;
  border-radius: var(--bundle-radius-sm);
  background: var(--bundle-surface);
  border: 1px solid var(--bundle-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.drawer-item-row.active .drawer-icon-box {
  background: var(--bundle-accent);
  color: #000;
  border-color: var(--bundle-accent);
}

.drawer-item-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.drawer-item-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.drawer-item-title {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-item-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.2);
  color: var(--bundle-accent);
  border: 1px solid rgba(245, 158, 11, 0.4);
  text-transform: uppercase;
}

.drawer-item-desc {
  font-size: 11px;
  color: var(--bundle-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-item-danger {
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: var(--bundle-danger) !important;
}

.drawer-item-danger:hover {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: var(--bundle-danger) !important;
}

/* ==============================================================================
   HISTORIAL DE RECIBOS Y VENTAS (NUBO SUBTABS & ANALYTICS)
   ============================================================================== */
.recibos-subtabs-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.recibos-subtab-btn {
  padding: 6px 14px;
  border-radius: var(--bundle-radius-md);
  font-size: 12px;
  font-weight: 700;
  background: var(--bundle-surface-subtle);
  border: 1px solid var(--bundle-border);
  color: var(--bundle-text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.recibos-subtab-btn:hover {
  color: var(--bundle-text-main);
  border-color: var(--bundle-border);
}

.recibos-subtab-btn.active {
  background: var(--bundle-accent);
  color: #000;
  border-color: var(--bundle-accent);
}

.recibos-analytics-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}

.recibos-chart-container {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 16px 8px 8px 8px;
  overflow-x: auto;
  border-bottom: 1px solid var(--bundle-border);
  background: var(--bundle-surface-subtle);
  border-radius: var(--bundle-radius-md);
}

.recibos-chart-bar-wrap {
  flex: 1;
  min-width: 22px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  cursor: pointer;
  gap: 4px;
}

.recibos-chart-bar {
  width: 100%;
  max-width: 28px;
  border-radius: 4px 4px 0 0;
  background: var(--bundle-accent);
  transition: height 0.3s ease, background 0.15s ease;
}

.recibos-chart-bar-wrap:hover .recibos-chart-bar {
  background: var(--bundle-success);
  filter: brightness(1.2);
}

.recibos-chart-label {
  font-size: 10px;
  font-family: monospace;
  color: var(--bundle-text-muted);
}

/* ==============================================================================
   ENLACE DE MODAL DE ENCARGO CON MULTI-PRODUCTOS Y ERGONOMÍA NUBO
   ============================================================================== */
.encargo-modal-card {
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.encargo-table {
  width: 100%;
  font-size: 12px;
  border-collapse: collapse;
}

.encargo-table th {
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid var(--bundle-border);
  color: var(--bundle-text-muted);
  font-weight: 700;
  font-size: 11px;
}

.encargo-table td {
  padding: 8px;
  border-bottom: 1px solid var(--bundle-border);
}

.encargo-origin-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: var(--bundle-surface-subtle);
  padding: 6px;
  border-radius: var(--bundle-radius-md);
}

.encargo-origin-btn {
  padding: 8px 12px;
  border-radius: var(--bundle-radius-sm);
  font-size: 12px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  background: transparent;
  color: var(--bundle-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.encargo-origin-btn.active {
  background: var(--bundle-surface);
  color: var(--bundle-accent);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* ==============================================================================
   CIERRE Z STORE BADGE
   ============================================================================== */
.z-store-badge {
  font-size: 11px;
  font-weight: 700;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 3px 10px;
  border-radius: 9999px;
  margin-left: 6px;
  display: inline-block;
  vertical-align: middle;
}

/* ==============================================================================
   NUBO THERMAL RECEIPT MODAL (MODALRECEIPT)
   ============================================================================== */
#modalReceipt {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

#modalReceipt.open {
  display: flex !important;
}

.receipt-modal-card {
  background: var(--bundle-surface);
  border: 1px solid var(--bundle-border);
  border-radius: 24px;
  max-width: 440px;
  width: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.receipt-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--bundle-border);
  background: var(--bundle-surface);
  flex-shrink: 0;
}

.receipt-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: rgba(0, 0, 0, 0.25);
  overscroll-behavior: contain;
}

.receipt-thermal-paper {
  background: #ffffff;
  color: #000000;
  padding: 18px;
  border-radius: 16px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  line-height: 1.5;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  max-width: 360px;
  margin: 0 auto;
}

.receipt-modal-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--bundle-border);
  background: var(--bundle-surface);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  flex-shrink: 0;
}

/* ==============================================================================
   AJUSTES VISUALES & ACCESIBILIDAD (NUBO DENSITY & ACCESSIBILITY)
   ============================================================================== */
.visual-opt-btn {
  padding: 8px 6px;
  border-radius: var(--bundle-radius-md);
  border: 1px solid var(--bundle-border);
  background: var(--bundle-surface);
  color: var(--bundle-text-muted);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-family: inherit;
  font-weight: 700;
  transition: all 0.15s ease;
}

.visual-opt-btn:hover {
  background: var(--bundle-surface-subtle);
  color: var(--bundle-text-main);
  border-color: var(--bundle-accent);
}

.visual-opt-btn.active {
  border: 2px solid var(--bundle-accent) !important;
  background: rgba(245, 158, 11, 0.15) !important;
  color: var(--bundle-text-main) !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* 1. Escala tipográfica universal */
html.tpv-text-large, body.tpv-text-large {
  font-size: 115% !important;
}
html.tpv-text-xlarge, body.tpv-text-xlarge {
  font-size: 130% !important;
}
html.tpv-text-huge, body.tpv-text-huge {
  font-size: 150% !important;
}

/* 2. Densidad de cuadrícula de vitrina (columnas táctiles) */
body.tpv-cards-large .pos-products-grid,
html.tpv-cards-large .pos-products-grid,
body.tpv-cards-large #products-grid,
html.tpv-cards-large #products-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

body.tpv-cards-xlarge .pos-products-grid,
html.tpv-cards-xlarge .pos-products-grid,
body.tpv-cards-xlarge #products-grid,
html.tpv-cards-xlarge #products-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

/* 3. Alto Contraste AAA */
html.tpv-high-contrast, body.tpv-high-contrast {
  --bundle-border: #ffffff !important;
  --bundle-text-main: #ffffff !important;
  --bundle-text-muted: #f1f5f9 !important;
  --bundle-surface: #000000 !important;
  --bundle-surface-subtle: #111111 !important;
  --bundle-bg: #000000 !important;
}

/* ==============================================================================
   BUNDLE POS - ADAPTIVE RESPONSIVE SUITE (MOBILE, TABLET & DESKTOP)
   ============================================================================== */

/* 1. Mobile Cart Bottom Floating Bar */
.mobile-cart-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--bundle-surface);
  border-top: 2px solid var(--bundle-primary);
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  z-index: 950;
  box-shadow: 0 -6px 25px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  box-sizing: border-box;
}

.mobile-cart-bar:active {
  background: var(--bundle-surface-subtle);
}

.mcb-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mcb-icon {
  font-size: 20px;
}

.mcb-badge {
  background: var(--bundle-primary);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--bundle-radius-sm);
  font-family: monospace;
}

.mcb-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.15;
}

.mcb-label {
  font-size: 9px;
  font-weight: 800;
  color: var(--bundle-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mcb-total {
  font-size: 17px;
  font-weight: 900;
  font-family: monospace;
  color: var(--bundle-text-main);
}

.mcb-right {
  display: flex;
  align-items: center;
}

.mcb-action-btn {
  background: var(--bundle-primary);
  color: #ffffff;
  border: none;
  padding: 8px 14px;
  border-radius: var(--bundle-radius-md);
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.cart-btn-close-mobile {
  display: none;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--bundle-radius-sm);
  font-size: 12px;
  font-weight: 800;
  background: var(--bundle-surface-subtle);
  border: 1px solid var(--bundle-border);
  color: var(--bundle-text-main);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.cart-btn-close-mobile:hover {
  background: var(--bundle-border);
}

/* 2. TABLET RESPONSIVE RULES (769px to 1024px) */
@media (max-width: 1024px) {
  .pos-cart-pane {
    width: 320px;
  }
  .brand-store {
    display: none;
  }
}

/* 3. TABLET PORTRAIT & MOBILE BREAKPOINTS (<= 900px) */
@media (max-width: 900px) {
  .pos-layout {
    position: relative;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
  }

  .pos-catalog-pane {
    flex: 1;
    width: 100%;
    padding: 12px 14px 74px 14px; /* Space for mobile cart bar */
    overflow-y: auto;
  }

  /* Cart becomes sliding full-viewport modal drawer */
  .pos-cart-pane {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    z-index: 1050;
    background: var(--bundle-surface);
    transform: translateY(100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    border-right: none;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.7);
  }

  .pos-cart-pane.mobile-open {
    transform: translateY(0);
  }

  .cart-btn-close-mobile {
    display: inline-flex !important;
  }

  .mobile-cart-bar {
    display: flex !important;
  }
}

/* 4. COMPACT MOBILE BREAKPOINT (<= 640px) */
@media (max-width: 640px) {
  /* Topbar compact dual-tier */
  .bundle-topbar {
    height: auto;
    min-height: 52px;
    padding: 8px 12px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .topbar-brand {
    order: 1;
  }

  .topbar-user {
    order: 2;
    margin-left: auto;
    gap: 6px;
  }

  .topbar-clock, .shift-status-pill {
    display: none !important;
  }

  .cashier-badge {
    height: 32px;
    padding: 0 8px;
    font-size: 12px;
  }

  .topbar-apps-btn {
    height: 32px;
    padding: 0 10px;
    font-size: 12px;
  }

  .topbar-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    scrollbar-width: none;
    padding: 3px;
    gap: 4px;
  }

  .topbar-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-btn {
    padding: 6px 11px;
    font-size: 12px;
    flex-shrink: 0;
  }

  /* Catalog Grid 2 columns */
  .products-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    grid-auto-rows: 92px !important;
    gap: 8px !important;
    padding-bottom: 74px !important;
  }

  .product-card {
    padding: 8px 10px;
  }

  .product-card-title {
    font-size: 11.5px !important;
    line-height: 1.2;
  }

  .product-card-price {
    font-size: 13.5px !important;
  }

  /* Other Views Ergonomics */
  .recibos-container, .encargos-container, .shifts-container {
    padding: 12px !important;
    overflow-y: auto;
  }

  .view-title-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }

  .recibos-subtabs-bar {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    scrollbar-width: none;
  }

  .recibos-kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .recibos-table-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .recibos-table {
    min-width: 580px !important;
  }

  .kanban-board-scroll {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-snap-type: x mandatory !important;
    gap: 12px !important;
    padding-bottom: 12px !important;
  }

  .kanban-column {
    min-width: 275px !important;
    width: 84vw !important;
    scroll-snap-align: start !important;
    flex-shrink: 0 !important;
  }

  .z-dashboard-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  /* Modals on phone */
  .bundle-modal-card {
    width: 95vw !important;
    max-width: 95vw !important;
    padding: 16px !important;
    border-radius: var(--bundle-radius-md) !important;
    max-height: 88dvh !important;
  }

  .numpad-grid {
    gap: 6px !important;
  }

  .numpad-key {
    height: 52px !important;
    font-size: 20px !important;
  }
}




