body.pos-page {
  background: #eef2f6;
}

.pos-page #sidebar,
.pos-page #topbar,
.pos-page .workspace > footer {
  display: none;
}

.pos-page .workspace {
  margin: 0;
}

.pos-page #main {
  padding: 0;
  max-width: none;
}

.pos-page #app-version {
  bottom: 5px;
  left: 16px;
  z-index: 4;
  font-size: 10.5px;
  background: transparent;
  box-shadow: none;
  border: 0;
  backdrop-filter: none;
  pointer-events: none;
}

.pos-page #toast {
  left: 50%;
}

.pos-shell {
  --pos-accent: #0d7a6f;
  --pos-accent-dark: #095c53;
  --pos-ink: #0f172a;
  min-height: 100dvh;
  color: var(--pos-ink);
  font-size: 13.5px;
  padding-bottom: 26px;
}

.pos-header {
  height: 64px;
  background: linear-gradient(90deg, #0f172a 0%, #133138 100%);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 22px;
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pos-header button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ffffff;
  box-shadow: none;
  font-size: 12.5px;
  padding: 7px 12px;
}

.pos-header button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.24);
}

.pos-home {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 4px 4px !important;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1.2px;
  background: transparent !important;
  border: 0 !important;
}

.pos-home:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08) !important;
}

.pos-exit {
  background: rgba(255, 255, 255, 0.12) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  color: #ffffff !important;
  font-weight: 600;
  padding: 7px 12px !important;
  border-radius: 9px;
  white-space: nowrap;
}

.pos-exit:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.22) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
}

.pos-home img {
  width: 34px;
  height: 34px;
  background: #ffffff;
  border-radius: 10px;
  padding: 2px;
}

.pos-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  color: #64748b;
  border-radius: 10px;
  max-width: 660px;
  flex: 1;
  padding: 0 12px;
  height: 42px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.pos-search:focus-within {
  outline: 2px solid #2dd4bf;
  outline-offset: 1px;
}

.pos-search input {
  border: 0;
  background: transparent;
  box-shadow: none;
  width: 100%;
  padding: 8px 0;
  color: #0f172a;
  font-size: 13.5px;
  outline: none;
}

.pos-search input:focus,
.pos-search input:focus-visible {
  outline: none;
  box-shadow: none;
}

.pos-search kbd,
.pos-checkout-actions kbd {
  font: 10.5px inherit;
  font-weight: 600;
  opacity: 0.78;
  border: 1px solid currentColor;
  border-radius: 5px;
  padding: 1px 5px;
}

.pos-operator {
  margin-left: auto;
  font-size: 12.5px;
  font-weight: 550;
  color: #cbd5e1;
}

.pos-header-link {
  white-space: nowrap;
}

.pos-orders {
  display: flex;
  gap: 6px;
  padding: 10px 18px 0;
  overflow: auto;
  background: #dfe7ef;
  min-height: 52px;
  border-bottom: 1px solid #cbd5e1;
}

.pos-orders button {
  border: 0;
  background: rgba(255, 255, 255, 0.45);
  min-width: 124px;
  border-radius: 10px 10px 0 0;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  padding: 9px 14px;
  color: #475569;
  font-size: 13px;
  box-shadow: none;
}

.pos-orders button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.75);
}

.pos-orders button.active {
  background: #ffffff;
  color: var(--pos-accent-dark);
  font-weight: 700;
  box-shadow: 0 -2px 8px rgba(15, 23, 42, 0.05);
}

.pos-orders small {
  font-size: 10.5px;
  font-weight: 500;
}

.pos-orders .pos-new-order {
  min-width: 112px;
  background: transparent;
  color: var(--pos-accent-dark);
  font-weight: 600;
}

.pos-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
  padding: 14px 18px 0;
  align-items: start;
}

.pos-left {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.pos-card {
  background: #ffffff;
  border: 1px solid #dbe4ec;
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.pos-shell h2 {
  font-size: 14.5px;
  font-weight: 700;
  margin: 0;
}

.pos-shell h2 span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  margin-left: 6px;
}

.pos-cart-title,
.pos-catalog-heading,
.pos-customer-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  gap: 8px;
}

.pos-cart-title {
  border-bottom: 1px solid var(--line-soft);
}

.pos-shell .text {
  padding: 4px 0;
  color: var(--pos-accent);
  font-size: 12.5px;
}

