#file-area { flex: 1; overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
#files-topbar { height: 56px; background: #0b1628; border-bottom: 1px solid rgba(255,255,255,.06); display: flex; align-items: center; padding: 0 20px; gap: 14px; flex-shrink: 0; }
#files-toolbar { padding: 14px 20px; border-bottom: 1px solid rgba(255,255,255,.06); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #0b1f3a; flex-shrink: 0; }
#file-body { flex: 1; overflow: hidden; display: flex; min-height: 0; }
#folder-panel { width: 200px; border-right: 1px solid rgba(255,255,255,.06); overflow-y: auto; padding: 12px 8px; flex-shrink: 0; background: #0a1830; }
#main-panel { flex: 1; overflow-y: auto; padding: 20px; min-width: 0; }
.folder-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 7px; font-size: .8rem; color: rgba(255,255,255,.5); cursor: pointer; transition: all .15s; position: relative; }
.folder-item:hover { background: rgba(255,255,255,.05); color: rgba(255,255,255,.8); }
.folder-item.active { background: rgba(128,101,248,.18); color: #a78bfa; }
#file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.file-card { background: #0b1628; border: 1.5px solid rgba(255,255,255,.07); border-radius: 12px; padding: 12px; cursor: pointer; position: relative; transition: all .18s; user-select: none; }
.file-card:hover { border-color: rgba(128,101,248,.4); background: #0f1f3d; transform: translateY(-1px); }
.file-card.selected { border-color: #8065f8; background: rgba(128,101,248,.12); }
.file-card .thumb { width: 100%; aspect-ratio: 1; border-radius: 8px; margin-bottom: 10px; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; background: rgba(255,255,255,.04); }
.file-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-card .fname { font-size: .75rem; font-weight: 600; color: rgba(255,255,255,.8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-card .fmeta { font-size: .68rem; color: rgba(255,255,255,.3); margin-top: 2px; }
.file-card .check { position: absolute; top: 8px; left: 8px; width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid rgba(255,255,255,.25); background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; }
.file-card.selected .check, .file-card:hover .check { border-color: #8065f8; background: rgba(128,101,248,.3); }
.file-card.selected .check svg { display: block; }
.file-card .check svg { display: none; }
.file-card .ftype-badge { position: absolute; top: 8px; right: 8px; font-size: .6rem; font-weight: 700; padding: 2px 6px; border-radius: 4px; text-transform: uppercase; }
#file-list { display: flex; flex-direction: column; gap: 2px; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; transition: all .15s; }
.list-row:hover { background: #0b1628; border-color: rgba(255,255,255,.06); }
.list-row.selected { background: rgba(128,101,248,.1); border-color: rgba(128,101,248,.3); }
.list-row .check2 { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid rgba(255,255,255,.2); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.list-row.selected .check2 { border-color: #8065f8; background: #8065f8; }
.list-row.selected .check2::after { content: '✓'; color: #fff; font-size: 9px; font-weight: 900; }
.fm-btn-primary { background: linear-gradient(135deg,#8065f8,#4490d3); color: #fff; font-size: .8rem; font-weight: 700; padding: 8px 16px; border-radius: 8px; border: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.fm-btn-ghost { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); color: rgba(255,255,255,.6); font-size: .8rem; font-weight: 500; padding: 7px 14px; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.fm-btn-ghost:hover { background: rgba(255,255,255,.1); color: rgba(255,255,255,.9); }
.fm-btn-icon { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); color: rgba(255,255,255,.5); width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.fm-btn-icon.active { background: rgba(128,101,248,.2); border-color: rgba(128,101,248,.5); color: #a78bfa; }
.ftab { font-size: .78rem; font-weight: 600; padding: 5px 14px; border-radius: 6px; cursor: pointer; color: rgba(255,255,255,.4); border: 1px solid transparent; }
.ftab.active { background: rgba(128,101,248,.18); border-color: rgba(128,101,248,.35); color: #a78bfa; }
.search-box { background: rgba(255,255,255,.06); border: 1.5px solid rgba(255,255,255,.1); border-radius: 8px; padding: 7px 12px 7px 36px; font-size: .8rem; color: #e2e8f0; outline: none; width: 220px; }
.search-box:focus { border-color: #8065f8; }
.bc-item { font-size: .8rem; font-weight: 500; color: rgba(255,255,255,.4); cursor: pointer; }
.bc-item.current { color: rgba(255,255,255,.8); font-weight: 600; cursor: default; }
#ctx-menu { position: fixed; background: #0f1e35; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 6px; min-width: 180px; box-shadow: 0 16px 48px rgba(0,0,0,.6); z-index: 1000; display: none; }
.ctx-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 7px; font-size: .8rem; color: rgba(255,255,255,.65); cursor: pointer; }
.ctx-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.ctx-item.danger { color: rgba(239,68,68,.8); }
.ctx-sep { height: 1px; background: rgba(255,255,255,.07); margin: 4px 0; }
.fm-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.65); z-index: 500; align-items: center; justify-content: center; }
.fm-modal.open { display: flex; }
.fm-modal-box { background: #0b1628; border: 1px solid rgba(255,255,255,.1); border-radius: 20px; padding: 28px; max-width: 95vw; }
.drop-zone { border: 2px dashed rgba(128,101,248,.4); border-radius: 14px; padding: 40px 20px; text-align: center; background: rgba(128,101,248,.05); cursor: pointer; }
.drop-zone.dragging { border-color: #8065f8; background: rgba(128,101,248,.1); }
#bulk-bar { display: none; background: #0b1628; border-top: 1px solid rgba(255,255,255,.06); padding: 10px 20px; align-items: center; gap: 10px; flex-shrink: 0; }
#bulk-bar.show { display: flex; }
#fm-toast { position: fixed; bottom: 28px; right: 28px; background: #0f1e35; border: 1px solid rgba(128,101,248,.3); border-radius: 10px; padding: 12px 18px; font-size: .82rem; color: #e2e8f0; transform: translateY(80px); opacity: 0; transition: all .3s; z-index: 999; }
#fm-toast.show { transform: translateY(0); opacity: 1; }
.storage-bar { height: 5px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: 6px; }
.storage-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg,#8065f8,#13b3b4); }
.fm-text-input { background: rgba(255,255,255,.06); border: 1.5px solid rgba(255,255,255,.1); border-radius: 8px; padding: 9px 12px; font-size: .85rem; color: #e2e8f0; outline: none; width: 100%; }
.fm-text-input:focus { border-color: #8065f8; }
.fm-select { background: #0b1628; border: 1.5px solid rgba(255,255,255,.1); color: rgba(255,255,255,.7); font-size: .78rem; padding: 6px 10px; border-radius: 8px; outline: none; }
.fm-btn-danger { background: rgba(239,68,68,.2); border: 1px solid rgba(239,68,68,.35); color: #f87171; font-size: .8rem; font-weight: 600; padding: 8px 16px; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.fm-btn-danger:hover { background: rgba(239,68,68,.32); }
.folder-item .folder-del { opacity: 0; width: 22px; height: 22px; border-radius: 6px; border: none; background: rgba(239,68,68,.15); color: #f87171; font-size: 14px; line-height: 1; cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: opacity .15s, background .15s; }
.folder-item:hover .folder-del { opacity: 1; }
.folder-item .folder-del:hover { background: rgba(239,68,68,.3); }
.folder-card { background: #0b1628; border: 1.5px solid rgba(255,255,255,.07); border-radius: 12px; padding: 12px; cursor: pointer; position: relative; transition: all .18s; }
.folder-card:hover { border-color: rgba(128,101,248,.4); background: #0f1f3d; }
.folder-card .thumb { width: 100%; aspect-ratio: 1; border-radius: 8px; margin-bottom: 10px; display: flex; align-items: center; justify-content: center; background: rgba(128,101,248,.08); }
.folder-card .folder-actions { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.folder-card:hover .folder-actions { opacity: 1; }
.folder-card .folder-open-btn { width: 26px; height: 26px; border-radius: 6px; border: 1px solid rgba(255,255,255,.12); background: rgba(0,0,0,.35); color: #fff; font-size: 11px; cursor: pointer; }
.folder-card .folder-del-btn { width: 26px; height: 26px; border-radius: 6px; border: none; background: rgba(239,68,68,.2); color: #f87171; font-size: 12px; cursor: pointer; }
