/* vanphongso.css · Văn phòng số (tenant vanphongso), on TechViet UI kit v1.7
   Holds only (a) the parts the kit lacks: the top-down office plan and what moves on it, the docked side panel,
   the timeline bar, the phone room card; and (b) layout glue for this tenant's screens.
   Every colour, distance, radius, type size and shadow is a kit token (var(--*)); no kit class is restyled.
   Prefix vps-. Each block names its row in KIT_GAPS.md (G1…). Sizes of drawn things (walls, desks, lanes) are
   lengths of the drawing, kept in --vps-* variables; gaps and paddings use --sp-*. */

/* ---------- Identity of each place: one colour per agent, reused on its folders and bubbles (G1) ---------- */
[data-phong="tender"] { --vps-mau: var(--series-1); }
[data-phong="shop"] { --vps-mau: var(--ref); }
[data-phong="mua"] { --vps-mau: var(--series-2); }
[data-phong="kt"] { --vps-mau: var(--series-4); }
[data-phong="nhamay"] { --vps-mau: var(--series-3); }
[data-phong="gs"] { --vps-mau: var(--series-prev); }
[data-phong="kho"] { --vps-mau: color-mix(in srgb, var(--series-2) 45%, var(--heading)); }
[data-phong="bgd"] { --vps-mau: var(--primary); }
[data-phong="cong"] { --vps-mau: var(--heading); }

/* ---------- Office page frame: status strip, stage (plan + side panel), timeline (layout glue) ---------- */
.vps-vp { display: flex; flex-direction: column; min-height: 100dvh; }
.vps-man { flex: 1 1 auto; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; gap: var(--sp-3); min-height: 0; padding: var(--sp-3) var(--sp-5); }
.vps-man[data-co-bao] { grid-template-rows: auto auto minmax(0, 1fr) auto; }
.vps-tinh-hinh { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-4); align-items: center; }
.vps-tinh-hinh-cuoi { display: grid; gap: var(--sp-1); justify-items: end; }
.vps-cap-nhat { margin: 0; font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.vps-cap-nhat strong { color: var(--text); font-weight: 600; }
/* G4 · a figure of the strip that is lighting its places up on the plan */
.vps-so:has([aria-pressed="true"]) { background: var(--notice-bg); box-shadow: inset 0 -3px 0 var(--primary); }
.vps-san { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); min-height: 0; }
.vps-san[data-ben] { grid-template-columns: minmax(0, 1fr) var(--vps-ben-w, 34rem); }