.pos-shell button {
  transition: background-color 0.14s var(--ease), border-color 0.14s var(--ease), box-shadow 0.14s var(--ease);
}

.pos-shell button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pos-shell button:focus-visible,
.pos-shell input:focus-visible,
.pos-shell select:focus-visible {
  outline: 2px solid var(--pos-accent);
  outline-offset: 2px;
}

.pos-empty-cart {
  min-height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
}

.pos-empty-cart > .icon {
  width: 44px;
  height: 44px;
  stroke: #94a3b8;
  margin-bottom: 4px;
}

.pos-empty-cart h3 {
  color: var(--ink-soft);
  font-size: 15px;
}

.pos-empty-cart p {
  font-size: 12.5px;
}

.pos-empty-cart span {
  font-size: 11.5px;
}

.pos-empty-cart kbd {
  color: var(--pos-accent-dark);
  background: var(--mint);
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 600;
}

.pos-cart-scroll {
  overflow: auto;
  max-height: 340px;
  min-height: 180px;
}

.pos-cart-table {
  width: 100%;
  min-width: 610px;
  border-collapse: collapse;
}

.pos-cart-table th {
  font-size: 11px;
  background: #f8fafc;
  color: var(--muted);
  padding: 10px 14px;
  white-space: nowrap;
}

.pos-cart-table td {
  padding: 12px 14px;
  vertical-align: middle;
  font-size: 13px;
  border-bottom: 1px solid var(--line-soft);
}

.pos-cart-table td:first-child {
  width: 38%;
  min-width: 160px;
}

.pos-cart-table td b {
  display: block;
  line-height: 1.45;
}

.pos-cart-table small {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.pos-cart-table td:nth-child(4) {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.pos-line-discount {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  margin-top: 5px;
}

.pos-line-discount input {
  width: 96px;
  height: 28px;
  padding: 3px 7px;
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.pos-line-discount select {
  height: 28px;
  padding: 2px 6px;
  font-size: 12px;
  border-radius: 6px;
}

.pos-quantity {
  display: flex;
  align-items: center;
  gap: 2px;
}

.pos-quantity input {
  width: 46px;
  text-align: center;
  padding: 4px 2px;
  height: 30px;
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  appearance: textfield;
  -moz-appearance: textfield;
}

.pos-quantity input::-webkit-inner-spin-button {
  appearance: none;
}

.pos-quantity button {
  padding: 3px 8px;
  border: 0;
  background: #f1f5f9;
  color: var(--ink-soft);
  font-size: 15px;
  height: 30px;
  border-radius: 6px;
  box-shadow: none;
}

.pos-quantity button:hover:not(:disabled) {
  background: #e2e8f0;
}

.pos-shell .pos-remove {
  font-size: 19px;
  color: var(--subtle);
  border: 0;
  background: transparent;
  padding: 3px 6px;
  box-shadow: none;
}

.pos-shell .pos-remove:hover:not(:disabled) {
  color: var(--red);
  background: #fef2f2;
}

.pos-catalog-heading {
  padding-bottom: 8px;
}

.pos-categories {
  display: flex;
  gap: 7px;
  padding: 0 16px 13px;
  overflow: auto;
}

.pos-categories button {
  white-space: nowrap;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: 12px;
  color: var(--ink-soft);
  background: #ffffff;
  box-shadow: none;
}

.pos-categories button.selected {
  background: var(--mint);
  border-color: var(--mint-border);
  color: var(--teal-dark);
  font-weight: 650;
}

.pos-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 10px;
  padding: 0 16px 16px;
  max-height: 360px;
  overflow: auto;
}

.pos-products .pos-product {
  position: relative;
  display: flex;
  align-items: flex-start;
  text-align: left;
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 13px 12px 32px;
  gap: 10px;
  border-radius: 11px;
  min-height: 132px;
  font-weight: 400;
  white-space: normal;
  box-shadow: var(--shadow-xs);
}

.pos-product:hover:not(:disabled) {
  border-color: var(--teal-light);
  background: #f5fbfa;
  box-shadow: 0 4px 12px rgba(13, 122, 111, 0.09);
  transform: translateY(-1px);
}

.pos-product-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--mint);
  width: 36px;
  height: 36px;
  border-radius: 9px;
  color: var(--teal);
  flex-shrink: 0;
}

.pos-product-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 4px;
}

