/* Vando app design system for the demo clips.
   Mirrors vando-wms docs/design-system.md: quiet chrome, hairlines, colour only
   for the main action (mint with an ink edge) and for status. No gradients, no
   glows, nothing scales or pulses. Shared by the desktop and phone clips. */

:root {
  --mint: #04f489;
  --ink: #121920;
  --g0: #f9fafb;
  --g1: #f3f4f6;
  --g2: #eceef0;
  --g3: #e4e5e7;
  --g4: #ced5dd;
  --g5: #8a929b;
  --g6: #5e646a;
  --g7: #42484f;
  --g8: #292e35;
  --track: #eef0f1;
  --good: #1f9d57;
  --good-tint: #e7f7ee;
  --good-text: #006e36;
  --warn: #ba7200;
  --warn-tint: #fef0e0;
  --warn-text: #854b00;
  --crit: #b9443c;
  --crit-tint: #fff2f0;
  --crit-text: #993a33;
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 8px;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html,
body {
  height: 100%;
}
body {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
  color: var(--ink);
  font-family: 'Manrope', system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
#fit {
  position: relative;
  display: flex;
  width: 100vw;
  height: 100vh;
  align-items: center;
  justify-content: center;
}
#stage {
  position: relative;
  overflow: hidden;
  transform-origin: center center;
}
.display {
  font-family: 'Bricolage Grotesque', 'Manrope', sans-serif;
  font-weight: 600;
  letter-spacing: -0.015em;
}

/* ── Frame ─────────────────────────────────────────────────────────────── */
.frame {
  display: flex;
  height: 100%;
  flex-direction: column;
  background: var(--g0);
}
.topbar {
  display: flex;
  height: 52px;
  flex: none;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 0 10px;
  border-bottom: 1px solid var(--g3);
  background: #fff;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand img {
  display: block;
  width: 36px;
  height: 36px;
}
.org {
  font-size: 15px;
  font-weight: 600;
}
.topacts {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--g7);
}
.topacts .ic {
  display: block;
  width: 19px;
  height: 19px;
}
.bell {
  position: relative;
  display: inline-flex;
}
.bell .dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border: 1.5px solid #fff;
  border-radius: 50%;
  background: var(--crit);
}
.body {
  display: flex;
  min-height: 0;
  flex: 1;
}

/* Rail: icon tile + caption, the current page carries the ink border. */
.rail {
  display: flex;
  width: 92px;
  flex: none;
  flex-direction: column;
  gap: 4px;
  padding: 16px 6px 8px;
}
.rail-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px 2px 6px;
  color: var(--g7);
  text-align: center;
}
.rail-icon {
  display: inline-flex;
  width: 44px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--r-lg);
}
.rail-icon svg {
  width: 20px;
  height: 20px;
}
.rail-cap {
  max-width: 100%;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.25;
  text-wrap: balance;
}
.rail-item[data-current] {
  color: var(--ink);
}
.rail-item[data-current] .rail-icon {
  border-color: var(--ink);
  background: #fff;
}
.rail-item[data-current] .rail-cap {
  font-weight: 600;
}
.rail-item[data-hover] .rail-icon {
  background: var(--g2);
  color: var(--ink);
}

/* The page: a white panel that scrolls on its own. */
.page {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  margin: 0 8px 8px 0;
  padding: 20px 24px;
  border: 1px solid var(--g3);
  border-radius: var(--r-lg);
  background: #fff;
}
.ptitle {
  font-size: 24px;
}
.psub {
  margin-top: 3px;
  color: var(--g6);
  font-size: 14px;
}
.phead {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}
.phead .acts {
  display: flex;
  margin-left: auto;
  align-items: center;
  gap: 10px;
}

/* ── Controls ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  height: 36px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: var(--r-md);
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition:
    background-color 150ms var(--ease),
    border-color 150ms var(--ease);
}
.btn svg {
  width: 16px;
  height: 16px;
}
.btn.primary {
  background: var(--mint);
}
.btn.quiet {
  border-color: transparent;
  color: var(--g6);
  font-weight: 500;
}
.btn.lg {
  height: 42px;
  font-size: 15px;
}
.btn.block {
  width: 100%;
}
.btn[data-press] {
  background: #03e07d;
}
.btn.quiet[data-press],
.btn:not(.primary)[data-press] {
  background: var(--g1);
}
.btn[data-disabled] {
  border-color: var(--g3);
  background: var(--g1);
  color: var(--g5);
}

.field {
  display: flex;
  height: 40px;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--g3);
  border-radius: var(--r-md);
  background: #fff;
  color: var(--g5);
  font-size: 14px;
}
.field svg {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--g5);
}
.field[data-filled] {
  color: var(--ink);
  font-weight: 500;
}
.field[data-focus] {
  border-color: var(--g7);
  box-shadow: 0 0 0 3px rgb(18 25 32 / 0.06);
}
.field .x {
  margin-left: auto;
  color: var(--g5);
  font-size: 16px;
}
.label {
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
}

/* A chosen filter reads as applied: ink border, grey fill, bold text. */
.applied {
  border-color: var(--ink);
  background: var(--g1);
  color: var(--ink);
  font-weight: 600;
}