/* ---------- G1 The office plan (top-down): building, rooms, corridor, doors, gate ---------- */
.vps-mb { --vps-tuong: 4px; --vps-cua: 3.5rem; --vps-hl: 8.5rem; --vps-tuong-mau: color-mix(in srgb, var(--heading) 58%, var(--surface)); position: relative; display: grid; grid-template-columns: var(--vps-cong-w, 12rem) minmax(0, 1fr); min-height: 33rem; }
.vps-toa { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr) var(--vps-hl) minmax(0, 1fr); gap: var(--vps-tuong); padding: var(--vps-tuong); background: var(--vps-tuong-mau); border-radius: var(--radius); }
.vps-phong { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; gap: var(--sp-2); min-width: 0; padding: var(--sp-3); background: var(--surface); transition: opacity var(--dur-2) var(--ease), background-color var(--dur-1) var(--ease); }
.vps-phong:has(.vps-bien:hover) { background: var(--surface-hover); }
.vps-phong[aria-current="true"] { background: var(--notice-bg); box-shadow: inset 0 0 0 3px var(--primary); }
.vps-phong[data-dung] { box-shadow: inset 0 0 0 3px var(--danger); }
.vps-bien-hang { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-2); min-width: 0; }
/* the nameplate is the link that opens the room; it is stretched over the whole room */
.vps-bien { display: inline-flex; align-items: center; gap: var(--sp-2); min-width: 0; font-size: var(--fs-sm); font-weight: 700; line-height: var(--lh-tight); color: var(--heading); text-decoration: none; }
.vps-bien::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.vps-bien:focus-visible { outline: none; }
.vps-bien:focus-visible::after { outline: 2px solid var(--focus); outline-offset: -4px; }
.vps-bien-o { flex: none; display: grid; place-items: center; width: 1.75rem; height: 1.75rem; color: var(--surface); background: var(--vps-mau); border-radius: var(--radius-sm); }
.vps-bien-o .icon { width: var(--icon-sm); height: var(--icon-sm); }
.vps-phong :is(.tag, .chip, .btn, .vps-bb) { position: relative; z-index: 2; }
.vps-ngoi { position: relative; display: flex; align-items: center; justify-content: flex-start; gap: var(--sp-3); min-height: 0; }
.vps-ban { flex: none; width: var(--vps-ban-w, 7rem); height: auto; overflow: visible; }
.vps-tt { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-1); justify-items: start; min-width: 0; }
.vps-tt-hang { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-2); }
.vps-viec { margin: 0; font-size: var(--fs-sm); line-height: var(--lh-tight); color: var(--text); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.vps-phu { margin: 0; font-size: var(--fs-xs); color: var(--muted); }
.vps-phu strong { color: var(--text); font-weight: 600; }

/* desk, chair and the agent seen from above (inline svg; paint comes from these classes) */
.vps-ban-mat { fill: var(--surface-2); stroke: var(--field-border); stroke-width: 1.5; }
.vps-ban-may { fill: var(--heading); }
.vps-ban-phim { fill: var(--sunk); stroke: var(--field-border); stroke-width: 1; }
.vps-ban-khay { fill: var(--surface); stroke: var(--field-border); stroke-width: 1; }
.vps-ban-giay { fill: var(--surface); stroke: var(--vps-mau); stroke-width: 1.5; }
.vps-ban-net { fill: none; stroke: var(--field-border); stroke-width: 1.5; stroke-linecap: round; }
.vps-ghe { fill: var(--sunk); stroke: var(--field-border); stroke-width: 1; }
.vps-nv-ao { fill: var(--vps-mau); }
.vps-nv-tay { fill: var(--vps-mau); }
.vps-nv-dau { fill: var(--heading); }
.vps-nv-tai { fill: var(--surface-2); stroke: var(--heading); stroke-width: 1; }
.vps-nv-cham { fill: var(--surface); }
.vps-ban:is([data-tt="ranh"], [data-tt="dung"], [data-tt="cho"]) .vps-ban-may { fill: var(--field-border); }
.vps-ban[data-tt="dung"] :is(.vps-nv-ao, .vps-nv-tay) { fill: var(--field-border); }
.vps-ban[data-tt="ket"] .vps-ban-mat { stroke: var(--danger); stroke-width: 2.5; }
.vps-ban[data-tt="duyet"] .vps-ban-mat { stroke: var(--warn); stroke-width: 2.5; }
.vps-ban-hop { fill: var(--primary); }
.vps-ban-hop-nap { fill: var(--primary-hover); }
.vps-ban-chuong { fill: var(--warn-bg); stroke: var(--warn); stroke-width: 1.5; }

/* door: a gap in the wall on the corridor side with a threshold in the room's colour; a door that is holding a
   folder back is shut (the gap is filled) and its threshold turns to the danger colour */
.vps-phong[data-hang="tren"] { --vps-cua-x: 30%; }
.vps-phong[data-hang="duoi"] { --vps-cua-x: 70%; }
.vps-cua-o { position: absolute; z-index: 3; left: calc(var(--vps-cua-x) - var(--vps-cua) / 2); width: var(--vps-cua); height: var(--vps-tuong); background: var(--surface-2); pointer-events: none; }
.vps-cua-o::after { content: ""; position: absolute; inset-inline: 0; height: var(--vps-tuong); background: var(--vps-mau); }
.vps-phong[data-hang="tren"] > .vps-cua-o { top: 100%; }
.vps-phong[data-hang="tren"] > .vps-cua-o::after { top: 100%; }
.vps-phong[data-hang="duoi"] > .vps-cua-o { bottom: 100%; }
.vps-phong[data-hang="duoi"] > .vps-cua-o::after { bottom: 100%; }
.vps-phong[data-chan] > .vps-cua-o, .vps-phong[data-chan] > .vps-cua-o::after { background: var(--danger); }

/* corridor: three lanes; folders ride it from door to door */
.vps-hl { position: relative; grid-column: 1 / -1; grid-row: 2; min-width: 0; background-color: var(--surface-2); background-image: linear-gradient(90deg, var(--panel-border) 1px, transparent 1px); background-size: 4rem 100%; }
.vps-hl-ten { position: absolute; right: var(--sp-3); top: var(--sp-2); margin: 0; font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.vps-hl [data-tu="cong"] { --x0: 0%; } .vps-hl [data-den="cong"] { --x1: 0%; }
.vps-hl [data-tu="tender"] { --x0: 7.5%; } .vps-hl [data-den="tender"] { --x1: 7.5%; }
.vps-hl [data-tu="shop"] { --x0: 32.5%; } .vps-hl [data-den="shop"] { --x1: 32.5%; }
.vps-hl [data-tu="nhamay"] { --x0: 57.5%; } .vps-hl [data-den="nhamay"] { --x1: 57.5%; }
.vps-hl [data-tu="gs"] { --x0: 82.5%; } .vps-hl [data-den="gs"] { --x1: 82.5%; }
.vps-hl [data-tu="kho"] { --x0: 17.5%; } .vps-hl [data-den="kho"] { --x1: 17.5%; }
.vps-hl [data-tu="mua"] { --x0: 42.5%; } .vps-hl [data-den="mua"] { --x1: 42.5%; }
.vps-hl [data-tu="kt"] { --x0: 67.5%; } .vps-hl [data-den="kt"] { --x1: 67.5%; }
.vps-hl [data-tu="bgd"] { --x0: 92.5%; } .vps-hl [data-den="bgd"] { --x1: 92.5%; }
.vps-hl [data-chang="0"] { --f: 0.1; } .vps-hl [data-chang="1"] { --f: 0.2; } .vps-hl [data-chang="2"] { --f: 0.5; } .vps-hl [data-chang="3"] { --f: 0.8; }
/* the dotted trail of a folder on its way, in the colour of the room that sent it */
.vps-vet { position: absolute; top: 50%; left: min(var(--x0), var(--x1)); width: max(calc(var(--x1) - var(--x0)), calc(var(--x0) - var(--x1))); height: 0; border-top: 2px dotted var(--vps-mau, var(--field-border)); }
/* the folder itself (a link to the hand-over); 20rem holds the longest second line of the sample set on one line
   ("Thiếu chứng từ giao hàng · Mua hàng bổ sung", 260px), so the missing document is never cut */
.vps-hs { position: absolute; z-index: 4; display: inline-flex; align-items: center; gap: var(--sp-2); max-width: var(--vps-hs-w, 20rem); padding: var(--sp-1) var(--sp-2) var(--sp-1) var(--sp-1); font-size: var(--fs-xs); line-height: var(--lh-tight); color: var(--text); text-decoration: none; background: var(--surface); border: 1px solid var(--field-border); border-radius: var(--radius-sm); box-shadow: var(--sh-1); transition: opacity var(--dur-2) var(--ease); }
.vps-hs:hover { background: var(--surface-hover); }
.vps-hs-bia { flex: none; display: grid; place-items: center; width: 1.75rem; height: 1.75rem; color: var(--surface); background: var(--vps-mau); border-radius: var(--radius-sm); }
.vps-hs-bia .icon { width: var(--icon-sm); height: var(--icon-sm); }
.vps-hs-chu { display: grid; min-width: 0; }
.vps-hs-ten { font-weight: 700; color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vps-hs-phu { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vps-hs[data-tt="di"] { top: 50%; left: calc(var(--x0) + (var(--x1) - var(--x0)) * var(--f, 0.5)); translate: -50% -50%; }
.vps-hs:is([data-tt="chan"], [data-tt="toi"]) { left: calc(var(--x1) - var(--vps-cua) / 2); }
.vps-hs[data-lan="tren"] { top: var(--sp-1); }
.vps-hs[data-lan="duoi"] { bottom: var(--sp-1); }
.vps-hs[data-huong="trai"] { left: auto; right: calc(100% - var(--x1) - var(--vps-cua) / 2); }
.vps-hs[data-tt="chan"] { background: var(--danger-bg); border-color: var(--danger); }
.vps-hs[data-tt="chan"] .vps-hs-bia { background: var(--danger); }
.vps-hs[data-tt="chan"] .vps-hs-ten { color: var(--danger); }
.vps-hs[data-tt="chan"] .vps-hs-phu { color: var(--text); }
/* an empty office: the invitation stands at the gate end of the corridor like a folder waiting to come in */
.vps-hs[data-tt="moi"] { top: 50%; left: var(--sp-4); max-width: none; translate: 0 -50%; border-color: var(--primary); }
.vps-hs[data-tt="moi"] .vps-hs-bia { background: var(--primary); }
/* short names (ASM-010) take over where the plan is narrow */
.vps-ten-ngan { display: none; }

/* speech bubble of an agent (one per room, at most 90 characters) */
.vps-bb { position: relative; display: block; flex: 0 1 11.5rem; min-width: 0; padding: var(--sp-2); font-size: var(--fs-xs); line-height: var(--lh-tight); color: var(--text); text-decoration: none; background: var(--surface); border: 1px solid var(--field-border); border-left: 3px solid var(--vps-mau); border-radius: var(--radius-sm); box-shadow: var(--sh-1); }
.vps-bb::before { content: ""; position: absolute; left: calc(var(--sp-2) * -1 - 2px); top: 50%; width: var(--sp-2); height: var(--sp-3); background: var(--vps-mau); clip-path: polygon(100% 0, 0 50%, 100% 100%); translate: 0 -50%; }
.vps-bb-nghe { display: block; font-weight: 700; color: var(--heading); }
.vps-bb:hover { background: var(--surface-hover); }

/* gate for customers and suppliers, outside the building at the corridor's left end */
.vps-cong { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) var(--vps-hl) minmax(0, 1fr); gap: var(--vps-tuong); padding-block: var(--vps-tuong); min-width: 0; transition: opacity var(--dur-2) var(--ease); }
.vps-cong-tren, .vps-cong-duoi { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; justify-items: start; gap: var(--sp-2); padding: var(--sp-3) var(--sp-3) var(--sp-3) 0; min-width: 0; }
.vps-cong-duoi { align-content: end; }
.vps-cong-giua { position: relative; display: grid; align-content: center; justify-items: center; gap: var(--sp-1); margin-right: calc(var(--vps-tuong) * -1); padding: var(--sp-2); background: var(--surface-2); border: var(--vps-tuong) solid var(--vps-tuong-mau); border-right: 0; border-radius: var(--radius) 0 0 var(--radius); }
.vps-cong[aria-current="true"] .vps-cong-giua { background: var(--notice-bg); box-shadow: inset 0 0 0 3px var(--primary); }
.vps-cong-giua .icon { width: var(--icon-lg); height: var(--icon-lg); color: var(--heading); }
.vps-cong-nhan { margin: 0; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); text-align: center; }
.vps-cong .chip { position: relative; z-index: 2; max-width: 100%; }
.vps-so-dong { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-2); width: 100%; margin: 0; font-size: var(--fs-xs); color: var(--muted); }
.vps-so-dong strong { font-size: var(--fs-md); font-variant-numeric: tabular-nums; color: var(--heading); }

/* BGĐ room: no agent, a desk with the bell and the waiting box */
.vps-phong[data-phong="bgd"] { background: var(--notice-bg); }
.vps-hop { position: relative; z-index: 2; display: grid; gap: var(--sp-1); justify-items: start; min-width: 0; }
.vps-hop-so { margin: 0; font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; }
.vps-hop-so strong { font-size: var(--fs-lg); font-variant-numeric: tabular-nums; color: var(--heading); }

/* highlight from the status strip: the places a figure is about stay, the rest fades (G4) */
.vps-mb[data-nhan] :is(.vps-phong, .vps-hs, .vps-vet, .vps-cong) { opacity: 0.3; }
.vps-mb[data-nhan="chan"] :is(.vps-phong[data-chan], .vps-hs[data-tt="chan"]),
.vps-mb[data-nhan="duyet"] :is(.vps-phong[data-co~="duyet"], .vps-phong[data-phong="bgd"]),
.vps-mb[data-nhan="nguoi"] .vps-phong[data-co~="nguoi"],
.vps-mb[data-nhan="no"] :is(.vps-phong[data-phong="kt"], .vps-phong[data-phong="bgd"]),
.vps-mb[data-nhan="chay"] .vps-phong[data-co~="chay"] { opacity: 1; }
.vps-mb[data-nhan="chan"] .vps-phong[data-chan] { box-shadow: inset 0 0 0 3px var(--danger); }
.vps-mb[data-nhan="duyet"] .vps-phong[data-co~="duyet"], .vps-mb[data-nhan="nguoi"] .vps-phong[data-co~="nguoi"] { box-shadow: inset 0 0 0 3px var(--warn); }

/* a narrow plan (the side panel is open): keep the essentials */
.vps-san[data-ben] .vps-mb { --vps-cong-w: 7.5rem; --vps-ban-w: 5.5rem; --vps-hs-w: 10.5rem; --vps-cua: 2.5rem; --vps-hl: 7.5rem; min-height: 0; }
.vps-san[data-ben] :is(.vps-bb, .vps-hl-ten, .vps-hs-phu, .vps-hs-them, .vps-cong .chip, .vps-phu, .vps-viec, .vps-ten-dai, .vps-bien-dau) { display: none; }
.vps-san[data-ben] .vps-ten-ngan { display: inline; }
.vps-san[data-ben] .vps-phong { padding: var(--sp-2); }
.vps-san[data-ben] .vps-ngoi { flex-wrap: wrap; align-content: center; }
.vps-san[data-ben] .vps-hop-so strong { font-size: var(--fs-md); }
/* G1 · at 1280 with the panel open a room is about 124px wide inside: a chip keeps its words on one line, and under 85rem
   the nameplate drops its icon square and a chip its icon ("Kỹ thuật nhà máy" 118px, "Thiếu hồ sơ" 112px then fit) */
.vps-san[data-ben] .vps-phong .chip { white-space: nowrap; }
@media (max-width: 85rem) {
  .vps-san[data-ben] :is(.vps-bien-o, .vps-phong .chip > .icon, .vps-hs[data-tt="di"] .vps-hs-bia) { display: none; }
  /* two folders on their way stood 14px over each other at 1280: without its cover a folder is 36px narrower */
  .vps-san[data-ben] .vps-hs[data-tt="di"] { padding-left: var(--sp-2); }
}

/* looking back in time: nothing on the plan can be changed */
.vps-mb[data-xem-lai] { --vps-tuong-mau: var(--muted); }
.vps-mb[data-xem-lai] :is(.vps-phong, .vps-cong-giua) { background: var(--surface-2); }
.vps-mb[data-xem-lai] .vps-hl { background-color: var(--sunk); }

/* motion, three kinds only: the agent types, a folder travels the corridor, a bubble comes in then dims.
   Only when motion is welcome; without it the same facts stand still. */
@media (prefers-reduced-motion: no-preference) {
  .vps-ban[data-tt="lam"] .vps-nv-tay-t { animation: vps-go 0.9s var(--ease) infinite alternate; }
  .vps-ban[data-tt="lam"] .vps-nv-tay-p { animation: vps-go 0.9s var(--ease) 0.45s infinite alternate; }
  .vps-ban[data-tt="lam"] .vps-nv-cham { animation: vps-nhay 1.2s steps(2, end) infinite; }
  .vps-hs[data-tt="di"] { animation: vps-di 2.4s var(--ease-enter) both; }
  .vps-bb { animation: vps-hien 0.5s var(--ease-enter) 0.6s both, vps-mo 1.2s var(--ease) 6.6s forwards; }
  .vps-bb:is(:hover, :focus-visible) { animation: none; }
}
@keyframes vps-go { from { transform: translateY(0); } to { transform: translateY(-2px); } }
@keyframes vps-nhay { from { opacity: 1; } to { opacity: 0.25; } }
@keyframes vps-di { from { left: var(--x0); opacity: 0.4; } }
@keyframes vps-hien { from { opacity: 0; translate: -6px 0; } }
@keyframes vps-mo { to { opacity: 0.62; } }

/* ---------- G2 Docked side panel (does not cover the top bar or the timeline; the plan stays in view) ---------- */
.vps-ben { contain: size; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr) auto; min-height: 0; background: var(--surface); border: 1px solid var(--panel-border); border-radius: var(--radius-lg); box-shadow: var(--sh-2); overflow: hidden; }
.vps-ben-dau { display: grid; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--panel-border); border-top: 4px solid var(--vps-mau, var(--primary)); }
.vps-ben-ten { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); }
.vps-ben-ten h2 { margin: 0; font-size: var(--fs-lg); }
.vps-ben-ly-do { margin: 0; font-size: var(--fs-sm); color: var(--text); }
.vps-ben-tabs { padding: 0 var(--sp-1); border-bottom: 1px solid var(--panel-border); overflow-x: auto; }
.vps-ben-than { position: relative; min-height: 0; overflow: auto; padding: var(--sp-4); }
.vps-ben-chan { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); justify-content: flex-end; padding: var(--sp-3) var(--sp-4); background: var(--surface-2); border-top: 1px solid var(--panel-border); }
.vps-ben-chan > p { flex: 1 1 100%; margin: 0; }

