:root {
  --blue: #e25d3b;
  --blue2: #c43c2c;
  --ink: #4a2e16;
  --muted: #9a6b45;
  --bg: #ffe9c8;
  --card: #fff8e8;
  --line: #e25d3b;
  --danger: #d62828;
  --yellow: #ffe082;
  --peach: #ffd4a8;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
#app {
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}
html.phone, body.phone, body.phone #app {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html.phone, body.phone {
  height: 100%;
  max-height: 100dvh;
  overflow: hidden;
}
body.phone #app {
  height: 100dvh;
  overflow: hidden;
}
html.phone::-webkit-scrollbar,
body.phone::-webkit-scrollbar,
body.phone #app::-webkit-scrollbar,
body.phone #app > .page::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none;
}
body.phone #app > .page {
  overflow-x: hidden;
  overflow-y: auto;
  max-width: 100%;
  max-height: 100dvh;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
body.pos-on { height: 100dvh; }
body {
  font-family: Tahoma, Arial, sans-serif;
  background: linear-gradient(180deg, #ffe9c8 0%, #fff4cc 45%, #ffd9a8 100%);
  color: var(--ink);
}
button, input { font-family: inherit; }
button { touch-action: manipulation; }
.hidden { display: none !important; }
.screen { padding: 16px 12px 32px; }

.auth { min-height: 100vh; background: transparent; }
.hero {
  background:
    radial-gradient(circle at 88% 18%, rgba(255,255,255,.45), transparent 28%),
    linear-gradient(180deg, #ffd36a 0%, #ffbe6b 50%, #f39b4a 100%);
  color: #5a2a12;
  padding: 28px 20px 54px;
  position: relative;
  overflow: hidden;
  border-bottom: 3px solid #d62828;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(214,40,40,.12) 1.2px, transparent 1.4px);
  background-size: 28px 28px;
  opacity: .55;
  pointer-events: none;
}
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; position: relative; z-index: 1; }
.hello { font-size: 18px; opacity: .95; }
.hero-shop { font-size: 26px; font-weight: 700; margin-top: 2px; }
.hero-shop-line { margin-top: 8px; font-size: 15px; position: relative; z-index: 1; }
.hero-shop-line.branch-switch { cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.hero-sub { margin: 12px 0 0; font-size: 13px; opacity: .92; position: relative; z-index: 1; max-width: 70%; }
.brand-mark {
  text-align: right; font-size: 22px; line-height: 1;
  position: relative; z-index: 1; color: #c43c2c;
  pointer-events: none; cursor: default;
}
.brand-mark b { display: block; letter-spacing: .5px; }
.cart { font-size: 28px; }

body.kz-home { background: #fff6ee; }
#page-home {
  background: #fff6ee;
  min-height: 100dvh;
  padding-bottom: 8px;
}
#page-home .home-hero,
#page-home .home-hero.hero {
  color: #fff;
  overflow: visible;
  border-bottom: none;
  padding: 16px 16px 18px;
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  background:
    radial-gradient(ellipse 90% 70% at 12% -8%, #FFC48A 0%, transparent 58%),
    radial-gradient(ellipse 70% 55% at 78% -12%, #FFB36B 0%, transparent 54%),
    radial-gradient(ellipse 80% 50% at 108% 48%, #FF8A3D 0%, transparent 50%),
    linear-gradient(180deg, #FFB36B 0%, #FF8A3D 48%, #FF7A2E 100%);
}
#page-home .home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 58% 42% at 38% 8%, rgba(255,180,100,.35) 0%, transparent 70%),
    radial-gradient(ellipse 46% 36% at 86% 18%, rgba(255,150,70,.28) 0%, transparent 68%);
}
#page-home .home-hero::after { display: none; }
#page-home .hero-waves {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
}
#page-home .hero-waves svg {
  position: absolute;
  left: -12%;
  top: -18%;
  width: 135%;
  height: 145%;
  opacity: .78;
  contain: paint;
}
#page-home .home-hero .hero-top,
#page-home .home-hero .kpi-row {
  position: relative;
  z-index: 2;
}
#page-home .hero-greet {
  color: #fff;
  position: relative;
  z-index: 2;
}
#page-home .hello {
  font-size: 15px;
  font-weight: 600;
  opacity: 1;
  line-height: 1.2;
  color: #fff7f0;
  text-shadow: 0 1px 2px rgba(160, 50, 10, .28);
}
#page-home .hero-shop {
  font-size: 28px;
  font-weight: 800;
  margin-top: 2px;
  line-height: 1.12;
  letter-spacing: -.02em;
  color: #fff;
  text-shadow: 0 1px 3px rgba(140, 40, 8, .32);
}
#page-home .hero-shop-line {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff7f0;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  text-shadow: 0 1px 2px rgba(160, 50, 10, .28);
}
#page-home .hero-shop-line.branch-switch { text-decoration: none; color: #fff7f0; }
#page-home .shop-caret { display: block; opacity: 1; color: #fff; stroke: #fff; }
#page-home .brand-mark {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: #ff7a2e;
  border-radius: 999px;
  padding: 8px 14px 8px 10px;
  box-shadow: 0 6px 16px rgba(160, 50, 10, .16);
  line-height: 1;
}
#page-home .brand-mark b {
  display: inline;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .02em;
}
#page-home .brand-mark .cart { width: 20px; height: 20px; display: block; }
#page-home .hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
}
#page-home .hero-logout {
  border: 0;
  background: #fff;
  color: #c62828;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
  padding: 6px 12px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(160, 50, 10, .18);
  cursor: pointer;
  line-height: 1.2;
  white-space: normal;
  text-align: center;
}

.auth-card {
  margin: -28px 16px 0;
  background: var(--card);
  border: 2px solid #d62828;
  border-radius: 18px;
  padding: 18px 16px 20px;
  box-shadow: 0 10px 0 rgba(198, 60, 44, .18), 0 16px 28px rgba(180, 80, 20, .12);
  position: relative; z-index: 2;
}

#login.auth {
  position: fixed; inset: 0; z-index: 20;
  width: 100%;
  max-width: 100vw;
  min-height: 100dvh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start;
  padding: 44px 12px 16px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
}
#login.auth::-webkit-scrollbar { width: 0; height: 0; display: none; }
html.kpos-viet-pack #loginLang,
html.kpos-viet-pack #loginLangMenu { display: none !important; }
@media (min-height: 820px) {
  #login.auth { justify-content: center; }
}
#login .login-scene {
  position: absolute; inset: 0;
  background:
    url("/img/login-bg.jpg?v=20261001fix1") center / cover no-repeat,
    #e8c4a0;
  pointer-events: none;
}
#login .login-scene::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 32%, rgba(255,248,240,.06), rgba(50,24,10,.18) 80%);
}
#login .login-wide-only,
#login .login-pill-more,
#login .login-pill-sub { display: none; }
#login .login-lang {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  display: flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px 0 8px;
  border: 0; border-radius: 999px; background: #fff;
  box-shadow: 0 4px 14px rgba(40, 20, 10, .12);
  font-size: 13px; color: #3a2a22; cursor: pointer;
}
#login .login-flag { font-size: 15px; line-height: 1; }
#login .login-lang-caret { font-size: 10px; color: #9a8a7a; }
#login .login-code {
  display: inline-grid; place-items: center;
  min-width: 34px; height: 20px; padding: 0 5px;
  border-radius: 6px; background: #f3e6d8;
  font-size: 10px; font-weight: 800; letter-spacing: .02em; color: #5a3a28;
}
#login .login-lang-menu {
  position: absolute; top: 52px; right: 14px; z-index: 4;
  min-width: 200px; max-width: calc(100vw - 16px);
  max-height: min(70vh, 420px); overflow: auto; padding: 6px;
  background: #fff; border-radius: 12px;
  box-shadow: 0 10px 24px rgba(40, 20, 10, .16);
}
#login .login-lang-menu button {
  width: 100%; min-height: 40px; border: 0; border-radius: 8px;
  background: transparent; color: #3a2a22; font-size: 13px; cursor: pointer;
  display: flex; align-items: center; gap: 8px; padding: 0 10px; text-align: left;
}
#login .login-lang-menu button.on,
#login .login-lang-menu button:hover { background: #fff3e6; }
.fx-price { display: flex; flex-direction: column; line-height: 1.15; }
.fx-price b { font-weight: 800; }
.fx-price small { font-weight: 700; opacity: .82; font-size: 11px; }
.receipt-paper .fx-price { align-items: flex-end; }
.receipt-paper .num .fx-price { font-size: 10px; }
.pcard b { white-space: normal; }
.name-i18n { font-weight: 800; }
.fx-admin .fx-row { display: grid; grid-template-columns: 1fr; gap: 4px; margin: 0 0 14px; }
.fx-admin .fx-eq { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fx-admin .fx-eq input { flex: 1; min-width: 120px; }
#login .login-stack {
  position: relative; z-index: 1;
  width: min(400px, 100%);
  max-width: 100%;
}
#login .login-hero { text-align: center; padding: 4px 4px 0; }
#login .login-logo { display: grid; place-items: center; }
#login .login-wordmark {
  margin: 6px 0 0; font-size: 26px; font-weight: 800;
  letter-spacing: .05em; color: #2a221c; line-height: 1.1;
}
#login .login-wordmark .pos { color: #f0a020; }
#login .login-tag {
  margin: 6px 0 0; font-size: 10px; letter-spacing: .16em;
  color: #7a6a5a; font-weight: 700;
}
#login .login-script {
  margin: 8px 0 0; display: inline-block;
  font-family: "Segoe Script", "Brush Script MT", "Lucida Handwriting", cursive;
  font-size: 26px; color: #2a221c; line-height: 1.15;
}
#login .login-script::after {
  content: ""; display: block; width: 72px; height: 3px;
  margin: 2px auto 0; background: #f0b429; border-radius: 2px;
}
#login .login-pills {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px;
  margin: 16px 0 18px;
  width: 100%;
  max-width: 100%;
}
#login .login-pill {
  min-width: 0; border: 0; background: transparent;
  padding: 0; color: #5a4638; font-size: 11px; line-height: 1.25;
  cursor: pointer;
}
#login .login-pill i {
  display: grid; place-items: center;
  width: 48px; height: 48px; margin: 0 auto 6px;
  border-radius: 50%; background: #fff; color: #f0a020;
  box-shadow: 0 4px 12px rgba(40, 20, 10, .1);
}
#login .login-pill.on i { box-shadow: 0 0 0 2px #f0a020, 0 4px 12px rgba(40, 20, 10, .1); }
#login .login-panel {
  width: 100%;
  max-width: 100%;
  text-align: center;
  background: #fff;
  border-radius: 32px;
  padding: 26px 20px 18px;
  box-shadow: 0 18px 40px rgba(40, 20, 10, .14);
  overflow-x: hidden;
}
#login .login-title-wrap {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-bottom: 4px;
}
#login .login-title {
  margin: 0; font-size: 24px; font-weight: 700; color: #2a221c; letter-spacing: .02em;
}
#login .login-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: linear-gradient(180deg, #ffb36a, #e25d3b);
  box-shadow: 0 0 0 3px rgba(255, 183, 106, .28);
}
#login .login-dot-sm { width: 6px; height: 6px; opacity: .75; }
#login .login-welcome {
  margin: 0 0 18px; font-size: 13px; color: #8a7a6e;
}
#login .login-field {
  display: flex; align-items: center; gap: 8px;
  height: 48px; margin-bottom: 12px; padding: 0 14px 0 16px;
  background: #fff; border-radius: 999px;
  box-shadow: 0 2px 10px rgba(60, 30, 10, .08);
  border: 1px solid #f3eee8;
}
#login .login-ico { color: #c4b4a4; display: grid; place-items: center; flex: 0 0 22px; }
#login .login-field input {
  flex: 1; min-width: 0; height: 46px; border: 0; background: transparent;
  font-size: 15px; color: #5a2a12; padding: 0;
}
#login .login-field input::placeholder { color: #c4b4a4; }
#login .login-eye {
  position: static; width: 36px; height: 36px; padding: 0; flex-shrink: 0; color: #c4b4a4;
}
#login .login-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin: 2px 2px 8px;
}
#login .login-remember {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: #6a5344; cursor: pointer;
}
#login .login-remember input {
  width: 16px; height: 16px; margin: 0; flex: 0 0 16px;
  accent-color: #f0a020;
}
#login .login-text-link {
  border: 0; background: transparent; color: #7a8aa0; font-size: 13px;
  padding: 0; text-decoration: none; cursor: pointer;
}
#login .login-submit {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 8px; border-radius: 999px; border: 0; height: 48px;
  background: linear-gradient(180deg, #ff7a4d, #e23a2a);
  box-shadow: 0 8px 18px rgba(226, 58, 42, .28);
}
#login .login-signup { margin: 16px 0 0; font-size: 14px; color: #6a5344; }
#login .login-signup .login-text-link { margin-left: 4px; color: #e25d3b; font-weight: 700; }
#login .err { text-align: center; min-height: 16px; margin: 4px 0 0; }
#login .login-foot { margin-top: 22px; }
#login .login-brand {
  text-align: center;
  font-family: Tahoma, Arial, sans-serif;
  font-weight: 800;
  font-size: 11px;
  line-height: 1.35;
  color: #1a120c;
  letter-spacing: 0;
}
#login .login-brand p { margin: 0 0 2px; }
#login .login-brand a {
  color: #1a120c; font-weight: 800; text-decoration: underline;
}
#login .login-set {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: auto; margin: 0 auto 8px; color: #8a7a6e;
}
#login .login-ver {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  flex-wrap: wrap; margin: 8px 0 0; color: #a09080; font-size: 12px;
}
#login .login-ver .login-text-link { color: #a09080; font-size: 12px; }
#login .login-foot .hint { margin: 6px 0 0; color: #b0a090; }
#login .login-eyebrow {
  margin: 4px 0 0; font-size: 11px; letter-spacing: .18em;
  color: #8a7a6e; font-weight: 700;
}
#login .login-sub { margin: 6px 0 0; font-size: 14px; color: #6a5344; }
#login .login-quick { margin-top: 18px; }
#login .login-quick > p { margin: 0 0 10px; font-size: 13px; color: #8a7a6e; }
#login .login-quick-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
#login .login-quick-row button {
  border: 0; background: transparent; color: #5a4638; font-size: 11px;
  cursor: pointer; padding: 0;
}
#login .login-quick-row i {
  display: grid; place-items: center;
  width: 48px; height: 48px; margin: 0 auto 6px;
  border-radius: 50%; background: #fff; color: #4a6aa0;
  box-shadow: 0 4px 12px rgba(40, 20, 10, .1);
}
@media (orientation: portrait) and (max-height: 740px) {
  #login.auth { padding: 44px 14px 16px; justify-content: flex-start; }
  #login .login-wordmark { font-size: 22px; }
  #login .login-script { font-size: 22px; }
  #login .login-pills { margin: 10px 0 12px; }
  #login .login-pill i { width: 42px; height: 42px; }
  #login .login-panel { padding: 22px 18px 16px; }
}
@media (orientation: portrait) and (min-width: 700px) {
  #login.auth { padding: 48px 24px 32px; justify-content: center; }
  #login .login-stack { width: min(420px, 88%); }
  #login .login-wordmark { font-size: 28px; }
  #login .login-script { font-size: 28px; }
  #login .login-pill i { width: 52px; height: 52px; }
}
.field { margin-bottom: 8px; min-width: 0; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.field input, .field select, .field textarea {
  width: 100%; max-width: 100%; min-width: 0; height: 40px; border: 2px solid #e25d3b; border-radius: 12px;
  padding: 0 12px; font-size: 16px; background: #fffbec;
}
.field textarea { height: auto; min-height: 64px; padding: 8px 12px; line-height: 1.35; resize: vertical; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 64px; }
.eye {
  position: absolute; right: 6px; top: 7px; height: 32px; border: 0; background: transparent;
  color: var(--blue2); font-size: 13px; font-weight: 700;
}
.switches { display: grid; gap: 10px; margin: 6px 0 10px; }
.switch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 13px; margin: 4px 0; min-width: 0;
}
.switch-row span { min-width: 0; flex: 1; }
.switch-row input { display: none; }
.switch-row i {
  width: 46px; height: 26px; flex: 0 0 46px; border-radius: 999px; background: #f0d0a8; border: 2px solid #e25d3b; position: relative;
}
.switch-row i::after {
  content: ""; position: absolute; top: 1px; left: 2px; width: 20px; height: 20px;
  background: #fff; border-radius: 50%; transition: .15s; border: 1px solid #e25d3b;
}
.switch-row input:checked + i { background: #d62828; }
.switch-row input:checked + i::after { left: 22px; }
.err { color: var(--danger); font-size: 13px; min-height: 18px; }
.btn {
  width: 100%; height: 48px; border: 2px solid #b71c1c; border-radius: 12px;
  background: linear-gradient(180deg, #ff7a4d, #d62828);
  color: #fff; font-size: 16px; font-weight: 700;
}
.btn.gold {
  background: linear-gradient(180deg, #ffe082, #f5c518);
  color: #5a2a12;
  border-color: #e25d3b;
}
.btn.pale {
  background: #fff4cc;
  color: #5a2a12;
  border-color: #e25d3b;
}
/* KAZUKO: nut DONG phai noi bat, khong dung nen vang nhat */
.btn.close-danger {
  background: linear-gradient(180deg, #ef4444 0%, #c91515 100%) !important;
  color: #ffffff !important;
  border-color: #991b1b !important;
  font-weight: 900 !important;
  box-shadow: 0 4px 10px rgba(153, 27, 27, .22);
}
.btn.close-danger:active {
  background: #a80f0f !important;
}
.hint { text-align: center; color: var(--muted); font-size: 11px; margin: 6px 0 0; }
.kprint-card {
  background: #fff8e8;
  border: 2px solid #d62828;
  border-radius: 14px;
  padding: 12px;
  margin: 0 0 12px;
}
.kprint-set { min-width: 0; overflow-x: hidden; }
.kprint-set > .list { padding-left: 0; padding-right: 0; }
.kprint-set .pair select {
  height: 40px; min-width: 0; max-width: 100%; width: 100%;
  border: 2px solid #e25d3b; border-radius: 12px; background: #fffbec;
}
.kprint-guide {
  margin: 0 0 8px; padding-left: 20px; color: var(--ink); font-size: 13px; line-height: 1.45; text-align: left;
}
.kprint-home { font-size: 13px; margin: 8px 0 0; font-weight: 800; color: #8a4a2a; text-align: left; }
.kprint-home.on { color: #1b7a1b; }
.kprint-home[hidden] { display: none !important; }
.home-hero { padding-bottom: 10px; border-bottom: none; }
.kpi-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; position: relative; z-index: 1; }
.kpi {
  background: rgba(255,248,232,.55); border: 2px solid #d62828;
  border-radius: 14px; padding: 10px 12px; min-height: 58px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
}
.kpi small { display: block; font-size: 12px; opacity: .9; text-align: center; }
.kpi b { font-size: 16px; text-align: center; }
#page-home .kpi-row { gap: 8px; margin-top: 18px; }
#page-home .kpi {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  min-height: 70px;
  padding: 10px 8px 10px 10px;
  background: #fff;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 2px 0 rgba(198, 60, 44, .14);
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
#page-home .kpi-ico {
  flex: 0 0 36px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #ff8a3a;
  display: grid; place-items: center;
  box-shadow: 0 2px 0 rgba(255, 122, 46, .25);
}
#page-home .kpi-ico svg {
  display: block;
  width: 18px;
  height: 18px;
}
#page-home .kpi-body {
  flex: 1; min-width: 0; padding: 0;
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
}
#page-home .kpi small {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: #9a9088;
  opacity: 1;
  line-height: 1.2;
  white-space: nowrap;
}
#page-home .kpi b {
  display: block;
  text-align: left;
  margin-top: 0;
  font-size: 13px;
  font-weight: 800;
  color: #ff7a2e;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#page-home .kpi-chev {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  margin-left: auto;
  color: #d0c8c0;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  height: 36px;
}
.sheet-home {
  margin: 0 12px 80px; background: transparent;
}
#page-home .sheet-home { margin: 8px 14px 96px; }
.date-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding: 0 14px;
  min-height: 36px;
  position: relative;
  z-index: 4;
}
#today {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 700;
}
#page-home .metrics-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(160, 70, 30, .08);
  padding: 12px 8px 14px;
  margin-bottom: 12px;
}
#page-home .date-row {
  margin-bottom: 6px;
  padding: 0 10px 4px;
}
#page-home .date-lab {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: #3a322c;
}
#page-home .date-lab svg { display: block; flex: 0 0 auto; }
#page-home #today {
  display: inline;
  font-size: inherit;
  font-weight: inherit;
}
.period-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff8e8;
  color: var(--blue2);
  border: 2px solid #d62828;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  height: 32px;
  margin: 0;
  transform: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
#page-home .chip {
  gap: 4px;
  height: 30px;
  padding: 0 12px;
  background: #fff;
  color: #ff7a2e;
  border: 1.5px solid #ff9a62;
  font-weight: 700;
  font-size: 13px;
}
#page-home .chip-caret { display: block; }
.period-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 188px;
  background: #fff8e8;
  border: 2px solid #d62828;
  border-radius: 14px;
  box-shadow: 0 10px 0 rgba(214, 40, 40, .12), 0 14px 28px rgba(90, 40, 20, .18);
  padding: 6px;
  z-index: 8;
}
#page-home .period-menu {
  background: #fff;
  border: 0;
  box-shadow: 0 6px 0 rgba(80, 40, 20, .12);
}
.period-menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}
.period-menu button.on {
  background: #ffe082;
  color: var(--blue2);
}
#page-home .period-menu button.on {
  background: #fff3e6;
  color: #ff7a2e;
}
.metrics {
  display: grid; grid-template-columns: 1fr 1fr 1fr; background: var(--card);
  border: 2px solid #d62828;
  border-radius: 16px; padding: 12px 8px; margin-bottom: 12px;
  box-shadow: 0 6px 0 rgba(214, 40, 40, .12);
  position: relative; z-index: 2;
}
.metrics div { text-align: center; }
.metrics span { display: block; font-size: 12px; color: var(--muted); }
.metrics b { font-size: 18px; }
#page-home .metrics {
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  padding: 4px 2px 0;
  margin: 0;
  align-items: start;
}
#page-home .metrics > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  text-align: center;
  min-width: 0;
}
#page-home .metrics .metric-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 0;
  line-height: 1;
  min-height: 18px;
}
#page-home .metrics .metric-top svg {
  display: block;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}
#page-home .metrics .metric-top span {
  display: inline;
  font-size: 12px;
  color: #8a827a;
  font-weight: 600;
  line-height: 1.2;
}
#page-home .metrics b {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: #2a2420;
  line-height: 1.15;
  margin: 0;
}
#page-home .metrics em {
  display: block;
  margin-top: 0;
  font-size: 11px;
  font-style: normal;
  color: #b0a8a0;
  line-height: 1.2;
}
.shift-banner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 12px 14px;
  background: #fff;
  border: 0;
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(160, 70, 30, .08);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}
.shift-banner-ic { font-size: 18px; }
.shift-banner.on {
  border-style: solid;
  border-color: #ffb07a;
  background: #fff3e0;
  box-shadow: 0 6px 16px rgba(160, 70, 30, .08);
}
.shift-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.shift-close h2 { text-align: left; }
.shift-close h3 { text-align: left; font-size: 16px; margin: 14px 0 8px; }
.shift-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid #f0e0d0; text-align: left; font-size: 15px;
}
.shift-row span { color: #5a2a12; }
.shift-row b { font-weight: 800; text-align: right; }
.shift-on {
  display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 8px;
  background: #ffe08a; color: #8a4b00; font-style: normal; font-size: 12px; font-weight: 800;
}
.shift-close #shCount {
  font-size: 28px; font-weight: 800; height: 48px; border: none; border-bottom: 1px solid #e8c9a0;
  background: transparent; padding: 0;
}
.shift-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.shift-kv div {
  background: #fff8e8;
  border: 2px solid #efd2b0;
  border-radius: 12px;
  padding: 8px 10px;
}
.shift-kv small { display: block; color: var(--muted); font-size: 11px; }
.shift-kv b { display: block; font-size: 15px; margin-top: 2px; }
.mods {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px;
}
.mod {
  background: var(--card); border: 2px solid #e25d3b; border-radius: 16px; min-height: 92px;
  box-shadow: 0 5px 0 rgba(198, 60, 44, .16);
  font-size: 13px; color: var(--ink);
}
.mod .ic { display: block; font-size: 22px; margin-bottom: 6px; }
#page-home .mods { gap: 10px; }
#page-home .mod {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 112px;
  padding: 10px 8px 8px;
  background: #fff;
  border: 0;
  border-radius: 20px;
  box-shadow: 0 2px 0 rgba(198, 60, 44, .14);
  text-align: center;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
#page-home .mod .ic {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  margin: 0;
  font-size: unset;
  font-style: normal;
  min-height: 56px;
}
#page-home .mod .ic svg {
  width: 60px;
  height: 60px;
  display: block;
  overflow: visible;
  flex-shrink: 0;
  shape-rendering: geometricPrecision;
}
#page-home .kpi-ico svg,
#page-home .brand-mark .cart,
#page-home .date-lab svg,
#page-home .metrics svg {
  display: block;
  shape-rendering: geometricPrecision;
}
#page-home .brand-mark .cart { width: 22px; height: 22px; }
#page-home .mod-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 0;
  margin-top: 0;
}
#page-home .mod-lab {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #4a3e36;
  white-space: normal;
  line-height: 1.15;
}
#page-home .mod-chev { display: none !important; }

