:root {
  --pos-ink: #332b25;
  --pos-muted: #7e6f61;
  --pos-cream: #fffaf2;
  --pos-panel: #fffdf8;
  --pos-line: #ecd9b6;
  --pos-gold: #d8b46a;
  --pos-gold-dark: #b8872f;
  --pos-rose: #f7dfe8;
  --pos-lavender: #eee7f8;
  --pos-mint: #d5f1e7;
  --pos-shadow: 0 22px 70px rgba(76, 54, 31, 0.14);
  --pos-control-height: 56px;
  --pos-row-control-height: 48px;
  --pos-text-base: 16px;
  --pos-text-small: 14px;
}

.pos-body {
  margin: 0;
  min-height: 100vh;
  color: var(--pos-ink);
  background: linear-gradient(135deg, #fffaf2 0%, #fff7f8 48%, #f7f0ff 100%);
  font-family: Lato, Arial, sans-serif;
  font-size: var(--pos-text-base);
  line-height: 1.45;
}

.pos-body input,
.pos-body select {
  font-size: var(--pos-text-base);
}

.pos-body small {
  font-size: var(--pos-text-small);
}

.pos-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.pos-topbar {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(18px, 3vw, 40px);
  border-bottom: 1px solid rgba(216, 180, 106, 0.28);
  background: rgba(255, 253, 248, 0.9);
  backdrop-filter: blur(18px);
}

.pos-brand {
  color: var(--pos-gold-dark);
  text-decoration: none;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.pos-brand span {
  display: block;
  font-size: 11px;
}

.pos-brand strong {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 24px;
  letter-spacing: 0.12em;
}

.pos-topbar__status {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--pos-muted);
  font-weight: 700;
}

.pos-connection {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--pos-mint);
  color: #247153;
}

.pos-connection.is-offline {
  background: var(--pos-rose);
  color: #9d455d;
}

.pos-main {
  width: min(1440px, calc(100vw - 28px));
  margin: 0 auto;
  padding: clamp(18px, 3vw, 42px) 0;
}

.pos-auth {
  min-height: calc(100vh - 140px);
  display: grid;
  place-items: center;
}

.pos-auth__card,
.pos-hero,
.pos-status-grid article,
.pos-module {
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid rgba(216, 180, 106, 0.28);
  border-radius: 8px;
  box-shadow: var(--pos-shadow);
}

.pos-auth__card {
  width: min(520px, 100%);
  padding: clamp(28px, 5vw, 46px);
}

.pos-auth__card--wide {
  width: min(680px, 100%);
}

.pos-kicker {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--pos-gold-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.pos-auth h1,
.pos-hero h1 {
  margin: 0 0 12px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(40px, 5vw, 60px);
  line-height: 0.95;
  font-weight: 600;
}

.pos-auth p,
.pos-hero p,
.pos-module p,
.pos-status-grid p {
  margin: 0;
  color: var(--pos-muted);
  line-height: 1.65;
}

.pos-form {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.pos-form label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.pos-form input {
  min-height: 58px;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--pos-line);
  border-radius: 8px;
  padding: 0 18px;
  background: #fffaf4;
  color: var(--pos-ink);
  font: inherit;
  font-size: 18px;
}

.pos-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--pos-control-height);
  padding: 0 28px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.pos-btn:hover {
  transform: translateY(-1px);
}

.pos-btn--primary {
  background: var(--pos-gold);
  color: #fffdf8;
  box-shadow: 0 14px 30px rgba(184, 135, 47, 0.24);
}

.pos-btn--ghost {
  border-color: var(--pos-line);
  background: #fffdf8;
  color: var(--pos-gold-dark);
}

.pos-btn--soft {
  background: var(--pos-rose);
  color: #9d455d;
}

.pos-alert {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-radius: 8px;
  font-weight: 700;
}

.pos-alert--success {
  background: var(--pos-mint);
  color: #247153;
}

.pos-alert--error {
  background: var(--pos-rose);
  color: #9d455d;
}

.pos-home {
  display: grid;
  gap: 18px;
}

.pos-home > *,
.pos-offline > * {
  min-width: 0;
  max-width: 100%;
}

