/* Readable cashier workspace. Scoped to POS; no dashboard/dialog font changes. */
#pos-workspace { min-width: 0; }
#pos-catalog-panel, #pos-cart-panel { min-width: 0; }
#pos-workspace #products-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-auto-rows: minmax(200px, max-content) !important;
  gap: 10px !important;
}
#pos-workspace .product-card {
  height: auto !important;
  min-height: max-content !important;
  max-height: none !important;
  padding: 10px !important;
  font-size: 14px !important;
}
#pos-workspace .product-image-container {
  height: 82px !important;
  min-height: 82px !important;
  max-height: 82px !important;
  flex: 0 0 82px !important;
}
#pos-workspace .product-image { height: 100% !important; max-height: 100% !important; }
#pos-workspace .product-card h3 { font-size: 14px !important; line-height: 1.5 !important; min-height: 42px; }
#pos-workspace .product-card .pos-product-price { min-width: 0; }
#pos-workspace .product-card > .grid { grid-template-columns: auto minmax(0,1fr) auto; }
#pos-workspace .product-card > .grid > :first-child { grid-column: 1; grid-row: 1; }
#pos-workspace .product-card > .grid > :last-child { grid-column: 3; grid-row: 1; }
#pos-workspace .product-card .pos-product-price { grid-column: 2; grid-row: 1; }
#pos-workspace .product-card .pos-product-price > span { font-size: 12px !important; line-height: 1.35 !important; max-width: 100%; white-space: normal !important; overflow-wrap: anywhere; }
#pos-workspace .product-card .pos-product-price > span > span { font-size: 11px !important; }
#pos-workspace .product-card .pos-product-price > span > span.font-extrabold { font-size: 12px !important; }
#pos-workspace .product-stock-label { font-size: 11px !important; }
#pos-workspace .product-category-label { font-size: 12px !important; }
#pos-workspace .product-card button { min-height: 24px !important; min-width: 24px; }
#pos-workspace #search-input { font-size: 14px; min-height: 44px; }
#pos-workspace #categories-bar button { font-size: 13px; min-height: 36px; }
#pos-cart-panel h2 { font-size: 16px; }
#pos-cart-panel #invoice-no-display { font-size: 13px; }
#pos-cart-panel #customer-phone-search { font-size: 14px; min-height: 42px; }
#pos-cart-panel #customer-status-area { font-size: 14px; }
#pos-cart-panel #customer-status-area button, #pos-cart-panel #customer-status-area span { font-size: 13px; }
#pos-cart-items { overflow: auto; overscroll-behavior: contain; }
#pos-cart-panel table { width: 100%; table-layout: fixed; font-size: 14px; }
#pos-cart-panel th { font-size: 13px; padding: 10px 4px; }
#pos-cart-panel th:nth-child(1) { width: 33%; }
#pos-cart-panel th:nth-child(2) { width: 18%; }
#pos-cart-panel th:nth-child(3) { width: 18%; }
#pos-cart-panel th:nth-child(4) { width: 21%; }
#pos-cart-panel th:nth-child(5) { width: 10%; }
#pos-cart-panel #cart-table-body { font-size: 14px; }
#pos-cart-panel #cart-table-body tr { font-size: 14px; }
#pos-cart-panel td { padding: 6px 4px; line-height: 1.6; overflow-wrap: anywhere; font-size: 14px; }
#pos-cart-panel td p { font-size: 14px; }
#pos-cart-panel td p + p { font-size: 12px; }
#pos-cart-panel td:nth-child(3), #pos-cart-panel td:nth-child(4) { font-variant-numeric: tabular-nums; }
#pos-cart-panel td input { width: 100%; max-width: 84px; min-height: 32px; padding: 2px 1px; font-size: 14px; }
#pos-cart-panel td button { min-width: 30px; min-height: 30px; }
#pos-cart-panel .pos-quantity-control { display: inline-grid; grid-template-columns: minmax(0,1fr) 20px; direction: ltr; width: 100%; max-width: 84px; height: 32px; vertical-align: middle; border: 1px solid #dbe3ed; border-radius: 4px; background: white; }
#pos-cart-panel .pos-quantity-control:focus-within { border-color: #93c5fd; }
#pos-cart-panel .pos-quantity-control input { min-width: 0; max-width: none; min-height: 0; height: 30px; padding: 2px 1px; border: 0; background: transparent; border-radius: 3px 0 0 3px; }
#pos-cart-panel .pos-quantity-arrows { display: grid; grid-template-rows: 1fr 1fr; border-left: 1px solid #e2e8f0; }
#pos-cart-panel .pos-quantity-arrows button { display: grid; place-items: center; min-width: 0; min-height: 0; width: 19px; height: 15px; padding: 0; color: #64748b; font-size: 12px; line-height: 1; }
#pos-cart-panel .pos-quantity-arrows button:hover { color: #2563eb; background: #eff6ff; }
#pos-cart-panel .pos-quantity-arrows button:focus-visible { outline: 2px solid #2563eb; outline-offset: -2px; }
#pos-cart-summary { font-size: 14px; padding: 12px; }
#pos-cart-summary > div { gap: 10px; font-size: 14px; }
#pos-cart-summary #grand-total-val { font-size: 21px; font-variant-numeric: tabular-nums; white-space: nowrap; }
#pos-cart-summary button { font-size: 14px; min-height: 46px; }
#pos-cart-summary .pos-cart-actions .app-btn { font-size: 17px; font-weight: 800; line-height: 1.2; gap: 8px; }
#pos-cart-summary .pos-cart-actions .app-btn :is(i,svg) { width: 20px; height: 20px; flex-shrink: 0; }
#pos-cart-summary .pos-discount-btn { background: #dc2626; border-color: #dc2626; color: #fff; }
#pos-cart-summary .pos-discount-btn:hover { background: #b91c1c; border-color: #b91c1c; color: #fff; }
@media (min-width: 640px) and (max-width: 1023px) {
  #pos-workspace #products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (min-width: 1024px) {
  #pos-workspace { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  #pos-catalog-panel, #pos-cart-panel { grid-column: auto; }
  #pos-workspace #products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (min-width: 1280px) {
  #pos-workspace #products-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}
@media (max-width: 1023px) {
  #pos-workspace { overflow: visible; }
  #pos-catalog-panel { min-height: 390px; max-height: 60vh; }
  #pos-cart-panel { min-height: 460px; max-height: 85vh; }
}
@media (max-width: 420px) {
  #pos-cart-panel th { font-size: 13px; }
  #pos-cart-panel td, #pos-cart-panel td input { font-size: 14px; }
  #pos-cart-summary { padding: 8px; }
  #pos-cart-summary > div { font-size: 14px; }
  #pos-cart-summary button { font-size: 14px; }
  #pos-workspace .product-card h3 { font-size: 14px !important; }
}
/* Selected row for quantity/price shortcuts, without changing keyboard focus. */
#cart-table-body tr.pos-cart-active { background:#eff6ff; box-shadow:inset -3px 0 #2563eb; }
#cart-table-body [data-latin-number] { direction:ltr; unicode-bidi:isolate; }