.pos-product-info b {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.pos-product-info small {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.pos-product-info strong {
  color: var(--teal-dark);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pos-stock {
  position: absolute;
  bottom: 9px;
  right: 11px;
  font-size: 11px;
  font-weight: 600;
  color: #047857;
  background: #ecfdf5;
  padding: 2px 7px;
  border-radius: 99px;
}

.pos-stock.sold-out {
  color: #b91c1c;
  background: #fef2f2;
}

.pos-empty {
  padding: 25px;
  font-size: 13px;
  color: var(--muted);
  grid-column: 1 / -1;
}

.pos-catalog > .form-help {
  padding: 0 16px 10px;
  margin: 0;
}

.pos-draft-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  padding: 0 4px 8px;
}

.pos-draft-bar > div {
  display: flex;
  gap: 16px;
  align-items: center;
}

.pos-draft-bar button {
  white-space: nowrap;
  font-size: 12px;
}

.pos-payment {
  position: sticky;
  top: 12px;
}

.pos-customer-title {
  padding-bottom: 10px;
}

.pos-customer-search {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 0 11px;
  margin: 0 16px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
}

.pos-customer-search:focus-within {
  background: #ffffff;
  border-color: var(--teal);
  box-shadow: var(--ring);
}

.pos-customer-search input {
  border: 0;
  background: transparent;
  padding: 9px 0;
  box-shadow: none;
  font-size: 13px;
  width: 100%;
  outline: none;
}

.pos-customer-search input:focus,
.pos-customer-search input:focus-visible {
  outline: none;
  box-shadow: none;
}

#pos-customer {
  position: relative;
  border-bottom: 1px solid var(--line);
}

.pos-customer-results {
  position: absolute;
  z-index: 3;
  top: 94px;
  left: 16px;
  right: 16px;
  max-height: 280px;
  overflow: auto;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  box-shadow: var(--shadow-md);
  border-radius: 10px;
}

.pos-customer-results button {
  width: 100%;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--line-soft);
  padding: 10px 12px;
  font-size: 13px;
  box-shadow: none;
}

.pos-customer-results small {
  color: var(--muted);
  font-size: 11px;
}

.pos-customer-results p {
  padding: 12px;
  font-size: 12px;
}

.pos-selected-customer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 12px 16px 14px;
  font-size: 13px;
  gap: 6px;
}

.pos-selected-customer small {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
  margin-top: 3px;
}

.pos-selected-customer strong {
  color: var(--orange);
}

.pos-payment-body {
  padding: 14px 16px;
}

.pos-payment-body h2 {
  margin-bottom: 10px;
}

.pos-adjustments {
  display: grid;
  grid-template-columns: 1fr 90px;
  gap: 10px;
  margin-bottom: 10px;
}

.pos-adjustments label,
.pos-method {
  font-size: 12px;
  font-weight: 550;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pos-adjustments label > div {
  display: flex;
}

.pos-adjustments input,
.pos-adjustments select {
  min-width: 0;
  width: 100%;
  height: 34px;
  font-size: 13px;
  padding: 5px 9px;
}

.pos-adjustments select {
  width: 60px;
  border-radius: 0 8px 8px 0;
  padding: 4px;
}

.pos-adjustments label > div > input {
  border-radius: 8px 0 0 8px;
}

.pos-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 7px 0;
  color: var(--muted);
  font-size: 13px;
}

.pos-summary-row b {
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.pos-grand-total {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 11px 0;
  margin-top: 8px;
  border-top: 1px dashed #cbd5e1;
  font-weight: 650;
}

.pos-grand-total strong {
  font-size: 23px;
  color: var(--pos-accent-dark);
  font-variant-numeric: tabular-nums;
}

.pos-tender-label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  margin: 4px 0 9px;
}

.pos-tender-label input {
  font-size: 20px;
  font-weight: 700;
  text-align: right;
  height: 46px;
  border: 1.5px solid #8ad1c5;
  background: #f6fbfa;
  color: var(--pos-accent-dark);
  font-variant-numeric: tabular-nums;
}

