/* ═══ kho.css — Kho văn bản: cây thư mục + bảng, hai cột cuộn riêng (NV-VP-KHO-1A, 27/10/2026). Lớp riêng tiền tố kh1-, ⛔ mang lớp cũ .cay/.kho-phai. ═══ */
.kh1{display:grid;grid-template-columns:340px minmax(0,1fr);gap:16px;min-height:420px}
@media (max-width:1279px){.kh1{grid-template-columns:300px minmax(0,1fr);gap:14px}}
.kh1-trai,.kh1-phai{display:flex;flex-direction:column;min-height:0;min-width:0;background:#fff;border:1px solid var(--tg2-line);border-radius:6px;overflow:hidden;
  box-shadow:0 1px 2px rgba(var(--m-bong-rgb),.04);position:relative}
.kh1-trai:before,.kh1-phai:before{content:"";position:absolute;left:0;right:0;top:0;height:3px;background:linear-gradient(90deg,var(--tg2-pld),var(--tg2-pl2))}
/* cột trái: phần lọc đứng yên, cây cuộn */
.kh1-loc{flex:none;padding:14px 14px 10px;border-bottom:1px solid var(--tg2-line);display:flex;flex-direction:column;gap:9px;background:var(--m-panel)}
.kh1-tim{display:flex;align-items:center;gap:8px;border:1.5px solid var(--m-vien);border-radius:6px;background:#fff;padding:0 8px 0 11px;height:40px;color:var(--m-mu);box-sizing:border-box}
.kh1-tim:focus-within{border-color:var(--tg2-pl);box-shadow:0 0 0 3px var(--tg2-plt)}
.kh1-tim input{flex:1;min-width:0;border:0;outline:0;background:transparent;font-size:14px;color:var(--tg2-tx);height:100%}
.kh1-tim input::placeholder{color:var(--m-mu)}
.kh1-tim input::-webkit-search-cancel-button{display:none}
.kh1-xoa-tim{flex:none;border:0;background:var(--m-n94);color:var(--m-tx3);width:26px;height:26px;border-radius:6px;display:grid;place-items:center;cursor:pointer}
.kh1-nhom{display:flex;align-items:center;gap:8px;min-width:0}
.kh1-nhan{flex:none;font-size:12px;font-weight:600;color:var(--m-tx3);min-width:34px}
.kh1-loc .tg2-chips.kh1-chips{display:flex;flex-wrap:wrap;gap:5px;margin:0}
.kh1-loc .tg2-chip{padding:5px 9px;font-size:12.5px;border-radius:6px;min-height:30px}
.kh1-loc .tg2-chip .sl{font-size:12px}
.kh1-tuy{display:grid;grid-template-columns:1fr 1fr;gap:8px;align-items:end;padding:10px;border:1px solid var(--tg2-plb);background:var(--tg2-plt);border-radius:6px}
.kh1-tuy label{display:flex;flex-direction:column;gap:4px;font-size:12px;font-weight:600;color:var(--m-tx3);min-width:0}
.kh1-tuy input{height:36px;font-size:14px;min-width:0;width:100%;box-sizing:border-box}
.kh1-tuy input.sai{border-color:#b03d55;box-shadow:0 0 0 3px #fdf1f2}
.kh1-tuy .tg2-btn{grid-column:1/-1}
.kh1-loi{grid-column:1/-1;margin:0;font-size:12.5px;color:#9b3349;font-weight:600}
.kh1-loi:empty{display:none}
.kh1-cay{flex:1;min-height:0;overflow-y:auto;padding:8px 8px 14px;overscroll-behavior:contain}
.kh1-d{display:flex;align-items:stretch;border-radius:6px;margin:1px 0;position:relative}
.kh1-d:hover{background:var(--m-t97)}
.kh1-d.on{background:var(--tg2-plt);box-shadow:inset 3px 0 0 var(--tg2-pl)}
.kh1-mt{flex:none;width:28px;border:0;background:transparent;color:var(--m-tx3);cursor:pointer;display:grid;place-items:center;border-radius:6px;padding:0}
.kh1-mt svg{transition:transform .14s}
.kh1-mt.mo svg{transform:rotate(90deg)}
.kh1-mt:hover{background:var(--m-n93);color:var(--tg2-pld)}
.kh1-mt-trong{cursor:default}.kh1-mt-trong:hover{background:transparent}
.kh1-ten{flex:1;min-width:0;display:flex;align-items:center;gap:8px;border:0;background:transparent;text-align:left;cursor:pointer;padding:7px 8px 7px 2px;font-family:var(--tg2-phong);color:var(--tg2-tx);font-size:13.5px;min-height:38px;border-radius:6px}
.kh1-ic{flex:none;width:26px;height:26px;border-radius:6px;background:var(--m-n94);color:var(--m-pd);display:grid;place-items:center}
.kh1-d.on .kh1-ic{background:linear-gradient(135deg,var(--tg2-pl2),var(--tg2-pld));color:#fff}
.kh1-chu{flex:1;min-width:0;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-weight:500}
.kh1-chu small{font-size:12px;color:var(--m-mu);font-weight:600;margin-left:6px;white-space:nowrap}
.kh1-d.on .kh1-chu{font-weight:700;color:var(--tg2-pld)}
.kh1-so{flex:none;font-style:normal;font-size:12px;font-weight:700;color:var(--m-tx3);background:var(--m-n94);border-radius:999px;padding:2px 8px;min-width:22px;text-align:center;font-variant-numeric:tabular-nums}
.kh1-d.on .kh1-so{background:var(--tg2-pl);color:#fff}
.kh1-c1 .kh1-ten{font-size:13px}
.kh1-nhanh{margin-left:14px;padding-left:6px;border-left:1.5px solid var(--tg2-plb)}
.kh1-tat{margin-bottom:6px;border-bottom:1px solid var(--tg2-line2);padding-bottom:4px;border-radius:6px 6px 0 0}
.kh1-cay-trong{margin:10px 8px;padding:10px 12px;background:var(--m-zebra);border:1px solid var(--tg2-line);border-radius:6px;font-size:13px;color:var(--m-tx3)}
/* cột phải: số liệu + Đang xem đứng yên, bảng cuộn */
#kh1Kpi{flex:none;padding:14px 14px 0}
#kh1Kpi .tg2-kp.kh1-kpi{margin:0;grid-template-columns:repeat(var(--tg2-kn,3),minmax(0,1fr))}
.kh1-dang{flex:none;padding:10px 14px;border-bottom:1px solid var(--tg2-line);display:flex;flex-direction:column;gap:7px}
.kh1-dang-tm{display:flex;align-items:center;flex-wrap:wrap;gap:6px;font-size:14px;color:var(--tg2-tx)}
.kh1-dang-tm b{font-weight:700}
.kh1-sep{color:var(--m-mu)}
.kh1-tong{margin-left:auto;font-size:12.5px;font-weight:600;color:var(--m-tx3);background:var(--m-n94);border-radius:999px;padding:3px 10px;font-variant-numeric:tabular-nums}
.kh1-x{border:1px solid var(--m-vien);background:#fff;color:var(--m-tx3);width:24px;height:24px;border-radius:6px;display:grid;place-items:center;cursor:pointer;padding:0}
.kh1-x:hover,.kh1-the button:hover{border-color:#e3b5c0;color:#9b3349}
.kh1-dk{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.kh1-the{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:600;color:var(--m-pd);background:var(--tg2-plt);border:1px solid var(--tg2-plb);border-radius:999px;padding:3px 4px 3px 11px}
.kh1-the button{border:1px solid transparent;background:#fff;color:var(--m-pd);width:22px;height:22px;border-radius:999px;display:grid;place-items:center;cursor:pointer;padding:0}
.kh1-bo-het{border:0;background:transparent;color:var(--m-pl);font-weight:600;font-size:12.5px;cursor:pointer;text-decoration:underline;padding:3px 4px;font-family:var(--tg2-phong)}
.kh1-cuon{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;container-type:inline-size;container-name:kh1}
.kh1-cuon .xc-dau{padding:8px 14px 0}
.kh1-cuon > #kKq > .tg2-wt2,.kh1-cuon > #kKq > .tg2-trong{margin:12px 14px}
.kh1-bang{table-layout:auto}
.kh1-bang thead th{position:sticky;top:0;z-index:2;background:var(--m-zebra);box-shadow:inset 0 -1px 0 var(--tg2-line)}
.kh1-bang td{vertical-align:top}
.kh1-bang tbody tr{cursor:pointer}
.kh1-bang tbody tr:not(.kh1-tr-thang):hover td{background:var(--tg2-plt)}
.kh1-bang .kh1-o{width:34px;padding-right:0}
.kh1-tr-thang td{background:var(--m-n95)!important;font-size:12.5px;font-weight:700;color:var(--m-pd);padding:7px 12px;cursor:default}
.kh1-vb{min-width:200px}
.kh1-vb b{display:block;font-weight:600;color:var(--tg2-tx);line-height:1.35}
.kh1-vb small{display:block;font-size:12px;color:var(--m-mu);margin-top:3px;line-height:1.35}
.kh1-vb .tg2-bd{margin-top:5px}
.kh1-hep{display:none!important}
.kh1-ma{white-space:nowrap;font-size:12.5px;font-weight:600;color:var(--m-tx2);font-variant-numeric:tabular-nums}
.kh1-loai,.kh1-dv{font-size:12.5px;color:var(--m-tx2);min-width:90px;max-width:170px}
.kh1-ngay{white-space:nowrap;font-size:13px}
.kh1-ngay small{display:block;font-size:12px;color:#25787a;font-weight:600;margin-top:2px}
.kh1-tien{white-space:nowrap;font-weight:600;color:var(--m-tx);font-variant-numeric:tabular-nums}
.kh1-mo{font-size:12px;color:var(--m-mu)}
.kh1-tt{width:1%;white-space:nowrap}
.kh1-nut{display:inline-flex;gap:5px;flex-wrap:nowrap}
.kh1-nut .tg2-btn,.kh1-tv-nut .tg2-btn{padding:6px 9px}
.kh1-chi-dt{display:none}
@container kh1 (max-width:860px){
  .kh1-rong{display:none}
  .kh1-hep{display:block!important}
}
@container kh1 (max-width:620px){
  .kh1-nut .tg2-nhan{display:none}
  .kh1-vb{min-width:150px}
}
.kh1-trong{margin:16px 14px;padding:16px 18px;background:var(--tg2-plt);border:1px solid var(--tg2-plb);border-radius:6px;color:var(--m-tx2);display:flex;flex-direction:column;align-items:flex-start;gap:6px}
.kh1-trong svg{color:var(--m-pl)}
.kh1-trong p{margin:0;font-size:14px;line-height:1.5}
.kh1-trong-phu{font-size:13px!important;color:var(--m-tx3)}
.kh1-cuon .chan-khoi{padding:10px 14px}
.kh1-dt-xem,.kh1-dt-lui{display:none}
/* ── điện thoại: một cột, màn thư mục ⇄ màn danh sách ── */
@media (max-width:767px){
  .kh1{display:block;height:auto!important;min-height:0}
  .kh1-trai,.kh1-phai{border-radius:6px;overflow:visible}
  .kh1[data-dt="cay"] .kh1-phai{display:none}
  .kh1[data-dt="ds"] .kh1-trai{display:none}
  .kh1-cay,.kh1-cuon{overflow:visible;flex:none}
  .kh1-loc{padding:12px}
  .kh1-tim{height:44px}
  .kh1-tim input{font-size:16px}
  .kh1-loc .tg2-chip{min-height:36px;padding:6px 11px}
  .kh1-ten{min-height:46px}
  .kh1-mt{width:36px}
  .kh1-dt-xem{display:block!important;padding:0 12px 12px}   /* NV-VP-GD-RS-2: trong luồng trang, ngay dưới bộ lọc; ⛔ dính đáy (Safari che) */
  .kh1-dt-xem .tg2-btn{width:100%;min-height:46px}
  .kh1-dt-lui{display:block!important;padding:12px 12px 0}
  .kh1-dt-lui .tg2-btn{min-height:40px}
  #kh1Kpi{padding:12px 12px 0}
  #kh1Kpi .tg2-kp.kh1-kpi{grid-template-columns:repeat(2,minmax(0,1fr))}
  .kh1-dang{padding:10px 12px}
  .kh1-tong{margin-left:0}
  .kh1-ds-dt{padding:4px 12px 8px}
  .kh1-thang{margin:14px 2px 6px;font-size:13px;font-weight:700;color:var(--m-pd)}
  .kh1-the-vb{border:1.5px solid var(--tg2-line);border-radius:6px;padding:11px 12px;margin-bottom:9px;background:#fff;cursor:pointer}
  .kh1-the-vb:active{background:var(--tg2-plt)}
  .kh1-tv-dau{display:flex;gap:8px;align-items:flex-start}
  .kh1-tv-dau b{font-size:14px;font-weight:600;line-height:1.35;color:var(--tg2-tx)}
  .kh1-tv-phu{font-size:12.5px;color:var(--m-tx3);margin-top:5px;line-height:1.4}
  .kh1-tv-phu .kh1-ma{font-size:12.5px}
  .kh1-tv-nut{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap}
  .kh1-tv-nut .tg2-btn{min-height:40px;padding:8px 12px}
  .kh1-tv-nut .kh1-chi-dt{display:inline}
  .kh1-cuon .chan-khoi{padding:10px 12px}
}