/* ---------- G3 Timeline bar under the plan ---------- */
.vps-dtg { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: var(--sp-2) var(--sp-4); padding: var(--sp-2) var(--sp-4); background: var(--surface); border: 1px solid var(--panel-border); border-radius: var(--radius-lg); }
.vps-dtg[data-xem-lai] { background: var(--warn-bg); border-color: var(--warn-line); }
.vps-dtg-nut { display: flex; align-items: center; gap: var(--sp-2); }
.vps-dtg-ray { position: relative; display: grid; min-width: 0; }
.vps-dtg-vach { position: relative; height: 1.25rem; }
.vps-dtg-vach::before { content: ""; position: absolute; inset: 50% 0 auto 0; height: 4px; translate: 0 -50%; background: var(--sunk); border-radius: var(--radius-pill); }
.vps-dtg-da-qua { position: absolute; inset: 50% auto auto 0; height: 4px; width: var(--v); translate: 0 -50%; background: var(--primary); border-radius: var(--radius-pill); }
.vps-dtg-moc { position: absolute; top: 50%; left: var(--v); width: 2px; height: 0.75rem; translate: -50% -50%; background: var(--field-border); }
.vps-dtg-moc[data-loai="chan"] { width: 4px; height: 1rem; background: var(--danger); }
.vps-dtg-moc[data-loai="duyet"] { width: 4px; height: 1rem; background: var(--warn); }
.vps-dtg-keo { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; background: transparent; appearance: none; -webkit-appearance: none; cursor: pointer; }
.vps-dtg-keo::-webkit-slider-runnable-track { height: 100%; background: transparent; }
.vps-dtg-keo::-webkit-slider-thumb { -webkit-appearance: none; width: 0.875rem; height: 1.25rem; background: var(--surface); border: 2px solid var(--primary); border-radius: var(--radius-sm); box-shadow: var(--sh-1); }
.vps-dtg-keo::-moz-range-track { height: 100%; background: transparent; }
.vps-dtg-keo::-moz-range-thumb { width: 0.625rem; height: 1rem; background: var(--surface); border: 2px solid var(--primary); border-radius: var(--radius-sm); }
.vps-dtg-keo:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.vps-dtg-gio { display: flex; justify-content: space-between; margin: 0; padding: 0; list-style: none; font-size: var(--fs-xs); line-height: var(--lh-tight); font-variant-numeric: tabular-nums; color: var(--muted); }
.vps-dtg-luc { margin: 0; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; white-space: nowrap; }
.vps-dtg-luc strong { color: var(--heading); }
.vps-dtg-ghi { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin: 0; font-size: var(--fs-sm); color: var(--text); }

