/* "Bản vẽ" trong Wiki nhóm (20/10/2026): khung xem trong trang và trình vẽ toàn màn hình */
.wkd-view{display:block;margin:6px 0 14px;padding:0}
.wkd-view svg{display:block;width:100%;height:auto;border:1px solid var(--wk-line,#e5e9f0);border-radius:12px;background:#fff}
.wkd-empty{display:grid;border:1px solid var(--wk-line,#e5e9f0);border-radius:12px;place-items:center;min-height:180px;background:repeating-linear-gradient(0deg,transparent 0 39px,#eef2f7 39px 40px),repeating-linear-gradient(90deg,#fff 0 39px,#eef2f7 39px 40px)}
.wkd-empty p{margin:0;padding:8px 14px;border-radius:10px;background:#fff;color:#64748b;font-size:14px}
/* nút "Tạo mới ▾" và menu sổ xuống (Trang mới / Bản vẽ) */
.wk-tree-head.wkd-head{position:relative}
.wk-tree-head #wkNewPage.wkd-hidden{display:none}
.wk-tree-head #wkdNew{display:inline-flex;align-items:center;gap:4px;height:28px;margin:0 0 0 auto;padding:0 8px 0 9px;border:1px solid var(--wk-line);border-radius:8px;background:var(--wk-bg);font-size:12.5px;line-height:1;align-self:center;white-space:nowrap}
.wk-tree-head #wkdNew:hover:not(:disabled),.wk-tree-head #wkdNew[aria-expanded="true"]{border-color:var(--wk-accent);background:var(--wk-accent-soft)}
#wkdNew svg{width:14px;height:14px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#wkdNew svg:last-child{width:13px;height:13px;margin-left:1px;opacity:.75}
.wkd-menu{position:absolute;top:calc(100% + 2px);right:6px;z-index:40;display:grid;gap:2px;min-width:230px;padding:6px;border:1px solid var(--wk-line);border-radius:12px;background:var(--wk-bg);box-shadow:0 12px 32px rgba(15,23,42,.16);text-transform:none;letter-spacing:0;font-weight:400}
.wkd-menu button{display:flex;align-items:center;gap:10px;width:100%;padding:8px 10px;border:0;border-radius:8px;background:transparent;color:var(--wk-ink);font:inherit;text-align:left;cursor:pointer}
.wkd-menu button:hover,.wkd-menu button:focus-visible{background:var(--wk-soft);outline:0}
.wkd-mi{display:inline-grid;place-items:center;width:30px;height:30px;flex:none;border-radius:8px;background:var(--wk-soft);font-size:16px}
.wkd-menu b{display:block;font-size:13.5px;font-weight:600}
.wkd-menu small{display:block;margin-top:1px;color:var(--wk-muted);font-size:12px}

.wkd-editor{--d-bg:#fff;--d-side:#f1f5f9;--d-line:#e2e8f0;--d-ink:#0f172a;--d-muted:#64748b;--d-accent:#0068ff;--d-accent-soft:#e8f1ff;
  position:fixed;inset:0;z-index:1100;display:flex;flex-direction:column;background:var(--d-side);color:var(--d-ink);font-size:14px}
html[data-zsc-scheme="dark"] .wkd-editor{--d-bg:#0f172a;--d-side:#0b1220;--d-line:#263246;--d-ink:#e2e8f0;--d-muted:#94a3b8;--d-accent:#3b82f6;--d-accent-soft:#172a4a}
html.wkd-open .toast{z-index:1150}
.wkd-top{display:flex;align-items:center;gap:8px;padding:10px 14px;background:var(--d-bg);border-bottom:1px solid var(--d-line);flex:none}
.wkd-title{flex:0 1 420px;min-width:0;height:36px;padding:0 10px;border:1px solid var(--d-line);border-radius:9px;background:var(--d-bg);color:var(--d-ink);font-size:16px;font-weight:600}
.wkd-gap{flex:1}
.wkd-top button{height:36px;padding:0 14px;border-radius:9px;font-weight:600;white-space:nowrap}
.wkd-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:8px 14px;background:var(--d-bg);border-bottom:1px solid var(--d-line);flex:none}
.wkd-group{display:flex;align-items:center;gap:3px;padding:3px;border:1px solid var(--d-line);border-radius:11px;background:var(--d-bg)}
.wkd-bar button{display:inline-grid;place-items:center;min-width:34px;height:34px;padding:0 8px;border:0;border-radius:8px;background:transparent;color:var(--d-ink);font:inherit;font-size:13px;cursor:pointer}
.wkd-bar button:hover:not(:disabled){background:var(--d-side)}
.wkd-bar button:disabled{opacity:.38;cursor:default}
.wkd-bar button.on{background:var(--d-accent-soft);color:var(--d-accent);box-shadow:inset 0 0 0 1.5px var(--d-accent)}
.wkd-bar button.danger{color:#dc2626}
.wkd-bar svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.wkd-bar .wkd-color{min-width:26px;width:26px;height:26px;padding:0;border-radius:50%;background:var(--c);box-shadow:inset 0 0 0 1px rgba(15,23,42,.18)}
.wkd-bar .wkd-color.on{background:var(--c);box-shadow:0 0 0 2px var(--d-bg),0 0 0 4px var(--d-accent)}
.wkd-colors{gap:6px;padding:4px 8px}
.wkd-size i{display:block;width:20px;border-radius:9px;background:currentColor}
.wkd-stage{position:relative;flex:1;min-height:0;overflow:auto;padding:18px}
.wkd-paper{width:min(1600px,100%);margin:0 auto;border-radius:10px;box-shadow:0 1px 3px rgba(15,23,42,.12),0 8px 24px rgba(15,23,42,.08);overflow:hidden;background:#fff}
.wkd-svg{display:block;width:100%;height:auto;touch-action:none;user-select:none;-webkit-user-select:none}
.wkd-stage[data-tool="select"] .wkd-svg [data-i]{cursor:move}
.wkd-stage[data-tool="pen"] .wkd-svg,.wkd-stage[data-tool="line"] .wkd-svg,.wkd-stage[data-tool="arrow"] .wkd-svg,.wkd-stage[data-tool="rect"] .wkd-svg,.wkd-stage[data-tool="diamond"] .wkd-svg,.wkd-stage[data-tool="ellipse"] .wkd-svg{cursor:crosshair}
.wkd-stage[data-tool="text"] .wkd-svg{cursor:text}
.wkd-stage[data-tool="eraser"] .wkd-svg{cursor:cell}
.wkd-selbox{fill:none;stroke:#0068ff;stroke-width:1.5;stroke-dasharray:6 4;pointer-events:none}
.wkd-handle{fill:#fff;stroke:#0068ff;stroke-width:2;cursor:nwse-resize}
.wkd-textbox{position:absolute;z-index:2;min-width:120px;margin:0;padding:0 2px;border:1.5px dashed #0068ff;border-radius:4px;background:rgba(255,255,255,.92);font-family:Inter,"Segoe UI",Arial,sans-serif;line-height:1.25;resize:none;overflow:hidden;outline:0}
.wkd-hint{margin:0;padding:6px 14px;background:var(--d-bg);border-top:1px solid var(--d-line);color:var(--d-muted);font-size:12.5px;flex:none}
@media (max-width:760px){
  .wkd-top{flex-wrap:wrap;padding:8px 10px}.wkd-title{flex:1 1 100%;order:-1}.wkd-gap{display:none}.wkd-top button{flex:1;padding:0 8px}
  .wkd-bar{gap:6px;padding:6px 8px;overflow-x:auto;flex-wrap:nowrap}.wkd-group{flex:none}
  .wkd-stage{padding:8px}.wkd-hint{display:none}
}
@media print{.wkd-view{border:0}}
/* "Thư mục": khung đầu trang thư mục và hộp sửa tên / mô tả */
.wkd-folder{display:flex;align-items:flex-start;gap:14px;margin:6px 0 10px;padding:14px 16px;border:1px solid #fde68a;border-radius:12px;background:#fffbeb;color:var(--wk-ink,#0f172a)}
.wkd-folder-ico{display:inline-grid;place-items:center;width:40px;height:40px;flex:none;border-radius:10px;background:#fef3c7;color:#d97706}
.wkd-folder-ico svg{width:24px;height:24px;fill:#fde68a;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round}
.wkd-folder b{display:block;font-size:14px}
.wkd-folder p{margin:3px 0 0;color:var(--wk-muted,#64748b);font-size:13.5px;white-space:pre-line}
html[data-zsc-scheme="dark"] .wkd-folder{background:#2a2111;border-color:#713f12}
html[data-zsc-scheme="dark"] .wkd-folder-ico{background:#3b2a10}
.wkd-ask{position:fixed;inset:0;z-index:1100;display:grid;place-items:center;padding:16px;background:rgba(15,23,42,.42)}
.wkd-ask-card{width:min(440px,100%);display:grid;gap:12px;padding:18px;border-radius:14px;background:#fff;color:#0f172a;box-shadow:0 20px 50px rgba(15,23,42,.25)}
html[data-zsc-scheme="dark"] .wkd-ask-card{background:#0f172a;color:#e2e8f0}
.wkd-ask-card h3{margin:0;font-size:17px}
.wkd-ask-card label{display:grid;gap:5px;font-size:13px;font-weight:600}
.wkd-ask-card input,.wkd-ask-card textarea{width:100%;box-sizing:border-box;padding:8px 10px;border:1px solid #cbd5e1;border-radius:9px;background:transparent;color:inherit;font:inherit;font-weight:400}
.wkd-ask-row{display:flex;justify-content:flex-end;gap:8px}
.wkd-ask-row button{height:36px;padding:0 16px;border-radius:9px;font-weight:600}