.dropdown {
  position: absolute;
  z-index: 25;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  overflow: hidden;
  border: 1px solid var(--g3);
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow:
    0 1px 3px 0 rgb(0 0 0 / 0.1),
    0 4px 6px -1px rgb(0 0 0 / 0.1);
  animation: pop 160ms var(--ease);
}
.opt {
  padding: 11px 14px;
  border-bottom: 1px solid var(--g2);
  font-size: 14px;
  font-weight: 500;
}
.opt:last-child {
  border-bottom: 0;
}
.opt[data-hl] {
  background: var(--g1);
}

/* ── Data ──────────────────────────────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
thead th {
  padding: 0 10px 10px;
  border-bottom: 1px solid var(--g3);
  color: var(--g6);
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}
tbody td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--g2);
}
tbody tr[data-new] {
  animation: rowin 400ms var(--ease);
}
.pv b {
  font-weight: 600;
}
.pv span {
  color: var(--g5);
}
.qty {
  font-weight: 600;
}
.qty em {
  color: var(--g5);
  font-style: normal;
  font-weight: 400;
}
.qty[data-up] {
  padding: 3px 6px;
  border-radius: var(--r-sm);
  margin-left: -6px;
  background: var(--good-tint);
}
.tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--r-sm);
  background: var(--g1);
  color: var(--g8);
  font-size: 12px;
  font-weight: 600;
}
.state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
}
.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
}
.dot[data-s='good'] {
  background: var(--mint);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.dot[data-s='warn'] {
  background: var(--warn);
}
.dot[data-s='crit'] {
  background: var(--crit);
}
.dot[data-s='neutral'] {
  background: var(--g5);
}
.pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 600;
}
.pill[data-s='good'] {
  background: var(--good-tint);
  color: var(--good-text);
}
.pill[data-s='warn'] {
  background: var(--warn-tint);
  color: var(--warn-text);
}
.pill[data-s='crit'] {
  background: var(--crit-tint);
  color: var(--crit-text);
}
.icon-tile {
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex: none;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--g3);
  border-radius: var(--r-md);
  background: var(--track);
}
.icon-tile svg {
  width: 17px;
  height: 17px;
}
.thumb {
  width: 32px;
  height: 32px;
  border-radius: var(--r-md);
  background: var(--track);
}

/* Cards and list rows */
.card {
  padding: 16px;
  border: 1px solid var(--g3);
  border-radius: var(--r-lg);
  background: #fff;
}
.card h2 {
  font-size: 15px;
  font-weight: 600;
}
.cardhead {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.cardhead .r {
  margin-left: auto;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--g2);
}
.row:last-child {
  border-bottom: 0;
}
.row .nm {
  font-size: 14px;
  font-weight: 600;
}
.row .meta {
  margin-top: 2px;
  color: var(--g6);
  font-size: 12px;
}
.row .right {
  display: flex;
  margin-left: auto;
  align-items: center;
  gap: 8px;
  flex: none;
}
.group {
  padding: 9px 0 7px;
  color: var(--g6);
  font-size: 12px;
  font-weight: 600;
}

/* Quantity stepper: − [n] + */
.stepper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.stepper .sb {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  border-radius: var(--r-md);
  background: #fff;
  font-size: 15px;
  font-weight: 600;
}
.stepper .sn {
  min-width: 34px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
}
.stepper .sb[data-press] {
  background: var(--g1);
}
.figure {
  display: inline-flex;
  height: 26px;
  align-items: center;
  padding: 0 9px;
  border: 1px solid var(--ink);
  border-radius: var(--r-sm);
  background: var(--mint);
  font-size: 13px;
  font-weight: 600;
}
.meter {
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--track);
}
.meter span {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--g5);
}