/* ---------- G5 Phone: the room card (one room at a time) and its door zone ---------- */
.vps-dt { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); padding: var(--sp-4); }
.vps-phong-dt { --vps-tuong: 4px; --vps-ban-w: 9rem; position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); padding: var(--sp-4); background: var(--surface); border: var(--vps-tuong) solid color-mix(in srgb, var(--heading) 58%, var(--surface)); border-bottom-color: var(--vps-mau); border-radius: var(--radius); }
.vps-phong-dt .vps-ngoi { justify-content: center; }
.vps-phong-dt .vps-bb { flex-basis: auto; }
.vps-phong-dt .vps-viec { font-size: var(--fs-md); -webkit-line-clamp: 3; }
.vps-cua-dt { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-2); }
.vps-cua-dt > h2 { margin: 0; font-size: var(--fs-sm); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
/* the strip of nine places across the top of the phone screen */
.vps-dai { display: flex; gap: var(--sp-2); margin: 0; padding: var(--sp-2) var(--sp-4); list-style: none; overflow-x: auto; scroll-snap-type: x proximity; background: var(--surface); border-bottom: 1px solid var(--panel-border); }
.vps-dai > li { flex: none; scroll-snap-align: center; }
.vps-dai-o { position: relative; display: grid; justify-items: center; gap: var(--sp-1); min-width: 4.5rem; min-height: var(--tap); padding: var(--sp-2); font-size: var(--fs-xs); font-weight: 600; line-height: var(--lh-tight); color: var(--text); text-align: center; text-decoration: none; border: 1px solid var(--panel-border); border-radius: var(--radius); }
.vps-dai-o[aria-current="page"] { color: var(--heading); background: var(--notice-bg); border-color: var(--primary); box-shadow: inset 0 -3px 0 var(--primary); }
.vps-dai-dau { position: absolute; top: calc(var(--sp-1) * -1); right: calc(var(--sp-1) * -1); }

/* ---------- Layout glue for the secondary screens ---------- */
.vps-so-lon { margin: 0; font-size: var(--fs-2xl); font-weight: 700; line-height: var(--lh-tight); font-variant-numeric: tabular-nums; color: var(--heading); white-space: nowrap; }
.vps-ghi { margin: 0; font-size: var(--fs-sm); font-weight: 400; color: var(--muted); }
.vps-ghi strong { color: var(--text); }
.vps-dong { display: block; }
/* what the agent proposes, in its room's colour (S5–S10, S14) */
.vps-de-xuat { display: grid; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); background: var(--surface-2); border-left: 4px solid var(--vps-mau, var(--primary)); border-radius: var(--radius-sm); }
.vps-de-xuat > p { margin: 0; }
/* a clause of the customer's regulation, word for word (S3 Quy định, S28) */
.vps-nguyen-van { margin: 0; padding-left: var(--sp-3); color: var(--text); border-left: 3px solid var(--field-border); }
:is(ol, ul).vps-nguyen-van { display: grid; gap: var(--sp-2); padding-left: var(--sp-8); }
.vps-nguyen-van .cell-flags { display: inline-flex; vertical-align: middle; margin-top: 0; }
.vps-qd-ten { margin: 0; font-size: var(--fs-md); }
/* pages with wide tables use more of the window */
.vps-rong { --container-w: 88rem; }
.vps-rong .page-cols { --side-w: 23rem; }
/* the 13 flows of a project (S21) */
.vps-luong-13 { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: var(--sp-3); margin: 0; padding: 0; list-style: none; }
.vps-luong { position: relative; display: grid; align-content: start; justify-items: start; gap: var(--sp-2); padding: var(--sp-3); background: var(--surface); border: 1px solid var(--panel-border); border-radius: var(--radius); }
.vps-luong[data-tt="chan"] { border-color: var(--danger); background: var(--danger-bg); }
.vps-luong[data-tt="chan"] a { color: var(--danger-hover); } /* the link colour on the red ground measured 4,48:1 */
.vps-luong[data-tt="xong"] { background: var(--surface-2); }
.vps-luong-dau { display: flex; align-items: center; gap: var(--sp-2); }
.vps-luong-so { flex: none; display: grid; place-items: center; width: 1.75rem; height: 1.75rem; font-size: var(--fs-xs); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--heading); background: var(--sunk); border-radius: var(--radius-pill); }
.vps-luong h3 { margin: 0; font-size: var(--fs-md); }
.vps-luong p { margin: 0; font-size: var(--fs-sm); color: var(--muted); }
.vps-huong { display: inline-flex; align-items: center; gap: var(--sp-1); white-space: nowrap; }
.vps-cham { display: inline-block; flex: none; width: 0.625rem; height: 0.625rem; background: var(--vps-mau); border-radius: var(--radius-pill); }
.vps-o-ngan { width: 8rem; }
.vps-rong-12 { --field-w: 12rem; width: 12rem; }
.vps-rong-16 { --field-w: 16rem; width: 16rem; }
/* the payroll (S8) shows all its rows: the page scrolls down, the frame only sideways (--tbl-max-h is the kit's own property) */
.vps-bang-du { --tbl-max-h: none; }
/* the permission matrix (kit) fills the screen below the tabs, and its name column holds a key's full name on one line */
.vps-ma-tran { --tbl-max-h: max(24rem, calc(100vh - 24rem)); --matrix-name-w: 17rem; }

/* G6 · the bell: its count, and where its panel opens (the kit gives the panel, not the opener or the placement) */
.vps-dem { display: inline-grid; place-items: center; min-width: 1.375rem; height: 1.375rem; padding-inline: var(--sp-1); font-size: var(--fs-xs); font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; color: var(--surface); background: var(--danger); border-radius: var(--radius-pill); }
.vps-chuong { position: fixed; inset: calc(var(--topbar-h) + var(--sp-2)) var(--sp-5) auto auto; width: 24rem; margin: 0; padding: 0; overflow: visible; background: transparent; border: 0; }

/* an icon that opens a line of note text stays on that line (the kit draws every svg as a block) */
.vps-ghi > svg { display: inline-block; margin-inline-end: var(--sp-1); vertical-align: text-bottom; }
/* G17 · kit defect 1: a tab strip with tabs still hidden to the right fades out at that edge (vanphongso.js sets the attribute while there is more) */
[data-vps-con]::after { content: ""; position: sticky; inset-inline-end: 0; flex: none; width: var(--sp-8); margin-inline-start: calc(var(--sp-8) * -1); background: linear-gradient(to right, transparent, var(--surface) 80%); pointer-events: none; }
/* G18 · a file's whole name on as many lines as it needs: the document number sits at the end of the name */
.vps-ten-du { overflow: visible; overflow-wrap: anywhere; white-space: normal; text-overflow: clip; }
/* phone: 44px touch targets for a room link in a hand-off's route and for the time slider */
:root[data-tap="all"] a.vps-huong { min-height: var(--tap); }
:root[data-tap="all"] .vps-dtg-vach { height: var(--tap); }
:root[data-tap="all"] .vps-dtg-keo::-webkit-slider-runnable-track { height: 1.25rem; } /* the thumb's height: the browser centres the track in the taller field */

/* printing: only the sheet */
@media print { .vps-khong-in { display: none; } }

@media (max-width: 60rem) {
  .vps-tinh-hinh { grid-template-columns: minmax(0, 1fr); }
  .vps-tinh-hinh-cuoi { justify-items: start; }
  .vps-san[data-ben] { grid-template-columns: minmax(0, 1fr); }
  .vps-ben { contain: none; }
}

/* ==================== Đợt thêm E1, E2 · 17/11/2026: several agents on one goal (G19, G20, G21) ==================== */

/* ---------- G19 Copy desks: every agent of one goal at a small desk, listed inside its room ----------
   .vps-ngoi > ul.vps-ban-sao-ds > li.vps-ban-sao = svg.vps-ban (the short figure: desk, screen, chair, shoulders, arms, head)
   + span.vps-ban-sao-nhan ("bản 2 · Cáp động lực"). The first li is the main agent and carries strong "chính".
   A wide plan lists them one under another with their labels; a narrow plan (side panel open) keeps the figures in a row
   and drops the labels like the other small print of a room; the phone card draws them larger. */