.pos-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(28px, 4vw, 46px);
}

.pos-hero--workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.62fr) auto;
  min-height: 260px;
  gap: clamp(18px, 3vw, 34px);
}

.pos-hero__copy {
  max-width: 680px;
}

.pos-hero__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pos-start-sale {
  display: grid;
  align-content: center;
  gap: 10px;
  min-height: 178px;
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid rgba(216, 180, 106, 0.55);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(216, 180, 106, 0.96), rgba(190, 135, 47, 0.98)),
    var(--pos-gold);
  color: #fffdf8;
  text-decoration: none;
  box-shadow: 0 24px 58px rgba(184, 135, 47, 0.32);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.pos-start-sale:hover {
  transform: translateY(-2px);
  box-shadow: 0 30px 68px rgba(184, 135, 47, 0.38);
}

.pos-start-sale span,
.pos-touch-card span {
  display: inline-flex;
  width: fit-content;
  min-height: 32px;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pos-start-sale span {
  padding: 0 12px;
  background: rgba(255, 253, 248, 0.2);
}

.pos-start-sale strong {
  display: block;
  max-width: 420px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(32px, 3vw, 44px);
  line-height: 0.95;
}

.pos-start-sale small {
  font-size: 16px;
  font-weight: 700;
  opacity: 0.9;
}

.pos-status-grid,
.pos-modules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.pos-status-grid article,
.pos-module {
  padding: 22px;
}

.pos-status-strip {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 0.8fr);
  gap: 12px;
}

.pos-status-strip article {
  min-height: 108px;
  padding: 18px 20px;
  border: 1px solid rgba(216, 180, 106, 0.24);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.9);
}

.pos-status-strip span {
  display: block;
  margin-bottom: 8px;
  color: var(--pos-gold-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pos-status-strip strong {
  display: block;
  margin-bottom: 6px;
  font-size: 20px;
}

.pos-status-strip p {
  margin: 0;
  color: var(--pos-muted);
  overflow-wrap: anywhere;
}

.pos-status-grid span,
.pos-module span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: #fff3d7;
  color: var(--pos-gold-dark);
  font-weight: 700;
}

.pos-status-grid strong,
.pos-module strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
}

.pos-modules {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pos-module.is-disabled {
  opacity: 0.76;
}

.pos-module__link {
  display: inline-flex;
  margin-top: 14px;
  color: var(--pos-gold-dark);
  font-weight: 700;
  text-decoration: none;
}

.pos-touch-modules {
  display: grid;
  grid-template-columns: minmax(360px, 1.35fr) repeat(3, minmax(210px, 0.88fr));
  gap: 14px;
}

.pos-touch-card {
  min-height: 214px;
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid rgba(216, 180, 106, 0.28);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.94);
  color: var(--pos-ink);
  text-decoration: none;
  box-shadow: var(--pos-shadow);
}

.pos-touch-card--primary {
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.98), rgba(255, 243, 215, 0.96)),
    var(--pos-panel);
}

.pos-touch-card span {
  padding: 0 11px;
  background: #fff3d7;
  color: var(--pos-gold-dark);
}

.pos-touch-card strong {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(28px, 2.5vw, 36px);
  line-height: 0.98;
}

.pos-touch-card p {
  max-width: 430px;
  margin: 0;
  color: var(--pos-muted);
  font-size: 17px;
  line-height: 1.55;
}

.pos-touch-card--primary::after {
  content: "Tocar para vender";
  display: inline-flex;
  width: fit-content;
  min-height: 48px;
  align-items: center;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--pos-gold);
  color: #fffdf8;
  font-weight: 900;
}

.pos-touch-card.is-disabled {
  opacity: 0.7;
  box-shadow: none;
}

.pos-hero--compact h1 {
  font-size: clamp(36px, 5vw, 58px);
}

.pos-sale {
  display: grid;
  gap: 20px;
}

.pos-sale > .pos-hero--compact {
  padding: 20px 24px;
}

.pos-sale > .pos-hero--compact h1 {
  margin-bottom: 6px;
  font-size: clamp(34px, 4vw, 48px);
}

