/* ZENTEA · Văn phòng ảo (06/11/2026) — dùng biến màu của css/zalo-ai.css, nút/modal chung với xuong-video.css */
#vpApp { max-width: 1440px; margin: 0 auto; }
body:has(#tab-van-phong:not(.hidden)) main, body:has(#tab-van-phong:not(.hidden)) .topbar-in, body:has(#tab-van-phong:not(.hidden)) .tabs { max-width: 1480px; }
.vp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.vp-head h1 { font-size: 20px; margin: 0; }
.vp-head .seg button { display: inline-flex; gap: 6px; align-items: center; }
.vp-av { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px; flex: none; overflow: hidden; }
.vp-av img { width: 100%; height: 100%; object-fit: cover; }
.vp-av.xs { width: 22px; height: 22px; font-size: 9px; }
/* Văn phòng */
.vp-org { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; align-items: start; }
.vp-org > .card + .card { margin-top: 0; }
.vp-pb { padding: 0; overflow: hidden; }
.vp-pb-h { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 16px 10px; border-top: 4px solid; border-bottom: 1px solid var(--line); }
.vp-nv { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); }
.vp-nv:first-of-type { border-top: 0; }
.vp-nv-b { flex: 1; min-width: 0; }
.vp-nv-t { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.vp-vai { font-size: 11px; font-weight: 700; color: var(--brand); background: var(--brand-soft); border-radius: 999px; padding: 0 7px; }
.vp-nv-st { margin-top: 3px; }
.vp-nv-a { display: flex; gap: 2px; flex: none; }
/* Kanban */
.vp-loc { margin-bottom: 10px; }
.vp-kanban { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 12px; align-items: start; overflow-x: auto; padding-bottom: 6px; }
.vp-col { background: #e9eeeb; border-radius: 14px; padding: 10px; min-height: 160px; }
.vp-col-cho-duyet { background: #f6ebe3; }
.vp-col-hoan-thanh { background: #e4efe8; }
.vp-col-h { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 8px; }
.vp-task { display: block; width: 100%; text-align: left; border: 1px solid transparent; cursor: pointer; font: inherit; color: inherit; padding: 10px 12px; margin: 0 0 8px; }
.vp-task + .vp-task { margin-top: 0; }
.vp-task:hover { border-color: var(--brand-2); }
.vp-task-t { font-weight: 600; line-height: 1.35; }
.vp-uu { font-size: 11px; font-weight: 700; color: #fff; background: var(--bad); border-radius: 5px; padding: 0 5px; vertical-align: 1px; }
.vp-task-m { display: flex; gap: 6px; align-items: center; margin-top: 6px; font-size: 13px; }
.vp-task-f { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; align-items: center; }
.vp-task-f .pill { display: inline-flex; gap: 3px; align-items: center; }
.vp-task-f .pill svg { width: 12px; height: 12px; }
.vp-dang { margin-left: auto; }
.vp-loi { margin-top: 6px; font-size: 12.5px; color: var(--bad); }
.vp-trong { text-align: center; padding: 18px 0; }
/* Modal chi tiết / giao việc / chat */
.vp-modal .modal-card.lg { width: min(760px, 100%); }
.vp-modal .modal-card.xl { width: min(1000px, 100%); height: min(92vh, 900px); }
.vp-modal .modal-card.chat { width: min(640px, 100%); height: min(86vh, 760px); }
#vpCt { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.vp-ct-h { display: flex; gap: 12px; align-items: center; min-width: 0; }
.vp-ct-h b { font-size: 16px; }
.vp-ct-nut { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 0 16px 10px; border-bottom: 1px solid var(--line); }
.vp-xuat { display: inline-flex; gap: 4px; align-items: center; margin-left: auto; font-size: 13px; color: var(--muted); }
.vp-ct-b { flex: 1; overflow-y: auto; padding: 12px 16px 18px; min-height: 0; }
.vp-yc summary, .vp-con-i summary { cursor: pointer; }
.vp-pre { white-space: pre-wrap; background: #f6f8f7; border-radius: 10px; padding: 10px 12px; margin: 8px 0; font-size: 14px; }
.vp-tep-ds { display: grid; gap: 6px; margin: 8px 0; }
.vp-tep { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 9px; padding: 6px 10px; background: #fff; font: inherit; text-align: left; cursor: pointer; }
.vp-tep span:first-of-type { font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vp-con { margin: 14px 0; display: grid; gap: 6px; }
.vp-con-i { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.vp-con-i summary { display: flex; gap: 8px; align-items: center; }
.vp-con-i summary > span:nth-child(2) { flex: 1; font-weight: 500; }
.vp-kq { margin: 14px 0; border: 1px solid #cfe3d6; border-radius: 12px; padding: 12px 16px; background: #fbfdfc; }
.vp-kq-h { display: flex; gap: 8px; align-items: baseline; margin-bottom: 4px; }
.vp-md { font-size: 14.5px; }
.vp-md h2, .vp-md h3, .vp-md h4 { color: var(--brand); margin: 14px 0 6px; }
.vp-md h2 { font-size: 17px; } .vp-md h3 { font-size: 15.5px; } .vp-md h4 { font-size: 14.5px; }
.vp-tbl { overflow-x: auto; margin: 8px 0; }
.vp-md table { border-collapse: collapse; font-size: 13.5px; min-width: 60%; }
.vp-md th, .vp-md td { border: 1px solid #cfd8d3; padding: 5px 9px; text-align: left; vertical-align: top; }
.vp-md th { background: #eaf2ed; }
.vp-md code { background: #eef2ef; padding: 0 4px; border-radius: 4px; }
.vp-ls { margin-top: 16px; display: grid; gap: 4px; font-size: 13.5px; }
.vp-ls-i { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.vp-chat { flex: 1; overflow-y: auto; padding: 12px 16px; background: #eef2f0; min-height: 0; }
.vp-modal .modal-card.chat { display: flex; flex-direction: column; }
.vp-msg { display: flex; gap: 8px; align-items: flex-end; margin: 6px 0; }
.vp-msg.me { justify-content: flex-end; }
.vp-bb { background: #fff; border-radius: 14px; padding: 7px 12px; max-width: 82%; box-shadow: 0 1px 1px rgba(0,0,0,.05); overflow-wrap: anywhere; }
.vp-msg.me .vp-bb { background: #d7efe0; }
.vp-bb .vp-md p:first-child { margin-top: 0; } .vp-bb .vp-md p:last-child { margin-bottom: 0; }
/* Cấu hình YAML */
.vp-cfg { display: flex; flex-direction: column; }
#vpYaml { width: 100%; min-height: 62vh; font-family: Consolas, "Cascadia Mono", monospace; font-size: 13px; line-height: 1.5; border: 1px solid var(--line); border-radius: 10px; padding: 12px; resize: vertical; tab-size: 2; white-space: pre; }
@media (max-width: 900px) { .vp-kanban { grid-template-columns: repeat(4, 82vw); } .vp-xuat { margin-left: 0; } }
/* ── Văn phòng 3D ── */
.vp3d { position: relative; height: calc(100vh - 262px); min-height: 460px; border-radius: 14px; overflow: hidden; background: #dde7ea; box-shadow: var(--shadow); }
.vp3d .vp3-cv { width: 100%; height: 100%; display: block; touch-action: none; }
.vp3-chu { position: absolute; left: 12px; top: 12px; display: flex; gap: 10px; flex-wrap: wrap; background: rgba(255,255,255,.88); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; }
.vp3-chu span { display: inline-flex; gap: 5px; align-items: center; }
.vp3-chu i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.vp3-nut { position: absolute; left: 12px; bottom: 12px; }
.vp3-tip { position: absolute; pointer-events: none; background: rgba(20,28,24,.88); color: #fff; font-size: 12.5px; padding: 4px 9px; border-radius: 7px; white-space: nowrap; z-index: 3; }
.vp3-pan { position: absolute; right: 12px; top: 12px; width: 310px; max-height: calc(100% - 24px); overflow: auto; background: rgba(255,255,255,.97); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 12px 14px; display: grid; gap: 10px; z-index: 2; }
.vp3-pan-h { display: flex; gap: 10px; align-items: center; }
.vp3-pan-h > div { flex: 1; min-width: 0; }
.vp3-dot { width: 38px; height: 38px; border-radius: 50%; color: #fff; font-weight: 700; display: grid; place-items: center; flex: none; }
.vp3-ai, .vp3-viec { display: grid; gap: 4px; }
.vp3-v { display: flex; gap: 7px; align-items: center; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 5px 8px; cursor: pointer; font: inherit; font-size: 13px; }
.vp3-v i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.vp3-act { display: flex; gap: 6px; flex-wrap: wrap; }
/* ── Khoá AI ── */
.vp-ai-g { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; align-items: start; }
.vp-ai-g > .card + .card { margin-top: 0; }
.vp-key { display: flex; justify-content: space-between; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; }
.vp-gan-ds { display: grid; }
.vp-gan { display: grid; grid-template-columns: 24px minmax(160px, 1fr) minmax(200px, 1.2fr) minmax(160px, 1fr) auto; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); }
.vp-gan-t { display: flex; flex-direction: column; }
.vp-gan-m, #vpKMdl, #vpGMdl { border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; width: 100%; }
@media (max-width: 900px) {
  .vp-ai-g { grid-template-columns: 1fr; }
  .vp-gan { grid-template-columns: 24px 1fr; }
  .vp-gan select, .vp-gan input, .vp-gan button { grid-column: 2; }
  .vp3-pan { left: 12px; right: 12px; width: auto; top: auto; bottom: 12px; max-height: 55%; }
}

.vp-or { display: flex; gap: 12px; align-items: center; justify-content: space-between; background: var(--brand-soft); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.vp-or .btn { flex: none; }
.vp-hoac { text-align: center; position: relative; margin: 8px 0 12px; font-size: 12.5px; color: var(--muted); }
.vp-hoac::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--line); }
.vp-hoac span { position: relative; background: #fff; padding: 0 10px; }
@media (max-width: 900px) { .vp-or { flex-direction: column; align-items: stretch; } }

/* ── Quán ảo (js/quan-ao.js, 09/11/2026) ── */
body.tab-quan-ao main { max-width: none; padding: 10px 14px 8px; }
body.tab-quan-ao .topbar-in, body.tab-quan-ao .tabs { max-width: none; }
body.tab-quan-ao #zaloBanner { display: none; }
#tab-quan-ao .qa-stage { height: calc(100vh - 205px); min-height: 440px; }
.qa:fullscreen { background: var(--bg); padding: 10px; }
.qa:fullscreen .qa-stage { height: calc(100vh - 74px); min-height: 0; }
.qa:-webkit-full-screen { background: var(--bg); padding: 10px; width: 100%; height: 100%; }
.qa:-webkit-full-screen .qa-stage { height: calc(100vh - 74px); min-height: 0; }
.qa-full .ic { width: 15px; height: 15px; }
.qa { display: grid; gap: 10px; }
.qa-top { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.qa-top .btn.on { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); font-weight: 600; }
.qa-stage { position: relative; height: calc(100vh - 300px); min-height: 480px; border-radius: 14px; overflow: hidden; background: #d3ddd6; box-shadow: var(--shadow); user-select: none; -webkit-user-select: none; }
.qa-stage canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.qa-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.qa-zl { position: absolute; transform: translate(-50%, -100%); padding: 2px 8px; border-radius: 6px; background: rgba(255,255,255,.92); color: #1b2a22; font-size: 12px; font-weight: 600; white-space: nowrap; box-shadow: 0 1px 3px rgba(0,0,0,.18); border-left: 3px solid var(--brand); }
.qa-zl-tram { font-size: 11px; font-weight: 500; border-left-color: #e0a106; opacity: .92; pointer-events: auto; cursor: pointer; }
.qa-zl-tram b { display: inline-block; min-width: 14px; text-align: center; background: #1d2a23; color: #fff; border-radius: 4px; font-size: 10px; margin-right: 3px; }
.qa-zl-tram:hover { opacity: 1; background: #fff; }
.qa-zl-tram.on { background: #e0a106; color: #fff; opacity: 1; }
.qa-nvt { pointer-events: none; font-size: 11px; padding: 1px 7px; background: rgba(31,107,71,.9); color: #fff; border-left: 0; border-radius: 9px; }
.qa-ns { margin-top: 10px; padding: 7px 10px; border-radius: 8px; background: #eef5f0; border-left: 3px solid #1f6b47; }
.qa-bub { position: absolute; transform: translate(-50%, -100%); max-width: 210px; padding: 5px 10px; border-radius: 10px; background: #fff; color: #1b2a22; font-size: 12px; line-height: 1.35; box-shadow: 0 2px 6px rgba(0,0,0,.22); }
.qa-bub::after { content: ""; position: absolute; left: 50%; bottom: -5px; margin-left: -5px; border: 5px solid transparent; border-bottom: 0; border-top-color: #fff; }
.qa-bub.staff { background: var(--brand); color: #fff; }
.qa-bub.staff::after { border-top-color: var(--brand); }
.qa-hud { position: absolute; left: 12px; top: 12px; display: grid; gap: 1px; padding: 8px 12px; border-radius: 10px; background: rgba(16,24,20,.74); color: #f1f5f2; font-size: 12.5px; line-height: 1.45; pointer-events: none; font-variant-numeric: tabular-nums; }
.qa-hud b { font-size: 14px; }
.qa-tk { position: absolute; right: 12px; top: 12px; width: 236px; display: grid; gap: 8px; max-height: calc(100% - 84px); overflow: auto; align-content: start; }
.qa-tkc { background: rgba(255,255,255,.97); border-radius: 10px; padding: 8px 10px; font-size: 12.5px; border: 2px solid transparent; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.12); display: grid; gap: 3px; }
.qa-tkc.on { border-color: #e0a106; }
.qa-tk-trong { cursor: default; color: var(--muted); }
.qa-tk-d { color: #45514a; }
.qa-tk-b { font-weight: 600; color: var(--brand); }
.qa-pb { height: 5px; border-radius: 3px; background: #e4e8e5; overflow: hidden; margin-top: 2px; }
.qa-pb i { display: block; height: 100%; width: 100%; background: #2f9e62; }
.qa-tay { position: absolute; left: 12px; bottom: 12px; max-width: calc(100% - 200px); background: rgba(255,255,255,.95); border-radius: 10px; padding: 7px 11px; font-size: 12.5px; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.qa-act { position: absolute; right: 12px; bottom: 12px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; max-width: min(560px, calc(100% - 24px)); }
.qa-act-b { font-size: 15px; padding: 11px 16px; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.qa-act-b kbd { font: inherit; font-size: 12px; background: rgba(255,255,255,.22); border-radius: 5px; padding: 0 6px; }
.qa-act-b:not(.btn-primary) { background: rgba(255,255,255,.96); }
.qa-act-b:not(.btn-primary) kbd { background: rgba(0,0,0,.08); }
.qa-act-b[disabled] { opacity: .6; }
.qa-pan { position: absolute; left: 50%; bottom: 60px; transform: translateX(-50%); width: min(430px, calc(100% - 24px)); background: #fff; border-radius: 14px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.2); display: grid; gap: 10px; z-index: 3; }
.qa-pan-h { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.qa-gauge { position: relative; height: 30px; border-radius: 8px; background: #eef1ee; overflow: hidden; }
.qa-g-band { position: absolute; top: 0; bottom: 0; background: rgba(47,158,98,.22); border-left: 2px solid #2f9e62; border-right: 2px solid #2f9e62; }
.qa-g-band span { position: absolute; left: 4px; top: 6px; font-size: 11px; font-weight: 600; color: #1f6b47; white-space: nowrap; }
/* quy trình trà sữa (26/11): số đo trên bảng (ml / g / °C) + các bước trên phiếu */
.qa-g-so { margin: 6px 0 2px; font: 700 22px/1.1 ui-monospace, Consolas, monospace; color: #1d2a1d; background: #c9d4c4; border-radius: 6px; padding: 4px 10px; display: inline-block; min-width: 92px; text-align: right; }
.qa-tk-b .qa-ts { font-weight: 500; color: #8a8f94; }
.qa-tk-b .qa-ts.xong { color: #2f9e62; font-weight: 700; }
.qa-tk-b i { font-style: normal; color: #b5b9bd; margin: 0 2px; }
.qa-g-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: #c98b4a; opacity: .8; }
.qa-hold { justify-content: center; min-height: 50px; font-size: 16px; touch-action: none; -webkit-touch-callout: none; user-select: none; }
.qa-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.qa-btns.qa-col { flex-direction: column; }
.qa-btns .btn .ic { width: 15px; height: 15px; }
.qa-dg { font-weight: 700; font-size: 16px; }
.qa-loi { margin: 0; padding-left: 18px; color: var(--bad); font-size: 13px; }
.qa-sao { width: 18px; height: 18px; fill: #d6dad7; vertical-align: -3px; }
.qa-sao.on { fill: #e0a106; }
.qa-saos { display: inline-flex; gap: 2px; flex: none; }
.qa-modal { position: absolute; inset: 0; background: rgba(15,22,18,.45); display: grid; place-items: center; z-index: 5; padding: 16px; }
.qa-modal-c { background: #fff; border-radius: 16px; padding: 18px 20px; width: min(480px, 100%); max-height: 100%; overflow: auto; display: grid; gap: 10px; }
.qa-modal-c h3 { margin: 0; }
.qa-vai { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qa-vai-b { display: grid; gap: 6px; text-align: left; padding: 16px; border-radius: 14px; border: 2px solid var(--brand); background: var(--brand-soft); color: var(--text, #1b2a22); cursor: pointer; font: inherit; }
.qa-vai-b b { font-size: 18px; color: var(--brand); }
.qa-vai-b span { font-size: 13px; line-height: 1.45; color: var(--muted); }
.qa-vai-b:hover { background: #fff; }
@media (max-width: 560px) { .qa-vai { grid-template-columns: 1fr; } }
.qa-hd { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }
.qa-kq { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.qa-kq div { background: var(--brand-soft); border-radius: 10px; padding: 8px; text-align: center; display: grid; }
.qa-kq b { font-size: 20px; color: var(--brand); font-variant-numeric: tabular-nums; }
.qa-kq span { font-size: 12px; color: var(--muted); }
.qa-kl-h { font-weight: 600; font-size: 13.5px; }
.qa-kl-ds { margin: 4px 0 0; padding-left: 20px; font-size: 13.5px; display: grid; gap: 2px; }
.qa-bt { position: absolute; left: 12px; top: 74px; width: 290px; background: rgba(255,255,255,.97); border-radius: 14px; padding: 12px; display: grid; gap: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.16); max-height: calc(100% - 86px); overflow: auto; z-index: 3; }
.qa-bt-g { display: grid; gap: 6px; }
.qa-bt-f { border-top: 1px solid var(--line); padding-top: 10px; }
@media (max-width: 900px) {
  .qa-stage { height: calc(100vh - 250px); min-height: 430px; }
  .qa-tk { width: 168px; font-size: 12px; }
  .qa-tay { max-width: calc(100% - 24px); bottom: 70px; }   /* nhường hàng dưới cho nút Ngồi / Uống / thao tác */
  .qa-kq { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) { .qa-top .seg button { padding-left: 9px; padding-right: 9px; } .qa-act-b { font-size: 14px; padding: 10px 12px; } }
@media (max-width: 700px) { .qa-bt { left: 12px; right: 12px; width: auto; top: auto; bottom: 12px; max-height: 46%; } }

/* Quán ảo: chat cả quán + bàn cờ tướng (13/11/2026) */
.qa-chat { position: absolute; left: 12px; bottom: 12px; width: min(320px, 46%); display: grid; gap: 6px; z-index: 4; }
.qa-chat-ds { display: grid; gap: 2px; max-height: 132px; overflow: auto; font-size: 12.5px; line-height: 1.35; }
.qa-chat-ds:empty { display: none; }
.qa-chat-ds div { background: rgba(16,24,20,.66); color: #f1f5f2; padding: 3px 8px; border-radius: 8px; word-break: break-word; }
.qa-chat-ds b { color: #f3c969; font-weight: 600; }
.qa-chat-f { display: flex; gap: 6px; }
.qa-chat-f input { flex: 1; min-width: 0; padding: 7px 10px; border: 1px solid #cfd8d3; border-radius: 8px; font-size: 13px; }
.qa-chat-mo { justify-self: start; }
.qa-chat-mo kbd { margin-left: 4px; }
.qa-co { position: absolute; right: 12px; top: 12px; z-index: 6; width: min(380px, calc(100% - 24px)); max-width: calc(100% - 24px); max-height: calc(100% - 24px); overflow: auto; background: #fff; border-radius: 12px; box-shadow: 0 6px 24px rgba(0,0,0,.22); padding: 10px; display: grid; gap: 8px; }
.qa-co-dau { display: grid; gap: 2px; font-size: 13px; }
.qa-co-dau span { color: #4b5a52; }
.qa-co-dau .qa-co-tt { font-weight: 600; color: #1d2a23; }
.qa-co canvas { width: 100%; height: auto; border-radius: 8px; cursor: pointer; touch-action: manipulation; }
@media (max-width: 700px) { .qa-co { top: 8px; right: 8px; width: calc(100% - 16px); max-height: calc(100% - 16px); } .qa-chat { width: min(260px, 60%); } }
/* Bài Nói Dối (15/11/2026) */
.qa-bnd { position: absolute; right: 12px; top: 12px; z-index: 6; width: min(420px, calc(100% - 24px)); max-height: calc(100% - 24px); overflow: auto; background: #fff; border-radius: 12px; box-shadow: 0 6px 24px rgba(0,0,0,.22); padding: 10px; display: grid; gap: 8px; font-size: 13px; }
.qa-bnd-dau { display: grid; gap: 3px; }
.qa-bnd-dau > b { font-size: 15px; color: #1d2a23; }
.qa-bnd-mon { display: flex; align-items: center; gap: 6px; color: #4b5a52; }
.qa-bnd-tt { font-weight: 600; color: #1d2a23; }
.qa-bnd-gio { display: block; height: 4px; border-radius: 9px; background: #edf1ee; overflow: hidden; }
.qa-bnd-gio u { display: block; height: 100%; background: var(--brand, #1f6b47); transition: width .25s linear; }
.qa-bnd-gio u.gap { background: #c0392b; }
.qa-bnd-ghe { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.qa-bnd-g { border: 1px solid #e2e7e3; border-radius: 9px; padding: 5px 8px; display: grid; gap: 1px; background: #fafcfb; }
.qa-bnd-g b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qa-bnd-g b em { font-style: normal; font-weight: 500; font-size: 10.5px; color: #66716b; background: #eef2ef; border-radius: 99px; padding: 0 6px; }
.qa-bnd-g span { font-size: 11.5px; color: #66716b; }
.qa-bnd-g.trong { opacity: .7; border-style: dashed; }
.qa-bnd-g.luot { border-color: #1f6b47; background: #e6f2ea; box-shadow: 0 0 0 2px rgba(31,107,71,.18); }
.qa-bnd-g.toi b { color: #1f6b47; }
.qa-bnd-g.loai { opacity: .5; }
.qa-bnd-g.loai b { text-decoration: line-through; }
.qa-bnd-g.uong { border-color: #d39a2c; background: #fff7e6; }
.qa-bnd-g.cay { border-color: #c0392b; background: #fdecea; }
.qa-bnd-ly { display: flex; gap: 3px; }
.qa-bnd-ly i { width: 9px; height: 11px; border-radius: 1px 1px 3px 3px; background: #d8c08a; border: 1px solid #b89a5c; }
.qa-bnd-ly i.da { background: transparent; border-color: #d5d9d6; }
.qa-bnd-giua { background: #f4f8f5; border-radius: 9px; padding: 8px; line-height: 1.45; }
.qa-bnd-hang { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0 4px; }
.qa-bnd-lat.doi > b:last-child, .qa-bnd-phat.cay b:last-child { color: #c0392b; }
.qa-bnd-lat.that > b:last-child { color: #b25e09; }
.qa-bnd-phat.thang { color: #1f6b47; }
.qa-bnd-tay { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; padding-top: 2px; }
.qa-bnd-la { width: 58px; height: 80px; border-radius: 8px; border: 2px solid var(--m, #999); background: #fff; color: var(--m, #333); display: grid; place-items: center; align-content: center; gap: 3px; padding: 4px 2px; font: inherit; font-size: 10.5px; font-weight: 700; cursor: pointer; box-shadow: 0 2px 4px rgba(0,0,0,.12); transition: transform .12s; }
.qa-bnd-la svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.qa-bnd-la.chon { transform: translateY(-8px); background: color-mix(in srgb, var(--m) 14%, #fff); box-shadow: 0 6px 12px rgba(0,0,0,.2); }
.qa-bnd-la.up { width: 34px; height: 48px; border: 2px solid #1f6b47; background: repeating-linear-gradient(45deg, #2f6b4a 0 5px, #3d7d5a 5px 10px); cursor: default; }
.qa-bnd-la.nho { width: auto; height: auto; grid-auto-flow: column; padding: 2px 8px 2px 4px; border-radius: 99px; cursor: default; }
.qa-bnd-la.nho svg { width: 18px; height: 18px; }
.qa-bnd-la.dung { box-shadow: 0 0 0 3px rgba(31,107,71,.35); cursor: default; }
.qa-bnd-la.sai { box-shadow: 0 0 0 3px rgba(192,57,43,.45); cursor: default; }
.qa-bnd-lat .qa-bnd-la, .qa-bnd-giua .qa-bnd-la { width: 46px; height: 64px; }
.qa-bnd-nut .qa-bnd-bat { background: #c0392b; border-color: #c0392b; color: #fff; font-weight: 700; }
.qa-bnd-nhat { font-size: 11.5px; color: #66716b; border-top: 1px solid #edf1ee; padding-top: 6px; }
@media (max-width: 700px) { .qa-bnd { top: 8px; right: 8px; width: calc(100% - 16px); max-height: calc(100% - 16px); } .qa-bnd-la { width: 50px; height: 70px; } }
.qa-tk-kh { margin-left: 6px; font-size: 11px; font-weight: 600; background: #e3f1e8; color: #1f6b47; padding: 1px 6px; border-radius: 6px; white-space: nowrap; }   /* phiếu của khách thật (chơi chung) */
.qa-m-choi .qa-chat { bottom: 58px; }
@media (max-width: 900px) { .qa-m-choi .qa-chat { bottom: 124px; } }
/* Bộ đo Quán ảo (18/11/2026, móng GĐ0): phím F3 / ?do=1 — chỉ để đo, mặc định ẩn */
.qa-do { position: absolute; right: 12px; top: 12px; z-index: 30; display: grid; gap: 1px; max-width: min(360px, calc(100% - 24px)); padding: 8px 12px; border-radius: 10px; background: rgba(10,16,13,.82); color: #e8efe9; font: 12px/1.45 ui-monospace, Consolas, monospace; pointer-events: none; font-variant-numeric: tabular-nums; }
.qa-do b { font-weight: 600; font-size: 13px; } .qa-do b small { font-weight: 400; opacity: .6; margin-left: 6px; }
.qa-do .tot { color: #7fdc9a; } .qa-do .vua { color: #f2cf6b; } .qa-do .xau { color: #ff8a7a; }
.qa-do .qa-do-card { opacity: .65; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qa-do button { pointer-events: auto; justify-self: start; margin-top: 4px; background: #2f3d36; color: #eef4f0; border-color: #4b5d53; }

/* Quán ảo — điều khiển điện thoại (25/11): cần xoay trái + nút tròn phải, chỉ khi .qa-dt-on (máy cảm ứng + đang vào vai) */
.qa-joy, .qa-mbtn { display: none; }
.qa-stage.qa-dt-on .qa-joy { display: block; position: absolute; left: 22px; bottom: 62px; width: 128px; height: 128px; border-radius: 50%; background: rgba(20, 28, 24, .28); border: 2px solid rgba(255, 255, 255, .55); z-index: 30; touch-action: none; -webkit-user-select: none; user-select: none; }
.qa-joy-nub { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: rgba(255, 255, 255, .85); box-shadow: 0 2px 8px rgba(0, 0, 0, .3); pointer-events: none; transition: transform .06s; }
.qa-stage.qa-dt-on .qa-mbtn { display: grid; grid-template-columns: repeat(2, 60px); gap: 10px; position: absolute; right: 18px; bottom: 26px; z-index: 30; touch-action: none; }
.qa-mbtn button { width: 60px; height: 60px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .7); background: rgba(20, 28, 24, .45); color: #fff; font: 600 13px/1.1 inherit; padding: 0; touch-action: none; -webkit-user-select: none; user-select: none; }
.qa-mbtn button.qa-mb-to { font-size: 22px; background: rgba(31, 107, 71, .75); }
.qa-mbtn button.on { background: rgba(224, 161, 6, .8); }
.qa-stage.qa-dt-on .qa-act { bottom: 170px; }
/* Quán ảo — TOÀN MÀN HÌNH ĐIỆN THOẠI (25/11): phủ kín khung trình duyệt (chạy cả iPhone), ẩn thanh nút; nút Công cụ / Thoát góc trên phải */
.qa.qa-dt-full { position: fixed; inset: 0; z-index: 9999; background: #111; padding: 0; gap: 0; height: 100vh; height: 100dvh; }
.qa.qa-dt-full .qa-top { display: none; }
.qa.qa-dt-full.qa-dt-cong .qa-top { display: flex; position: absolute; top: 56px; left: 8px; right: 8px; z-index: 40; background: rgba(255, 255, 255, .96); border-radius: 12px; padding: 8px; max-height: 60vh; overflow: auto; }
.qa.qa-dt-full .qa-stage { height: 100vh !important; height: 100dvh !important; min-height: 0 !important; border-radius: 0; }
.qa-dt-nut { display: none; }
.qa.qa-dt-full .qa-dt-nut { display: flex; gap: 8px; position: absolute; top: max(8px, env(safe-area-inset-top)); right: max(8px, env(safe-area-inset-right)); z-index: 41; }
.qa-dt-nut button { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; padding: 0; background: rgba(20, 28, 24, .55); color: #fff; border: 1px solid rgba(255, 255, 255, .6); }
body.qa-khoa-cuon { overflow: hidden; }

/* 30/11 anh: điện thoại — phím tương tác to chèn giữa màn hình → thu gọn: cần xoay 104 px, nút tròn 46 px, nút tương tác nhỏ xếp dọc ở khoảng trống
   giữa cần xoay và cụm nút tròn (sát đáy), bỏ chữ phím tắt; màn ngang thấp (≤ 460 px) còn nhỏ hơn nữa */
.qa-stage.qa-dt-on .qa-joy { width: 104px; height: 104px; left: 16px; bottom: 50px; }
.qa-stage.qa-dt-on .qa-joy-nub { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
.qa-stage.qa-dt-on .qa-mbtn { grid-template-columns: repeat(2, 46px); gap: 8px; right: 12px; bottom: 16px; }
.qa-stage.qa-dt-on .qa-mbtn button { width: 46px; height: 46px; font-size: 11px; border-width: 1.5px; }
.qa-stage.qa-dt-on .qa-mbtn button.qa-mb-to { font-size: 17px; }
.qa-stage.qa-dt-on .qa-act { right: 126px; left: 132px; bottom: 16px; max-width: none; flex-direction: column; align-items: flex-end; justify-content: flex-end; gap: 5px; pointer-events: none; }
.qa-stage.qa-dt-on .qa-act-b { pointer-events: auto; font-size: 12px; padding: 6px 10px; line-height: 1.2; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 2px 8px rgba(0,0,0,.22); }
.qa-stage.qa-dt-on .qa-act-b kbd { display: none; }
.qa-stage.qa-dt-on ~ .qa-chat, .qa-stage.qa-dt-on .qa-chat { width: min(200px, 40%); }
@media (max-height: 460px) {
  .qa-stage.qa-dt-on .qa-joy { width: 90px; height: 90px; bottom: 44px; }
  .qa-stage.qa-dt-on .qa-joy-nub { width: 38px; height: 38px; margin: -19px 0 0 -19px; }
  .qa-stage.qa-dt-on .qa-mbtn { grid-template-columns: repeat(2, 40px); gap: 6px; bottom: 12px; }
  .qa-stage.qa-dt-on .qa-mbtn button { width: 40px; height: 40px; font-size: 10px; }
  .qa-stage.qa-dt-on .qa-act { right: 110px; left: 118px; bottom: 12px; }
}
/* bảng thao tác (pha chế, đặt món…) trên điện thoại: dời lên trên, gọn, không đè cần xoay / nút tròn / giữa màn hình */
.qa-stage.qa-dt-on .qa-pan { top: 58px; bottom: auto; width: min(360px, calc(100% - 24px)); max-height: 46%; overflow: auto; padding: 9px 11px; gap: 7px; font-size: 13px; border-radius: 12px; }
.qa-stage.qa-dt-on .qa-pan .btn { padding: 6px 10px; font-size: 13px; }
.qa-stage.qa-dt-on .qa-pan .note { font-size: 11.5px; }
@media (max-height: 460px) { .qa-stage.qa-dt-on .qa-pan { top: 8px; left: auto; right: 116px; transform: none; width: min(340px, 52%); max-height: calc(100% - 70px); } }
/* ô Chat trên điện thoại: luôn sát đáy dưới cần xoay (ca Pha chế trước đẩy lên bottom 124 px → đè cần xoay) */
.qa-stage.qa-dt-on .qa-chat { bottom: 8px !important; left: 10px; width: min(170px, 40%); gap: 4px; }
.qa-stage.qa-dt-on .qa-chat-mo { font-size: 12px; padding: 4px 9px; }
