/* ==========================================================
   masymas TPV — design tokens
   Brand: #005e49 (verde corporativo masymas)
   ========================================================== */
:root {
  /* Brand */
  --brand: #005e49;
  --brand-2: #00715a;
  --brand-d: #004436;
  --brand-l: #e6f1ee;
  --brand-l2: #cfe3dd;
  --accent: #ffcc00;
  --accent-d: #f0b800;
  --red: #d33636;
  --red-d: #b02525;
  --orange: #ff7a1a;

  /* Surfaces */
  --bg: #f1f4f3;
  --bg-2: #e6ece9;
  --panel: #ffffff;
  --panel-2: #fafbfa;
  --line: #e2e8e4;
  --line-2: #cfd6d1;

  /* Text */
  --txt: #15211d;
  --txt-2: #4a574f;
  --txt-3: #7a8881;
  --txt-inv: #ffffff;

  /* Effects */
  --shadow: 0 1px 2px rgba(15, 35, 28, 0.06), 0 8px 22px rgba(15, 35, 28, 0.08);
  --shadow-lg: 0 20px 50px rgba(0, 70, 55, 0.22);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;

  --grid-gap: 12px;

  /* Colores por categoría (para miniaturas) */
  --c-all:        #6b7a73;
  --c-fruteria:   #2e9b58;
  --c-carniceria: #c0392b;
  --c-pescaderia: #1e88e5;
  --c-charcuteria:#e67e22;
  --c-panaderia:  #8d6e3c;
  --c-lacteos:    #4a8bdc;
  --c-bebidas:    #00acc1;
  --c-alcohol:    #7e2d8f;
  --c-congelados: #4ec1ea;
  --c-conservas:  #d49a1f;
  --c-limpieza:   #2aa49b;
  --c-higiene:    #d96a86;
  --c-bebe:       #b386c4;
  --c-mascotas:   #94694a;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--txt);
  background:
    radial-gradient(1100px 600px at -10% -10%, #e8efe9 0%, transparent 50%),
    radial-gradient(800px 500px at 110% 0%, #eaf2ee 0%, transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }

/* ==========================================================
   Topbar
   ========================================================== */
.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 12px 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f5faf7 100%);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}

.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo { height: 38px; width: auto; display: block; }
.brand-meta { display: flex; flex-direction: column; line-height: 1.15; }
.brand-tag {
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  color: var(--brand); text-transform: uppercase;
}
.brand-store { font-size: 12px; color: var(--txt-3); font-weight: 500; }

.ticker {
  display: flex; gap: 22px; flex-wrap: wrap; justify-content: center;
  color: var(--txt-2); font-size: 12px;
}
.ticker-item { display: inline-flex; align-items: center; gap: 8px; }
.dot {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block;
  box-shadow: 0 0 0 3px rgba(0, 94, 73, 0.08);
}
.dot-ok { background: #2ecc71; box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.18); }
.dot-info { background: var(--brand); }

.topbar-actions { display: flex; gap: 10px; align-items: center; }
.kv {
  display: flex; flex-direction: column;
  padding: 6px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  min-width: 92px;
}
.kv-k { font-size: 10px; color: var(--txt-3); text-transform: uppercase; letter-spacing: .08em; }
.kv-v { font-weight: 700; font-size: 14px; color: var(--txt); }
.kv-clock .kv-v { font-family: 'JetBrains Mono', monospace; color: var(--brand); }

/* ==========================================================
   Function bar
   ========================================================== */
.fbar {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 6px;
  padding: 10px 18px;
  background: var(--brand);
  background-image: linear-gradient(180deg, #006a52 0%, var(--brand) 100%);
}
.fbtn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  background: rgba(255,255,255,0.10);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 8px 6px;
  font-size: 11px; font-weight: 600;
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
  user-select: none;
}
.fbtn kbd {
  font: 700 10px 'JetBrains Mono', monospace;
  padding: 1px 6px; border-radius: 4px;
  background: rgba(255,255,255,0.2);
  color: #fff;
}
.fbtn:hover { background: rgba(255,255,255,0.18); }
.fbtn:active { transform: translateY(1px); }
.fbtn-pri { background: var(--accent); color: #2b2200; border-color: var(--accent-d); }
.fbtn-pri kbd { background: rgba(0,0,0,.15); color: #2b2200; }
.fbtn-pri:hover { background: #ffd633; }
.fbtn-warn { background: rgba(255,90,90,.22); border-color: rgba(255,150,150,.45); }
.fbtn-warn:hover { background: rgba(255,90,90,.32); }

/* ==========================================================
   Layout
   ========================================================== */
.layout {
  display: grid;
  grid-template-columns: 1fr 460px;
  gap: var(--grid-gap);
  padding: var(--grid-gap);
  height: calc(100vh - 64px - 60px);
  overflow: hidden;
}

@media (max-width: 1280px) { .layout { grid-template-columns: 1fr 420px; } }
@media (max-width: 1100px) { .layout { grid-template-columns: 1fr 380px; } }

/* ==========================================================
   Catalog (left)
   ========================================================== */
.catalog {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  min-width: 0;
}

.scanner-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; }
.scanner-box, .search-box {
  display: flex; align-items: center; gap: 8px;
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 6px 6px 6px 14px;
  background: var(--panel-2);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.scanner-box:focus-within, .search-box:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(0, 94, 73, 0.12);
  background: #fff;
}
.scanner-icon, .search-icon { color: var(--brand); display: inline-flex; }
.scanner-box input, .search-box input {
  flex: 1; min-width: 0;
  border: 0; outline: 0; background: transparent;
  font-size: 15px; padding: 8px 4px; color: var(--txt); font-weight: 500;
}

/* Categories */
.cats {
  display: flex; gap: 8px; overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
.cat {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  background: var(--bg-2);
  color: var(--txt-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  transition: all .15s ease;
}
.cat svg { width: 16px; height: 16px; }
.cat:hover { background: var(--brand-l); color: var(--brand); }
.cat.is-active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand-d);
  box-shadow: 0 4px 10px rgba(0, 94, 73, 0.25);
}

/* Product grid */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  grid-auto-rows: min-content;
  align-content: start;
  gap: 10px;
  overflow-y: auto;
  padding: 6px 4px 10px 4px;
  flex: 1;
}
.products::-webkit-scrollbar { width: 8px; }
.products::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; }

.product {
  --c: var(--c-all);
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: start;
  gap: 10px;
  background: linear-gradient(180deg, #fff 0%, #fafbfa 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 12px 12px 15px;
  text-align: left;
  color: var(--txt);
  transition: transform .08s ease, border-color .15s ease, box-shadow .15s ease;
  overflow: hidden;
  min-height: 120px;
}
.product::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--c);
  opacity: .85;
}
.product:hover {
  border-color: var(--brand);
  box-shadow: 0 4px 14px rgba(0, 94, 73, 0.12);
}
.product:active { transform: translateY(1px); }
.product-thumb {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--c) 14%, #fff);
  color: var(--c);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px;
  letter-spacing: .04em;
  border: 1px solid color-mix(in srgb, var(--c) 25%, #fff);
  flex-shrink: 0;
}
.product-info {
  display: flex; flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.product-tags {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-bottom: 1px;
}
.product-tags:empty { display: none; }
.product-name {
  font-size: 13px; font-weight: 600;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.2; min-height: 32px;
  word-break: break-word;
}
.product-meta {
  font-size: 10.5px; color: var(--txt-3); font-weight: 500;
  letter-spacing: .02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.product-price {
  font-weight: 800; color: var(--brand);
  font-size: 16px;
  display: flex; align-items: baseline; gap: 5px;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.product-price small {
  font-weight: 600;
  color: var(--txt-3);
  font-size: 10.5px;
  letter-spacing: .02em;
}
.product-price small.age {
  color: #fff;
  background: var(--red);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 800;
  letter-spacing: .04em;
}
.product-badge {
  display: inline-flex; align-items: center;
  background: var(--accent);
  color: #2b2200;
  font-size: 9.5px; font-weight: 800;
  padding: 2px 6px;
  border-radius: 5px;
  letter-spacing: .05em;
  line-height: 1.3;
  text-transform: uppercase;
}
.product-badge.bd-promo { background: var(--red); color: #fff; }
.product-badge.bd-bio { background: #4caf50; color: #fff; }
.product-badge.bd-new { background: var(--brand); color: #fff; }

.quickbar {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  border-top: 1px solid var(--line); padding-top: 10px;
}
.qbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--bg-2);
  color: var(--txt-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 8px;
  font-size: 12px; font-weight: 600;
  transition: all .15s ease;
}
.qbtn svg { flex-shrink: 0; }
.qbtn:hover { background: var(--brand-l); color: var(--brand); border-color: var(--brand-l2); }

/* ==========================================================
   Ticket (right)
   ========================================================== */
.ticket {
  display: flex; flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.ticket-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
}
.ticket-head h2 { margin: 0; font-size: 16px; font-weight: 700; }
.ticket-head #ticketLine { font-size: 11px; opacity: 0.85; font-weight: 500; }
.customer { display: flex; align-items: center; gap: 6px; }
.customer-tag {
  background: rgba(255,255,255,0.15);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px; font-weight: 600;
}
.customer.is-id .customer-tag { background: var(--accent); color: #2b2200; }

/* Botones legibles dentro del header verde del ticket */
.ticket-head .btn-ghost,
.ticket-head .btn {
  color: #fff;
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.28);
}
.ticket-head .btn-ghost:hover,
.ticket-head .btn:hover {
  background: rgba(255,255,255,0.28);
  border-color: rgba(255,255,255,0.4);
}

.cart {
  list-style: none; margin: 0; padding: 6px 10px;
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column; gap: 6px;
}
.cart::-webkit-scrollbar { width: 8px; }
.cart::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; }

.cart-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  transition: background .15s ease, border-color .15s ease;
  animation: slideIn .18s ease;
}
.cart-line:hover { background: #fff; border-color: var(--brand-l2); }
.cart-line.is-promo { border-left: 3px solid var(--red); }
.cart-line.is-weight { border-left: 3px solid var(--orange); }
.cart-line.is-manual { border-left: 3px dashed var(--brand); }

.cl-name {
  font-size: 13px; font-weight: 600; line-height: 1.2;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.cl-meta { font-size: 11px; color: var(--txt-3); margin-top: 2px; }
.cl-price { font-weight: 800; color: var(--brand); font-size: 16px; text-align: right; font-variant-numeric: tabular-nums; }
.cl-controls {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 8px;
  margin-top: 6px;
}
.cl-qty {
  display: inline-flex; align-items: stretch;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.cl-qty button {
  background: #fff; border: 0;
  padding: 4px 12px;
  font-weight: 800;
  color: var(--brand);
  font-size: 16px;
  line-height: 1;
  min-width: 32px;
  cursor: pointer;
}
.cl-qty button:hover { background: var(--brand-l); }
.cl-qty button:active { background: var(--brand-l2); }
.cl-qty .cl-qty-val {
  padding: 4px 10px;
  min-width: 40px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  background: var(--bg-2);
  border: 0;
  color: var(--txt);
  font-variant-numeric: tabular-nums;
  outline: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  -moz-appearance: textfield;
}
.cl-qty .cl-qty-val::-webkit-outer-spin-button,
.cl-qty .cl-qty-val::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}
.cl-qty .cl-qty-val:focus {
  background: #fff;
  box-shadow: inset 0 0 0 2px var(--brand);
}
.cl-qty .cl-qty-kg {
  padding: 4px 12px;
  color: var(--orange);
  font-weight: 700;
  font-size: 13px;
  background: #fff;
  display: inline-flex; align-items: center;
}
.cl-rm {
  background: #fff5f5;
  border: 1px solid #f5c2c2;
  padding: 5px 10px;
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  margin-left: auto;
  border-radius: 8px;
  display: inline-flex; align-items: center; gap: 5px;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}
.cl-rm svg { width: 14px; height: 14px; }
.cl-rm:hover { background: #fde2e2; border-color: #e89999; }
.cl-rm-label { font-size: 11px; }
.cl-discount {
  background: #fff8e0;
  border: 1px solid #ecd994;
  color: #8a5d00;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 8px;
  cursor: pointer;
}
.cl-discount:hover { background: #fff0bd; }
.cl-saved {
  font-size: 10.5px;
  color: var(--red);
  font-weight: 700;
  white-space: nowrap;
}
.cl-promo {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--red); color: #fff;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10px; font-weight: 700;
  letter-spacing: .04em;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.cart-empty {
  display: none;
  flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 40px 20px;
  color: var(--txt-3);
  flex: 1;
}
.cart-empty.is-on { display: flex; }
.cart-empty-ill { color: var(--line-2); margin-bottom: 8px; }
.cart-empty p { margin: 0; font-weight: 700; color: var(--txt-2); }
.cart-empty small { font-size: 12px; margin-top: 4px; }

.ticket-summary {
  border-top: 1px solid var(--line);
  padding: 12px 18px 6px 18px;
  background: var(--panel-2);
}
.ticket-summary .row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; padding: 3px 0;
  color: var(--txt-2);
}
.ticket-summary .row b { font-weight: 700; color: var(--txt); font-variant-numeric: tabular-nums; }
.ticket-summary .row.sub b { color: var(--txt-3); font-weight: 600; }
.ticket-summary .row.total {
  font-size: 22px; padding-top: 10px; margin-top: 6px;
  border-top: 2px dashed var(--line);
  color: var(--txt);
  font-weight: 700;
}
.ticket-summary .row.total b {
  color: var(--brand);
  font-size: 26px;
  font-weight: 800;
}
.ticket-summary .row.points b { color: var(--orange); font-weight: 700; }

.ticket-actions {
  display: grid; grid-template-columns: 1fr 1.6fr;
  gap: 8px; padding: 12px 14px 14px 14px;
}

/* ==========================================================
   Buttons
   ========================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: #fff;
  color: var(--txt);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 13px;
  transition: transform .08s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--bg-2); border-color: var(--line-2); }
.btn:active { transform: translateY(1px); }
.btn-pri {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand-d);
  box-shadow: 0 4px 12px rgba(0, 94, 73, 0.25);
}
.btn-pri:hover { background: var(--brand-2); }
.btn-warn {
  background: #fff5f5;
  color: var(--red);
  border-color: #f7c7c7;
}
.btn-warn:hover { background: #ffeaea; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--txt-2); }
.btn-ghost:hover { background: var(--bg-2); }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 18px; font-size: 15px; }
.btn-xs { padding: 4px 10px; font-size: 11px; }

.btn-pay {
  flex-direction: column; gap: 2px;
  padding: 12px;
}
.btn-pay .pay-label { font-size: 11px; font-weight: 700; letter-spacing: .12em; opacity: .9; text-transform: uppercase; }
.btn-pay .pay-amount { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }

.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ==========================================================
   Modals
   ========================================================== */
.modal {
  position: fixed; inset: 0;
  display: none; align-items: center; justify-content: center;
  z-index: 50;
}
.modal.is-open { display: flex; animation: fadeIn .15s ease; }
.modal-bg {
  position: absolute; inset: 0;
  background: rgba(10, 25, 22, 0.5);
  backdrop-filter: blur(4px);
}
.modal-panel {
  position: relative;
  background: #fff;
  border-radius: var(--radius-lg);
  width: 92%;
  max-width: 520px;
  max-height: 90vh;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: slideUp .2s ease;
}
.modal-lg { max-width: 880px; }
.modal-sm { max-width: 420px; }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px;
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
}
.modal-head-warn { background: linear-gradient(180deg, #c0392b 0%, #a72e21 100%); }
.modal-head h3 {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0; font-size: 17px; font-weight: 700;
}
.modal-head h3 .m-ico { width: 22px; height: 22px; }
.modal-x {
  background: rgba(255,255,255,.18); color: #fff; border: 0;
  width: 32px; height: 32px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
}
.modal-x:hover { background: rgba(255,255,255,.3); }
.modal-actions {
  display: flex; gap: 8px; justify-content: flex-end;
  padding: 12px 18px 16px 18px;
  border-top: 1px solid var(--line);
}
.modal-actions .btn svg { margin-right: 0; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* Pay modal */
.pay-grid {
  display: grid; grid-template-columns: 1.6fr 1fr;
  min-height: 420px;
}
.pay-methods { padding: 18px 22px; border-right: 1px solid var(--line); }
.pay-methods h4 { margin: 0 0 10px 0; font-size: 12px; color: var(--txt-3); text-transform: uppercase; letter-spacing: .1em; }
.pay-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 18px; }
.pay-tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  padding: 12px 6px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 11px; font-weight: 600; color: var(--txt-2);
  text-align: center;
}
.pay-tab svg { width: 22px; height: 22px; }
.pay-tab:hover { background: var(--brand-l); color: var(--brand); }
.pay-tab.is-active {
  background: var(--brand); color: #fff;
  border-color: var(--brand-d);
}
.pay-body { min-height: 240px; }
.cash-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.cash-quick button {
  padding: 14px 8px;
  background: linear-gradient(180deg, #fff 0%, #fafbfa 100%);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  color: var(--txt);
  font-variant-numeric: tabular-nums;
}
.cash-quick button:hover { border-color: var(--brand); color: var(--brand); }
.cash-input {
  width: 100%;
  padding: 16px 18px;
  font-size: 26px;
  font-weight: 800;
  text-align: right;
  border: 2px solid var(--line);
  border-radius: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--brand);
}
.cash-input:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(0, 94, 73, 0.12); }
.pay-summary {
  padding: 20px 22px;
  display: flex; flex-direction: column; gap: 8px;
  background: var(--panel-2);
}
.pay-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 14px;
  padding: 6px 0;
}
.pay-row b { font-weight: 800; font-variant-numeric: tabular-nums; }
.pay-change {
  margin-top: auto;
  padding: 14px 16px; background: var(--brand-l);
  border: 1px solid var(--brand-l2);
  border-radius: 12px;
  font-size: 16px;
  transition: background .15s ease, border-color .15s ease;
}
.pay-change b { color: var(--brand); font-size: 22px; }

.pay-change.is-short {
  background: #fdecec;
  border-color: #f3c1c1;
}
.pay-change.is-short b { color: var(--red); }
.pay-change.is-short span { color: var(--red-d); font-weight: 700; }

.pay-change.is-exact {
  background: var(--bg-2);
  border-color: var(--line-2);
}
.pay-change.is-exact b { color: var(--txt-2); }

.pay-change.is-ok {
  background: #e8f7ec;
  border-color: #b7e3c2;
}
.pay-change.is-ok b { color: #1f7a3a; }

.pay-breakdown {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-top: 4px;
  padding: 8px 10px;
  background: #fff;
  border: 1px dashed var(--line-2);
  border-radius: 10px;
  max-height: 96px; overflow-y: auto;
}
.bk-chip {
  display: inline-flex; align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}
.bk-chip.bk-note { background: #e6f1ee; color: var(--brand-d); border: 1px solid var(--brand-l2); }
.bk-chip.bk-coin { background: #fff4d6; color: #8a5d00; border: 1px solid #f0d987; }

.pay-waiting {
  padding: 30px;
  text-align: center;
  background: var(--bg-2);
  border-radius: 12px;
  border: 1px dashed var(--line-2);
}
.pay-waiting svg { color: var(--brand); margin-bottom: 8px; }
.pay-waiting h3 { margin: 0 0 6px; color: var(--brand); font-size: 15px; }
.pay-waiting p { color: var(--txt-3); margin: 0; font-size: 13px; }
.pay-waiting .pay-amount-disp {
  margin-top: 14px; font-family: 'JetBrains Mono'; color: var(--brand); font-weight: 700;
}

/* Weight modal */
.weight-body { padding: 18px 22px 22px; text-align: center; }
.weight-product { font-weight: 700; margin-bottom: 8px; color: var(--txt-2); }
.weight-display {
  background: #001a14;
  color: #34ff9c;
  font-family: 'JetBrains Mono', monospace;
  font-size: 48px;
  padding: 18px 12px;
  border-radius: 12px;
  font-weight: 700;
  text-shadow: 0 0 14px rgba(52, 255, 156, 0.5);
  margin-bottom: 8px;
}
.weight-display small { font-size: 18px; opacity: .8; }
.weight-price { font-size: 13px; color: var(--txt-3); margin-bottom: 14px; }
.weight-keypad {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  margin-bottom: 14px;
}
.weight-keypad button {
  padding: 16px 6px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 20px; font-weight: 700;
  color: var(--txt);
  display: inline-flex; align-items: center; justify-content: center;
}
.weight-keypad button:hover { background: var(--brand-l); color: var(--brand); }
.weight-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* Loyalty / discount / manual / return forms */
.loyalty-body, .discount-body, .manual-body, .return-body, .age-body { padding: 18px 22px 0; }
.lbl {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12px; color: var(--txt-3);
  margin-bottom: 10px;
  text-transform: uppercase; letter-spacing: .06em; font-weight: 600;
}
.lbl input, .lbl select, .loyalty-body input, .return-body input {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 15px;
  color: var(--txt);
  background: #fff;
  text-transform: none; letter-spacing: 0; font-weight: 500;
}
.lbl input:focus, .lbl select:focus, .loyalty-body input:focus, .return-body input:focus {
  outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(0, 94, 73, 0.12);
}
.loyalty-suggestions { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; max-height: 200px; overflow-y: auto; }
.loyalty-sug {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px;
  text-align: left;
}
.loyalty-sug:hover { background: var(--brand-l); border-color: var(--brand-l2); }
.loyalty-sug small { color: var(--orange); font-weight: 700; }

.discount-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-bottom: 12px;
}
.dchip {
  padding: 18px;
  background: var(--bg-2);
  border: 2px solid var(--line);
  border-radius: 12px;
  font-size: 20px; font-weight: 800;
  color: var(--red);
}
.dchip:hover { border-color: var(--red); background: #fff5f5; }

.return-list { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.return-item {
  display: grid; grid-template-columns: 1fr auto auto; gap: 10px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  font-size: 13px;
}
.return-item button {
  background: var(--red); color: #fff; border: 0;
  padding: 5px 10px; border-radius: 8px; font-size: 11px; font-weight: 700;
}

/* Reports */
.reports-body { padding: 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.kpi {
  padding: 14px 16px;
  background: linear-gradient(180deg, #fff 0%, #fafbfa 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.kpi-k { font-size: 11px; color: var(--txt-3); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.kpi-v { font-size: 24px; font-weight: 800; color: var(--brand); margin-top: 4px; }
.kpi-d { font-size: 11px; color: var(--orange); margin-top: 2px; font-weight: 600; }
.kpi.kpi-full { grid-column: 1 / -1; }
.kpi-list { margin: 8px 0 0; padding: 0; list-style: none; font-size: 12px; }
.kpi-list li { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.kpi-list li:last-child { border-bottom: 0; }

/* Ticket preview */
.ticket-preview {
  font-family: 'JetBrains Mono', monospace;
  background: #fefefe;
  border: 1px dashed var(--line-2);
  margin: 18px;
  padding: 18px 22px;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  max-height: 60vh;
  overflow-y: auto;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 22px;
  background: #15211d;
  color: #fff;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  font-size: 13px; font-weight: 600;
  opacity: 0;
  z-index: 100;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.is-err { background: var(--red); }
.toast.is-ok { background: #1f7a3a; }

/* Print */
@media print {
  body * { visibility: hidden; }
  .ticket-preview, .ticket-preview * { visibility: visible; }
  .ticket-preview { position: absolute; left: 0; top: 0; border: 0; margin: 0; }
}
