/* ARK file manager: compact Windows-style navigation, no oversized control rows. */
.page-files main { max-width: none; width: 100%; padding: 12px 15px 35px; }
.page-files .page-title { margin-bottom: 10px; }
.page-files .page-title h1 { font-size: 19px; }
.page-files .panel { padding: 0; }
.ark-file-manager { overflow: hidden; }
.explorer-toolbar, .explorer-commandbar, .explorer-statusbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 7px;
    padding: 8px 10px; border-bottom: 1px solid var(--line);
}
.explorer-toolbar { background: #1b2834; }
.explorer-commandbar { padding: 5px 10px; background: #1b232d; }
.explorer-commandbar button, .explorer-toolbar button { height: 29px; min-height: 29px; width: auto; padding: 4px 9px; }
#explorer-selection-label { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.explorer-breadcrumb { min-width: 120px; flex: 1 1 240px; overflow-wrap: anywhere; color: var(--ink); padding: 4px 8px; background: #101821; border: 1px solid var(--line); }
#file-filter { width: 175px; height: 29px; margin: 0; padding: 4px 9px; }
.view-modes { display: flex; gap: 3px; margin-left: auto; }
.view-modes .current, .inspector-tabs .current { background: #37546b; border-color: #7090a7; }
.explorer-workspace {
    display: grid; grid-template-columns: minmax(155px, 200px) minmax(0, 1fr) minmax(245px, 320px);
    height: clamp(460px, 68vh, 920px); min-width: 0;
}
.explorer-locations, .explorer-file-area, .explorer-inspector { min-width: 0; min-height: 0; overflow: auto; }
.explorer-locations { background: #16212b; border-right: 1px solid var(--line); padding: 8px 5px; }
.explorer-locations h2 { font-size: 11px; text-transform: uppercase; font-weight: 600; margin: 3px 9px 9px; color: var(--muted); }
.location-link { display: block; width: 100%; text-align: left; background: transparent; border: 0; border-radius: 1px; height: 28px; padding: 4px 9px; color: var(--ink); font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.location-link:hover, .location-link.active { background: #30465b; }
.location-source { padding-left: 22px; }
.explorer-file-area { background: #151e27; }
.backup-explorer { min-height: 100%; min-width: 0; }
.explorer-column-header { display: none; }
.explorer-entry { position: relative; min-width: 0; cursor: default; user-select: none; outline-offset: -2px; }
.explorer-entry:hover { background: #263646; }
.explorer-entry.selected, .explorer-entry:focus-visible { background: #314f68; outline: 1px solid #6285a5; }
.explorer-check { width: 14px; height: 14px; padding: 0; margin: 0; accent-color: var(--accent); cursor: pointer; }
.explorer-icon { font-size: 19px; line-height: 1; text-align: center; white-space: nowrap; }
.explorer-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.explorer-date, .explorer-type, .explorer-size, .explorer-versions { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.explorer-empty { padding: 18px; color: var(--muted); }
#file-display[data-view="details"] .explorer-column-header {
    display: grid; grid-template-columns: minmax(145px, 3fr) minmax(90px, 1.5fr) minmax(65px, 1fr) 78px 69px;
    padding: 7px 9px 7px 36px; gap: 8px; border-bottom: 1px solid var(--line); color: var(--muted); background: #1c2a36;
}
#file-display[data-view="details"] .explorer-entry {
    display: grid; grid-template-columns: 18px 22px minmax(110px, 3fr) minmax(90px, 1.5fr) minmax(65px, 1fr) 78px 69px;
    gap: 7px; align-items: center; min-height: 29px; padding: 3px 9px; border-bottom: 1px solid #283744;
}
#file-display[data-view="list"] .explorer-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 0; }
#file-display[data-view="list"] .explorer-entry { display: grid; grid-template-columns: 18px 22px minmax(0, 1fr); align-items: center; gap: 5px; padding: 5px 8px; height: 29px; }
#file-display[data-view="list"] .explorer-entry .explorer-date,
#file-display[data-view="list"] .explorer-entry .explorer-size,
#file-display[data-view="list"] .explorer-entry .explorer-type,
#file-display[data-view="list"] .explorer-entry .explorer-versions { display: none; }
#file-display[data-view="icons"] .explorer-items, #file-display[data-view="tiles"] .explorer-items { display: grid; grid-template-columns: repeat(auto-fill,minmax(96px,1fr)); gap: 4px; padding: 8px; align-content: start; }
#file-display[data-view="tiles"] .explorer-items { grid-template-columns: repeat(auto-fill,minmax(147px,1fr)); }
#file-display[data-view="icons"] .explorer-entry, #file-display[data-view="tiles"] .explorer-entry { display: flex; flex-direction: column; align-items: center; min-height: 74px; gap: 4px; padding: 10px 4px 4px; }
#file-display[data-view="tiles"] .explorer-entry { min-height: 103px; padding-top: 12px; }
#file-display[data-view="icons"] .explorer-check, #file-display[data-view="tiles"] .explorer-check { position: absolute; left: 5px; top: 5px; }
#file-display[data-view="icons"] .explorer-icon { font-size: 28px; }
#file-display[data-view="tiles"] .explorer-icon { font-size: 40px; }
#file-display[data-view="icons"] .explorer-name, #file-display[data-view="tiles"] .explorer-name { font-size: 11px; max-width: 100%; white-space: normal; overflow-wrap: anywhere; text-align: center; line-height: 1.3; max-height: 3.9em; }
#file-display[data-view="icons"] .explorer-date, #file-display[data-view="icons"] .explorer-type, #file-display[data-view="icons"] .explorer-size,
#file-display[data-view="tiles"] .explorer-date, #file-display[data-view="tiles"] .explorer-type { display: none; }
.explorer-inspector { background: #1b2530; border-left: 1px solid var(--line); }
.inspector-top { display: flex; align-items: center; gap: 8px; padding: 11px; border-bottom: 1px solid var(--line); }
.inspector-icon { font-size: 27px; }
.inspector-identity { min-width: 0; }
.inspector-identity h2 { font-size: 13px; margin: 0; overflow-wrap: anywhere; }
.inspector-identity p { color: var(--muted); margin: 3px 0 0; font-size: 11px; }
.inspector-tabs { display: flex; border-bottom: 1px solid var(--line); gap: 0; }
.inspector-tabs button { flex: 1; min-width: 0; background: transparent; border: 0; border-right: 1px solid var(--line); border-radius: 0; padding: 7px 3px; height: 33px; font-size: 11px; }
.inspector-panel { min-width: 0; padding: 9px; }
.preview-content { width: 100%; min-width: 0; overflow: auto; }
.preview-content img { max-width: 100%; max-height: 52vh; object-fit: contain; }
.preview-content pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 11px; }
.preview-document { width: 100%; height: min(55vh, 560px); border: 1px solid var(--line); background: #f3f4f6; }
.preview-player { max-width: 100%; max-height: 50vh; }
.preview-actions { padding-top: 9px; }
.version-entry { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 7px 2px; border-bottom: 1px solid var(--line); }
.version-entry span { flex: 1 1 100%; min-width: 0; overflow-wrap: anywhere; font-size: 11px; }
.version-entry button { height: 26px; min-height: 26px; padding: 3px 7px; font-size: 11px; }
.details-list { display: grid; grid-template-columns: 1fr 1fr; margin: 0; font-size: 11px; gap: 8px; }
.details-list dt { color: var(--muted); }
.details-list dd { margin: 0; overflow-wrap: anywhere; text-align: right; }
.explorer-statusbar { padding: 5px 10px; color: var(--muted); border-top: 1px solid var(--line); border-bottom: 0; font-size: 11px; }
.explorer-statusbar span:first-child { flex: 1; }
#advanced-snapshots, #block-map-section { padding: 12px; }
@media (max-width: 1100px) {
    .explorer-workspace { grid-template-columns: 175px minmax(0, 1fr); height: auto; min-height: 510px; }
    .explorer-file-area { min-height: 400px; }
    .explorer-inspector { grid-column: 1 / -1; max-height: 480px; border-top: 1px solid var(--line); border-left: 0; }
}
@media (max-width: 670px) {
    .page-files main { padding: 10px 7px 30px; }
    .explorer-toolbar { gap: 5px; }
    #file-filter { width: 100%; flex: 1; }
    .explorer-commandbar { gap: 4px; }
    .explorer-workspace { display: block; }
    .explorer-locations { max-height: 150px; overflow-y: auto; border-right: 0; border-bottom: 1px solid var(--line); }
    .explorer-file-area { min-height: 300px; max-height: 55vh; overflow: auto; }
    .explorer-inspector { max-height: none; }
    #file-display[data-view="details"] .explorer-entry { grid-template-columns: 18px 22px minmax(0,1fr) 68px; gap: 4px; }
    #file-display[data-view="details"] .explorer-column-header { display: none; }
    #file-display[data-view="details"] .explorer-date, #file-display[data-view="details"] .explorer-type, #file-display[data-view="details"] .explorer-versions { display: none; }
}

/* An incomplete backup catalog must be visible while history is indexed. */
.catalog-progress { width: 120px; height: 6px; vertical-align: middle; accent-color: #3c91cf; }
.catalog-progress[hidden] { display: none; }

/* ARK Online Files: upload toolbar and progress use compact, flat controls. */
#upload-files, #upload-folder, #cancel-upload { white-space: nowrap; }
.upload-status { padding: 9px 12px; border-bottom: 1px solid var(--line); background: #192634; }
.upload-description { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 12px; }
.upload-description #upload-phase { color: var(--muted); }
.upload-description #upload-count { margin-left: auto; font-variant-numeric: tabular-nums; }
.upload-status progress { display: block; width: 100%; height: 9px; margin: 7px 0 0; accent-color: #518dad; }
.upload-status .hint { margin: 5px 0 0; font-size: 11px; }
