/**
 * MCS ERP Core — Fast Modern POS (Cashier Experience) Styles
 * Touch-first, high-contrast, lightning-fast workflow.
 */

.pos-container {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(380px, 460px);
  gap: 1.5rem;
  height: calc(100vh - 160px);
  min-height: 600px;
}

.pos-demo-preview{display:grid;gap:20px;max-width:1280px;margin:0 auto;padding:8px 0 28px}.pos-demo-banner{padding:20px 24px;border:1px solid #c7d2fe;border-radius:18px;background:linear-gradient(120deg,#eef2ff,#fff 72%);color:#172554}.pos-demo-banner-mark{display:inline-flex;margin-bottom:8px;padding:4px 10px;border-radius:999px;background:#e0e7ff;color:#4338ca;font-size:12px;font-weight:800}.pos-demo-banner strong{display:block;font-size:20px}.pos-demo-banner p{margin:6px 0 0;color:#596579;font-size:14px}.pos-demo-section{padding:20px;border:1px solid var(--border,#dfe5ef);border-radius:18px;background:#fff;box-shadow:0 5px 18px #1725540a}.pos-demo-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.pos-demo-section-heading div{font-size:18px;font-weight:800;color:var(--text,#172033)}.pos-demo-section-heading span{color:var(--text-muted,#64748b);font-size:12px}.pos-demo-products{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px}.pos-demo-product{display:flex;min-width:0;min-height:172px;flex-direction:column;padding:16px;border:1px solid var(--border,#e2e8f0);border-radius:14px;background:linear-gradient(180deg,#fff,#fafbff)}.pos-demo-product-top,.pos-demo-product-footer{display:flex;align-items:center;justify-content:space-between;gap:8px}.pos-demo-product-category,.pos-demo-stock{color:#6366f1;font-size:11px;font-weight:700}.pos-demo-product h3{margin:14px 0 5px;font-size:16px}.pos-demo-code{margin:3px 0;color:var(--text-muted,#64748b);font-size:12px}.pos-demo-product-footer{margin-top:auto;padding-top:12px}.pos-demo-product-footer strong{color:#4338ca;font-size:19px}.pos-demo-product-footer span{color:#64748b;font-size:11px}.pos-demo-shifts{display:grid;gap:8px}.pos-demo-shift{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:16px;padding:13px 15px;border:1px solid var(--border,#e2e8f0);border-radius:12px;background:#fcfcff}.pos-demo-shift-detail,.pos-demo-shift-amounts{display:grid;gap:4px}.pos-demo-shift-detail strong,.pos-demo-shift-amounts strong{font-size:13px}.pos-demo-shift-detail span,.pos-demo-shift-amounts span{color:var(--text-muted,#64748b);font-size:11px}.pos-demo-closed{padding:4px 9px;border-radius:999px;background:#ecfdf5;color:#047857;font-size:11px;font-weight:800}.pos-demo-empty{padding:22px;border-radius:12px;background:#f8fafc;color:var(--text-muted,#64748b);text-align:center}.pos-demo-report-link{margin-top:14px}@media(max-width:640px){.pos-demo-section{padding:15px}.pos-demo-shift{grid-template-columns:minmax(0,1fr) auto;gap:10px}.pos-demo-closed{grid-column:2;grid-row:1}}
.pos-demo-cart{display:grid;align-content:start;gap:12px}.pos-demo-search-label,.pos-demo-payment-label,.pos-demo-mixed-label{display:grid;gap:7px;color:var(--text-muted,#64748b);font-size:13px;font-weight:700}.pos-demo-search,.pos-demo-payment,.pos-demo-cash-amount{width:100%;min-height:42px;padding:9px 12px;border:1px solid var(--border,#dfe5ef);border-radius:11px;background:#fff;color:var(--text,#172033);font:inherit}.pos-demo-search-result{min-height:18px;color:#4f46e5;font-size:12px}.pos-demo-cart-lines{display:grid;gap:8px}.pos-demo-cart-line{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:14px;padding:12px;border:1px solid var(--border,#e2e8f0);border-radius:12px;background:#fbfcff}.pos-demo-cart-line-details{display:grid;gap:4px}.pos-demo-cart-line-details span,.pos-demo-card-remainder{color:var(--text-muted,#64748b);font-size:12px}.pos-demo-quantity-controls{display:flex;align-items:center;gap:8px}.pos-demo-quantity-controls button{min-width:34px;min-height:34px}.pos-demo-total-row{margin-top:4px;color:var(--text-muted,#64748b);font-size:13px}.pos-demo-total{color:#4338ca;font-size:24px}.pos-demo-cart-actions{display:flex;flex-wrap:wrap;gap:8px}.pos-demo-cart-actions button{min-height:40px}.pos-demo-cart-actions button:disabled{opacity:.55;cursor:not-allowed}.pos-demo-receipt{display:grid;gap:7px;padding:12px;border-radius:12px;background:#f5f3ff;color:#312e81;font-size:13px}.pos-demo-receipt:empty{display:none}.pos-demo-receipt small{color:#475569;line-height:1.7}.pos-demo-workspace{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(300px,.8fr);align-items:start;gap:18px}.pos-demo-add{padding:7px 11px;font-size:12px}.pos-demo-mixed-label[hidden]{display:none}@media(max-width:850px){.pos-demo-workspace{grid-template-columns:1fr}}@media(max-width:560px){.pos-demo-cart-line{grid-template-columns:minmax(0,1fr) auto}.pos-demo-cart-line>strong{grid-column:1/-1}.pos-demo-cart-actions button{flex:1}}

/* POS receipt history */
.pos-orders-modal{width:min(860px,calc(100vw - 28px));max-width:860px!important}.pos-orders-shell{display:flex;max-height:min(760px,calc(100vh - 40px));flex-direction:column}.pos-orders-toolbar{display:flex;gap:10px;padding:18px 22px;border-bottom:1px solid var(--border,#e2e8f0);background:#f8fafc}.pos-orders-toolbar input{min-width:0;min-height:44px;flex:1;border:1px solid var(--border,#e2e8f0);border-radius:10px;padding-inline:14px;background:#fff}.pos-orders-toolbar button{min-width:88px;border:0;border-radius:10px}.pos-orders-results{display:grid;gap:10px;overflow:auto;padding:18px 22px}.pos-order-card{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:18px;padding:14px 16px;border:1px solid var(--border,#e2e8f0);border-radius:12px;background:#fff}.pos-order-info{display:grid;min-width:0;gap:4px}.pos-order-info strong{direction:ltr;text-align:right;color:#172033}.pos-order-info span,.pos-order-info small{overflow:hidden;color:var(--text-muted,#64748b);font-size:12px;text-overflow:ellipsis;white-space:nowrap}.pos-order-total{white-space:nowrap;color:#172033}.pos-order-actions{display:flex;gap:7px}.pos-order-actions button{min-height:34px;padding:0 10px;border:1px solid var(--border,#e2e8f0);border-radius:9px;background:#fff;color:#475569;font:700 11px inherit;cursor:pointer}.pos-order-actions button:hover{border-color:#a5b4fc;color:#4338ca}.pos-order-actions .is-return{border-color:#fed7aa;background:#fff7ed;color:#c2410c}.pos-orders-empty{padding:42px 16px;text-align:center;color:#64748b}.pos-orders-empty.is-error{color:#b91c1c}

.pos-order-actions .is-exchange{border-color:#bfdbfe;background:#eff6ff;color:#1d4ed8}
.pos-coupon-button{min-height:40px;padding:0 12px;border:1px solid #c7d2fe;border-radius:10px;background:#fff;color:#4338ca;font:800 12px inherit;cursor:pointer;white-space:nowrap}.pos-coupon-button:hover,.pos-coupon-button.is-active{border-color:#818cf8;background:#eef2ff}.pos-coupon-button.is-active{color:#3730a3}
.pos-coupon-action{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-width:112px;min-height:40px;padding:0 12px;border-color:#dbe2ea;background:#fff;color:#334155;box-shadow:none;transition:border-color .16s ease,background .16s ease,color .16s ease}.pos-coupon-action:hover{border-color:#a5b4fc;background:#f8f9ff;color:#4338ca}.pos-coupon-icon{display:grid;width:20px;height:20px;flex:0 0 20px;place-items:center;color:#6366f1}.pos-coupon-icon svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.8}.pos-coupon-copy{display:block;line-height:1}.pos-coupon-copy strong{color:inherit;font-size:12px;font-weight:800}.pos-coupon-action.is-active{border-color:#86efac;background:#f0fdf4;color:#15803d}.pos-coupon-action.is-active .pos-coupon-icon{color:#16a34a}
.pos-more-actions{position:relative;z-index:8}.pos-more-trigger{display:grid;width:40px;height:40px;padding:0;place-items:center;border:1px solid #dbe2ea;border-radius:10px;background:#fff;color:#475569;font-family:inherit;cursor:pointer;transition:border-color .16s ease,background .16s ease,color .16s ease}.pos-more-trigger svg{width:18px;height:18px;fill:currentColor}.pos-more-trigger:hover,.pos-more-trigger.is-open{border-color:#a5b4fc;background:#f8f9ff;color:#4f46e5}.pos-more-dropdown{position:absolute;top:calc(100% + 7px);inset-inline-start:0;width:190px;padding:6px;border:1px solid #e2e8f0;border-radius:12px;background:#fff;box-shadow:0 14px 34px rgba(15,23,42,.14)}.pos-more-dropdown[hidden]{display:none}.pos-more-dropdown .pos-coupon-button{display:flex;width:100%;min-height:40px;align-items:center;justify-content:flex-start;gap:8px;padding:0 10px;border:0;border-radius:8px;background:transparent;color:#334155;font-family:inherit;text-align:start;box-shadow:none}.pos-more-dropdown .pos-coupon-button:hover{background:#f5f7fb;color:#4338ca;transform:none}.pos-more-dropdown .pos-coupon-button.is-active{background:#f0fdf4;color:#15803d}.pos-more-dropdown .pos-coupon-button+ .pos-coupon-button{margin-top:2px}
.pos-customer-value{min-height:16px;color:#047857;font-size:11px;font-weight:800}.pos-sale-context{justify-content:flex-start!important;gap:10px!important}.pos-sale-context .pos-vertical-hint{margin-inline-start:auto}
@media(max-width:680px){.pos-order-card{grid-template-columns:1fr auto}.pos-order-actions{grid-column:1/-1}.pos-order-actions button{flex:1}.pos-orders-toolbar{padding:14px}.pos-orders-results{padding:14px}}

.pos-business-badge{display:inline-flex;align-items:center;min-height:36px;padding:0 12px;border:1px solid #c7d2fe;border-radius:10px;background:#eef2ff;color:#4338ca;font-size:12px;font-weight:800;white-space:nowrap}.pos-business-badge.is-pharmacy{border-color:#a7f3d0;background:#ecfdf5;color:#047857}.pos-business-badge.is-restaurant{border-color:#fed7aa;background:#fff7ed;color:#c2410c}.pos-sale-context{display:flex;align-items:end;justify-content:space-between;gap:14px;padding:12px 4px 4px}.pos-customer-field{display:grid;gap:5px;min-width:min(370px,100%)}.pos-customer-field>span:not(.pos-customer-control-row),.pos-line-discount>span{font-size:11px;font-weight:800;color:var(--text-muted)}.pos-customer-control-row{display:grid;grid-template-columns:minmax(0,1fr) 40px;align-items:stretch;gap:8px}.pos-customer-field select{width:100%;height:40px;min-height:40px;border:1px solid var(--border);border-radius:10px;background:var(--surface);padding-inline:12px}.pos-vertical-hint{color:var(--text-muted);font-size:12px}.pos-pharmacy-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:10px;font-size:10px}.pos-pharmacy-meta span{padding:4px 7px;border-radius:999px;background:#f1f5f9;color:#475569}.pos-pharmacy-meta .requires-prescription{background:#fff7ed;color:#c2410c}.pos-pharmacy-meta .batch-available{background:#ecfdf5;color:#047857}.pos-pharmacy-meta .batch-empty{background:#fef2f2;color:#b91c1c}.pos-product-card.is-unavailable{opacity:.62}.pos-product-card.is-unavailable:after{content:"غير متاح للبيع";position:absolute;inset:0;display:grid;place-items:center;background:rgba(255,255,255,.76);color:#b91c1c;font-weight:900}.pos-line-discount{display:grid;gap:4px;width:78px}.pos-line-discount input{width:100%;min-height:34px;padding:4px 7px;border:1px solid var(--border);border-radius:8px;text-align:center}.pos-item-batch{color:#047857!important}.pos-prescription-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:14px;border:1px solid #a7f3d0;border-radius:12px;background:#f0fdf4}.pos-prescription-fields legend{padding-inline:8px;color:#047857;font-weight:900}.pos-prescription-fields input{min-height:40px;border:1px solid #bbf7d0;border-radius:9px;padding-inline:10px;background:#fff}.pos-batch-dialog .record-dialog-body{padding:20px}.pos-batch-dialog label{display:grid;gap:8px}.pos-batch-dialog select{min-height:46px;border:1px solid var(--border);border-radius:10px;padding-inline:12px}@media(max-width:760px){.pos-sale-context{align-items:stretch;flex-direction:column}.pos-customer-field{min-width:0}.pos-vertical-hint{line-height:1.6}.pos-prescription-fields{grid-template-columns:1fr}.pos-line-discount{width:66px}}

/* ==========================================================================
   Catalog Section (Left / Main)
   ========================================================================== */
.pos-catalog-wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius-xl, 14px);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.pos-search-bar {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
.pos-search-bar .pos-printer-download { flex: 0 0 auto; min-height: 38px; display: inline-flex; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); background: var(--surface); font-size: 12px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.pos-search-bar .pos-printer-download:hover { border-color: var(--accent); color: var(--accent); }
.pos-printer-controls { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.pos-printer-controls .pos-printer-check { min-height: 38px; padding: 0 11px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); background: var(--surface); font: inherit; font-size: 12px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.pos-printer-controls .pos-printer-check:hover { border-color: var(--accent); color: var(--accent); }
.pos-printer-controls .pos-printer-check.is-ready { border-color: #86efac; background: #f0fdf4; color: #15803d; }
.pos-printer-controls .pos-printer-check:disabled { opacity: .7; cursor: wait; }
.pos-search-input-wrap {
  position: relative;
  flex: 1;
}
.pos-search-input-wrap input {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 2.75rem;
  font-size: var(--text-base, 15px);
  font-family: inherit;
  border: 2px solid var(--border, #e2e8f0);
  border-radius: var(--radius-lg, 10px);
  background: var(--surface-subtle, #f8fafc);
  outline: none;
  transition: all var(--transition-fast);
}
.pos-search-input-wrap input:focus {
  border-color: var(--accent, #4f46e5);
  background: var(--surface, #ffffff);
  box-shadow: 0 0 0 4px var(--focus-ring, rgba(99, 102, 241, 0.2));
}
.pos-search-icon {
  position: absolute;
  inset-inline-start: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim, #94a3b8);
  pointer-events: none;
  font-size: 16px;
}

.pos-categories {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}
.pos-categories::-webkit-scrollbar {
  height: 4px;
}
.pos-categories::-webkit-scrollbar-thumb {
  background: var(--slate-300, #cbd5e1);
  border-radius: 4px;
}
.pos-cat-pill {
  padding: 0.45rem 1rem;
  font-size: var(--text-xs, 12px);
  font-weight: 700;
  font-family: inherit;
  border-radius: var(--radius-full, 9999px);
  border: 1px solid var(--border, #e2e8f0);
  background: var(--surface-subtle, #f8fafc);
  color: var(--text-muted, #64748b);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}
.pos-cat-pill:hover {
  border-color: var(--accent, #4f46e5);
  color: var(--accent, #4f46e5);
}
.pos-cat-pill.active {
  background: var(--accent, #4f46e5);
  border-color: var(--accent, #4f46e5);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
}

.pos-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  overflow-y: auto;
  padding: 0.25rem;
  flex: 1;
}
.pos-product-grid::-webkit-scrollbar {
  width: 6px;
}
.pos-product-grid::-webkit-scrollbar-thumb {
  background: var(--slate-300, #cbd5e1);
  border-radius: 4px;
}
.pos-product-pagination { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:8px 4px 2px; color:var(--text-muted,#64748b); font-size:12px; }
.pos-product-pagination button,.pos-offline-catalog-button { min-height:36px; padding:0 11px; border:1px solid var(--border,#e2e8f0); border-radius:9px; background:var(--surface,#fff); color:var(--text,#172033); font-family:inherit; font-size:12px; font-weight:700; cursor:pointer; }
.pos-product-pagination button:hover,.pos-offline-catalog-button:hover { border-color:var(--accent,#4f46e5); color:var(--accent,#4f46e5); }
.pos-product-pagination button:disabled,.pos-offline-catalog-button:disabled { opacity:.55; cursor:wait; }
.pos-offline-catalog-button { flex:0 0 auto; white-space:nowrap; }

.pos-product-card {
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius-lg, 12px);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}
.pos-product-card:hover {
  border-color: var(--accent, #4f46e5);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.pos-product-card:active {
  transform: translateY(0);
}
.pos-product-sku {
  font-size: var(--text-2xs, 11px);
  font-weight: 700;
  color: var(--text-dim, #94a3b8);
  font-family: var(--font-mono);
  margin-bottom: 0.25rem;
}
.pos-product-identifiers { display: grid; gap: 3px; margin-bottom: .25rem; }
.pos-product-identifiers .pos-product-sku { margin: 0; }
.pos-product-barcode { overflow: hidden; color: var(--text-muted, #64748b); font: 600 10px/1.35 var(--font-mono, Consolas, monospace); text-overflow: ellipsis; white-space: nowrap; }
.pos-product-grid[data-card-density="compact"] { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: .65rem; }
.pos-product-grid[data-card-density="compact"] .pos-product-card { padding: .72rem; }
.pos-product-grid[data-card-density="compact"] .pos-product-name { margin-bottom: .45rem; }
.pos-product-name {
  font-size: var(--text-sm, 13.5px);
  font-weight: 700;
  color: var(--text, #0f172a);
  line-height: 1.35;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pos-product-bottom {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border-subtle, #f1f5f9);
}
.pos-product-price {
  font-size: var(--text-base, 15px);
  font-weight: 800;
  color: var(--accent, #4f46e5);
}

/* ==========================================================================
   Cart Section (Right / Sidebar)
   ========================================================================== */
.pos-cart-wrap {
  display: flex;
  flex-direction: column;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius-xl, 14px);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  border-top: 3px solid var(--accent, #4f46e5);
}

/* Restaurant modifiers inside POS */
.restaurant-modifier-dialog{width:min(680px,calc(100vw - 28px));max-height:min(780px,calc(100vh - 28px));padding:0;border:0;border-radius:20px;background:var(--surface);color:var(--text);box-shadow:0 28px 80px rgba(15,23,42,.28)}.restaurant-modifier-dialog::backdrop{background:rgba(15,23,42,.58);backdrop-filter:blur(5px)}.restaurant-modifier-card{display:grid;max-height:inherit}.restaurant-modifier-card>header,.restaurant-modifier-card>footer{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:18px 22px}.restaurant-modifier-card>header{border-bottom:1px solid var(--border)}.restaurant-modifier-card>header small{color:var(--brand);font-weight:800}.restaurant-modifier-card h3{margin:3px 0 0;font-size:21px}.restaurant-modifier-card>footer{justify-content:flex-start;border-top:1px solid var(--border);background:var(--surface-subtle)}.restaurant-modifier-card>footer button{min-width:120px}.restaurant-modifier-body{display:grid;gap:16px;padding:20px 22px;overflow:auto}.modifier-group{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0;padding:16px;border:1px solid var(--border);border-radius:15px}.modifier-group legend{padding:0 8px;font-weight:800}.modifier-group>small{grid-column:1/-1;color:var(--text-muted)}.modifier-option{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;padding:12px;border:1px solid var(--border);border-radius:11px;background:var(--surface);cursor:pointer;transition:border-color .16s ease,background .16s ease}.modifier-option:has(input:checked){border-color:var(--brand);background:var(--brand-subtle)}.modifier-option input{width:17px;height:17px;accent-color:var(--brand)}.modifier-option strong{font-size:12px;color:var(--brand)}.pos-item-modifiers{display:block;margin-top:3px;color:var(--brand)!important;font-weight:700}@media(max-width:620px){.modifier-group{grid-template-columns:1fr}.restaurant-modifier-card>header,.restaurant-modifier-card>footer,.restaurant-modifier-body{padding-inline:16px}}
.pos-search-icon svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}

.pos-product-card:focus-visible, .pos-cat-pill:focus-visible, .pos-clear-cart:focus-visible {
  outline: 3px solid var(--focus-ring, rgba(99,102,241,.3));
  outline-offset: 2px;
}
.pos-cart-total, .pos-checkout-btn { box-shadow: 0 8px 20px rgba(79,70,229,.16); }

@media (max-width: 980px) {
  .pos-container { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .pos-catalog-wrap { min-height: 520px; }
  .pos-cart-wrap { min-height: 420px; }
}
@media (max-width: 520px) {
  .pos-catalog-wrap, .pos-cart-wrap { padding: .85rem; border-radius: 10px; }
  .pos-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
  .pos-product-card { padding: .75rem; }
  .pos-product-name { font-size: 13px; }
  .pos-search-bar { flex-wrap: wrap; }
}

.pos-cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border, #e2e8f0);
}
.pos-cart-identity{display:grid;gap:4px;min-width:0}.pos-cart-identity>strong{font-size:15px;color:var(--text,#0f172a)}
.pos-shift-badge {
  display: block;
  font-size: var(--text-xs, 12px);
  font-weight: 600;
  color: var(--text-muted,#64748b);
}
.pos-cart-head-actions{display:flex;align-items:center;gap:7px}.pos-header-action{min-height:34px;padding:0 10px;border:1px solid var(--border,#e2e8f0);border-radius:9px;background:var(--surface,#fff);color:var(--text-muted,#64748b);font:700 11px/1 inherit;cursor:pointer;transition:.18s ease}.pos-header-action:hover{border-color:#a5b4fc;background:#f8faff;color:#4338ca}.pos-header-action.is-danger:hover{border-color:#fecaca;background:#fff7f7;color:#b91c1c}.pos-header-action:disabled{opacity:.4;cursor:not-allowed;background:#f8fafc;color:#94a3b8}.pos-header-action:focus-visible{outline:3px solid rgba(99,102,241,.16);outline-offset:2px}
.pos-clear-cart{min-height:34px;padding:0 10px;border:1px solid var(--border,#e2e8f0);border-radius:9px;background:var(--surface,#fff);color:var(--text-muted,#64748b);font-size:11px;font-weight:700}
@media(max-width:520px){.pos-cart-header{align-items:flex-start}.pos-cart-head-actions{align-items:stretch;flex-direction:column}.pos-header-action{min-height:32px}}
.pos-held-list{display:grid;gap:8px;padding:18px 22px 24px;max-height:55vh;overflow:auto}.pos-held-option{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;padding:13px 14px;border:1px solid var(--border,#e2e8f0);border-radius:11px;background:var(--surface,#fff);color:var(--text,#0f172a);text-align:right;cursor:pointer;transition:.18s ease}.pos-held-option:hover{border-color:#a5b4fc;background:#f8faff;transform:translateY(-1px)}.pos-held-option div{display:grid;gap:4px}.pos-held-option small{color:var(--text-muted,#64748b)}.pos-held-option b{color:#4338ca;white-space:nowrap}

.pos-cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.pos-cart-items::-webkit-scrollbar {
  width: 5px;
}
.pos-cart-items::-webkit-scrollbar-thumb {
  background: var(--slate-300, #cbd5e1);
  border-radius: 4px;
}

.pos-cart-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  background: var(--surface-subtle, #f8fafc);
  border: 1px solid var(--border-subtle, #f1f5f9);
  border-radius: var(--radius-lg, 10px);
}
.pos-item-info strong {
  display: block;
  font-size: var(--text-sm, 13.5px);
  font-weight: 700;
  color: var(--text, #0f172a);
}
.pos-item-info small {
  font-size: var(--text-xs, 12px);
  color: var(--text-muted, #64748b);
}

.pos-qty-stepper {
  display: inline-flex;
  align-items: center;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius-md, 8px);
  overflow: hidden;
}
.pos-qty-btn {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: var(--text, #0f172a);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}
.pos-qty-btn:hover {
  background: var(--surface-subtle, #f1f5f9);
}
.pos-qty-value {
  width: 32px;
  text-align: center;
  font-size: var(--text-xs, 12px);
  font-weight: 700;
  color: var(--text, #0f172a);
}

.pos-item-total {
  font-size: var(--text-sm, 13.5px);
  font-weight: 800;
  color: var(--text, #0f172a);
  min-width: 65px;
  text-align: end;
}

.pos-cart-summary {
  border-top: 1px solid var(--border, #e2e8f0);
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.pos-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-sm, 13.5px);
  color: var(--text-muted, #64748b);
  font-weight: 500;
}
.pos-summary-row.total-row {
  font-size: var(--text-xl, 20px);
  font-weight: 900;
  color: var(--text, #0f172a);
  padding-top: 0.5rem;
  border-top: 2px dashed var(--border, #e2e8f0);
  margin-top: 0.25rem;
}
.pos-summary-row.total-row strong {
  color: var(--accent, #4f46e5);
}

.pos-cart-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
}
.pos-cart-actions button.pay-btn {
  grid-column: span 2;
  padding: 0.95rem 1.5rem;
  font-size: var(--text-lg, 17px);
  font-weight: 800;
  background: linear-gradient(135deg, var(--emerald-600, #059669) 0%, var(--emerald-700, #047857) 100%);
  color: #ffffff;
  border: 0;
  border-radius: var(--radius-lg, 10px);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
  transition: all var(--transition-fast);
}
.pos-cart-actions button.pay-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.45);
}
.pos-cart-actions button.pay-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pos-cart-actions button.hold-btn, .pos-cart-actions button.recall-btn {
  padding: 0.65rem 1rem;
  font-size: var(--text-xs, 12px);
  font-weight: 700;
  font-family: inherit;
  background: var(--surface-subtle, #f8fafc);
  color: var(--text, #0f172a);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius-md, 8px);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.pos-cart-actions button.hold-btn:hover, .pos-cart-actions button.recall-btn:hover {
  background: var(--soft, #eef2ff);
  border-color: var(--border-focus, #818cf8);
  color: var(--accent, #4f46e5);
}

/* ==========================================================================
   Payment Modal & Quick Cash
   ========================================================================== */
.pos-pay-modal {
  width: min(520px, calc(100% - 2rem));
}
.pos-payment-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.pos-method-card {
  padding: 0.85rem 0.5rem;
  border: 2px solid var(--border, #e2e8f0);
  border-radius: var(--radius-lg, 10px);
  background: var(--surface, #ffffff);
  text-align: center;
  font-size: var(--text-sm, 13.5px);
  font-weight: 700;
  color: var(--text, #0f172a);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.pos-method-card.active {
  border-color: var(--accent, #4f46e5);
  background: var(--soft, #eef2ff);
  color: var(--accent, #4f46e5);
}

.pos-quick-cash {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}
.pos-cash-chip {
  padding: 0.4rem 0.85rem;
  font-size: var(--text-xs, 12px);
  font-weight: 700;
  font-family: var(--font-mono);
  background: var(--surface-subtle, #f1f5f9);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius-full, 9999px);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.pos-cash-chip:hover {
  background: var(--accent, #4f46e5);
  border-color: var(--accent, #4f46e5);
  color: #ffffff;
}

.pos-change-box {
  padding: 1rem;
  background: var(--emerald-50, #ecfdf5);
  border: 1px solid var(--emerald-200, #a7f3d0);
  border-radius: var(--radius-lg, 10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.25rem;
}

.pos-payment-error{margin:0;padding:12px 14px;border:1px solid var(--danger-border,#fecdd3);border-radius:11px;background:var(--danger-soft,#fff1f2);color:var(--danger,#e11d48);font-size:13px;font-weight:800;text-align:center;line-height:1.6}
.pos-change-box span {
  font-size: var(--text-sm, 13.5px);
  font-weight: 700;
  color: var(--emerald-800, #065f46);
}
.pos-change-box strong {
  font-size: var(--text-2xl, 24px);
  font-weight: 900;
  color: var(--emerald-700, #047857);
}

/* ==========================================================================
   Thermal Receipt Print Layout
   ========================================================================== */
@media print {
  body * {
    visibility: hidden;
  }
  #thermalReceipt, #thermalReceipt * {
    visibility: visible;
  }
  #thermalReceipt {
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    width: 80mm;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 3mm;
    font-family: var(--font-mono, monospace);
    font-size: 12px;
    color: #000000;
    background: #ffffff;
  }
}

