/* Thông Vi Vu — design tokens (theo Brand Guideline) */
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700;800&family=Josefin+Sans:wght@600;700&display=swap');

:root {
  --pine: #003300;          /* Deep Pine Green */
  --pine-ink: #0E2410;      /* nền tối màn hình bếp */
  --cream: #F5EFE6;         /* Warm Cream */
  --cedar: #8C5A3C;         /* Warm Cedar */
  --ochre: #C89D54;         /* Sunset Ochre */

  --paper: #FFFCF7;
  --sand: #F3E6CC;
  --line: #E6DCCB;
  --line-strong: #D9CDB8;
  --ink: #1C2A1E;
  --ink-2: #5B5348;
  --muted: #6E665A;
  --danger: #B3261E;

  --font-ui: 'Be Vietnam Pro', system-ui, sans-serif;
  --font-display: 'Josefin Sans', 'Be Vietnam Pro', sans-serif;

  --r-sm: 9px;
  --r-md: 12px;
  --r-lg: 16px;
  --tap: 44px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--cream);
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
:focus-visible { outline: 3px solid var(--ochre); outline-offset: 2px; }

.display { font-family: var(--font-display); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Nút */
.btn {
  min-height: var(--tap); padding: 0 18px; border-radius: var(--r-md);
  border: 1.5px solid var(--pine); background: var(--paper); color: var(--pine);
  font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary { background: var(--pine); color: var(--cream); border-color: var(--pine); }
.btn-accent { background: var(--ochre); color: var(--ink); border-color: var(--ochre); font-weight: 700; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--cedar); }
.btn-lg { min-height: 56px; font-size: 16px; font-weight: 700; border-radius: 14px; }
.pill {
  min-height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--paper); font-size: 14px; white-space: nowrap;
}
.pill[aria-pressed="true"] { background: var(--pine); color: var(--cream); border-color: var(--pine); font-weight: 600; }

/* Modal */
.backdrop {
  position: fixed; inset: 0; background: rgba(14, 36, 16, .55); display: flex;
  align-items: center; justify-content: center; padding: 16px; z-index: 50;
}
.sheet {
  background: var(--paper); border-radius: 20px; width: min(520px, 100%); max-height: calc(100vh - 32px);
  overflow: auto; padding: 22px; display: flex; flex-direction: column; gap: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.sheet h2 { margin: 0; font-size: 20px; color: var(--pine); }

/* Toast */
.toasts { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 80; width: min(460px, calc(100% - 24px)); }
.toast { padding: 12px 16px; border-radius: var(--r-md); background: var(--pine); color: var(--cream); font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.toast.warn { background: var(--ochre); color: var(--ink); }
.toast.err { background: var(--danger); color: #fff; }

/* Thành phần dùng chung cho màn hình nhân viên */
.kv { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; }
.kv > span:first-child { color: var(--ink-2); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.big-input { height: 60px; font-size: 28px; font-weight: 700; text-align: right; border-radius: var(--r-md); border: 1.5px solid var(--line-strong); padding: 0 16px; width: 100%; background: #fff; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-2); }
.field input, .field select, .field textarea { min-height: 44px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); padding: 0 12px; background: #fff; font-size: 15px; color: var(--ink); }
.field textarea { padding: 10px 12px; min-height: 70px; }
.mgroup h3 { margin: 0 0 8px; font-size: 14px; color: var(--ink-2); font-weight: 600; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { min-height: 44px; padding: 0 16px; border-radius: var(--r-md); border: 1.5px solid var(--line-strong); background: #fff; font-size: 14px; }
.opt[aria-pressed="true"] { border-color: var(--pine); background: var(--pine); color: var(--cream); font-weight: 600; }
.qty { display: flex; align-items: center; gap: 12px; }
.qty button { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--pine); background: #fff; color: var(--pine); font-size: 20px; }
.qty span { font-size: 20px; font-weight: 700; min-width: 24px; text-align: center; }
.qr-box { align-self: center; width: 260px; height: 260px; border-radius: 14px; border: 2px solid var(--pine); background: #fff; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.qr-box img { width: 100%; height: 100%; object-fit: contain; }
.waitline { display: flex; gap: 10px; align-items: center; background: var(--sand); border-radius: var(--r-md); padding: 12px 14px; font-size: 14px; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid var(--cedar); border-top-color: transparent; animation: tvvspin 1s linear infinite; flex: none; }
@keyframes tvvspin { to { transform: rotate(360deg); } }

/* Chọn món */
.sheet.mp { width: min(640px, 100%); height: calc(100dvh - 32px); gap: 12px; }
.mp-head { display: flex; align-items: center; justify-content: space-between; }
.mp-cats { display: flex; gap: 8px; overflow-x: auto; flex: none; scrollbar-width: none; }
.mp-list { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; align-content: start; }
.mp-item { min-height: 64px; border-radius: 12px; border: 1px solid var(--line); background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; text-align: left; }
.mp-item span:first-child { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.mp-item small { color: var(--cedar); font-weight: 600; }
.mp-item.out { opacity: .5; border-style: dashed; }
.mp-plus, .mp-n { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; font-weight: 700; }
.mp-plus { background: var(--pine); color: var(--cream); font-size: 18px; }
.mp-n { background: var(--ochre); color: var(--ink); }
.mp-cart { flex: none; max-height: 28vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.mp-cart:empty { display: none; }
.mp-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--cream); }
.mp-line span:first-child { display: flex; flex-direction: column; font-size: 14px; }
.mp-line small { color: var(--ink-2); }
.mp-q { display: flex; gap: 6px; }
.mp-q button { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--pine); background: #fff; color: var(--pine); font-size: 18px; }
.olist { display: flex; flex-direction: column; gap: 8px; }
.money-lines { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.money-lines .kv span:last-child { font-variant-numeric: tabular-nums; }

.quick .btn { min-width: 0; padding: 0 6px; font-size: 15px; white-space: nowrap; }
