/*
 * Mộc Sinh — token giao diện. File duy nhất được khai báo màu, cỡ chữ, khoảng cách.
 * TC-49 (Chủ 20/10, CR-TC-49-1): phong cách "Mộc Sinh Fruit — Vietnam Quiet Luxury" cho quản trị — nền giấy dó ngà, đường kẻ mảnh,
 * xanh lục bảo sâu chỉ cho nút chính và mục đang chọn, vàng son làm điểm nhấn nhỏ, màu trạng thái trầm (men ngọc, vàng đất, đỏ sơn mài, xanh chàm),
 * chữ Inter, tiêu đề trang Fraunces. POS theo cùng bộ này từ 21/10 (Chủ duyệt bản vẽ POS); chỉ bill công khai và bản xem bill giữ bộ cũ
 * (khối :root[data-skin='classic'] cuối file). Thay thương hiệu v2 13/10 của docs/tham-khao/adr/20261013-UI-thuong-hieu-v2.md. Component chỉ dùng var(--ms-*), không viết mã màu ở file khác.
 */

/* Inter (OFL, fonts/OFL-Inter.txt): chữ của quản trị — đủ dấu tiếng Việt, chữ cao và hẹp, chữ số đều (tnum). */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('./fonts/inter-vietnamese-400-normal.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;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('./fonts/inter-latin-400-normal.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;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url('./fonts/inter-vietnamese-500-normal.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;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url('./fonts/inter-latin-500-normal.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;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url('./fonts/inter-vietnamese-600-normal.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;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url('./fonts/inter-latin-600-normal.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;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url('./fonts/inter-vietnamese-700-normal.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;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url('./fonts/inter-latin-700-normal.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;
}

/* Be Vietnam Pro (OFL, fonts/OFL.txt): chỉ còn cho bill công khai và bản xem bill (data-skin='classic'). */
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('./fonts/be-vietnam-pro-vietnamese-400-normal.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;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('./fonts/be-vietnam-pro-latin-400-normal.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;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url('./fonts/be-vietnam-pro-vietnamese-500-normal.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;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url('./fonts/be-vietnam-pro-latin-500-normal.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;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url('./fonts/be-vietnam-pro-vietnamese-600-normal.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;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url('./fonts/be-vietnam-pro-latin-600-normal.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;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url('./fonts/be-vietnam-pro-vietnamese-700-normal.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;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url('./fonts/be-vietnam-pro-latin-700-normal.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;
}

/* Fraunces (OFL, fonts/OFL-Fraunces.txt): tiêu đề trang và khoảnh khắc thương hiệu, xem --ms-font-display. */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('./fonts/fraunces-vietnamese-400-normal.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;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('./fonts/fraunces-latin-400-normal.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;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url('./fonts/fraunces-vietnamese-600-normal.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;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url('./fonts/fraunces-latin-600-normal.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 {
  /* Thương hiệu: xanh lục bảo sâu cho nút chính và mục đang chọn; cam sơn mài cho huy hiệu số; vàng son làm điểm nhấn mảnh. */
  --ms-brand: #1f5a43;
  --ms-brand-hover: #194b38;
  --ms-brand-pressed: #143e2e;
  --ms-brand-ink: #1f5a43;
  --ms-brand-soft: #e6eee8;
  --ms-on-brand: #ffffff;
  /* Mảng xanh đậm (khối đóng dấu, POS); quản trị không còn dải màu ngang đầu trang. */
  --ms-topbar: #1b3a2e;
  --ms-on-topbar: #f6f2e9;
  --ms-accent: #b4532a;
  --ms-accent-ink: #97421f;
  --ms-accent-soft: #f6e8df;
  --ms-gold: #b38b4d;
  --ms-on-gold: #241a08;
  --ms-focus: #2d5fae;

  /* Nền giấy dó, mặt giấy trắng, lụa cho đầu bảng và nhóm; đường kẻ mảnh tông ấm. */
  --ms-bg: #f7f4ee;
  --ms-surface: #ffffff;
  --ms-surface-2: #f3efe7;
  --ms-surface-sunken: #ebe5da;
  /* Nền ô nhập trong tấm trên điện thoại (G1 A, TC-81): sáng bằng lụa; tối bằng nền chìm (sáng hơn lụa) để ô khác nền tấm ≥ 1,1:1, viền lỗi vẫn ≥ 3:1 (contrast.test.ts). */
  --ms-field-touch: #f3efe7;
  --ms-line: #e4ded2;
  --ms-line-strong: #8a8274;
  --ms-ink: #1f1e1b;
  --ms-ink-2: #48443d;
  --ms-muted: #6b655b;
  --ms-shimmer: rgb(255 255 255 / 0.55);
  /* Tấm nền sáng dưới logo màu: trùng nền ở chế độ sáng, vẫn sáng ở chế độ tối (logo màu 100%). */
  --ms-plate: #f7f4ee;
  /* Xanh của logo (logo-horizontal.svg): chữ đi kèm logo dùng đúng màu này; logo luôn nằm trên nền sáng nên không đổi theo chế độ tối. */
  --ms-logo-green: #0b6542;

  /* Trạng thái trầm: đỏ sơn mài, vàng đất, xanh chàm; "ổn" dùng xanh thương hiệu (men ngọc). */
  --ms-danger: #a3392b;
  --ms-danger-hover: #8c2f23;
  --ms-danger-ink: #9b3426;
  --ms-danger-soft: #f6e4df;
  --ms-warning-ink: #7a5513;
  --ms-warning-soft: #f4e9d2;
  --ms-info-ink: #2d4c75;
  --ms-info-soft: #e4eaf2;
  --ms-scrim: rgb(31 30 27 / 0.42);

  /* Chữ: Inter có chữ số đều (tnum) nên số dùng cùng họ. Fraunces cho tiêu đề trang, lockup "Fruit", lời chào, khoảnh khắc hoàn thành;
     không bao giờ ở bảng, form, số, nút, chip, hộp thoại. */
  --ms-font: 'Inter', 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, 'Noto Sans', sans-serif;
  --ms-font-num: 'Inter', 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, 'Noto Sans', sans-serif;
  --ms-font-mono: 'Cascadia Mono', Consolas, 'Liberation Mono', monospace;
  --ms-font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  /* Nhãn nhóm in hoa giãn chữ (kiểu nhãn lụa) và tiêu đề serif hơi khít. */
  --ms-tracking-label: 0.08em;
  --ms-tracking-title: -0.01em;
  --ms-fs-13: 0.8125rem;
  --ms-fs-14: 0.875rem;
  --ms-fs-15: 0.9375rem;
  --ms-fs-16: 1rem;
  /* D20: tiêu đề nhóm trong danh sách, chữ chính của nút việc Hôm nay. */
  --ms-fs-17: 1.0625rem;
  --ms-fs-18: 1.125rem;
  --ms-fs-20: 1.25rem;
  --ms-fs-22: 1.375rem;
  --ms-fs-24: 1.5rem;
  --ms-fs-26: 1.625rem;
  --ms-fs-28: 1.75rem;
  --ms-fs-32: 2rem;
  --ms-fs-36: 2.25rem;
  /* Số tiền và đồng hồ lớn của POS (TC-6 giữ đúng cỡ đang hiện: 2,4rem ≈ 38 px, 2,6rem ≈ 42 px). */
  --ms-fs-38: 2.4rem;
  --ms-fs-42: 2.6rem;
  --ms-fs-44: 2.75rem;
  --ms-fs-48: 3rem;
  --ms-fs-64: 4rem;
  --ms-fs-96: 6rem;
  /* Bill in 80 mm: px cố định theo khổ giấy, không theo cỡ chữ của máy; bản công khai to hơn cho điện thoại. */
  --ms-receipt-fs: 12.5px;
  --ms-receipt-fs-sm: 11px;
  --ms-receipt-fs-strong: 13px;
  --ms-receipt-fs-title: 15px;
  --ms-receipt-fs-total: 16px;
  --ms-receipt-fs-public: 14px;
  --ms-receipt-fs-public-sm: 13px;

  /* Khoảng cách bước 4 px (tên = số bước: 3 = 12 px; nửa bước 0-5 = 2 px, 1-5 = 6 px…), bo góc mềm theo cấp, bóng rất nhẹ chỉ cho lớp nổi. */
  --ms-space-0-5: 2px;
  --ms-space-1: 4px;
  --ms-space-1-5: 6px;
  --ms-space-2: 8px;
  --ms-space-2-5: 10px;
  --ms-space-3: 12px;
  --ms-space-3-5: 14px;
  --ms-space-4: 16px;
  --ms-space-5: 20px;
  --ms-space-6: 24px;
  --ms-space-7: 28px;
  --ms-space-8: 32px;
  --ms-space-9: 36px;
  --ms-space-10: 40px;
  --ms-space-12: 48px;
  --ms-space-14: 56px;
  --ms-space-16: 64px;
  --ms-space-18: 72px;
  --ms-radius-sm: 6px;
  --ms-radius-md: 10px;
  --ms-radius-lg: 14px;
  /* Chip chữ nhật bo nhẹ, luôn có chữ. */
  --ms-radius-chip: var(--ms-radius-sm);
  --ms-radius-pill: 999px;
  /* Nút và ô nhập cùng bo (POS giữ bo nhỏ của mình). */
  --ms-radius-control: var(--ms-radius-md);
  /* Độ đậm của chữ nút, tiêu đề hộp thoại, dòng cộng: vừa phải (POS giữ đậm). */
  --ms-weight-strong: 600;
  --ms-shadow-1: 0 1px 2px rgb(31 30 27 / 0.04), 0 8px 24px rgb(31 30 27 / 0.07);
  --ms-shadow-2: 0 2px 8px rgb(31 30 27 / 0.06), 0 24px 56px rgb(31 30 27 / 0.16);
  --ms-control-h: 40px;
  /* Đầu trang một hàng trên giấy: lockup, địa điểm và ngày, tài khoản (không còn dải xanh). POS dùng hàng lockup + dải riêng. */
  --ms-topbar-h: 60px;
  --ms-strip-h: 44px;
  --ms-header-h: var(--ms-topbar-h);
  --ms-sticky-h: 56px;
  --ms-pad-key-h: 48px;
  /* TC-81: ô nhập và phím bàn số trên điện thoại ở quản trị (quầy có mật độ riêng). */
  --ms-field-h-touch: 52px;
  --ms-pad-key-h-touch: 52px;
  /* Bàn số dính đáy khi điện thoại xoay ngang thành cột phải. */
  --ms-pad-dock-w: 340px;
  --ms-nav-w: 248px;
  --ms-nav-rail-w: 72px;
  /* Thanh tab dưới của điện thoại và máy bảng (< 1024 px). */
  --ms-tabbar-h: 60px;
  /* Vùng Toast cách đáy màn; Toast.tsx ghi đè trên vùng Toast để nổi trên phần dính đáy (data-toast-avoid, V2-13). */
  --ms-toast-bottom: var(--ms-space-4);
  /* Vùng Toast trong hộp hay tấm: khoảng từ mép phải hộp tới mép phải màn, bề rộng hộp (Toast.tsx đo, soát PR 282 S3-1). */
  --ms-toast-right: 0px;
  --ms-toast-room: 100vw;

  /* Máy tính (docs/tham-khao/ui/TC-UI.md §6, CR-TC-15-1): bề rộng trang, mật độ bảng, lưới nhập, hộp thoại có bảng, cột giỏ POS. */
  --ms-page-pad-x: clamp(var(--ms-space-6), 2vw, 40px);
  --ms-measure-form: 960px;
  --ms-measure-text: 72ch;
  --ms-aside-w: clamp(320px, 22vw, 440px);
  --ms-row-h: 44px;
  /* Sổ lưới (QUY-TAC v2 §8.2, V2-4): bảng kế toán và bảng lớn trên máy có chuột. */
  --ms-row-h-dense: 36px;
  --ms-th-h: 40px;
  --ms-cell-px: var(--ms-space-3);
  --ms-grid-cell-h: 40px;
  --ms-dialog-xl: min(1080px, calc(100vw - 64px));
  --ms-pos-cart-w: clamp(380px, 34vw, 760px);

  /* Chuyển động và vòng focus. */
  --ms-dur-1: 140ms;
  --ms-dur-2: 220ms;
  --ms-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ms-focus-ring: 0 0 0 2px var(--ms-surface), 0 0 0 4px var(--ms-focus);

  /* Lớp. */
  --ms-z-nav: 30;
  --ms-z-topbar: 35;
  --ms-z-drawer: 40;
  /* Bảng thả của ô chọn, lịch, ô tìm (TC-56): trên đầu trang và ngăn kéo, dưới thông báo. */
  --ms-z-popover: 50;
  --ms-z-toast: 60;
  --ms-z-tooltip: 90;

  color-scheme: light;
}

/* Chế độ tối (chỉ admin; POS luôn sáng): "sơn mài" — nền than xanh, chữ ngà, vàng son giữ nguyên. Hai khối giống nhau: chọn tay hoặc theo máy. */
:root[data-theme='dark'] {
  --ms-brand: #2f7356;
  --ms-brand-hover: #367d5e;
  --ms-brand-pressed: #29664c;
  --ms-brand-ink: #93cdb0;
  --ms-brand-soft: #1c3329;
  --ms-topbar: #0f241b;
  --ms-accent-ink: #f0a07c;
  --ms-accent-soft: #3a241a;
  --ms-focus: #8fb4f0;
  --ms-bg: #121512;
  --ms-surface: #191d19;
  --ms-surface-2: #1e231e;
  --ms-surface-sunken: #232923;
  --ms-field-touch: #232923;
  --ms-line: #2d332d;
  --ms-line-strong: #727a6f;
  --ms-ink: #ece7dd;
  --ms-ink-2: #cdc7bb;
  --ms-muted: #a09a8f;
  --ms-shimmer: rgb(255 255 255 / 0.06);
  --ms-plate: #f3efe5;
  --ms-danger: #c2483a;
  --ms-danger-hover: #d0594a;
  --ms-danger-ink: #f29a8a;
  --ms-danger-soft: #3a1f1b;
  --ms-warning-ink: #e5c07a;
  --ms-warning-soft: #332a19;
  --ms-info-ink: #a3c0e8;
  --ms-info-soft: #182638;
  --ms-scrim: rgb(0 0 0 / 0.6);
  --ms-shadow-1: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.35);
  --ms-shadow-2: 0 2px 8px rgb(0 0 0 / 0.3), 0 24px 56px rgb(0 0 0 / 0.5);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']):not([data-density='quay']) {
    --ms-brand: #2f7356;
    --ms-brand-hover: #367d5e;
    --ms-brand-pressed: #29664c;
    --ms-brand-ink: #93cdb0;
    --ms-brand-soft: #1c3329;
    --ms-topbar: #0f241b;
    --ms-accent-ink: #f0a07c;
    --ms-accent-soft: #3a241a;
    --ms-focus: #8fb4f0;
    --ms-bg: #121512;
    --ms-surface: #191d19;
    --ms-surface-2: #1e231e;
    --ms-surface-sunken: #232923;
    --ms-field-touch: #232923;
    --ms-line: #2d332d;
    --ms-line-strong: #727a6f;
    --ms-ink: #ece7dd;
    --ms-ink-2: #cdc7bb;
    --ms-muted: #a09a8f;
    --ms-shimmer: rgb(255 255 255 / 0.06);
    --ms-plate: #f3efe5;
    --ms-danger: #c2483a;
    --ms-danger-hover: #d0594a;
    --ms-danger-ink: #f29a8a;
    --ms-danger-soft: #3a1f1b;
    --ms-warning-ink: #e5c07a;
    --ms-warning-soft: #332a19;
    --ms-info-ink: #a3c0e8;
    --ms-info-soft: #182638;
    --ms-scrim: rgb(0 0 0 / 0.6);
    --ms-shadow-1: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.35);
    --ms-shadow-2: 0 2px 8px rgb(0 0 0 / 0.3), 0 24px 56px rgb(0 0 0 / 0.5);
    color-scheme: dark;
  }
}

/*
 * Bill công khai và bản xem bill (data-skin='classic') giữ bộ thương hiệu v2 13/10 — màu, chữ Be Vietnam Pro, bo 4/8/12 — tới khi CDV vẽ
 * lại. POS đã sang Quiet Luxury (TC-59 POS-0, Chủ duyệt 21/10).
 */
:root[data-skin='classic'] {
  --ms-brand: #0b6542;
  --ms-brand-hover: #08553a;
  --ms-brand-pressed: #064530;
  --ms-brand-ink: #0a4f35;
  --ms-brand-soft: #e7f2ec;
  --ms-topbar: #0a4f35;
  --ms-on-topbar: #ffffff;
  --ms-accent: #e85d27;
  --ms-accent-ink: #b4441a;
  --ms-accent-soft: #fdeee6;
  --ms-gold: #da9b2a;
  --ms-on-gold: #2b1d00;
  --ms-focus: #2563c9;
  --ms-bg: #fffef9;
  --ms-surface: #ffffff;
  --ms-surface-2: #f8faf9;
  --ms-surface-sunken: #edf2ef;
  --ms-line: #d9e2dd;
  --ms-line-strong: #7e8c85;
  --ms-ink: #14211b;
  --ms-ink-2: #3b4a43;
  --ms-muted: #5c6b64;
  --ms-plate: #fffef9;
  --ms-danger: #b42318;
  --ms-danger-hover: #95190f;
  --ms-danger-ink: #b42318;
  --ms-danger-soft: #fdedeb;
  --ms-warning-ink: #7a5200;
  --ms-warning-soft: #fcf1da;
  --ms-info-ink: #1f5a9e;
  --ms-info-soft: #eaf2fb;
  --ms-scrim: rgb(10 30 20 / 0.48);
  --ms-font: 'Be Vietnam Pro', 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, 'Noto Sans', sans-serif;
  --ms-font-num: 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, 'Noto Sans', sans-serif;
  --ms-radius-sm: 4px;
  --ms-radius-md: 8px;
  --ms-radius-lg: 12px;
  --ms-radius-control: var(--ms-radius-sm);
  --ms-weight-strong: 700;
  --ms-shadow-1: 0 1px 2px rgb(16 33 26 / 0.06), 0 6px 16px rgb(16 33 26 / 0.1);
  --ms-shadow-2: 0 2px 6px rgb(16 33 26 / 0.08), 0 20px 48px rgb(16 33 26 / 0.24);
  --ms-topbar-h: 68px;
  --ms-header-h: calc(var(--ms-topbar-h) + var(--ms-strip-h));
  --ms-dur-1: 120ms;
  --ms-dur-2: 200ms;
}

/*
 * Mật độ "quầy" (POS, TC-59 POS-0 theo bản vẽ Chủ duyệt 21/10): bảng màu Quiet Luxury như quản trị, luôn sáng (data-density giữ POS khỏi
 * chế độ tối); ô 48 px, chữ gốc 16 px (chữ thường 15 px đặt ở .ms-pos), thanh đầu 68 px. Cam và vàng của logo chỉ làm dấu nhỏ.
 */
:root[data-density='quay'] {
  --ms-control-h: 48px;
  --ms-sticky-h: 48px;
  --ms-topbar-h: 68px;
  --ms-logo-orange: #e85d27;
  --ms-logo-gold: #da9b2a;
}

/* Màn cảm ứng ở admin: ô và nút cao 44 px (đích chạm, ADR UI §5). Quầy có mật độ riêng. */
@media (pointer: coarse) {
  :root:not([data-density]) {
    --ms-control-h: 44px;
  }
  /* Hàng bảng và ô lưới cao 48 px khi chạm bằng tay (TC-UI §2.1); sổ lưới cũng vậy (§8.2: hàng dày chỉ cho máy có chuột). */
  :root {
    --ms-row-h: 48px;
    --ms-row-h-dense: 48px;
    --ms-grid-cell-h: 48px;
  }
}

/* Điện thoại dọc hoặc xoay ngang: đầu trang thấp hơn (biểu tượng màu 32 px thay logo ngang). Bộ chọn có thuộc tính để thắng khối POS ở trên. */
@media (max-width: 639px), (max-height: 499px) {
  :root,
  :root[data-density],
  :root[data-skin] {
    --ms-topbar-h: 56px;
  }
  :root:not([data-density]) {
    --ms-pad-key-h: var(--ms-pad-key-h-touch);
  }
}

@media (prefers-reduced-motion: reduce) {
  :root,
  :root[data-density],
  :root[data-skin] {
    --ms-dur-1: 0ms;
    --ms-dur-2: 0ms;
  }
}

/* In trang admin: chỉ đen trắng. Bill in nhiệt có mẫu riêng (P4-D). */
@media print {
  :root,
  :root[data-density],
  :root[data-skin] {
    --ms-bg: #ffffff;
    --ms-surface: #ffffff;
    --ms-surface-2: #ffffff;
    --ms-field-touch: #ffffff;
    --ms-ink: #000000;
    --ms-ink-2: #000000;
    --ms-muted: #000000;
    --ms-line: #000000;
  }
}