.tabbar {
  position: fixed;
  left: max(10px, env(safe-area-inset-left, 0px));
  right: max(10px, env(safe-area-inset-right, 0px));
  bottom: max(10px, env(safe-area-inset-bottom, 0px));
  width: auto;
  max-width: calc(100vw - 20px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
  box-sizing: border-box;
  background: #fff;
  border: 2px solid #d62828;
  border-radius: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 52px minmax(0, 1fr) minmax(0, 1fr);
  padding: 4px 4px 6px;
  box-shadow: 0 4px 0 rgba(214, 40, 40, .18), 0 0 0 1px rgba(214,40,40,.08);
  z-index: 8;
}
.wipe-box { padding: 12px 12px 96px; }
.wipe-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wipe-cats { display: grid; gap: 6px; }
.wipe-item {
  display: flex; align-items: flex-start; gap: 10px;
  background: #fff8e8; border: 2px solid #efd2b0; border-radius: 12px;
  padding: 8px 10px; margin: 0;
}
.wipe-item.wipe-all { border-color: #e25d3b; margin-bottom: 6px; }
.wipe-item input { width: 22px; height: 22px; margin-top: 2px; accent-color: #d62828; flex: 0 0 auto; }
.wipe-item span { display: block; }
.wipe-item b { display: block; font-size: 14px; }
.wipe-item small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.wipe-go[disabled] { opacity: .45; }

.wipe-safe-note {
  border: 1px solid #f0b5a5; background: #fff7f3; color: #6b2d1c;
  border-radius: 12px; padding: 10px 12px; font-size: 12px; line-height: 1.45; margin-bottom: 10px;
}
.wipe-safe-note b { color: #b42318; font-size: 14px; }
.wipe-head { margin: 12px 0 8px; font-size: 15px; color: #3b2a24; }
.wipe-head.danger { color: #b42318; margin-top: 16px; }
.wipe-item.wipe-fresh { border: 2px solid #d62828; background: #fff0ef; margin-bottom: 8px; }
.wipe-item.wipe-fresh b { color: #b42318; font-size: 14px; }
.wipe-master-item { border-color: #efb0a8; background: #fffafa; }
.wipe-go.redbtn { background: #c91f1f !important; color: #fff !important; font-weight: 900; border-color: #a91515 !important; }
.sale-save {
  position: sticky; bottom: 84px; z-index: 9;
  box-shadow: 0 8px 16px rgba(90,40,20,.18);
}
.tabbar button {
  border: 0; background: transparent; color: #a8a098; font-size: 16px; padding: 6px 4px 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; position: relative; border-radius: 18px; min-width: 0;
}
.tabbar button .tb-ic { display: grid; place-items: center; height: 22px; }
.tabbar button .tb-ic svg { display: block; }
.tabbar button span {
  display: block; font-size: 10px; font-weight: 600;
  white-space: normal; line-height: 1.1; max-width: 100%; text-align: center;
}
.tabbar button.on:not(.plus) {
  color: #ff7a2e;
  font-weight: 700;
  background: #FFF3E8;
}
.tabbar button.on span {
  position: relative;
  padding-bottom: 0;
}
.tabbar button.on span::after {
  display: none;
}
.tabbar .plus {
  width: 52px; height: 52px; margin: -16px auto 0; border-radius: 50%;
  background: #ff7a2e; color: #fff; font-size: 26px; line-height: 1;
  border: 0; box-shadow: 0 4px 0 rgba(255, 122, 46, .28);
  display: grid; place-items: center; padding: 0;
}
.tabbar .plus svg { display: block; }

.page.pad {
  padding-top: 0;
  padding-left: max(12px, env(safe-area-inset-left, 0px));
  padding-right: max(12px, env(safe-area-inset-right, 0px));
  padding-bottom: calc(128px + env(safe-area-inset-bottom, 0px));
}
.page.pad > .bar-blue {
  margin-top: 0;
  margin-left: calc(-1 * max(12px, env(safe-area-inset-left, 0px)));
  margin-right: calc(-1 * max(12px, env(safe-area-inset-right, 0px)));
  width: auto;
  max-width: none;
  border-radius: 0;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  padding-left: calc(12px + env(safe-area-inset-left, 0px));
  padding-right: calc(12px + env(safe-area-inset-right, 0px));
}
.bar-blue {
  background: linear-gradient(180deg, #ffc44d, #f08a3a);
  color: #5a2a12; display: flex; align-items: center; flex-wrap: nowrap; gap: 6px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 12px 14px;
  border: 0;
  border-bottom: 3px solid #d62828;
  border-radius: 0;
  min-width: 0;
  max-width: none;
  box-sizing: border-box;
}
.bar-blue h1 {
  font-size: 16px; margin: 0; flex: 1 1 auto; min-width: 0;
  overflow: visible; text-overflow: unset; white-space: nowrap;
  line-height: 1.2;
}
.back { border: 0; background: transparent; color: #5a2a12; font-size: 26px; flex: 0 0 auto; }
.btn-mini {
  border: 2px solid #d62828; background: #fff8e8; color: var(--blue2); border-radius: 999px;
  height: 32px; padding: 0 8px; font-weight: 700; font-size: 12px;
  flex: 0 0 auto; white-space: nowrap;
}

.search {
  width: calc(100% - 24px); margin: 10px 12px 6px; height: 42px; border: 2px solid #e25d3b;
  border-radius: 12px; padding: 0 12px; background: #fff8e8; font-size: 15px;
}
.tabs { display: flex; gap: 8px; padding: 8px 12px; }
.tabs button {
  flex: 1; height: 36px; border-radius: 10px; border: 2px solid #e25d3b; background: #fff8e8; color: #c43c2c;
}
.tabs button.on { background: #d62828; color: #fff; border-color: #b71c1c; }
.chips-wrap {
  overflow-x: scroll;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin: 0 -4px 6px;
  padding: 0 4px 6px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.chips-wrap::-webkit-scrollbar { display: none; }
.chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  width: max-content;
  min-width: 100%;
  padding: 0 28px 0 0;
}
.chips button {
  flex: 0 0 auto;
  white-space: nowrap;
  height: 32px;
  border-radius: 999px;
  border: 2px solid #e25d3b;
  background: #fff8e8;
  padding: 0 12px;
  font-size: 12px;
  touch-action: pan-x;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
  z-index: 2;
  pointer-events: auto;
}
.chips button.on { background: #ffe082; }
.pos-bar {
  position: sticky; bottom: 70px; margin: 8px 12px; display: flex; justify-content: space-between; align-items: center;
  background: #fff3c4; border: 2px solid #d62828; border-radius: 14px; padding: 8px 10px; font-weight: 700;
}
.table-toolbar {
  display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 6px 8px 4px;
}
.table-toolbar .channel-row, #channelBtns { display: none !important; }
.table-toolbar .channel-row button { height: 34px; padding: 0 10px; font-size: 12px; }
.area-jump {
  flex: 0 0 auto; width: 100%; min-width: 0; margin: 0; padding: 0 0 6px;
  overflow: visible;
  touch-action: auto;
}
.area-jump .chips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  min-width: 0;
  padding: 0;
}
.area-jump .chips button {
  width: 100%;
  min-width: 0;
  height: 34px;
  text-transform: none;
  padding: 0 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  touch-action: manipulation;
}
.filters { padding: 4px 10px 2px; font-size: 12px; color: var(--muted); }
.area-block { padding: 4px 8px 10px; }
.area-block h3 { margin: 4px 0 6px; font-size: 13px; display: flex; justify-content: space-between; color: var(--muted); }
.table-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.tcard {
  padding: 0; overflow: hidden; cursor: pointer;
  width: 100%; max-width: 100%; font: inherit; color: inherit;
  display: block; position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  min-height: 0;
  min-width: 0;
  background: var(--card);
  border: 2px solid #e25d3b;
  box-shadow: 0 4px 0 rgba(198, 60, 44, .14);
  box-sizing: border-box;
  transform: none;
  contain: layout paint;
}
.tcard .tvisual, .tcard img, .tcard .ph, .tcard .ticon {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border: 0; border-radius: 0;
}
.tcard .ticon, .tcard .ph {
  display: grid; place-items: center;
  background: linear-gradient(180deg, #fff4d4, #ffd9a0);
  font-size: 28px; color: var(--ink);
}
.tcard .tmeta {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 10px 4px 4px;
  background: linear-gradient(180deg, transparent, rgba(40,16,6,.82));
  color: #fff;
  min-width: 0;
}
.tcard .tname { display: block; min-width: 0; }
.tcard .tname b {
  display: block;
  font-size: 11px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tcard .preb {
  display: inline-block;
  position: static;
  margin-top: 2px;
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  background: #1b7a32;
  color: #fff;
  border-radius: 999px;
  padding: 2px 5px;
}
.tcard .tsub {
  font-size: 9px; opacity: .92; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tcard .tmeta .price { font-size: 9px; font-weight: 800; color: #ffe082; }
.tcard.empty .tmeta {
  background: linear-gradient(180deg, transparent, rgba(40,16,6,.55));
  color: #fff;
}
.tcard.empty .tname b,
.tcard.empty .tsub {
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 2px rgba(40,16,6,.55);
}
.tcard.busy {
  z-index: 1;
  border: 2px solid #b71c1c;
  transform: none;
  box-shadow:
    inset 0 0 0 3px #b71c1c,
    inset 0 1px 0 rgba(255,255,255,.7);
}
.tcard.busy .tmeta {
  background: linear-gradient(180deg, transparent 6%, rgba(255, 242, 230, .98));
  color: #7a1212;
}
.tcard.busy .tname b {
  color: #8b0000;
  font-size: 12px;
  font-weight: 900;
  text-shadow: 0 1px 0 #fff, 0 1px 2px rgba(255,255,255,.9);
}
.tcard.busy .tsub,
.tcard.busy .tmeta .price {
  color: #7a1212;
  font-size: 9px;
  font-weight: 800;
  opacity: 1;
  text-shadow: 0 1px 0 #fff, 0 1px 2px rgba(255,255,255,.85);
}
.tcard.prebill {
  z-index: 1;
  border: 2px solid #1b7a32;
  transform: none;
  box-shadow:
    inset 0 0 0 4px #1b7a32,
    inset 0 0 0 6px #7dce6a,
    inset 0 1px 0 rgba(255,255,255,.75);
}
.tcard.prebill .tmeta {
  padding: 10px 8px 6px;
  background: linear-gradient(180deg, transparent 6%, rgba(220, 245, 226, .98));
  color: #0d4f1c;
}
.tcard.prebill .tname b {
  color: #0d4f1c;
  font-size: 12px;
  font-weight: 900;
  text-shadow: 0 1px 0 #fff, 0 1px 2px rgba(255,255,255,.95);
}
.tcard.prebill .tsub,
.tcard.prebill .tmeta .price {
  color: #145a27;
  font-size: 9px;
  font-weight: 800;
  opacity: 1;
  text-shadow: 0 1px 0 #fff, 0 1px 2px rgba(255,255,255,.9);
}
.icon-pick {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px;
}
.icon-opt {
  border: 1.5px solid #efd2b0; background: #fff; border-radius: 10px;
  padding: 6px 2px; min-height: 58px; font-size: 11px;
}
.icon-opt span { display: block; font-size: 22px; line-height: 1.2; }
.icon-opt small { display: block; color: var(--muted); font-size: 10px; }
.icon-opt.on { background: #ffe082; border-color: #c9a227; font-weight: 700; }
.dashed {
  border: 2px dashed #e25d3b !important; background: #fffdf6 !important; color: #c43c2c; text-align: center;
}
.qty { display: flex; align-items: center; gap: 6px; justify-content: center; margin-top: 6px; }
.qty button { width: 28px; height: 28px; border-radius: 8px; border: 2px solid #d62828; background: #fff8e8; }
.kpi4 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 12px; }
.kpi4 div { background: #fff8e8; border: 2px solid #e25d3b; border-radius: 12px; padding: 10px; text-align: center; }
.kpi4 small { display: block; font-size: 11px; color: #9a6b45; }
.fund { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; padding: 8px 12px; }
.fund button { min-height: 72px; border-radius: 14px; border: 2px solid #e25d3b; background: #fff8e8; font-size: 12px; }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; padding: 10px 12px 20px; position: sticky; bottom: 70px; min-width: 0; }
.pair > * { min-width: 0; max-width: 100%; }
.green { background: linear-gradient(180deg,#7dce6a,#2e9b44) !important; border-color:#1b7a32 !important; }
.redbtn { background: linear-gradient(180deg,#ff7a4d,#d62828) !important; }
.channel-row button {
  height: 34px; border-radius: 12px; border: 2px solid #e25d3b; background: #fff8e8; font-weight: 700; color: #c43c2c;
}
.prod-grid, .menu-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px;
}
#page-menu #itemList.prod-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 8px 8px 88px;
  align-content: start;
}
#page-menu #itemList .pcard {
  min-height: 0;
  padding: 6px;
  border-radius: 10px;
  box-shadow: 0 3px 0 rgba(198, 60, 44, .12);
}
#page-menu #itemList .pcard img,
#page-menu #itemList .ph {
  height: 52px;
  border-radius: 8px;
}
#page-menu #itemList .pcard b {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.2;
  margin-top: 4px;
}
#page-menu #itemList .pcard .price {
  font-size: 11px;
  color: #c43c2c;
  font-weight: 700;
}
#page-menu #itemList .pcard small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#page-menu #itemList .pcard {
  width: 100%;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
#page-menu #catList.cat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 8px 8px 88px;
  align-content: start;
}
#page-menu #catList.cat-grid .cat-tile,
#page-menu #catList .row[data-cat] {
  cursor: pointer;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
}
#page-menu #catList.cat-grid .cat-tile {
  min-height: 52px;
  padding: 10px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
#page-menu #catList.cat-grid .cat-tile b {
  font-size: 14px;
  line-height: 1.25;
}
.pcard, .item-card {
  background: var(--card); border: 2px solid #e25d3b; border-radius: 14px; min-height: 88px;
  padding: 12px; text-align: left;
  box-shadow: 0 4px 0 rgba(198, 60, 44, .14);
}
.pcard.sell {
  display: flex; flex-direction: column; padding: 0; overflow: hidden; cursor: pointer;
  width: 100%; font: inherit; color: inherit;
}
.pcard.sell img, .pcard.sell .ph {
  height: 132px; border-radius: 0; border: 0; width: 100%;
}
.pcard.sell b, .pcard.sell .price { padding: 6px 10px 0; }
.pcard.sell .price { padding-bottom: 10px; }
.pcard.sell.picked { border-color: #d62828; box-shadow: 0 0 0 2px #ffb300; }
.tcard.empty {
  z-index: 0;
  background: #fffdf8;
  border: 2px solid #e25d3b;
  transform: none;
  box-shadow: 0 4px 0 rgba(198, 60, 44, .14);
}
.tcard.qr { border-color: #d62828; box-shadow: inset 0 0 0 3px #ffb300; }
.pcard img, .ph {
  height: 72px; width: 100%; object-fit: cover; background: #ffe9c8; border-radius: 10px;
  display: grid; place-items: center; color: var(--muted); border: 1px solid #f0b27a;
}
.navrow { width: 100%; display: flex; justify-content: space-between; align-items: center; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.navrow span { color: #9a6b45; }
.logout-row {
  background: #fdecea;
  border-color: #b71c1c;
  color: #b71c1c;
  justify-content: center;
  margin-top: 8px;
}
.logout-row b {
  color: #b71c1c;
  width: 100%;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
}

.list { padding: 16px; display: grid; gap: 8px; }
.row {
  background: var(--card); border-radius: 14px; padding: 12px;
  border: 2px solid #e25d3b;
}
.you-are {
  margin: 12px; background: linear-gradient(180deg, #ffbe6b, #e25d3b); color: #fff;
  border-radius: 14px; padding: 12px; border: 2px solid #b71c1c;
}
.total { display: flex; justify-content: space-between; padding: 8px 12px; font-size: 18px; }
.pay-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 12px 20px; }
.pay-row .btn { width: auto; }
.cart-line { display: flex; justify-content: space-between; padding: 8px 12px; border-bottom: 1px dashed #e25d3b; }

.sheet, .keypad {
  position: fixed; inset: 0; background: rgba(90, 40, 20, .4); z-index: 30;
  display: flex; align-items: flex-end;
}
.keypad { z-index: 50; }
.sheet .box, .keypad .box {
  width: 100%; background: #fff8e8; border-radius: 22px 22px 0 0; padding: 10px 12px 8px;
  border-top: 3px solid #d62828;
  max-height: 92vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.form-actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  position: sticky; bottom: 0; z-index: 3;
  background: #fff8e8; padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  margin: 8px -2px 0;
  border-top: 1px solid #f0c9a0;
}
.form-actions .btn { margin: 0; height: 44px; font-size: 15px; }
.form-actions .btn-dismiss { grid-column: 1 / -1; height: 36px; font-size: 14px; }
.form-actions:has(> :only-child) { grid-template-columns: 1fr; }
.sheet .box.role-box {
  display: flex; flex-direction: column; padding-bottom: 0; max-height: 92vh;
}
.role-scroll { overflow-y: auto; flex: 1; min-height: 0; padding-bottom: 8px; }
.perm-group {
  background: #fff8ee;
  border: 2px solid #e8b88a;
  border-radius: 14px;
  padding: 10px 12px 6px;
  margin: 10px 0;
}
.perm-group h3 {
  margin: 0 0 4px;
  font-size: 15px;
  color: #b71c1c;
  font-weight: 800;
}
.perm-group .perm-hint {
  text-align: left;
  margin: 0 0 8px;
  font-size: 11px;
  color: #9a6b45;
}
.perm-group .switch-row {
  font-size: 15px;
  padding: 10px 0;
  min-height: 46px;
  margin: 0;
  border-bottom: 1px dashed #f0c9a0;
}
.perm-group .switch-row:last-child { border-bottom: 0; }
.perm-group .switch-row i {
  width: 52px;
  height: 30px;
  flex: 0 0 52px;
}
.perm-group .switch-row i::after {
  width: 24px;
  height: 24px;
}
.perm-group .switch-row input:checked + i::after { left: 24px; }
.perm-lock span { color: #8a2a12; font-weight: 700; }
.perm-lock i { background: #f8e0d4; }
.role-actions {
  flex-shrink: 0; background: #fff8e8; padding: 0;
  border-top: 1px solid #f0c9a0;
}
.role-actions .form-actions { margin-top: 0; }
.qty span { min-width: 36px; display: inline-block; text-align: center; font-weight: 700; padding: 4px 6px; }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.keys button {
  height: 52px; border-radius: 12px; border: 2px solid #e25d3b; background: #fff4cc; font-size: 20px;
}
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.quick button {
  height: 34px; border: 2px solid #d62828; background: #ffe082; color: var(--blue2);
  border-radius: 10px; padding: 0 10px;
}
.qr-box { text-align: center; }
.qr-box img { width: 220px; height: 220px; border: 2px solid #d62828; border-radius: 12px; }

.bill-page { padding-bottom: 140px; }
.bill-kh {
  width: calc(100% - 24px); margin: 8px 12px 0; display: flex; justify-content: space-between; align-items: center;
  background: #fff8e8; border: 2px solid #e25d3b; border-radius: 12px; padding: 10px 12px; font: inherit; color: inherit;
}
.bill-kh span { color: var(--muted); font-size: 13px; }
.bill-table {
  margin: 8px 12px; display: flex; justify-content: space-between; align-items: center;
  border: 2px solid #e25d3b; border-radius: 12px; padding: 8px 12px; background: #fffdf6;
}
.bill-line {
  display: grid; grid-template-columns: 56px 1fr auto; gap: 8px; align-items: center;
  margin: 8px 12px; background: #fff8e8; border: 2px solid #e25d3b; border-radius: 14px; padding: 8px;
}
.bill-line img, .bill-line .ph { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; }
.bill-line .ph { display: grid; place-items: center; background: #ffe9c8; font-size: 11px; color: var(--muted); }
.bill-line .sku { font-size: 12px; color: var(--muted); }
.bill-line .price { color: #1b7a32; font-weight: 700; }
.bill-line .editp {
  width: 28px; height: 28px; border-radius: 50%; border: 0; background: #2e9b44; color: #fff; font-size: 16px;
}
.bill-sum { margin: 8px 12px 12px; background: #fff8e8; border: 2px solid #e25d3b; border-radius: 14px; padding: 10px 12px; }
.bill-sum .line { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.bill-sum .line b.red { color: #d62828; }
.bill-sum input.ghost { border: 0; background: transparent; width: 100%; font: inherit; color: var(--muted); padding: 8px 0 0; }
.bill-foot {
  position: sticky; bottom: 62px; background: linear-gradient(180deg, transparent, #fff4cc 18%);
  padding: 8px 12px 10px; z-index: 5;
}
.bill-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.bill-actions .btn { width: auto; height: 44px; font-size: 14px; }
.pay-methods { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 8px 12px; }
.pay-methods button {
  min-height: 64px; border-radius: 12px; border: 2px solid #e25d3b; background: #fff8e8; font-size: 11px;
}
.pay-methods button.on { background: #d4f5c8; border-color: #1b7a32; }
.cash-type-row { display: grid; grid-template-columns: 1fr 44px; gap: 8px; align-items: center; }
.cash-type-row .btn { height: 40px; width: 100%; padding: 0; }
#cashTypeDlg { z-index: 40; }
#cashTypeDlg .cash-type-dlg { padding-top: 8px; }
.cash-type-dlg-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.cash-type-dlg-bar h2 { margin: 0; flex: 1; font-size: 18px; color: #5a2a12; }
.cash-type-dlg .switch-row { margin: 10px 0 16px; }
.cash-type-dlg .btn { margin-top: 4px; }
.cash-methods { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.cash-methods button {
  min-height: 42px; border-radius: 10px; border: 2px solid #e25d3b; background: #fff8e8;
  font-size: 11px; font-weight: 700; color: #c43c2c;
}
.cash-methods button.on { background: #d62828; color: #fff; border-color: #b71c1c; }
.pay-big { text-align: center; padding: 8px 12px; }
.pay-big .sum { font-size: 18px; }
.pay-big .sum b { color: #1b7a32; }
.pay-big .recv { font-size: 34px; color: var(--blue2); font-weight: 700; line-height: 1.1; }
.pay-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 8px 12px 20px; }
.pay-keys button { height: 52px; border-radius: 12px; border: 2px solid #e25d3b; background: #fff; font-size: 20px; }
.pay-keys .ok { background: #2e9b44; color: #fff; border-color: #1b7a32; }
.receipt-paper {
  width: 72mm; max-width: 100%; margin: 8px auto; background: #fff; color: #111; padding: 0 3px 10px;
  font-family: Tahoma, Arial, sans-serif; font-size: 12px; line-height: 1.35; text-align: center;
  box-shadow: 0 8px 24px rgba(90,40,20,.18); border: 1px dashed #ccc;
}
.receipt-paper .logo { height: 40px; object-fit: contain; object-position: top center; margin: 0 auto 2px; display: block; }
.receipt-paper h1 { font-size: 15px; margin: 0 0 2px; letter-spacing: .3px; }
.receipt-paper h2 { font-size: 14px; margin: 8px 0 2px; }
.receipt-paper .bill-table-name { font-weight: 700; margin-bottom: 6px; }
.receipt-paper .meta { display: grid; grid-template-columns: 1fr 1fr; text-align: left; font-size: 11px; gap: 1px 8px; margin: 0 0 6px; }
.receipt-paper .left { text-align: left; }
.receipt-paper table.items { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 11px; line-height: 1.5; margin-top: 4px; }
.receipt-paper table.items th, .receipt-paper table.items td { border: 1px solid #222; padding: 3px 1px; vertical-align: middle; }
.receipt-paper table.items th { font-weight: 700; text-align: center; }
.receipt-paper table.items col.col-tt { width: 6mm; }
.receipt-paper table.items col.col-sl { width: 6mm; }
.receipt-paper table.items col.col-mid { width: 11mm; }
.receipt-paper table.items col.col-gia { width: 12mm; }
.receipt-paper table.items col.col-sum { width: 14mm; }
.receipt-paper table.items col.col-name { width: auto; }
.receipt-paper table.items td.left { text-align: left; word-break: break-word; overflow-wrap: anywhere; }
.receipt-paper .num { text-align: right; white-space: nowrap; font-size: 10px; line-height: 1.5; }
.receipt-paper .c { text-align: center; white-space: nowrap; }
.receipt-paper td.disc {
  text-align: center; white-space: nowrap; font-size: 9px; letter-spacing: -0.3px;
  line-height: 1.55; font-weight: 700;
}
.receipt-paper .tot-row { font-weight: 700; }
.receipt-paper .thanks { font-style: italic; margin-top: 10px; white-space: pre-wrap; }
.receipt-paper .addr, .receipt-paper .phone {
  max-width: 100%;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 12px;
  line-height: 1.35;
  letter-spacing: 0;
}
.receipt-paper .addr {
  overflow: hidden;
  word-break: keep-all;
}
.receipt-paper .bill-qr { margin-top: 8px; font-size: 11px; line-height: 1.4; }
.receipt-paper .bill-qr img, .receipt-paper .vietqr-img {
  width: 28mm; height: 28mm; object-fit: contain; margin: 4px auto 4px; display: block;
  background: #fff;
}
.receipt-paper table { width: 100%; border-collapse: collapse; font-size: 12px; }
.receipt-paper td { padding: 2px 0; vertical-align: top; }
.receipt-paper .qty { text-align: center; width: 28px; }
.kitchen-paper {
  width: 100%; max-height: 52vh; overflow: auto; margin: 8px 0 12px;
  background: #fff; color: #111; border: 1px dashed #ccc; border-radius: 10px;
  padding: 10px 8px; font-family: Consolas, "Courier New", monospace;
  font-size: 12px; line-height: 1.35; white-space: pre; text-align: left;
  overflow-x: auto;
}
body.pos-on .tabbar { display: none !important; }
.receipt-actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  padding: 8px 12px calc(12px + env(safe-area-inset-bottom));
  position: sticky; bottom: 0; z-index: 9;
  background: linear-gradient(180deg, rgba(255,244,204,0) 0%, #fff4cc 28%);
}
.receipt-actions .done { grid-column: 1 / -1; }
@media print {
  @page { size: 80mm auto; margin: 0; }
  html, body {
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }
  body * { visibility: hidden !important; }
  #paper72, #paper72 *,
  #paperKitchen, #paperKitchen * { visibility: visible !important; }
  #paper72, #paperKitchen {
    position: absolute; left: 0; top: 0; width: 72mm; max-width: 72mm;
    margin: 0 !important; padding: 0 2mm 6px 4.5mm !important;
    box-shadow: none; border: 0; background: #fff;
  }
  #paper72 .logo { margin: 0 auto 2px !important; height: 36px; }
  #paper72 h1 { margin-top: 0 !important; }
  #paperKitchen {
    max-height: none; overflow: visible; font-size: 12px; white-space: pre;
    width: 72mm;
  }
}

body.pos-on, body.pos-on #app, body.pos-on #page-pos {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
#page-pos #posShop:not(.hidden) {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#page-pos #posShop:not(.hidden) .mo-card {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#page-pos #posShop .mo-top,
#page-pos #posShop .mo-search,
#page-pos #posShop .chips-wrap {
  flex: 0 0 auto;
  min-width: 0;
  width: 100%;
}
#posCatWrap {
  overflow-x: auto;
  overflow-y: hidden;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 6px;
  padding: 0 0 4px;
}
#posCatWrap #posCats {
  display: grid;
  grid-template-columns: repeat(var(--cat-cols, 4), minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  min-width: 0;
  padding: 0;
}
#posCatWrap.cat-scroll #posCats {
  width: max-content;
  min-width: 100%;
  grid-template-columns: repeat(var(--cat-cols, 4), minmax(76px, 22vw));
}
#posCatWrap #posCats button {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 0 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  touch-action: manipulation;
}
#page-pos #posShop #posItems {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  align-content: start;
  align-items: start;
}
#posPickTable:not(.hidden) {
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.ticket-desk { padding: 4px 2px 12px; }
.pos-page {
  padding: 8px 8px 8px !important;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
#posConfirm.bill-page,
#posReceipt.bill-page,
#posPay.bill-page {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
  overflow: hidden;
}
#receiptBox {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.bill-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 8px 8px 0;
  overflow: hidden;
}
.bill-top { flex: 0 0 auto; }
.bill-lines {
  flex: 1 1 auto;
  min-height: 72px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 2px 2px 8px;
  scrollbar-width: thin;
  scrollbar-color: #e8b84a #fff4cc;
}
.bill-lines::-webkit-scrollbar { width: 6px; }
.bill-lines::-webkit-scrollbar-track { background: #fff4cc; border-radius: 99px; }
.bill-lines::-webkit-scrollbar-thumb { background: #e25d3b; border-radius: 99px; }
.bill-dock {
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  z-index: 12;
  background: linear-gradient(180deg, #fff8e8 0%, #fffdf8 18%);
  border-top: 1.5px solid #efd2b0;
  margin: 0 -8px 0;
  padding: 4px 8px calc(6px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 18px rgba(90,40,20,.1);
}
.bill-dock .mo-3 { gap: 6px; margin: 0 0 2px; }
.bill-dock .mo-3 button { min-height: 40px; padding: 4px 2px; border-radius: 10px; }
.bill-dock .mo-3 b { font-size: 14px; margin-top: 1px; }
.bill-dock .mo-3 small { font-size: 10px; }
.bill-dock .mo-sum { padding: 0 2px 2px; }
.bill-dock .mo-sum .line { padding: 0; font-size: 13px; }
.bill-dock .mo-sum .tot { font-size: 16px; margin-top: 1px; }
.bill-dock .mo-prints, .bill-dock .mo-pay2 { gap: 6px; margin-top: 4px; }
.bill-dock .mo-btn { height: 40px; font-size: 12px; }
.bill-dock .btn-void {
  margin-top: 4px; height: 34px; font-size: 13px;
}
.mo-card {
  background: #fffdf8; border: 2px solid #e8c9a0; border-radius: 18px;
  padding: 10px 10px 14px; box-shadow: 0 8px 18px rgba(90,40,20,.08);
}
.mo-top, .mo-billhead { display: flex; align-items: stretch; gap: 4px; margin-bottom: 8px; }
.mo-banner {
  flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 8px;
  background: #fff4e4; border: 1.5px solid #efd2b0; border-radius: 14px; padding: 10px 12px;
}
.mo-banner b { display: block; font-size: 16px; }
.mo-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.mo-go, .mo-add {
  border: 0; background: linear-gradient(180deg, #e25d3b, #c43c2c); color: #fff;
  border-radius: 12px; height: 40px; padding: 0 14px; font-weight: 700; white-space: nowrap;
}
.mo-search {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 8px;
}
.mo-search input {
  flex: 1; width: auto; height: 42px; border: 1.5px solid #efd2b0; border-radius: 12px;
  padding: 0 12px; background: #fff; font-size: 14px; margin: 0;
}
.scan-btn {
  flex: 0 0 42px; width: 42px; height: 42px; border-radius: 12px;
  border: 1.5px solid #e25d3b; background: #fff4e4; color: #c43c2c;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.scan-overlay {
  position: fixed; inset: 0; z-index: 80; background: #111;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
}
.scan-overlay.hidden { display: none; }
.scan-overlay video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.scan-frame {
  position: absolute; left: 12%; right: 12%; top: 28%; height: 28%;
  border: 3px solid #ffcc66; border-radius: 16px; box-shadow: 0 0 0 999px rgba(0,0,0,.35);
  pointer-events: none;
}
.scan-hint {
  position: relative; z-index: 1; color: #fff; text-align: center;
  font-size: 14px; margin: 0 16px 12px; text-shadow: 0 1px 4px #000;
}
.scan-close {
  position: relative; z-index: 1; width: calc(100% - 32px); max-width: 420px;
  margin: 0 16px calc(20px + env(safe-area-inset-bottom));
}
.mo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 4px 0 8px;
  gap: 6px;
  align-content: start;
  align-items: start;
  grid-auto-rows: min-content;
}
.img-auto {
  width: 100%; height: 88px; object-fit: cover; border-radius: 12px;
  border: 1.5px solid #efd2b0; margin-bottom: 6px; background: #fff;
}
.pcard.sell.has-bg {
  background-size: cover;
  background-position: center;
  color: #fff;
  min-height: 88px;
  text-shadow: 0 1px 2px rgba(40,16,6,.55);
  position: relative;
  overflow: hidden;
}
.pcard.sell.has-bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(70,32,12,.12), rgba(40,16,6,.72));
  z-index: 0;
  pointer-events: none;
}
.pcard.sell .sell-bg {
  display: block !important;
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  border: 0; border-radius: 0;
}
.pcard.sell.has-bg b,
.pcard.sell.has-bg .price { position: relative; z-index: 1; }
.pcard.sell.has-bg .price { color: #ffe082; }
.tcard img { object-fit: cover; }
.mo-grid .pcard.sell {
  min-height: 72px;
  max-height: 118px;
  height: 96px;
  padding: 7px 6px;
  align-self: start;
  justify-content: space-between;
}
.mo-grid .pcard.sell.has-bg {
  min-height: 96px;
  height: 96px;
  background-size: cover;
  background-position: center;
}
.mo-grid .pcard.sell b { font-size: 12px; line-height: 1.25; }
body.shop-pos .mo-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 2px 0 8px;
}
body.shop-pos .mo-grid .pcard.sell,
body.shop-pos .mo-grid .pcard.sell.has-bg {
  height: 72px;
  min-height: 72px;
  max-height: 72px;
  padding: 5px 4px 4px;
  border-radius: 10px;
}
body.shop-pos .mo-grid .pcard.sell b {
  font-size: 11px;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body.shop-pos .mo-grid .pcard.sell .price {
  font-size: 10px;
  padding-top: 2px;
}
.pcard.sell {
  min-height: 76px; padding: 10px; background: #fffef9; border-color: #efd2b0;
  display: flex; flex-direction: column; justify-content: space-between;
}
.pcard.sell img, .pcard.sell .ph { display: none; }
.pcard.sell b { font-size: 14px; padding: 0; }
.pcard.sell .price { color: #c43c2c; font-weight: 700; padding: 6px 0 0; font-size: 13px; }
.chips { padding: 0 28px 8px 0; }
.chips button { background: #fff; border-color: #efd2b0; text-transform: uppercase; font-weight: 700; }
.chips button.on { background: #c43c2c; color: #fff; border-color: #c43c2c; }

.mo-kh {
  display: grid; grid-template-columns: minmax(0, 1fr) 78px 48px; gap: 6px; align-items: stretch;
  margin: 6px 0;
}
.mo-kh #btnPickKh,
.mo-kh #khQuick,
.mo-kh .mo-plus {
  min-height: 48px;
  height: 100%;
  box-sizing: border-box;
  border-radius: 12px;
}
.mo-kh #btnPickKh {
  text-align: left; border: 1.5px solid #efd2b0; background: #fff; padding: 6px 10px;
  min-width: 0; display: flex; flex-direction: column; justify-content: center;
}
.mo-kh #btnPickKh b {
  display: block; font-size: 13px; line-height: 1.25; font-weight: 800;
  overflow-wrap: anywhere; word-break: break-word;
}
.mo-kh small { display: block; font-size: 10px; color: var(--muted); letter-spacing: .4px; line-height: 1.2; }
.mo-kh #khQuick {
  border: 1.5px solid #efd2b0;
  background: #fff; padding: 0 8px; font-size: 12px; min-width: 0; width: 100%;
}
.mo-plus {
  border: 0; background: #c9a227; color: #fff; font-size: 22px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; padding: 0;
}

.mo-line { border-bottom: 1px dashed #efd2b0; padding: 8px 2px 10px; }
.mo-line-top { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; font-size: 14px; }
.mo-line-top .amt { color: #c43c2c; white-space: nowrap; }
.mo-tools { display: grid; grid-template-columns: 0.7fr 1fr 0.8fr 1.3fr; gap: 6px; margin-top: 6px; }
.mo-tools button {
  border: 1.5px solid #efd2b0; background: #fff; border-radius: 10px; padding: 4px 4px; min-height: 40px;
}
.mo-tools small { display: block; font-size: 9px; color: var(--muted); line-height: 1.1; }
.mo-tools b { display: block; font-size: 12px; font-weight: 700; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mo-notebtn { text-align: left; }
.note-box textarea {
  width: 100%; border: 1.5px solid #e8b84a; border-radius: 12px; padding: 10px;
  font: inherit; font-size: 16px; min-height: 72px; background: #fff; resize: vertical;
}
.note-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.note-chips button {
  border: 1.5px solid #efd2b0; background: #fff; border-radius: 999px; padding: 6px 10px; font-size: 13px;
}
.note-chips button.on { background: #ffe082; border-color: #c9a227; font-weight: 700; }
.note-add { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.mo-note {
  display: none;
}
.mo-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 10px 0; }
.mo-3 button {
  border: 1.5px solid #efd2b0; background: #fff; border-radius: 12px; padding: 8px 4px; min-height: 58px;
}
.mo-3 small { display: block; color: var(--muted); font-size: 11px; }
.mo-3 b { display: block; font-size: 16px; margin-top: 4px; }
.mo-sum { padding: 6px 4px 10px; }
.mo-sum .line { display: flex; justify-content: space-between; padding: 3px 0; font-size: 14px; }
.mo-sum .tot { font-size: 18px; font-weight: 800; margin-top: 4px; }
.mo-sum .tot b { color: #c43c2c; }
.mo-prints, .mo-pay2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.mo-btn {
  height: 48px; border: 0; border-radius: 12px; font-weight: 700; color: #fff; font-size: 13px;
}
.mo-btn.kitchen { background: linear-gradient(180deg, #ffe082, #e8b84a); color: #5a2a12; }
.mo-btn.void { background: linear-gradient(180deg, #ef9a9a, #c62828); color: #fff; font-size: 12px; line-height: 1.15; white-space: normal; padding: 4px 6px; }
.mo-btn.prebill { background: linear-gradient(180deg, #8ec5ff, #4a90d9); }
.mo-btn.save { background: linear-gradient(180deg, #ff9a3d, #e25d3b); }
.mo-btn.pay { background: linear-gradient(180deg, #5ecf6a, #2e9b44); }
.mo-btn.split { background: linear-gradient(180deg, #ffd54f, #f9a825); color: #5a2a12; }
.split-choice { display: grid; gap: 10px; }
.split-choice button { height: 52px; font-size: 16px; font-weight: 700; }
.move-qty { text-align: left; }
.move-qty-head { color: #1e6fd6; font-weight: 800; font-size: 16px; margin: 0 0 12px; }
.move-qty-list { max-height: 52vh; overflow: auto; }
.move-qty-row {
  display: grid; grid-template-columns: 52px 1fr auto; gap: 10px;
  align-items: center; padding: 10px 0; border-bottom: 1px solid #eee;
}
.move-qty-row img, .move-ph {
  width: 48px; height: 48px; border-radius: 8px; object-fit: cover;
  background: #f2f2f2; display: grid; place-items: center; color: #bbb; font-size: 20px;
}
.move-qty-name { font-weight: 700; font-size: 15px; line-height: 1.25; }
.move-step { display: flex; align-items: center; gap: 4px; }
.move-step button {
  width: 34px; height: 34px; border: 0; border-radius: 8px;
  background: #1e88e5; color: #fff; font-size: 20px; font-weight: 700;
}
.move-step .q { min-width: 56px; text-align: center; font-size: 16px; font-weight: 700; }
.btn-confirm-move {
  width: 100%; height: 48px; margin-top: 14px; border: 0; border-radius: 12px;
  background: #1e88e5; color: #fff; font-size: 17px; font-weight: 800;
}
.split-lines { max-height: 52vh; overflow: auto; text-align: left; }
.split-lines label {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 8px; border-bottom: 1px solid #eee; font-size: 14px;
}
.split-lines input { width: 20px; height: 20px; margin-top: 2px; flex: none; }

.keypad { align-items: center; justify-content: center; padding: 16px; z-index: 40; }
.keypad .box {
  border-radius: 18px; max-width: 420px; margin: 0 auto; max-height: 92vh;
  padding: 14px 14px 16px;
}
.kp-cap { font-size: 11px; letter-spacing: 1px; color: var(--muted); }
.kp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.kp-head h2 { margin: 4px 0 10px; font-size: 18px; flex: 1; }
.kp-x {
  width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid #efd2b0; background: #fff; font-size: 18px;
}
.kp-screen {
  border: 1.5px solid #e8b84a; border-radius: 12px; min-height: 52px;
  display: flex; align-items: center; justify-content: flex-end;
  padding: 8px 12px; font-size: 28px; font-weight: 800; margin-bottom: 12px; background: #fff;
}
.keys-pos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.keys-pos button {
  height: 52px; border-radius: 12px; border: 1.5px solid #efd2b0; background: #fffaf0; font-size: 20px; font-weight: 700;
}
.keys-pos .warn { color: #d62828; }
.keys-pos .dec {
  background: #fff3c4; border-color: #e8b84a;
  font-family: "Segoe UI", Arial, sans-serif; font-weight: 600; font-size: 28px;
}
.kp-ok {
  width: 100%; margin-top: 10px; height: 48px; border: 0; border-radius: 12px;
  background: linear-gradient(180deg, #5ecf6a, #2e9b44); color: #fff; font-weight: 800; font-size: 16px;
}
.disc-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.disc-modes button {
  height: 48px; border-radius: 12px; border: 1.5px solid #efd2b0; background: #fff; font-weight: 700;
}
.disc-modes button.on { background: linear-gradient(180deg, #ffe082, #e8b84a); border-color: #c9a227; }
.disc-prev { text-align: center; color: var(--muted); font-size: 13px; margin: 8px 0; }
.price-row {
  display: grid; grid-template-columns: 28px minmax(86px, 0.9fr) 1.2fr; gap: 6px; align-items: center;
  margin-bottom: 5px;
}
.price-row.lock { opacity: .4; }
.price-row input[type="checkbox"] { width: 20px; height: 20px; accent-color: #c43c2c; }
.price-row input[type="radio"] { width: 20px; height: 20px; accent-color: #d62828; }
.price-row input.pn-lab {
  height: 38px; border: 1.5px solid #efd2b0; border-radius: 10px; padding: 0 8px;
  background: #fff; font-size: 13px; font-weight: 700; color: #5a2a12;
}
.price-row input[readonly] {
  height: 38px; border: 2px solid #e25d3b; border-radius: 12px; padding: 0 12px; background: #fffbec; font-size: 15px;
}
.price-names { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 0 12px 10px; }
.price-names input {
  height: 40px; border: 2px solid #e25d3b; border-radius: 12px; padding: 0 10px; background: #fffbec; font-size: 15px;
}

.rp-home { font-size: 22px; padding: 0 8px; }
.rp-box { padding: 10px 12px 20px; }
.rp-mode { margin: 0 0 8px; font-size: 12px; color: #8a4b22; font-weight: 700; }
.rp-period {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px;
}
.rp-period button {
  height: 32px; padding: 0 10px; border-radius: 999px; border: 1.5px solid #efd2b0;
  background: #fff; font-weight: 700; font-size: 13px; color: #5a2a12;
}
.rp-period button.on { background: #fff; border-color: #2e9b44; color: #1b6b2a; }
.rp-period #rpCal { width: 36px; padding: 0; font-size: 16px; }
.rp-hero {
  background: #fff; border: 1.5px solid #efd2b0; border-radius: 16px; padding: 14px 10px 12px;
  text-align: center; margin-bottom: 12px;
}
.rp-hero .lab { font-size: 14px; color: #666; }
.rp-hero .big { font-size: 28px; font-weight: 800; color: #1d4ed8; margin: 4px 0 10px; }
.rp-hero .kpis { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.rp-hero .kpis div { font-size: 12px; color: #666; }
.rp-hero .kpis b { display: block; font-size: 16px; color: #222; margin-top: 2px; }
.rp-h { font-size: 15px; font-weight: 800; margin: 8px 0; color: #333; }
.rp-chart {
  display: flex; align-items: flex-end; justify-content: flex-start; gap: 6px;
  min-height: 168px; padding: 6px 2px 8px; margin-bottom: 8px;
  overflow-x: auto; border-bottom: 1px solid #efe4d4;
}
.rp-chart.empty {
  display: block; min-height: 0; padding: 18px 8px; text-align: center;
  color: #888; font-weight: 700; font-size: 13px; border-bottom: 0;
}
.rp-chart.one { justify-content: center; overflow-x: visible; }
.rp-chart.many { gap: 2px; overflow-x: hidden; }
.rp-bar {
  flex: 1 1 0; min-width: 16px; max-width: 52px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
}
.rp-chart.one .rp-bar { flex: 0 0 72px; min-width: 72px; max-width: 72px; }
.rp-chart.few .rp-bar { min-width: 36px; max-width: 48px; }
.rp-chart.many .rp-bar { min-width: 0; max-width: none; }
.rp-bar-val {
  font-size: 11px; font-weight: 800; color: #1d4ed8; line-height: 1.15;
  margin-bottom: 4px; text-align: center; white-space: nowrap;
}
.rp-chart:not(.one):not(.few) .rp-bar-val { display: none; }
.rp-bar-track {
  width: 70%; max-width: 36px; height: 120px;
  display: flex; align-items: flex-end; justify-content: center;
}
.rp-chart.one .rp-bar-track { width: 44px; max-width: 44px; }
.rp-chart.many .rp-bar-track { width: 72%; max-width: none; }
.rp-bar-track i {
  display: block; width: 100%; background: #3b82f6;
  border-radius: 6px 6px 0 0; min-height: 4px;
}
.rp-bar.zero .rp-bar-track i { background: #c7d2fe; min-height: 3px; }
.rp-bar-x { font-size: 11px; color: #888; margin-top: 4px; text-align: center; line-height: 1; }
.rp-chart.many .rp-bar-x { font-size: 9px; }
.rp-top-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 8px 0; font-size: 14px; }
.rp-top-tools select {
  height: 34px; border: 1.5px solid #efd2b0; border-radius: 10px; background: #fff; font-weight: 700; padding: 0 8px;
}
.rp-table { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; border-radius: 10px; overflow: hidden; }
.rp-table th, .rp-table td { padding: 8px 6px; border-bottom: 1px solid #f0e0cc; text-align: left; }
.rp-table th { color: #888; font-weight: 700; font-size: 12px; }
.rp-table td.r, .rp-table th.r { text-align: right; }
.rp-table th.rp-qty { color: #c43c2c; white-space: nowrap; }
.rp-table td.rp-qty { color: #c43c2c; font-weight: 700; white-space: nowrap; }
.rp-mods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.rp-mod {
  background: #fff; border: 1.5px solid #e8f0fe; border-radius: 16px; min-height: 92px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  color: #1d4ed8; font-weight: 700; font-size: 13px;
}
.rp-mod .ic {
  width: 40px; height: 40px; border-radius: 50%; border: 2px solid #3b82f6; color: #3b82f6;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.rp-tabs {
  display: flex; gap: 6px; overflow-x: auto; margin: 0 0 10px; padding-bottom: 4px;
}
.rp-tabs button {
  flex: 0 0 auto; height: 32px; padding: 0 12px; border: 0; background: transparent;
  color: #888; font-weight: 700; border-radius: 999px;
}
.rp-tabs button.on { background: #fff; color: #2563eb; box-shadow: 0 0 0 1.5px #dbeafe; }
.rp-kv { background: #fff; border: 1px solid #eee; }
.rp-kv.hi { background: #fff8dc; }
.rp-kv > div {
  display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px;
  border-bottom: 1px solid #eee; font-size: 14px;
}
.rp-kv > div:last-child { border-bottom: 0; }
.rp-kv b { font-weight: 700; }
.rp-act { display: grid; gap: 8px; padding: 10px 0 20px; }
.rp-act-row {
  background: #fff; border: 1px solid #f0d9c4; border-radius: 12px; padding: 10px 12px; text-align: left;
}
.rp-act-row .when { color: #888; font-size: 12px; }
.rp-act-row .det { margin-top: 4px; color: #5a2a12; font-size: 13px; }
.rp-sec-h {

  background: #3b82f6; color: #fff; font-weight: 800; padding: 8px 12px; font-size: 14px; margin-top: 10px;
}
.rp-sec-h.sub { background: #dbeafe; color: #1e3a8a; }
.rp-empty { text-align: center; padding: 40px 12px; color: #444; font-weight: 700; }
.rp-shift {
  background: #fff; border: 1.5px solid #efd2b0; border-radius: 16px; padding: 12px; margin-top: 10px;
}
.rp-shift .who { background: #e8f0fe; border-radius: 10px; padding: 8px 10px; font-weight: 700; margin: 8px 0; }
.rp-shift .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rp-shift .cell { border: 1px solid #eee; border-radius: 10px; padding: 8px; font-size: 12px; }
.rp-shift .cell b { display: block; font-size: 16px; margin-top: 4px; }
.rp-shift .ok { color: #16a34a; }
.rp-shift .warn { color: #2563eb; }
.rp-shift .bad { color: #dc2626; }
.rp-filter { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rp-filter button {
  height: 42px; border-radius: 10px; border: 1.5px solid #e5e7eb; background: #fff; font-weight: 700;
}
.rp-filter button.on { border-color: #22c55e; color: #15803d; }
.rp-filter-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }

.stock-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px 12px 12px; }
.stock-tiles button {
  min-height: 86px; border-radius: 16px; border: 2px solid #e25d3b; background: #fff8e8;
  box-shadow: 0 4px 0 rgba(198, 60, 44, .14); font-size: 14px; font-weight: 800; color: #5a2a12;
}
.stock-tiles .ic { display: block; font-size: 22px; margin-bottom: 4px; }
.xuat-modes { display: flex; gap: 8px; padding: 8px 12px 0; }
.xuat-modes button {
  flex: 1; min-height: 40px; border-radius: 12px; border: 2px solid #e25d3b;
  background: #fffbec; font-weight: 800; color: #5a2a12;
}
.xuat-modes button.on { background: #e25d3b; color: #fff; }
.rp-branch {
  height: 36px; border-radius: 999px; border: 2px solid #e25d3b;
  background: #fff8e8; font-weight: 700; color: #5a2a12; padding: 0 10px; max-width: 160px;
}
.stock-head {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 10px 12px; background: #fff8e8; border-bottom: 2px solid #f0c9a0;
}
.stock-head b { font-size: 15px; }
.stock-head .add {
  border: 0; background: transparent; color: #c43c2c; font-weight: 800; font-size: 14px;
}
.stock-ncc { padding: 8px 12px 4px; margin: 0; background: #fff8e8; }
.stock-ncc-row { display: flex; gap: 8px; align-items: center; }
.stock-ncc-row select { flex: 1; height: 40px; border: 2px solid #e25d3b; border-radius: 12px; background: #fffbec; padding: 0 10px; }
.stock-locs { display: grid; gap: 10px; padding: 10px 12px 8px; background: #fff8e8; }
.stock-loc { display: flex; flex-direction: column; gap: 6px; }
.stock-loc label { font-size: 14px; font-weight: 800; color: #5a2a12; }
.stock-loc select {
  width: 100%; height: 52px; min-height: 52px; font-size: 17px; font-weight: 700;
  border: 2px solid #e25d3b; border-radius: 14px; background: #fff; color: #5a2a12;
  padding: 0 40px 0 14px; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'><path fill='%23c43c2c' d='M5 8l5 6 5-6z'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
}
.stock-plus {
  width: 40px; height: 40px; border-radius: 12px; border: 2px solid #e25d3b; background: #fff8e8;
  color: #c43c2c; font-size: 22px; font-weight: 800; line-height: 1; flex-shrink: 0;
}
.stock-kv {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 12px; background: #fff8e8; border-bottom: 1px solid #f0c9a0; font-size: 14px;
}
.stock-kv .go, .stock-kv .edit { color: #c43c2c; font-weight: 700; border: 0; background: none; }
.stock-kv .sum { color: #d62828; font-weight: 800; }
.stock-kv input[type="datetime-local"] {
  border: 0; border-bottom: 2px solid #e25d3b; background: transparent; color: #5a2a12;
  font: inherit; text-align: right; max-width: 62%;
}
.stock-note { padding: 8px 12px 4px; background: #fff8e8; }
.stock-line { padding: 10px 12px; background: #fff8e8; border-bottom: 1px dashed #f0c9a0; }
.stock-line-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.stock-line-top small { display: block; color: #9a6b45; font-size: 11px; }
.stock-line-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.stock-line .pr {
  border: 0; background: transparent; color: #c43c2c; font-weight: 800;
}
.stock-x { border: 0; background: none; color: #9a6b45; font-size: 16px; }
.ncc-search { position: relative; }
.ncc-search input { width: calc(100% - 24px); }
.ncc-search .x {
  position: absolute; right: 20px; top: 18px; border: 0; background: none; font-size: 20px; color: #9a6b45;
}
.ncc-card {
  display: flex; gap: 10px; align-items: flex-start; margin: 8px 12px; padding: 12px;
  background: #fff8e8; border: 2px solid #e25d3b; border-radius: 16px; width: calc(100% - 24px);
  text-align: left; font: inherit; color: inherit;
}
.bom-block {
  margin: 10px 0 8px; padding: 10px; border: 2px solid #e25d3b; border-radius: 14px; background: #fff8e8; text-align: left;
}
.bom-block > label { display: block; font-weight: 800; color: #5a2a12; margin-bottom: 6px; }
.bom-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 28px; margin-bottom: 8px; }
.bom-chips span {
  border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700;
  background: #fff0e0; color: #c43c2c; border: 1px solid #f0c9a0;
}
.bom-chips i { color: #9a6b45; font-size: 12px; font-style: normal; }
.bom-tag { color: #c43c2c; font-weight: 800; font-size: 11px; }
.mo-line.bundled { opacity: .92; padding-left: 10px; }
.mo-line.bundled .mo-line-top span:first-child { color: #7a3a18; }
.recipe-cover {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(90, 40, 20, .45);
  display: flex; align-items: flex-end;
}
.recipe-win {
  width: 100%; max-height: 92vh;
  background: #fff8e8; border-radius: 22px 22px 0 0;
  border-top: 3px solid #d62828;
  padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 8px;
}
.recipe-win-bar { font-weight: 800; color: #5a2a12; font-size: 16px; padding: 2px 4px; }
.recipe-win-tools { display: flex; gap: 8px; }
.recipe-win-tools button {
  height: 38px; padding: 0 12px; border-radius: 10px; font-weight: 800;
  border: 2px solid #b71c1c; background: linear-gradient(180deg, #ff7a4d, #d62828); color: #fff;
}
.recipe-scroll { overflow: auto; -webkit-overflow-scrolling: touch; min-height: 160px; }
.recipe-tbl { width: max-content; min-width: 100%; margin: 0 !important; }
.recipe-tbl th, .recipe-tbl td { font-size: 11px; white-space: nowrap; }
.recipe-tbl tbody tr.on { background: #ffe082 !important; box-shadow: inset 0 0 0 2px #d62828; }
.recipe-tbl tfoot th { background: #ffc44d; }
.recipe-tbl select {
  min-width: 130px; height: 34px; border: 2px solid #e25d3b; border-radius: 8px;
  background: #fffbec; color: #5a2a12; font: inherit;
}
.rc-hint { font-size: 13px; color: #7a3a18; margin: 0 4px 4px; line-height: 1.35; text-align: left; }
.rc-card {
  background: #fffbec; border: 2px solid #e25d3b; border-radius: 16px;
  padding: 10px; margin: 0 0 10px; text-align: left;
}
.rc-card.on { box-shadow: inset 0 0 0 2px #d62828; background: #ffe9c4; }
.rc-card > select {
  width: 100%; height: 44px; margin: 0 0 8px; border: 2px solid #e25d3b; border-radius: 10px;
  background: #fff; color: #5a2a12; font: inherit; font-weight: 700; padding: 0 8px;
}
.rc-kind { display: flex; gap: 6px; margin-bottom: 8px; align-items: center; }
.rc-kind button {
  flex: 1; height: 40px; border-radius: 10px; font-weight: 800; font: inherit;
  border: 2px solid #e25d3b; background: #fff; color: #5a2a12;
}
.rc-kind button.on { background: linear-gradient(180deg, #ff7a4d, #d62828); color: #fff; border-color: #b71c1c; }
.rc-kind .rc-x { flex: 0 0 40px; background: #fff; color: #d62828; }
.rc-pair { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 520px) { .rc-pair { grid-template-columns: 1fr 1fr; } }
.rc-cell { background: #fff; border: 2px solid #f0c9a0; border-radius: 12px; padding: 8px; }
.rc-cell small { display: block; color: #9a6b45; font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.rc-cell button.cell-edit {
  width: 100%; min-height: 48px; font-size: 22px; font-weight: 800;
  border: 0; background: #fff8e8; color: #5a2a12; border-radius: 8px;
}
.rc-cell .u { color: #c43c2c; font-weight: 800; font-size: 13px; margin-top: 4px; }
.rc-eq { font-size: 13px; color: #5a2a12; font-weight: 700; padding: 8px 2px 0; line-height: 1.35; }
.nvl-conv {
  border: 2px solid #e25d3b; border-radius: 14px; padding: 10px; background: #fff8e8;
  margin: 8px 12px; text-align: left;
}
.nvl-conv h3 { margin: 0 0 8px; font-size: 15px; color: #5a2a12; }
.nvl-conv-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.nvl-conv-row .field { margin: 0; }
.nvl-conv-row select, .nvl-eq input {
  width: 100%; height: 44px; border: 2px solid #e25d3b; border-radius: 10px;
  background: #fff; color: #5a2a12; font: inherit; font-weight: 800;
}
.nvl-eq {
  display: flex; align-items: center; gap: 6px; margin-top: 10px;
  font-weight: 800; color: #5a2a12; flex-wrap: wrap;
}
.nvl-eq input { width: 96px; flex: 0 0 96px; text-align: center; }
.nvl-stock-card {
  background: #fffbec; border: 2px solid #f0c9a0; border-radius: 14px;
  padding: 12px; margin: 8px 12px; text-align: left;
}
.nvl-stock-qty { margin: 4px 0; color: #5a2a12; }
.nvl-stock-left { color: #7a3a18; font-size: 13px; font-weight: 700; margin-top: 4px; line-height: 1.35; }
.nvl-kpis { display: flex; gap: 8px; margin: 6px 0; flex-wrap: wrap; }
.nvl-kpis span {
  background: #fff; border: 1px solid #f0c9a0; border-radius: 999px;
  padding: 4px 10px; font-size: 12px; font-weight: 800; color: #c43c2c;
}
.nvl-move {
  margin-top: 8px; padding: 8px; background: #fff; border-radius: 10px;
  border-left: 4px solid #d62828; font-size: 14px; font-weight: 700; color: #5a2a12; line-height: 1.35;
}
.nvl-move small { display: block; color: #9a6b45; font-weight: 600; margin-top: 2px; }
.nvl-move.in { border-left-color: #2e7d32; }
.ncc-ico {
  width: 36px; height: 36px; border-radius: 10px; background: #fff4cc; border: 1px solid #f0c9a0;
  display: grid; place-items: center; flex-shrink: 0;
}
.ncc-code { color: #9a6b45; font-size: 12px; margin: 2px 0 6px; }
.ncc-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.ncc-chips span {
  border-radius: 999px; padding: 3px 8px; font-size: 11px; font-weight: 700;
}
.ncc-chips .ok { background: #e8f8e4; color: #1b7a32; }
.ncc-chips .debt { background: #fff0e0; color: #c43c2c; }
.stock-fab {
  position: fixed; right: 18px; bottom: 88px; width: 54px; height: 54px; border-radius: 50%;
  border: 2px solid #b71c1c; background: linear-gradient(180deg, #ff7a4d, #d62828);
  color: #fff; font-size: 28px; font-weight: 800; z-index: 9;
  box-shadow: 0 6px 0 rgba(198, 60, 44, .2);
}
.xc-top { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 10px; }
.xc-top .new {
  border: 2px solid #e25d3b; background: #fff8e8; color: #c43c2c; border-radius: 10px;
  height: 34px; padding: 0 10px; font-weight: 800;
}
.xc-row {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 10px 4px; border-bottom: 1px solid #f0c9a0;
}
.xc-unit { display: flex; gap: 6px; margin-top: 6px; }
.xc-unit button {
  flex: 1; height: 36px; border-radius: 10px; border: 2px solid #e25d3b; background: #fff8e8; color: #c43c2c; font-weight: 800;
}
.xc-unit button.on { background: #d62828; color: #fff; border-color: #b71c1c; }
.stock-pick-q { width: calc(100% - 8px); margin: 0 4px 8px; height: 40px; border: 2px solid #e25d3b; border-radius: 12px; padding: 0 10px; background: #fffbec; }
.stock-pick-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0 0 8px;
}
@media (min-width: 520px) {
  .stock-pick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.stock-pick-cell {
  min-height: 72px; padding: 6px 6px 5px; border: 2px solid #e25d3b; border-radius: 10px;
  background: #fff8e8; text-align: left; font: inherit; color: #5a2a12;
  box-shadow: 0 2px 0 rgba(198, 60, 44, .1);
}
.stock-pick-cell b {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; font-size: 12px; line-height: 1.2; min-height: 2.4em;
}
.stock-pick-cell small { display: block; font-size: 10px; color: #9a6b45; margin-top: 2px; line-height: 1.2; }
.stock-tbl.lines td small.ok { display: block; color: #1b7a32; font-size: 10px; font-weight: 700; }
.stock-tbl.lines td small.neg { display: block; color: #d62828; font-size: 10px; font-weight: 700; }
.stock-vrow { width: calc(100% - 24px); margin: 8px 12px; text-align: left; font: inherit; color: inherit; }
.stock-tbl {
  width: calc(100% - 16px); margin: 0 8px 8px; border-collapse: collapse;
  background: #fff8e8; border: 2px solid #e25d3b; border-radius: 12px;
  overflow: hidden; font-size: 13px;
}
.stock-tbl th {
  background: linear-gradient(180deg, #ffc44d, #f08a3a); color: #5a2a12;
  font-size: 11px; font-weight: 800; padding: 7px 6px;
  border-bottom: 2px solid #d62828; text-align: right; white-space: nowrap;
}
.stock-tbl th.n, .stock-tbl td.n { text-align: left; }
.stock-tbl td {
  padding: 7px 6px; border-bottom: 1px solid #f0c9a0; text-align: right;
  font-weight: 800; vertical-align: top; color: #5a2a12;
}
.stock-tbl td.n { font-weight: 400; }
.stock-tbl td.n b { display: block; font-size: 13px; line-height: 1.25; }
.stock-tbl td.n small { display: block; color: #9a6b45; font-size: 10px; font-weight: 400; margin-top: 1px; }
.stock-tbl td.neg { color: #d62828; }
.stock-tbl tbody tr:nth-child(even) { background: #fff4cc; }
.stock-tbl tbody tr:last-child td { border-bottom: 0; }
.stock-tbl th:nth-child(2), .stock-tbl td:nth-child(2),
.stock-tbl th:nth-child(3), .stock-tbl td:nth-child(3) { width: 58px; }
.stock-tbl th:nth-child(4), .stock-tbl td:nth-child(4) { width: 40px; }
.stock-tbl.lines td.n { position: relative; padding-right: 18px; }
.stock-tbl.lines td.n .stock-x { position: absolute; top: 4px; right: 2px; }
.stock-tbl.lines .cell-edit {
  border: 0; background: transparent; color: #c43c2c; font-weight: 800;
  font: inherit; width: 100%; text-align: right; padding: 0;
}
.stock-tbl.lines th:nth-child(2), .stock-tbl.lines td:nth-child(2) { width: 62px; }
.stock-tbl.lines th:nth-child(3), .stock-tbl.lines td:nth-child(3) { width: 72px; }
.stock-tbl.lines th:nth-child(4), .stock-tbl.lines td:nth-child(4) { width: 78px; }

.sale-toast {
  position: fixed; left: 10px; right: 10px; top: 10px; z-index: 30;
}
.sale-toast-card {
  width: 100%; text-align: left; border: 0; border-radius: 16px;
  background: linear-gradient(180deg, #ffb347, #e25d3b); color: #fff;
  padding: 12px 14px; box-shadow: 0 8px 18px rgba(180, 40, 20, .28);
}
.sale-toast-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.sale-toast-top b { font-size: 15px; }
.sale-toast-top span { font-size: 12px; opacity: .9; }
.sale-toast-msg { margin-top: 4px; font-size: 13px; line-height: 1.35; opacity: .96; }
#tabBell.has-alert { color: #ff7a2e; font-weight: 800; }

/* Wide POS / PC — class từ layoutInfo() + media dự phòng */
body.wide .wide-hide { display: none !important; }

body.wide #app {
  display: flex;
  flex-direction: row;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
}
body.wide.pos-on #app { flex-direction: row; height: 100dvh; }
body.wide.pos-on .tabbar { display: flex !important; }
body.wide .tabbar {
  position: relative;
  left: auto; right: auto; bottom: auto;
  flex: 0 0 88px;
  width: 88px;
  min-width: 72px;
  flex-shrink: 0;
  height: 100%;
  margin: 0;
  border-radius: 0;
  border: 0;
  border-right: 1px solid #f0e0d4;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  padding: 10px 6px 12px;
  gap: 4px;
  order: -1;
  z-index: 8;
  background: #fff;
}
body.wide .tabbar button { width: 100%; padding: 10px 2px 8px; }
body.wide .tabbar button span { font-size: 10px; margin-top: 2px; }
body.wide .tabbar button.on span { padding-bottom: 0; }
body.wide .tabbar button.on span::after { display: none; }
body.wide .tabbar .plus {
  width: 52px; height: 52px; margin: 6px auto 8px; flex: 0 0 52px;
  box-shadow: 0 6px 14px rgba(255, 122, 46, .35);
}
body.wide #app > .page:not(.hidden) {
  flex: 1 1 auto; min-width: 0; min-height: 0; overflow: auto;
}
body.wide .page.pad { padding: 0 0 20px; }
body.wide .page.pad > .bar-blue {
  margin-left: 0;
  margin-right: 0;
  max-width: none;
  border-radius: 0;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  padding-left: 12px;
  padding-right: 12px;
}
body.wide .tabbar button.on:not(.plus) { background: #FFF3E8; }

body.wide .auth {
  min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  gap: 0; padding: 32px 16px;
}
body.wide:not(.login-wide) #login.auth {
  flex-direction: column;
  padding: 52px 16px 24px;
}
body.wide:not(.login-wide) #login .login-stack { width: min(420px, 100%); }

/* Landscape / PC: ảnh bleed + card trắng đè, không tách nền vàng */
body.login-wide #login.auth {
  display: flex;
  height: 100dvh;
  max-height: 100dvh;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: transparent;
}
body.login-wide #login .login-scene {
  inset: 0;
  background:
    url("/img/login-bg-wide.jpg?v=20261001fix1") left center / cover no-repeat,
    #e8c4a0;
}
body.login-wide #login .login-scene::after {
  background: linear-gradient(90deg, rgba(255,248,240,.06) 0%, rgba(255,248,240,.04) 52%, rgba(40,18,8,.08) 100%);
}
body.login-wide #login .login-lang {
  top: 28px;
  right: max(36px, calc((42vw - 400px) / 2 + 36px));
  box-shadow: 0 4px 14px rgba(40, 20, 10, .1);
}
body.login-wide #login .login-lang-menu { top: 66px; right: 36px; }
body.login-wide #login .login-stack {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  width: 100%;
  height: 100%;
  max-height: 100dvh;
  min-height: 0;
  padding: 20px 28px 20px 8px;
}
body.login-wide #login .login-hero {
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  padding: 0;
}
body.login-wide #login .login-hero .login-logo,
body.login-wide #login .login-hero .login-wordmark,
body.login-wide #login .login-hero .login-eyebrow,
body.login-wide #login .login-hero .login-tag,
body.login-wide #login .login-hero .login-sub,
body.login-wide #login .login-hero .login-script,
body.login-wide #login .login-hero .login-pills,
body.login-wide #login .login-hero .login-hero-foot {
  display: none;
}
body.login-wide #login .login-wide-only { display: block; }
body.login-wide #login .login-panel-brand.login-wide-only { display: block; margin: 0 0 10px; }
body.login-wide #login .login-panel-brand .login-wordmark {
  font-size: 22px; letter-spacing: .06em; margin: 2px 0 0;
}
body.login-wide #login .login-panel-brand .login-eyebrow { margin: 4px 0 0; font-size: 10px; }
body.login-wide #login .login-panel-brand svg { width: 42px; height: 34px; }
body.login-wide #login .login-dot { display: none; }
body.login-wide #login .login-title { font-size: 22px; margin-top: 4px; }
body.login-wide #login .login-welcome { margin: 4px 0 14px; }
body.login-wide #login .login-field { margin-bottom: 10px; }
body.login-wide #login .login-submit {
  margin-top: 6px;
  background: linear-gradient(180deg, #ff8a5c, #e23a2a);
}
body.login-wide #login .login-signup { margin-top: 12px; }
body.login-wide #login .login-quick.login-wide-only { display: block; margin-top: 14px; }
body.login-wide #login .login-quick > p { margin-bottom: 8px; font-size: 12px; }
body.login-wide #login .login-quick-row { gap: 6px; }
body.login-wide #login .login-quick-row i {
  width: 32px; height: 32px; margin-bottom: 4px;
  color: #4a6aa8;
  box-shadow: 0 2px 8px rgba(40, 20, 10, .08);
}
body.login-wide #login .login-quick-row button { font-size: 11px; color: #6a7a90; }
body.login-wide #login .login-set { display: none; }
body.login-wide #login .login-foot { margin-top: 14px; }
body.login-wide #login .login-panel {
  width: min(400px, 100%);
  max-width: 400px;
  height: auto;
  max-height: calc(100dvh - 40px);
  margin: 0 auto;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(40, 20, 10, .16);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 26px 28px 20px;
}
body.wide .auth .hero {
  flex: 0 1 360px; border-radius: 22px; border: 3px solid #d62828;
  padding: 32px 28px 40px; min-height: 260px;
}
body.wide .auth-card { margin: 0; width: min(360px, 100%); }

body.wide .home-hero { padding: 22px 24px 10px; border-bottom: none; }
body.wide #page-home .home-hero { padding: 22px 24px 16px; padding-top: 22px; }
body.wide .sheet-home { margin: 0 20px 20px; }
body.wide #page-home .sheet-home { margin: 12px 20px 24px; }
body.wide #page-home { min-height: 0; height: 100%; overflow: auto; }
body.wide .mods { grid-template-columns: repeat(4, 1fr); gap: 10px; }
/* KZPOS_HOME_PC_5COL_R1 */
body.wide #page-home .mods {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  max-width: 1320px;
}
body.wide .mod { min-height: 104px; font-size: 14px; }
body.wide #page-home .mod { min-height: 128px; }
body.pos15 .mods, body.desk .mods { grid-template-columns: repeat(5, 1fr); }
body.pos15 #page-home .mods,
body.desk #page-home .mods {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  max-width: 1320px;
}
body.desk .mod { min-height: 118px; }
body.desk #page-home .mod { min-height: 136px; }

body.wide.pos-on #page-pos,
body.wide.pos-dual #page-pos {
  flex-direction: row; flex-wrap: nowrap; gap: 8px;
}
body.wide.pos-dual #page-pos { padding: 8px !important; }
body.wide.pos-dual #posShop:not(.hidden) {
  flex: 1 1 0; min-width: 0; height: 100%;
}
body.wide.pos-dual #posConfirm:not(.hidden) {
  flex: 0 0 360px; width: 360px; max-width: 40%; height: 100%;
}
body.pos10.pos-dual #posConfirm:not(.hidden) { flex-basis: 340px; width: 340px; max-width: 38%; }
body.pos12.pos-dual #posConfirm:not(.hidden) { flex-basis: 320px; width: 320px; max-width: 36%; }
body.pos15.pos-dual #posConfirm:not(.hidden) { flex-basis: 400px; width: 400px; max-width: 38%; }
body.desk.pos-dual #posConfirm:not(.hidden) { flex-basis: 440px; width: 440px; max-width: 36%; }

body.wide.pos-on #posPay:not(.hidden),
body.wide.pos-on #posReceipt:not(.hidden),
body.wide.pos-on #posPickTable:not(.hidden) {
  flex: 1; min-width: 0; height: 100%;
}

body.wide .mo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
body.pos10 .mo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
body.pos12 .mo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
body.pos15 .mo-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
body.desk .mo-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (min-width: 1200px) {
  body.pos10 .mo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

body.wide .table-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
body.pos15 .table-grid, body.desk .table-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
body.desk .table-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
body.wide .tcard .ticon, body.wide .tcard .ph { font-size: 42px; }
body.wide .tcard .tmeta { padding: 18px 6px 6px; }
body.wide .tcard .tname b { font-size: 12px; }
body.wide .tcard .preb { font-size: 9px; padding: 3px 6px; }
body.wide .tcard .tsub, body.wide .tcard .tmeta .price { font-size: 11px; }
body.wide .tcard.busy .tname b { font-size: 16px; }
body.wide .tcard.busy .tsub, body.wide .tcard.busy .tmeta .price { font-size: 13px; }
body.wide .tcard.prebill .tmeta { padding: 16px 6px 6px; }
body.wide .tcard.prebill .tname b { font-size: 15px; }
body.wide .tcard.prebill .tsub, body.wide .tcard.prebill .tmeta .price { font-size: 13px; }

body.wide #page-menu #itemList.prod-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding-bottom: 24px;
}
body.desk #page-menu #itemList.prod-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }

body.wide .sheet, body.wide .keypad {
  align-items: center; justify-content: center;
}
body.wide .sheet .box, body.wide .keypad .box {
  width: min(480px, 92vw); border-radius: 18px; max-height: 86vh;
  border: 2px solid #d62828;
}
body.desk .sheet .box, body.desk .keypad .box { width: min(520px, 56vw); }

body.wide .sale-toast { left: auto; right: 20px; top: 16px; width: 360px; }
body.wide .wipe-box { padding-bottom: 24px; }

body.pos10 .bill-dock .mo-btn,
body.pos10 .mo-go,
body.pos10 .mo-add { height: 46px; font-size: 14px; }
body.pos10 .tabbar { flex: 0 0 88px; width: 88px; min-width: 88px; }
body.pos12 .tabbar { flex: 0 0 72px; width: 72px; min-width: 72px; }
body.desk .tabbar { flex: 0 0 96px; width: 96px; min-width: 96px; }

@media (min-width: 768px) {
  body.pos10 .tabbar button { min-height: 48px; }
}
@media (min-width: 900px) {
  body.wide .metrics b { font-size: 20px; }
}
@media (min-width: 1100px) {
  body.pos12 .mods { grid-template-columns: repeat(5, 1fr); }
  /* KZPOS_HOME_PC_5COL_R2 */
body.pos12 #page-home .mods {
  grid-template-columns:
    repeat(5, minmax(0, 1fr));
  gap: 10px;
  max-width: 1320px;
}
}
@media (min-width: 1280px) {
  body.pos15 .home-hero { padding-left: 32px; padding-right: 32px; }
}
@media (min-width: 1600px) {
  body.desk .sheet-home { margin-left: 32px; margin-right: 32px; }
}

body.prebill-locked .pcard.sell { opacity: .45; pointer-events: none; }
body.prebill-locked #btnAddMore,
body.prebill-locked #btnSendPos,
body.prebill-locked #btnVoid,
body.prebill-locked #btnSplitMerge { pointer-events: none; opacity: .45; }





/* ===== KZPOS.COM PRODUCTION RC1 ===== */
:root{--kz-orange:#ef7a20;--kz-gold:#d6a13b;--kz-ink:#302c28;--kz-muted:#746b63;--kz-bg:#f7f5f1;--kz-card:#ffffff;--kz-line:#eadfd3;--kz-green:#248a57;}
body{background:var(--kz-bg);color:var(--kz-ink)}
#login.kz-auth{position:fixed;inset:0;z-index:30;display:grid;place-items:center;padding:20px;background:#f7f5f1;overflow:auto}
#login .kz-login-bg{position:absolute;inset:0;background:radial-gradient(circle at 20% 15%,rgba(214,161,59,.14),transparent 35%),radial-gradient(circle at 85% 80%,rgba(239,122,32,.12),transparent 32%),linear-gradient(180deg,#fbfaf7,#f3eee8)}
#login .kz-login-card{position:relative;z-index:1;width:min(420px,100%);background:#fff;border:1px solid #eadfd3;border-radius:28px;padding:30px 24px 24px;box-shadow:0 18px 55px rgba(65,45,25,.12);text-align:center}
#login .kz-logo-mark{width:66px;height:66px;border-radius:22px;margin:0 auto 10px;display:grid;place-items:center;background:linear-gradient(145deg,#f6c45e,#ef7a20);color:#fff;font-size:24px;font-weight:900;letter-spacing:-1px;box-shadow:0 10px 24px rgba(239,122,32,.24)}
#login .kz-brand{margin:0;font-size:30px;letter-spacing:-.8px;color:#302c28}#login .kz-brand span{color:#ef7a20;font-size:.64em;letter-spacing:0}
#login .kz-login-sub{margin:6px 0 24px;color:#746b63;font-size:13px}
#login .login-field{height:52px;margin:0 0 12px;border:1px solid #e7ded5;border-radius:15px;box-shadow:none;background:#fbfaf8}
#login .login-field:focus-within{border-color:#ef7a20;box-shadow:0 0 0 3px rgba(239,122,32,.10)}
#login .login-field input{height:50px;color:#302c28;font-size:15px}#login .login-ico{color:#a79382}
#login .kz-forgot-row{display:flex;justify-content:flex-end;margin:0 4px 5px}#login .login-text-link{color:#b45c1e;font-weight:700}
#login .kz-login-submit{height:50px;border-radius:15px;background:#ef7a20;box-shadow:0 8px 18px rgba(239,122,32,.20);font-weight:800;letter-spacing:.03em}
#login .kz-divider{display:flex;align-items:center;gap:10px;margin:15px 0;color:#a39589;font-size:12px}#login .kz-divider:before,#login .kz-divider:after{content:"";height:1px;background:#eee5dc;flex:1}
#login .kz-trial-btn{height:50px;border-radius:15px;background:#fff7e8;color:#9a5a0a;border:1.5px solid #d6a13b;box-shadow:none;font-weight:800}
#login .kz-login-note{margin:14px 10px 0;color:#887a6e;font-size:11px;line-height:1.45}
#login .err{min-height:18px;color:#bd2d2d;font-size:12px}
body.login-wide #login.kz-auth{display:grid;padding:20px}body.login-wide #login .kz-login-card{width:min(430px,100%)}

.hero{background:#fff;color:var(--kz-ink);border-bottom:1px solid var(--kz-line);box-shadow:0 1px 0 rgba(80,50,20,.03)}
.hero::after{display:none}.brand-mark{color:var(--kz-orange)}.home-hero{padding-bottom:14px}
.kpi{background:#fbfaf7;border:1px solid var(--kz-line);box-shadow:none}.kpi small{color:var(--kz-muted)}.kpi b{color:var(--kz-ink)}
.sheet-home{background:transparent}.metrics{background:#fff;border:1px solid var(--kz-line);box-shadow:0 5px 18px rgba(70,45,25,.05)}
.metrics span{color:var(--kz-muted)}.metrics b{color:var(--kz-ink)}
.mod{background:#fff;border:1px solid var(--kz-line);box-shadow:0 4px 14px rgba(70,45,25,.05);color:var(--kz-ink)}
.mod:active{transform:translateY(1px);box-shadow:none}.chip{background:#fff;color:#a95216;border:1px solid #e7c7ad}.period-menu{background:#fff;border:1px solid var(--kz-line);box-shadow:0 12px 28px rgba(60,40,20,.12)}
.tabbar{background:#fff;border:1px solid var(--kz-line);box-shadow:0 8px 24px rgba(60,40,20,.10)}


/* KZPOS FIX2 2026-10-01: branch/mobile/toast/table-state */
/* Chủ/HQ: nút chi nhánh nhỏ trên header. Nhân viên: chỉ hiện nơi làm việc, không có affordance đổi. */
#page-home .hero-shop-line.branch-switch {
  display: inline-flex;
  width: auto;
  max-width: min(72vw, 260px);
  min-height: 26px;
  margin-top: 6px;
  padding: 4px 9px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 999px;
  background: rgba(122,42,10,.16);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#page-home .hero-shop-line.branch-switch #shopNameLab {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#page-home .hero-shop-line.branch-fixed {
  cursor: default;
  pointer-events: none;
  text-decoration: none;
  opacity: .94;
  font-weight: 700;
}
#page-home .hero-shop-line.branch-fixed .shop-caret { display: none !important; }

/* Điện thoại: khóa khung ứng dụng vào viewport, chỉ cuộn dọc nội dung; không xê dịch ngang. */
html.phone, body.phone {
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
  overflow: hidden !important;
  overscroll-behavior: none;
}
body.phone #app {
  position: fixed;
  inset: 0;
  width: 100vw;
  min-width: 0;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden !important;
}
body.phone:not(.pos-on) #app > .page:not(.hidden) {
  position: absolute;
  inset: 0;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  overflow-x: hidden !important;
  overflow-y: auto;
  overscroll-behavior-x: none;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}
body.phone .page,
body.phone .page * { min-width: 0; }
body.phone .page.pad > .bar-blue {
  position: sticky;
  top: 0;
  z-index: 12;
}
body.phone .tabbar {
  position: fixed;
  z-index: 40;
  transform: translateZ(0);
}

/* Thông báo thao tác: góc trái, nhỏ, tự tắt nhanh để không che Vào Bill / nút nghiệp vụ. */
.sale-toast {
  left: max(8px, env(safe-area-inset-left, 0px));
  right: auto;
  top: calc(8px + env(safe-area-inset-top, 0px));
  width: min(230px, calc(100vw - 96px));
  max-width: 230px;
  z-index: 60;
  pointer-events: none;
}
.sale-toast-card {
  pointer-events: auto;
  border-radius: 12px;
  padding: 8px 10px;
  box-shadow: 0 5px 14px rgba(80,30,10,.22);
}
.sale-toast-top b { font-size: 12px; line-height: 1.15; }
.sale-toast-top span { display: none; }
.sale-toast-msg {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body.wide .sale-toast {
  left: 112px;
  right: auto;
  top: 16px;
  width: 280px;
  max-width: 280px;
}

/* Bàn: 3 trạng thái nhìn rõ ngay cả khi có ảnh nền. */
.tcard .tstate {
  position: absolute;
  z-index: 4;
  top: 5px;
  left: 5px;
  max-width: calc(100% - 10px);
  padding: 3px 6px;
  border-radius: 999px;
  font-size: 9px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .02em;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0,0,0,.18);
}
.tcard.empty {
  border: 2px solid #aeb8c2 !important;
  box-shadow: 0 3px 0 rgba(92,105,118,.16) !important;
}
.tcard.empty .tstate {
  background: #eef2f5;
  color: #45515c;
  border: 1px solid #c7d0d8;
}
.tcard.empty .tmeta {
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(248,250,252,.96)) !important;
  color: #45515c !important;
}
.tcard.empty .tname b {
  color: #37424c !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  text-shadow: none !important;
}
.tcard.empty .tsub {
  color: #66727c !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  text-shadow: none !important;
  opacity: 1 !important;
}
.tcard.busy {
  border: 3px solid #c62828 !important;
  box-shadow: inset 0 0 0 2px rgba(198,40,40,.32), 0 4px 0 rgba(126,20,20,.22) !important;
}
.tcard.busy .tstate { background: #c62828; color: #fff; }
.tcard.busy .tmeta {
  background: linear-gradient(180deg, rgba(255,235,230,.08), rgba(255,235,230,.98)) !important;
  color: #7f1111 !important;
}
.tcard.busy .tname b {
  color: #8b0000 !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  text-shadow: 0 1px 0 #fff !important;
}
.tcard.busy .tsub,
.tcard.busy .tmeta .price {
  color: #8b0000 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  opacity: 1 !important;
}
.tcard.prebill {
  border: 3px solid #1565c0 !important;
  box-shadow: inset 0 0 0 2px rgba(21,101,192,.32), 0 4px 0 rgba(13,71,161,.20) !important;
}
.tcard.prebill .tstate { background: #1565c0; color: #fff; }
.tcard.prebill .tmeta {
  background: linear-gradient(180deg, rgba(232,242,255,.08), rgba(232,242,255,.98)) !important;
  color: #0d47a1 !important;
}
.tcard.prebill .tname b {
  color: #0d47a1 !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  text-shadow: 0 1px 0 #fff !important;
}
.tcard.prebill .tsub,
.tcard.prebill .tmeta .price {
  color: #0d47a1 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  opacity: 1 !important;
}
.tcard.prebill .preb { display: none !important; }

body.wide .tcard .tstate { font-size: 10px; padding: 4px 7px; }
body.wide .tcard.empty .tname b { font-size: 14px !important; }
body.wide .tcard.empty .tsub { font-size: 12px !important; }
body.wide .tcard.busy .tname b,
body.wide .tcard.prebill .tname b { font-size: 17px !important; }
body.wide .tcard.busy .tsub,
body.wide .tcard.prebill .tsub { font-size: 13px !important; }

/* KZPOS FIX4 2026-10-01: PC login fit / fixed mobile / red bottom bar / menu scan / branches */
/* PC: không phóng nền quá mức; ưu tiên hiện đủ nội dung ảnh để chữ/icon nền nét và không bị cắt. */
body.login-wide #login .login-scene {
  background-color: #e8c4a0 !important;
  background-image: url("/img/login-bg-wide.jpg?v=20261001fix4") !important;
  background-repeat: no-repeat !important;
  background-position: left center !important;
  background-size: contain !important;
  image-rendering: auto;
}
body.login-wide #login .login-scene::after {
  background: linear-gradient(90deg, rgba(255,248,240,.02) 0%, rgba(255,248,240,.015) 58%, rgba(40,18,8,.05) 100%) !important;
}
@media (min-width: 1100px) {
  body.login-wide #login .login-stack {
    grid-template-columns: minmax(0, 1fr) 430px;
    padding-right: 4.5vw;
  }
  body.login-wide #login .login-panel { margin-left: auto; margin-right: 0; }
}

/* Điện thoại/cảm ứng: khóa ngang tuyệt đối và cuộn đúng vùng nội dung. */
html, body { max-width: 100%; overflow-x: hidden; }
body.phone, body.phone #app { touch-action: pan-y; }
body.phone:not(.pos-on) #app > .page:not(.hidden) {
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
body.phone .bar-blue { transform: translateZ(0); }

/* Thanh tab dưới nổi rõ bằng viền đỏ. */
.tabbar {
  border: 2px solid #d62828 !important;
  box-shadow: 0 7px 20px rgba(166, 29, 29, .18) !important;
}
body.wide .tabbar { border-color: #d62828 !important; }

/* Menu AI: hai lựa chọn rõ ràng Chọn ảnh / Chụp ảnh + preview. */
.menu-scan-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0;
}
.menu-scan-actions .btn { margin: 0; min-height: 46px; font-weight: 900; }
.menu-scan-pick { background: #fff5e8 !important; color: #9a4c13 !important; border: 2px solid #e9a05f !important; }
.menu-scan-camera { background: #e64b35 !important; color: #fff !important; border: 2px solid #bd2e20 !important; }
.menu-scan-preview {
  display: grid;
  grid-template-columns: 88px minmax(0,1fr);
  gap: 10px;
  align-items: center;
  border: 2px solid #edc4a0;
  border-radius: 14px;
  padding: 8px;
  margin: 8px 0;
  background: #fffaf4;
}
.menu-scan-preview img { width: 88px; height: 88px; object-fit: cover; border-radius: 10px; display: block; }
.menu-scan-preview b, .menu-scan-preview small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-scan-preview small { margin-top: 4px; color: #8a6a55; }
.menu-scan-busy { border: 1px dashed #e25d3b; background:#fff7ef; border-radius:12px; padding:12px; margin-top:8px; text-align:left; }
.menu-scan-busy b, .menu-scan-busy small { display:block; }
.menu-scan-busy small { margin-top:4px; color:#8a6a55; }
.scan-group { display:block !important; }
.scan-item { display:flex; justify-content:space-between; gap:8px; align-items:center; padding:5px 0; border-top:1px dashed #edd6c4; }

/* Danh sách chi nhánh: hiển thị rõ Sửa / Khóa / Xóa ngay trên danh sách. */
.branch-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; align-items:center; }
.branch-main { min-width:0; }
.branch-main > b, .branch-main > div { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.branch-actions { display:flex; flex-wrap:wrap; gap:5px; justify-content:flex-end; }
.branch-actions .btn-mini { min-width:52px; font-weight:800; }
.branch-lock { background:#fff0d9 !important; color:#9c5a00 !important; border-color:#e7a63e !important; }
.branch-unlock { background:#eaf8ee !important; color:#18713a !important; border-color:#79c68e !important; }
.branch-delete { background:#d62828 !important; color:#fff !important; border-color:#ae1e1e !important; }
.branch-on { color:#18854b; }
.branch-off { color:#c32626; }

/* Xóa danh mục: xác nhận bằng tích V thay vì gõ chữ. */
.wipe-confirm { border-color:#d62828 !important; background:#fff4f3 !important; }
.wipe-confirm b { color:#a91515; }

/* Màn rỗng / sau reset: các nút tạo dữ liệu chính luôn nằm trong tầm nhìn. */
body.phone #page-tables .bar-blue,
body.phone #page-menu .bar-blue,
body.phone #page-more .bar-blue { position: sticky; top: 0; z-index: 35; }

/* Cảm ứng: không cần mũi tên chỉ hướng ở card/nút. */
.navrow .mod-chev, .kpi-chev, .mod-chev { display:none !important; }
.scan-group-title { margin-bottom:6px; }
.scan-item-edit { border-top:1px dashed #edd6c4; padding:7px 0; }
.scan-name { width:100%; min-height:38px; border:1px solid #e7c7ad; border-radius:10px; padding:0 10px; font-weight:700; }
.scan-price-row { display:grid; grid-template-columns:1fr 1fr 38px; gap:6px; margin-top:6px; }
.scan-price { border:1px solid #e7a56d; background:#fff7ed; color:#6e3f1c; border-radius:10px; min-height:38px; font-size:12px; }
.scan-price b { color:#c93322; }

/* FIX5 - QR order khách: menu gọn như nhân viên order, không để ảnh chiếm màn hình */
.guest-order-body { margin:0; background:#fff9f2; color:#3b2a24; overflow-x:hidden; }
.guest-order-screen { max-width:720px; margin:0 auto; padding:0 10px calc(24px + env(safe-area-inset-bottom)); }
.guest-order-head { position:sticky; top:0; z-index:12; margin:0 -10px 8px; padding:10px 14px; min-height:58px; display:flex; align-items:center; justify-content:space-between; background:linear-gradient(180deg,#ffb15e,#ff7a2e); border-bottom:3px solid #d62828; color:#fff; box-shadow:0 3px 12px rgba(90,40,20,.14); }
.guest-order-head div { display:grid; gap:2px; }
.guest-order-head small { font-size:12px; opacity:.95; }
.guest-order-head b { font-size:20px; line-height:1.1; }
.guest-order-badge { border:2px solid rgba(255,255,255,.85); border-radius:999px; padding:5px 10px; font-weight:900; font-size:12px; }
.guest-order-cats { display:flex; gap:6px; overflow-x:auto; padding:4px 0 8px; position:sticky; top:61px; z-index:11; background:#fff9f2; scrollbar-width:none; }
.guest-order-cats::-webkit-scrollbar { display:none; }
.guest-order-cats button { flex:0 0 auto; min-height:36px; padding:0 12px; border:1.5px solid #efb27d; border-radius:999px; background:#fff; color:#5a2a12; font-weight:800; }
.guest-order-cats button.on { background:#d62828; border-color:#b71c1c; color:#fff; }
.guest-order-menu { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.guest-item { min-width:0; padding:0; overflow:hidden; background:#fff; border:1.5px solid #efc39f; border-radius:13px; color:inherit; text-align:left; box-shadow:0 3px 0 rgba(198,60,44,.08); }
.guest-item img,.guest-item-ph { width:100%; height:88px; object-fit:cover; display:grid; place-items:center; background:#fff0dd; font-size:30px; }
.guest-item-body { padding:7px 7px 8px; display:grid; gap:3px; }
.guest-item-body b { font-size:13px; line-height:1.2; min-height:31px; overflow:hidden; }
.guest-item-body small { color:#c43c2c; font-size:11px; font-weight:800; }
.guest-order-cartbox { margin-top:12px; border:2px solid #e25d3b; border-radius:18px; background:#fff; padding:10px; }
.guest-order-carthead { display:flex; justify-content:space-between; gap:10px; align-items:center; padding-bottom:8px; border-bottom:1px solid #f1d5bc; }
.guest-order-carthead div { display:grid; gap:2px; }
.guest-order-carthead b { font-size:18px; }
.guest-order-carthead small { font-size:11px; color:#8a6a55; }
.guest-order-carthead > span { background:#fff0df; color:#c43c2c; border-radius:999px; padding:5px 8px; font-size:12px; font-weight:800; }
.guest-cart-line { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:7px 8px; padding:10px 0; border-bottom:1px dashed #e9c8aa; }
.guest-cart-main { min-width:0; display:grid; gap:2px; }
.guest-cart-main b { font-size:14px; }
.guest-cart-main small { font-size:11px; color:#8a6a55; }
.guest-cart-step { display:flex; align-items:center; gap:4px; }
.guest-cart-step button { width:32px; height:32px; border:1.5px solid #e25d3b; background:#fff8e8; border-radius:9px; font-size:18px; font-weight:900; color:#b42318; }
.guest-cart-step .qty { min-width:42px; width:auto; padding:0 7px; color:#3b2a24; }
.guest-cart-amount { font-weight:900; color:#c43c2c; }
.guest-cart-note { grid-column:1 / -1; min-height:36px; border:1.5px solid #efc39f; border-radius:9px; padding:0 9px; font:inherit; font-size:12px; background:#fffdf9; }
.guest-cart-remove { justify-self:end; border:0; background:transparent; color:#b42318; font-weight:800; padding:2px 0; }
.guest-order-note { display:grid; gap:5px; margin-top:10px; font-size:12px; font-weight:700; }
.guest-order-note textarea { width:100%; resize:vertical; border:1.5px solid #efc39f; border-radius:10px; padding:8px; font:inherit; }
.guest-order-total { display:flex; justify-content:space-between; align-items:center; padding:10px 0 8px; font-size:16px; }
.guest-order-total b { color:#c43c2c; font-size:20px; }
.guest-order-send { width:100%; height:50px; border:2px solid #b71c1c; border-radius:13px; background:linear-gradient(180deg,#ff6848,#e52d22); color:#fff; font-size:17px; font-weight:900; }
.guest-order-send:disabled { opacity:.55; }
.guest-order-msg { min-height:20px; text-align:center; margin:8px 0 0; color:#256b2a; font-weight:800; font-size:13px; }
.guest-order-empty { grid-column:1/-1; text-align:center; color:#8a6a55; padding:14px 6px; }
@media (max-width:390px){ .guest-order-menu{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.guest-item img,.guest-item-ph{height:76px}.guest-item-body{padding:6px}.guest-item-body b{font-size:12px}.guest-order-screen{padding-left:7px;padding-right:7px}.guest-order-head{margin-left:-7px;margin-right:-7px}.guest-order-cats{top:61px} }


/* KZPOS FIX6 2026-10-01: PC background spacing + product image picker */
@media (min-width: 1100px) {
  body.login-wide #login .login-scene {
    /* Hiện đủ chiều cao, chỉ nới ngang nhẹ để mép ảnh gần card login; không zoom/cắt nội dung. */
    background-size: max(620px, calc(91vw - 430px)) 100% !important;
    background-position: left center !important;
  }
}
.item-image-actions {
  display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:8px 0 4px;
}
.item-image-actions .btn { margin:0; min-height:46px; font-weight:900; }
@media (max-width: 420px) {
  .item-image-actions { gap:6px; }
}

/* KZPOS FIX7 2026-10-01: QR session / AppFood inbox / notification badge */
#tabBell { position: relative; }
#tabBell[data-count]:not([data-count=""])::after {
  content: attr(data-count);
  position: absolute;
  top: 3px;
  right: 8px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #d62828;
  color: #fff;
  border: 2px solid #fff;
  font-size: 10px;
  line-height: 1;
  font-weight: 900;
  box-shadow: 0 2px 7px rgba(117, 20, 20, .28);
}
#tabBell.has-alert .tb-ic { animation: kzBellBlink .82s steps(2, end) infinite; }
@keyframes kzBellBlink { 50% { opacity: .28; transform: scale(1.13); } }

.guest-order-done {
  min-height: 100dvh;
  display: grid;
  place-content: center;
  gap: 10px;
  text-align: center;
  padding: 28px 18px;
  color: #3b2a24;
}
.guest-order-done .done-icon { font-size: 58px; line-height: 1; }
.guest-order-done h2 { margin: 0; font-size: 24px; color: #1b6f3c; }
.guest-order-done p { margin: 0; max-width: 430px; color: #755b4c; line-height: 1.55; }

.admin-feature {
  min-height: 76px !important;
  border: 1.5px solid #ecd5c2 !important;
  border-radius: 15px !important;
  padding: 10px 12px !important;
  background: #fff !important;
}
.admin-feature-icon { width: 48px; height: 48px; display:grid; place-items:center; font-size:30px; border-radius:13px; background:#fff2e5; }
.admin-feature span:nth-child(2) { min-width:0; display:grid; gap:3px; text-align:left; }
.admin-feature b { font-size:14px; font-weight:900; color:#38261f; }
.admin-feature small { font-size:11px; line-height:1.3; color:#8a6a55; }

.appfood-admin { padding-bottom: 110px; }
.appfood-head-card {
  display:flex; justify-content:space-between; align-items:center; gap:12px;
  padding:14px; margin-bottom:10px; border:1.5px solid #efc49f; border-radius:16px;
  background:linear-gradient(135deg,#fff8ef,#fff); box-shadow:0 3px 12px rgba(95,54,24,.08);
}
.appfood-head-card > div { display:grid; gap:4px; min-width:0; }
.appfood-head-card b { font-size:18px; font-weight:950; color:#4b2b1b; }
.appfood-head-card small { color:#816453; line-height:1.35; }
.appfood-head-card > span { font-size:38px; }
.appfood-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.appfood-card {
  min-width:0; min-height:78px; display:grid; grid-template-columns:42px minmax(0,1fr) auto; gap:8px; align-items:center;
  border:1.5px solid #ead2bf; border-radius:14px; background:#fff; padding:10px; color:#35251f; text-align:left;
}
.appfood-card.on { border-color:#e36936; box-shadow:0 0 0 2px rgba(227,105,54,.10); }
.appfood-logo { font-size:27px; display:grid; place-items:center; }
.appfood-card-main { display:grid; gap:3px; min-width:0; }
.appfood-card-main b,.appfood-card-main small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.appfood-card-main b { font-size:14px; font-weight:900; }
.appfood-card-main small { font-size:10px; color:#8a6a55; }
.appfood-status { padding:4px 6px; border-radius:999px; font-size:9px; font-weight:950; background:#eee; color:#666; }
.appfood-card.on .appfood-status { background:#e8f7ed; color:#18713a; }
.appfood-sheet { max-height:min(88dvh,860px); overflow:auto; overscroll-behavior:contain; }
.appfood-sheet h3 { margin:16px 0 7px; font-size:14px; }
.af-api-note { border:1px dashed #e2a56d; border-radius:10px; background:#fff7ed; padding:9px; color:#704a2e; font-size:12px; }
.af-map-row { display:grid; grid-template-columns:minmax(70px,.8fr) minmax(100px,1.2fr) auto; gap:6px; align-items:center; padding:6px 0; border-bottom:1px dashed #ead3c0; }
.af-map-row code,.af-map-row span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.af-map-row code { font-size:11px; color:#7b3e1e; }
.af-map-row span { font-size:12px; font-weight:800; }
.af-map-add { display:grid; grid-template-columns:minmax(90px,.8fr) minmax(120px,1.2fr) auto; gap:6px; align-items:center; }
.af-map-add input,.af-map-add select { min-width:0; height:40px; border:1px solid #e6c6aa; border-radius:9px; padding:0 8px; background:#fff; }
@media (max-width:430px) {
  .appfood-grid { grid-template-columns:1fr; }
  .af-map-add { grid-template-columns:1fr; }
  .af-map-add .btn-mini { min-height:40px; }
}
.guest-order-done-icon { font-size:58px; line-height:1; color:#1b6f3c; font-weight:950; }

/* KZPOS FIX8 2026-10-01: active scope UI polish */

/* Quản trị: icon lớn + mô tả + viền nhẹ */
.admin-card {
  width:100%; min-height:78px; display:grid; grid-template-columns:56px minmax(0,1fr); gap:12px;
  align-items:center; text-align:left; padding:10px 12px; margin:0;
  background:#fff; border:1px solid #eadfd5; border-radius:15px; color:#38261f;
  box-shadow:0 2px 8px rgba(83,52,31,.04); font:inherit; cursor:pointer;
}
.admin-card-ico {
  width:52px; height:52px; display:grid; place-items:center; border-radius:14px;
  background:#fff5ea; font-size:30px; line-height:1;
}
.admin-card-text { min-width:0; display:grid; gap:3px; }
.admin-card-text b { font-size:15px; line-height:1.18; font-weight:950; color:#34231c; }
.admin-card-text small { font-size:11px; line-height:1.35; color:#8d7b70; font-weight:550; }
#moreBox .list:has(.admin-card) { gap:7px; }

/* Cài đặt menu: grid cố định, ảnh tự fit rõ; dấu ... chỉ màn quản lý */
.menu-file-actions { display:grid; grid-template-columns:1fr 1fr; gap:7px; padding:8px 8px 0; }
.menu-file-actions .btn { margin:0; min-height:40px; }
#page-menu #itemList .menu-setup-card { position:relative; overflow:hidden; background:#fff; border:1px solid #ead8c8; box-shadow:0 2px 7px rgba(80,45,25,.06); }
#page-menu #itemList .menu-setup-card img,
#page-menu #itemList .menu-setup-card .ph {
  width:100%; height:92px; object-fit:contain; object-position:center; background:#fffaf4; border:1px solid #f1e5da;
}
.pcard-more {
  position:absolute; right:6px; top:5px; z-index:2; min-width:28px; height:25px; padding:0 7px;
  display:grid; place-items:center; border-radius:999px; border:1px solid #ead8c8;
  background:rgba(255,255,255,.96); color:#5d4d43; font-weight:950; letter-spacing:1px; box-shadow:0 1px 4px rgba(0,0,0,.06);
}
/* Menu bán: không dấu ..., ảnh fixed-size + contain */
.pcard.sell { position:relative; border:1px solid #ead8c8; background:#fff; box-shadow:0 2px 7px rgba(80,45,25,.06); }
.pcard.sell .pcard-more { display:none !important; }
.pcard.sell img,.pcard.sell .ph { height:126px; object-fit:contain; object-position:center; background:#fffaf4; }

/* Nút LƯU của Quy trình bán hàng luôn bám đáy vùng thao tác */
.sale-form { position:relative; }
.sale-form .sale-save,
#saveSale.sale-save,
#saveDay.sale-save {
  position:sticky !important; bottom:calc(82px + env(safe-area-inset-bottom,0px)); z-index:24;
  width:calc(100% - 24px); margin:10px 12px 0 !important; min-height:48px;
  background:#d62828 !important; border:2px solid #a91515 !important; color:#fff !important; font-weight:950 !important;
  box-shadow:0 8px 20px rgba(120,30,20,.23);
}

/* QR ORDER: bill ngang + nút XÓA trực tiếp */
.guest-cart-columns {
  display:grid; grid-template-columns:minmax(0,1.6fr) .72fr .9fr 1fr; gap:6px;
  padding:9px 5px 7px; border-bottom:1px solid #ead4c2; color:#856b5c; font-size:10px; font-weight:900; text-align:right;
}
.guest-cart-columns span:first-child { text-align:left; }
.guest-cart-line { display:block; padding:10px 0; border-bottom:1px dashed #e9c8aa; }
.guest-cart-title-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:8px; align-items:center; margin-bottom:6px; }
.guest-cart-name { min-width:0; font-size:14px; line-height:1.2; color:#34231c; }
.guest-cart-remove {
  justify-self:center !important; min-height:28px; padding:3px 10px !important;
  border:2px solid #f08a24 !important; border-radius:8px !important; background:#fff0a8 !important;
  color:#c91f1f !important; font-size:11px !important; font-weight:950 !important; line-height:1 !important;
}
.guest-cart-amount { white-space:nowrap; font-size:13px; font-weight:950; color:#c43c2c; }
.guest-cart-billrow { display:grid; grid-template-columns:minmax(0,1.6fr) .72fr .9fr 1fr; gap:6px; align-items:center; }
.guest-cart-cell { min-width:0; display:grid; gap:2px; text-align:right; }
.guest-cart-cell.item { text-align:left; }
.guest-cart-cell > span { display:none; font-size:9px; color:#8a6a55; font-weight:800; }
.guest-cart-cell b { min-width:0; font-size:12px; line-height:1.2; overflow:hidden; text-overflow:ellipsis; }
.guest-cart-cell.qtycell { justify-items:center; }
.guest-cart-step { gap:3px; justify-content:center; }
.guest-cart-step button { width:29px; height:29px; border-radius:8px; font-size:16px; }
.guest-cart-step .qty { min-width:36px; }
.guest-cart-note { width:100%; margin-top:7px; min-height:36px; }
@media (max-width:390px) {
  .guest-cart-columns { grid-template-columns:minmax(0,1.35fr) .8fr .9fr 1fr; gap:4px; font-size:9px; }
  .guest-cart-billrow { grid-template-columns:minmax(0,1.35fr) .8fr .9fr 1fr; gap:4px; }
  .guest-cart-cell b { font-size:10.5px; }
  .guest-cart-step button { width:27px; height:27px; }
  .guest-cart-step .qty { min-width:31px; padding:0 4px; }
  .guest-cart-title-row { gap:5px; }
  .guest-cart-remove { padding:3px 7px !important; }
}

/* QR chưa nhận: nổi bật; sau NHẬN class mất -> tự về bình thường */
.qr-pending-row { border:2px solid #d62828 !important; background:#fff4f2 !important; box-shadow:0 3px 10px rgba(181,29,29,.10); }
.qr-pending-row .order-row-title,
.qr-notif-pending > b { color:#c71919 !important; text-transform:uppercase; font-weight:950 !important; letter-spacing:.15px; }
.qr-pending-meta { margin-top:3px; color:#7a5b50; font-size:11px; font-weight:700; }
.qr-notif-pending { border:1.5px solid #e54a3a !important; background:#fff5f3 !important; }
.qr-accept-btn {
  width:100%; min-height:44px; background:#d62828 !important; color:#fff !important;
  border:2px solid #a91515 !important; font-size:15px !important; font-weight:950 !important; box-shadow:0 4px 0 rgba(169,21,21,.14);
}

/* Menu AI: tối đa 4 giá/size + ĐVT */
.scan-price-row { grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
.scan-price-row .scan-unit { min-height:38px; border:1px solid #e7c7ad; border-radius:10px; padding:0 8px; font-weight:800; background:#fff; }
.scan-price-row .btn-mini { min-height:38px; }
.scan-price-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; margin-top:6px; }
.scan-unit-row { display:grid; grid-template-columns:minmax(0,1fr) 42px; gap:6px; margin-top:6px; }

/* Nhập Excel sản phẩm: map trường KZPOS ↔ cột Excel */
.excel-map-box { padding-bottom:calc(12px + env(safe-area-inset-bottom,0px)) !important; }
.excel-file-name { border:1px solid #ead7c6; background:#fffaf5; border-radius:10px; padding:8px 10px; margin:8px 0; font-size:12px; }
.excel-map-head { display:grid; grid-template-columns:1fr 1.2fr; gap:8px; padding:7px 8px; border-radius:9px; background:#fff0df; color:#6b3b21; font-size:11px; }
.excel-map-list { display:grid; gap:6px; margin:7px 0 10px; }
.excel-map-list label { display:grid; grid-template-columns:1fr 1.2fr; gap:8px; align-items:center; padding:7px 8px; border:1px solid #eee2d7; border-radius:9px; background:#fff; }
.excel-map-list label > span { font-size:12px; font-weight:900; }
.excel-map-list select { width:100%; min-width:0; height:38px; border:1px solid #e2c5ac; border-radius:8px; background:#fff; padding:0 7px; }
.excel-preview { display:grid; gap:3px; border:1px dashed #e0b388; background:#fff8ef; border-radius:10px; padding:8px; margin-bottom:9px; }
.excel-preview small { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:#806958; }

/* Báo cáo theo dashboard mẫu */
.rp-dashboard { display:grid; gap:10px; padding:10px 10px 110px; }
.rp-filter-bar { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto; gap:7px; }
.rp-filter-bar button { min-height:40px; border:1px solid #e4d8cd; border-radius:10px; background:#fff; font-weight:850; color:#433329; }
.rp-filter-bar .rp-export { background:#ff7a2e; color:#fff; border-color:#e96720; padding:0 12px; }
.rp-kpi-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.rp-kpi-card { min-width:0; display:flex; align-items:flex-start; gap:8px; background:#fff; border:1px solid #eee4dc; border-radius:13px; padding:10px; box-shadow:0 2px 7px rgba(75,47,29,.04); }
.rp-kpi-card > div { min-width:0; display:grid; gap:2px; }
.rp-kpi-card small { color:#7e7067; font-size:10px; }
.rp-kpi-card b { font-size:17px; line-height:1.15; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rp-kpi-ico { flex:0 0 34px; width:34px; height:34px; display:grid; place-items:center; border-radius:10px; background:#fff1e4; }
.rp-kpi-trend { font-style:normal; font-size:9px; font-weight:850; }
.rp-kpi-trend.up { color:#13823b; } .rp-kpi-trend.down { color:#c52a20; }
.rp-kpi-trend em { color:#8b7b70; font-style:normal; font-weight:600; }
.rp-chart-card,.rp-top-card { background:#fff; border:1px solid #eee4dc; border-radius:14px; padding:11px; }
.rp-chart-head { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-bottom:8px; }
.rp-chart-head b,.rp-top-card > b { font-size:14px; }
.rp-line-chart { width:100%; min-height:190px; overflow:hidden; }
.rp-line-chart svg { width:100%; height:190px; display:block; }
.rp-main-tabs { display:flex; gap:6px; overflow-x:auto; scrollbar-width:none; }
.rp-main-tabs::-webkit-scrollbar { display:none; }
.rp-main-tabs button { flex:0 0 auto; min-height:35px; border:0; border-bottom:2px solid transparent; background:transparent; color:#806f63; font-weight:850; }
.rp-main-tabs button.on { color:#e96920; border-bottom-color:#e96920; }
.rp-top-table { width:100%; border-collapse:collapse; margin-top:8px; font-size:11px; }
.rp-top-table th,.rp-top-table td { padding:7px 5px; border-bottom:1px solid #f1e9e3; text-align:right; }
.rp-top-table th:first-child,.rp-top-table td:first-child { text-align:left; }
@media (max-width:700px) {
  .rp-kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .rp-filter-bar { grid-template-columns:1fr 1fr; }
  .rp-filter-bar .rp-export { grid-column:1 / -1; }
}
/* FIX8 report class aliases matching rendered markup */
.rp-dash-filter { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto; gap:7px; }
.rp-filter-btn,.rp-export-btn { min-height:40px; border:1px solid #e4d8cd; border-radius:10px; background:#fff; font-weight:850; color:#433329; padding:0 10px; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rp-export-btn { background:#ff7a2e; color:#fff; border-color:#e96720; }
.rp-chart-range { display:flex; gap:3px; }
.rp-chart-range button { border:0; background:#fff5ec; color:#806f63; border-radius:8px; min-height:30px; padding:0 9px; font-size:10px; font-weight:850; }
.rp-chart-range button.on { background:#ff7a2e; color:#fff; }
.rp-line-chart { width:100%; height:210px; display:block; }
.rp-line-chart .area { fill:rgba(255,122,46,.10); }
.rp-line-chart .line { fill:none; stroke:#ff7a2e; stroke-width:3; vector-effect:non-scaling-stroke; }
.rp-line-chart circle { fill:#fff; stroke:#ff7a2e; stroke-width:2; vector-effect:non-scaling-stroke; }
.rp-line-chart text { fill:#8b7b70; font-size:10px; }
.rp-line-empty { min-height:190px; display:grid; place-items:center; color:#8b7b70; }
.rp-top-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.rp-top-head button { border:0; background:transparent; color:#e96920; font-weight:850; }
@media(max-width:700px){ .rp-dash-filter{grid-template-columns:1fr 1fr}.rp-export-btn{grid-column:1/-1}.rp-kpi-card b{font-size:15px} }

/* KZPOS FIX9 2026-10-01: compact UI, QR bill, status colors, report additions */
/* Quản trị: nền vàng nhạt, chữ nhỉnh hơn, bo vừa phải */
#page-more { background:#fff9df !important; }
#page-more .admin-hub { background:#fff9df; }
.admin-card { background:#fffdf2 !important; border-color:#e9d2a9 !important; border-radius:9px !important; min-height:76px; }
.admin-card-ico { border-radius:9px !important; }
.admin-card-text b { font-size:16px !important; }
.admin-card-text small { font-size:12px !important; }
.admin-switch-card { border-radius:9px !important; background:#fffdf2 !important; }

/* Bo viền vừa phải, thanh tổng quan không pill quá tròn */
.tabbar { border-radius:14px !important; border-color:#c91f1f !important; }
.tabbar button { border-radius:9px !important; }
.btn,.btn-mini,.mo-btn,.rp-mod,.kpi,.mod { border-radius:9px !important; }
#page-home .mod,#page-home .kpi { border-color:#e4c8a6 !important; box-shadow:0 2px 6px rgba(92,55,31,.06) !important; }

/* Badge APPFOOD riêng */
#tabAppFood { position:relative; }
#tabAppFood[data-count]:not([data-count=""])::after {
  content:attr(data-count); position:absolute; top:3px; right:8px; min-width:19px; height:19px; padding:0 5px;
  border-radius:999px; display:grid; place-items:center; background:#d62828; color:#fff; border:2px solid #fff;
  font-size:10px; line-height:1; font-weight:900; box-shadow:0 2px 7px rgba(117,20,20,.28);
}
#tabAppFood.has-alert .tb-ic { animation:kzBellBlink .82s steps(2,end) infinite; }

/* QR badge trên bàn */
.tcard { position:relative; }
.tcard .qr-table-badge { position:absolute; top:5px; right:5px; min-width:22px; height:22px; padding:0 6px; border-radius:999px; background:#d62828; color:#fff; border:2px solid #fff; display:grid; place-items:center; font-size:10px; font-weight:950; z-index:4; box-shadow:0 2px 7px rgba(117,20,20,.24); }

/* Màu trạng thái trong Thông báo/Tất cả */
.order-row.kind-table,.notif-row.kind-table { border-left:5px solid #e09b22 !important; background:#fff9e8 !important; }
.order-row.kind-qr,.notif-row.kind-qr { border-left:5px solid #d62828 !important; background:#fff3f2 !important; }
.order-row.kind-prebill,.notif-row.kind-prebill { border-left:5px solid #1976d2 !important; background:#f2f8ff !important; }
.order-row.kind-paid,.notif-row.kind-paid { border-left:5px solid #2b9348 !important; background:#f1fbf4 !important; }
.order-row.kind-af-new { border-left:5px solid #e67e22 !important; background:#fff7eb !important; }
.order-row.kind-af-open { border-left:5px solid #2584d8 !important; background:#f1f8ff !important; }
.order-row.kind-af-cancel { border-left:5px solid #c62828 !important; background:#fff1f1 !important; }

/* QR Order giống bill tại bàn: tên | xóa | thành tiền; dưới SL | giá | giảm | ghi chú */
.guest-cart-columns { display:none !important; }
.guest-cart-title-row { grid-template-columns:minmax(0,1fr) auto auto !important; gap:7px !important; }
.guest-cart-like-pos { display:grid !important; grid-template-columns:.68fr .92fr .82fr 1.35fr !important; gap:6px !important; align-items:stretch !important; }
.guest-bill-cell { min-width:0; min-height:54px; border:1.5px solid #efc79e; border-radius:9px; background:#fffdf8; display:grid; place-content:center; text-align:center; padding:5px 6px; color:#452c1e; }
button.guest-bill-cell { font:inherit; cursor:pointer; }
.guest-bill-cell small { display:block; font-size:9px; font-weight:800; color:#9a6b45; line-height:1.1; }
.guest-bill-cell b { display:block; margin-top:3px; font-size:12px; font-weight:950; color:#1d76c9; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.guest-bill-note { place-content:stretch; text-align:left; padding:5px 7px; }
.guest-bill-note input { width:100%; min-width:0; border:0; background:transparent; outline:0; padding:3px 0 0; color:#1d76c9; font-weight:850; font-size:12px; }
.guest-bill-qty b { font-size:18px; }
@media (max-width:390px){ .guest-cart-like-pos { grid-template-columns:.62fr .92fr .76fr 1.25fr !important; gap:4px !important; } .guest-bill-cell { padding:4px 3px; } .guest-bill-cell b,.guest-bill-note input { font-size:10.5px; } }

/* Thanh toán: thời gian + nhân viên rõ hơn, nút HĐĐT nổi bật */
#btnEinvoice { font-size:14px !important; font-weight:950 !important; background:#fff !important; color:#1671c9 !important; border:2px solid #fff !important; box-shadow:0 2px 7px rgba(0,0,0,.13); }
.pay-meta-row { padding:3px 12px 8px !important; grid-template-columns:minmax(0,1.25fr) minmax(0,.75fr) !important; }
.pay-meta-row input { font-size:16px !important; font-weight:800 !important; min-height:46px !important; }

/* Quy đổi tỷ giá: ô tiền lớn và thoáng */
.fx-form .field input,.fx-form .pair input { min-height:48px !important; font-size:18px !important; font-weight:750 !important; padding:0 12px !important; }
.fx-form .fx-row { margin-bottom:14px; }

/* Nút LƯU quy trình bán hàng cố định thực sự phía trên tabbar */
#saveSale.sale-save { position:fixed !important; left:12px !important; right:12px !important; bottom:calc(84px + env(safe-area-inset-bottom,0px)) !important; width:auto !important; margin:0 !important; z-index:60 !important; }
.sale-form { padding-bottom:84px !important; }

/* Excel: Nhập/Xuất xếp dọc trong một khối gọn */
.menu-file-actions { grid-template-columns:1fr !important; width:min(132px,42vw); gap:5px !important; padding:8px 8px 0 !important; }
.menu-file-actions .btn { min-height:38px !important; }

/* Báo cáo bổ sung */
.rp-extra-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:10px 0; }
.rp-extra-card { border:1.5px solid #e5c7a6; border-radius:10px; background:#fffdf6; padding:10px; min-height:72px; text-align:left; color:#432d20; font:inherit; }
.rp-extra-card b { display:block; font-size:14px; font-weight:950; }
.rp-extra-card small { display:block; margin-top:3px; color:#8a6a55; font-size:11px; }
.rp-money4 { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:10px 0; }
.rp-money4 .cell { border:1px solid #ead4be; border-radius:9px; padding:10px; background:#fff; }
.rp-money4 .cell small { display:block; color:#8c735f; font-weight:700; }
.rp-money4 .cell b { display:block; margin-top:4px; font-size:18px; }
.rp-einv-total { font-weight:950; background:#fff4d6 !important; }
.rp-app-chart { display:grid; gap:7px; margin:10px 0; }
.rp-app-bar { display:grid; grid-template-columns:110px minmax(0,1fr) auto; gap:7px; align-items:center; }
.rp-app-bar .track { height:12px; border-radius:7px; background:#f2e6d9; overflow:hidden; }
.rp-app-bar .track i { display:block; height:100%; background:currentColor; border-radius:7px; }
.rp-app-bar b { font-size:11px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* E-invoice sheets */
.einv-sheet { max-height:min(88dvh,900px); overflow:auto; overscroll-behavior:contain; }
.einv-mode-row { display:grid; grid-template-columns:1fr 1fr; gap:7px; margin:8px 0 12px; }
.einv-mode-row button { min-height:40px; border:1.5px solid #e1c19e; border-radius:9px; background:#fff; font-weight:850; }
.einv-mode-row button.on { background:#d62828; color:#fff; border-color:#b91d1d; }
.einv-lookup-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px; align-items:end; }
.einv-provider-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
.einv-provider-card { border:1.5px solid #e7d1bb; border-radius:9px; background:#fff; min-height:66px; padding:9px; display:grid; gap:2px; text-align:left; }
.einv-provider-card.on { border-color:#d94a32; background:#fff7f0; }
.einv-provider-card b { font-size:13px; }
.einv-provider-card small { color:#806854; font-size:10px; }


/* KZPOS FIX9 final refinements 2026-10-01 */
.menu-file-actions{
  grid-template-columns:1fr !important;
  width:min(138px,44vw) !important;
  gap:0 !important;
  margin:8px 8px 0 !important;
  padding:5px !important;
  border:1px solid #efcaa7 !important;
  border-radius:9px !important;
  background:#fffaf0 !important;
  box-shadow:0 2px 7px rgba(115,72,32,.05);
}
.menu-file-actions .btn{
  width:100% !important;
  min-height:37px !important;
  margin:0 !important;
  border:0 !important;
  border-radius:5px !important;
  background:transparent !important;
  box-shadow:none !important;
  font-weight:900 !important;
}
.menu-file-actions .btn + .btn{ border-top:1px solid #f1dcc8 !important; }
.rp-app-bar > i{height:12px;border-radius:6px;background:#f2e6d9;overflow:hidden;display:block;}
.rp-app-bar > i > em{height:100%;display:block;border-radius:6px;background:#ed6d35;min-width:2%;}
.rp-app-provider{border:1px solid #ecd9c6;border-radius:9px;background:#fffdf7;padding:10px;margin:10px 0;}
.rp-app-provider h3{margin:0 0 8px;font-size:16px;color:#4d2c1d;}
.rp-app-order{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 8px;padding:8px 4px;border-bottom:1px dashed #ead8c7;}
.rp-app-order b,.rp-app-order small{grid-column:1/-1}.rp-app-order strong{text-align:right;color:#ce3c22}.rp-app-order small{color:#765a4b}

/* KZPOS FIX10 — mobile lock + Excel buttons + responsive polish 2026-10-01 */
:root{
  --kpos-vh:100dvh;
  --kpos-vw:100vw;
  --kpos-tab-h:76px;
}
html.phone, body.phone{
  width:100%;
  height:var(--kpos-vh);
  min-height:var(--kpos-vh);
  max-height:var(--kpos-vh);
  overscroll-behavior:none;
  overflow:hidden !important;
}
body.phone #app{
  position:fixed;
  inset:0;
  width:100%;
  height:var(--kpos-vh);
  min-height:0;
  max-height:var(--kpos-vh);
  overflow:hidden !important;
  transform:none !important;
}
body.phone #app > .page:not(.hidden){
  position:absolute;
  inset:0;
  width:100%;
  height:var(--kpos-vh);
  min-height:0 !important;
  max-height:none !important;
  overflow-x:hidden !important;
  overflow-y:auto !important;
  overscroll-behavior-y:contain;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
  touch-action:pan-y;
}
body.phone #app > .page:not(.hidden)::-webkit-scrollbar{display:none;width:0;height:0}
body.phone .page.pad{
  padding-bottom:calc(var(--kpos-tab-h) + 42px + env(safe-area-inset-bottom,0px)) !important;
}
body.phone #page-home{
  height:var(--kpos-vh) !important;
  min-height:0 !important;
  padding-bottom:calc(var(--kpos-tab-h) + 22px + env(safe-area-inset-bottom,0px)) !important;
}
body.phone .tabbar{
  left:max(8px,env(safe-area-inset-left,0px));
  right:max(8px,env(safe-area-inset-right,0px));
  bottom:max(7px,env(safe-area-inset-bottom,0px));
  max-width:none;
  border-radius:12px !important;
  padding:4px 4px 5px;
}
body.phone .tabbar button{border-radius:8px !important}
body.phone .tabbar .plus{border-radius:50% !important}
body.phone .sheet,
body.phone .keypad{
  width:100%;
  height:var(--kpos-vh);
  max-height:var(--kpos-vh);
  overflow:hidden;
  overscroll-behavior:none;
}
body.phone .sheet .box,
body.phone .keypad .box{
  width:100%;
  max-width:100%;
  max-height:calc(var(--kpos-vh) - 10px) !important;
  border-radius:14px 14px 0 0 !important;
  overflow-x:hidden !important;
  overflow-y:auto !important;
  overscroll-behavior:contain;
}
body.phone input,
body.phone select,
body.phone textarea,
body.phone button{
  max-width:100%;
}
body.phone .pair,
body.phone .grid2,
body.phone .grid3{
  min-width:0;
}
body.phone img{max-width:100%;height:auto}
@media (max-width:390px){
  body.phone .page.pad{padding-left:9px;padding-right:9px}
  body.phone .page.pad > .bar-blue{margin-left:-9px;margin-right:-9px;padding-left:10px;padding-right:10px}
  body.phone .bar-blue h1{font-size:15px}
  body.phone .btn-mini{font-size:11px;padding:6px 8px}
}
@media (max-width:350px){
  body.phone .tabbar{left:5px;right:5px}
  body.phone .tabbar button span{font-size:9px}
  body.phone .tabbar .plus{width:48px;height:48px}
}

/* Nhập / Xuất Excel: nhỏ, gọn, bám trái; Nhập xanh — Xuất đỏ */
.menu-file-actions{
  width:min(118px,34vw) !important;
  margin:8px auto 0 8px !important;
  padding:0 !important;
  gap:6px !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  justify-self:start !important;
  align-self:start !important;
}
.menu-file-actions .btn{
  min-height:32px !important;
  height:32px !important;
  padding:4px 8px !important;
  border:1.5px solid #e9ba55 !important;
  border-radius:6px !important;
  color:#fff !important;
  font-size:12px !important;
  line-height:1.05 !important;
  font-weight:900 !important;
  box-shadow:0 1px 3px rgba(80,45,20,.10) !important;
}
.menu-file-actions #importMenuExcel{
  background:#299848 !important;
}
.menu-file-actions [data-xlsx="menu"]{
  background:#d92d2d !important;
}
.menu-file-actions .btn + .btn{border-top:1.5px solid #e9ba55 !important}

/* FIX10 — HĐĐT: chế độ phát hành cấu hình theo từng nhà cung cấp; màn thanh toán chỉ nhập khách */
.einv-admin-hint,.einv-admin-foot{
  text-align:left !important;
  margin:6px 0 10px !important;
  line-height:1.35;
}
.einv-provider-mode-title{
  margin:10px 0 6px;
  font-weight:950;
  color:#4a2d1e;
}
.einv-provider-mode{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  margin:0 0 12px;
}
.einv-provider-mode button{
  position:relative;
  min-width:0;
  min-height:82px;
  padding:10px 10px 9px 34px;
  border:1.5px solid #e6c39b;
  border-radius:9px;
  background:#fffdf8;
  color:#3f2a1d;
  text-align:left;
  font:inherit;
}
.einv-provider-mode button > span{
  position:absolute;
  left:9px;
  top:11px;
  width:18px;
  height:18px;
  border:1.5px solid #d6b58f;
  border-radius:5px;
  display:grid;
  place-items:center;
  color:transparent;
  font-size:12px;
  font-weight:950;
  background:#fff;
}
.einv-provider-mode button b{display:block;font-size:13px;font-weight:950;line-height:1.15}
.einv-provider-mode button small{display:block;margin-top:5px;font-size:10px;line-height:1.25;color:#826650}
.einv-provider-mode button.on{
  border-color:#e9a11b;
  background:#fff6d8;
  box-shadow:0 1px 5px rgba(120,72,20,.10);
}
.einv-provider-mode button.on > span{background:#2b9348;border-color:#2b9348;color:#fff}

.einvoice-customer-sheet{
  width:min(720px,calc(100vw - 18px)) !important;
  max-width:720px !important;
  padding:14px !important;
  overflow:hidden !important;
  display:flex;
  flex-direction:column;
}
.einv-pay-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:0 1px 8px;
  border-bottom:1px solid #efd8c1;
}
.einv-pay-head h2{margin:0 !important;font-size:19px !important;line-height:1.1}
.einv-pay-head small{display:block;margin-top:4px;color:#8b6b54;font-size:11px;font-weight:750}
.einv-x{
  flex:0 0 34px;
  width:34px;
  height:34px;
  border:1.5px solid #e2b88c;
  border-radius:8px;
  background:#fff8ed;
  color:#a23b24;
  font-size:23px;
  line-height:1;
  font-weight:800;
}
.einvoice-customer-sheet .einvoice-kind{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:7px;
  margin:9px 0 10px;
}
.einvoice-customer-sheet .einvoice-kind button{
  min-height:40px;
  padding:7px 8px;
  border:1.5px solid #e6c29b;
  border-radius:8px;
  background:#fffdf8;
  color:#543623;
  font-size:12px;
  font-weight:900;
}
.einvoice-customer-sheet .einvoice-kind button.on{
  background:#fff0c7;
  border-color:#e49b1c;
  color:#9b321e;
}
.einv-customer-grid{
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px 10px;
  padding:0 2px 4px;
}
.einv-biz-grid{display:contents}
.einvoice-customer-sheet .field{margin:0 !important;min-width:0}
.einvoice-customer-sheet .field label{
  display:block;
  margin:0 0 4px;
  font-size:11px;
  font-weight:850;
  color:#76523b;
}
.einvoice-customer-sheet .field input,
.einvoice-customer-sheet .field select{
  width:100%;
  min-width:0;
  min-height:42px;
  height:42px;
  padding:7px 9px;
  border:1.5px solid #e8c6a4;
  border-radius:8px;
  background:#fffef9;
  font-size:14px;
  color:#2d211a;
}
.einv-full{grid-column:1/-1}
.einv-tax-field{grid-column:1/-1}
.tax-lookup-pair{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  gap:7px !important;
  align-items:stretch !important;
  padding:0 !important;
  position:static !important;
}
.einv-lookup-btn{
  width:auto !important;
  min-width:90px;
  min-height:42px !important;
  height:42px !important;
  padding:6px 12px !important;
  border-radius:8px !important;
  background:#fff2c9 !important;
  border:1.5px solid #e8a22b !important;
  color:#9c371f !important;
  font-size:12px !important;
  font-weight:950 !important;
}
.einv-lookup-hint{display:block;margin:4px 1px 0;font-size:10px !important;text-align:left !important;line-height:1.25}
.einv-id-row{display:grid;grid-template-columns:160px minmax(0,1fr);gap:7px}
.einv-pay-actions{
  display:grid;
  grid-template-columns:minmax(110px,.35fr) minmax(0,1fr);
  gap:8px;
  padding-top:10px;
  margin-top:7px;
  border-top:1px solid #efd8c1;
  background:#fff;
}
.einv-pay-actions .btn{
  min-height:44px !important;
  margin:0 !important;
  border-radius:8px !important;
  font-size:13px !important;
  font-weight:950 !important;
}
.einv-confirm-btn{
  background:#d92d2d !important;
  border:1.5px solid #b91d1d !important;
  color:#fff !important;
}

@media (max-width:560px){
  .einvoice-customer-sheet{
    width:100% !important;
    max-width:100% !important;
    max-height:calc(var(--kpos-vh) - 6px) !important;
    height:auto !important;
    padding:10px !important;
    border-radius:12px 12px 0 0 !important;
  }
  .einv-pay-head h2{font-size:17px !important}
  .einv-customer-grid{grid-template-columns:1fr;gap:7px}
  .einv-biz-grid{display:contents}
  .einv-full,.einv-tax-field{grid-column:1}
  .einvoice-customer-sheet .field input,
  .einvoice-customer-sheet .field select{font-size:15px;min-height:43px;height:43px}
  .einv-id-row{grid-template-columns:120px minmax(0,1fr)}
  .einv-provider-mode{grid-template-columns:1fr}
  .einv-provider-mode button{min-height:68px}
  .einv-pay-actions{grid-template-columns:112px minmax(0,1fr);position:sticky;bottom:0;padding-bottom:max(2px,env(safe-area-inset-bottom,0px));z-index:3}
}
@media (max-width:350px){
  .einvoice-customer-sheet .einvoice-kind button{font-size:10.5px;padding:6px 5px}
  .tax-lookup-pair{grid-template-columns:minmax(0,1fr) 78px !important}
  .einv-lookup-btn{min-width:78px;padding:5px 7px !important}
  .einv-pay-actions{grid-template-columns:94px minmax(0,1fr);gap:6px}
}


/* FIX10 R1 - QR Order: chọn đủ mức giá như màn nhân viên */
.guest-price-box h2{margin:2px 0 6px;font-size:20px;line-height:1.2}
.guest-price-hint{margin:0 0 10px;color:#7a5a43;font-size:12px;line-height:1.35}
.guest-price-list{display:grid;gap:7px}
.guest-price-list button{width:100%;min-height:50px;border:1.5px solid #e6a85e;border-radius:10px;background:#fffaf0;color:#3b2a24;padding:8px 10px;display:flex;align-items:center;justify-content:space-between;gap:10px;text-align:left;font:inherit}
.guest-price-list button span{font-weight:850;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.guest-price-list button b{color:#c43c2c;font-size:16px;white-space:nowrap}
.guest-price-close{width:100%;min-height:42px;margin-top:9px;border:1.5px solid #e4b77e;border-radius:9px;background:#fff;color:#8a3b23;font-weight:850}
.kprint-bind-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; margin-bottom:10px; }
.kprint-bind-head > div { min-width:0; flex:1; }
.kprint-bind-head b { font-size:16px; }
.kprint-dot { flex:none; font-size:11px; font-weight:900; color:#a43f2d; background:#fff; border:1px solid #e6b28e; border-radius:9px; padding:6px 8px; }
.kprint-dot.on { color:#16753c; border-color:#83c79f; background:#f1fff6; }
.kprint-bind-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.kprint-bind-actions .btn { min-height:40px; height:auto; padding:8px 10px; border-radius:10px; font-size:13px; }
.kprint-device-list { display:flex; flex-direction:column; gap:6px; margin:9px 0; }
.kprint-device-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:8px; align-items:center; background:#fff; border:1px solid #efd4aa; border-radius:10px; padding:8px 9px; }
.kprint-device-row span:first-child { min-width:0; display:flex; flex-direction:column; text-align:left; }
.kprint-device-row small { color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.kprint-device-row .ok { color:#16753c; font-weight:900; }
.kprint-device-row .off { color:#9a4f39; font-weight:800; }
@media (max-width:520px) {
  .kprint-bind-head { align-items:stretch; }
  .kprint-bind-actions { grid-template-columns:1fr; }
  .kprint-device-row { grid-template-columns:minmax(0,1fr) auto; }
  .kprint-device-row .btn-mini { grid-column:1 / -1; justify-self:end; }
}

/* KZPOS FIX10 R3 2026-10-02
   Bill điện thoại: tận dụng toàn bộ chiều cao màn hình cho danh sách món.
   Khối giảm/VAT/tổng/nút nghiệp vụ bám đáy bill; bỏ khoảng đệm tabbar khi đang POS
   vì tabbar đã ẩn trong chế độ bán hàng. */
body.phone.pos-on #page-pos {
  padding: 8px 8px max(8px, env(safe-area-inset-bottom, 0px)) !important;
}
body.phone.pos-on #posConfirm.bill-page:not(.hidden) {
  flex: 1 1 auto !important;
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
}
body.phone.pos-on #posConfirm .bill-shell {
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
}
body.phone.pos-on #posConfirm .bill-lines {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  padding-bottom: 4px !important;
}
body.phone.pos-on #posConfirm .bill-dock {
  flex: 0 0 auto !important;
  margin-top: auto !important;
  bottom: 0 !important;
}

/* Quy đổi tỷ giá: ô nhập phải rộng, chữ lớn, không bị ép bởi nhãn hai bên. */
.fx-form .fx-eq {
  display: grid !important;
  grid-template-columns: auto minmax(160px, 1fr) auto !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
}
.fx-form .fx-eq input {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 58px !important;
  padding: 0 14px !important;
  font-size: 22px !important;
  font-weight: 850 !important;
  text-align: center !important;
  letter-spacing: .2px;
}
.fx-form .fx-eq span {
  white-space: nowrap;
  font-weight: 750;
}
body.phone .fx-form .fx-eq {
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 6px 8px !important;
}
body.phone .fx-form .fx-eq > span:first-child {
  grid-column: 1 / -1;
  font-size: 13px;
  font-weight: 850;
}
body.phone .fx-form .fx-eq input {
  min-height: 60px !important;
  font-size: 24px !important;
}
/* Bảng số: số đang nhập nhìn rõ hơn trên điện thoại. */
body.phone .kp-screen {
  min-height: 64px !important;
  padding: 10px 14px !important;
  font-size: 34px !important;
  line-height: 1.1 !important;
}


/* KZPOS FIX10 R6 2026-10-02
   Bill mobile: kéo cụm Giảm/VAT/Tổng/Nút nghiệp vụ sát đáy hơn.
   Safe-area chỉ tính ở #page-pos, không cộng lần hai trong bill-dock. */
body.phone.pos-on #page-pos {
  padding-bottom: max(2px, env(safe-area-inset-bottom, 0px)) !important;
}
body.phone.pos-on #posConfirm .bill-shell {
  padding-bottom: 0 !important;
}
body.phone.pos-on #posConfirm .bill-dock {
  padding-bottom: 2px !important;
  margin-bottom: 0 !important;
}

/* FIX10 R7: Menu AI -> Excel KZPOS -> lọc trùng -> tự nhập */
.menu-ai-import-summary{margin:10px 0;padding:12px;border:1px solid #ebc98e;border-radius:12px;background:#fffaf0;display:grid;gap:7px;text-align:left}
.menu-ai-import-summary>b{font-size:15px;color:#4b2b1b}
.menu-ai-import-summary>span{font-size:12px;line-height:1.4;color:#725846}
.menu-ai-stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.menu-ai-stat-grid>div{border:1px solid #edd9b5;border-radius:9px;background:#fff;min-height:54px;display:grid;place-items:center;padding:5px;text-align:center}
.menu-ai-stat-grid b{font-size:18px;color:#d14928;line-height:1}
.menu-ai-stat-grid small{font-size:9px;color:#7b6555;line-height:1.15}
.menu-ai-warning{padding:8px 9px;border-radius:9px;background:#fff0d5;color:#8a4b08;font-size:11px;line-height:1.35}
.scan-ai-result-line{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 2px;border-top:1px dashed #eadcc8;font-size:12px}
.scan-ai-result-line span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:750}
.scan-ai-result-line b{flex:0 0 auto;color:#c93b25;font-size:11px}
.scan-group-title{display:flex;align-items:center;justify-content:space-between;gap:8px}
.scan-group-title small{font-size:10px;color:#8a6d59}
@media(max-width:420px){.menu-ai-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.menu-ai-import-summary{padding:10px}}

.scan-group-title{display:flex;align-items:center;justify-content:space-between;gap:8px}
.scan-group-title small{font-size:10px;color:#8a6d59}
@media(max-width:420px){.menu-ai-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.menu-ai-import-summary{padding:10px}}

/* ===== KZPOS CUSTOMER DISPLAY ADMIN ===== */
.display-admin{padding:12px 14px 100px;display:grid;gap:12px}.display-status-card,.display-card{background:#fffdf7;border:1px solid #efc58e;border-radius:14px;padding:14px;box-shadow:0 4px 18px rgba(113,63,12,.05)}.display-status-card{display:flex;align-items:center;justify-content:space-between;gap:14px}.display-status-card>div{display:grid;grid-template-columns:auto 1fr;column-gap:8px;align-items:center}.display-status-card small{grid-column:2;color:#8f6b48;margin-top:3px}.display-dot{width:10px;height:10px;border-radius:50%;background:#aaa;display:inline-block}.display-dot.on{background:#20a65a;box-shadow:0 0 0 4px #dff6e8}.display-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.display-card h3{margin:0 0 12px;font-size:18px;color:#2b2119}.display-card textarea,.display-card input,.display-card select{width:100%;box-sizing:border-box;border:1px solid #e9b879;border-radius:10px;background:#fff;padding:11px 12px;font:inherit}.display-card textarea:focus,.display-card input:focus,.display-card select:focus{outline:2px solid #ffd69b;outline-offset:1px}.display-checks{display:flex;flex-wrap:wrap;gap:10px 14px;margin:10px 0}.display-checks label,.switch-line{display:flex;align-items:center;gap:7px;font-weight:700;color:#4e3927}.display-checks input,.switch-line input{width:auto}.switch-line{margin-bottom:9px}.media-local-info{border:1px dashed #efb15e;background:#fff7e9;border-radius:10px;padding:10px 12px;margin-top:10px}.media-local-info small{display:block;color:#8d6c4d;margin-top:4px;line-height:1.4}.display-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.display-actions.two>*{flex:1 1 220px}.display-actions .btn,.display-card .btn{border-radius:10px;border:1px solid #d58f31;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;min-height:42px}.display-actions .btn.blue{background:#1f8de4;border-color:#1677c2;color:#fff}.display-actions .btn.ghost{background:#fff7ea;color:#7a4d15}.display-connect{display:grid;grid-template-columns:180px 1fr;gap:18px;align-items:center}.display-qr img{width:170px;height:170px;display:block;border-radius:12px;border:1px solid #e3b36e;background:#fff}.display-connect-text label{display:grid;gap:6px;font-weight:700}.pair-code{font-size:18px;margin:10px 0}.pair-code b{letter-spacing:2px;color:#d84b1a}.display-connect-text p{color:#765a40;line-height:1.5}.display-save{min-height:48px;border-radius:10px!important;background:linear-gradient(180deg,#ff8736,#ef5b21)!important;border:1px solid #d34b16!important;color:#fff!important;font-weight:800!important}.display-foot{text-align:center}.switch-row.compact{min-width:190px}
@media(max-width:760px){.display-grid{grid-template-columns:1fr}.display-status-card{align-items:flex-start;flex-direction:column}.display-connect{grid-template-columns:1fr}.display-qr{display:flex;justify-content:center}.display-actions .btn{width:100%}.display-connect-text p{font-size:13px}}

/* ============================================================
   KZPOS_PC_GRID_R1_20261004
   CHI GIAO DIEN PC / body.wide
   - Khu vuc: 6 / hang
   - Ban: 10 / hang
   - Ten khu: +2px, dam, do
   - Nhom hang POS: 10 / hang
   - Mat hang PC: 6 / hang
   KHONG TAC DONG MOBILE / TABLET
   ============================================================ */

/* 1. DANH SACH KHU VUC: 6 O / HANG */
body.wide #areaJump {
  overflow: visible !important;
  max-width: none !important;
}

body.wide #areaJump > .chips {
  display: grid !important;
  grid-template-columns: repeat(10, minmax(0, 1fr)) !important;
  grid-auto-flow: row !important;
  gap: 7px !important;
  width: 100% !important;
  overflow: visible !important;
}

body.wide #areaJump > .chips > button {
  min-width: 0 !important;
  width: 100% !important;
  max-width: none !important;
  white-space: normal !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}


/* 2. DANH SACH BAN: 10 BAN / HANG */
body.wide #tableList .table-grid {
  display: grid !important;
  grid-template-columns: repeat(10, minmax(0, 1fr)) !important;
  gap: 6px !important;
}

body.wide #tableList .tcard {
  min-width: 0 !important;
  width: 100% !important;
}


/* 3. TEN KHU VUC DAU DAY BAN */
body.wide #tableList .area-block > h3 {
  align-items: center !important;
}

body.wide #tableList .area-block > h3 > [data-edit-area] {
  font-size: 15px !important;
  line-height: 1.2 !important;
  font-weight: 950 !important;
  color: #d62828 !important;
  letter-spacing: .1px !important;
}


/* GIU SO BAN TRONG KHU NHO HON TEN KHU */
body.wide #tableList .area-block > h3 > span {
  font-size: 12px !important;
  font-weight: 800 !important;
}


/* 4. NHOM HANG POS: 10 NHOM / HANG */
body.wide #page-pos #posCatWrap {
  overflow: visible !important;
  max-height: none !important;
}

body.wide #page-pos #posCatWrap #posCats,
body.wide #page-pos #posCatWrap.cat-scroll #posCats {
  display: grid !important;
  grid-template-columns: repeat(10, minmax(0, 1fr)) !important;
  grid-auto-flow: row !important;
  grid-auto-columns: unset !important;
  gap: 6px !important;
  width: 100% !important;
  overflow: visible !important;
}

body.wide #page-pos #posCatWrap #posCats > button {
  min-width: 0 !important;
  width: 100% !important;
  max-width: none !important;
  white-space: normal !important;
  line-height: 1.15 !important;
}


/* 5. MAT HANG PC: 6 MAT HANG / HANG */
body.wide #page-pos .mo-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
}

body.wide #page-menu #itemList.prod-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
}

/* END KZPOS_PC_GRID_R1_20261004 */


/* ==========================================================
   KZPOS_PC_HOME_5COL_FINAL_R3
   Khóa bố cục Tổng quan PC/POS lớn = 5 mục mỗi hàng
   Mobile không bị ảnh hưởng.
   ========================================================== */

body.wide #page-home .mods,
body.pos12 #page-home .mods,
body.pos15 #page-home .mods,
body.desk #page-home .mods {
  grid-template-columns:
    repeat(5, minmax(0, 1fr)) !important;
  width: 100% !important;
  max-width: none !important;
  gap: 10px !important;
}

body.wide #page-home .mod,
body.pos12 #page-home .mod,
body.pos15 #page-home .mod,
body.desk #page-home .mod,
body.wide #page-home .kz-debt-home-card,
body.pos12 #page-home .kz-debt-home-card,
body.pos15 #page-home .kz-debt-home-card,
body.desk #page-home .kz-debt-home-card {
  min-height: 112px !important;
}


/* ==========================================================
   KZPOS_SALE_SETTINGS_COMPACT_R1
   Quy trình bán hàng gọn, dành chỗ bổ sung nghiệp vụ mới
   ========================================================== */

#moreBox.kz-sale-compact-r1 {
  padding-bottom: 100px;
}

#moreBox.kz-sale-compact-r1
.switch-row,
#moreBox.kz-sale-compact-r1
.admin-switch-card {
  min-height: 54px !important;
  margin: 0 0 6px !important;
  padding: 8px 12px !important;
  border-radius: 12px;
}

#moreBox.kz-sale-compact-r1
.switch-row span,
#moreBox.kz-sale-compact-r1
.admin-switch-card span {
  min-width: 0;
}

#moreBox.kz-sale-compact-r1
.switch-row b,
#moreBox.kz-sale-compact-r1
.admin-switch-card b {
  font-size: 15px;
  line-height: 1.25;
}

#moreBox.kz-sale-compact-r1
.field {
  margin: 8px 0 !important;
}

#moreBox.kz-sale-compact-r1
.field > label {
  margin-bottom: 5px;
  font-weight: 750;
}

#moreBox.kz-sale-compact-r1
.pair {
  gap: 8px;
}

#moreBox.kz-sale-compact-r1
.kz-sale-save-sticky {
  position: sticky;
  bottom: 82px;
  z-index: 20;
  width: 100%;
  min-height: 52px;
  margin-top: 12px;
  font-size: 17px;
  font-weight: 850;
}

@media (min-width: 900px) {
  #moreBox.kz-sale-compact-r1 {
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
  }

  #moreBox.kz-sale-compact-r1
  .kz-sale-save-sticky {
    bottom: 12px;
  }
}

/* ==========================================================
   KZPOS_SALE_PROCESS_COMPACT_R2
   ========================================================== */

#moreBox.kz-sale-compact-r2 {
  display: grid !important;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 8px !important;
  max-width: 980px !important;
  margin: 0 auto !important;
  padding: 6px 10px 90px !important;
  align-content: start;
}

#moreBox.kz-sale-compact-r2
> label.switch-row,
#moreBox.kz-sale-compact-r2
> label.admin-switch-card {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;

  width: 100% !important;
  min-width: 0 !important;
  min-height: 58px !important;

  margin: 0 !important;
  padding: 9px 12px !important;

  background: rgba(255,255,255,.72) !important;
  border: 1px solid #ecd3b6 !important;
  border-radius: 12px !important;
  box-shadow: none !important;
}

#moreBox.kz-sale-compact-r2
> label.switch-row
> span,
#moreBox.kz-sale-compact-r2
> label.admin-switch-card
> span {
  min-width: 0;
  flex: 1 1 auto;
  padding-right: 12px;
}

#moreBox.kz-sale-compact-r2
> label.switch-row b,
#moreBox.kz-sale-compact-r2
> label.admin-switch-card b {
  display: block;
  font-size: 14px !important;
  line-height: 1.25 !important;
  margin: 0 !important;
}

#moreBox.kz-sale-compact-r2
> label.switch-row input[type="checkbox"],
#moreBox.kz-sale-compact-r2
> label.admin-switch-card input[type="checkbox"] {
  flex: 0 0 auto;
}


/* Khối nhắc ORDER QR / APPFOOD */
#moreBox.kz-sale-compact-r2
> .kz-sale-notify-field {
  grid-column: 1 / -1;
  margin: 2px 0 0 !important;
  padding: 10px 12px !important;

  background: rgba(255,255,255,.55);
  border: 1px solid #ecd3b6;
  border-radius: 12px;
}

#moreBox.kz-sale-compact-r2
> .kz-sale-notify-field
> label {
  display: block;
  margin: 0 0 7px !important;
  font-size: 14px;
  font-weight: 800;
}

#moreBox.kz-sale-compact-r2
> .kz-sale-notify-field
.pair {
  display: grid !important;
  grid-template-columns:
    minmax(100px, 170px)
    minmax(120px, 170px) !important;
  gap: 8px !important;
  max-width: 350px !important;
}

#moreBox.kz-sale-compact-r2
> .kz-sale-notify-field
input,
#moreBox.kz-sale-compact-r2
> .kz-sale-notify-field
select {
  min-height: 42px !important;
}


/* Lưu */
#moreBox.kz-sale-compact-r2
> .kz-sale-save-sticky {
  grid-column: 1 / -1;
  width: 100% !important;
  min-height: 50px !important;
  margin: 4px 0 0 !important;

  position: sticky !important;
  bottom: 10px !important;
  z-index: 20;
}


/* Điện thoại: 1 mục / hàng */
@media (max-width: 760px) {

  #moreBox.kz-sale-compact-r2 {
    grid-template-columns:
      minmax(0, 1fr) !important;

    padding:
      6px 8px 105px !important;
  }

  #moreBox.kz-sale-compact-r2
  > label.switch-row,
  #moreBox.kz-sale-compact-r2
  > label.admin-switch-card,
  #moreBox.kz-sale-compact-r2
  > .kz-sale-notify-field,
  #moreBox.kz-sale-compact-r2
  > .kz-sale-save-sticky {
    grid-column: 1 !important;
  }

  #moreBox.kz-sale-compact-r2
  > .kz-sale-notify-field
  .pair {
    grid-template-columns:
      1fr 1fr !important;
    max-width: none !important;
  }

  #moreBox.kz-sale-compact-r2
  > .kz-sale-save-sticky {
    bottom: 82px !important;
  }
}

/* KZPOS_LOGIN_AUTOFILL_R5 */
#username:-webkit-autofill,
#username:-webkit-autofill:hover,
#username:-webkit-autofill:focus,
#password:-webkit-autofill,
#password:-webkit-autofill:hover,
#password:-webkit-autofill:focus {
  -webkit-text-fill-color: #2b2018 !important;
  caret-color: #2b2018 !important;
  -webkit-box-shadow:
    0 0 0 1000px #fffaf0 inset !important;
  box-shadow:
    0 0 0 1000px #fffaf0 inset !important;
  transition:
    background-color 99999s ease-out 0s !important;
}

#username,
#password {
  background-color: #fffaf0 !important;
  color: #2b2018 !important;
}


/* ==========================================================
   KZPOS_SALE_SOURCE_CLEAN_R6C_CSS
   ========================================================== */

#moreBox .sale-form.kz-sale-r6c {
  display: grid !important;

  grid-template-columns:
    repeat(2, minmax(0, 1fr)) !important;

  gap: 8px !important;

  width: 100% !important;
  max-width: 980px !important;

  margin: 0 auto !important;

  padding:
    8px 12px 100px !important;

  box-sizing:
    border-box !important;

  background:
    transparent !important;
}


#moreBox
.sale-form.kz-sale-r6c
> label.switch-row {
  display: flex !important;

  align-items: center !important;
  justify-content: space-between !important;

  gap: 10px !important;

  width: 100% !important;
  min-width: 0 !important;

  min-height: 54px !important;

  margin: 0 !important;

  padding:
    8px 12px !important;

  box-sizing:
    border-box !important;

  background:
    rgba(255,255,255,.82) !important;

  border:
    1px solid #ecd3b6 !important;

  border-radius:
    12px !important;

  box-shadow:
    none !important;
}


#moreBox
.sale-form.kz-sale-r6c
> label.switch-row small {
  display: none !important;
}


#moreBox
.sale-form.kz-sale-r6c
> label.switch-row
> span {
  flex:
    1 1 auto !important;

  min-width:
    0 !important;

  padding-right:
    10px !important;

  font-size:
    14px !important;

  line-height:
    1.25 !important;

  font-weight:
    750 !important;
}


#moreBox
.sale-form.kz-sale-r6c
> label.switch-row
> input[type="checkbox"] {
  flex:
    0 0 auto !important;

  margin-left:
    auto !important;
}


#moreBox
.sale-form.kz-sale-r6c
> label.switch-row
> i {
  flex:
    0 0 auto !important;

  margin-left:
    0 !important;
}


/* ORDER QR / APPFOOD */

#moreBox
.sale-form.kz-sale-r6c
> .kz-sale-notify-r6c {
  grid-column:
    1 / -1 !important;

  margin:
    2px 0 0 !important;

  padding:
    8px 12px !important;

  box-sizing:
    border-box !important;

  background:
    rgba(255,255,255,.60) !important;

  border:
    1px solid #ecd3b6 !important;

  border-radius:
    12px !important;
}


#moreBox
.sale-form.kz-sale-r6c
> .kz-sale-notify-r6c
> label {
  display:
    block !important;

  margin:
    0 0 6px !important;

  font-size:
    14px !important;

  font-weight:
    800 !important;
}


#moreBox
.sale-form.kz-sale-r6c
> .kz-sale-notify-r6c
.pair {
  display:
    grid !important;

  grid-template-columns:
    160px 160px !important;

  gap:
    8px !important;

  max-width:
    328px !important;
}


/* LƯU */

#moreBox
.sale-form.kz-sale-r6c
> #saveSale {
  grid-column:
    1 / -1 !important;

  width:
    100% !important;

  min-height:
    50px !important;

  margin:
    2px 0 0 !important;

  position:
    sticky !important;

  bottom:
    10px !important;

  z-index:
    20 !important;

  font-size:
    16px !important;

  font-weight:
    850 !important;
}


/* LOGIN FOCUS BLACK BOX */

#login .login-field input,
#login .login-field input:focus,
#login .login-field input:focus-visible,
#username:focus,
#username:focus-visible,
#password:focus,
#password:focus-visible {
  outline:
    none !important;

  outline-offset:
    0 !important;

  border:
    0 !important;

  box-shadow:
    none !important;

  -webkit-box-shadow:
    none !important;

  -webkit-tap-highlight-color:
    transparent !important;
}


/* MOBILE */

@media (max-width:760px) {

  #moreBox
  .sale-form.kz-sale-r6c {
    grid-template-columns:
      minmax(0, 1fr) !important;

    gap:
      7px !important;

    padding:
      8px 10px 110px !important;
  }


  #moreBox
  .sale-form.kz-sale-r6c
  > label.switch-row {
    min-height:
      58px !important;

    padding:
      9px 12px !important;
  }


  #moreBox
  .sale-form.kz-sale-r6c
  > label.switch-row
  > span {
    font-size:
      15px !important;
  }


  #moreBox
  .sale-form.kz-sale-r6c
  > .kz-sale-notify-r6c {
    grid-column:
      1 !important;
  }


  #moreBox
  .sale-form.kz-sale-r6c
  > .kz-sale-notify-r6c
  .pair {
    grid-template-columns:
      1fr 1fr !important;

    max-width:
      none !important;
  }


  #moreBox
  .sale-form.kz-sale-r6c
  > #saveSale {
    grid-column:
      1 !important;

    bottom:
      82px !important;
  }
}

/* ==========================================================
   KZPOS_SALE_UI_R7B
   Equal switch cards + notify pair must NOT be sticky
   ========================================================== */


/* ---------- PC: 2 cot bang nhau ---------- */

#moreBox .sale-form.kz-sale-r6c {
  grid-template-columns:
    repeat(2, minmax(0, 1fr)) !important;

  align-items:
    stretch !important;
}


#moreBox
.sale-form.kz-sale-r6c
> label.switch-row {
  width:
    100% !important;

  max-width:
    none !important;

  min-width:
    0 !important;

  height:
    56px !important;

  min-height:
    56px !important;

  margin:
    0 !important;

  box-sizing:
    border-box !important;

  align-self:
    stretch !important;
}


#moreBox
.sale-form.kz-sale-r6c
> label.switch-row
> span {
  flex:
    1 1 auto !important;

  min-width:
    0 !important;
}


/* Công tắc thẳng mép phải */

#moreBox
.sale-form.kz-sale-r6c
> label.switch-row
> input[type="checkbox"] {
  flex:
    0 0 auto !important;

  margin-left:
    auto !important;
}


#moreBox
.sale-form.kz-sale-r6c
> label.switch-row
> i {
  flex:
    0 0 auto !important;

  margin-left:
    0 !important;
}


/* ==========================================================
   FIX QUAN TRONG:
   Global .pair cua KZPOS dang position:sticky; bottom:70px.
   Tai Quy trinh ban hang thi 10 + giay phai NAM TRONG CARD.
   ========================================================== */

#moreBox
.sale-form.kz-sale-r6c
> .kz-sale-notify-r6c
> .pair {
  position:
    static !important;

  top:
    auto !important;

  right:
    auto !important;

  bottom:
    auto !important;

  left:
    auto !important;

  z-index:
    auto !important;

  transform:
    none !important;

  display:
    grid !important;

  grid-template-columns:
    160px 160px !important;

  gap:
    8px !important;

  width:
    328px !important;

  max-width:
    100% !important;

  margin:
    0 !important;

  padding:
    0 !important;

  box-sizing:
    border-box !important;
}


/* Hai ô cao bằng nhau và nằm yên */

#moreBox
.sale-form.kz-sale-r6c
> .kz-sale-notify-r6c
> .pair
> input,

#moreBox
.sale-form.kz-sale-r6c
> .kz-sale-notify-r6c
> .pair
> select {
  position:
    static !important;

  width:
    100% !important;

  min-width:
    0 !important;

  height:
    42px !important;

  min-height:
    42px !important;

  margin:
    0 !important;

  box-sizing:
    border-box !important;

  transform:
    none !important;
}


/* Khung nhac tu co chieu cao theo noi dung */

#moreBox
.sale-form.kz-sale-r6c
> .kz-sale-notify-r6c {
  position:
    static !important;

  min-height:
    92px !important;

  height:
    auto !important;

  overflow:
    visible !important;
}


/* ---------- MOBILE ---------- */

@media (max-width:760px) {

  #moreBox
  .sale-form.kz-sale-r6c {
    grid-template-columns:
      minmax(0, 1fr) !important;
  }


  #moreBox
  .sale-form.kz-sale-r6c
  > label.switch-row {
    width:
      100% !important;

    height:
      58px !important;

    min-height:
      58px !important;
  }


  #moreBox
  .sale-form.kz-sale-r6c
  > .kz-sale-notify-r6c
  > .pair {
    position:
      static !important;

    grid-template-columns:
      minmax(0, 1fr)
      minmax(0, 1fr) !important;

    width:
      100% !important;

    max-width:
      none !important;

    margin:
      0 !important;

    padding:
      0 !important;

    bottom:
      auto !important;
  }


  #moreBox
  .sale-form.kz-sale-r6c
  > .kz-sale-notify-r6c
  > .pair
  > input,

  #moreBox
  .sale-form.kz-sale-r6c
  > .kz-sale-notify-r6c
  > .pair
  > select {
    position:
      static !important;

    height:
      42px !important;

    min-height:
      42px !important;
  }
}



/* ==========================================================
   KZPOS_BUY_GET_ENGINE_R1_CSS
   ========================================================== */

#posCart .mo-line.promo-gift {
  border:
    1px solid #efb24a !important;

  background:
    #fff8dc !important;
}

#posCart
.mo-line.promo-gift
.mo-line-top
> span:first-child {
  font-weight:
    850 !important;
}

#posCart
.mo-line.promo-gift
.bom-tag {
  display:
    inline-block !important;

  margin-left:
    5px !important;

  padding:
    2px 6px !important;

  border-radius:
    999px !important;

  font-weight:
    900 !important;
}



/* ==========================================================
   KZPOS_PROMOTION_V2_R2C1_CSS
   Ma trận món hàng x mức giá
   ========================================================== */

.kz-r2c-promo-form {
  min-width: 0;
}

.kz-r2c-matrix-wrap {
  width: 100%;
  max-height: 340px;
  overflow: auto;
  border: 1px solid #ecd3b6;
  border-radius: 12px;
  background: rgba(255,255,255,.62);
  -webkit-overflow-scrolling: touch;
}

.kz-r2c-matrix {
  width: 100%;
  min-width: 650px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.kz-r2c-matrix th,
.kz-r2c-matrix td {
  padding: 7px 6px;
  border-bottom: 1px solid #f0dcc6;
  border-right: 1px solid #f4e5d5;
  text-align: center;
  vertical-align: middle;
  box-sizing: border-box;
}

.kz-r2c-matrix th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff7e9;
  font-size: 12px;
  font-weight: 850;
}

.kz-r2c-matrix .kz-r2c-name {
  width: 190px;
  text-align: left;
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fffaf2;
}

.kz-r2c-matrix thead .kz-r2c-name {
  z-index: 3;
  background: #fff3dd;
}

.kz-r2c-matrix td.kz-r2c-na {
  color: #aaa;
  background: #faf7f2;
}

.kz-r2c-check {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 42px;
  cursor: pointer;
  user-select: none;
}

.kz-r2c-check input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: #d39f16;
}

.kz-r2c-check span {
  min-width: 0;
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.15;
}

.kz-r2c-check b {
  font-size: 11px;
  white-space: nowrap;
}

.kz-r2c-check small {
  margin-top: 2px;
  font-size: 10px;
  color: #8d6847;
  white-space: nowrap;
}

.kz-r2c-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 6px;
}

.kz-r2c-groups label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 9px;
  border: 1px solid #ead2b8;
  border-radius: 10px;
  background: #fffaf2;
}

.kz-r2c-groups input {
  width: 17px;
  height: 17px;
  accent-color: #d39f16;
}

@media (max-width: 640px) {
  .kz-r2c-matrix-wrap {
    max-height: 300px;
  }

  .kz-r2c-matrix {
    min-width: 600px;
  }

  .kz-r2c-matrix .kz-r2c-name {
    width: 160px;
  }

  .kz-r2c-matrix th,
  .kz-r2c-matrix td {
    padding: 6px 5px;
  }

  .kz-r2c-check {
    min-height: 40px;
  }
}



/* ==========================================================
   KZPOS_PROMOTION_R2C1B_CSS
   Bảng giá cố định - bấm trực tiếp ô giá
   ========================================================== */

.kz-r2c-program-row {
  width: 100%;
  min-height: 48px;
  margin-top: 6px;
  padding: 7px 10px;
  text-align: left;
}

.kz-r2c-program-row b {
  display: block;
  font-size: 14px;
}

.kz-r2c-program-row span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  opacity: .72;
}

.kz-r2c-empty {
  padding: 11px 4px 3px;
  text-align: center;
  font-size: 12px;
  opacity: .7;
}


.kz-r2c-promo-form .field {
  margin-bottom: 8px !important;
}


.kz-r2c-promo-form .field > label {
  margin-bottom: 3px !important;
}


.kz-r2c-search {
  width: 100% !important;

  height: 38px !important;
  min-height: 38px !important;

  margin:
    4px 0 6px !important;

  padding:
    0 10px !important;

  box-sizing:
    border-box !important;

  border-radius:
    9px !important;

  font-size:
    14px !important;
}


.kz-r2c-matrix-wrap {
  width: 100% !important;
  max-width: 100% !important;

  max-height:
    300px !important;

  overflow-x:
    hidden !important;

  overflow-y:
    auto !important;

  border-radius:
    9px !important;

  -webkit-overflow-scrolling:
    touch;

  touch-action:
    pan-y;
}


.kz-r2c-matrix {
  width: 100% !important;

  min-width:
    0 !important;

  max-width:
    100% !important;

  table-layout:
    fixed !important;

  border-collapse:
    separate !important;

  border-spacing:
    0 !important;
}


.kz-r2c-matrix th,
.kz-r2c-matrix td {
  box-sizing:
    border-box !important;

  padding:
    2px !important;

  height:
    36px !important;

  vertical-align:
    middle !important;
}


.kz-r2c-matrix th {
  height:
    30px !important;

  font-size:
    10px !important;

  line-height:
    1.05 !important;

  white-space:
    normal !important;

  overflow:
    hidden !important;
}


/*
 * Tên hàng 40%.
 * 4 giá chia đều 15%.
 * Tổng = 100%.
 */
.kz-r2c-matrix th.kz-r2c-name,
.kz-r2c-matrix td.kz-r2c-name {
  width:
    40% !important;

  min-width:
    0 !important;

  max-width:
    none !important;

  position:
    static !important;

  padding-left:
    5px !important;

  padding-right:
    3px !important;
}


.kz-r2c-matrix th:not(.kz-r2c-name),
.kz-r2c-matrix td:not(.kz-r2c-name) {
  width:
    15% !important;
}


.kz-r2c-matrix td.kz-r2c-name b {
  display:
    -webkit-box !important;

  -webkit-box-orient:
    vertical !important;

  -webkit-line-clamp:
    2 !important;

  overflow:
    hidden !important;

  font-size:
    11px !important;

  line-height:
    1.08 !important;

  word-break:
    break-word !important;
}


.kz-r2c-na {
  font-size:
    10px !important;

  opacity:
    .4;
}


/*
 * Ô giá KHÔNG đổi kích thước khi chọn.
 */
.kz-r2c-price-cell {
  appearance:
    none !important;

  -webkit-appearance:
    none !important;

  display:
    flex !important;

  align-items:
    center !important;

  justify-content:
    center !important;

  width:
    100% !important;

  height:
    30px !important;

  min-height:
    30px !important;

  margin:
    0 !important;

  padding:
    1px !important;

  box-sizing:
    border-box !important;

  border:
    1px solid #e0c09d !important;

  border-radius:
    6px !important;

  background:
    #fffaf3 !important;

  color:
    #3b2c20 !important;

  font-size:
    10px !important;

  line-height:
    1 !important;

  font-weight:
    800 !important;

  white-space:
    nowrap !important;

  cursor:
    pointer;

  user-select:
    none;

  transform:
    none !important;

  transition:
    background-color .08s linear,
    color .08s linear,
    border-color .08s linear !important;
}


.kz-r2c-price-cell:hover,
.kz-r2c-price-cell:active,
.kz-r2c-price-cell:focus {
  transform:
    none !important;
}


/*
 * ĐỎ = ĐÃ CHỌN
 */
.kz-r2c-price-cell.is-selected {
  background:
    #d92d20 !important;

  color:
    #ffffff !important;

  border-color:
    #d92d20 !important;
}


.kz-r2c-price-cell::before,
.kz-r2c-price-cell::after {
  display:
    none !important;
}


.kz-r2c-groups {
  gap:
    5px !important;
}


.kz-r2c-groups label {
  padding:
    5px 7px !important;

  border-radius:
    8px !important;
}


@media (max-width: 640px) {

  .kz-r2c-promo-form {
    width:
      100% !important;

    min-width:
      0 !important;
  }

  .kz-r2c-matrix-wrap {
    max-height:
      250px !important;
  }

  .kz-r2c-matrix {
    width:
      100% !important;

    min-width:
      0 !important;
  }

  .kz-r2c-matrix th,
  .kz-r2c-matrix td {
    height:
      34px !important;

    padding:
      1px !important;
  }

  .kz-r2c-matrix th.kz-r2c-name,
  .kz-r2c-matrix td.kz-r2c-name {
    width:
      40% !important;

    padding-left:
      4px !important;
  }

  .kz-r2c-matrix th:not(.kz-r2c-name),
  .kz-r2c-matrix td:not(.kz-r2c-name) {
    width:
      15% !important;
  }

  .kz-r2c-matrix th {
    font-size:
      9px !important;
  }

  .kz-r2c-matrix td.kz-r2c-name b {
    font-size:
      10px !important;
  }

  .kz-r2c-price-cell {
    height:
      28px !important;

    min-height:
      28px !important;

    border-radius:
      5px !important;

    font-size:
      9px !important;

    letter-spacing:
      -.2px !important;
  }

  .kz-r2c-search {
    height:
      36px !important;

    min-height:
      36px !important;

    font-size:
      13px !important;
  }
}



/* ==========================================================
   KZPOS_PROMOTION_R2C2A_CSS
   Mua N một món -> Tặng món
   ========================================================== */

.kz-r2c-single-list {
  display: grid;
  grid-template-columns: 1fr 1fr;

  gap: 5px;

  max-height: 180px;
  overflow-y: auto;

  padding: 2px;

  -webkit-overflow-scrolling: touch;
}


.kz-r2c-single-list > button {
  min-width: 0;
  min-height: 38px;

  padding: 6px 7px;

  border: 1px solid #e6c9a9;
  border-radius: 8px;

  background: #fffaf2;
  color: #3b2d22;

  font-size: 11px;
  font-weight: 750;

  line-height: 1.15;

  text-align: left;

  overflow: hidden;
}


.kz-r2c-single-summary {
  margin-top: 7px;

  min-height: 46px;

  padding: 7px 9px;

  border: 1px solid #d9a869;
  border-radius: 9px;

  background: #fff3dc;
}


.kz-r2c-single-summary b {
  display: block;

  font-size: 12px;
  line-height: 1.15;
}


.kz-r2c-single-summary span {
  display: block;

  margin-top: 3px;

  font-size: 11px;
}


.kz-r2c-single-empty {
  opacity: .6;
}


/*
 * Modal chọn sản phẩm:
 * không thay đổi layout form phía sau.
 */
.kz-r2c-single-modal {
  position: fixed;
  inset: 0;

  z-index: 99999;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 14px;

  box-sizing: border-box;

  background: rgba(32, 22, 12, .42);
}


.kz-r2c-single-card {
  width: min(430px, 100%);

  max-height: 88vh;
  overflow-y: auto;

  box-sizing: border-box;

  padding: 13px;

  border: 2px solid #e23b2d;
  border-radius: 15px;

  background: #fff8e8;

  box-shadow:
    0 12px 40px rgba(0,0,0,.25);
}


.kz-r2c-single-card h3 {
  margin: 0 0 12px;

  font-size: 19px;
}


.kz-r2c-qty-button {
  display: flex;

  align-items: center;
  justify-content: center;

  width: 100%;
  height: 44px;

  border: 1px solid #e05d3c;
  border-radius: 10px;

  background: #fff;
  color: #222;

  font-size: 18px;
  font-weight: 800;
}


.kz-r2c-picker-prices {
  display: grid;

  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  gap: 5px;
}


.kz-r2c-picker-prices > button {
  min-width: 0;
  height: 52px;

  padding: 4px 2px;

  box-sizing: border-box;

  border: 1px solid #e1bd95;
  border-radius: 8px;

  background: #fffaf2;
  color: #35291f;
}


.kz-r2c-picker-prices > button small,
.kz-r2c-picker-prices > button b {
  display: block;
}


.kz-r2c-picker-prices > button small {
  overflow: hidden;

  font-size: 9px;
  line-height: 1.05;

  white-space: nowrap;
  text-overflow: ellipsis;
}


.kz-r2c-picker-prices > button b {
  margin-top: 4px;

  font-size: 11px;
  line-height: 1;
}


.kz-r2c-picker-prices > button.is-selected {
  background: #d92d20;
  color: #fff;

  border-color: #d92d20;
}


.kz-r2c-single-actions {
  display: grid;

  grid-template-columns:
    1fr 1fr;

  gap: 7px;

  margin-top: 13px;
}


.kz-r2c-single-actions .btn {
  min-height: 42px;
}


@media (max-width: 640px) {

  .kz-r2c-single-list {
    grid-template-columns:
      1fr 1fr;

    max-height: 160px;
  }

  .kz-r2c-single-list > button {
    min-height: 36px;

    padding: 5px 6px;

    font-size: 10.5px;
  }

  .kz-r2c-single-card {
    padding: 11px;
  }

  .kz-r2c-picker-prices {
    gap: 4px;
  }

  .kz-r2c-picker-prices > button {
    height: 48px;
  }

  .kz-r2c-picker-prices > button b {
    font-size: 10px;
  }
}



/* ==========================================================
   KZPOS_PROMOTION_R2C2A1_CSS
   ========================================================== */


/*
 * Bảng số nằm TRÊN modal chọn sản phẩm.
 */
.kz-r2c-inline-pad {
  position: fixed;
  inset: 0;

  z-index: 100;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 16px;

  box-sizing: border-box;

  background:
    rgba(28, 20, 13, .50);
}


.kz-r2c-inline-pad-card {
  width: min(390px, 100%);

  padding: 13px;

  box-sizing: border-box;

  border:
    2px solid #ef4b32;

  border-radius:
    16px;

  background:
    #fff7e4;

  box-shadow:
    0 14px 45px
    rgba(0,0,0,.32);
}


.kz-r2c-inline-pad-head {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    38px;

  gap: 8px;

  align-items: center;
}


.kz-r2c-inline-pad-head small {
  display: block;

  color: #8d6e52;

  font-size: 10px;
  font-weight: 800;
}


.kz-r2c-inline-pad-head b {
  display: block;

  margin-top: 2px;

  font-size: 18px;
}


.kz-r2c-inline-pad-head button {
  width: 36px;
  height: 36px;

  padding: 0;

  border:
    1px solid #cbb49b;

  border-radius:
    999px;

  background: #eee8df;

  font-size: 25px;
  line-height: 1;
}


.kz-r2c-inline-pad-value {
  display: flex;

  align-items: center;
  justify-content: flex-end;

  height: 54px;

  margin-top: 9px;

  padding: 0 13px;

  box-sizing: border-box;

  border:
    1px solid #b78e56;

  border-radius:
    11px;

  background: #e8c983;

  color: #2f281f;

  font-size: 29px;
  font-weight: 900;
}


.kz-r2c-inline-pad-grid {
  display: grid;

  grid-template-columns:
    repeat(3, 1fr);

  gap: 7px;

  margin-top: 9px;
}


.kz-r2c-inline-pad-grid button {
  height: 50px;

  border:
    1px solid #d6b77c;

  border-radius:
    10px;

  background: #fffdf8;

  color: #25211c;

  font-size: 21px;
  font-weight: 850;
}


.kz-r2c-inline-pad-quick {
  display: grid;

  grid-template-columns:
    repeat(5, 1fr);

  gap: 5px;

  margin-top: 7px;
}


.kz-r2c-inline-pad-quick button {
  height: 34px;

  padding: 0;

  border:
    1px solid #deb87c;

  border-radius:
    8px;

  background:
    #fff1d4;

  font-size: 13px;
  font-weight: 800;
}


.kz-r2c-inline-pad-ok {
  width: 100%;

  height: 48px;

  margin-top: 9px;

  border: 0;

  border-radius:
    11px;

  background:
    #39853f;

  color:
    #ffffff;

  font-size:
    17px;

  font-weight:
    900;
}


/*
 * Hàng XÓA | LƯU
 */
.kz-r2c-save-delete {
  display: grid;

  grid-template-columns:
    minmax(0, .38fr)
    minmax(0, 1fr);

  gap: 7px;

  margin-top: 10px;
}


.kz-r2c-save-delete.only-save {
  grid-template-columns:
    1fr;
}


.kz-r2c-save-delete .btn {
  min-width: 0;
  min-height: 47px;

  margin: 0 !important;
}


.kz-r2c-delete-btn {
  background:
    #ef3f32 !important;

  border-color:
    #c9271e !important;

  color:
    #ffffff !important;

  font-weight:
    900 !important;
}


.kz-r2c-save-btn {
  font-weight:
    900 !important;
}


.kz-r2c-back-btn {
  width: 100%;

  min-height: 45px;

  margin-top: 7px !important;
}


@media (max-width: 640px) {

  .kz-r2c-inline-pad {
    padding: 10px;
  }

  .kz-r2c-inline-pad-card {
    padding: 11px;
  }

  .kz-r2c-inline-pad-grid button {
    height: 47px;
  }

  .kz-r2c-save-delete {
    grid-template-columns:
      minmax(90px, .38fr)
      minmax(0, 1fr);
  }
}



/* ==========================================================
   KZPOS_PROMOTION_R2C2B2_CSS
   ========================================================== */

.kz-r2c-promo-subbox {
  margin:
    7px 0 9px;

  padding:
    8px;

  border:
    1px solid #ead0ac;

  border-radius:
    10px;

  background:
    #fffaf1;
}


.kz-r2c-promo-subbox .field {
  margin-bottom:
    6px !important;
}


.kz-r2c-promo-subbox .pair {
  gap:
    7px !important;
}


.kz-r2c-stackable {
  margin:
    7px 0 !important;

  padding:
    7px 9px !important;

  border:
    1px solid #e3c49d;

  border-radius:
    9px;

  background:
    #fff7e7;
}


@media (max-width: 640px) {

  .kz-r2c-promo-subbox {
    padding:
      7px;
  }

  .kz-r2c-promo-subbox .pair {
    grid-template-columns:
      1fr 1fr !important;
  }

  .kz-r2c-promo-subbox input,
  .kz-r2c-promo-subbox select {
    min-height:
      38px !important;
  }
}



/* ==========================================================
   KZPOS_PROMOTION_SINGLE_CYCLE_R2C2E_CSS

   KZPOS chỉ cho 01 chương trình KM trong cùng chu kỳ.
   Không còn tùy chọn cộng dồn.
   ========================================================== */

.kz-r2c-stackable,
#kzR2cStackableBox {
  display: none !important;
}



/* ============================================================
   KZPOS_BILL_FULL_R1_CSS
   ============================================================ */
#paper72 .kz-amount-words td{
  white-space:normal;
  line-height:1.35;
  padding-top:5px;
  padding-bottom:5px;
  font-size:12px;
}
#paper72 .kz-full-row td{
  font-weight:700;
}
#paper72 .kz-shop-customer-extra{
  margin:4px 0 6px;
  line-height:1.35;
}
#paper72 table.items.shop-full{
  width:100%;
  table-layout:fixed;
}
#paper72 table.items.shop-full .col-name{width:auto}
#paper72 table.items.shop-full .col-sl{width:11%}
#paper72 table.items.shop-full .col-mid{width:13%}
#paper72 table.items.shop-full .col-gia{width:19%}
#paper72 table.items.shop-full .col-sum{width:22%}
#paper72 table.items.shop-full th,
#paper72 table.items.shop-full td{
  font-size:12px;
}
#paper72 table.items.shop-full td.left{
  font-weight:700;
}


/* ============================================================
   KZPOS_BILL_FULL_R1B_SHOP_FIX
   SHOP 80mm: Ten | SL | DVT | D.Gia | T.tien
   ============================================================ */
#paper72 table.items.shop-full{
  width:100% !important;
  table-layout:fixed !important;
}
#paper72 table.items.shop-full col.col-name{width:20% !important}
#paper72 table.items.shop-full col.col-sl{width:15% !important}
#paper72 table.items.shop-full col.col-mid{width:14% !important}
#paper72 table.items.shop-full col.col-gia{width:23% !important}
#paper72 table.items.shop-full col.col-sum{width:28% !important}
#paper72 table.items.shop-full th,
#paper72 table.items.shop-full td{
  box-sizing:border-box;
  padding-left:2px !important;
  padding-right:2px !important;
  font-size:12px !important;
  line-height:1.25 !important;
}
#paper72 table.items.shop-full td.left{
  font-weight:700 !important;
  white-space:normal !important;
  overflow-wrap:anywhere;
}
#paper72 table.items.shop-full th.c,
#paper72 table.items.shop-full td.c,
#paper72 table.items.shop-full td.num{
  white-space:nowrap !important;
}
#paper72 table.items.shop-full td.num{
  font-size:11px !important;
  font-weight:700 !important;
  font-variant-numeric:tabular-nums;
}
#paper72 table.items.shop-full td:nth-child(2){
  font-weight:700 !important;
  font-variant-numeric:tabular-nums;
}


/* ============================================================
   KZPOS_BILL_FULL_R1C_SHOP_POLISH
   ============================================================ */
#paper72 table.items.shop-full col.col-name{width:25% !important}
#paper72 table.items.shop-full col.col-sl{width:15% !important}
#paper72 table.items.shop-full col.col-mid{width:14% !important}
#paper72 table.items.shop-full col.col-gia{width:20% !important}
#paper72 table.items.shop-full col.col-sum{width:26% !important}

#paper72 table.items.shop-full th:nth-child(4),
#paper72 table.items.shop-full td:nth-child(4),
#paper72 table.items.shop-full th:nth-child(5),
#paper72 table.items.shop-full td:nth-child(5){
  font-size:10.5px !important;
}
#paper72 tr.kz-grand-total td{
  font-weight:800 !important;
  font-size:13px !important;
}
#paper72 tr.kz-customer-paid td{
  font-weight:800 !important;
  font-size:12px !important;
}
