/* Kiểu riêng của mẫu quản lý nhà hàng: file tĩnh, không dùng CSS hay token của site bán hàng. Font Archivo (SIL OFL) tải sẵn trong fonts/. */
/* vietnamese */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url(fonts/archivo-vietnamese.woff2) format('woff2');
  unicode-range:
    U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301,
    U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url(fonts/archivo-latin-ext.woff2) format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url(fonts/archivo-latin.woff2) format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Màu: men chàm của khay inox và biển số nhà trong hẻm, nghệ của đèn bếp. */
  --ink: #13262a;
  --ink-soft: #1f3a3f;
  --on-ink: #e9efed;
  --on-ink-muted: #a9bcc0;
  --muted: #4d6065;
  --paper: #e4eae8;
  --paper-2: #f2f6f5;
  --surface: #fcfdfc;
  --line: #c3cecb;
  --turmeric: #f2b01e;
  --chili: #c8372a;
  --lagoon: #1b7586;
  --focus: #1b7586;

  --r-table: 14px;
  --r-tile: 10px;
  --r-ctl: 12px;

  /* Nhịp chuyển động của mẫu (mẫu HTML không đọc token của site nên tự khai; cùng giá trị với tokens.css). */
  --duration-fast: 120ms;
  --duration-base: 200ms;
  --duration-slide: 320ms;
  --duration-enter: 700ms;
  --stagger-step: 55ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --bar-h: 56px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font:
    400 15px/1.45 'Archivo',
    system-ui,
    'Segoe UI',
    sans-serif;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.pane-ticket :focus-visible,
.bar :focus-visible {
  outline-color: var(--turmeric);
}

.dish-price,
.line-price,
.slip-total output,
.today-figure,
.t-num,
.qty output,
.clock time {
  font-variant-numeric: tabular-nums;
}

/* ---------- Khung ứng dụng ---------- */

.app {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100dvh;
  min-height: 0;
}

@keyframes bar-drop {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
}

.bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: var(--bar-h);
  padding-inline: 20px;
  background: var(--ink);
  color: var(--on-ink);
  animation: bar-drop var(--duration-slide) var(--ease-out) backwards;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  transition: opacity var(--duration-base);
}

.brand:active {
  opacity: 0.8;
}

.brand-plate {
  display: grid;
  place-items: center;
  width: 34px;
  height: 26px;
  border: 2px solid #fff;
  border-radius: 5px;
  background: var(--lagoon);
  font-stretch: 75%;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-name {
  font-stretch: 125%;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.tabs {
  position: relative;
  display: flex;
  align-self: stretch;
}

.tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  border: 0;
  background: none;
  color: var(--on-ink-muted);
  font-size: 14px;
  font-weight: 600;
  transition:
    color var(--duration-base),
    transform var(--duration-fast);
}

.tab[aria-selected='true'] {
  color: #fff;
}

.tab:active {
  transform: scale(0.97);
}

.tab-count,
.dock-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding-inline: 5px;
  border-radius: 999px;
  background: var(--turmeric);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.tabs-ink {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100px;
  height: 4px;
  border-radius: 4px 4px 0 0;
  background: var(--turmeric);
  transform-origin: left;
  transform: scaleX(0);
}

.tabs-ink.is-ready {
  transition: transform var(--duration-slide) var(--ease-out);
}

.clock {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-left: auto;
}

.clock time {
  font-stretch: 75%;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
}

.clock-shift {
  color: var(--on-ink-muted);
  font-size: 13px;
  font-weight: 500;
}

.stage {
  position: relative;
  min-height: 0;
}

.view {
  height: 100%;
  min-height: 0;
}

/* ---------- Khu gọi món: sảnh, thực đơn, phiếu ---------- */

.workspace {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr) minmax(300px, 350px);
}

.pane {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

.pane-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-bottom: 14px;
}

