/* Grocery terminal: stable header, scrolling workspace and fixed checkout row. */
:root {
  --pos-ink431: #172d25;
  --pos-muted431: #496257;
  --pos-pine431: #123c31;
  --pos-green431: #087650;
  --pos-blue431: #245278;
  --pos-border431: #ceded5;
  --pos-paper431: #f3f7f3;
  --pos-amber431: #f8e2a9;
  --pos-red431: #a52736;
}
#app > header,
#app:not(.hidden):has(main.posScreen) > header {
  background: var(--pos-pine431) !important;
  color: #fff;
  gap: 10px !important;
  height: 54px !important;
  min-height: 54px !important;
  max-height: 54px !important;
  padding: 5px 12px !important;
  border-bottom: 1px solid #315e50 !important;
  box-shadow: none !important;
}
#app > header > div:first-child {
  display: flex !important;
  align-items: center;
  gap: 5px;
  min-width: 0 !important;
}
#app #headerPosName { flex: 0 1 auto; }
#app #headerBranchName { flex: 0 1 auto; }
#app > header .headerUser { gap: 6px !important; min-width: 0; }
#app > header .networkBadge {
  width: 92px !important;
  min-width: 92px !important;
  max-width: 92px !important;
  padding-inline: 6px !important;
  font-size: 10px !important;
}
#app > header .networkBadge > span {
  display: block !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  text-align: left !important;
}
#app > header .networkBadge i {
  animation: none !important;
  will-change: auto !important;
  opacity: 1 !important;
}
#app > header #userBadge {
  width: clamp(120px, 15vw, 220px) !important;
  min-width: 0 !important;
  max-width: none !important;
}
#app > header #cloudCommands306 {
  width: 82px !important;
  min-width: 82px !important;
  max-width: 82px !important;
  height: 38px !important;
  min-height: 38px !important;
  line-height: 1 !important;
  border-radius: 7px !important;
  background: var(--pos-amber431) !important;
  color: #4d3505 !important;
  font-weight: 800;
}
#app > header #cloudCommands306.reviewInactive431 { visibility: hidden; }
#app > header .logoutBtn { border-radius: 7px !important; }
#app > header .annliemart-pos-clock {
  margin-left: 0;
  padding: 4px 7px;
  min-height: 36px;
}
#app > header .clock-time { font-size: 12px; }
#app > header .clock-icon { display: none; }
#app > header .clock-date { font-size: 11px; }
#jimboy-credit { pointer-events: none; }

body:has(#app:not(.hidden) main.posScreen),
body:has(#app:not(.hidden) main.posScreen) #app:not(.hidden) {
  background: var(--pos-paper431) !important;
  color: var(--pos-ink431);
}
body:has(#app:not(.hidden) main.posScreen) {
  height: 100dvh !important;
  min-height: 0 !important;
  overflow: hidden !important;
}
body:has(#app:not(.hidden) main.posScreen) #app:not(.hidden) {
  height: calc(100dvh - 18px - env(safe-area-inset-bottom)) !important;
  min-height: 0 !important;
  overflow: hidden !important;
}
#app main.posScreen {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
  padding: clamp(5px, 0.9vw, 12px) !important;
  gap: clamp(5px, 0.8vw, 10px) !important;
  container-type: inline-size;
}
#app main.posScreen .posHeading {
  background: #fff !important;
  border: 1px solid var(--pos-border431) !important;
  border-left: 4px solid var(--pos-green431) !important;
  border-radius: 8px !important;
  min-height: 39px !important;
}
#app main.posScreen .posHeading .pageTitle { color: var(--pos-pine431) !important; }
#app main.posScreen .posHumanGuide { color: var(--pos-muted431); }
#app main.posScreen .posStatusBar { flex: 0 1 auto; min-width: 0; gap: 5px !important; }
#app main.posScreen .posStatusBar > span {
  flex: 0 1 auto;
  min-width: 0 !important;
  max-width: 175px;
  overflow: hidden;
}
#app main.posScreen .posStatusBar b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
#app main.posScreen .posWorkspace355 {
  display: grid !important;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.25fr);
  min-height: 0;
}
#app main.posScreen .posWorkspace355 .posControls351 {
  display: grid !important;
  grid-template-rows: minmax(0, 1fr);
  border-color: var(--pos-border431) !important;
}
#app main.posScreen .posWorkspace355 .posSideScroll351 {
  grid-template-rows: auto auto minmax(min-content, 1fr);
  align-content: start;
  overflow-y: auto;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  border-radius: inherit;
  background: #eaf2ed;
}
#app main.posScreen .posWorkspace355 .posControlSection351,
#app main.posScreen .posWorkspace355 .checkoutGroup,
#app main.posScreen .posWorkspace355 .posLoyaltyDock350 {
  border-color: var(--pos-border431) !important;
  background: #fff !important;
}
#app main.posScreen .posWorkspace355 .posScanSection352 { border-left-color: var(--pos-green431) !important; }
#app main.posScreen .posWorkspace355 .posCustomerSelect352 { border-left-color: var(--pos-blue431) !important; }
#app main.posScreen .posWorkspace355 .posLoyaltyInput350 .primary,
#app main.posScreen .posWorkspace355 .posPoints350 button { background: var(--pos-green431) !important; }
#app main.posScreen .posWorkspace355 .posPoints350 { background: #e9f3ed; border-color: var(--pos-border431); }
#app main.posScreen .posWorkspace355 .posPoints350 strong { color: var(--pos-pine431); }
#app main.posScreen .posWorkspace355 .checkoutGroup .posBtn {
  overflow: visible !important;
  overflow-wrap: anywhere;
}
#app main.posScreen .posWorkspace355 :is(.posCustomerActions351 button,.btnRecall,.btnRetail,.btnWholesale,.btnInquiry,.btnDisplay,.btnDiscount,.btnExpense,.btnLoad) { --posButton355: var(--pos-blue431); }
#app main.posScreen .posWorkspace355 :is(.btnHold,.btnDeposit) { --posButton355: #815319; }
#app main.posScreen .posWorkspace355 :is(.btnClear,.btnVoid) { --posButton355: var(--pos-red431); }
#app main.posScreen .posWorkspace355 .posControls351 .checkoutGroup .posBtn.selected { background: var(--pos-green431) !important; outline-offset: -2px !important; }

