:root {
  --accent: #2f6fb0;
  --accent-hover: #285f97;
  --accent-soft: #e9f1f9;
  --header-blue: #dce7f2;
  --header-ink: #1c3a57;
  --chrome: #eaebed;
  --chrome-ink: #111111;
  --text: #1f2733;
  --text-soft: #4a5563;
  --muted: #8a94a3;
  --app-bg: #eef1f5;
  --border-2: #d5dae1;
  --field-border: #c8cdd6;
  --bar-h: 30px;
  --thaotac-h: 30px;
  --toolbar-h: 58px;
  --trangthai-h: 40px;
  --hang-tieu-de: 24px;
  --sheetbar-h: 35px;
  --side-w: 210px;
  --nep-w: 10px;
  --field-h: 26px;
  --rad: 0;
  --hover: rgba(0, 0, 0, .06);
  --fs-menu: 14.5px;
  --xanh-la: #15803d;
  --nhan: #b45309;
  --chu-mo: #9ca3af;
  --vien-nhat: #d0d4da;
  --tham-chieu-0: #4472c4; --tham-chieu-1: #ed7d31; --tham-chieu-2: #70ad47; --tham-chieu-3: #a569bd; --tham-chieu-4: #ffc000; --tham-chieu-5: #00b0f0; --tham-chieu-6: #c00000; --tham-chieu-7: #26a69a;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 13px/1.45 -apple-system, "Segoe UI", Roboto, system-ui, sans-serif; color: var(--text); background: var(--app-bg); -webkit-font-smoothing: antialiased; }
button { cursor: pointer; }
button:disabled { cursor: default; }
input:focus, textarea:focus, select:focus, button:focus, :focus-visible { outline: none; }

#app { height: 100vh; display: flex; flex-direction: column; }
#app > * { flex-shrink: 0; }
#body { flex: 1; min-height: 0; display: grid; grid-template-columns: var(--side-w) 1fr var(--nep-w); grid-template-rows: 1fr auto; }
.an-sidebar #sidebar { display: none; }
.an-sidebar #body { grid-template-columns: 0 1fr var(--nep-w); }

#formulabar, #toolbar, #trang-thai, #sheetbar { display: flex; align-items: center; }
#formulabar, #toolbar, #sheetbar { background: var(--chrome); }
#formulabar, #toolbar, #trang-thai { border-bottom: 1px solid var(--border-2); }
#formulabar { height: var(--bar-h); gap: 1px; padding: 0 6px; }
.menuitem { padding: 4px 10px; border-radius: var(--rad); color: #000; font-size: var(--fs-menu); user-select: none; white-space: nowrap; background: none; border: none; font-family: inherit; }
.menuitem:hover { background: var(--accent-soft); color: var(--accent); }
.tb-lat input, .tb-so, .bd-chon { font: inherit; padding: 2px 4px; border: 1px solid var(--border-2); border-radius: var(--rad); background: #fff; }
.tb-lat { position: relative; flex-shrink: 0; }
#formulabar .tb-lat[hidden] { display: none; }
.tb-lat .ic, .tb-so { cursor: pointer; }
.mb-lich { position: absolute; top: 0; right: 0; height: 100%; width: 320px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
.mb-phai { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.mb-nhom { display: flex; align-items: center; gap: 2px; margin-left: 8px; }
.mb-menu { display: flex; flex-direction: column; min-width: 130px; max-height: 60vh; overflow-y: auto; padding: 4px; background: #fff; border: 1px solid var(--border-2); border-radius: 0 0 var(--rad) var(--rad); box-shadow: 0 6px 20px rgba(0, 0, 0, .15); }
.mb-mi { text-align: left; padding: 5px 10px; border: none; background: none; border-radius: var(--rad); font-size: var(--fs-menu); font-family: inherit; white-space: nowrap; color: #000; }
.mb-mi:hover:not(:disabled) { background: var(--accent-soft); color: var(--accent); }
.mb-mi:disabled { color: var(--chu-mo); cursor: default; }
#toolbar { flex-direction: column; align-items: stretch; gap: 0; padding: 0 4px; color: var(--chrome-ink); height: calc(var(--thaotac-h) + var(--toolbar-h)); }
.rb-dai { display: flex; align-items: stretch; flex: 1; min-height: 0; overflow-x: auto; border-top: 1px solid var(--border-2); padding-top: 4px; }
.rb-nhom { display: flex; flex-direction: column; align-items: center; padding: 0 8px; border-right: 1px solid var(--border-2); flex-shrink: 0; }
.rb-nhom:last-child { border-right: 0; }
.rb-than { display: flex; align-items: center; gap: 2px; flex: 1; }
.rb-thao-tac { display: flex; align-items: center; gap: 8px; padding: 0 9px; flex-wrap: wrap; min-height: var(--thaotac-h); }
.rb-ten { font-size: 11px; color: var(--text-soft); line-height: 14px; white-space: nowrap; }
#toolbar .rb-nut { padding: 4px 6px; }
#toolbar .btn.active { background: var(--accent-soft); color: var(--accent); }
#toolbar .btn:disabled { opacity: .35; cursor: default; background: transparent; }
.rb-chon, .rb-so { font: inherit; font-size: 13px; height: 26px; padding: 0 4px; border: 1px solid var(--border-2); border-radius: var(--rad); background: #fff; color: var(--text); }
.rb-chon { max-width: 120px; margin: 0 2px; }
.rb-so { width: 56px; margin: 0 2px; }
.rb-o-so { display: inline-flex; align-items: center; gap: 1px; color: var(--text-soft); }
.o-mau { display: inline-block; width: 18px; height: 18px; padding: 0; border: 1px solid var(--vien-nhat); background: var(--mau); cursor: pointer; }
.o-mau.active { outline: 2px solid var(--text); outline-offset: 1px; }
.rb-nut-mau { gap: 2px; }
.rb-vach-mau { display: inline-block; width: 16px; height: 4px; margin-left: -18px; margin-top: 16px; background: var(--mau); border: 1px solid var(--vien-nhat); }
#toolbar .rb-to-icon .ic { color: var(--mau); stroke-width: 2.6; }
.rb-chu-a { font-family: serif; font-size: 15px; }
.rb-chu-cai { min-width: 26px; justify-content: center; font-family: serif; font-size: 15px; }
.rb-dam { font-weight: 800; }
.rb-nghieng { font-style: italic; }
.rb-gach { text-decoration: underline; }
.rb-ngan { width: 1px; align-self: stretch; margin: 2px 4px; background: var(--border-2); }
.zl-bang-mau { padding: 8px; }
.bang-mau-luoi { display: grid; grid-template-columns: repeat(10, 18px); gap: 3px; }
.bang-mau-ten { font-size: 12px; color: var(--text-soft); margin: 8px 0 4px; }
.bang-mau-mac-dinh { width: 100%; }
.btn { border: 1px solid var(--border-2); background: #fff; padding: 6px 12px; border-radius: var(--rad); color: var(--text); font-size: 13px; font-weight: 500; }
.btn:disabled { opacity: .5; }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
#toolbar .btn, #formulabar .btn { background: transparent; border-color: transparent; color: var(--chrome-ink); font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
#toolbar .btn:hover, #formulabar .btn:hover { background: var(--hover); }
#formulabar .btn { padding: 0 6px; }
#trang-thai { height: var(--trangthai-h); background: #eef0f3; font-size: 12.5px; }
.fb-ref, .fb-val, .fb-search { display: inline-flex; align-items: center; height: var(--field-h); background: #fff; border: 1px solid var(--field-border); border-radius: var(--rad); color: var(--text); }
.fb-val, .fb-search { font: inherit; }
.fb-val::placeholder, .fb-search::placeholder { color: var(--muted); }
.fb-val:focus, .fb-search:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.fb-val-ct { border-color: var(--accent); background: #fffbe6; }
.fb-namezone { display: flex; align-items: center; width: var(--side-w); flex-shrink: 0; padding-left: 8px; }
.fb-ref { gap: 4px; width: 110px; flex-shrink: 0; padding: 0 8px; font-weight: 600; }
.fb-ref-txt { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-eq { color: var(--muted); font-weight: 700; margin: 0 10px; }
.fb-val { flex: 1; padding: 0 10px; }
.fb-search { flex-shrink: 0; width: 210px; margin: 0 8px; padding: 0 10px; font-size: 13px; }
.tt-chon { margin-left: auto; padding-right: 10px; color: var(--xanh-la); font-weight: 600; white-space: nowrap; }
.tt-chon-an { color: var(--nhan); }
.tt-loi { padding-right: 10px; color: #b91c1c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
#sidebar { grid-area: 1 / 1 / 3 / 2; background: var(--chrome); border-right: 1px solid var(--border-2); padding: 14px 10px; overflow-y: auto; scrollbar-width: none; }
#sidebar::-webkit-scrollbar { display: none; }
.nav { background: transparent; color: var(--chrome-ink); border: 0; padding: 8px 12px; text-align: left; font-size: var(--fs-menu); font-weight: 500; border-radius: var(--rad); }
.nav:hover { background: var(--hover); }
.nav.active { background: var(--accent); color: #fff; font-weight: 600; }
.menuitem.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
#sheet { grid-area: 1 / 2; position: relative; background: #fff; overflow: hidden; min-width: 0; min-height: 0; }
.zl-logo { position: absolute; top: calc(var(--hang-tieu-de) * var(--logo-tren)); left: var(--logo-le); z-index: 10; height: calc(var(--hang-tieu-de) * var(--logo-so-hang)); pointer-events: none; }
.zl-logo.zl-logo-phai { left: calc(var(--rong-bang) - var(--logo-le-phai) - var(--hang-tieu-de) * var(--logo-so-hang) * var(--ti-le-logo, 0)); }
#sheetbar { grid-area: 2 / 2; gap: 2px; padding: 3px 8px 4px; overflow-x: auto; min-height: var(--sheetbar-h); border-top: 1px solid var(--border-2); }
.sheettab { --mau: calc(var(--i) * 47deg); flex-shrink: 0; border: 1px solid var(--border-2); border-top: none; border-bottom: 3px solid hsl(var(--mau) 55% 50%); background: hsl(var(--mau) 70% 92%); color: var(--text-soft); padding: 4px 16px; border-radius: 0 0 var(--rad) var(--rad); font-size: 13px; white-space: nowrap; }
.sheettab-tha { box-shadow: inset 3px 0 0 var(--header-ink); }
.sheettab-tha-sau { box-shadow: inset -3px 0 0 var(--header-ink); }
.sheettab:hover { background: hsl(var(--mau) 70% 87%); }
.sheettab.active { background: #fff; color: hsl(var(--mau) 55% 38%); font-weight: 600; }
#vien-phai { grid-area: 1 / 3 / 3 / 4; background: var(--chrome); border-left: 1px solid var(--border-2); }
@media (max-width: 768px) { #body { grid-template-columns: var(--side-w) 1fr; } #vien-phai { display: none; } }
.cua-ban-do :is(#formulabar, #toolbar, #trang-thai, #sidebar, #sheetbar, #vien-phai) { display: none; }
.cua-ban-do #body { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.cua-ban-do #sheet { grid-area: 1 / 1; }
revo-grid {
  --le-logo: calc((var(--logo-le) + var(--hang-tieu-de) * var(--logo-so-hang) * var(--ti-le-logo, 0)) * var(--co-logo));
  --revo-grid-background: #fff;
  --revo-grid-header-bg: var(--header-blue);
  --revo-grid-header-color: var(--header-ink);
  --revo-grid-header-border: #b7c8da;
  --revo-grid-cell-border: transparent;
  --revo-grid-cell-disabled-bg: transparent;
  --revo-grid-focused-bg: var(--accent-soft);
  --revo-grid-row-hover: #f6f8fb;
  --revo-grid-header-height: 34px;
  background: #fff;
}
#sheet > revo-grid { height: 100%; }
#app revo-grid[theme=compact] { font-size: inherit; font-family: var(--phong-luoi); }
revo-grid[theme=compact] revogr-header .header-rgRow { box-shadow: none; }
revo-grid[theme=compact] revogr-header .actual-rgRow .rgHeaderCell { border-bottom: 1px solid #d9dfe8; font-size: var(--co-ten-cot); text-align: center; }
revo-grid[theme=compact] revogr-header .group-rgRow .header-rgRow { height: var(--hang-tieu-de); line-height: var(--hang-tieu-de); }
revo-grid[theme=compact] revogr-header .rgHeaderCell { background: var(--revo-grid-header-bg); color: var(--revo-grid-header-color); border-right: 1px solid rgba(28, 58, 87, .18); }
revo-grid[theme=compact] revogr-header .rgHeaderCell.focused-cell { background: var(--accent-soft); }
revogr-focus.focused-cell { box-shadow: none !important; }
revogr-edit { box-shadow: none; }
revogr-edit input { box-sizing: border-box; width: 100%; height: 100%; padding: 0 7px; border: 1px solid #2563eb; outline: none; font: inherit; background: #fff; }
revo-grid[theme=compact] revogr-data .rgCell { line-height: var(--rowh); }
.grid-vlines .rgCell { border-right: 1px solid var(--ke-luoi); }
.grid-rowlines .rgCell { border-bottom: 1px solid var(--ke-luoi); }
.grid-rowlines .zl-trong-chuyen .rgCell { border-bottom-color: transparent; }
.zl-vien .rgCell { font-weight: 700; }
revo-grid[theme=compact] revogr-header .group-rgRow .rgHeaderCell { background: var(--revo-grid-background); color: var(--text); border: 0; text-align: center; }
revo-grid .group-rgRow .rgHeaderCell .header-content { text-align: inherit; font-weight: 700; padding: 0 8px; }
.grid-vlines .rgCell.zl-gop-giua { border-right-color: transparent; }
.rgCell.zl-gop-phai, .rgCell.zl-gop-tam { display: flex; overflow: visible; white-space: nowrap; }
.rgCell.zl-gop-phai { justify-content: flex-end; }
.rgCell.zl-gop-tam { justify-content: center; }
.zl-chu-ky .rgCell { border-color: transparent !important; font-weight: 700; }
.zl-autoedit { display: block; width: 100%; height: 100%; }
.zl-dateedit { display: flex; width: 100%; height: 100%; }
.zl-dateedit input[type='text'] { flex: 1; min-width: 0; border-right: 0; }
.zl-dateedit .zl-datepick { width: 22px; padding: 0 2px; border-left: 0; cursor: pointer; }
.zl-dateedit .zl-datepick::-webkit-datetime-edit { display: none; }
.zl-pop { position: fixed; background: #fff; border: 1px solid #cbd5e1; box-shadow: 0 6px 20px rgba(0, 0, 0, .18); z-index: 99999; }
.zl-notice-backdrop { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(15, 23, 42, .32); z-index: 100000; }
.zl-notice-backdrop.zl-notice-info { background: transparent; pointer-events: none; }
.zl-notice { pointer-events: auto; min-width: 300px; max-width: min(520px, calc(100vw - 32px)); padding: 18px 20px 14px; background: #fff; border-top: 4px solid var(--header-ink); border-radius: 10px; box-shadow: 0 14px 44px rgba(0, 0, 0, .28); font-size: 14px; color: #111; }
.zl-bao { white-space: pre-wrap; line-height: 1.5; }
.zl-notice input { width: 100%; box-sizing: border-box; margin-top: 12px; padding: 6px 8px; border: 1px solid var(--field-border); border-radius: 4px; font: inherit; }
.zl-notice-buttons { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.zl-fh { display: block; width: 100%; min-height: 1.2em; cursor: pointer; user-select: none; }
.zl-fh-key { color: var(--chu-mo); font-style: italic; font-weight: 400; }
.zl-fh.on { color: var(--nhan); font-weight: 700; }
.zl-fpop { width: 232px; border-radius: 6px; overflow: hidden; font-size: 13px; }
.zl-fpop .fp-body { padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.zl-fpop .fp-body > input { padding: 3px 6px; border: 1px solid var(--field-border); border-radius: 4px; font: inherit; }
.zl-fpop .fp-list { max-height: 200px; overflow-y: auto; border: 1px solid #eef2f7; border-radius: 4px; }
.zl-fpop .fp-btns { display: flex; gap: 6px; }
.zl-fpop .fp-btns .btn { flex: 1; padding: 3px 0; }
.zl-autopop { max-height: 340px; overflow-y: auto; }
.zl-pop-item { display: flex; align-items: center; gap: 8px; padding: 6px 9px; cursor: pointer; white-space: nowrap; color: #111; }
.zl-pop-item:hover { background: #f2f5f9; }
.zl-pop-item.on { background: var(--accent-soft); color: var(--accent); }
.zl-ref-sang, revogr-data .rgCell.zl-ref-sang { outline: 2px dashed var(--accent); outline-offset: -2px; }
.zl-ants .selection-border-range::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 5;
  background-image:
    repeating-linear-gradient(90deg, #15803d 0 6px, transparent 6px 12px),
    repeating-linear-gradient(90deg, #15803d 0 6px, transparent 6px 12px),
    repeating-linear-gradient(0deg, #15803d 0 6px, transparent 6px 12px),
    repeating-linear-gradient(0deg, #15803d 0 6px, transparent 6px 12px);
  background-size: 100% 2px, 100% 2px, 2px 100%, 2px 100%;
  background-position: 0 0, 0 100%, 0 0, 100% 0;
  background-repeat: no-repeat;
  animation: zl-ants .6s linear infinite;
}
@keyframes zl-ants { to { background-position: 12px 0, -12px 100%, 0 -12px, 100% 12px; } }
.zl-hit { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.zl-chon input { accent-color: var(--xanh-la); }
.zl-nut-dau { color: var(--accent); font-size: 15px; font-weight: 700; }
.zl-nut-dau:hover { color: var(--accent-hover); }
.bd { --bd-diem: #1d4ed8; --bd-xe-chay: #15803d; --bd-xe-dung: #d97706; --bd-vien: #fff; position: relative; width: 100%; height: 100%; overflow: hidden; background: #e8e6e1; cursor: grab; user-select: none; touch-action: none; }
.bd-keo { cursor: grabbing; }
.bd-the, .bd-dau, .bd-lop-tile { position: absolute; top: 0; left: 0; }
.bd-the { will-change: transform; }
.bd-zoom .bd-the { transition: transform 160ms ease-out; }
.bd-dau { --nguoc: 1; }
.bd-zoom .bd-diem, .bd-zoom .bd-xe { transition: scale 160ms ease-out; }
.bd-lop-tile { transform-origin: 0 0; }
.bd-o { position: absolute; top: 0; left: 0; width: 256px; height: 256px; pointer-events: none; opacity: 0; transition: opacity 180ms ease-out; }
.bd-o img { position: absolute; top: 0; left: 0; width: 256px; height: 256px; }
.bd-o-xong { opacity: 1; }
.bd-diem, .bd-xe { position: absolute; top: 0; left: 0; pointer-events: none; box-sizing: border-box; scale: var(--nguoc); }
.bd-diem { width: 0; height: 0; }
.bd-diem::before { content: ''; position: absolute; left: -9px; top: -22px; width: 18px; height: 18px; box-sizing: border-box; border: 2px solid var(--bd-vien); border-radius: 50% 50% 50% 0; background: var(--bd-diem); rotate: -45deg; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.bd-diem::after { content: ''; position: absolute; left: -3px; top: -16px; width: 6px; height: 6px; border-radius: 50%; background: var(--bd-vien); }
.bd-xe { width: 16px; height: 12px; margin: -6px 0 0 -8px; border: 1px solid var(--bd-vien); background: var(--bd-xe-chay); }
.bd-xe-dung { background: var(--bd-xe-dung); }
.bd-nhan { position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 11px; line-height: 15px; padding: 0 4px; color: #fff; background: inherit; }
.bd-diem .bd-nhan { top: 3px; background: var(--bd-diem); }
.bd-xe .bd-nhan { bottom: 13px; }
.bd-tool { position: absolute; top: 8px; left: 8px; display: flex; gap: 6px; padding: 4px 6px; background: rgba(255, 255, 255, .92); border: 1px solid var(--border-2); border-radius: var(--rad); }
.bd-chon { max-width: 260px; }
.bd-lop-vung { position: absolute; top: 0; left: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
.bd-vung { fill: rgba(29, 78, 216, .12); stroke: var(--bd-diem); stroke-width: 2; vector-effect: non-scaling-stroke; pointer-events: visiblePainted; cursor: pointer; }
.bd-vung-sua { fill: rgba(217, 119, 6, .18); stroke: var(--bd-xe-dung); }
.bd-dinh { position: absolute; top: 0; left: 0; width: 12px; height: 12px; margin: -6px 0 0 -6px; box-sizing: border-box; border-radius: 50%; border: 2px solid var(--bd-xe-dung); background: #fff; scale: var(--nguoc); cursor: move; }
.bd-dinh-giua { width: 8px; height: 8px; margin: -4px 0 0 -4px; opacity: .8; cursor: copy; }
.bd-tin { position: absolute; right: 6px; bottom: 4px; padding: 1px 6px; font-size: 11px; color: #444; background: rgba(255, 255, 255, .8); }

.auth-chip { display: inline-flex; gap: 8px; align-items: center; }

.zl-thuoc { padding: 8px 10px; display: grid; gap: 4px; min-width: 320px; max-height: 80vh; overflow: auto; }
.zl-thuoc-hd { float: right; font-weight: normal; font-size: 12px; color: var(--accent); }
.zl-thuoc-dau { font-weight: 600; margin-bottom: 4px; }
.zl-thuoc-hang { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 6px; font-size: 13px; }
.zl-thuoc-hang input[type=text], .zl-thuoc-hang input[type=number], .zl-thuoc-hang select, .zl-thuoc-hang textarea { width: 100%; font: inherit; padding: 2px 4px; }
.zl-thuoc-nut { display: flex; gap: 6px; justify-content: flex-end; margin-top: 6px; }
.zl-thuoc-nut-hang { grid-template-columns: 110px 20px 1fr; }
.zl-quyen { border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.zl-quyen th, .zl-quyen td { padding: 2px 6px; text-align: left; vertical-align: middle; }
.zl-quyen th { border-bottom: 1px solid var(--vien-nhat); }
.zl-quyen-vung td { font-weight: 600; padding-top: 8px; }
.zl-quyen select { font: inherit; }
.zl-thuoc-ghi { font-size: 12px; color: var(--mo); margin-top: 4px; }
.zl-tin textarea { width: 440px; height: 260px; font: inherit; white-space: pre; resize: vertical; }

.cay { display: flex; flex-direction: column; margin-bottom: 10px; padding: 0 6px; user-select: none; font-size: var(--fs-menu); --sau: 0; --thut: 16px; }
.cay-nhanh, .cay-goc { display: flex; flex-direction: column; gap: 2px; }
.cay-thu-muc > summary, .cay-file { position: relative; list-style: none; display: flex; align-items: center; gap: 9px; height: 36px; padding: 0 30px 0 calc(10px + var(--sau) * var(--thut)); border: 0; border-radius: 8px; background: transparent; color: var(--chrome-ink); font: inherit; font-weight: 400; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.cay-chu { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cay-thu-muc > summary::before, .cay-file::before { content: ''; flex: none; width: 18px; height: 18px; background: currentColor; -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/></svg>") center / contain no-repeat; mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/></svg>") center / contain no-repeat; }
.cay-file::before { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='16' rx='2'/><path d='M3 10h18M9 4v16'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='16' rx='2'/><path d='M3 10h18M9 4v16'/></svg>"); }
.cay-rac > summary::before { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M4 7h16M10 11v6M14 11v6M6 7l1 13h10l1-13M9 7V4h6v3'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M4 7h16M10 11v6M14 11v6M6 7l1 13h10l1-13M9 7V4h6v3'/></svg>"); }
.cay-thu-muc:not(.cay-la) > summary::after { content: ''; position: absolute; right: 10px; width: 16px; height: 16px; background: currentColor; -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>") center / contain no-repeat; mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>") center / contain no-repeat; transform: rotate(-90deg); transition: transform .15s; }
.cay-thu-muc[open]:not(.cay-la) > summary::after { transform: none; }
.cay-dong > summary { background: var(--accent-soft); }
.cay-dong > summary::after { display: none; }
.cay-thu-muc > summary:hover, .cay-file:hover { background: var(--hover); }
.cay-tha { background: var(--hover); box-shadow: inset 0 0 0 2px var(--header-ink); border-radius: 4px; }
.cay-drop-gap { height: var(--gap-h); margin-left: calc(var(--sau) * var(--thut)); border: 1px dashed var(--header-ink); border-radius: 8px; background: var(--hover); box-sizing: border-box; animation: cay-gap-mo .14s ease-out; }
@keyframes cay-gap-mo { from { height: 0; opacity: 0; } }
.cay-file.active, .cay-thu-muc > summary.active { background: var(--accent); color: #fff; }
.cay-rac { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border-2); }
.cay-khoa { color: var(--nhan); margin-left: 4px; }
.cay-mo-khoa { color: var(--xanh-la); }
.zl-dang-khoa { padding: 48px 24px; text-align: center; color: var(--text-soft); font-size: 15px; }

.zl-dk-panel { position: fixed; top: calc(var(--bar-h) + var(--thaotac-h) + var(--toolbar-h) + var(--trangthai-h)); right: var(--nep-w); bottom: var(--sheetbar-h); width: 340px; display: flex; flex-direction: column; gap: 8px; padding: 12px 16px; background: #fff; border-left: 1px solid var(--border-2); box-shadow: -4px 0 16px rgba(0, 0, 0, .08); z-index: 50; overflow-y: auto; font-size: 13px; }
.zl-dk-dau { display: flex; align-items: center; justify-content: space-between; font-size: 16px; font-weight: 600; }
.zl-dk-dau .btn-chu { font-size: 20px; }
.zl-dk-nhan { font-weight: 600; margin-top: 8px; }
.zl-dk-phu { font-size: 12px; color: var(--text-soft); }
.zl-dk-panel select, .zl-dk-panel input[type=text] { width: 100%; font: inherit; padding: 6px 8px; border: 1px solid var(--field-border); border-radius: var(--rad); background: #fff; }
.zl-tick { display: inline-flex; align-items: center; gap: 4px; }
.zl-dk-xem { padding: 8px 10px; border: 1px solid var(--border-2); border-bottom: 0; }
.zl-dk-kieu { display: flex; align-items: center; gap: 2px; padding: 4px; border: 1px solid var(--border-2); }
.zl-dk-kieu .btn { background: transparent; border-color: transparent; padding: 4px 6px; display: inline-flex; align-items: center; gap: 6px; }
.zl-dk-kieu .btn:hover { background: var(--hover); }
.zl-dk-kieu .btn.active { background: var(--accent-soft); color: var(--accent); }
.zl-dk-nut { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.zl-dk-ds { border-top: 1px solid var(--border-2); margin-top: 8px; padding-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.zl-dk-muc { display: flex; align-items: center; gap: 6px; }
.zl-dk-muc .btn { flex: 1; text-align: left; font-weight: 400; }
.zl-goi-y { position: fixed; z-index: 1000; max-width: min(480px, calc(100vw - 16px)); padding: 5px 9px; border: 1px solid var(--accent); border-radius: 6px; background: #eef4ff; color: #16324a; font-size: 13px; line-height: 1.35; white-space: pre-wrap; word-break: break-word; box-shadow: 0 4px 14px rgba(22, 67, 126, .18); pointer-events: none; }
