/* ==========================================================================
   Document manager — mirrors reference 3 (left tree | centre | storage)
   ========================================================================== */
.fm-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr) 300px; gap: var(--gutter); align-items: stretch; }
.fm-left .card-body { display: flex; flex-direction: column; height: 100%; }
.fm-tree { list-style: none; margin: 16px 0 0; padding: 0; }
.fm-tree li { margin: 0; }
.fm-tree .ft-link { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 4px; border: 0; background: none; color: var(--text-2); font-size: 13px; text-align: left; border-radius: var(--radius-sm); }
.fm-tree .ft-link:hover { color: var(--primary); }
.fm-tree .ft-link.active { color: var(--primary); font-weight: 500; }
.fm-tree .ft-link .ft-ic { color: var(--warning); flex: none; }
.fm-tree .ft-link .ft-ic.blue { color: var(--primary); } .fm-tree .ft-link .ft-ic.red { color: var(--danger); } .fm-tree .ft-link .ft-ic.green { color: var(--success); } .fm-tree .ft-link .ft-ic.info { color: var(--info); }
.fm-tree .ft-link .ft-count { margin-left: auto; font-size: 11px; color: var(--text-light); }
.fm-tree .ft-link .chev { margin-left: auto; color: var(--text-light); transition: transform var(--t-fast); }
.fm-tree .ft-link.expanded .chev { transform: rotate(180deg); }
.fm-tree ul { list-style: none; margin: 0 0 4px; padding: 0 0 0 30px; }
.fm-tree ul .ft-link { padding: 4px 4px; font-size: 12.5px; color: var(--text-muted); }
.fm-tree ul .ft-link.active { color: var(--primary); }
.fm-upgrade { margin-top: auto; padding: 16px; border-radius: var(--radius); background: rgba(52, 195, 143, .12); position: relative; }
.fm-upgrade h6 { color: #1f9a6d; font-size: 14px; margin: 10px 0 6px; }
.fm-upgrade p { font-size: 12px; color: var(--text-2); margin: 0 0 8px; }

.fm-center-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.fm-center-head h5 { margin: 0; font-size: 15px; }
.fm-center-head .search-pill { margin-left: auto; width: 220px; }
.fm-crumbs { display: flex; flex-wrap: wrap; gap: 4px; font-size: 12.5px; color: var(--text-muted); margin: -8px 0 14px; }
.fm-crumbs button { border: 0; background: none; padding: 0; color: var(--primary); font-size: 12.5px; }
.fm-folders { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.fm-folder { border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 14px 16px; cursor: pointer; position: relative; transition: box-shadow var(--t-fast), border-color var(--t-fast); background: #fff; min-width: 0; }
.fm-folder:hover { border-color: #ccd3f6; box-shadow: var(--shadow-card); }
.fm-folder.drop-over { border-color: var(--primary); background: var(--primary-softer); }
.fm-folder .ff-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.fm-folder .ff-top svg.folder { color: var(--warning); }
.fm-folder h6 { margin: 0 0 2px; font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-folder .ff-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); }
.fm-section-head { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 10px; }
.fm-section-head h5 { margin: 0; font-size: 15px; }
.fm-file-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.fm-file-name svg { flex: none; }
.fm-file-name .fname { color: var(--heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-file-name .star { color: var(--warning); flex: none; }
.fm-table td { padding-top: 9px; padding-bottom: 9px; }
.fic-pdf { color: var(--danger); } .fic-doc { color: var(--primary); } .fic-xls { color: var(--success); } .fic-img { color: var(--info); } .fic-zip { color: var(--warning); } .fic-txt { color: var(--muted); } .fic-html { color: var(--purple); }

.fm-right .card-body { text-align: center; }
.fm-storage-caption { color: var(--text-muted); font-size: 12.5px; margin: 8px 0 22px; }
.fm-cats { text-align: left; }
.fm-cat { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; cursor: pointer; background: #fff; width: 100%; text-align: left; }
.fm-cat:hover { border-color: #ccd3f6; }
.fm-cat .icon-soft { width: 34px; height: 34px; }
.fm-cat h6 { margin: 0; font-size: 13px; font-weight: 500; }
.fm-cat p { margin: 0; font-size: 11.5px; color: var(--text-muted); }
.fm-cat .size { margin-left: auto; font-size: 12.5px; color: var(--heading); font-weight: 500; }
.doc-preview { border: 1px solid var(--border); border-radius: var(--radius); width: 100%; height: 420px; background: #fff; }