.pos-sale > .pos-hero--compact .pos-kicker {
  margin-bottom: 5px;
}

.pos-sale > .pos-hero--compact .pos-btn {
  min-height: 52px;
  padding: 0 20px;
}

.pos-sale [hidden] {
  display: none !important;
}

.pos-sale-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pos-sale-step {
  min-height: 92px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid rgba(216, 180, 106, 0.3);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.86);
  color: var(--pos-muted);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.pos-sale-step > span {
  grid-row: 1 / 3;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f4ead8;
  color: var(--pos-gold-dark);
  font-size: 18px;
  font-weight: 900;
}

.pos-sale-step strong,
.pos-sale-step small {
  display: block;
}

.pos-sale-step strong {
  color: var(--pos-ink);
  font-size: 18px;
}

.pos-sale-step small {
  line-height: 1.4;
}

.pos-sale-step.is-active {
  border-color: rgba(184, 135, 47, 0.58);
  background: linear-gradient(135deg, #fff8e9, #fff3f6);
  box-shadow: 0 12px 30px rgba(76, 54, 31, 0.1);
}

.pos-sale-step.is-active > span {
  background: var(--pos-gold);
  color: #fffdf8;
}

.pos-sale-step[disabled] {
  cursor: not-allowed;
  opacity: 0.58;
}

.pos-sale-stage {
  min-width: 0;
}

.pos-sale-workspace,
.pos-checkout-layout {
  display: grid;
  grid-template-columns: minmax(420px, 1.08fr) minmax(380px, 0.92fr);
  gap: 18px;
  align-items: start;
}

.pos-checkout-layout {
  grid-template-columns: minmax(380px, 0.86fr) minmax(500px, 1.14fr);
}

.pos-checkout-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 14px 18px;
  border: 1px solid rgba(216, 180, 106, 0.3);
  border-radius: 8px;
  background: linear-gradient(135deg, #fff3d7, #f7dfe8);
}

.pos-checkout-summary > div {
  text-align: right;
}

.pos-checkout-summary span,
.pos-checkout-summary strong,
.pos-checkout-summary small {
  display: block;
}

.pos-checkout-summary span,
.pos-checkout-summary small {
  color: var(--pos-muted);
}

.pos-checkout-summary strong {
  margin: 2px 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 38px;
  line-height: 1;
}

.pos-panel,
.pos-receipt-card {
  background: rgba(255, 253, 248, 0.95);
  border: 1px solid rgba(216, 180, 106, 0.28);
  border-radius: 8px;
  box-shadow: var(--pos-shadow);
}

.pos-panel {
  min-height: 320px;
  padding: clamp(18px, 2.4vw, 28px);
}

.pos-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.pos-panel h2,
.pos-receipt-card h2 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 30px;
  line-height: 1.08;
}

.pos-panel__head .pos-btn {
  min-height: 48px;
  padding: 0 18px;
  font-size: var(--pos-text-small);
}

.pos-search,
.pos-customer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 16px;
}

.pos-customer-box {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.pos-customer-current,
.pos-customer-result {
  display: grid;
  gap: 10px;
  border: 1px solid var(--pos-line);
  border-radius: 8px;
  background: #fffdf8;
  padding: 16px;
}

.pos-customer-current {
  border-left: 5px solid var(--pos-gold);
}

.pos-customer-current--success {
  border-left-color: #62b08b;
}

.pos-customer-current--pending {
  border-left-color: #d8ae59;
}

.pos-customer-current--danger {
  border-left-color: #c45c70;
}

.pos-customer-current strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}

.pos-customer-current small,
.pos-customer-result small,
.pos-customer-result span {
  color: var(--pos-muted);
}

.pos-customer-current p {
  margin: 0;
  color: var(--pos-muted);
}

.pos-customer-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.pos-customer-results {
  display: grid;
  gap: 10px;
}

.pos-customer-result {
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
}

.pos-customer-result strong,
.pos-customer-result span,
.pos-customer-result small {
  display: block;
}

.pos-customer-result.is-disabled {
  opacity: 0.72;
}

