/* TV danh sách bệnh nhân theo buồng */
.tvbn .tv-head{background:linear-gradient(90deg,#087f5b,#12b886)}
.tvbn .tv-switch a.on{color:#087f5b}
.bnv-sum{display:flex;gap:.6em;font-weight:700;font-size:1.15em}
.bnv-sum span{background:rgba(255,255,255,.2);border-radius:.6em;padding:.25em .7em;white-space:nowrap}
.bnv-sum b{font-size:1.4em;margin-right:.2em}
.bnv{flex:1;min-height:0;overflow:hidden;padding:.7em .9em;display:grid;grid-template-columns:3.2em repeat(6,minmax(0,1fr));gap:.55em}
.bnv .tv-msg{grid-column:1/-1}
.fl{display:flex;flex-direction:column;align-items:center;justify-content:center;background:#087f5b;color:#fff;border-radius:.7em;writing-mode:vertical-rl;transform:rotate(180deg);gap:.3em}
.fl b{font-size:1.35em;letter-spacing:.05em}
.fl small{font-size:1em;opacity:.85}
.tvr,.tvx{background:#fff;border-radius:.8em;border:.2em solid #96f2d7;padding:.4em .55em;min-width:0;min-height:0;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 .15em .6em rgba(8,127,91,.12)}
.tvr.empty{background:#f8fdfb;border-style:dashed}
.tvr header{display:flex;align-items:center;gap:.45em;margin-bottom:.25em;min-width:0}
.tvr .rm{min-width:2.3em;height:1.75em;font-size:1.3em;background:#087f5b;border-radius:.45em}
.tvr .n{font-weight:800;color:#087f5b;white-space:nowrap}
.tvr .bs{font-weight:700;color:#1864ab;font-size:1em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;margin:-.1em 0 .2em}
.tvr .bs.none{color:#adb5bd;font-weight:500;font-style:italic}
.tvr-l{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.2em}
.tvr-l li{display:grid;grid-template-columns:1.1em minmax(0,1fr) auto;column-gap:.4em;align-items:center;border-bottom:1px solid #f1f3f5;padding:.12em 0;line-height:1.2}
.tvr-l li b{font-size:1.12em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tvr-l li b i{font-style:normal;font-size:.75em;background:#e6fcf5;color:#087f5b;border-radius:.3em;padding:0 .3em;margin-right:.3em}
.tvr-l li small{color:#6c757d;font-weight:600;white-space:nowrap}
.tvr-l li em{grid-column:2/4;font-style:normal;font-size:.88em;color:#37626d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bx{width:1.05em;height:1.05em;border:.14em solid #adb5bd;border-radius:.25em;display:inline-grid;place-items:center}
.bx.on{background:#2b8a3e;border-color:#2b8a3e}
.bx.on::after{content:'✓';color:#fff;font-weight:900;font-size:.8em;line-height:1}
li.done{background:#ebfbee;border-radius:.3em}
li.done b{text-decoration:line-through;color:#5c7c62}
li.done small{color:#2b8a3e}
li.done:not(.ra_vien) .bx.on{background:#868e96;border-color:#868e96}
li.done:not(.ra_vien) small{color:#495057}
.tvx.tot{flex-direction:row;flex-wrap:wrap;align-content:flex-start;gap:.5em;background:#f3fcf8}
.tvx .big{flex:1;min-width:6em;text-align:center;background:#fff;border-radius:.6em;padding:.3em;border:.12em solid #c3fae8}
.tvx .big b{display:block;font-size:2.6em;line-height:1;color:#087f5b}
.tvx .big.ok b{color:#2b8a3e}
.tvx .big span{font-weight:700;color:#495057}
.tvx ul{flex-basis:100%;margin:0;padding:0;list-style:none;font-size:1em}
.tvx ul li{padding:.1em 0;break-inside:avoid}
.tvx.out{background:#f4fbf5;border-color:#b2f2bb}
.tvx.out h3{margin:0 0 .3em;font-size:1.15em;color:#2b8a3e;display:flex;align-items:center;gap:.4em}
.tvx.out h3 b{background:#2b8a3e;color:#fff;border-radius:.4em;padding:0 .45em}
.tvx.out ol{list-style:none;margin:0;padding:0;columns:2;column-gap:1em}
.tvx.out ol li{display:flex;align-items:center;gap:.35em;padding:.1em 0;break-inside:avoid;white-space:nowrap;overflow:hidden}
.tvx.out ol li b{text-decoration:line-through;color:#5c7c62}
.tvx.out ol li small{color:#2b8a3e;font-weight:600;overflow:hidden;text-overflow:ellipsis}
.tvx.out ol li:not(.ra_vien) .bx.on{background:#868e96;border-color:#868e96}
.tvx.out p{margin:.2em 0;color:#868e96}
.tvx.out .note{margin-top:auto;font-size:.85em;color:#2b8a3e;font-weight:600}
.tvr .bs{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.tvr-l li b.nm{grid-column:2/4}
.tvr-l li em small{font-size:1em;color:#087f5b;margin-right:.35em}
/* ---- v2: chữ to, thông tin BN xếp ngang ---- */
.bnv{grid-template-columns:2.6em repeat(4,minmax(0,1fr))}
.bnv .tvx.out{grid-column:1/-1;padding:.3em .7em}
.tvx.out ol{columns:unset;display:flex;flex-wrap:wrap;gap:.1em 1.4em}
.tvx.out h3{margin:0 0 .15em}
.tvr .rm{font-size:1.15em}
.tvr-l li{grid-template-columns:1.1em minmax(0,1fr);align-items:start;padding:.18em 0}
.tvr-l li .bx{margin-top:.2em}
.tvr-l li .pt{display:block;min-width:0;line-height:1.25;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.tvr-l li .pt b.nm{display:inline;font-size:1.05em;margin-right:.35em;white-space:normal;grid-column:auto}
.tvr-l li .pt small{display:inline;color:#087f5b;font-weight:800;margin-right:.4em;font-size:.9em}
.tvr-l li .pt em{display:inline;font-size:.9em;color:#37626d}
.tvr-l li.done{grid-template-columns:1.1em minmax(0,1fr) auto}
.tvr-l li .pt b.nm{white-space:nowrap}

.fl{writing-mode:horizontal-tb;transform:none;text-align:center;gap:.05em}
.fl span{font-size:.95em;font-weight:700}.fl b{font-size:2em;line-height:1;letter-spacing:0}.fl small{font-size:.95em}
.tvr>*{flex:none}
.tvr-l li .pt em{white-space:normal;overflow:visible;text-overflow:clip;grid-column:auto}
.tvr-l li .pt{display:block;-webkit-line-clamp:unset;overflow:visible}
.tvr-l li .pt{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tvr-l li .pt em{white-space:nowrap}
.tvr header .bs{flex:1;min-width:0;margin:0;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;-webkit-line-clamp:unset;font-size:.95em}
.rtt{display:inline-block;border-radius:.3em;padding:0 .35em;font-size:.55em;font-weight:800;margin-left:.3em;vertical-align:middle}
.rtt.dv{background:#f3f0ff;color:#5f3dc4}
.rtt.ti{background:#fff4e6;color:#d9480f}
/* tên bệnh nhân to hơn */
.tvr-l li .pt b.nm{font-size:1.32em;font-weight:900;color:#0b3a44}
.tvr-l li .pt small{font-size:.85em}
.tvr-l li .pt em{font-size:.85em}

/* ---- v3: bỏ ô tích, số buồng to, cảnh báo bàn giao ---- */
.tvr-l li{grid-template-columns:minmax(0,1fr)}
.tvr-l li.done{grid-template-columns:1.1em minmax(0,1fr) auto}
.tvr .rm{font-size:1.75em;min-width:2.1em;height:1.5em;display:inline-grid;place-items:center;line-height:1;font-weight:900}
.tvr .n{font-size:1.1em}
.tvr-l li .pt .ho{display:inline-block;background:#e03131;color:#fff;font-weight:800;font-size:.7em;border-radius:.35em;padding:.02em .4em;margin-right:.4em;vertical-align:middle;white-space:nowrap}

/* ---- v4: ô 'Ra khỏi danh sách hôm nay' ở góc dưới bên phải ---- */
.bnv .tvx.out{grid-column:auto;padding:.4em .55em;overflow:hidden;display:flex;flex-direction:column}
.tvx.out h3{font-size:1.05em;margin:0 0 .25em;white-space:nowrap}
.tvx.out ol{display:block;columns:unset;overflow:hidden;font-size:.9em;flex:1;min-height:0}
.tvx.out ol li{display:flex;gap:.35em;align-items:center;padding:.08em 0;overflow:hidden}
.tvx.out ol li b{overflow:hidden;text-overflow:ellipsis;font-size:1.05em}
.tvx.out ol li small{flex:none}
.tvbn .fs{bottom:auto;top:.3em;right:.3em;font-size:1em;opacity:.25;z-index:5}
.tvbn .fs,.tvbn .tv-logout{bottom:auto;top:.3em;font-size:1em;opacity:.25;z-index:5}
.tvbn .fs{right:.3em}
.tvbn .tv-logout{right:2.6em}

/* ---- v5: kiểu danh sách, chữ rất to ---- */
.bnv.bnl{display:flex;flex-direction:column;padding:.5em .9em .4em;gap:.3em;overflow:hidden}
.bnl .cols{flex:1;min-height:0;column-gap:1.2em;column-fill:auto;overflow:hidden;width:100%}
.bnl .fh{break-after:avoid;break-inside:avoid;background:#087f5b;color:#fff;font-weight:900;border-radius:.4em;padding:.05em .6em;margin:.15em 0 .1em;font-size:.8em;display:flex;justify-content:space-between}
.bnl .fh b{font-weight:700;opacity:.9}
.bnl .rg{break-inside:avoid;border-top:.1em solid #96f2d7;padding:.05em 0}
.bnl .ln{display:grid;grid-template-columns:3.6em minmax(0,1fr);column-gap:.45em;align-items:baseline;line-height:1.15}
.bnl .rc{display:flex;flex-direction:column;align-items:flex-start;min-width:0}
.bnl .rm{display:inline-block;background:#087f5b;color:#fff;border-radius:.3em;padding:0 .3em;font-size:1em;font-weight:900;min-width:2.2em;text-align:center}
.bnl .rm.long{font-size:.62em;padding:.1em .2em}
.bnl .rtt{font-size:.4em;font-style:normal;font-weight:800;border-radius:.3em;padding:0 .3em;margin-top:.1em}
.bnl .bs{font-size:.4em;color:#1864ab;font-weight:700;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bnl .pc{display:flex;align-items:baseline;gap:.5em;min-width:0;white-space:nowrap;overflow:hidden}
.bnl .nm{font-size:1em;font-weight:900;color:#0b3a44;flex:none}
.bnl .nm i{font-style:normal;font-size:.6em;background:#e6fcf5;color:#087f5b;border-radius:.3em;padding:0 .3em;margin-right:.3em}
.bnl .ag{font-size:.55em;font-weight:800;color:#087f5b;flex:none}
.bnl .ho{font-size:.5em;background:#e03131;color:#fff;font-weight:800;border-radius:.3em;padding:.02em .4em;flex:none}
.bnl .dx{font-size:.5em;color:#37626d;overflow:hidden;text-overflow:ellipsis;min-width:0}
.bnl .ft{flex:none;border-top:.12em solid #96f2d7;padding-top:.2em;font-size:.55em;color:#495057;display:flex;gap:1.5em;overflow:hidden;white-space:nowrap}
.bnl .ft .fe{flex:none;max-width:35%;overflow:hidden;text-overflow:ellipsis}
.bnl .ft .fo{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;color:#2b8a3e;font-weight:600}
.bnl .ft b{color:#087f5b}

.bnl .ln{align-items:center}
.bnl .rc{flex-direction:row;align-items:center;gap:.15em}
.bnl .rm{align-self:center;height:auto}
.bnl .rtt{margin:0 0 0 .1em}
.bnl .bs{margin-left:auto;flex:none;font-size:.45em;max-width:10em}
.bnl .dx{flex:1 1 auto}
/* Tên IN HOA có dấu chồng (Ố, Ầ, Ễ…): không cắt phần dấu phía trên */
.bnl .ln{line-height:1.32}
.bnl .pc{overflow-x:clip;overflow-y:visible;padding-top:.06em}
@supports not (overflow:clip){.bnl .pc{overflow:hidden;line-height:1.4}}