.pane-head h2,
.view-head h2 {
  font-stretch: 112%;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.pane-note {
  color: var(--muted);
  font-size: 13px;
}

.pane-floor {
  padding: 22px 20px 28px;
  background: var(--paper);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 12.5px;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
}

.swatch[data-state='free'] {
  border: 2px dashed rgba(19, 38, 42, 0.45);
}

.swatch[data-state='ordering'] {
  background: var(--turmeric);
}

.swatch[data-state='eating'] {
  background: var(--ink);
}

.swatch[data-state='ready'] {
  background: var(--lagoon);
}

.plan-wrap {
  container-type: inline-size;
  max-width: 460px;
  margin-inline: auto;
}

.plan {
  --cell: calc((100cqw - 30px) / 4);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: 34px repeat(5, var(--cell)) 30px;
  gap: 10px;
}

.plan-bar,
.plan-door {
  display: grid;
  place-items: center;
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.plan-bar {
  grid-row: 1;
  border-radius: 999px;
  background: rgba(19, 38, 42, 0.1);
}

.plan-door {
  grid-row: 7;
  border-top: 2px dashed rgba(19, 38, 42, 0.3);
  padding-top: 6px;
  align-items: start;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
}

.table {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 4px;
  border: 2px dashed rgba(19, 38, 42, 0.38);
  border-radius: var(--r-table);
  background: transparent;
  color: var(--ink);
  line-height: 1.15;
  animation: pop var(--duration-enter) var(--ease-out) backwards;
  animation-delay: calc(var(--i, 0) * var(--stagger-step));
  transition:
    transform var(--duration-fast) var(--ease-out),
    background-color var(--duration-base),
    color var(--duration-base),
    border-color var(--duration-base);
}

.table[data-shape='round'] {
  border-radius: 50%;
}

.table[data-state='ordering'] {
  border-color: var(--turmeric);
  background: var(--turmeric);
}

.table[data-state='eating'] {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.table[data-state='ready'] {
  border-color: var(--lagoon);
  background: var(--lagoon);
  color: #fff;
}

.table::after {
  content: '';
  position: absolute;
  inset: -6px;
  border: 3px solid var(--ink);
  border-radius: inherit;
  opacity: 0;
  transform: scale(0.94);
  transition:
    opacity var(--duration-base),
    transform var(--duration-slide) var(--ease-out);
  pointer-events: none;
}

.table[data-shape='round']::after {
  border-radius: 50%;
}

.table[aria-pressed='true']::after {
  opacity: 1;
  transform: none;
}

.table:active {
  transform: scale(0.96);
}

.t-num {
  font-stretch: 75%;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.t-state {
  font-size: 11.5px;
  font-weight: 700;
}

.t-time {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.78;
}

.table[data-shape='wide'],
.table[data-shape='long'] {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-areas:
    'num state'
    'num time';
  justify-content: center;
  align-content: center;
  column-gap: 12px;
  text-align: left;
}

.table[data-shape='wide'] .t-num,
.table[data-shape='long'] .t-num {
  grid-area: num;
  align-self: center;
  font-size: 34px;
}

.table[data-shape='wide'] .t-state,
.table[data-shape='long'] .t-state {
  grid-area: state;
  align-self: end;
}

.table[data-shape='wide'] .t-time,
.table[data-shape='long'] .t-time {
  grid-area: time;
  align-self: start;
}

/* ---------- Thực đơn ---------- */

.pane-menu {
  padding: 22px 24px 28px;
  background: var(--paper-2);
  border-inline: 1px solid var(--line);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  padding: 7px 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  transition:
    background-color var(--duration-base),
    border-color var(--duration-base),
    color var(--duration-base),
    transform var(--duration-fast);
}

.chip[aria-pressed='true'] {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.chip:active {
  transform: scale(0.95);
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(144px, 1fr));
  gap: 12px;
}

.dish {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 1.5px solid var(--line);
  border-radius: var(--r-tile);
  background: var(--surface);
  text-align: left;
  overflow: hidden;
  animation: pop var(--duration-enter) var(--ease-out) backwards;
  animation-delay: calc(var(--i, 0) * var(--stagger-step));
  transition:
    transform var(--duration-fast) var(--ease-out),
    border-color var(--duration-base);
}

.dish:active {
  transform: scale(0.97);
}

.dish-photo {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--paper);
}

.dish-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    opacity 400ms ease-out,
    transform var(--duration-slide) var(--ease-out);
}

.js .dish-photo img:not(.is-loaded) {
  opacity: 0;
}

.dish-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 9px 11px 11px;
}

.dish-name {
  font-size: 14px;
  font-weight: 650;
  line-height: 1.25;
}

.dish-price {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.dish-qty {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding-inline: 6px;
  border-radius: 999px;
  background: var(--turmeric);
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  opacity: 0;
  transform: scale(0.5);
  transition:
    opacity var(--duration-base),
    transform var(--duration-slide) var(--ease-out);
}

.dish.has-qty {
  border-color: var(--turmeric);
}

.dish.has-qty .dish-qty {
  opacity: 1;
  transform: none;
}

/* ---------- Phiếu gọi món (thanh bên tối, tờ phiếu giấy) ---------- */

.pane-ticket {
  --slip: #fbfbf8;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px 20px 20px;
  background: var(--ink);
  color: var(--on-ink);
}

@keyframes slip-in {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
}

.slip {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  background: var(--slip);
  color: var(--ink);
  border-radius: 4px 4px 0 0;
  animation: slip-in 600ms var(--ease-out) 420ms backwards;
}

.slip::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% - 1px);
  height: 7px;
  background: conic-gradient(
      from -45deg at bottom,
      transparent,
      var(--slip) 1deg 89deg,
      transparent 90deg
    )
    0 0 / 14px 100% repeat-x;
}

