/* 문서함(web/library.js · app.js DocList — docs/LIBRARY_SPEC.md §4): 왼쪽 나무 | 오른쪽 목록 */
.libpage { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; max-width: 1240px; margin: 18px auto; padding: 0 16px; align-items: start; }
.libpage .doclist { max-width: none; margin: 0; }
.libside { position: sticky; top: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px 6px; box-shadow: var(--shadow); max-height: calc(100vh - 90px); overflow: auto; }
.libtree ul { list-style: none; margin: 0; padding: 0; }
.lt-sec + .lt-sec { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.lt-head { font-size: 11.5px; padding: 2px 8px 4px; }
.lt-row { display: flex; align-items: center; gap: 4px; padding: 4px 6px; border-radius: 6px; cursor: pointer; font-size: 13.5px; min-height: 28px; }
.lt-row:hover { background: #f1f4f8; }
.lt-row.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.lt-row.nav { color: var(--muted); }
.lt-root { font-weight: 600; }
.libtree .lt-drive { width: 100%; border: 0; box-shadow: none; background: transparent; text-align: left; font: inherit; font-weight: 600; }
.libtree .lt-drive:hover { background: #f1f4f8; }
.libtree .lt-drive.on { background: var(--accent-soft); color: var(--accent); }
.lt-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lt-count { font-size: 11.5px; font-weight: 400; }
.lt-ic { display: inline-flex; color: var(--muted); }
.lt-row.on .lt-ic { color: var(--accent); }
.lt-ic svg { width: 15px; height: 15px; }
.lt-tog { width: 18px; height: 18px; padding: 0; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.lt-tog.sp { display: inline-block; }
.lt-tog svg { width: 12px; height: 12px; }

.lib-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 2px 0 8px; }
.lib-crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 15px; }
.lib-crumbs a { color: var(--muted); text-decoration: none; }
.lib-crumbs a:hover { color: var(--accent); }
.lib-crumbs a.cur { color: var(--text); font-weight: 700; }
.lib-find { width: 180px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 13px; }
.lib-tools { gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.lib-tools .ic svg { width: 14px; height: 14px; }
.lib-note { font-size: 12px; cursor: help; }
.btnlike.disabled { opacity: .45; cursor: default; pointer-events: none; }
.btnlike.small { padding: 3px 9px; font-size: 12.5px; }

.libtable tr.folder:hover, .libtable tr.doc:hover { background: #f5f8fc; cursor: pointer; }
.libtable tr.doc.selected { background: var(--accent-soft); }
.libtable tr.doc:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.libtable .lib-fic { color: #c08a1e; margin-right: 6px; vertical-align: -2px; }
.libtable .lib-fic svg { width: 16px; height: 16px; }
.libtable .ic svg { width: 13px; height: 13px; vertical-align: -2px; }
.lib-acts { white-space: nowrap; text-align: right; width: 1%; }
.lib-acts button.icon { opacity: .55; }
tr:hover .lib-acts button.icon, .lib-acts button.icon:focus-visible { opacity: 1; }
.lib-badge { display: inline-flex; align-items: center; gap: 2px; margin-left: 6px; font-size: 11.5px; color: var(--muted); cursor: help; font-weight: 400; }

/* 이름·권한·옮기기 창 */
.libdlg .ld-body { display: flex; flex-direction: column; gap: 10px; }
.libdlg .ld-body > input { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.accessdlg .acc-mode { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.acc-table th, .acc-table td { padding: 5px 6px; text-align: center; }
.acc-table th:first-child, .acc-table td:first-child { text-align: left; }
.acc-table th { cursor: help; }
.acc-table.dim td { color: var(--muted); }
.acc-owner td { background: #f8f9fb; }
.acc-add select { padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 13px; }
.mv-list { list-style: none; margin: 0; padding: 4px; max-height: 50vh; overflow: auto; border: 1px solid var(--line-soft); border-radius: 8px; }
.mv-list li { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 6px; cursor: pointer; font-size: 13.5px; }
.mv-list li:hover { background: #f1f4f8; }
.mv-list li.on { background: var(--accent-soft); color: var(--accent); }
.mv-list li.here { cursor: default; color: var(--muted); }
.mv-list li.root { font-weight: 600; }

@media (max-width: 760px) {
  .libpage { grid-template-columns: minmax(0, 1fr); margin: 10px auto; }
  .libside { position: static; max-height: 40vh; }
  .lib-find { width: 100%; }
  .libtable th:nth-child(3), .libtable td:nth-child(3), .libtable th:nth-child(4), .libtable td:nth-child(4) { display: none; }
  .lib-acts button.icon { opacity: 1; }
}