#app main.posScreen .posWorkspace355 .cartPanel {
  border-color: var(--pos-border431) !important;
  border-top-color: var(--pos-green431) !important;
  box-shadow: none !important;
}
#app main.posScreen .posWorkspace355 #posCartSurface328 { height: 100% !important; min-height: 0 !important; }
#app main.posScreen .posWorkspace355 .posCartHead351 { border-bottom-color: var(--pos-border431); }
#app main.posScreen .posWorkspace355 .posCartHead351 h2 { color: var(--pos-pine431); }
#app main.posScreen .posWorkspace355 .posCartHead351 span {
  min-height: 22px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--pos-pine431);
  background: #e6f3ec;
}
#app main.posScreen .posWorkspace355 .cartListHeader { background: var(--pos-pine431) !important; }
#app main.posScreen .posWorkspace355 .cartRow { border-bottom-color: var(--pos-border431) !important; }
#app main.posScreen .posWorkspace355 .cartRow:nth-child(even) { background: #f4f8f5 !important; }
#app main.posScreen .posWorkspace355 .cartRow:last-child { background: #fff7e5 !important; box-shadow: inset 3px 0 #c08c27 !important; }
#app main.posScreen .posWorkspace355 .cartQtyBtn {
  color: var(--pos-pine431) !important;
  background: #edf6f0 !important;
  border-color: var(--pos-border431) !important;
}
#app main.posScreen .posWorkspace355 .cartQtyInput255 { border-color: var(--pos-border431) !important; }
#app main.posScreen .posWorkspace355 .cartButtons button { background: var(--pos-blue431) !important; }
#app main.posScreen .posWorkspace355 .cartButtons button.danger { background: var(--pos-red431) !important; }
#app main.posScreen .posWorkspace355 :is(.checkoutActions,.checkoutGroup,.cartFixedFooter,.posScanFooter355,.cartSummary) {
  contain: none;
  transform: none;
  backface-visibility: visible;
}
#app main.posScreen .posWorkspace355 .posScanFooter355 {
  border-color: var(--pos-border431);
  border-left-color: var(--pos-green431);
  background: #edf6f0;
}
#app main.posScreen .posWorkspace355 .posScanFooter355 .barcodeShortcut { background: var(--pos-green431) !important; }
#app main.posScreen .posWorkspace355 .posScanFooter355 input { border-color: #9ab8aa !important; }
#app main.posScreen .posWorkspace355 .posScanFooter355 .barcodeInputWrap small {
  color: var(--pos-muted431) !important;
  line-height: 13px !important;
  height: 13px !important;
  overflow: hidden !important;
  text-overflow: ellipsis;
  white-space: nowrap !important;
}
#app main.posScreen .posWorkspace355 .cartSummary {
  margin-bottom: 0 !important;
  font-variant-numeric: tabular-nums;
}
#app main.posScreen .posWorkspace355 .cartSummary > span { background: #f0f5f1 !important; border-left-color: #7f9e90 !important; }

