.files-panel { max-width: 850px; margin: 25px auto; padding: 20px; }
.files-panel h1 { margin-bottom: 20px; }
.files-list { list-style: none; padding: 0; }
.files-list li { padding: 16px 0; border-bottom: 1px solid #888; }
.files-list span { display: block; margin: 6px 0; }
.files-panel button { cursor: pointer; padding: 8px 12px; }
.file-user small { display: block; margin-left: 24px; }
#files-status, #file-errors { margin: 12px 0; }


/* Finder-inspired browsing uses real download links and Dusty's existing drawers. */
body .files-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 20px; }
body .files-heading > .dusty-button { margin-left: auto; flex: 0 0 auto; }
body .files-heading h1 { margin: 0; flex: 1 1 220px; }
body .files-heading h1 small { font-size: 14px; font-weight: normal; }
body .files-heading > p { flex-basis: 100%; margin: 0; order: 2; }
body .files-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; padding: 16px; border: 1px solid #ddd; border-radius: 10px; background: #f5f5f7; color: #252525; }
body .files-toolbar label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; float: none; height: auto; width: auto; text-align: left; margin: 0; }
body .files-toolbar select, body .files-toolbar input { min-width: 0; width: 100%; height: 42px; padding: 8px; border: 1px solid #aaa; border-radius: 5px; font-size: 16px; margin: 0; float: none; }
body .files-search { flex: 1 1 190px; }
body .files-toolbar button { min-height: 42px; border: 1px solid #aaa; border-radius: 5px; background: #fff; color: #252525; font-size: 14px; }
body .files-view-switch { display: flex; gap: 4px; }
body .files-view-switch [aria-pressed=true] { background: #303842; color: #fff; border-color: #303842; }
body .files-list { margin: 0; padding: 0; list-style: none; }
body .files-list li.file-card { min-width: 0; margin: 0; padding: 18px; border: 1px solid #ddd; border-radius: 10px; background: #fff; color: #252525; }
body .files-list li.file-card:hover { border-color: #8c949f; box-shadow: 0 2px 8px #00000012; }
body .files-layout-grid .files-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 16px; }
body .file-download { display: flex; flex-direction: column; align-items: center; gap: 12px; color: #253449; text-decoration: none; }
body .file-name { font-size: 15px; line-height: 1.4; font-weight: bold; text-align: center; overflow-wrap: anywhere; min-width: 0; }
body .file-name small { display: block; font-size: 12px; color: #5b626b; font-weight: normal; margin-top: 5px; }
body .files-list .file-icon { position: relative; display: block; width: 64px; height: 80px; flex-shrink: 0; margin: 0; color: #65758b; }
body .file-icon svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 2px 2px #00000015); }
.file-paper { fill: #fafcff; stroke: #bbc4cf; stroke-width: 1.5; }
.file-fold { fill: #e3e9f0; stroke: #bbc4cf; stroke-width: 1.5; }
.file-lines { fill: none; stroke: #d7dfe8; stroke-width: 2; }
body .files-list .file-icon-label { position: absolute; bottom: 8px; left: 0; right: 0; padding: 3px 0; margin: 0; border-radius: 4px; background: currentColor; text-align: center; font-size: 10px; font-weight: bold; letter-spacing: .5px; }
body .files-list .file-icon-label b { color: white; }
body .files-list .file-icon-pdf { color: #bd3942; } body .files-list .file-icon-image { color: #8056b3; } body .files-list .file-icon-document { color: #3574b9; }
body .files-list .file-icon-sheet { color: #2b805b; } body .files-list .file-icon-archive { color: #9b743a; } body .files-list .file-icon-media { color: #b64984; } body .files-list .file-icon-code { color: #576ab0; }
body .files-list .file-date, body .files-list .file-size { display: block; margin: 8px 0 0; font-size: 12px; color: #5b626b; text-align: center; }
body .file-actions { margin-top: 12px; text-align: center; }
body .file-actions:empty { display: none; }
body .file-actions button { max-width: 100%; border: 1px solid #bbb; background: #f5f5f7; color: #303842; border-radius: 5px; font-size: 12px; }
body .files-list-head { display: none; }
body .files-list .file-name, body .files-list .file-name small { margin: 0; }
body .files-list .file-name small { margin-top: 5px; }
body .files-list .file-meta-label { display: inline; margin: 0; }
body .files-list-head, body .files-list li.file-card { overflow-wrap: anywhere; }
body .files-list .file-card .file-name { display: block; }
body .files-browser.files-layout-list .files-list-head, body .files-browser.files-layout-list li.file-card { display: grid; grid-template-columns: minmax(0, 1fr) 110px 80px 140px; gap: 16px; align-items: center; }
body .files-browser.files-layout-list .files-list-head { padding: 12px 18px; font-size: 12px; font-weight: bold; color: #555; border-bottom: 1px solid #ddd; }
body .files-browser.files-layout-list li.file-card { padding: 12px 18px; border-radius: 0; border-width: 0 0 1px; }
body .files-browser.files-layout-list .file-download { flex-direction: row; align-items: center; }
body .files-browser.files-layout-list .file-icon { width: 36px; height: 45px; }
body .files-browser.files-layout-list .file-name { text-align: left; }
body .files-browser.files-layout-list .file-date, body .files-browser.files-layout-list .file-size, body .files-browser.files-layout-list .file-actions { margin: 0; text-align: left; }
body .files-browser.files-layout-list .file-meta-label { display: none; }
@media (max-width: 760px) {
    body .files-browser.files-layout-list .files-list-head { display: none; }
    body .files-browser.files-layout-list li.file-card { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
    body .files-browser.files-layout-list .file-download { grid-column: 1 / -1; }
    body .files-browser.files-layout-list .file-actions { grid-column: 1 / -1; }
    body .files-sort { flex: 1 1 190px; }
}

/* Drawer actions and file controls keep usable touch targets on small screens. */
body .file-actions button, body .files-toolbar button { min-height: 44px; }
