.pos-view {
  display: grid;
  gap: .8rem;
  min-width: 0;
}
.pos-view .panel { margin: 0; min-width: 0; }
.pos-notice { margin: 0; }
.pos-context { margin: 0; color: var(--pine); }
.pos-context span, .pos-operator { color: var(--muted); }
.pos-tabs {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: .45rem;
}
.pos-tabs button { width: 100%; }
.pos-tabs [aria-pressed="true"] {
  background: var(--forest);
  border-color: var(--forest);
  color: #fff;
}
.pos-tabs [aria-pressed="true"]:hover { background: var(--pine); color: #fff; }
.pos-sale-layout, .pos-register { display: grid; gap: .8rem; min-width: 0; }
.pos-search-form {
  display: grid;
  grid-template-columns: minmax(0,1fr) max-content;
  align-items: end;
  gap: .55rem;
}
.pos-search-form > * { margin: 0; }
.goah-app .pos-search-form > .primary { width: auto; }
.pos-reader { margin-top: .6rem; }
.pos-reader:empty { margin-top: 0; }
.pos-reader video { width: min(100%, 28rem); max-height: 45vh; object-fit: contain; }
.pos-result-list,.pos-cart-list,.pos-history,.pos-ticket-lines {
  margin: .55rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: .5rem;
}
.pos-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  min-width: 0;
  padding: .5rem 0;
}
.pos-item + .pos-item { border-top: 1px solid var(--border); }
.pos-item-copy {
  display: grid;
  flex: 1 1 0;
  min-width: 0;
  gap: .15rem;
  line-height: 1.23;
  overflow-wrap: anywhere;
}
.pos-item-copy span { color: var(--muted); font-size: .88rem; }
.pos-item-copy .pos-item-price { color: var(--pine); font-weight: 630; }
.pos-thumb {
  display: block;
  flex: 0 0 3rem;
  width: 3rem;
  height: 3rem;
  border-radius: .55rem;
  background: var(--pale);
  object-fit: cover;
}
.pos-item > .secondary { flex: 0 0 auto; }
.pos-cart-line {
  min-width: 0;
  padding: .6rem;
  border: 1px solid var(--border);
  border-radius: .65rem;
}
.pos-cart-line .pos-item { padding: 0 0 .45rem; }
.pos-line-total { align-self: flex-start; color: var(--pine); white-space: nowrap; font-size: .94rem; }
.pos-quantity {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .4rem;
}
.pos-quantity > span {
  min-width: 2rem;
  text-align: center;
  font-weight: 730;
  font-variant-numeric: tabular-nums;
}
.goah-app .pos-quantity button { min-width: 3rem; padding: .45rem .6rem; }
.pos-remove { margin-inline-start: auto; }
.pos-discount { flex: 1 0 100%; min-width: 0; }
.pos-discount label { margin-top: .3rem; }
.pos-complement, .pos-details {
  border-top: 1px solid var(--border);
  margin-top: .65rem;
}
.pos-view summary {
  display: list-item;
  width: fit-content;
  min-height: 44px;
  padding: .6rem 0 .55rem .1rem;
  color: var(--pine);
  font-weight: 650;
  cursor: pointer;
}
.pos-payment fieldset { margin: 0; padding: 0; min-width: 0; border: 0; }
.pos-payment legend { padding: 0; margin-bottom: .35rem; font-weight: 660; }
.pos-payment fieldset:disabled { opacity: .7; }
.pos-grand-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .4rem .8rem;
  margin-bottom: .8rem;
  color: var(--forest);
  font: 650 1.07rem/1.2 system-ui,sans-serif;
}
.pos-grand-total strong { font: 500 1.85rem/1 Georgia,serif; }
.pos-payment-method { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .35rem; }
.pos-payment-method label {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .28rem;
  border: 1px solid var(--border);
  border-radius: .55rem;
  padding: .35rem .2rem;
  cursor: pointer;
}
.pos-payment-method label:has(input:checked) { border-color: var(--pine); background: var(--pale); color: var(--forest); }
.pos-payment-method input {
  width: 1rem;
  min-height: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--pine);
}
.pos-payment-fields, .pos-refund-lines { display: grid; gap: .5rem; margin-block: .7rem; }
.pos-payment .primary { width: 100%; }
.pos-card-confirm {
  background: var(--pale);
  border-radius: .55rem;
  padding: .45rem .65rem;
}
.pos-card-confirm input { accent-color: var(--pine); }
.pos-payment-values, .pos-totals {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: .28rem .65rem;
  margin: 0;
}
.pos-payment-values dd, .pos-totals dd {
  margin: 0;
  text-align: end;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.pos-payment-values dt, .pos-totals dt { color: var(--muted); min-width: 0; }
.pos-store { color: var(--pine); font-weight: 690; margin-bottom: .2rem; }
.pos-open, .pos-ticket { width: min(100%,33rem); }
.pos-open .pos-totals { margin-block: .65rem; }
.pos-cash .pos-totals { margin-bottom: .9rem; }
.pos-history li, .pos-ticket-lines li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .4rem .65rem;
  padding: .45rem 0;
  border-bottom: 1px solid var(--border);
  min-width: 0;
}
.pos-history li > div:first-child, .pos-ticket-lines small { display: grid; gap: .1rem; }
.pos-history li > div:first-child span { color: var(--muted); font-size: .88rem; }
.pos-history .actions { margin: 0; }
.pos-ticket-title { border-bottom: 1px dashed var(--border); margin-bottom: .7rem; }
.pos-ticket-brand { font: 600 1.55rem/1 Georgia,serif; letter-spacing: -.05em; }
.pos-ticket-totals { margin-top: .65rem; }
.pos-ticket .actions > * { flex: 1 1 9rem; }
@media (min-width: 51rem) {
  .pos-sale-layout { grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; }
  .pos-sale-layout .pos-search { grid-column: 1 / -1; }
  .pos-tabs { width: fit-content; grid-template-columns: repeat(3,minmax(6.6rem,1fr)); }
  .pos-register { grid-template-columns: minmax(0,1.15fr) minmax(0,.85fr); align-items: start; }
}
@media (min-width: 85rem) {
  .pos-sale-layout { grid-template-columns: minmax(0,1fr) minmax(0,1.1fr) minmax(0,.85fr); }
  .pos-sale-layout .pos-search { grid-column: auto; }
}
@media print {
  body:has(.pos-ticket[data-pos-print]) { display: block; min-height: 0; background: white; }
  body:has(.pos-ticket[data-pos-print]) * { visibility: hidden; }
  body .pos-ticket[data-pos-print],
  body .pos-ticket[data-pos-print] * { visibility: visible; }
  body .pos-ticket[data-pos-print] {
    position: absolute;
    top: 0;
    left: 0;
    width: min(100%, 80mm);
    color: #111;
    padding: 6mm;
    margin: 0;
    border: 0;
    box-shadow: none;
  }
  body .pos-ticket[data-pos-print] .pos-not-print { display: none; }
}
.pos-cash-expected {
  border-top: 1px solid var(--border);
  padding-top: .35rem;
  font-weight: 730;
}
