.files-page { background: #fff; color: #202020; min-height: 100vh; }
.files-page [hidden] { display: none !important; }
.generated-folders { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.generated-folders .explorer-folder { width: auto; max-width: 100%; border: 1px solid #ddd; }
.explorer-path button { background: transparent; border: none; cursor: pointer; padding: 3px; color: #28607c; }
.explorer-path { flex-wrap: wrap; }
.explorer-titlebar { min-height: 58px; padding: 10px 20px; display: flex; justify-content: space-between; gap: 20px; align-items: center; background: #f7f7f7; border-bottom: 1px solid #e5e5e5; }
.files-brand { display: flex; gap: 10px; align-items: center; }
.files-brand > img { width: 28px; height: 28px; object-fit: contain; }
.files-brand h1 { margin: 0; font-size: 15px; font-weight: 600; }
.files-brand h1 span { margin-left: 8px; font-weight: 400; color: #737373; }
.files-account { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; font-size: 12px; }
.files-account .button { min-height: 30px; padding: 5px 12px; }
.explorer-commandbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 20px; border-bottom: 1px solid #e5e5e5; }
.explorer-commandbar .button { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; }
.explorer-commandbar .button img { width: 18px; height: 18px; }
.explorer-commandbar .primary img { filter: invert(1); }
.explorer-icon { border: 1px solid transparent; border-radius: 4px; background: transparent; width: 34px; height: 34px; flex: 0 0 34px; display: inline-flex; justify-content: center; align-items: center; cursor: pointer; color: #343434; }
.explorer-icon img { width: 18px; height: 18px; }
.explorer-icon:hover { background: #ededed; }
.explorer-icon.selected { background: #e3effa; border-color: #bdd7f0; }
.explorer-icon:disabled { opacity: .35; cursor: default; }
.explorer-view-modes { display: flex; border-left: 1px solid #dedede; padding-left: 8px; margin-left: 8px; }
#files-users { margin-left: auto; }
.explorer-addressbar { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid #e5e5e5; }
.explorer-path { flex: 1; min-width: 0; display: flex; gap: 12px; align-items: center; min-height: 36px; border: 1px solid #dedede; border-radius: 4px; padding: 7px 12px; font-size: 13px; overflow-wrap: anywhere; }
.explorer-path > img { width: 18px; height: 18px; }
.explorer-search { display: flex; gap: 9px; align-items: center; width: 290px; border: 1px solid #dedede; border-radius: 4px; padding: 0 10px; }
.explorer-search img { width: 16px; height: 16px; }
.explorer-search input { min-height: 36px; width: 100%; border: none; padding: 6px 0; background: white; outline: none; }
.explorer-search:focus-within { outline: 2px solid #8bb8db; }
.explorer-layout { display: grid; grid-template-columns: 245px minmax(0, 1fr); min-height: calc(100vh - 177px); }
.explorer-sidebar { border-right: 1px solid #e5e5e5; background: #fafafa; padding: 12px 8px; overflow-y: auto; max-height: calc(100vh - 177px); }
.explorer-sidebar h2 { font-size: 12px; font-weight: 600; color: #626262; margin: 20px 10px 8px; }
.explorer-sidebar .field { margin: 8px; }
.explorer-folder { width: 100%; min-height: 36px; display: flex; gap: 9px; align-items: center; padding: 7px 10px; border: none; border-radius: 3px; background: transparent; text-align: left; font-size: 13px; cursor: pointer; color: #282828; overflow-wrap: anywhere; }
.explorer-folder img { flex: 0 0 19px; width: 19px; height: 19px; }
.explorer-folder:hover { background: #ededed; }
.explorer-folder.active { background: #e4eef7; color: #174f7a; }
.files-main { padding: 12px 18px; min-width: 0; }
.files-toolbar { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
.files-toolbar select { min-height: 32px; font-size: 12px; }
#files-status { color: #a33d3d; font-size: 13px; }
.files-table { width: 100%; table-layout: fixed; }
.files-table th { background: #fff; color: #595959; border-bottom: 1px solid #dedede; font-size: 12px; font-weight: 400; }
.files-table th:first-child { width: 27%; }
.files-table th:nth-child(2) { width: 23%; }
.files-table th:last-child { width: 150px; }
.files-table td { overflow-wrap: anywhere; white-space: normal; vertical-align: middle; border-bottom: 1px solid #eeeeee; padding: 10px 8px; }
.files-table tbody tr:hover { background: #f0f7fd; }
.files-table .row-actions { display: flex; flex-wrap: nowrap; gap: 2px; }
.files-table .cell-muted { display: block; margin-top: 4px; font-size: 11px; }
.file-name { display: flex; align-items: center; gap: 9px; }
.file-name img { flex: 0 0 22px; width: 22px; height: 22px; }
.file-name strong { font-weight: 400; }
.files-footer { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 12px 0; color: #666; font-size: 12px; }
.explorer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 4px; align-items: start; }
.explorer-grid[hidden] { display: none; }
.explorer-file { border: 1px solid transparent; border-radius: 3px; padding: 16px 10px; text-align: center; overflow-wrap: anywhere; }
.explorer-file:hover { border-color: #cce0f0; background: #f0f7fd; }
.explorer-file > img { width: 46px; height: 46px; margin: 0 auto 10px; display: block; }
.explorer-file strong { display: block; font-size: 13px; font-weight: 400; }
.explorer-file .cell-muted { display: block; font-size: 11px; margin: 5px 0; }
.explorer-file .row-actions { justify-content: center; }
.files-dialog { width: min(680px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); overflow-y: auto; border: 1px solid #ccc; border-radius: 6px; padding: 22px; color: #202020; background: #fff; }
.files-dialog::backdrop { background: #0005; }
.files-dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.files-dialog-heading h2 { font-size: 18px; margin: 0; }
.files-user-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid #e5e5e5; }
.scope-choices { max-height: 160px; overflow-y: auto; padding: 8px; border: 1px solid #dedede; }
.scope-choices label { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.files-login-page { background: #f5f5f5; display: grid; place-items: center; min-height: 100vh; }
.files-login { width: min(380px, calc(100vw - 32px)); padding: 30px; background: #fff; border: 1px solid #ddd; border-radius: 6px; }
.files-login-logo { width: 38px; height: 38px; display: block; margin-bottom: 12px; }
.files-login h1 { font-size: 21px; margin: 6px 0 24px; }
.files-login .field { margin-bottom: 16px; }
@media (max-width: 760px) {
  .explorer-titlebar { align-items: start; flex-direction: column; gap: 8px; padding: 12px; }
  .explorer-commandbar { padding: 10px 12px; }
  .explorer-addressbar { padding: 10px 12px; flex-wrap: wrap; gap: 8px; }
  .explorer-search { width: 100%; }
  .explorer-layout { grid-template-columns: 150px minmax(0,1fr); }
  .explorer-sidebar { max-height: none; }
  .explorer-folder { font-size: 12px; padding: 7px 4px; gap: 5px; }
  .files-main { padding: 10px; }
  .files-table { min-width: 800px; }
  .explorer-grid { grid-template-columns: repeat(auto-fill, minmax(125px,1fr)); }
  .files-dialog .form-grid { grid-template-columns: 1fr; }
  .files-dialog .span-2 { grid-column: auto; }
  #files-users { margin-left: 0; }
}