.pos-customer-result em {
  color: #9d455d;
  font-style: normal;
  font-weight: 800;
}

.pos-customer-create {
  border: 1px dashed rgba(216, 180, 106, 0.5);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 250, 244, 0.72);
}

.pos-customer-create summary {
  cursor: pointer;
  color: var(--pos-gold-dark);
  font-weight: 900;
}

.pos-customer-create form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.pos-customer-create label {
  display: grid;
  gap: 6px;
}

.pos-search input,
.pos-customer input,
.pos-customer-actions input,
.pos-customer-create input,
.pos-result input,
.pos-cart-item input,
.pos-payment-line input,
.pos-payment-line select {
  min-height: 56px;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--pos-line);
  border-radius: 8px;
  padding: 0 16px;
  background: #fffaf4;
  color: var(--pos-ink);
  font: inherit;
  font-size: 16px;
}

.pos-search input:focus,
.pos-customer-actions input:focus,
.pos-customer-create input:focus,
.pos-result input:focus,
.pos-cart-item input:focus,
.pos-payment-line input:focus,
.pos-payment-line select:focus,
.pos-scan__input input:focus,
.pos-scan-qty input:focus {
  border-color: var(--pos-gold-dark);
  outline: 3px solid rgba(216, 180, 106, 0.18);
}

.pos-scan {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid rgba(216, 180, 106, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 243, 215, 0.52), rgba(247, 223, 232, 0.34)),
    #fffdf8;
}

.pos-scan__input {
  display: grid;
  gap: 8px;
  color: var(--pos-muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pos-scan__input input {
  min-height: 64px;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--pos-line);
  border-radius: 8px;
  padding: 0 18px;
  background: #fffaf4;
  color: var(--pos-ink);
  font: inherit;
  font-size: 20px;
  letter-spacing: 0.03em;
}

.pos-scan__actions {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 10px;
}

.pos-scan__feedback {
  min-height: 24px;
  color: var(--pos-muted);
  font-weight: 800;
}

.pos-scan__feedback[data-state="success"] {
  color: #247153;
}

.pos-scan__feedback[data-state="error"] {
  color: #9d455d;
}

.pos-scan__feedback[data-state="loading"] {
  color: var(--pos-gold-dark);
}

.pos-scan__camera {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px dashed rgba(216, 180, 106, 0.5);
  border-radius: 8px;
  background: #fffaf4;
}

.pos-scan__camera video {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 8px;
  background: #211a14;
}

.pos-scan__camera small {
  color: var(--pos-muted);
  line-height: 1.5;
}

.pos-scan__results {
  display: grid;
  gap: 10px;
}

.pos-scan-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(216, 180, 106, 0.28);
  border-radius: 8px;
  background: #fffaf4;
}

.pos-scan-result strong,
.pos-scan-result span,
.pos-scan-result small,
.pos-scan-result em {
  display: block;
}

.pos-scan-result span,
.pos-scan-result small {
  color: var(--pos-muted);
  line-height: 1.45;
}

.pos-scan-result em {
  margin-top: 6px;
  color: #9d455d;
  font-style: normal;
  font-weight: 800;
}

.pos-scan-result.is-disabled {
  opacity: 0.7;
}

.pos-scan-result .pos-btn,
.pos-result .pos-btn {
  min-height: 48px;
  padding: 0 18px;
  font-size: var(--pos-text-small);
}

.pos-scan-qty {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, 0.45fr) auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid rgba(216, 180, 106, 0.34);
  border-radius: 8px;
  background: #fffdf8;
}

.pos-scan-qty strong,
.pos-scan-qty span {
  display: block;
}

.pos-scan-qty span {
  color: var(--pos-muted);
  line-height: 1.45;
}

.pos-scan-qty label {
  display: grid;
  gap: 6px;
  color: var(--pos-muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.pos-scan-qty input {
  min-height: 56px;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--pos-line);
  border-radius: 8px;
  padding: 0 14px;
  background: #fffaf4;
  color: var(--pos-ink);
  font: inherit;
  font-size: 18px;
}

.pos-scan-qty > div:last-child {
  display: flex;
  gap: 8px;
}

.pos-results,
.pos-cart-list,
.pos-payment-lines,
.pos-receipt-lines {
  display: grid;
  gap: 10px;
}

.pos-result,
.pos-receipt-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(216, 180, 106, 0.26);
  border-radius: 8px;
  background: #fffaf4;
}