.slip-head {
  padding: 18px 18px 14px;
  border-bottom: 2px dashed var(--line);
}

.slip-head h2 {
  font-stretch: 112%;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.slip-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.lines {
  min-height: 0;
}

.line {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    'main price'
    'qty  price';
  gap: 6px 12px;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid #e6ebe9;
}

.line-main {
  grid-area: main;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.line-name {
  font-size: 15px;
  font-weight: 650;
}

.line-state {
  align-self: flex-start;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.line.is-draft .line-state {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--turmeric);
  color: var(--ink);
  font-weight: 700;
}

.line-price {
  grid-area: price;
  align-self: start;
  font-size: 15px;
  font-weight: 650;
  white-space: nowrap;
}

.line-qty {
  grid-area: qty;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.qty {
  grid-area: qty;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.qty-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  transition:
    background-color var(--duration-base),
    border-color var(--duration-base),
    transform var(--duration-fast);
}

.qty-btn:active {
  transform: scale(0.88);
}

.qty output {
  display: inline-block;
  min-width: 30px;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
}

.slip-empty {
  padding: 22px 18px;
  color: var(--muted);
  font-size: 14px;
}

.slip-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px 18px;
  border-top: 2px dashed var(--line);
  font-size: 14px;
  font-weight: 600;
}

.slip-total output {
  font-stretch: 112%;
  font-size: 26px;
  font-weight: 800;
}

.rail-actions {
  position: sticky;
  bottom: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: auto -20px -20px;
  padding: 14px 20px 20px;
  background: var(--ink);
}

.btn {
  height: 50px;
  padding-inline: 18px;
  border: 2px solid transparent;
  border-radius: var(--r-ctl);
  font-size: 15px;
  font-weight: 750;
  transition:
    background-color var(--duration-base),
    border-color var(--duration-base),
    color var(--duration-base),
    opacity var(--duration-base),
    transform var(--duration-fast);
}

.btn:active:not(:disabled) {
  transform: scale(0.97);
}

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

.btn-primary {
  background: var(--turmeric);
  color: var(--ink);
}

.btn-ghost {
  border-color: rgba(233, 239, 237, 0.4);
  background: transparent;
  color: #fff;
}

.btn-ghost-dark {
  border-color: var(--line);
  background: transparent;
  color: var(--ink);
}

.rail-hint {
  min-height: 1.3em;
  color: var(--on-ink-muted);
  font-size: 13px;
}

/* ---------- Bếp ---------- */

.view-kitchen,
.view-today {
  overflow: auto;
  overscroll-behavior: contain;
  padding: 26px 28px 32px;
  background: var(--paper-2);
}

.view-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
  margin-bottom: 18px;
}

.kitchen {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.kcol {
  padding: 14px;
  border-radius: 16px;
  background: var(--paper);
}

.kcol h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 750;
}

.kcol-count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding-inline: 6px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.kcol-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 80px;
}

.kcol-empty {
  padding: 14px 4px;
  color: var(--muted);
  font-size: 13px;
}

.kcard {
  padding: 14px;
  border-radius: 12px;
  border-top: 5px solid var(--ink);
  background: var(--surface);
}

.kcol[data-stage='new'] .kcard {
  border-top-color: var(--turmeric);
}