#app main.posScreen .posPaymentDock431 {
  grid-row: 3;
  grid-column: 1;
  grid-template-columns: minmax(192px, 1fr) minmax(0, 2fr) minmax(90px, .42fr);
  gap: 8px;
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--pos-border431);
  border-radius: 9px;
  background: #fff;
}
#app main.posScreen .posPaymentDock431 .cartTotal {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center;
  gap: 10px !important;
  min-width: 0 !important;
  min-height: 48px !important;
  padding: 5px 10px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 7px !important;
  color: var(--pos-pine431) !important;
  background: #e6f2eb !important;
  font-variant-numeric: tabular-nums;
}
#app main.posScreen .posPaymentDock431 .cartTotal :is(.totalStripBlock,.grandTotalLabel,small,strong,b) {
  color: var(--pos-pine431) !important;
  text-shadow: none !important;
}
#app main.posScreen .posPaymentDock431 .cartTotal strong {
  font-size: clamp(20px, 2.5cqw, 34px) !important;
  line-height: 1.15 !important;
}
#app main.posScreen .posPaymentDock431 .cartTotal small,
#app main.posScreen .posPaymentDock431 .grandTotalLabel { font-size: 10px !important; }
#app main.posScreen .posPaymentDock431 .paymentChoice330,
#app main.posScreen .posPaymentDock431 .posBackOffice351 {
  height: 48px !important;
  min-height: 48px !important;
  padding: 4px 7px !important;
  gap: 6px !important;
  border: 1px solid transparent !important;
  border-radius: 7px !important;
  color: #fff !important;
  box-shadow: none !important;
  text-shadow: none !important;
  touch-action: manipulation;
  transform: none !important;
  filter: none !important;
  animation: none !important;
}
#app main.posScreen .posPaymentDock431 .paymentText330 strong { font-size: 14px !important; color: #fff !important; }
#app main.posScreen .posPaymentDock431 .paymentText330 small { color: #e9f1f1 !important; }
#app main.posScreen .posPaymentDock431 .payCash330 { background: var(--pos-green431) !important; }
#app main.posScreen .posPaymentDock431 .payOnline330 { background: var(--pos-blue431) !important; }
#app main.posScreen .posPaymentDock431 .payCredit330 { background: #50456f !important; }
#app main.posScreen .posPaymentDock431 .posBackOffice351 {
  color: var(--pos-pine431) !important;
  background: #edf4ef !important;
  border-color: var(--pos-border431) !important;
}
#app main.posScreen .posPaymentDock431 button:hover { opacity: .92; }
#app main.posScreen .posPaymentDock431 button:active { opacity: .78; }
#app main.posScreen .posPaymentDock431 button:focus-visible { outline: 2px solid #e3ae43 !important; outline-offset: -3px !important; }