.vps-ban-sao-ds { --vps-ban-sao-w: 2.125rem; flex: 1 1 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-1); min-width: 0; margin: 0; padding: 0; list-style: none; }
.vps-ban-sao { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.vps-ban-sao .vps-ban { width: var(--vps-ban-sao-w); }
.vps-ban-sao .vps-ban * { vector-effect: non-scaling-stroke; } /* a line keeps its weight on the small drawing */
.vps-ban-sao-nhan { min-width: 0; font-size: var(--fs-xs); line-height: var(--lh-tight); color: var(--text); }
.vps-ban-sao-nhan strong { font-weight: 700; color: var(--heading); }
.vps-san[data-ben] .vps-ban-sao-ds { display: flex; flex-wrap: wrap; }
.vps-san[data-ben] .vps-ban-sao-nhan { display: none; }
.vps-phong-dt .vps-ban-sao-ds { --vps-ban-sao-w: 4rem; gap: var(--sp-2); }
.vps-phong-dt .vps-ban-sao-nhan { font-size: var(--fs-sm); }
@media (prefers-reduced-motion: no-preference) {
  /* the same typing as the large figure; the stroke is longer because the drawing is smaller */
  .vps-ban-sao .vps-ban[data-tt="lam"] :is(.vps-nv-tay-t, .vps-nv-tay-p) { animation-name: vps-go-nho; }
}
@keyframes vps-go-nho { from { transform: translateY(0); } to { transform: translateY(-6px); } }

/* ---------- G20 Goal bar of a room: parts done on a kit meter, agents, running cost; it opens the goal (S33) ----------
   a.vps-mt (div.vps-mt on the phone card, where a button below opens the goal) inside .vps-tt, after the work line:
   span.vps-mt-dong = span.vps-mt-thanh > span.meter + span.vps-mt-phan "1/6 phần" + a kit tag, then span.vps-mt-so
   = span.vps-mt-muc "3 agent song song" · span.vps-mt-muc "14 lần gọi AI" (a count never breaks inside). */
.vps-mt { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr); gap: calc(var(--sp-1) / 2); justify-self: stretch; min-width: 0; font-size: var(--fs-xs); line-height: var(--lh-tight); color: var(--text); text-decoration: none; border-radius: var(--radius-sm); }
a.vps-mt:hover { background: var(--surface-hover); box-shadow: 0 0 0 var(--sp-1) var(--surface-hover); }
a.vps-mt:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.vps-mt-dong { display: flex; flex-wrap: wrap; align-items: center; gap: calc(var(--sp-1) / 2) var(--sp-2); min-width: 0; }
.vps-mt-thanh { flex: 1 1 3rem; display: grid; min-width: 0; }
.vps-mt-phan { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--heading); }
.vps-mt-so { min-width: 0; font-variant-numeric: tabular-nums; }
.vps-mt-so strong { font-weight: 700; color: var(--heading); }
.vps-mt-muc { white-space: nowrap; }
.vps-phong-dt .vps-mt { gap: var(--sp-2); font-size: var(--fs-sm); line-height: var(--lh); }
.vps-phong-dt .vps-mt-muc { white-space: normal; }
/* a wide room that carries a goal has no line to spare: its status tag stands beside the nameplate */
.vps-san:not([data-ben]) .vps-phong:has(.vps-mt) .vps-tt-hang { position: absolute; z-index: 2; top: var(--sp-3); right: var(--sp-3); }

/* ---------- G21 Count control (S33): minus, a slider from 1 to the ceiling with numbered ticks, plus, the figure ----------
   div.vps-chinh[data-vps-chinh] = button.btn.btn-icon[data-vps-buoc="-1"] + div.vps-chinh-ray (input.vps-chinh-keo[type=range]
   + ol.vps-chinh-vach[aria-hidden] > li) + button.btn.btn-icon[data-vps-buoc="1"] + output.vps-chinh-so "3 / 4".
   Every target is --tap high; the arrow keys move the slider; vanphongso.js keeps the parts in step. */
.vps-chinh { --vps-chinh-nut: 1.5rem; --vps-chinh-day: 0.5rem; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: start; gap: var(--sp-1) var(--sp-3); }
.vps-chinh-ray { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.vps-chinh-keo { display: block; width: 100%; height: var(--tap); margin: 0; background: transparent; appearance: none; -webkit-appearance: none; cursor: pointer; }
.vps-chinh-keo::-webkit-slider-runnable-track { height: var(--vps-chinh-day); background: linear-gradient(to right, var(--primary) var(--v, 0%), var(--sunk) var(--v, 0%)); border-radius: var(--radius-pill); }
.vps-chinh-keo::-webkit-slider-thumb { -webkit-appearance: none; width: var(--vps-chinh-nut); height: var(--vps-chinh-nut); margin-top: calc((var(--vps-chinh-day) - var(--vps-chinh-nut)) / 2); background: var(--surface); border: 2px solid var(--primary); border-radius: var(--radius-pill); box-shadow: var(--sh-1); }
.vps-chinh-keo::-moz-range-track { height: var(--vps-chinh-day); background: var(--sunk); border-radius: var(--radius-pill); }
.vps-chinh-keo::-moz-range-progress { height: var(--vps-chinh-day); background: var(--primary); border-radius: var(--radius-pill); }
.vps-chinh-keo::-moz-range-thumb { box-sizing: border-box; width: var(--vps-chinh-nut); height: var(--vps-chinh-nut); background: var(--surface); border: 2px solid var(--primary); border-radius: var(--radius-pill); box-shadow: var(--sh-1); }
.vps-chinh-keo:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.vps-chinh-keo:disabled { cursor: not-allowed; opacity: 0.5; }
/* a tick label is as wide as the handle, so its number stands under the place the handle stops at */
.vps-chinh-vach { display: flex; justify-content: space-between; margin: 0; padding: 0; list-style: none; font-size: var(--fs-xs); line-height: var(--lh-tight); font-variant-numeric: tabular-nums; color: var(--muted); }
.vps-chinh-vach > li { width: var(--vps-chinh-nut); text-align: center; }
.vps-chinh-vach > li[data-chon] { font-weight: 700; color: var(--heading); }
.vps-chinh-so { display: grid; place-items: center; min-width: 3.5rem; min-height: var(--tap); font-size: var(--fs-md); font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--muted); }
.vps-chinh-so strong { font-size: var(--fs-xl); color: var(--heading); }
.vps-chinh-so > span { display: inline-flex; align-items: baseline; gap: var(--sp-1); }
:root[data-tap="all"] .vps-chinh { --vps-chinh-nut: 1.75rem; }

/* layout glue of the new screens: two results side by side from 16rem each (S10 · kết quả mâu thuẫn; --col-min is the kit's own property) */
.vps-hai-ben { --col-min: 16rem; }
.vps-hai-ben > .vps-de-xuat { align-content: start; }
/* a field that belongs to one radio of a group is drawn only while that radio is chosen (S30 · Phạm vi của bài học) */
.check:has(input[type="radio"]:not(:checked)) + .vps-theo { display: none; }

/* G23 · A line of a conversation in a kit timeline log (S34): the dot on the rail takes the colour of the room that speaks, whose name is the line's title.
   The kit row fold that holds the earlier lines is indented like the panel body, so the two lists stand on one edge. */
.vps-loi { --tone: var(--vps-mau); }
.vps-loi-cu { --row-fold-indent: var(--sp-1); }

/* ==================== Đợt thêm E3, E4 · 17/11/2026: chat with an agent, rating its work (G27…G33) ==================== */

/* G27 · Agent page head (S35): the agent at its desk, drawn as on the plan in its room's colour, beside the name, the status,
   the AI calls left and the quality line. div.vps-ag-dau[data-phong] = span.vps-ag-hinh > svg.vps-ban + the words. */
.vps-ag-dau { display: flex; align-items: flex-start; gap: var(--sp-4); min-width: 0; }
.vps-ag-hinh { flex: none; display: block; width: var(--vps-ag-w, 6.5rem); padding: var(--sp-1); background: var(--surface-2); border: 1px solid var(--panel-border); border-bottom: 3px solid var(--vps-mau); border-radius: var(--radius); }
.vps-ag-hinh .vps-ban { display: block; width: 100%; }
.vps-ag-so { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-4); }
.vps-dt .vps-ag-dau { --vps-ag-w: 4.5rem; gap: var(--sp-3); }

/* G28 · Conversation (S35 tab Trò chuyện, later the S3 tab): ol.vps-tc > li.vps-tin[data-ai="nguoi|agent|tu-dong"][data-phong]
   = p.vps-tin-dau (name, type tag, time) + p.vps-tin-than (the words, line breaks kept) + an optional card + div.vps-tin-chan
   (Xếp lại, Dựa trên gói ngữ cảnh, Lưu thành bài học). The person's lines stand at the end edge on the notice ground; an agent's
   carry its room's colour at the start edge; a fixed reply (busy, paused) is dashed. p.vps-tc-cho says a reply is being written. */
.vps-tc { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); margin: 0; padding: 0; list-style: none; }
.vps-tc-ngay { margin: 0; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); text-align: center; }
.vps-tin { display: grid; gap: var(--sp-2); justify-self: start; width: min(100%, 46rem); min-width: 0; padding: var(--sp-3) var(--sp-4); background: var(--surface); border: 1px solid var(--panel-border); border-left: 4px solid var(--vps-mau, var(--field-border)); border-radius: var(--radius); }
.vps-tin[data-ai="nguoi"] { justify-self: end; width: min(100%, 38rem); background: var(--notice-bg); border-color: var(--primary-tint-line); border-left-width: 1px; }
.vps-tin[data-ai="tu-dong"] { background: var(--surface-2); border-style: dashed; border-left-style: solid; }
.vps-tin[data-gui="loi"] { border-color: var(--danger); }
.vps-tin-dau { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-2); margin: 0; font-size: var(--fs-sm); line-height: var(--lh-tight); }
.vps-tin-dau strong { color: var(--heading); }
.vps-tin-dau time { margin-inline-start: auto; font-size: var(--fs-xs); font-variant-numeric: tabular-nums; color: var(--muted); }
.vps-tin-than { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.vps-tin-chan { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-2); }
.vps-tc-cho { display: flex; align-items: center; gap: var(--sp-2); margin: 0; font-size: var(--fs-sm); color: var(--muted); }
.vps-tc-cho > .icon { flex: none; }

