.file-view-tools { display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding:7px 12px; border-bottom:1px solid var(--border); font-size:12px; }
.file-view-tools label { display:flex; align-items:center; gap:7px; }
.file-view-tools select { background:var(--panel); color:var(--fg); border:1px solid var(--border); border-radius:5px; padding:5px; min-height:32px; }
.file-view-tools small { color:var(--muted); }
.media-open { flex:none; font-size:11px; padding:4px 8px; background:#243940; color:#b5e5d8; border:1px solid #426358; border-radius:5px; }
.flist.file-grid, .bridge-items.file-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(130px,1fr)); grid-auto-rows:minmax(184px,max-content); align-content:start; gap:10px; padding:10px; }
.bridge-files:has(.file-grid) { height:480px; max-height:75%; }
.bridge-items.file-grid { min-height:100px; }
.file-grid .fitem, .file-grid .bridge-entry { display:flex; position:relative; flex-direction:column; align-items:stretch; gap:5px; padding:7px; border:1px solid var(--border); border-radius:8px; background:#142028; min-width:0; }
.file-grid .fitem.sel, .file-grid .bridge-entry.selected { border-color:var(--accent); background:#24473f; }
.file-grid .fitem .fic { display:none; }
.file-grid .fnm, .file-grid .entry-name { white-space:normal; overflow-wrap:anywhere; font-size:12px; min-height:32px; }
.file-grid .entry-name { padding:0; width:100%; justify-content:flex-start; }
.file-grid .entry-name svg { display:none; }
.file-grid .entry-name span { white-space:normal; overflow-wrap:anywhere; }
.file-grid .fsz, .file-grid .bridge-entry > small { align-self:flex-start; font-size:10px; color:var(--muted); }
.file-grid .bridge-entry > input { position:absolute; top:10px; left:10px; z-index:1; }
.file-grid .media-thumb, .file-grid .media-folder { height:112px; width:100%; min-height:112px; display:flex; flex-direction:column; justify-content:center; align-items:center; overflow:hidden; border:0; background:#0e181e; border-radius:5px; padding:0; color:#a3c7c0; font-size:23px; gap:8px; }
.file-grid .media-thumb small { font-size:10px; }
.file-grid .media-thumb img { width:100%; height:100%; object-fit:contain; }
.file-grid .media-text-thumb { align-self:stretch; height:100%; text-align:left; padding:8px; margin:0; white-space:pre-wrap; overflow-wrap:anywhere; overflow:hidden; background:#e7ebdf; color:#28322e; font:9px/1.4 ui-monospace,monospace; }
.preview-body .preview-msg { padding:24px; text-align:center; overflow-wrap:anywhere; }
.preview-audio-panel { margin:auto; width:min(550px,95%); display:flex; flex-direction:column; gap:20px; align-items:center; text-align:center; padding:20px; overflow-wrap:anywhere; box-sizing:border-box; }
.preview-audio-icon { font-size:64px; color:var(--accent); }
.preview-audio { width:100%; }
.preview-pdf { flex:1; min-width:0; min-height:0; display:flex; flex-direction:column; }
.preview-pdf-bar { display:flex; align-items:center; justify-content:center; gap:16px; padding:8px; background:var(--panel); flex:none; font-size:12px; }
.preview-pdf-bar button { min-height:36px; }
.preview-pdf-scroll { overflow:auto; min-height:0; flex:1; text-align:center; padding:12px; }
.preview-pdf-scroll canvas { display:block; max-width:100%; height:auto; margin:auto; background:white; }
.preview-workbook { display:flex; flex-direction:column; flex:1; min-width:0; min-height:0; }
.sheet-toolbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; padding:10px 12px; background:var(--panel); font-size:12px; }
.sheet-toolbar label { display:flex; align-items:center; gap:8px; min-width:0; }
.sheet-toolbar select { background:#173b30; color:#d9f2e4; border:1px solid #42745e; border-radius:5px; padding:6px; max-width:230px; min-height:34px; }
.sheet-range, .sheet-note { color:var(--muted); }
.sheet-scroll { flex:1; min-height:0; overflow:auto; background:#f7faf8; }
.sheet-table { border-collapse:separate; border-spacing:0; color:#173129; font:12px/1.45 ui-sans-serif,system-ui,sans-serif; }
.sheet-table th, .sheet-table td { padding:6px 10px; border-right:1px solid #d5e0d9; border-bottom:1px solid #d5e0d9; white-space:pre; max-width:400px; min-width:90px; overflow:hidden; text-overflow:ellipsis; text-align:left; }
.sheet-table td { background:#fff; }
.sheet-table tbody tr:nth-child(even) td { background:#f4f8f5; }
.sheet-table th { background:#e0ece4; font-weight:500; text-align:center; }
.sheet-table thead th { position:sticky; top:0; z-index:2; }
.sheet-table tr > th:first-child { position:sticky; left:0; min-width:35px; z-index:1; }
.sheet-table thead th:first-child { z-index:3; }
.sheet-navigation { display:flex; flex-wrap:wrap; justify-content:center; gap:6px; padding:8px; }
.sheet-navigation button { min-height:34px; font-size:12px; }
.sheet-note { padding:0 12px 8px; font-size:11px; }
@media(max-width:600px) { .flist.file-grid, .bridge-items.file-grid { grid-template-columns:repeat(auto-fill,minmax(115px,1fr)); gap:7px; padding:7px; } .media-open { min-height:32px; } .preview-pdf-bar { gap:8px; } }
