/* =====================================================================
   Workshop POS — design system
   Light frame on a grey page, white rounded cards, one blue accent (--green is the accent token; --ok is success green).
   ===================================================================== */
:root {
  --page: #dddee2;
  --frame: #f0f0f1;
  --card: #ffffff;
  --soft: #f4f4f5;
  --soft-2: #eaeaec;
  --line: #ececee;
  --text: #121212;
  --text-2: #4b4b4f;
  --muted: #8d8d93;
  --green: #1f63d6;
  --green-dark: #174fb0;
  --green-soft: #e8f0fd;
  --green-bar: #a9c3f2;
  --green-bar-2: #98b6ee;
  --ok: #17834f;
  --ok-soft: #e7f3ec;
  --red: #e5484d;
  --red-soft: #fdecec;
  --amber: #c27a06;
  --amber-soft: #fdf3de;

  --r-frame: 36px;
  --r-card: 26px;
  --r-inner: 20px;
  --r-field: 14px;
  --gap: 20px;
  --nav-h: 66px;

  --font: "Urbanist", "Noto Sans Myanmar", "Pyidaungsu", "Myanmar Text", system-ui, -apple-system, sans-serif;
  font-family: var(--font);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--page);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; }
.ic { width: 20px; height: 20px; flex-shrink: 0; display: block; }

/* ================================================================ frame */
.frame {
  max-width: 1440px;
  margin: 24px auto;
  background: var(--frame);
  border-radius: var(--r-frame);
  padding: 22px 26px 34px;
  min-height: calc(100vh - 48px);
}

/* top bar */
.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  background: var(--card);
  border-radius: 999px;
  padding: 10px 12px 10px 16px;
  margin-bottom: 30px;
}
.logo { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo-mark {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--green); color: #fff;
  display: grid; place-items: center; flex-shrink: 0;
}
.logo-img { height: 52px; width: auto; flex-shrink: 0; mix-blend-mode: multiply; }
.logo-text { font-weight: 700; font-size: 18px; color: var(--green); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em; }

.tabs {
  display: flex; gap: 2px;
  background: var(--soft); border-radius: 999px; padding: 5px;
}
.tabs a {
  padding: 9px 18px; border-radius: 999px;
  color: var(--text-2); white-space: nowrap; transition: background .15s, color .15s;
}
.tabs a:hover { color: var(--text); }
.tabs a.active { background: var(--card); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.06); }

.top-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.circle-btn {
  position: relative;
  width: 46px; height: 46px; border-radius: 50%;
  border: 0; background: var(--soft);
  display: grid; place-items: center; cursor: pointer; flex-shrink: 0;
  transition: background .15s;
}
.circle-btn:hover { background: var(--soft-2); }
.circle-btn.white { background: var(--card); border: 1px solid var(--line); }
.circle-btn.white:hover { background: var(--soft); }
.circle-btn.sm { width: 38px; height: 38px; }
.circle-btn.sm .ic { width: 17px; height: 17px; }
.circle-btn.xs { width: 32px; height: 32px; }
.circle-btn.xs .ic { width: 15px; height: 15px; }
.circle-btn .ping {
  position: absolute; top: 8px; right: 9px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700;
  display: grid; place-items: center; border: 2px solid var(--soft); line-height: 1;
}
.profile { display: flex; align-items: center; gap: 4px; padding: 0 4px 0 0; color: var(--muted); border: 0; background: none; cursor: pointer; }
.avatar-lg {
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, #3a7be6, #1749a3); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 15px; letter-spacing: .02em;
}