/* G29 · Cards in a conversation: div.vps-the[data-vps-the] = p.vps-the-ten + a kit dl + one div.vps-the-o per state
   ([data-vps-o="cho|giao|bo|…"], vanphongso.js shows one). A job card (thẻ nhận việc) or a card that opens a slip
   (thẻ lập chứng từ: its fields in div.vps-the-form); div.vps-the-nut holds Giao việc / Bỏ, p.vps-the-thieu says what is missing. */
.vps-the { display: grid; gap: var(--sp-3); min-width: 0; padding: var(--sp-3) var(--sp-4); background: var(--surface-2); border: 1px solid var(--field-border); border-radius: var(--radius); }
.vps-the-ten { display: flex; align-items: center; gap: var(--sp-2); margin: 0; font-size: var(--fs-sm); font-weight: 700; color: var(--heading); }
.vps-the-ten > .icon { flex: none; }
.vps-the-o { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); min-width: 0; }
.vps-the-nut { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.vps-the-thieu, .vps-the-form { flex: 1 1 100%; }
.vps-the-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: var(--sp-3); }

/* G30 · Rating bar (thanh đánh giá) of a finished job: div.vps-dg[data-vps-the] with one div.vps-dg-o per state:
   "cho" (Đạt, Chưa đạt), "dat" (just rated: who, when, stars, a short reason, Đổi), "da" (rated before), "chuadat" (written
   by the S36 form). fieldset.vps-sao = five radios, each inside its label with a drawn star; a star and the ones before it fill. */
.vps-dg { display: grid; gap: var(--sp-2); min-width: 0; }
.vps-dg-o { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-2); min-width: 0; }
.vps-dg-hoi { font-size: var(--fs-sm); font-weight: 600; color: var(--heading); }
.vps-dg-ai { min-width: 0; font-size: var(--fs-xs); color: var(--muted); }
.vps-dg-ly { flex: 1 1 12rem; width: auto; min-width: 0; max-width: 22rem; }
.vps-sao { display: inline-flex; margin: 0; padding: 0; min-width: 0; border: 0; }
.vps-sao > label { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: var(--radius-sm); cursor: pointer; }
.vps-sao-hinh { width: 1.25rem; height: 1.25rem; fill: var(--surface); stroke: var(--muted); stroke-width: 1.5; stroke-linejoin: round; }
.vps-sao > label:hover .vps-sao-hinh { stroke: var(--warn); }
.vps-sao > label:has(input:checked) .vps-sao-hinh, .vps-sao > label:has(~ label input:checked) .vps-sao-hinh { fill: var(--warn-line); stroke: var(--warn); }
.vps-sao > label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 1px; }
.vps-sao:has(input:disabled) > label { cursor: default; }
:root[data-tap="all"] .vps-sao > label { width: var(--tap); height: var(--tap); }

/* G31 · Composer (ô gõ): form.vps-o-go = a kit field (textarea, the counter in its hint, the error line) + "Gửi". On a desktop
   it sits in div.vps-o-go-chan at the foot of the conversation and stays in view while the page scrolls; on a phone it is
   the only content of the kit .action-bar, above the safe area (the page sets interactive-widget=resizes-content). */
.vps-o-go-chan { position: sticky; bottom: 0; z-index: var(--z-sticky); display: grid; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); background: var(--surface-2); border-top: 1px solid var(--panel-border); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.vps-o-go { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: var(--sp-2) var(--sp-3); min-width: 0; }
.vps-o-go > .field { min-width: 0; }
.vps-o-go .textarea { max-height: 40vh; }
.vps-o-go [data-vps-dem] { font-variant-numeric: tabular-nums; white-space: nowrap; }
.action-bar > .vps-o-go { flex: 1 1 100%; }

