@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600&display=swap");
:root {
  --ink: #0c1210;
  --muted: #5c6661;
  --line: #e4e8e6;
  --page: #f7f8f7;
  --surface: #fff;
  --accent: #008a4b;
  --accent-hover: #006f3c;
  --soft: #e7f6ee;
  --forest: #0f3d2c;
  --danger: #dc2626;
  --warn: #b45309;
  --radius: 8px;
  --radius-md: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; }
body {
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  background: transparent;
  overflow: hidden;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
.app {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  width: 100%;
  height: 100%;
  max-height: 100%;
  background: var(--page);
  position: relative;
  overflow: hidden;
}
.rail {
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 8px;
  gap: 6px;
}
.logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: contain;
  margin-bottom: 6px;
  background: #e7f6ee;
  padding: 3px;
  box-shadow: 0 0 0 1px rgba(0, 138, 75, 0.12);
}
.rail-btn {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
}
.rail-btn.on { background: #f1f4f2; color: var(--ink); }
.rail-btn svg { width: 13px; height: 13px; }
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.topbar {
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.crumb { font-size: 9px; font-weight: 600; color: var(--muted); }
.crumb b { color: var(--ink); }
.demo-state { display: flex; align-items: center; gap: 5px; }
.demo-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 138, 75, .12);
  animation: status-pulse 1.8s ease-in-out infinite;
}
.demo-step {
  min-width: 34px;
  color: var(--accent-hover);
  font: 600 7px/1 "IBM Plex Mono", ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.demo-step.step-pop { animation: step-pop .28s var(--ease); }
.as { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; display: block; }
.sheet {
  flex: 1;
  min-height: 0;
  margin: 6px 8px 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}
.sheet.sheet-enter {
  animation: sheet-in 0.48s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.toolbar { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; flex-shrink: 0; }
.h { font-size: 11px; font-weight: 700; }
.sub { font-size: 8px; color: var(--muted); font-weight: 500; }
/* Seller-matched controls: 12px radius scaled → 8–10px in demo */
.btn, .ghost {
  height: 24px;
  padding: 0 10px;
  border-radius: var(--radius);
  font-size: 8px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: inherit;
  box-shadow: 0 1px 2px rgba(12, 18, 16, 0.04);
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover, .ghost:hover { border-color: #c5cdc8; background: #fafbfa; }
/* Primary = Taxora green (seller pra-btn-primary) */
.btn.p, .btn.g {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: none;
}
.btn.p:hover, .btn.g:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn.is-off, .ghost:disabled { opacity: .35; pointer-events: none; }
.btn-press, .btn.btn-press, .ghost.btn-press, .tile.btn-press {
  transform: scale(0.96);
  filter: brightness(0.96);
  transition: transform .12s ease, filter .12s ease;
}
.walk-target {
  outline: 2px solid rgba(0, 138, 75, .34);
  outline-offset: 2px;
  animation: target-cue .72s cubic-bezier(0.16, 1, 0.3, 1);
}
tr.walk-target { outline-offset: -2px; }
.field {
  height: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 8px;
  display: flex;
  align-items: center;
  font-size: 8px;
  font-weight: 650;
  background: #fafbfa;
  min-width: 0;
}
.field.focus { background: #fff; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 138, 75, .12); }
.caret { width: 1px; height: 11px; background: var(--accent); margin-left: 1px; animation: blink 1s step-end infinite; }
.label { font-size: 7.5px; color: var(--muted); font-weight: 700; margin-bottom: 2px; }
.form { display: grid; gap: 6px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.stat {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px;
}
.stat b { display: block; font-size: 14px; }
.stat span { font-size: 7.5px; color: var(--muted); font-weight: 600; }
.table { width: 100%; border-collapse: collapse; font-size: 8px; }
.table th { text-align: left; color: var(--muted); font-weight: 700; padding: 0 6px 5px; }
.table td { padding: 6px; border-top: 1px solid var(--line); }
.table tr.on td { background: var(--soft); }
.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .02em; }
.pill {
  display: inline-flex;
  align-items: center;
  height: 15px;
  padding: 0 6px;
  border-radius: 6px;
  font-size: 7px;
  font-weight: 700;
  background: var(--soft);
  color: var(--forest);
}
.pill.warn { background: #fff7ed; color: var(--warn); }
.pill.bad { background: #fef2f2; color: var(--danger); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; min-height: 0; }
.tile {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 7px 8px;
  background: #fff;
  font-family: inherit;
  min-width: 0;
}
.tile b { display: block; font-size: 9px; }
.tile span { font-size: 7.5px; color: var(--muted); }
.tile.sel { border-color: var(--accent); background: #f3fbf8; box-shadow: 0 0 0 3px rgba(0, 138, 75, .1); }
.till { display: grid; grid-template-columns: minmax(0, 1fr) 118px; gap: 8px; flex: 1; min-height: 0; overflow: hidden; }
.cart { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 8px; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.line { display: flex; justify-content: space-between; gap: 6px; font-size: 8px; font-weight: 650; margin-top: 4px; }
.aside {
  position: absolute;
  right: 6px;
  top: 6px;
  bottom: 6px;
  width: min(158px, 46%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 14px 28px rgba(12, 18, 16, .14);
  padding: 8px;
  transform: translateX(112%);
  opacity: 0;
  transition: transform .42s cubic-bezier(0.22, 1, 0.36, 1), opacity .28s ease;
  z-index: 6;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
  pointer-events: none;
}
.aside.show {
  transform: none;
  opacity: 1;
  pointer-events: auto;
}
.aside h4 { font-size: 10px; font-weight: 700; margin-bottom: 4px; flex-shrink: 0; }
.aside .btn { flex-shrink: 0; }
.sticker { border: 1px dashed #c5cdc8; border-radius: 6px; padding: 5px; text-align: center; flex-shrink: 0; }
.barcode { display: flex; align-items: flex-end; justify-content: center; gap: 1.5px; height: 24px; margin: 2px 0; }
.barcode i { display: block; width: 2px; background: #111; height: 8px; border-radius: 1px; }
.barcode.on i { animation: bar 1.05s var(--ease) forwards; }
.nm { font-size: 8px; font-weight: 700; }
.pr { font-size: 9px; font-weight: 800; }
.cd { font-size: 7px; color: var(--muted); font-family: "IBM Plex Mono", monospace; }
.check { display: flex; align-items: center; gap: 5px; font-size: 8px; font-weight: 650; margin: 3px 0 1px; flex-shrink: 0; }
.box { width: 11px; height: 11px; border: 1.4px solid #c5cdc8; border-radius: 3px; }
.check.on .box {
  background: var(--accent);
  border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' d='M2 6.5 5 9.5 10 3'/%3E%3C/svg%3E");
}
.bars { display: flex; align-items: flex-end; gap: 5px; height: 52px; padding-top: 4px; flex-shrink: 0; overflow: hidden; }
.bar {
  flex: 1;
  background: var(--ink);
  border-radius: 3px 3px 0 0;
  transform-origin: bottom;
  transform: scaleY(.08);
}
.bar.on { animation: grow 1.2s var(--ease) forwards; }
.stamp {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 6px;
  border: 1.5px solid var(--ink);
  font: 700 8px/1 "IBM Plex Mono", monospace;
  opacity: 0;
}
.stamp.on { animation: pop .4s var(--ease) forwards; }
.spin {
  width: 9px;
  height: 9px;
  border: 1.5px solid #d4dbd7;
  border-top-color: var(--ink);
  border-radius: 50%;
  display: inline-block;
  animation: spin .7s linear infinite;
  vertical-align: -1px;
}
.thumb {
  width: 100%;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  display: block;
  margin-bottom: 4px;
  flex-shrink: 0;
}
.avatars { display: flex; gap: 4px; flex-shrink: 0; margin-bottom: 4px; }
.avatars img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; border: 2px solid transparent; }
.avatars img.pick { border-color: var(--accent); }
.beat {
  flex-shrink: 0;
  margin: 6px 8px 0;
  font-size: 8px;
  font-weight: 600;
  color: var(--ink);
  background: linear-gradient(180deg, #fff 0%, #f7faf8 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  box-shadow: 0 1px 0 rgba(12, 18, 16, 0.03);
  opacity: 0;
  transform: translateY(4px);
}
.beat.on {
  animation: beat-in 0.42s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.beat:empty { display: none; }
.cursor {
  position: absolute;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  z-index: 30;
  pointer-events: none;
  opacity: 1;
  will-change: transform, opacity;
  filter: drop-shadow(0 1px 2px rgba(12, 18, 16, 0.28));
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease;
  transform: translate(16px, 16px);
}
.ripple {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 29;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.2);
  box-shadow: 0 0 0 0 rgba(0, 138, 75, 0.25);
}
.ripple.click { animation: rip 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.toast-stack {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 40;
  display: grid;
  width: min(200px, calc(100% - 58px));
  gap: 6px;
  pointer-events: none;
  max-height: 40%;
  overflow: hidden;
}
.pra-toast {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 10px 28px rgba(12, 18, 16, .16);
  animation: toast-in .5s var(--ease);
}
.pra-toast-success {
  background: var(--soft);
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
}
.pra-toast-error {
  background: #fef2f2;
  border-color: color-mix(in srgb, var(--danger) 45%, var(--line));
}
.pra-toast-warning {
  background: #fff7ed;
  border-color: color-mix(in srgb, var(--warn) 45%, var(--line));
}
.pra-toast-wait {
  background: #eff6ff;
  border-color: color-mix(in srgb, #2563eb 35%, var(--line));
}
.pra-toast-body { display: flex; align-items: center; gap: 8px; padding: 7px 8px; }
.pra-toast-icon {
  display: grid;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  place-items: center;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
}
.pra-toast-icon svg { width: 9px; height: 9px; }
.pra-toast-icon.is-error { background: var(--danger); }
.pra-toast-icon.is-warning { background: var(--warn); }
.pra-toast-icon.is-wait {
  background: #2563eb;
  animation: spin .8s linear infinite;
}
.pra-toast-message {
  margin: 0;
  font-size: 8px;
  font-weight: 600;
  line-height: 1.35;
}
.btn.is-loading,
button.is-loading {
  opacity: 0.92;
  pointer-events: none;
  gap: 6px;
}
.btn.is-loading .spin,
button.is-loading .spin {
  width: 10px;
  height: 10px;
  border-width: 1.5px;
}
.print {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(247, 248, 247, .88);
  backdrop-filter: blur(2px);
  z-index: 20;
}
.print.on {
  display: grid;
  animation: print-backdrop .22s ease-out;
}
.print-stage {
  position: relative;
  display: grid;
  min-width: 170px;
  justify-items: center;
  padding-top: 26px;
}
.printer-mouth {
  position: relative;
  z-index: 2;
  width: 150px;
  height: 40px;
  border-radius: 13px 13px 8px 8px;
  background: linear-gradient(180deg, #234c3d 0%, #102e24 100%);
  box-shadow: 0 12px 24px rgba(12, 18, 16, .2), inset 0 1px 0 rgba(255, 255, 255, .12);
  animation: printer-arrive .38s var(--ease);
}
.printer-mouth span {
  position: absolute;
  right: 14px;
  bottom: 8px;
  left: 14px;
  height: 5px;
  border-radius: 999px;
  background: #071b14;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .5);
}
.print-sheet {
  position: relative;
  z-index: 1;
  width: 120px;
  margin-top: -5px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0 0 5px 5px;
  padding: 8px;
  text-align: center;
  box-shadow: 0 12px 24px rgba(12, 18, 16, .14);
  transform-origin: top center;
  animation: receipt-out .62s cubic-bezier(0.16, 1, 0.3, 1);
}
.print-cap {
  margin-top: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(12, 18, 16, .08);
  font-size: 8px;
  color: var(--muted);
  font-weight: 600;
}
.fade {
  position: absolute;
  inset: 0;
  z-index: 25;
  pointer-events: none;
  background: var(--page);
  opacity: 0;
  transition: opacity .22s ease;
}
.fade.on { opacity: 0.72; }
.scan { height: 1.5px; background: var(--ink); animation: scan 1s var(--ease); }
.modal-scrim {
  position: absolute;
  inset: 0;
  background: rgba(12, 18, 16, .28);
  display: grid;
  place-items: center;
  z-index: 8;
  opacity: 0;
  transition: opacity .28s ease;
  pointer-events: none;
}
.modal-scrim.show { opacity: 1; pointer-events: auto; }
.modal-card {
  width: min(92%, 280px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 12px 32px rgba(12, 18, 16, .16);
  transform: translateY(8px) scale(0.98);
  transition: transform .35s var(--ease);
}
.modal-scrim.show .modal-card { transform: none; }
.modal-card h4 { font-size: 12px; margin-bottom: 6px; }
.spin-row { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--muted); }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 9px;
}
.chip.on { background: var(--soft); border-color: rgba(0, 138, 75, .35); color: #0f3d2c; }
.list-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
}
.list-row.on {
  background: var(--soft);
  margin: 0 -6px;
  padding-left: 6px;
  padding-right: 6px;
  border-radius: 6px;
}
@keyframes blink { 50% { opacity: 0; } }
@keyframes bar { to { height: 100%; } }
@keyframes grow { to { transform: scaleY(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes status-pulse {
  50% { box-shadow: 0 0 0 5px rgba(0, 138, 75, 0); transform: scale(.92); }
}
@keyframes step-pop {
  from { opacity: .35; transform: translateY(2px); }
  to { opacity: 1; transform: none; }
}
@keyframes target-cue {
  from { outline-color: rgba(0, 138, 75, 0); box-shadow: 0 0 0 0 rgba(0, 138, 75, .18); }
  45% { outline-color: rgba(0, 138, 75, .42); box-shadow: 0 0 0 5px rgba(0, 138, 75, .08); }
  to { outline-color: rgba(0, 138, 75, .3); box-shadow: 0 0 0 0 rgba(0, 138, 75, 0); }
}
@keyframes pop {
  from { transform: scale(.9); opacity: 0; }
  to { opacity: 1; transform: none; }
}
@keyframes print-backdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes printer-arrive {
  from { opacity: .4; transform: translateY(-8px) scale(.96); }
  to { opacity: 1; transform: none; }
}
@keyframes receipt-out {
  from { clip-path: inset(0 0 100% 0); opacity: .3; transform: translateY(-28px) scaleY(.28); }
  to { clip-path: inset(0 0 0 0); opacity: 1; transform: none; }
}
@keyframes rip {
  0% { opacity: 0.85; transform: translate(-50%, -50%) scale(0.35); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.85); }
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
@keyframes scan { to { transform: translateY(36px); } }
@keyframes sheet-in {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
@keyframes beat-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cursor, .ripple, .bar, .barcode i, .stamp, .pra-toast, .aside, .print, .print-sheet, .printer-mouth, .demo-dot, .demo-step, .walk-target, .caret, .spin, .fade, .modal-scrim, .modal-card, .sheet.sheet-enter, .beat.on {
    animation: none !important;
    transition: none !important;
  }
  .aside.show, .stamp, .pra-toast, .modal-scrim.show, .beat.on, .sheet.sheet-enter, .print-sheet, .printer-mouth { opacity: 1; transform: none; clip-path: none; }
  .fade.on { opacity: 0; }
}

.walkthrough-paused .demo-dot {
  background: #d39d2f;
  box-shadow: 0 0 0 3px rgba(211, 157, 47, .14);
  animation: none;
}

.walkthrough-paused .cursor,
.walkthrough-paused .ripple {
  opacity: 0 !important;
}