/* body: rail + content */
.body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.rail {
  position: sticky; top: 24px;
  display: flex; flex-direction: column; gap: 14px;
  margin-top: 84px;
}
.rail-group {
  background: var(--card); border-radius: 999px; padding: 8px;
  display: flex; flex-direction: column; gap: 6px; align-items: center;
}
.rail-group.bottom { margin-top: 40px; }
.rail a, .rail button {
  width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent;
  display: grid; place-items: center; cursor: pointer; color: var(--text-2);
  transition: background .15s, color .15s;
}
.rail a:hover, .rail button:hover { background: var(--soft); color: var(--text); }
.rail .active { background: var(--green) !important; color: #fff !important; }
.rail .ic { width: 19px; height: 19px; }

.bottom-nav { display: none; }

/* ============================================================ page head */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 26px; min-height: 58px;
}
.page-head h1 { font-size: 36px; font-weight: 500; letter-spacing: -.025em; line-height: 1.3; }
.page-head h1 .soft { color: var(--muted); }
.page-head .lede { color: var(--muted); margin-top: 2px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ================================================================= cards */
.card {
  background: var(--card);
  border-radius: var(--r-card);
  padding: 22px 24px;
  min-width: 0;
}
.card.flush { padding: 0; overflow: hidden; }
.card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 18px;
}
.card-title { font-size: 15px; font-weight: 600; line-height: 1.4; }
.card-sub { color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.lead { display: flex; align-items: center; gap: 12px; min-width: 0; }
.icon-chip {
  width: 42px; height: 42px; border-radius: 50%; background: var(--soft);
  display: grid; place-items: center; flex-shrink: 0; color: var(--text);
}
.icon-chip.green { background: var(--green-soft); color: var(--green); }
.icon-chip.red { background: var(--red-soft); color: var(--red); }
.icon-chip.amber { background: var(--amber-soft); color: var(--amber); }

.grid { display: grid; gap: var(--gap); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split-5-7 { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.split-4-8 { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
.stack { display: grid; gap: var(--gap); align-content: start; }
.mb { margin-bottom: var(--gap); }

/* numbers */
.num-xl, .num-lg, .num-md {
  font-weight: 500; letter-spacing: -.03em; line-height: 1.1;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.num-xl { font-size: 40px; }
.num-lg { font-size: 32px; }
.num-md { font-size: 24px; letter-spacing: -.02em; }
.num-xl small, .num-lg small, .num-md small { color: var(--muted); font-size: .55em; font-weight: 500; margin-left: 5px; letter-spacing: 0; }

/* stat card */
.stat { background: var(--card); border-radius: var(--r-card); padding: 18px 20px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.stat .s-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stat .s-label { color: var(--muted); font-size: 13px; }
.stat .num-md { margin-top: 2px; }

/* green "card" (like a bank card) */
.money-card {
  background: var(--green); color: #fff;
  border-radius: var(--r-inner); padding: 18px 20px;
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; min-height: 160px;
}
.money-card::before, .money-card::after {
  content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.06);
}
.money-card::before { width: 180px; height: 180px; right: -60px; top: -80px; }
.money-card::after { width: 120px; height: 120px; right: 30px; bottom: -70px; }
.money-card .mc-top { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-style: italic; letter-spacing: .04em; font-size: 15px; }
.money-card .mc-label { opacity: .75; font-size: 12.5px; margin-top: 12px; }
.money-card .num-xl { color: #fff; font-size: 34px; margin-top: 2px; }
.money-card .num-xl small { color: rgba(255,255,255,.7); }
.money-card .mc-foot { display: flex; justify-content: space-between; margin-top: auto; padding-top: 14px; font-size: 12.5px; opacity: .9; position: relative; z-index: 1; }

/* ================================================================ pills */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 999px;
  border: 0; background: var(--card);
  cursor: pointer; white-space: nowrap; font-weight: 500;
  transition: background .15s, transform .05s;
}
.pill:active { transform: scale(.98); }
.pill .ic { width: 18px; height: 18px; }
.pill:hover { background: var(--soft); }
.pill.soft { background: var(--soft); }
.pill.soft:hover { background: var(--soft-2); }
.pill.green { background: var(--green); color: #fff; }
.pill.green:hover { background: var(--green-dark); }
.pill.dark { background: var(--text); color: #fff; }
.pill.dark:hover { background: #2b2b2b; }
.pill.danger { background: var(--red-soft); color: var(--red); }
.pill.sm { height: 36px; padding: 0 14px; font-size: 13.5px; }
.pill.block { width: 100%; height: 52px; font-size: 15px; }
.pill:disabled { opacity: .5; cursor: not-allowed; }

.segmented { display: inline-flex; background: var(--soft); border-radius: 999px; padding: 4px; gap: 2px; }
.segmented button {
  border: 0; background: transparent; padding: 8px 18px; border-radius: 999px;
  cursor: pointer; color: var(--text-2); font-size: 13.5px; white-space: nowrap; transition: background .15s;
}
.segmented button:hover { color: var(--text); }
.segmented button.active { background: var(--green); color: #fff; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--soft); color: var(--text-2); white-space: nowrap;
}
.badge.green { background: var(--ok); color: #fff; }
.badge.green-soft { background: var(--ok-soft); color: var(--ok); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.status { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3ccf7f; }
.status.amber::before { background: #f0a92b; }
.status.red::before { background: var(--red); }

.muted { color: var(--muted); }
.text-green { color: var(--ok); }
.text-red { color: var(--red); }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .9em; letter-spacing: -.01em; }
.small { font-size: 12.5px; }
.empty { text-align: center; color: var(--muted); padding: 34px 12px; }
.empty .ic { width: 28px; height: 28px; margin: 0 auto 8px; opacity: .5; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ================================================================ forms */
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
input, select, textarea {
  width: 100%; height: 46px; padding: 0 16px;
  border: 1px solid transparent; border-radius: var(--r-field);
  background: var(--soft); outline: none;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
textarea { height: auto; padding: 12px 16px; }
input:focus, select:focus, textarea:focus { background: #fff; border-color: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
input::placeholder { color: #a8a8ae; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--green); }
input[type=date] { cursor: pointer; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; min-width: 0; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toolbar input, .toolbar select { width: auto; }
.toolbar .grow { flex: 1; min-width: 200px; }
.date-pill { display: inline-flex; align-items: center; gap: 8px; background: var(--card); border-radius: 999px; height: 46px; padding: 0 8px 0 18px; }
.date-pill input { background: transparent; height: 40px; padding: 0 6px; width: 132px; border: 0; box-shadow: none !important; }
.date-pill .sep { color: var(--muted); }

.search {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border-radius: 999px; padding: 0 6px 0 18px; height: 52px;
  border: 1px solid transparent; transition: border-color .15s, box-shadow .15s;
}
.search.soft { background: var(--soft); height: 46px; }
.search:focus-within { border-color: var(--green); box-shadow: 0 0 0 4px var(--green-soft); background: #fff; }
.search input { border: 0; background: transparent !important; height: 100%; padding: 0; box-shadow: none !important; }
.search > .ic { color: var(--muted); }
.search .hint { font-size: 12px; color: var(--green); background: var(--green-soft); border-radius: 999px; height: 36px; padding: 0 14px; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.search .hint .ic { width: 16px; height: 16px; }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; cursor: pointer; }
.switch input { width: 44px; height: 26px; appearance: none; background: #d4d4d8; border-radius: 999px; position: relative; cursor: pointer; border: 0; padding: 0; transition: background .2s; flex-shrink: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked { background: var(--green); }
.switch input:checked::after { transform: translateX(18px); }
.switch input:focus { box-shadow: none; }

/* =============================================================== tables */
.table-wrap { overflow-x: auto; margin: 0 -10px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th { font-size: 12.5px; color: var(--muted); font-weight: 500; text-align: left; padding: 6px 12px 10px; white-space: nowrap; }
td { padding: 11px 12px; vertical-align: middle; }
tbody tr { transition: background .1s; }
tbody tr:hover td { background: var(--soft); }
tbody tr td:first-child { border-radius: 16px 0 0 16px; }
tbody tr td:last-child { border-radius: 0 16px 16px 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.nowrap { white-space: nowrap; }
tr.clickable { cursor: pointer; }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-weight: 600; font-size: 13px;
  background: var(--soft); color: var(--text-2); border: 1px solid var(--line);
}
.avatar .ic { width: 16px; height: 16px; }
.avatar.green { background: var(--green-soft); color: var(--green); border-color: transparent; }
.avatar.red { background: var(--red-soft); color: var(--red); border-color: transparent; }
.who .w-name { font-weight: 500; line-height: 1.35; }
.who .w-sub { font-size: 11.5px; color: var(--green); line-height: 1.3; }
.row-actions { display: inline-flex; gap: 4px; }

/* ================================================================ chips */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  border: 0; background: var(--card);
  height: 38px; padding: 0 16px; border-radius: 999px; cursor: pointer; white-space: nowrap; font-size: 13.5px;
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; color: var(--text-2);
  transition: background .15s, color .15s;
}
.chip:hover { color: var(--text); }
.chip.on-soft { background: var(--soft); }
.chip.active { background: var(--text); color: #fff; }
.chip .ic { width: 15px; height: 15px; }

/* ============================================================ dashboard */
.dash {
  display: grid; gap: var(--gap);
  grid-template-columns: minmax(0, 3fr) minmax(0, 5fr) minmax(0, 3.6fr);
  grid-template-areas:
    "card chart bal"
    "week chart side"
    "hist hist side";
}
.a-card { grid-area: card; } .a-week { grid-area: week; } .a-chart { grid-area: chart; }
.a-bal { grid-area: bal; } .a-side { grid-area: side; } .a-hist { grid-area: hist; }
.week-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; }
.bal-card { padding: 22px 0 20px; display: flex; flex-direction: column; overflow: hidden; }
.bal-card .card-head { padding: 0 22px; margin-bottom: 8px; }
.bal-center { text-align: center; }
.area-chart { width: 100%; height: 104px; display: block; margin-top: 8px; }
.bal-btns { display: flex; justify-content: center; margin-top: -22px; position: relative; }
.bal-btns .wrap { background: var(--card); border-radius: 999px; padding: 4px; display: flex; gap: 2px; box-shadow: 0 6px 20px rgba(0,0,0,.06); }
.bal-btns .pill { height: 40px; }

.inset { background: var(--soft); border-radius: var(--r-inner); padding: 16px 18px; }
.faces { display: flex; align-items: center; margin-top: 14px; }
.faces .face {
  width: 42px; height: 42px; border-radius: 50%; border: 3px solid var(--soft);
  display: grid; place-items: center; font-weight: 600; font-size: 13px; margin-left: -8px;
  background: #fff; color: var(--text-2);
}
.faces .face:first-child { margin-left: 0; }
.faces .face.more { background: var(--green); color: #fff; width: 46px; height: 46px; }
.low-list { display: grid; gap: 6px; margin-top: 12px; }
.low-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--card); border-radius: 14px; padding: 8px 10px 8px 14px; font-size: 13.5px; }

/* bar chart */
.bars { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; height: 280px; }
.bars .y { display: flex; flex-direction: column-reverse; justify-content: space-between; font-size: 12px; color: var(--muted); padding: 34px 0 28px; line-height: 0; text-align: right; }
.bars .plot { position: relative; display: flex; align-items: flex-end; gap: 14px; padding: 34px 0 28px; }
.bars .grid-lines { position: absolute; inset: 34px 0 28px 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.bars .grid-lines i { border-top: 1px dashed #e3e3e6; }
.bar-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; min-width: 0; z-index: 1; }
.bar {
  width: 100%; max-width: 64px; border-radius: 999px; min-height: 10px;
  background: repeating-linear-gradient(135deg, var(--green-bar) 0 6px, var(--green-bar-2) 6px 12px);
  position: relative; transition: filter .15s;
}
.bar-col:hover .bar { filter: brightness(.96); }
.bar.hi { background: repeating-linear-gradient(135deg, #1f63d6 0 6px, #1a55ba 6px 12px); }
.bar.hi::before {
  content: ""; position: absolute; top: 5px; left: 50%; transform: translateX(-50%);
  width: 16px; height: 16px; border-radius: 50%; background: var(--green); border: 3px solid #fff; box-sizing: border-box;
}
.bar .tip {
  position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  background: var(--green); color: #fff; font-size: 11.5px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.bar .tip::after { content: ""; position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%) rotate(45deg); width: 8px; height: 8px; background: inherit; }
.bar:not(.hi) .tip { display: none; background: var(--text); }
.bar-col:hover .bar:not(.hi) .tip { display: block; }
.bar-col .x { position: absolute; bottom: -28px; font-size: 12px; color: var(--muted); white-space: nowrap; text-transform: uppercase; }

/* ============================================================== items */
.items-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: var(--gap); align-items: start; }
.tree { list-style: none; margin: 0; padding: 0; }
.tree ul { list-style: none; margin: 0 0 0 20px; padding-left: 10px; border-left: 1px dashed #dadade; }
.tree-node {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px 9px 12px; border-radius: 14px; cursor: pointer; margin-bottom: 2px; color: var(--text-2);
  transition: background .1s;
}
.tree-node:hover { background: var(--soft); color: var(--text); }
.tree-node.active { background: var(--green-soft); color: var(--green); font-weight: 600; }
.tree-node .ic { width: 17px; height: 17px; }
.tree-node .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-node .count { font-size: 11.5px; color: var(--muted); background: var(--soft); border-radius: 999px; padding: 0 8px; line-height: 20px; }
.tree-node.active .count { background: #fff; color: var(--green); }
.tree-node .acts { display: none; gap: 2px; }
.tree-node:hover .acts { display: flex; }
.tree-node:hover .acts + .count { display: none; }
.tree-node .acts button { border: 0; background: #fff; border-radius: 50%; width: 26px; height: 26px; display: grid; place-items: center; cursor: pointer; color: var(--text); }
.tree-node .acts button:hover { background: var(--green); color: #fff; }
.tree-node .acts .ic { width: 13px; height: 13px; }
.item-cards { display: none; }

/* ================================================================ POS */
.pos-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 400px); gap: var(--gap); align-items: start; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-top: 16px; }
.product {
  background: var(--card); border: 0; border-radius: var(--r-inner);
  padding: 16px; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 2px; min-height: 148px;
  box-shadow: inset 0 0 0 1.5px transparent; transition: box-shadow .15s, transform .1s;
}
.product:hover { box-shadow: inset 0 0 0 1.5px var(--green); }
.product:active { transform: scale(.98); }
.product .p-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 6px; }
.product .p-code { font-size: 11px; color: var(--muted); }
.product .p-name { font-weight: 600; line-height: 1.45; }
.product .p-cat { font-size: 12px; color: var(--muted); }
.product .p-price { margin-top: auto; padding-top: 10px; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.product .p-price small { color: var(--muted); font-size: 12px; font-weight: 500; margin-left: 3px; }
.product.out { opacity: .45; cursor: not-allowed; }

/* ဘောက်ချာကတ် — screen အမြင့်အတိုင်း၊ အလယ်ပိုင်းပဲ scroll၊ စုစုပေါင်း+သိမ်းမည် အမြဲမြင်ရ */
.cart {
  position: sticky; top: 24px; padding: 0; overflow: hidden;
  display: flex; flex-direction: column; max-height: calc(100vh - 48px);
}
.cart-top { flex-shrink: 0; padding: 22px 24px 0; }
.cart-top .card-head { margin-bottom: 12px; }
.cart-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 24px 18px; }
.cart-foot {
  flex-shrink: 0; padding: 14px 24px 20px; background: var(--card);
  border-top: 1px solid var(--line); box-shadow: 0 -10px 24px rgba(0, 0, 0, .04);
}
.sum-parts { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 13px; color: var(--muted); }
.sum-parts b { color: var(--text-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 6px 0 12px; font-size: 24px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.cart-lines { margin: 0 -6px; padding: 0 6px; }
.cart-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 12px 0; border-bottom: 1px dashed var(--line); align-items: center; }
.cart-line .cl-name { font-weight: 500; line-height: 1.4; }
.cart-line .cl-ctrl { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.cart-line .cl-ctrl input { width: 92px; height: 34px; padding: 0 10px; text-align: right; border-radius: 10px; color: var(--text); }
.qty { display: flex; align-items: center; background: var(--soft); border-radius: 999px; color: var(--text); }
.qty button { border: 0; background: none; width: 32px; height: 32px; cursor: pointer; font-size: 16px; border-radius: 50%; }
.qty button:hover { background: var(--soft-2); }
.qty span { min-width: 20px; text-align: center; font-weight: 600; }
.totals { margin-top: 16px; background: var(--soft); border-radius: var(--r-inner); padding: 14px 16px; }
.totals .t-row { display: flex; justify-content: space-between; padding: 2px 0; color: var(--text-2); font-variant-numeric: tabular-nums; }
.totals .t-row.grand { color: var(--text); font-size: 22px; font-weight: 600; border-top: 1px dashed #d6d6da; margin-top: 8px; padding-top: 10px; letter-spacing: -.01em; }
.cart-fab, .cart-close { display: none !important; }

/* ============================================================== labels */
.pick-list { max-height: 540px; overflow-y: auto; margin: 0 -10px; }
.pick { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; }
.pick:hover { background: var(--soft); }
.pick .pk-main { flex: 1; min-width: 0; }
.queue-line { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.queue-line .q-name { flex: 1; min-width: 0; }
.queue-line input { width: 72px; height: 36px; text-align: center; padding: 0 6px; border-radius: 10px; }
.preview { background: var(--soft); border-radius: var(--r-inner); padding: 18px; display: flex; flex-wrap: wrap; gap: 12px; max-height: 440px; overflow: auto; align-content: flex-start; }
.preview .label { box-shadow: 0 2px 8px rgba(0,0,0,.08); border-radius: 4px; }

.label {
  width: 40mm; height: 30mm; padding: 1.6mm 2mm 1.2mm; background: #fff; color: #000;
  display: flex; flex-direction: column; overflow: hidden; font-family: Arial, "Noto Sans Myanmar", "Myanmar Text", sans-serif;
  break-inside: avoid; flex-shrink: 0;
}
.label .l-head { display: flex; align-items: center; justify-content: center; gap: 1.2mm; min-width: 0; }
.label .l-logo { height: 4.6mm; width: auto; flex-shrink: 0; }
.label .l-shop { font-size: 5.5pt; line-height: 1.2; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.label.with-logo .l-name { -webkit-line-clamp: 1; }
.label.with-logo .barcode { height: 7.5mm; }
.label .l-name { font-size: 7.5pt; font-weight: 700; line-height: 1.25; text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.label .barcode { width: 100%; height: 8.5mm; display: block; margin-top: auto; fill: #000; }
.label .l-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 2mm; line-height: 1.2; }
.label .l-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 6.5pt; }
.label .l-price { font-size: 8.5pt; font-weight: 700; white-space: nowrap; }
.label.s50 { width: 50mm; }
.label.s50 .l-name { font-size: 8.5pt; }
.label.s50 .barcode { height: 9mm; }
.label.a4 { width: 70mm; height: 37mm; padding: 3mm 4mm 2mm; }
.label.a4 .l-shop { font-size: 7pt; }
.label.a4 .l-name { font-size: 9.5pt; }
.label.a4 .barcode { height: 11mm; }
.label.a4 .l-logo { height: 7mm; }
.label.a4.with-logo .l-name { -webkit-line-clamp: 2; }
.label.a4.with-logo .barcode { height: 10mm; }
.label.a4 .l-code { font-size: 8pt; }
.label.a4 .l-price { font-size: 11pt; }
.sheet { display: grid; grid-template-columns: repeat(3, 70mm); }

/* ============================================================= receipt */
.receipt { font-size: 13.5px; max-width: 360px; margin: 0 auto; background: var(--soft); border-radius: var(--r-inner); padding: 18px; }
.receipt .r-head { text-align: center; border-bottom: 1px dashed #c8c8cc; padding-bottom: 10px; margin-bottom: 10px; }
.receipt .r-logo { display: block; width: 62%; max-width: 220px; margin: 0 auto 6px; mix-blend-mode: multiply; }
.receipt .r-head h2 { font-size: 17px; font-weight: 700; }
.receipt .r-meta { display: grid; gap: 1px; margin-bottom: 8px; }
.receipt table td, .receipt table th { padding: 4px 2px; background: none !important; border-radius: 0 !important; }
.receipt .r-total { border-top: 1px dashed #c8c8cc; margin-top: 8px; padding-top: 8px; }
.receipt .r-total .t-row { display: flex; justify-content: space-between; }
.receipt .r-total .grand { font-weight: 700; font-size: 16px; margin-top: 4px; }
.receipt .r-foot { text-align: center; margin-top: 12px; }

/* =============================================================== modal */
.modal {
  position: fixed; inset: 0; background: rgba(18, 18, 18, .4); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px;
}
.modal[hidden] { display: none; }
.modal-box {
  background: var(--card); border-radius: 30px; width: 100%; max-width: 540px;
  max-height: 92vh; overflow-y: auto; padding: 24px 26px;
  box-shadow: 0 24px 60px rgba(0,0,0,.18);
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.modal-head h3 { font-size: 19px; font-weight: 600; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; flex-wrap: wrap; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: var(--text); color: #fff; padding: 12px 22px; border-radius: 999px; z-index: 60;
  box-shadow: 0 12px 30px rgba(0,0,0,.2); max-width: calc(100% - 32px); text-align: center;
}
.toast.error { background: var(--red); }

#print-area { display: none; }

/* ========================================================== responsive */
@media (max-width: 1360px) {
  .tabs a { padding: 9px 13px; }
}
@media (max-width: 1180px) {
  .frame { margin: 0; border-radius: 0; min-height: 100vh; }
  .dash { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "card bal" "week bal" "chart chart" "hist side"; }
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { grid-template-columns: auto 1fr auto; }
  .tabs { justify-self: center; }
  .logo-text { display: none; }
}
@media (max-width: 960px) {
  body { background: var(--frame); }
  .frame { padding: 12px 16px calc(var(--nav-h) + 44px); }
  .topbar { display: flex; padding: 8px 8px 8px 10px; margin-bottom: 22px; }
  .logo-text { display: block; font-size: 16px; }
  .logo-mark { width: 36px; height: 36px; }
  .logo-img { height: 38px; }
  .tabs, .rail { display: none; }
  .top-actions { margin-left: auto; gap: 6px; }
  .circle-btn { width: 40px; height: 40px; }
  .avatar-lg { width: 40px; height: 40px; font-size: 13px; }
  .profile .ic { display: none; }
  .body { display: block; }

  .bottom-nav {
    display: flex; position: fixed; left: 12px; right: 12px; z-index: 40;
    bottom: calc(10px + env(safe-area-inset-bottom));
    height: var(--nav-h); background: var(--card); border-radius: 999px;
    padding: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.12);
    justify-content: space-around; align-items: center;
  }
  .bottom-nav a {
    flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 1px;
    font-size: 10.5px; color: var(--muted); padding: 2px 0;
  }
  .bottom-nav a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
  .bottom-nav a .ic-wrap { width: 42px; height: 30px; border-radius: 999px; display: grid; place-items: center; transition: background .15s; }
  .bottom-nav a.active { color: var(--green); font-weight: 600; }
  .bottom-nav a.active .ic-wrap { background: var(--green); color: #fff; }

  .page-head { margin-bottom: 18px; min-height: 0; align-items: center; }
  .page-head h1 { font-size: 27px; }
  .page-head .actions .pill { height: 42px; padding: 0 16px; }
  .card { padding: 18px; border-radius: 24px; }
  .num-xl { font-size: 32px; }
  .num-lg { font-size: 28px; }
  .dash { grid-template-columns: minmax(0, 1fr); grid-template-areas: "card" "bal" "week" "chart" "side" "hist"; }
  .cols-2, .cols-3, .split-5-7, .split-4-8 { grid-template-columns: minmax(0, 1fr); }
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat { padding: 14px 16px; gap: 10px; border-radius: 22px; }
  .stat .num-md { font-size: 19px; }
  .stat-row.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .stat-row .stat { padding: 12px; gap: 6px; border-radius: 18px; }
  .stat-row .icon-chip { display: none; }
  .stat-row .s-label { font-size: 11.5px; line-height: 1.35; }
  .stat-row .num-md { font-size: 15px; }
  .stat-row .num-md small { display: none; }
  .stat .icon-chip { width: 36px; height: 36px; }
  .bars { height: 240px; }
  .bars .plot { gap: 7px; }

  .items-layout { grid-template-columns: minmax(0, 1fr); }
  .items-layout .tree-card { display: none; }
  .item-table { display: none; }
  .item-cards { display: grid; gap: 10px; }
  .item-card { background: var(--soft); border-radius: 18px; padding: 12px 14px; cursor: pointer; }
  .item-card .ic-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
  .item-card .ic-prices { display: flex; gap: 12px; font-size: 12.5px; color: var(--muted); margin-top: 6px; flex-wrap: wrap; }

  .pos-layout { grid-template-columns: minmax(0, 1fr); }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product { min-height: 136px; padding: 14px; }
  .cart {
    position: fixed; inset: 0; z-index: 45; border-radius: 0; max-height: none;
    transform: translateY(100%); transition: transform .25s ease;
  }
  .cart-top { padding: 16px 18px 0; }
  .cart-body { padding: 4px 18px 16px; }
  .cart-foot { padding: 12px 18px calc(16px + env(safe-area-inset-bottom)); }
  .cart.open { transform: none; }
  .cart-lines { max-height: none; }
  .cart-close { display: grid !important; }
  .cart-fab {
    display: flex !important; position: fixed; left: 16px; right: 16px;
    bottom: calc(var(--nav-h) + 22px + env(safe-area-inset-bottom));
    z-index: 41; justify-content: space-between !important; height: 54px;
    box-shadow: 0 12px 26px rgba(31, 99, 214, .35);
  }
  .cart-fab > span { display: flex; align-items: center; gap: 8px; }
  .pos-page { padding-bottom: 70px; }

  .modal { align-items: flex-end; padding: 0; }
  .modal-box { border-radius: 28px 28px 0 0; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .hide-sm { display: none !important; }
  .toast { bottom: calc(var(--nav-h) + 90px + env(safe-area-inset-bottom)); }
  .search .hint { display: none; }
  .date-pill input { width: 118px; }
}
@media (min-width: 961px) {
  .only-sm { display: none !important; }
}

/* =============================================================== print */
@media print {
  body { background: #fff; }
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block !important; }
  #print-area .label { box-shadow: none; border-radius: 0; page-break-after: always; break-after: page; }
  #print-area .sheet .label { page-break-after: auto; break-after: auto; }
  #print-area .l-logo { filter: grayscale(1) contrast(1.6); }
  #print-area .receipt { max-width: none; width: 72mm; margin: 0; padding: 2mm 3mm; font-size: 11pt; color: #000; background: none; border-radius: 0; }
  #print-area .r-logo { width: 46mm; max-width: none; mix-blend-mode: normal; filter: grayscale(1) contrast(1.4); }
}

/* ================================================================ auth */
#auth { display: none; }
body.auth-mode #auth { display: flex; min-height: 100vh; align-items: center; justify-content: center; padding: 24px 16px; }
body.auth-mode .frame, body.auth-mode .bottom-nav { display: none !important; }
.auth-card { width: 100%; max-width: 410px; background: var(--card); border-radius: 34px; padding: 34px 30px 28px; box-shadow: 0 24px 60px rgba(0,0,0,.07); }
.auth-mark { width: 60px; height: 60px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; margin: 0 auto; }
.auth-mark .ic { width: 28px; height: 28px; }
.auth-title { text-align: center; font-size: 26px; font-weight: 600; margin-top: 16px; letter-spacing: -.01em; }
/* owner ဖုန်း ပင်မ */
.ph-day { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ph-day .circle-btn { background: var(--card); }
.ph-day .circle-btn:disabled { opacity: .35; }
#ph-prev .ic { transform: rotate(90deg); } #ph-next .ic { transform: rotate(-90deg); }
.ph-date { text-align: center; display: grid; flex: 1; }
.ph-nav { display: flex; gap: 8px; }
.ph-day .circle-btn.green { background: var(--green); color: #fff; }
.circle-btn.spin .ic { animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ph-date b { font-size: 22px; font-weight: 600; }
.ph-date span { color: var(--muted); font-size: 13px; }
.ph-sales { text-align: center; margin-bottom: 14px; }
.ph-sales .num-xl { margin: 4px 0 2px; }
.ph-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.ph-split div { background: var(--soft); border-radius: var(--r-inner); padding: 10px 12px; display: grid; gap: 2px; }
.ph-split span { color: var(--muted); font-size: 13px; }
.ph-close { display: block; color: inherit; text-decoration: none; margin-bottom: 14px; }
.ph-close.open { box-shadow: inset 0 0 0 2px var(--amber-soft); }
.ph-close .card-head > .ic { color: var(--muted); }
.ph-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.ph-row > span:nth-child(2) { font-weight: 600; text-align: right; }
.ph-row .badge { grid-column: 1 / -1; justify-self: start; }
.ph-cols { display: flex; justify-content: flex-end; font-size: 12px; color: var(--muted); margin-bottom: -4px; }
.ph-month { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.ph-low { display: flex; align-items: center; gap: 10px; color: var(--red); text-decoration: none; margin-bottom: 14px; font-weight: 500; }
.ph-low span { flex: 1; color: var(--text); }
.ph-list { display: grid; }
.ph-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); cursor: pointer; }
.ph-item:first-child { border-top: 0; }
.credit { text-align: center; font-size: 12.5px; color: var(--muted); margin: 28px 0 0; }
.credit a { color: var(--green); font-weight: 600; text-decoration: none; }
.credit a:hover { text-decoration: underline; }
.auth-card .credit { margin-top: 18px; }
.auth-logo { display: block; width: 220px; max-width: 70%; margin: -6px auto 0; }
.lang-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.auth-card .lang-row { justify-content: center; margin-top: 4px; }
.lang-pick button { padding: 8px 14px; font-size: 13.5px; }
.remember { display: flex; align-items: center; gap: 10px; margin: 2px 0 14px; cursor: pointer; color: var(--text-2); user-select: none; }
.remember small { color: var(--muted); }
.auth-err { color: var(--red); text-align: center; min-height: 1.6em; margin: 12px 0 0; }

/* ====================================================== feature pieces */
div.field { display: block; margin-bottom: 14px; }
div.field > span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.badge.blue { background: #e7effd; color: #2a63c9; }
.badge .ic { width: 13px; height: 13px; }
.segmented button:disabled { opacity: .45; cursor: not-allowed; }
.method-pick { display: flex; }
.method-pick button { flex: 1; }
.denoms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 14px; }
.denoms[hidden] { display: none; }
.denom { display: flex; align-items: center; gap: 8px; background: var(--soft); border-radius: 14px; padding: 5px 5px 5px 12px; color: var(--muted); }
.denom b { min-width: 52px; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.denom input { height: 34px; flex: 1; min-width: 0; background: #fff; text-align: center; padding: 0 6px; border-radius: 10px; }
.diff-box { border-radius: var(--r-inner); padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; font-weight: 600; background: var(--soft); color: var(--text-2); }
.diff-box.ok { background: var(--ok-soft); color: var(--ok); }
.diff-box.over { background: var(--amber-soft); color: var(--amber); }
.diff-box.short { background: var(--red-soft); color: var(--red); }
.count-input { width: 96px; height: 38px; text-align: center; padding: 0 8px; border-radius: 12px; }
tr.changed td { background: #fffaf0; }

/* ======================================================= mobile menu */
.bottom-nav button {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 1px;
  font-size: 10.5px; color: var(--muted); padding: 2px 0; border: 0; background: none; cursor: pointer;
}
.bottom-nav button span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.bottom-nav button .ic-wrap { width: 42px; height: 30px; border-radius: 999px; display: grid; place-items: center; transition: background .15s; }
.bottom-nav button.active { color: var(--green); font-weight: 600; }
.bottom-nav button.active .ic-wrap { background: var(--green); color: #fff; }
.menu-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.menu-tile {
  background: var(--soft); border: 0; border-radius: 20px; padding: 16px 6px 14px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12.5px; text-align: center; color: var(--text);
}
.menu-tile .ic-wrap { width: 46px; height: 46px; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.menu-tile.active .ic-wrap { background: var(--green); color: #fff; }
.menu-tile:active { transform: scale(.97); }
@media (max-width: 960px) {
  .toolbar { max-width: 100%; min-width: 0; }
  .segmented { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .segmented::-webkit-scrollbar { display: none; }
  .segmented button { flex-shrink: 0; padding: 8px 14px; }
}

/* ================================================ staff "simple" mode */
body.simple { font-size: 15.5px; }
body.simple .tabs a { font-size: 16px; padding: 10px 22px; }
body.simple .pill { height: 50px; font-size: 15.5px; }
body.simple .pill.sm { height: 40px; }
body.simple input, body.simple select { height: 50px; font-size: 16px; }
body.simple .search { height: 58px; }
body.simple .product { min-height: 160px; padding: 18px; }
body.simple .product .p-name { font-size: 16.5px; }
body.simple .product .p-price { font-size: 19px; }
body.simple .chip { height: 44px; font-size: 15px; padding: 0 18px; }
body.simple .qty button { width: 40px; height: 40px; font-size: 20px; }
body.simple .cart-line .cl-name { font-size: 15.5px; }
body.simple .totals .t-row.grand { font-size: 24px; }
body.simple .pill.block { height: 58px; font-size: 17px; }

body.simple .sum-total { font-size: 26px; }
