/* Cashier workspace fixes: readable controls, stable sticky navigation and sortable tiles. */
#cashier .cashier-tabs {
  position: sticky;
  top: 66px;
  z-index: 34;
  width: 100%;
  max-width: 100%;
  margin: 0 0 16px;
  border: 1px solid var(--line);
  background: #eeefec;
  box-shadow: 0 7px 18px rgba(25, 28, 27, .06);
}
.demo-environment-active #cashier .cashier-tabs { top: 104px; }

#cashier .cashier-tabs button,
#cashier .cashier-line-controls,
#cashier .cashier-line-controls span,
#cashier .cashier-cart-row,
#cashier .cashier-cart-row b { color: var(--ink); }

#cashier .cashier-cart .pill {
  background: #252728 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

#cashier .cashier-price {
  background: #fff !important;
  border: 1px solid #9fa19d !important;
  color: var(--ink) !important;
  -webkit-text-fill-color: var(--ink) !important;
}

#cashier .cashier-cart-actions { display: grid; gap: 8px; margin-top: 10px; }
#cashier .cashier-cart-cancel {
  border-color: #efb5b8 !important;
  background: #fff5f5 !important;
  color: #a51b22 !important;
}

#cashier .cashier-item { position: relative; touch-action: pan-y; }
#cashier .cashier-item.cashier-dragging { opacity: .48; transform: scale(.98); }
#cashier .cashier-item.cashier-drop-before { box-shadow: -5px 0 0 var(--red); }
#cashier .cashier-item.cashier-drop-after { box-shadow: 5px 0 0 var(--red); }
.cashier-drag-handle {
  position: absolute;
  z-index: 4;
  top: 9px;
  left: 9px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid #d9dad6;
  border-radius: 50%;
  background: rgba(255,255,255,.94);
  color: #565955;
  box-shadow: 0 3px 10px rgba(0,0,0,.12);
  cursor: grab;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  user-select: none;
  -webkit-user-select: none;
}
.cashier-drag-handle:active { cursor: grabbing; }

.cashier-schedule-view { padding: 18px; }
.cashier-schedule-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 8px;
  overflow-x: auto;
}
.cashier-schedule-weekday {
  padding: 7px 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-align: center;
}
.cashier-schedule-day {
  min-height: 126px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}