.pos-quick-cash {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.pos-quick-cash button {
  flex: 1;
  justify-content: center;
  font-size: 11.5px;
  padding: 6px 5px;
  background: var(--surface-soft);
  border-color: var(--line);
  color: var(--ink-soft);
  box-shadow: none;
}

.pos-quick-cash button:hover:not(:disabled) {
  background: var(--mint);
  border-color: var(--mint-border);
  color: var(--teal-dark);
}

.pos-method select {
  height: 36px;
  padding: 5px 10px;
  font-size: 13px;
  background: #ffffff;
}

.pos-change,
.pos-debt {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  padding: 10px 0;
  font-variant-numeric: tabular-nums;
}

.pos-change {
  color: #047857;
  margin-top: 8px;
}

.pos-debt {
  color: var(--muted);
  padding-top: 0;
}

.pos-debt.has-debt {
  color: #b45309;
  font-weight: 600;
}

.pos-payment textarea {
  width: 100%;
  resize: vertical;
  min-height: 46px;
  max-height: 120px;
  font-size: 12.5px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
}

.pos-error {
  color: #b91c1c;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 8px;
}

.pos-error:empty {
  display: none;
}

.pos-checkout-actions {
  padding: 0 16px 16px;
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 8px;
}

.pos-checkout-actions button {
  padding: 12px 10px;
  font-size: 13px;
  justify-content: center;
  border-color: var(--line);
  color: var(--ink);
}

.pos-checkout-actions .primary {
  background: linear-gradient(180deg, #0f877b 0%, var(--pos-accent) 100%);
  border-color: var(--pos-accent);
  color: #ffffff;
  font-weight: 650;
}

.pos-checkout-actions > button:only-child {
  grid-column: 1 / -1;
}

.pos-customer-title h2 small {
  display: block;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 2px;
}

.pos-walk-in {
  width: calc(100% - 32px);
  justify-content: center;
  margin: 0 16px 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink-soft);
}

.pos-walk-in[aria-pressed="true"] {
  background: var(--mint);
  border-color: #7cc9bc;
  color: var(--teal-dark);
  font-weight: 650;
}

@media (min-width: 1500px) {
  .pos-layout {
    grid-template-columns: minmax(0, 1fr) 400px;
  }
  .pos-cart-scroll {
    min-height: 260px;
  }
  .pos-products {
    max-height: 430px;
  }
}

@media (max-width: 1050px) {
  .pos-layout {
    grid-template-columns: minmax(0, 1fr) 325px;
    padding: 10px;
    gap: 10px;
  }
  .pos-header {
    gap: 10px;
    padding: 10px 14px;
  }
  .pos-operator {
    display: none;
  }
  .pos-products {
    grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  }
  .pos-draft-bar > span {
    max-width: 180px;
  }
  .pos-payment-body {
    padding: 12px;
  }
  .pos-grand-total strong {
    font-size: 20px;
  }
}

@media (max-width: 760px) {
  .pos-layout {
    grid-template-columns: 1fr;
  }
  .pos-payment {
    position: static;
  }
  .pos-header {
    flex-wrap: wrap;
    height: auto;
  }
  .pos-search {
    order: 3;
    flex-basis: 100%;
    max-width: none;
  }
  .pos-header-link {
    margin-left: auto;
  }
  .pos-orders {
    padding-left: 10px;
  }
  .pos-products {
    max-height: 290px;
  }
  .pos-draft-bar > span {
    max-width: none;
  }
  .pos-shell {
    padding-bottom: 30px;
  }
}

@media (min-width: 761px) {
  .pos-layout {
    height: calc(100dvh - 140px);
    min-height: 460px;
    align-items: stretch;
  }
  .pos-left {
    min-height: 0;
  }
  .pos-cart {
    flex: 0 1 285px;
    min-height: 145px;
    display: flex;
    flex-direction: column;
  }
  .pos-cart-title {
    flex-shrink: 0;
  }
  .pos-cart-scroll {
    flex: 1;
    min-height: 0;
    max-height: none;
  }
  .pos-empty-cart {
    min-height: 140px;
    flex: 1;
  }
  .pos-catalog {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 150px;
  }
  .pos-products {
    flex: 1;
    min-height: 0;
    max-height: none;
  }
  .pos-catalog-heading,
  .pos-categories {
    flex-shrink: 0;
  }
  .pos-draft-bar {
    flex-shrink: 0;
  }
  .pos-payment {
    display: flex;
    flex-direction: column;
    min-height: 0;
    position: static;
  }
  #pos-customer {
    flex-shrink: 0;
  }
  .pos-payment-body {
    overflow: auto;
    flex: 1;
    min-height: 0;
  }
  .pos-checkout-actions {
    flex-shrink: 0;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    background: #ffffff;
  }
}