/* G32 · Lessons loaded for the job, in the "Chưa đạt" form (S36): ul.vps-bh-nap > li = the lesson + its "Lỗi này đã có" box */
.vps-bh-nap { display: grid; gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
.vps-bh-nap > li { display: grid; gap: var(--sp-1); padding: var(--sp-3); background: var(--surface-2); border: 1px solid var(--panel-border); border-radius: var(--radius); }
.vps-bh-nap-ten { margin: 0; font-weight: 600; }

/* G33 · Small fits for S35: .vps-tab-deu shares a phone's pill tabs out evenly so three tabs fit a 360 screen; under the
   columns of the quality chart (figure.vps-cc-dem-hop) each week also says how many ratings it counts (span.vps-cc-dem),
   the groups widen to hold it and the chart scrolls to the latest week on a phone ([data-vps-cuoi]); span.vps-ma keeps a
   code such as BH-0004 on one line inside running text. */
.vps-tab-deu { width: 100%; }
.vps-tab-deu > .tab { flex: 1 1 0; justify-content: center; min-width: 0; padding-inline: var(--sp-2); text-align: center; }
.chart-cols.vps-cc-dem-hop { --cc-label-h: 2.75rem; --cc-group-w: 5rem; }
.vps-cc-dem-hop .cc-label { flex-direction: column; line-height: var(--lh-tight); }
.vps-cc-dem { font-weight: 400; }
.vps-ma { white-space: nowrap; }

/* G34 · Play / pause of the timeline bar (a.btn.btn-icon.vps-phat, [data-vps-phat="dung"] for pause) drawn in CSS, not from the
   sprite: this icon-only button is the one control a page opened from disk (file://, where Chrome blocks the external
   <use href="kit/icons.svg#…">) showed as an empty square. The glyph is a solid triangle / two bars in the text colour. */
.vps-phat::before { content: ""; display: block; flex: none; width: 1.25rem; height: 1.25rem; background: currentColor; clip-path: polygon(26% 12%, 90% 50%, 26% 88%); }
.vps-phat[data-vps-phat="dung"]::before { width: 1rem; height: 1.125rem; background: linear-gradient(to right, currentColor 0 34%, transparent 34% 66%, currentColor 66%); clip-path: none; }

/* G35 · Chat and rating in the room side panel (S3): the composer is the panel's foot row, shown with the Trò chuyện tab only
   (div.vps-ben-chan[data-vps-chi-tab]; on the phone sheet a second .modal-foot, while [data-vps-tru-tab] hides the usual foot);
   a finished job's rating bar runs under its row across the kit work row (li.work-row > a.work-item + div.vps-dg), indented
   like the row's text. */
.vps-ben-chan > .vps-o-go, .modal-foot > .vps-o-go { flex: 1 1 100%; }
.modal-foot:has(> .vps-o-go) { flex-wrap: wrap; }
/* the "Gắn với" picker sits on one line above the composer: the label, then the kit combo taking the rest */
.vps-tc-gan { flex: 1 1 100%; display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.vps-tc-gan > .label { flex: none; margin: 0; }
.vps-tc-gan > .combo { flex: 1 1 auto; min-width: 0; }
/* "Mở trang agent" and the close button share the title row of the side panel and never wrap */
.vps-ben-ten > .cluster { flex: none; }
.work-row > .vps-dg { grid-column: 1 / -1; padding: 0 var(--sp-4) var(--sp-3); }

/* G36 · Quality score next to an agent's status (S1 nameplate, list column): span.vps-diem[data-field="diemChatLuong"] = "86% Đạt"
   or "Chưa đủ đánh giá" in small muted text; [data-duoi] (under the S27 threshold) adds the warning icon and the danger colour, so the
   word "Dưới ngưỡng" and the icon carry the meaning as well as the colour. Hidden on the plan while a side panel is open, like .vps-phu. */
.vps-diem { display: inline-flex; align-items: center; gap: var(--sp-1); font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.vps-diem[data-duoi] { color: var(--danger); font-weight: 600; }
.vps-diem > .icon { width: 1em; height: 1em; flex: none; }
.vps-san[data-ben] .vps-diem { display: none; }
/* In a room with copies, a status that carries a score does not fit the top-right corner (it covered the room name at 1280 and the
   first desk at 1440): it goes back into the status block, tag and score on one line, as in every other room */
.vps-san:not([data-ben]) .vps-phong:has(.vps-mt) .vps-tt-hang:has(.vps-diem) { position: static; flex-direction: row; align-items: center; }
/* The "Việc bị đánh giá thấp" group of the BGĐ room (S4) leads its kit group head with its own icon */
.group-head > .icon { align-self: center; }
.vps-dgt > .vps-ghi { margin: 0; padding: var(--sp-2) var(--group-head-px, var(--sp-4)) var(--sp-3); }
/* .vps-dg-lon: a rating bar stacked on a phone page (S18 phone): the question on its own line, Đạt and Chưa đạt as two equal big buttons */
.vps-dg-lon .vps-dg-o[data-vps-o="cho"] > :is(.vps-dg-hoi, .vps-dg-ai) { flex: 1 1 100%; }
.vps-dg-lon .vps-dg-o[data-vps-o="cho"] > .btn { flex: 1 1 0; }
/* On the phone tab Chất lượng (S35) the lesson link inside a repeat-error row is a full 44 px target, like every other control there */
[data-look="app"] #pn-chat-luong .work-reason a { display: inline-block; min-height: 2.75rem; }

/* ==================== Đợt ba và E0 · 17/11/2026: trao đổi trước khi kết luận, tham chiếu, dấu vết, sổ tay (G37…G46) ==================== */

/* G37 · Reference card inside a message (thẻ tham chiếu, REQ-098): a.vps-tc-the = span.vps-tc-the-ic (the kind's icon)
   + span.vps-tc-the-chu (code · name, one line of preview) + a kit tag (its status now) [+ span.vps-tc-the-ban "bản v1 · đã có v2"].
   Several cards sit in div.vps-tc-the-ds[role=list] and wrap to the next line; nothing scrolls sideways. [data-khong] is a card the
   reader may not see: no name, no preview. The job card (thẻ việc) is a kit-less G29 card (div.vps-the.vps-the-viec) that starts
   with this card and adds its rating states. */
.vps-tc-the-ds { display: flex; flex-wrap: wrap; gap: var(--sp-2); min-width: 0; }
.vps-tc-the-ds > [role="listitem"] { display: flex; flex: 1 1 17rem; min-width: 0; max-width: 100%; }
.vps-tc-the { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--sp-1) var(--sp-3); width: 100%; min-width: 0; min-height: var(--tap); padding: var(--sp-2) var(--sp-3); color: var(--text); text-decoration: none; background: var(--surface); border: 1px solid var(--field-border); border-radius: var(--radius); }
a.vps-tc-the:hover { background: var(--surface-hover); }
a.vps-tc-the:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.vps-tc-the-ic { display: grid; place-items: center; width: 2rem; height: 2rem; color: var(--muted); background: var(--surface-2); border-radius: var(--radius-sm); }
.vps-tc-the-chu { display: grid; min-width: 0; }
.vps-tc-the-ten { font-size: var(--fs-sm); font-weight: 600; line-height: var(--lh-tight); color: var(--heading); overflow-wrap: anywhere; }
.vps-tc-the-phu { font-size: var(--fs-xs); color: var(--muted); overflow-wrap: anywhere; }
.vps-tc-the-ban { grid-column: 2 / -1; font-size: var(--fs-xs); font-weight: 600; color: var(--text); }
.vps-tc-the[data-khong] { border-style: dashed; background: var(--surface-2); }
.vps-the-viec > .vps-tc-the-ds { margin-bottom: 0; }

/* G38 · Sources under an agent's answer (hàng "Nguồn", REQ-093): a label and kit link chips (a.chip) to the trail items, lessons, papers */
.vps-nguon { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-2); padding-top: var(--sp-2); border-top: 1px dashed var(--panel-border); }
.vps-nguon-nhan { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.vps-nguon .chip-group { flex-wrap: wrap; min-width: 0; }
.vps-nguon .chip { max-width: 100%; white-space: normal; text-align: start; }

/* G39 · Quick replies of the boss (nút trả lời nhanh, REQ-100, REQ-103): a row of kit buttons; on a phone one under another, full width */
.vps-tl-nhanh { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); min-width: 0; }
.vps-tl-nhanh > .vps-sao { margin-inline-start: var(--sp-2); }
[data-look="app"] .vps-tl-nhanh { flex-direction: column; align-items: stretch; }
[data-look="app"] .vps-tl-nhanh > .btn { justify-content: flex-start; min-height: var(--tap); }
[data-look="app"] .vps-tl-nhanh > .vps-sao { margin-inline-start: 0; }
.vps-the-o > .field { flex: 1 1 100%; min-width: 0; }
.vps-the-chu { flex: 1 1 100%; margin: 0; }

/* G40 · Reasoning trail (dấu vết lập luận, REQ-092): in a conversation a folding card (details.vps-dv: counts when shut, the items
   when open); on S37 one kit fold panel per group holding ol.vps-dv-ds > li.vps-dv-muc[id="dv-07"]. The item named in the address
   (:target) or marked aria-current is lit, as when it is opened from a source chip. */
.vps-dv { display: grid; min-width: 0; background: var(--surface-2); border: 1px solid var(--field-border); border-radius: var(--radius); }
.vps-dv > summary { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-3); min-height: var(--tap); padding: var(--sp-2) var(--sp-4); cursor: pointer; list-style: none; }
.vps-dv > summary::-webkit-details-marker { display: none; }
.vps-dv > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.vps-dv-ten { font-size: var(--fs-sm); font-weight: 700; color: var(--heading); }
.vps-dv-dem { font-size: var(--fs-xs); color: var(--muted); }
.vps-dv > summary .icon:last-child { margin-inline-start: auto; transition: transform var(--dur-1) var(--ease); }
.vps-dv[open] > summary .icon:last-child { transform: rotate(180deg); }
.vps-dv-than { display: grid; gap: var(--sp-3); padding: 0 var(--sp-4) var(--sp-3); }
.vps-dv-nhom { margin: 0; font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.vps-dv-ds { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.vps-dv-ds > li > a { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sp-2); min-height: var(--tap); padding: var(--sp-1) 0; align-items: center; font-size: var(--fs-sm); text-decoration: none; color: var(--text); }
.vps-dv-ds > li > a:hover .vps-dv-chu { text-decoration: underline; }
.vps-dv-muc { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sp-1) var(--sp-3); padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--panel-border); scroll-margin-top: var(--sp-8); }
.vps-dv-muc:first-child { border-top: 0; }
.vps-dv-muc:target, .vps-dv-muc[aria-current="true"] { background: var(--notice-bg); box-shadow: inset 4px 0 0 var(--primary); }
.vps-dv-muc > .vps-ma { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); padding-top: var(--sp-1); }
.vps-dv-muc-than { display: grid; gap: var(--sp-1); min-width: 0; }
.vps-dv-muc-than > p { margin: 0; }
.vps-dv-muc-ten { font-weight: 600; color: var(--heading); }
.vps-dv-chon { padding: var(--sp-3) var(--sp-4); background: var(--surface-2); border-left: 4px solid var(--vps-mau, var(--primary)); }

/* G41 · Composer extras (REQ-097): div.vps-o-go-them = "+" and "@" before the field; div.vps-o-go-tc = the chips of what is attached
   (kit chip-value with chip-x "Bỏ") and the error line; ul.vps-goi-y = the short "@" list over the field. A phone drops the "@"
   button (the keyboard has @) to leave the field its width. */
.vps-o-go:has(> .vps-o-go-them) { grid-template-columns: auto minmax(0, 1fr) auto; }
.vps-o-go-them { display: flex; gap: var(--sp-1); align-self: start; }
.vps-o-go-tc { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-2); min-width: 0; }
.vps-o-go-tc[hidden] { display: none; }
.vps-o-go-tc .chip[data-khong] { border-style: dashed; }
.vps-o-go-loi { flex: 1 1 100%; margin: 0; }
.vps-o-go > .field { position: relative; }
.vps-goi-y { position: absolute; inset: auto 0 calc(100% + var(--sp-1)) 0; z-index: calc(var(--z-sticky) + 1); max-height: 16rem; margin: 0; padding: var(--sp-1); overflow-y: auto; list-style: none; background: var(--surface); border: 1px solid var(--panel-border); border-radius: var(--radius); box-shadow: var(--sh-2); }
.vps-goi-y[hidden] { display: none; }
.vps-goi-y .search-item[data-active="true"], .vps-chon-tc .search-item[aria-selected="true"] { background: var(--notice-bg); }
[data-look="app"] .vps-o-go-them [data-vps-a-cong] { display: none; }

