:root {
  --nen: #f3eee8; --the: #fffdfb; --vien: #e6ddd3; --vien2: #efe7de; --nau: #4a3226; --nau2: #3b2a22; --nauNhat: #efe6d8;
  --chu: #2b211c; --mo: #5f554e; --hong: #f8d4dd; --hongDam: #b8325e; --hongChu: #7a1f3d; --trong: #ebe5e1;
  --do: #d93a3a; --doChu: #b42318; --doNen: #fbe0e0; --vang: #ffeaa6; --vangVien: #eccb5c; --vangChu: #6b4b00;
  --xanh: #1a6e47; --xanhNen: #e4f5ec; --lam: #1d4f8a; --lamNen: #e3eefb;
  --font: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --disp: 'Baloo 2', 'Be Vietnam Pro', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--nen); color: var(--chu); font-family: var(--font); font-size: 15px; }
body { min-width: 1200px; }
button { font-family: inherit; cursor: pointer; color: inherit; }
button:disabled { cursor: not-allowed; opacity: .45; }
input, select, textarea { font-family: inherit; font-size: 15px; color: var(--chu); }
[hidden] { display: none !important; }
.so { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--nau); outline-offset: 2px; }

/* ---------- màn nhập vé ---------- */
.man-ve { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.the-ve { width: 440px; background: var(--the); border: 1px solid var(--vien); border-radius: 20px; padding: 28px; display: grid; gap: 16px; }
.the-ve h1 { margin: 0; font-family: var(--disp); font-size: 28px; }
.logo { display: inline-flex; align-items: center; height: 44px; padding: 0 16px; border-radius: 12px; background: var(--nau); color: #fff; font-family: var(--disp); font-size: 20px; font-weight: 800; letter-spacing: .5px; white-space: nowrap; }
.the-ve input { height: 52px; border: 1px solid var(--vien); border-radius: 12px; padding: 0 14px; font-size: 20px; letter-spacing: 2px; text-transform: uppercase; background: #fff; }
.nut-chinh { height: 50px; border: 0; border-radius: 12px; background: var(--nau); color: #fff; font-size: 17px; font-weight: 700; padding: 0 18px; }
.nut-phu { height: 44px; border: 1px solid var(--vien); border-radius: 12px; background: #fff; font-size: 15px; font-weight: 600; padding: 0 16px; }
.nut-nho { height: 34px; border: 1px solid #c9b8a6; border-radius: 10px; background: #fff; color: var(--nau2); font-size: 13px; font-weight: 700; padding: 0 12px; white-space: nowrap; }
.nut-nho.dam { background: var(--nau); border-color: var(--nau); color: #fff; }
.nut-nho.do { border-color: #e8a9a9; color: var(--doChu); }
.loi { color: var(--doChu); font-size: 14px; min-height: 20px; }
.goi-y { color: var(--mo); font-size: 13px; line-height: 19px; }

/* ---------- thanh trên ---------- */
.thanh { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 20px; background: var(--the); border-bottom: 1px solid var(--vien); }
.tab { height: 44px; padding: 0 18px; display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid transparent; background: none; color: var(--mo); font-weight: 600; font-size: 16px; }
.tab.on { background: var(--nauNhat); border-color: #d9ccb8; color: var(--nau2); font-weight: 700; }
.gian { flex-grow: 1; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid #e3d9ce; background: var(--the); font-size: 14px; font-weight: 600; color: var(--chu); white-space: nowrap; }
.chip.do { background: var(--do); border-color: var(--do); color: #fff; }
.chip.bat { background: var(--nauNhat); }
.chip .dau { width: 22px; height: 16px; border-radius: 4px; flex: none; }
.chip small { font-weight: 500; opacity: .9; }
.bao-mang { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 8px 20px; font-size: 14px; font-weight: 600; background: var(--vang); color: var(--vangChu); border-bottom: 1px solid var(--vangVien); }
.bao-mang.do { background: var(--doNen); color: var(--doChu); border-color: #eeb1b1; }

/* ---------- bố cục ---------- */
.trang { padding: 16px; display: flex; gap: 16px; align-items: flex-start; }
.cot-trai { flex: 1.15 1 0; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.cot-phai { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.the { background: var(--the); border: 1px solid var(--vien); border-radius: 18px; padding: 16px 18px; }
.the.dam { border: 2px solid #c9b8a6; }
.dau-the { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.dau-the h2 { margin: 0; font-size: 19px; font-weight: 700; }
.dau-the .ghi { font-size: 13px; color: var(--mo); }

/* ---------- sơ đồ phòng ---------- */
.so-do { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px 14px; padding-top: 8px; }
.o-phong { position: relative; height: 132px; border-radius: 14px; border: 0; padding: 0; display: flex; flex-direction: column; text-align: center; background: var(--trong); }
.o-phong.co { background: var(--hong); }
.o-phong.chon { box-shadow: 0 0 0 3px var(--chu); }
.o-phong .dai { height: 34px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 14px 14px 0 0; background: var(--hongDam); color: #fff; font-size: 15px; font-weight: 700; }
.o-phong .than { flex-grow: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2px 10px; width: 100%; }
.o-phong .ten { font-family: var(--disp); font-size: 30px; font-weight: 700; line-height: 32px; color: #6f6560; }
.o-phong.co .ten { color: var(--hongChu); }
.o-phong .tien { font-size: 20px; font-weight: 700; }
.o-phong .mon { font-size: 13px; align-self: flex-start; }
.o-phong .phu { font-size: 13px; font-weight: 600; color: var(--doChu); }
.o-phong .the-do { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 3px 10px; border-radius: 999px; background: var(--do); color: #fff; font-size: 12px; font-weight: 700; z-index: 2; }
.o-phong .the-do.vang { background: #e2a500; color: #2b211c; }
.o-phong .chuong { position: absolute; right: 8px; bottom: 6px; font-size: 12px; font-weight: 700; color: var(--doChu); }

/* ---------- chi tiết phòng ---------- */
.ct-phong { display: flex; gap: 20px; flex-wrap: wrap; }
.ct-trai { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.ct-phai { flex: 1 1 300px; min-width: 0; background: #f6f1ea; border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.ten-lon { font-family: var(--disp); font-size: 32px; font-weight: 800; color: var(--hongDam); line-height: 36px; }
.hang-mon { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #f1ebe3; padding-bottom: 8px; }
.hang-mon .ten-mon { flex-grow: 1; display: flex; flex-direction: column; min-width: 0; }
.hang-mon .ten-mon b { font-size: 16px; font-weight: 600; }
.hang-mon .ten-mon small { font-size: 13px; color: var(--mo); }
.hang-mon .thanh-tien { font-size: 17px; font-weight: 700; min-width: 96px; text-align: right; }
.dem { display: inline-flex; align-items: center; border: 1px solid #e3d9ce; border-radius: 10px; overflow: hidden; height: 36px; }
.dem button { width: 34px; height: 36px; border: 0; background: #f6f1ea; font-size: 18px; color: var(--nau2); }
.dem span { min-width: 34px; text-align: center; font-weight: 700; }
.tong { display: flex; justify-content: space-between; align-items: baseline; }
.tong b { font-family: var(--disp); font-size: 34px; font-weight: 800; }
.chon3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; background: #fff; border: 1px solid #e3d9ce; border-radius: 12px; }
.chon3 button { height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--mo); font-size: 14px; font-weight: 700; }
.chon3 button.on { background: var(--nau); color: #fff; }
.o-tra { background: #fff; border: 1px solid #e3d9ce; border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.o-tra .lon { font-family: var(--disp); font-size: 26px; font-weight: 800; }
.tien-nhanh { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.tien-nhanh button { height: 36px; border: 1px solid #e3d9ce; border-radius: 9px; background: #fff; font-size: 13px; font-weight: 700; }
.o-nhap { height: 40px; border: 1px solid #e3d9ce; border-radius: 10px; padding: 0 10px; background: #fff; width: 100%; }
.nut-tt { height: 56px; border: 0; border-radius: 14px; background: var(--nau); color: #fff; font-size: 19px; font-weight: 700; }
.huy-nhe { background: none; border: 0; color: var(--doChu); font-size: 13px; font-weight: 600; padding: 4px; }
.trong-ct { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 8px 0; }

/* ---------- huy hiệu ---------- */
.hh { display: inline-flex; align-items: center; padding: 5px 11px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.hh.xanh { background: var(--xanhNen); color: var(--xanh); }
.hh.vang { background: var(--vang); color: var(--vangChu); }
.hh.do { background: var(--doNen); color: var(--doChu); }
.hh.xam { background: #f0ebe5; color: var(--mo); }
.hh.lam { background: var(--lamNen); color: var(--lam); }

/* ---------- camera, thiết bị ---------- */
.cam { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cam div { height: 96px; border-radius: 12px; background: #e3dbd3; display: flex; align-items: flex-end; padding: 8px 10px; font-size: 13px; font-weight: 700; }
.hn { display: flex; flex-direction: column; gap: 8px; }
.hn-nhom { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hn-ten-nhom { width: 100%; font-size: 12px; font-weight: 700; color: var(--mo); }
.hn-o { display: inline-flex; flex-direction: column; justify-content: center; align-items: flex-start; min-width: 82px; min-height: 46px; padding: 4px 12px; border-radius: 12px; border: 1px solid #e3d9ce; background: var(--the); color: var(--mo); font: inherit; text-align: left; }
.hn-o b { font-size: 14px; font-weight: 700; }
.hn-o small { font-size: 11px; font-weight: 600; }
.hn-o.on { background: var(--lamNen); border-color: #9fc1ea; color: var(--lam); }
.hn-o.ngoai { opacity: .6; }
.hn-o.cho { border-style: dashed; }
button.hn-o { cursor: pointer; }
button.hn-o:hover { border-color: var(--nau); }
.luoi-tb { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.o-tb { border-radius: 12px; padding: 9px 10px; display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--vien); background: var(--the); min-width: 0; font-size: 12px; }
.o-tb b { font-size: 14px; font-weight: 800; }
.o-tb .pin { font-size: 13px; font-weight: 700; }
.o-tb.vang { background: #ffeaa6; border-color: var(--vangVien); }
.o-tb.do { background: #fbe0e0; border-color: #eeb1b1; }
.o-tb.xam { background: #f4f0eb; color: var(--mo); }

/* ---------- chi tiết: két, điện, menu, qr ---------- */
.trang.doc { flex-direction: column; align-items: stretch; }
.hai-cot { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.hai-cot > .the { min-width: 0; }
@media (max-width: 1320px) { .hai-cot { grid-template-columns: minmax(0, 1fr); } }
.chon-nho { display: inline-flex; padding: 4px; gap: 4px; background: #f6f1ea; border-radius: 12px; }
.chon-nho button { height: 36px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: var(--mo); font-size: 14px; font-weight: 600; }
.chon-nho button.on { background: var(--nau); color: #fff; font-weight: 700; }
.luoi-ket { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.o-ket { border: 1px solid var(--vien); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.o-ket .dau { display: flex; justify-content: space-between; align-items: baseline; }
.o-ket .dau b { font-size: 17px; }
.o-ket .dau span { font-size: 13px; color: var(--mo); }
.o-ket .dem { width: 100%; height: 40px; }
.o-ket .dem button { width: 44px; height: 40px; }
.o-ket .dem input { flex-grow: 1; width: 40px; height: 38px; border: 0; text-align: center; font-size: 17px; font-weight: 700; background: #fff; }
.chan { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #f6f1ea; border-radius: 14px; padding: 12px 16px; margin-top: 12px; }
.chan .lon { font-family: var(--disp); font-size: 30px; font-weight: 800; line-height: 34px; }
.bang { width: 100%; border-collapse: collapse; font-size: 15px; }
.bang th { text-align: left; font-size: 13px; color: var(--mo); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--vien); }
.bang td { padding: 10px; border-bottom: 1px solid #f1ebe3; }
.bang tr.canh td { background: #fdf0f0; }
.luoi-menu { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; max-height: 520px; overflow-y: auto; padding-right: 2px; }
.o-menu { display: flex; align-items: center; gap: 8px; border: 1px solid var(--vien); border-radius: 12px; padding: 8px 10px; min-width: 0; }
.o-menu.an { opacity: .55; }
.o-menu input.ten { flex: 1 1 160px; min-width: 120px; font-weight: 600; }
.o-menu input.gia { width: 100px; flex: none; text-align: right; }
.o-menu select { width: 100px; flex: none; }
.o-menu .nut-nho { flex: none; min-width: 78px; }
.o-menu input, .o-menu select { height: 34px; border: 1px solid #e3d9ce; border-radius: 8px; padding: 0 8px; background: #fff; font-size: 14px; }
.nut-icon { width: 30px; height: 30px; border: 1px solid #e3d9ce; border-radius: 8px; background: #fff; font-size: 14px; flex: none; }
.bang-gia { display: grid; grid-template-columns: 150px repeat(3, minmax(0, 1fr)); gap: 6px; align-items: center; font-size: 14px; }
.bang-gia input { height: 34px; border: 1px solid #e3d9ce; border-radius: 8px; padding: 0 8px; width: 100%; background: #fff; }
.luoi-qr { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.o-qr { border: 1px solid var(--vien); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 6px; background: var(--the); min-width: 0; }
.o-qr.thieu { border-color: #eeb1b1; background: #fdf0f0; }
.o-qr input { height: 32px; border: 1px solid #e3d9ce; border-radius: 8px; padding: 0 8px; font-size: 12px; width: 100%; background: #fff; }

/* ---------- chat ---------- */
.luoi-chat { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; padding: 0 16px 16px; }
.o-chat { background: var(--the); border: 1px solid var(--vien); border-radius: 16px; display: flex; flex-direction: column; height: 400px; min-width: 0; }
.o-chat.nong { border: 2px solid var(--do); }
.o-chat .hd { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--vien2); background: #f8f3ed; border-radius: 16px 16px 0 0; }
.o-chat .bd { flex-grow: 1; padding: 12px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.o-chat .ft { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--vien2); }
.o-chat .ft input { flex-grow: 1; min-width: 0; height: 40px; border: 1px solid #e3d9ce; border-radius: 10px; padding: 0 10px; background: #fff; }
.o-chat .ft button { width: 44px; height: 40px; border: 0; border-radius: 10px; background: var(--nau); color: #fff; font-weight: 700; }
.tin { max-width: 85%; border-radius: 12px; padding: 8px 10px; font-size: 14px; line-height: 20px; word-wrap: break-word; }
.tin.kh { align-self: flex-start; background: #f3ece4; }
.tin.mi { align-self: flex-end; background: var(--nau); color: #fff; }
.tin small { display: block; font-size: 11px; opacity: .85; margin-top: 2px; }
.don { border: 2px solid var(--do); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 6px; background: #fff; }
.don.da { border: 1px solid #e3d9ce; background: #f8f3ed; }
.don .tieu { font-size: 13px; font-weight: 700; color: var(--doChu); }
.don.da .tieu { color: var(--mo); }
.trong-chat { flex-grow: 1; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 14px; color: #6f6560; padding: 12px; }

/* ---------- lớp phủ ---------- */
.lop { position: fixed; inset: 0; z-index: 50; background: rgba(43, 33, 28, .38); display: flex; align-items: flex-start; justify-content: center; padding: 70px 20px 20px; overflow-y: auto; }
.hop { background: var(--the); border-radius: 18px; padding: 18px 20px; width: 720px; max-width: 100%; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 20px 50px rgba(43, 33, 28, .25); }
.hop h3 { margin: 0; font-size: 20px; }
.hop .dau-hop { display: flex; align-items: center; gap: 10px; }
.nhom-mon { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.nhom-mon button { min-height: 64px; border: 1px solid #e3d9ce; border-radius: 12px; background: #fff; text-align: left; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.nhom-mon button b { font-size: 15px; }
.nhom-mon button span { font-size: 13px; color: var(--mo); }
.hang-bill { display: flex; align-items: center; gap: 10px; border: 1px solid var(--vien); border-radius: 12px; padding: 10px 12px; flex-wrap: wrap; }
.hang-bill .tt { flex-grow: 1; display: flex; flex-direction: column; min-width: 200px; }
.thong-bao { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; background: var(--nau2); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 15px; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); max-width: 80vw; }
.bao-am { position: fixed; right: 20px; bottom: 20px; z-index: 40; background: var(--vang); color: var(--vangChu); border: 1px solid var(--vangVien); padding: 10px 14px; border-radius: 12px; font-size: 14px; font-weight: 600; }

/* ---------- in bill 80mm ---------- */
.in-bill { display: none; }
@media print {
  @page { size: 80mm auto; margin: 0; }
  body { min-width: 0; background: #fff; }
  body > *:not(.in-bill) { display: none !important; }
  .in-bill { display: block; width: 72mm; margin: 0 auto; padding: 3mm 0; font-family: Arial, sans-serif; font-size: 11pt; color: #000; }
  .in-bill h1 { font-size: 15pt; text-align: center; margin: 0 0 1mm; }
  .in-bill .giua { text-align: center; }
  .in-bill table { width: 100%; border-collapse: collapse; }
  .in-bill td { padding: 1mm 0; vertical-align: top; }
  .in-bill td.p { text-align: right; white-space: nowrap; }
  .in-bill hr { border: 0; border-top: 1px dashed #000; margin: 2mm 0; }
  .in-bill .tong-in { font-size: 14pt; font-weight: bold; }
}