.cashier-schedule-day.is-off { background: #f7f7f4; color: var(--muted); }
.cashier-schedule-day.is-today { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.cashier-schedule-date { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.cashier-schedule-date b { font-size: 17px; }
.cashier-shift-chip {
  display: grid;
  gap: 3px;
  padding: 8px;
  border-radius: 9px;
  background: #edf7f1;
  color: #165f3d;
  font-size: 10px;
}
.cashier-shift-chip b { color: #133e2c; }
.cashier-schedule-edit-actions { display: flex; gap: 8px; }

.cashier-history-receipt {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 12px;
  text-align: left;
}
.cashier-history-receipt:hover { border-color: var(--red); background: #fff8f8; }
.cashier-receipt-lines { display: grid; gap: 7px; margin-top: 13px; }
.cashier-receipt-line { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.cashier-receipt-line small { display: block; color: var(--muted); }

@media (max-width: 950px) {
  #cashier .cashier-tabs { top: 66px; }
  .demo-environment-active #cashier .cashier-tabs { top: 104px; }
  .cashier-schedule-calendar { grid-template-columns: repeat(7, minmax(105px, 1fr)); }
}

/* Direct quantity entry keeps the existing plus/minus controls. */
#cashier .cashier-line-controls { flex-wrap: wrap; }
#cashier .cashier-quantity {
  width: 84px; min-width: 64px; min-height: 40px; padding: 8px 6px;
  text-align: center; font: inherit; font-weight: 700;
  border: 1px solid #9fa19d; border-radius: 8px; background: #fff; color: var(--ink);
  appearance: textfield; -moz-appearance: textfield;
}
#cashier .cashier-quantity::-webkit-inner-spin-button,
#cashier .cashier-quantity::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
#cashier .cashier-quantity:focus { outline: 2px solid #e60012; outline-offset: 2px; }

/* Cashier sale workspace: compact catalog, clear receipt and reachable checkout. */
#cashier{padding:24px;min-width:0}
#cashier .cashier-sale{display:grid;grid-template-columns:minmax(0,1fr) minmax(350px,390px);gap:22px;align-items:start}
#cashier .cashier-sale>div{min-width:0}
#cashier .cashier-toolbar{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-bottom:14px}
#cashier-search{flex:1 1 250px;min-height:44px;border-radius:10px}
#cashier-customer{flex:1 1 180px;min-width:0;max-width:280px}
#cashier .cashier-manager-bar{background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px;box-shadow:none}
#cashier .cashier-manager-bar small{line-height:1.5}
#cashier .cashier-manager-actions{gap:6px}
#cashier .cashier-catalog{display:grid;grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:10px}
#cashier .cashier-item{border-radius:14px;overflow:hidden;min-width:0;box-shadow:0 2px 6px #00000004}
#cashier .cashier-item:hover{box-shadow:0 6px 16px #0000000a;border-color:#aaa}
#cashier .cashier-item-image{height:60px;min-height:60px;font-size:26px}
#cashier .cashier-item-info{padding:10px;gap:6px}
#cashier .cashier-item-info b{font-size:13px;line-height:1.35}
#cashier .cashier-item-info strong{font-size:17px}
#cashier .cashier-catalog-edit{margin:0 10px 10px;width:calc(100% - 20px);min-height:30px;border-radius:7px}
#cashier .cashier-cart{position:sticky;top:132px;padding:18px;border-radius:18px;max-height:calc(100vh - 150px);overflow:auto;scrollbar-gutter:stable}
#cashier .cashier-cart-row{grid-template-columns:minmax(0,1fr) 30px;gap:8px;padding:13px 0}
#cashier .cashier-cart-row>div>b{display:block;font-size:14px;line-height:1.4;margin-bottom:8px}
#cashier .cashier-line-controls{display:flex;gap:5px;align-items:center}
#cashier .cashier-line-controls .btn{min-width:32px;min-height:38px;padding:5px 8px;border-radius:8px}
#cashier .cashier-price{width:83px;min-width:60px;height:40px;padding:7px;border-radius:8px}
#cashier .cashier-quantity{width:76px;min-width:50px}
#cashier .cashier-row-amount{display:block;color:var(--muted);margin-top:8px;font-size:12px}
#cashier .cashier-total{font-size:15px;padding-top:16px;border-top:1px solid var(--line);margin-top:16px}
#cashier .cashier-total b{font-size:28px;letter-spacing:-.7px}
#cashier-checkout{min-height:50px;border-radius:12px;font-weight:800}
#cashier .cashier-cart-actions .btn{min-height:36px}
#cashier .cashier-search-reset[hidden]{display:none}
@media(min-width:1500px){#cashier .cashier-catalog{grid-template-columns:repeat(auto-fill,minmax(170px,1fr))}}
@media(max-width:1100px){#cashier{padding:18px}#cashier .cashier-sale{gap:14px;grid-template-columns:minmax(0,1fr) minmax(330px,360px)}#cashier .cashier-manager-bar{flex-direction:column;align-items:flex-start}}
@media(max-width:850px){#cashier{padding:12px}#cashier .cashier-sale{grid-template-columns:1fr}#cashier .cashier-cart{position:static;max-height:none}#cashier .cashier-catalog{grid-template-columns:repeat(auto-fill,minmax(140px,1fr))}#cashier-customer{max-width:none}}
#cashier .cashier-item{width:auto;min-height:200px;height:auto}
#cashier .cashier-catalog-edit{position:static;align-self:stretch;box-shadow:none;flex-shrink:0}
#cashier .cashier-rubricator.cashier-category-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:8px;overflow:visible}
#cashier .cashier-category-tile{width:100%;border-radius:12px;white-space:normal;min-height:64px}
#cashier .cashier-category-tile span{white-space:normal;overflow-wrap:anywhere;line-height:1.3}