@media (min-width: 701px) and (max-height: 650px) {
  #app main.posScreen .posWorkspace355 .posSideScroll351 { gap: 6px; }
  #app main.posScreen .posWorkspace355 .posCartHead351 h2 { font-size: 13px; }
}
@media (max-width: 1080px) {
  #app > header .clock-date { display: none; }
}
@media (max-width: 890px) {
  #app > header #userBadge { display: none !important; }
  #app > header #headerBranchName { display: none !important; }
  #app main.posScreen .posHumanGuide { display: none; }
  #app main.posScreen .posWorkspace355 .posSideActions351 { grid-template-columns: 1fr !important; }
}
@media (max-width: 700px) {
  #app > header,
  #app:not(.hidden):has(main.posScreen) > header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 2px !important;
    height: 74px !important;
    min-height: 74px !important;
    max-height: 74px !important;
    padding: 4px 8px !important;
  }
  #app > header .headerUser {
    justify-content: space-between !important;
    min-height: 37px !important;
    height: 37px !important;
  }
  #app > header #headerPosName { font-size: 12px !important; }
  #app > header #headerBranchName { display: inline-block !important; font-size: 11px !important; }
  #app > header .logoutBtn {
    width: 65px !important;
    min-width: 65px !important;
    max-width: 65px !important;
    min-height: 36px !important;
    padding: 4px !important;
  }
  #app > header #cloudCommands306 { height: 36px !important; min-height: 36px !important; }
  #app > header .installAppBtn { display: none !important; }
}
@media (max-width: 890px) {
  #app main.posScreen .posHeading { min-height: 34px !important; margin-bottom: 0 !important; }
  #app main.posScreen .posHeading .pageTitle { font-size: 14px !important; }
  #app main.posScreen .posStatusBar > span { padding-inline: 3px !important; max-width: 92px; }
  #app main.posScreen .posStatusBar > span:first-child { display: none; }
  #app main.posScreen .posWorkspace355 {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    height: 100% !important;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
  }
  #app main.posScreen .posWorkspace355 :is(.posControls351,.posSideScroll351) { display: contents !important; }
  #app main.posScreen .posWorkspace355 > *,
  #app main.posScreen .posWorkspace355 :is(.posEntryGrid352,.posLoyaltyDock350,.posCustomerShortcuts352,.posSideActions351) { flex: 0 0 auto; }
  #app main.posScreen .posWorkspace355 .posEntryGrid352 { order: 1; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
  #app main.posScreen .posWorkspace355 #posCartSurface328 { order: 2; height: clamp(228px, 43svh, 425px) !important; min-height: 0 !important; }
  #app main.posScreen .posWorkspace355 .posLoyaltyDock350,
  #app main.posScreen .posWorkspace355 .posSideScroll351 > .posCustomerShortcuts352 { order: 3; }
  #app main.posScreen .posWorkspace355 .posSideActions351 { order: 4; }
  #app main.posScreen .posWorkspace355 .cartPanel { grid-template-rows: auto minmax(0, 1fr) auto !important; padding: 6px !important; }
  #app main.posScreen .posWorkspace355 .cartListHeader { display: none !important; }
  #app main.posScreen .posWorkspace355 .cartItemsScroll { grid-row: 2; }
  #app main.posScreen .posWorkspace355 .cartFixedFooter { grid-row: 3; padding-top: 4px !important; }
  #app main.posScreen .posWorkspace355 .cartRow { grid-template-columns: minmax(0, 1fr) 90px !important; }
  #app main.posScreen .posWorkspace355 .cartRow > .posLineNumber354 { display: none; }
  #app main.posScreen .posWorkspace355 .cartRow .cartItemInfo { grid-row: 1; grid-column: 1 / -1 !important; }
  #app main.posScreen .posWorkspace355 .cartRow .cartQtyBox { grid-row: 2; grid-column: 1 !important; max-width: 120px; }
  #app main.posScreen .posWorkspace355 .cartRow .posUnitPrice354 { grid-row: 3; grid-column: 1 !important; text-align: left; }
  #app main.posScreen .posWorkspace355 .cartRow .cartItemTotal { grid-row: 2; grid-column: 2 !important; }
  #app main.posScreen .posWorkspace355 .cartRow .cartButtons { grid-row: 3; grid-column: 2 !important; }
  #app main.posScreen .posWorkspace355 .cartSummary > span { min-height: 30px !important; gap: 2px; }
}
@media (max-width: 700px) {
  #app main.posScreen .posPaymentDock431 { grid-template-columns: minmax(0, 1fr) minmax(78px, auto); gap: 4px; padding: 5px; }
  #app main.posScreen .posPaymentDock431 .cartTotal { grid-row: 1; grid-column: 1; min-height: 42px !important; }
  #app main.posScreen .posPaymentDock431 .cartTotal strong { font-size: clamp(20px, 4.6cqw, 30px) !important; }
  #app main.posScreen .posPaymentDock431 .paymentChoices330 { grid-row: 2; grid-column: 1 / -1 !important; }
  #app main.posScreen .posPaymentDock431 .posBackOffice351 { grid-row: 1; grid-column: 2; height: 42px !important; min-height: 42px !important; }
  #app main.posScreen .posPaymentDock431 .paymentChoice330 { height: 44px !important; min-height: 44px !important; }
  #app main.posScreen .posPaymentDock431 .paymentChoice330 kbd { display: none; }
}
@media (max-width: 370px) {
  #app > header .annliemart-pos-clock { display: none; }
  #app main.posScreen .posWorkspace355 .posEntryGrid352 { grid-template-columns: 1fr; }
  #app main.posScreen .posWorkspace355 .posLoyaltyDock350 { min-height: 0; }
  #app main.posScreen .posWorkspace355 .cartSummary > span { padding-inline: 4px !important; }
}