.pos-cart-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  padding: 16px;
  border: 1px solid rgba(216, 180, 106, 0.26);
  border-radius: 8px;
  background: #fffaf4;
}

.pos-result img {
  width: 66px;
  height: 66px;
  object-fit: cover;
  border-radius: 8px;
  background: #f3eadc;
}

.pos-result strong,
.pos-cart-item strong,
.pos-receipt-line strong {
  display: block;
  margin-bottom: 4px;
  font-size: var(--pos-text-base);
  line-height: 1.35;
}

.pos-result > div span,
.pos-cart-item__copy span,
.pos-receipt-line span,
.pos-result > div small,
.pos-cart-item__copy small,
.pos-receipt-line small,
.pos-muted {
  color: var(--pos-muted);
  font-size: var(--pos-text-small);
  line-height: 1.45;
}

.pos-result > div span,
.pos-result > div small,
.pos-cart-item__copy span,
.pos-cart-item__copy small {
  display: block;
}

.pos-result em,
.pos-cart-item em {
  display: block;
  margin-top: 6px;
  color: #9d455d;
  font-style: normal;
  font-weight: 700;
}

.pos-result form,
.pos-cart-item__quantity {
  display: flex;
  align-items: end;
  gap: 8px;
}

.pos-result label,
.pos-cart-item__quantity label,
.pos-customer label {
  display: grid;
  gap: 6px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--pos-muted);
}

.pos-result input,
.pos-cart-item input {
  width: 94px;
}

.pos-cart-item__copy {
  min-width: 0;
}

.pos-cart-item__actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
}

.pos-cart-item__remove {
  display: flex;
  align-items: end;
}

.pos-cart-item__quantity input,
.pos-cart-item__quantity .pos-chip-button,
.pos-cart-item__remove .pos-chip-button {
  min-height: var(--pos-row-control-height);
}

.pos-result.is-disabled,
.pos-cart-item.is-disabled {
  opacity: 0.78;
}

