/* Optional hierarchical Browser view; other categories retain their existing layout */
#hubBrowserWorkspace{display:contents}
#hubBrowserWorkspace.tree-visible{display:grid;grid-template-columns:minmax(185px,260px) minmax(0,1fr);align-items:start;gap:12px}
#hubBrowserMain{min-width:0}
#hubBrowserWorkspace:not(.tree-visible) #hubBrowserTree{display:none}
#hubBrowserTree{position:sticky;top:14px;max-height:min(73vh,740px);overflow:auto;border:1px solid #dce5f0;background:#fff;border-radius:12px;padding:10px;box-shadow:0 1px 4px #1e3b5a12}
.hub-browser-tree-head{font-size:13px;font-weight:800;color:#274b75;margin:3px 5px 9px}
.hub-tree-list{display:grid;gap:2px}
.hub-tree-row{display:flex;align-items:center;gap:3px;min-height:30px;border-radius:7px}
.hub-tree-row:hover{background:#f1f7ff}
.hub-tree-row.hub-tree-drop{outline:2px dashed #317bc1;background:#e4f0ff}
.hub-tree-select,.hub-tree-expander{background:transparent;border:0;text-align:left;cursor:pointer;color:#345a82;font-size:11px;min-height:30px}
.hub-tree-select{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:3px;min-width:0}
.hub-tree-select.selected{font-weight:800;color:#133f77}
.hub-tree-expander{flex:0 0 19px;padding:0;text-align:center}
.hub-tree-expander-placeholder{flex:0 0 19px}
.hub-tree-tip{font-size:10px;color:#6c83a0;line-height:1.5;margin:12px 5px 4px}
.hub-browser-toggle{border:1px solid #cfdceb;background:#fff;border-radius:8px;padding:7px 10px;color:#2d527d;font-size:11px;font-weight:750;cursor:pointer;min-height:34px}
.hub-browser-toggle[aria-pressed="true"]{background:#e4f0ff;border-color:#6a9dc9}
.hub-browser-card-action{border:1px solid #d9e3f0;background:#f6faff;color:#315d8b;border-radius:8px;min-width:32px;min-height:32px;cursor:pointer;font-size:16px;padding:0 3px}
.hub-browser-card-action.is-pending{background:#fff2dc;color:#9a5819;border-color:#f5d09c}
#hubBrowserStatus{padding:9px 12px;margin:0 0 10px;border:1px solid #bdd9ef;border-radius:8px;background:#eef7ff;color:#335a7d;font-size:12px}
#hubBrowserStatus[hidden]{display:none}
#hubBrowserStatus.is-error{background:#fff5e8;border-color:#edcf9f;color:#8f5424}
#hubBrowserMoveDialog{border:1px solid #dbe4ef;border-radius:14px;padding:22px;max-width:min(95vw,480px);box-shadow:0 18px 50px #14315135}
#hubBrowserMoveDialog::backdrop{background:#0e223f88}
#hubBrowserMoveDialog form{display:grid;gap:12px}
#hubBrowserMoveDialog label{display:grid;gap:8px;font-weight:700}
#hubBrowserMoveDialog select{width:100%;padding:10px;border:1px solid #cedaeb;border-radius:8px}
#hubBrowserMoveDialog p{font-size:12px;color:#637b94}
.hub-browser-dialog-actions{display:flex;justify-content:flex-end;gap:10px}
.hub-browser-dialog-actions button{padding:9px 14px;border-radius:8px;border:1px solid #becfe3;background:#fff;cursor:pointer}
.hub-browser-dialog-actions button[type="submit"]{background:#1c3c68;color:#fff}
@media(max-width:780px){
 #hubBrowserWorkspace.tree-visible{grid-template-columns:minmax(0,1fr)}
 #hubBrowserTree{position:static;max-height:280px}
 .hub-browser-toggle{font-size:10px;padding:7px}
}

/* v1.14: tree discovery and first-open hierarchy */
.section-heading .hub-browser-toggle{margin-left:auto;display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;min-height:36px;padding:8px 13px;background:#edf5ff;color:#204974;border:1px solid #b7cee8;font-size:12px}
.section-heading .hub-browser-toggle[hidden]{display:none!important}
.section-heading .hub-browser-toggle[aria-expanded="true"]{background:#dcecff;border-color:#85acd5}
.hub-tree-empty{color:#657e97;font-size:12px;line-height:1.5;padding:8px}
@media(max-width:780px){
 #hubBrowserWorkspace.tree-visible{gap:9px}
 #hubBrowserTree{max-height:220px}
 .section-heading .hub-browser-toggle{font-size:11px;min-height:34px;padding:7px 9px}
}

/* Browser folder search and creation */
.hub-browser-tree-head{display:flex;align-items:center;justify-content:space-between;gap:7px}
.hub-browser-add-folder{background:#e7f2ff;border:1px solid #bed5ed;border-radius:8px;min-height:30px;padding:5px 8px;color:#204b7e;font-size:11px;font-weight:750;cursor:pointer}
#hubBrowserFolderSearch{width:100%;min-width:0;height:35px;background:#fff;border:1px solid #cddff0;border-radius:8px;font:inherit;font-size:12px;padding:7px 10px;margin-bottom:9px;outline-color:#4e8ed0}
.hub-browser-search-count{color:#607d9f;display:block;margin-bottom:6px;font-size:11px}
.hub-tree-sync-folder{border:0;background:transparent;color:#4172a1;font-size:13px;min-width:24px;height:27px;cursor:pointer}
.hub-browser-create-dialog{border:1px solid #cbdbe9;border-radius:14px;padding:20px;max-width:min(94vw,460px);box-shadow:0 14px 38px #14294433}
.hub-browser-create-dialog::backdrop{background:#091b365e}
.hub-browser-create-dialog form,.hub-browser-create-dialog label{display:grid;gap:10px}
.hub-browser-create-dialog input,.hub-browser-create-dialog select{width:100%;border:1px solid #b9cde3;border-radius:8px;min-height:39px;padding:8px}
.hub-browser-create-dialog p{font-size:12px;color:#677d97;line-height:1.45}