/* ── Dialogs, sheets, toasts ───────────────────────────────────────────── */
.ovl {
  position: absolute;
  z-index: 30;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(18 25 32 / 0.32);
  animation: fade 220ms var(--ease);
}
.modal {
  display: flex;
  max-height: 86%;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow:
    0 1px 3px 0 rgb(0 0 0 / 0.1),
    0 8px 10px -1px rgb(0 0 0 / 0.1);
  animation: modalin 260ms var(--ease);
}
.modal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px 0;
}
.modal-head h2 {
  font-size: 18px;
  font-weight: 600;
}
.modal-head .x {
  margin-left: auto;
  color: var(--g6);
  font-size: 17px;
}
.modal-body {
  overflow: hidden;
  padding: 16px 20px;
}
.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--g3);
}
.modal-foot .l {
  margin-right: auto;
}

/* Step row: done = ink check on white, current = mint with the ink edge. */
.steps {
  position: relative;
  display: flex;
  margin: 4px auto 20px;
}
.steps .line {
  position: absolute;
  z-index: 0;
  top: 14px;
  right: 16.66%;
  left: 16.66%;
  height: 1px;
  background: var(--g3);
}
.steps .prog {
  position: absolute;
  z-index: 1;
  top: 14px;
  left: 16.66%;
  height: 1px;
  background: var(--ink);
  transition: width 400ms var(--ease);
}
.step {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}
.step .c {
  display: flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--g4);
  border-radius: 50%;
  background: #fff;
  color: var(--g5);
  font-size: 13px;
  font-weight: 600;
}
.step .l {
  color: var(--g5);
  font-size: 13px;
  font-weight: 500;
}
.step[data-done] .c {
  border-color: var(--ink);
  color: var(--ink);
}
.step[data-now] .c {
  border-color: var(--ink);
  background: var(--mint);
  color: var(--ink);
}
.step[data-done] .l,
.step[data-now] .l {
  color: var(--ink);
  font-weight: 600;
}

.dropzone {
  padding: 28px 20px;
  border: 1px dashed var(--g4);
  border-radius: var(--r-lg);
  background: var(--g0);
  text-align: center;
}
.dropzone[data-hot] {
  border-color: var(--ink);
}
.dropzone h3 {
  font-size: 15px;
  font-weight: 600;
}
.dropzone p {
  margin-top: 5px;
  color: var(--g6);
  font-size: 13px;
}
.stat-tiles {
  display: flex;
  gap: 12px;
}
.stat-tile {
  flex: 1;
  padding: 14px 0;
  border: 1px solid var(--g3);
  border-radius: var(--r-lg);
  text-align: center;
}
.stat-tile .n {
  font-size: 26px;
}
.stat-tile .l {
  margin-top: 2px;
  color: var(--g6);
  font-size: 13px;
}
.note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
}
.note svg {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 1px;
}
.note[data-s='warn'] svg {
  color: var(--warn);
}
.note[data-s='good'] svg {
  color: var(--good);
}

/* Toast: white card, ink border, hard offset shadow, status icon tile. */
.toast {
  position: absolute;
  z-index: 50;
  top: 62px;
  right: 18px;
  display: flex;
  max-width: 330px;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 15px 13px 13px;
  border: 1px solid var(--ink);
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: 3px 3px 0 0 var(--ink);
  animation: toastin 260ms var(--ease);
}
.toast .tile {
  display: inline-flex;
  width: 32px;
  height: 32px;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  background: var(--good-tint);
  color: var(--good-text);
}
.toast .tile svg {
  width: 17px;
  height: 17px;
}
.toast b {
  font-size: 14px;
  font-weight: 600;
}
.toast p {
  margin-top: 2px;
  color: var(--g6);
  font-size: 13px;
  line-height: 1.4;
}
.toast .lines {
  margin-top: 6px;
  font-size: 13px;
}
.toast .lines div {
  color: var(--ink);
}