.pos-chip-button {
  min-height: var(--pos-row-control-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--pos-line);
  border-radius: 999px;
  padding: 0 16px;
  background: #fffdf8;
  color: var(--pos-gold-dark);
  cursor: pointer;
  font: inherit;
  font-size: var(--pos-text-small);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.pos-chip-button--danger {
  color: #9d455d;
  background: var(--pos-rose);
  border-color: transparent;
}

.pos-total {
  margin-top: 16px;
  padding: 18px;
  border-radius: 8px;
  background: linear-gradient(135deg, #fff3d7, #f7dfe8);
}

.pos-total span,
.pos-total small,
.pos-total em {
  display: block;
  color: var(--pos-muted);
}

.pos-total em {
  margin-top: 8px;
  color: #9d455d;
  font-style: normal;
  font-weight: 700;
}

.pos-total strong {
  display: block;
  margin: 4px 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 46px;
  line-height: 1;
}

.pos-cart-continue {
  margin-top: 14px;
}

.pos-checkout-form {
  display: grid;
  gap: 14px;
}

.pos-payment-line {
  margin: 0;
  padding: 18px;
  border: 1px solid rgba(216, 180, 106, 0.36);
  border-radius: 8px;
  background: rgba(255, 250, 244, 0.74);
}

.pos-payment-line legend {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  color: var(--pos-gold-dark);
  font-weight: 900;
}

.pos-payment-line legend small {
  color: var(--pos-muted);
  font-weight: 700;
}

.pos-payment-line__grid {
  display: grid;
  grid-template-columns: minmax(180px, 1.15fr) minmax(130px, 0.75fr) minmax(140px, 0.8fr);
  gap: 12px;
}

.pos-payment-line label {
  display: grid;
  gap: 7px;
  color: var(--pos-muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pos-payment-line__notes {
  grid-column: span 2;
}

.pos-btn--wide {
  width: 100%;
}

.pos-btn[disabled] {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
  box-shadow: none;
}

.pos-receipt {
  display: grid;
  justify-items: center;
  gap: 16px;
}

.pos-receipt-card {
  width: min(760px, 100%);
  padding: clamp(24px, 4vw, 40px);
}

.pos-receipt-card header {
  text-align: center;
  margin-bottom: 24px;
}

.pos-receipt-card h1 {
  margin: 0 0 8px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(36px, 5vw, 54px);
  line-height: 0.98;
  overflow-wrap: anywhere;
}

.pos-receipt-total {
  margin-bottom: 24px;
  padding: 20px;
  border-radius: 8px;
  background: #fff3d7;
  text-align: center;
}

.pos-receipt-total span,
.pos-receipt-total small {
  color: var(--pos-muted);
}

.pos-receipt-total strong {
  display: block;
  margin: 4px 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 54px;
  line-height: 1;
}

.pos-receipt-card section {
  margin-top: 22px;
}

.pos-receipt-line {
  grid-template-columns: minmax(0, 1fr) auto;
}

.pos-receipt-line > div:last-child {
  text-align: right;
}

.pos-receipt-card footer {
  display: grid;
  gap: 16px;
  margin-top: 28px;
  color: var(--pos-muted);
}

.pos-device-code {
  margin: 24px 0;
  padding: 22px;
  border: 1px dashed var(--pos-gold);
  border-radius: 8px;
  background: #fff7ea;
  color: var(--pos-gold-dark);
  text-align: center;
  font-size: clamp(32px, 7vw, 58px);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.pos-steps {
  display: grid;
  gap: 10px;
  margin: 0 0 24px;
  padding-left: 20px;
  color: var(--pos-muted);
  line-height: 1.55;
}

.pos-offline {
  display: grid;
  gap: 18px;
}

.pos-offline-hero {
  align-items: stretch;
}

.pos-offline-state {
  min-width: 280px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 20px;
  border: 1px solid rgba(216, 180, 106, 0.28);
  border-radius: 8px;
  background: var(--pos-mint);
  color: #247153;
}

.pos-offline-state.is-disabled {
  background: var(--pos-rose);
  color: #9d455d;
}

.pos-offline-state.is-warning {
  background: #fff3d7;
  color: var(--pos-gold-dark);
}

.pos-offline-state strong {
  display: block;
  font-size: 20px;
}

.pos-offline-state span {
  color: inherit;
  opacity: 0.82;
}

.pos-offline-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(360px, 1fr) minmax(340px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.pos-offline-card {
  min-height: 280px;
}

.pos-offline-card--ticket,
.pos-offline-card--sync,
.pos-offline-card--conflicts {
  min-height: 520px;
}

.pos-offline-card--conflicts {
  grid-column: 1 / -1;
  min-height: 240px;
}

.pos-offline-mini {
  margin-top: 18px;
  padding: 16px;
  border-radius: 8px;
  background: #fff3d7;
}

.pos-offline-mini span {
  display: block;
  color: var(--pos-muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pos-offline-mini strong {
  display: block;
  margin-top: 5px;
}

.pos-offline-search {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  font-weight: 800;
}

.pos-offline-search input,
.pos-offline-payments input {
  min-height: 56px;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--pos-line);
  border-radius: 8px;
  padding: 0 16px;
  background: #fffaf4;
  color: var(--pos-ink);
  font: inherit;
  font-size: 18px;
}

.pos-offline-results,
.pos-offline-lines {
  display: grid;
  gap: 10px;
}

.pos-offline-product,
.pos-offline-line,
.pos-offline-pending {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(216, 180, 106, 0.26);
  border-radius: 8px;
  background: #fffaf4;
}

.pos-offline-product strong,
.pos-offline-line strong,
.pos-offline-pending strong {
  display: block;
  margin-bottom: 4px;
  font-size: var(--pos-text-base);
  line-height: 1.35;
}

.pos-offline-product span,
.pos-offline-product small,
.pos-offline-line span,
.pos-offline-pending span,
.pos-offline-pending small {
  display: block;
  color: var(--pos-muted);
  font-size: var(--pos-text-small);
  line-height: 1.45;
}

.pos-offline-product em {
  display: block;
  margin-top: 6px;
  color: #9d455d;
  font-style: normal;
  font-weight: 800;
}

.pos-offline-product label,
.pos-offline-payments label {
  display: grid;
  gap: 6px;
  color: var(--pos-muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pos-offline-product input {
  width: 96px;
  min-height: var(--pos-row-control-height);
  border: 1px solid var(--pos-line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fffdf8;
  font: inherit;
}

.pos-offline-product.is-disabled {
  opacity: 0.65;
}

.pos-offline-line {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.pos-offline-pending {
  grid-template-columns: 1fr;
}

.pos-offline-conflict-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.pos-offline-conflict-lines {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.pos-offline-conflict-lines label {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 110px;
}

.pos-offline-conflict-lines input {
  min-height: 48px;
  width: 100%;
}

.pos-offline-payments {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0;
}

@media (max-width: 1180px) {
  .pos-hero--workbench {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  }

  .pos-hero--workbench .pos-hero__actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .pos-touch-modules,
  .pos-offline-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pos-touch-card--primary,
  .pos-offline-card--conflicts {
    grid-column: 1 / -1;
  }

  .pos-checkout-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .pos-hero,
  .pos-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .pos-hero--workbench {
    grid-template-columns: 1fr;
  }

  .pos-hero__actions {
    width: 100%;
    justify-content: flex-start;
  }

  .pos-status-strip,
  .pos-touch-modules {
    grid-template-columns: 1fr 1fr;
  }

  .pos-touch-card--primary {
    grid-column: 1 / -1;
  }

  .pos-status-grid,
  .pos-modules,
  .pos-offline-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pos-sale-workspace,
  .pos-checkout-layout {
    grid-template-columns: 1fr;
  }

  .pos-offline-card--ticket,
  .pos-offline-card--sync,
  .pos-offline-card--conflicts {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .pos-main {
    width: min(100vw - 20px, 1240px);
  }

  .pos-status-grid,
  .pos-modules,
  .pos-status-strip,
  .pos-touch-modules,
  .pos-sale-steps,
  .pos-offline-grid,
  .pos-offline-payments {
    grid-template-columns: 1fr;
  }

  .pos-hero--workbench {
    min-height: auto;
    padding: 24px;
  }

  .pos-start-sale,
  .pos-touch-card {
    min-height: 176px;
  }

  .pos-search,
  .pos-customer,
  .pos-customer-actions,
  .pos-customer-result,
  .pos-scan__actions,
  .pos-scan-result,
  .pos-scan-qty,
  .pos-result,
  .pos-cart-item,
  .pos-offline-product,
  .pos-offline-line {
    grid-template-columns: 1fr;
  }

  .pos-result form,
  .pos-cart-item__quantity {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .pos-cart-item__actions {
    justify-content: space-between;
  }

  .pos-scan-qty > div:last-child {
    align-items: stretch;
    flex-direction: column;
  }

  .pos-payment-line {
    grid-template-columns: 1fr;
  }

  .pos-payment-line__grid {
    grid-template-columns: 1fr;
  }

  .pos-payment-line__notes {
    grid-column: auto;
  }

  .pos-checkout-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .pos-checkout-summary > div {
    text-align: left;
  }

  .pos-hero__actions,
  .pos-hero__actions form,
  .pos-btn,
  .pos-offline-conflict-actions {
    width: 100%;
  }

  .pos-sale > .pos-hero--compact {
    gap: 16px;
    padding: 18px;
  }

  .pos-sale > .pos-hero--compact .pos-hero__actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .pos-sale > .pos-hero--compact .pos-btn {
    min-height: 50px;
    padding: 0 8px;
  }

  .pos-offline-conflict-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 460px) {
  .pos-cart-item__actions {
    display: grid;
    grid-template-columns: 1fr;
    align-items: end;
  }

  .pos-cart-item__quantity {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .pos-cart-item__quantity input {
    width: 100%;
  }

  .pos-cart-item__remove .pos-chip-button {
    width: 100%;
  }
}