/* G42 · Reference picker (bảng chọn tham chiếu): a kit modal (a full-height kit sheet on a phone) holding the kit search box, a
   scrolling row of kind chips, three kit selects and kit search items */
.vps-chon-loc { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: var(--sp-3); }
.vps-chon-tc .search-results { max-height: none; padding: 0; }
.vps-chon-tc .modal-foot > .vps-ghi { flex: 1 1 auto; }
[data-look="app"] .vps-chon-tc { height: calc(100dvh - var(--sp-4)); max-height: none; }

/* G43 · A conversation about one job: the line that opens the part (li.vps-tc-doan "Về BSG-0031 · từ 09:58"), the filter
   "Chỉ tin về việc này" (the list gets data-chi-viec and keeps only the lines marked data-ve-viec), the boss's verdict line */
.vps-tc-doan { display: flex; align-items: center; gap: var(--sp-2); margin: 0; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.vps-tc-doan::before, .vps-tc-doan::after { content: ""; flex: 1 1 auto; border-top: 1px solid var(--panel-border); }
.vps-tc[data-chi-viec] > li:not([data-ve-viec]):not(.vps-tc-doan) { display: none; }
.vps-tc-loc { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }

/* G44 · The boss's state and voices: "Đang bận" in the top bar (pressed = busy; under 85rem only its icon, the name stays in
   aria-label), the speaker of a notification (span.vps-ai-noi), the "Đạt có góp ý" field error, a phone rating bar stacked
   (.vps-dg-lon), the full-width "Hỏi … về phiếu này" of a phone slip */
[data-vps-ban][aria-pressed="true"] { background: var(--notice-bg); box-shadow: inset 0 -3px 0 var(--primary); }
@media (max-width: 85rem) { .vps-ban-chu { display: none; } }
.vps-ai-noi { font-weight: 700; color: var(--heading); }
.vps-dg-loi { flex: 1 1 100%; margin: 0; }
.vps-dg-lon .vps-dg-o[data-vps-o="cho"] > .btn { flex: 1 1 100%; }
.vps-hoi-phieu { width: 100%; }

/* G45 · S37 head inside its drawer: whose notes, which job, read only */
.vps-dv-dau { display: grid; gap: var(--sp-1); }
.vps-dv-dau > p { margin: 0; }
.vps-dv-ten { display: inline-flex; align-items: center; gap: var(--sp-2); }
.vps-dv-muc-than .cluster > a { display: inline-flex; align-items: center; gap: var(--sp-1); }
[data-look="app"] .vps-dv-muc-than .cluster > a { min-height: var(--tap); }

/* G46 · Phone fits of đợt ba: four pill tabs of S35 (Sổ tay added) share 360 px, a long name breaks onto a second line instead
   of running under its neighbour; a reference card in a narrow bubble puts its status under the name */
.vps-tab-deu > .tab { white-space: normal; line-height: var(--lh-tight); font-size: var(--fs-sm); }
[data-look="app"] .vps-tc-the { grid-template-columns: auto minmax(0, 1fr); }
[data-look="app"] .vps-tc-the > .tag { grid-column: 2; justify-self: start; }

/* G47 · E5 Quản lý (agent 8, REQ-111): its desk sits in an annex on the building's right, beside the BGĐ room, and the corridor
   runs on into it. The annex mirrors the gate's three rows: on top its latest bubble to a staff member (REQ-113), then a corridor
   stub, then the desk room (a .vps-phong, so nameplate, door, highlight and the narrow plan behave as in the seven rooms).
   No folder lane goes to or from it: the 13 handover flows stay room to room. */
[data-phong="quanly"] { --vps-mau: color-mix(in srgb, var(--series-4) 50%, var(--series-1)); }
.vps-mb:has(> .vps-ql) { grid-template-columns: var(--vps-cong-w, 12rem) minmax(0, 1fr) var(--vps-ql-w, 15rem); }
.vps-san[data-ben] .vps-mb { --vps-ql-w: 7.5rem; }
.vps-ql { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) var(--vps-hl) minmax(0, 1fr); gap: var(--vps-tuong); padding-block: var(--vps-tuong); min-width: 0; }
.vps-ql-tren { display: flex; align-items: flex-end; min-width: 0; padding: var(--sp-3) var(--sp-3) var(--sp-3) var(--sp-4); }
.vps-ql-tren > .vps-bb { flex: 1 1 auto; }
.vps-ql-khoi { grid-row: 2 / 4; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: var(--vps-hl) minmax(0, 1fr); gap: var(--vps-tuong); min-width: 0; margin-block: calc(var(--vps-tuong) * -1); padding: var(--vps-tuong) var(--vps-tuong) var(--vps-tuong) 0; background: var(--vps-tuong-mau); border-radius: 0 var(--radius) var(--radius) 0; }
.vps-ql-hl { position: relative; background-color: var(--surface-2); background-image: linear-gradient(90deg, var(--panel-border) 1px, transparent 1px); background-size: 4rem 100%; }
.vps-ql-hl::before { content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--vps-tuong) * -1); width: var(--vps-tuong); background: var(--surface-2); }
.vps-mb[data-xem-lai] .vps-ql-hl, .vps-mb[data-xem-lai] .vps-ql-hl::before { background-color: var(--sunk); }
@media (max-width: 85rem) { .vps-mb:has(> .vps-ql) { --vps-ql-w: 11rem; } }
/* the annex makes the rooms about 60px narrower: the BGĐ waiting box then goes under its desk instead of past the wall */
.vps-mb:has(> .vps-ql) .vps-phong[data-phong="bgd"] .vps-ngoi { flex-wrap: wrap; }
/* a narrow plan (side panel open) gives the annex no column, so the seven rooms keep their width: the Quản lý desk stands as a
   card at the corridor's right end, nameplate only, in the top lane (folders ride the middle lane and wait at doors in the bottom one) */
.vps-san[data-ben] .vps-mb:has(> .vps-ql) { grid-template-columns: var(--vps-cong-w, 12rem) minmax(0, 1fr); }
.vps-san[data-ben] .vps-mb:has(> .vps-ql) > .vps-toa { grid-column: 2; grid-row: 1; }
.vps-san[data-ben] .vps-ql { grid-column: 2; grid-row: 1; z-index: 5; justify-self: end; width: var(--vps-ql-w); margin-right: calc(var(--vps-tuong) * 3); }
.vps-san[data-ben] .vps-ql-khoi { grid-row: 2; align-self: start; display: block; margin: 0; padding: var(--sp-1) 0 0; background: none; }
.vps-san[data-ben] :is(.vps-ql-hl, .vps-ql .vps-ngoi, .vps-ql .vps-tt, .vps-ql .vps-cua-o) { display: none; }
.vps-san[data-ben] .vps-ql .vps-phong { align-content: center; border: 1px solid var(--field-border); border-left: 3px solid var(--vps-mau); border-radius: var(--radius-sm); }

/* G48 · Assignment card of the Quản lý (thẻ giao việc, REQ-112): a G29 card whose ul.vps-giao-ds holds one li[data-phong] per
   room (room square, "Tên · Phòng — loại việc — công trình — tệp", a second line, then span.vps-giao-cuoi with the line's state and
   Thu hồi). On the phone the state drops under the words. */
.vps-giao-ds { display: grid; gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
.vps-giao-ds > li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--sp-1) var(--sp-3); min-width: 0; padding: var(--sp-2) var(--sp-3); background: var(--surface); border: 1px solid var(--field-border); border-left: 3px solid var(--vps-mau); border-radius: var(--radius-sm); }
.vps-giao-chu { display: grid; min-width: 0; }
.vps-giao-ten { font-size: var(--fs-sm); font-weight: 600; line-height: var(--lh-tight); color: var(--heading); overflow-wrap: anywhere; }
.vps-giao-phu { font-size: var(--fs-xs); color: var(--muted); overflow-wrap: anywhere; }
.vps-giao-cuoi { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--sp-1) var(--sp-2); }
[data-look="app"] .vps-giao-ds > li { grid-template-columns: auto minmax(0, 1fr); }
[data-look="app"] .vps-giao-cuoi { grid-column: 2; justify-content: flex-start; }