/* ── Phone ─────────────────────────────────────────────────────────────── */
.phone {
  display: flex;
  height: 100%;
  flex-direction: column;
  background: var(--g0);
}
.statusbar {
  display: flex;
  height: 44px;
  flex: none;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 22px 6px;
  font-size: 14px;
  font-weight: 600;
}
.sb-icons {
  display: flex;
  align-items: center;
  gap: 5px;
}
.sb-icons i {
  display: block;
  background: var(--ink);
}
.sb-icons .sig {
  width: 16px;
  height: 10px;
  border-radius: 1px;
}
.sb-icons .wifi {
  width: 14px;
  height: 10px;
  border-radius: 7px 7px 0 0;
  background: transparent;
  border: 2px solid var(--ink);
  border-bottom: 0;
}
.sb-icons .bat {
  position: relative;
  width: 22px;
  height: 11px;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  background: transparent;
}
.sb-icons .bat::before {
  position: absolute;
  content: '';
  inset: 2px;
  width: 65%;
  border-radius: 1px;
  background: var(--ink);
}
.appbar {
  display: flex;
  height: 50px;
  flex: none;
  align-items: center;
  padding: 0 14px 0 8px;
  border-bottom: 1px solid var(--g3);
  background: #fff;
}
.appbar .brand img {
  width: 32px;
  height: 32px;
}
.ppage {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  padding: 14px 15px 0;
}
.ppage .ptitle {
  font-size: 21px;
}
.pcard {
  padding: 12px 13px;
  border: 1px solid var(--g3);
  border-radius: var(--r-lg);
  background: #fff;
}
.plist {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 9px;
  overflow: hidden;
}
/* Sticky action bar: appears once the first item is in. */
.actionbar {
  position: absolute;
  right: 12px;
  bottom: 74px;
  left: 12px;
  z-index: 35;
  padding: 10px 12px;
  border: 1px solid var(--g3);
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: 0 -1px 3px 0 rgb(0 0 0 / 0.08);
  animation: barin 260ms var(--ease);
}
.actionbar .cap {
  margin-bottom: 8px;
  color: var(--g6);
  font-size: 12px;
}
.tabbar {
  display: flex;
  height: 66px;
  flex: none;
  align-items: flex-start;
  justify-content: space-around;
  padding-top: 6px;
  border-top: 1px solid var(--g3);
  background: #fff;
}
.tab {
  display: flex;
  width: 62px;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--g7);
}
.tab .rail-icon {
  width: 40px;
  height: 30px;
}
.tab .rail-icon svg {
  width: 18px;
  height: 18px;
}
.tab .rail-cap {
  font-size: 10px;
}
.tab[data-current] {
  color: var(--ink);
}
.tab[data-current] .rail-icon {
  border-color: var(--ink);
  background: #fff;
}
.tab[data-current] .rail-cap {
  font-weight: 600;
}
.sheet {
  position: absolute;
  z-index: 40;
  right: 0;
  bottom: 0;
  left: 0;
  max-height: 84%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px 14px 0 0;
  background: #fff;
  box-shadow: 0 -1px 3px 0 rgb(0 0 0 / 0.12);
  animation: sheetin 320ms var(--ease);
}
.sheet .grip {
  width: 38px;
  height: 4px;
  margin: 8px auto 2px;
  border-radius: 2px;
  background: var(--g3);
}
.scan {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: #0b0f14;
}
.scan .view {
  position: relative;
  display: flex;
  height: 210px;
  align-items: center;
  justify-content: center;
  background: #161c23;
}
.scan .code {
  display: flex;
  height: 74px;
  align-items: center;
  gap: 4px;
}
.scan .code i {
  display: block;
  height: 100%;
  border-radius: 1px;
  background: #e8ebee;
}
.scan .line {
  position: absolute;
  right: 16px;
  left: 16px;
  height: 2px;
  background: var(--mint);
  animation: sweep 2.4s ease-in-out infinite;
}

/* ── Cursor ────────────────────────────────────────────────────────────── */
#cursor {
  position: absolute;
  z-index: 60;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgb(18 25 32 / 0.3));
  will-change: transform;
}
#touch {
  position: absolute;
  z-index: 60;
  top: 0;
  left: 0;
  width: 30px;
  height: 30px;
  border: 1.5px solid rgb(18 25 32 / 0.35);
  border-radius: 50%;
  background: rgb(18 25 32 / 0.12);
  pointer-events: none;
  transform: translate(-50%, -50%);
  will-change: transform;
}
#ping {
  position: absolute;
  z-index: 59;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.4);
}
#ping[data-go] {
  animation: ping 460ms ease-out;
}

@keyframes ping {
  0% {
    opacity: 0.55;
    transform: translate(-50%, -50%) scale(0.4);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.4);
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}
@keyframes modalin {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
@keyframes sheetin {
  from {
    transform: translateY(100%);
  }
}
@keyframes toastin {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}
@keyframes barin {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
@keyframes rowin {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
@keyframes sweep {
  0% {
    top: 18%;
  }
  50% {
    top: 78%;
  }
  100% {
    top: 18%;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
  }
}