.kcol[data-stage='ready'] .kcard {
  border-top-color: var(--lagoon);
}

.kcard-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}

.kcard-head h4 {
  font-stretch: 112%;
  font-size: 18px;
  font-weight: 800;
}

.kno {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.ktime {
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
}

.ktime.is-late {
  color: var(--chili);
}

.kitems {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.kitems li {
  display: flex;
  gap: 10px;
  font-size: 15px;
}

.kitems b {
  min-width: 22px;
  font-weight: 800;
}

.kbtn {
  width: 100%;
  height: 42px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: transparent;
  font-size: 14px;
  font-weight: 750;
  transition:
    background-color var(--duration-base),
    color var(--duration-base),
    transform var(--duration-fast);
}

.kbtn:active {
  transform: scale(0.97);
}

/* ---------- Hôm nay ---------- */

.view-today {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
  gap: 28px 40px;
  align-content: start;
}

.today-label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.today-figure {
  font-stretch: 125%;
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.today-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 36px;
  margin-top: 18px;
}

.today-facts dt {
  color: var(--muted);
  font-size: 13px;
}

.today-facts dd {
  font-size: 20px;
  font-weight: 750;
}

.hours {
  margin: 30px 0 0;
}

.hours figcaption,
.today-side h3 {
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 750;
}

.hours-bars {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  height: clamp(210px, 34vh, 340px);
  padding-bottom: 24px;
  border-bottom: 2px solid var(--ink);
}

.hbar {
  position: relative;
  display: flex;
  height: 100%;
  align-items: flex-end;
}

.hbar-fill {
  width: 100%;
  height: 100%;
  border-radius: 6px 6px 0 0;
  background: var(--ink);
  transform-origin: bottom;
  transform: scaleY(var(--h, 0));
}

.hbar.is-now .hbar-fill {
  background: var(--turmeric);
}

.hbar.is-future .hbar-fill {
  background: transparent;
  border: 2px dashed rgba(19, 38, 42, 0.25);
  border-bottom: 0;
  transform: scaleY(0.12);
}

.hbar-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -24px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.today-side {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.top li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  padding: 7px 0;
  font-size: 14px;
}

.top .top-name {
  font-weight: 650;
}

.top .top-qty {
  color: var(--muted);
  font-weight: 600;
}

.top-bar {
  grid-column: 1 / -1;
  height: 6px;
  border-radius: 3px;
  background: var(--ink);
  transform-origin: left;
  transform: scaleX(var(--w, 0));
}

.recent li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 2px 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.recent .r-time {
  grid-row: 1 / span 2;
  align-self: center;
  font-weight: 800;
  font-stretch: 75%;
  font-size: 18px;
}

.recent .r-table {
  font-weight: 650;
}

.recent .r-sum {
  grid-row: 1 / span 2;
  grid-column: 3;
  align-self: center;
  font-weight: 700;
}

.recent .r-items {
  grid-column: 2;
  color: var(--muted);
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-note {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- Hộp tính tiền ---------- */

@keyframes dlg-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
}

@keyframes dlg-out {
  to {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes fade-out {
  to {
    opacity: 0;
  }
}

@keyframes sheet-in {
  from {
    transform: translateY(100%);
  }
}

@keyframes sheet-out {
  to {
    transform: translateY(100%);
  }
}

.bill {
  width: min(430px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(19, 38, 42, 0.35);
  overflow: hidden;
}

.bill[open] {
  display: flex;
  flex-direction: column;
  animation: dlg-in var(--duration-slide) var(--ease-out);
}

.bill[open]::backdrop {
  animation: fade-in var(--duration-base) ease-out;
}

.bill.is-closing {
  animation: dlg-out var(--duration-base) ease-in forwards;
}

.bill.is-closing::backdrop {
  animation: fade-out var(--duration-base) ease-in forwards;
}

.bill::backdrop {
  background: rgba(19, 38, 42, 0.6);
}

.bill-body {
  min-height: 0;
  overflow: auto;
  padding: 22px 22px 8px;
}

.bill-head h2 {
  font-stretch: 112%;
  font-size: 22px;
  font-weight: 800;
}

.bill-lines {
  margin-top: 14px;
  border-top: 2px dashed var(--line);
}

.bill-lines li {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #e6ebe9;
  font-size: 15px;
}

.bill-lines .b-qty {
  min-width: 26px;
  font-weight: 800;
}

.bill-lines .b-name {
  flex: 1;
  min-width: 0;
}

.bill-lines .b-price {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.bill-total {
  padding-inline: 0;
  border-top: 0;
}

.pay {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 4px 0 16px;
}

.pay-opt {
  height: 44px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 650;
  transition:
    background-color var(--duration-base),
    border-color var(--duration-base),
    color var(--duration-base),
    transform var(--duration-fast);
}

.pay-opt[aria-checked='true'] {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.pay-opt:active {
  transform: scale(0.96);
}

.bill-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
  padding: 12px 22px 22px;
}

/* ---------- Thông báo nhỏ ---------- */

.toasts {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 22px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  width: max-content;
  max-width: 100%;
  padding: 11px 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(19, 38, 42, 0.35);
}

/* ---------- Thanh chuyển khung (điện thoại, máy tính bảng) ---------- */

.dock {
  display: none;
}

@media (hover: hover) {
  .brand:hover {
    opacity: 0.85;
  }

  .tab:hover:not([aria-selected='true']) {
    color: #fff;
  }

  .table:hover {
    transform: translateY(-2px);
  }

  .dish:hover {
    transform: translateY(-3px);
    border-color: var(--ink);
  }

  .dish:hover .dish-photo img {
    transform: scale(1.06);
  }

  .chip:hover:not([aria-pressed='true']),
  .pay-opt:hover:not([aria-checked='true']) {
    border-color: var(--ink);
  }

  .qty-btn:hover {
    border-color: var(--ink);
    background: var(--paper-2);
  }

  .btn-primary:hover:not(:disabled) {
    background: #ffc23d;
  }

  .btn-ghost:hover:not(:disabled) {
    border-color: #fff;
  }

  .btn-ghost-dark:hover {
    border-color: var(--ink);
  }

  .kbtn:hover {
    background: var(--ink);
    color: #fff;
  }
}

@media (max-width: 1099px) {
  .workspace {
    display: block;
  }

  .workspace > .pane {
    display: none;
    height: 100%;
    padding-bottom: 96px;
  }

  .workspace[data-pane='floor'] > .pane-floor,
  .workspace[data-pane='menu'] > .pane-menu {
    display: block;
  }

  .workspace[data-pane='ticket'] > .pane-ticket {
    display: flex;
  }

  .pane-menu {
    border-inline: 0;
  }

  .pane-ticket .slip {
    width: min(460px, 100%);
    margin-inline: auto;
  }

  .pane-ticket .rail-actions {
    position: static;
    width: min(500px, 100%);
    margin: 0 auto;
    padding-inline: 0;
    padding-bottom: 0;
  }

  .dock {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 5px;
    border-radius: 18px;
    background: var(--ink);
    box-shadow: 0 10px 28px rgba(19, 38, 42, 0.35);
  }

  #app:not([data-view='floor']) .dock {
    display: none;
  }

  .dock-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: var(--on-ink-muted);
    font-size: 14px;
    font-weight: 700;
    transition:
      background-color var(--duration-base),
      color var(--duration-base),
      transform var(--duration-fast);
  }

  .dock-btn[aria-pressed='true'] {
    background: var(--turmeric);
    color: var(--ink);
  }

  .dock-btn:active {
    transform: scale(0.96);
  }

  .toasts {
    bottom: 86px;
  }

  .view-today,
  .kitchen {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 700px) {
  .bar {
    flex-wrap: wrap;
    gap: 0 16px;
    padding: 10px 16px 0;
  }

  .clock {
    order: 2;
  }

  .tabs {
    order: 3;
    flex: 1 0 100%;
    margin-inline: -16px;
  }

  .tab {
    flex: 1;
    justify-content: center;
    min-height: 46px;
    padding: 0 8px;
  }

  .pane-floor,
  .pane-menu,
  .view-kitchen,
  .view-today {
    padding-inline: 16px;
  }

  .bill {
    width: 100vw;
    max-width: 100vw;
    margin: auto 0 0;
    border-radius: 18px 18px 0 0;
  }

  .bill[open] {
    animation-name: sheet-in;
  }

  .bill.is-closing {
    animation-name: sheet-out;
  }

  .hours-bars {
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}