/* Transaction review keeps its actions in view even with a long local queue. */
#modalRoot .modal:has(.reviewPanel431) {
  display: grid !important;
  place-items: center;
  padding: 12px 12px calc(22px + env(safe-area-inset-bottom)) !important;
  background: rgba(15, 43, 34, .50);
  z-index: 10000;
}
#modalRoot .modalBox:has(.reviewPanel431) {
  width: min(100%, 650px) !important;
  max-width: 650px !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 12px !important;
  text-align: left;
}
#modalRoot .reviewPanel431 {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  max-height: min(740px, calc(100dvh - 36px - env(safe-area-inset-bottom)));
  overflow: hidden;
  outline: none;
  background: var(--pos-paper431);
  color: var(--pos-ink431);
  font-size: 14px;
  text-align: left;
}
#modalRoot .reviewHeader431,
#modalRoot .reviewFooter431 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  background: #fff;
}
#modalRoot .reviewHeader431 { border-bottom: 1px solid var(--pos-border431); }
#modalRoot .reviewHeader431 small { color: var(--pos-muted431); font-weight: 800; letter-spacing: .07em; }
#modalRoot .reviewHeader431 h2 { margin: 3px 0 !important; color: var(--pos-pine431) !important; font-size: 21px !important; line-height: 1.2; }
#modalRoot .reviewPanel431 p { margin: 4px 0; line-height: 1.38; overflow-wrap: anywhere; }
#modalRoot .reviewHeader431 p,
#modalRoot .reviewPanel431 .reviewMeta431 { color: var(--pos-muted431); font-size: 12px; }
#modalRoot .reviewTag431 {
  flex: none;
  padding: 4px 8px;
  border-radius: 6px;
  background: #e7f2eb;
  color: var(--pos-pine431);
  font-size: 12px;
  font-weight: 800;
}
#modalRoot .reviewTag431[data-tone="review"] { color: #5e3a00; background: var(--pos-amber431); }
#modalRoot .reviewList431,
#modalRoot .reviewResult431 {
  min-height: 0;
  overflow-y: auto;
  padding: 12px 16px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
#modalRoot .reviewCard431 {
  padding: 11px 12px;
  margin-bottom: 8px;
  border: 1px solid var(--pos-border431);
  border-radius: 8px;
  background: #fff;
}
#modalRoot .reviewCard431:last-child { margin-bottom: 0; }
#modalRoot .reviewCardHead431 { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
#modalRoot .reviewCardHead431 h3 { margin: 0; color: var(--pos-pine431); font-size: 15px; }
#modalRoot .reviewPanel431 .reviewAmount431 { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
#modalRoot .reviewActions431,
#modalRoot .reviewFooter431 { flex-wrap: wrap; }
#modalRoot .reviewActions431 { display: flex; gap: 6px; margin-top: 8px; }
#modalRoot .reviewFooter431 { justify-content: flex-end; border-top: 1px solid var(--pos-border431); }
#modalRoot .reviewPanel431 button {
  min-height: 42px !important;
  margin: 0 !important;
  padding: 7px 10px !important;
  border-radius: 6px !important;
  background: #e8f0eb !important;
  color: var(--pos-pine431) !important;
  font-size: 12px !important;
  text-transform: none !important;
  box-shadow: none !important;
  touch-action: manipulation;
}
#modalRoot .reviewPanel431 button.reviewPrimary431 { background: var(--pos-green431) !important; color: #fff !important; }
#modalRoot .reviewPanel431 button.reviewDanger431 { background: #f9e9e9 !important; color: #832533 !important; }
#modalRoot .reviewPanel431 :is(button,input):focus-visible { outline: 2px solid var(--pos-blue431) !important; outline-offset: 1px !important; }
#modalRoot .reviewPanel431 .reviewNotice431 { min-height: 20px; padding: 0 16px; color: var(--pos-muted431); font-weight: 650; }
#modalRoot .reviewResult431 label { display: block; margin-top: 12px; }
#modalRoot .reviewResult431 .reviewCheckbox431 { display: flex; align-items: center; gap: 8px; }
#modalRoot .reviewCheckbox431 input { width: 18px !important; min-height: 18px !important; margin: 0 !important; }
#modalRoot .reviewEmpty431 { padding: 14px 0; }
@media print {
  #app main.posScreen .posPaymentDock431 { display: none !important; }
}
