/* ─── VIEW 1: POS ─── */
.pos-demo-layout { display: flex; flex: 1; overflow: hidden; }
.pos-menu-panel  {
  flex: 1; display: flex; flex-direction: column;
  background: #F1F5F9; overflow: hidden;
}
.pos-cat-bar {
  display: flex; gap: 8px; padding: 12px 16px; flex-shrink: 0;
  background: #fff; border-bottom: 1px solid rgba(0,0,0,0.08);
}
.pos-cat-btn {
  padding: 6px 18px; font-size: 13px; font-weight: 600;
  border: 1.5px solid rgba(0,0,0,0.1); background: #fff;
  color: #64748B; cursor: pointer; border-radius: 99px;
  font-family: 'Inter', sans-serif; transition: all 0.15s;
}
.pos-cat-btn.active { background: #0A101E; color: #fff; border-color: #0A101E; }
.pos-items-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px; padding: 14px; overflow-y: auto; align-content: start; flex: 1;
}
.pos-item-card {
  background: #fff; border: 1.5px solid rgba(0,0,0,0.08);
  padding: 14px 12px; cursor: pointer; position: relative;
  border-radius: 9px; transition: border-color 0.15s, box-shadow 0.15s;
}
.pos-item-card:hover    { border-color: rgba(91,115,240,0.32); box-shadow: 0 2px 10px rgba(91,115,240,0.08); }
.pos-item-card.in-cart  { border-color: var(--accent); background: rgba(91,115,240,0.03); }
.pos-item-badge {
  position: absolute; top: 8px; right: 8px;
  min-width: 22px; height: 22px; padding: 0 5px;
  background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; font-family: var(--mono);
  border-radius: 6px; display: flex; align-items: center; justify-content: center;
}
.pos-item-name  { font-size: 13px; font-weight: 700; color: #0A101E; margin-bottom: 5px; }
.pos-item-price { font-size: 12px; color: #64748B; font-family: var(--mono); }

.pos-order-panel {
  width: 300px; flex-shrink: 0; display: flex; flex-direction: column;
  background: #fff; border-left: 1px solid rgba(0,0,0,0.09);
}
.pos-order-head {
  padding: 14px 16px; border-bottom: 1px solid rgba(0,0,0,0.07); flex-shrink: 0;
}
.pos-order-label { font-size: 14px; font-weight: 700; color: #0A101E; }
.pos-order-sub   { font-size: 11px; color: #94A3B8; font-family: var(--mono); margin-top: 2px; }
.pos-order-list  { flex: 1; overflow-y: auto; padding: 10px 14px; }
.pos-order-empty {
  height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: #CBD5E1; font-size: 13px; gap: 8px;
}
.pos-order-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0; border-bottom: 1px solid rgba(0,0,0,0.05);
}
.pos-order-row:last-child { border-bottom: none; }
.pos-order-row-name  { flex: 1; font-size: 13px; font-weight: 600; color: #0A101E; }
.pos-order-row-price { font-size: 12px; color: #64748B; font-family: var(--mono); white-space: nowrap; }
.pos-qty-ctrl { display: flex; align-items: center; gap: 5px; }
.pos-qty-btn  {
  width: 22px; height: 22px; border-radius: 5px;
  border: 1.5px solid rgba(0,0,0,0.15); background: #F8FAFC;
  cursor: pointer; font-size: 16px; font-family: var(--mono); color: #0A101E;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; line-height: 1;
}
.pos-qty-btn:hover { background: #0A101E; color: #fff; border-color: #0A101E; }
.pos-qty-num  { font-family: var(--mono); font-size: 13px; font-weight: 700; color: #0A101E; min-width: 16px; text-align: center; }
.pos-order-foot {
  padding: 12px 14px; border-top: 1.5px solid rgba(0,0,0,0.08); flex-shrink: 0;
}
.pos-subtotal-row, .pos-tax-row {
  display: flex; justify-content: space-between;
  font-size: 12px; color: #64748B; margin-bottom: 4px;
}
.pos-total-row {
  display: flex; justify-content: space-between;
  font-size: 15px; font-weight: 800; color: #0A101E;
  padding-top: 8px; margin-top: 4px;
  border-top: 1.5px solid rgba(0,0,0,0.1); margin-bottom: 10px;
}
.pos-total-amt { font-family: var(--mono); }
.pos-send-btn  {
  width: 100%; padding: 13px; background: #0A101E; color: #fff;
  font-size: 14px; font-weight: 700; border: none; cursor: pointer;
  border-radius: 8px; font-family: 'Inter', sans-serif;
  transition: background 0.2s, transform 0.15s;
}
.pos-send-btn:hover   { background: #1e293b; }
.pos-send-btn:active  { transform: scale(0.98); }
.pos-send-btn[disabled] { cursor: default; opacity: 1; pointer-events: none; }
/* State-driven button colours */
.pos-send-btn.state-waiting  { background: #475569; }
.pos-send-btn.state-taking   { background: #64748B; }
.pos-send-btn.state-locked   { background: #92400E; color: #FDE68A; }
.pos-send-btn.state-sent     { background: #065F46; color: #6EE7B7; }
.pos-send-btn.state-checkout { background: #1a2060; color: #A8B4F8; }
.pos-send-btn.state-paid     { background: #065F46; color: #6EE7B7; }
.pos-send-btn.state-cleared  { background: #0F172A; color: #38BDF8; }
/* POS status bar */
.pos-status-bar {
  margin: 8px 14px 0; padding: 7px 12px; border-radius: 7px;
  font-size: 11px; font-weight: 700; font-family: var(--mono);
  display: flex; align-items: center; gap: 6px; letter-spacing: 0.03em;
}
.pos-status-bar.locked   { background: rgba(245,158,11,0.1);  border: 1px solid rgba(245,158,11,0.22);  color: #FBBF24; }
.pos-status-bar.sent     { background: rgba(16,185,129,0.09); border: 1px solid rgba(16,185,129,0.22);  color: #34D399; }
.pos-status-bar.checkout { background: rgba(91,115,240,0.08); border: 1px solid rgba(91,115,240,0.18);  color: #A8B4F8; }
.pos-status-bar.paid     { background: rgba(16,185,129,0.09); border: 1px solid rgba(16,185,129,0.22);  color: #34D399; }
.pos-status-bar.cleared  { background: rgba(16,185,129,0.09); border: 1px solid rgba(16,185,129,0.22);  color: #34D399; }
/* POS row qty badge (read-only) */
.pos-order-row-qty {
  font-family: var(--mono); font-size: 11px; font-weight: 800; color: #fff;
  background: #1e293b; min-width: 22px; height: 22px; border-radius: 5px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
/* POS flash animation */
@keyframes posFlash {
  0%   { background-color: rgba(91,115,240,0.1); }
  100% { background-color: transparent; }
}
.pos-flash { animation: posFlash 0.75s ease-out; }
