:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  line-height: 1.5;
  /* Branding theme — defaults are the unbranded CemocFiles look; admin overrides
     are injected onto documentElement at runtime by branding-bootstrap.js. */
  --brand-primary: #185abd;
  --brand-accent: #11478f;
  /* --brand-strong: dark color for prominent standalone actions (e.g. the
     Administration button); --brand-surface is not admin-editable — it stays
     at the default to keep cards/navbar readable. */
  --brand-strong: #243450;
  --brand-surface: #ffffff;
  --brand-page-bg: #f3f6fa;
  /* Derived states: JS computes readable text colors for contrast; pressed
     state is 12% darker than primary via color-mix. */
  --brand-on-primary: #ffffff;
  --brand-on-accent: #ffffff;
  --brand-on-strong: #ffffff;
  --brand-primary-pressed: color-mix(in srgb, var(--brand-primary) 88%, #000);
  --brand-accent-soft: color-mix(in srgb, var(--brand-accent) 12%, var(--brand-surface));
  --brand-primary-soft: color-mix(in srgb, var(--brand-primary) 10%, var(--brand-surface));
  --brand-app-bg-image: none;
  --brand-login-bg-image: none;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--brand-page-bg);
  background-image: var(--brand-app-bg-image);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
body.login-active {
  background-image: var(--brand-login-bg-image);
}
header, main, footer, .usage-bar { width: min(1600px, calc(100% - 3rem)); margin-inline: auto; }
main { flex: 1; display: flex; flex-direction: column; }
header { position: relative; display: flex; align-items: center; justify-content: center; padding: 2rem 0 1rem; }
.header-actions { position: absolute; right: 0; display: flex; gap: .5rem; align-items: center; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { margin-bottom: .4rem; }
.eyebrow { margin-bottom: .15rem; color: var(--brand-primary); font-size: .75rem; font-weight: 800; letter-spacing: .14em; }
.card, .warning { border-radius: 12px; padding: 1.25rem; margin-bottom: 1rem; }
.card { background: var(--brand-surface); border: 1px solid #dce3ee; box-shadow: 0 8px 30px rgb(23 32 51 / 6%); }
.brand-logo { height: 40px; width: auto; object-fit: contain; }
.brand-logo-login { height: 56px; }
.narrow { max-width: 520px; }
#login-view { margin: auto; width: min(520px, 100%); display: flex; flex-direction: column; align-items: center; gap: 1.25rem; }
#login-view[hidden] { display: none; }
#login-view .card { width: 100%; margin-bottom: 0; }
.login-brand { margin: 0; color: #172033; }
.warning { background: #fff7df; border: 1px solid #e8c764; color: #594400; }
.loading-view {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  text-align: center;
  background: var(--brand-page-bg);
  z-index: 1000;
}
.loading-view p { color: #536177; font-weight: 600; font-size: 1.05rem; }
.spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 4px solid #dce3ee;
  border-top-color: var(--brand-primary);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-view[hidden] { display: none; }
button { border: 0; border-radius: 8px; padding: .7rem 1rem; background: var(--brand-primary); color: var(--brand-on-primary); font-weight: 700; cursor: pointer; }
button:hover { background: var(--brand-accent); color: var(--brand-on-accent); }
button:active { background: var(--brand-primary-pressed); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.secondary { background: #e8edf5; color: #243450; }
button.secondary:hover { background: #d6deea; }
button.danger { color: #7b1616; }
button.danger:hover { background: #ffebeb; }
button.icon-button { padding: .5rem .6rem; font-size: 1rem; line-height: 1; }
.header-actions button {
  background: var(--brand-primary);
  color: var(--brand-on-primary);
}
.header-actions button:hover {
  background: var(--brand-accent);
  color: var(--brand-on-accent);
}
/* The Administration button uses the dedicated dark "strong" brand color rather
   than primary so it reads as a distinct, secondary-tier action. */
.header-actions #admin-open {
  background: var(--brand-strong);
  color: var(--brand-on-strong);
}
.header-actions #admin-open:hover {
  background: color-mix(in srgb, var(--brand-strong) 85%, #000);
  color: var(--brand-on-strong);
}

.toast-container {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  z-index: 2000;
  max-width: min(420px, calc(100% - 3rem));
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: .8rem 1rem;
  border-radius: 10px;
  background: var(--brand-primary-soft);
  border: 1px solid var(--brand-accent);
  color: #172033;
  box-shadow: 0 8px 24px rgb(23 32 51 / 15%);
  animation: toast-in .15s ease-out;
}
.toast.error { background: #ffebeb; border-color: #e69a9a; color: #7b1616; }
.toast-message { flex: 1; font-size: .9rem; line-height: 1.4; }
.toast-close { background: transparent; border: 0; padding: 0 0 0 .5rem; margin: 0; color: inherit; font-size: 1.1rem; line-height: 1; cursor: pointer; }
.toast-close:hover { background: transparent; opacity: .7; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(.5rem); }
  to { opacity: 1; transform: translateY(0); }
}
.upload-controls, .section-heading { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.section-heading { justify-content: space-between; }

/* Upload modal */
.dropzone {
  border: 2px dashed #b9c6da;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  background: #f8f9fa;
  transition: border-color .15s ease, background .15s ease;
}
.dropzone.dragover { border-color: var(--brand-accent); background: var(--brand-accent-soft); }
.dropzone-title { font-weight: 700; margin-bottom: .25rem; }
.dropzone .upload-controls { justify-content: center; margin-top: .75rem; }
.upload-list { margin-top: 1rem; padding: .5rem 1rem; background: var(--brand-surface); border-radius: 8px; border: 1px solid #e3e8f0; max-height: 40vh; overflow: auto; }
.upload-list-item { display: grid; grid-template-columns: 1fr auto auto auto; grid-template-areas: "name size status remove" "bar bar bar bar" "label label label label"; align-items: center; column-gap: .75rem; row-gap: .25rem; padding: .6rem 0; border-bottom: 1px solid #e3e8f0; }
.upload-list-item:last-child { border-bottom: none; }
.upload-list-item.done { opacity: .6; }
.upload-list-item .file-name { grid-area: name; font-size: .9rem; word-break: break-all; }
.upload-list-item .file-size { grid-area: size; color: #66738a; font-size: .85rem; }
.upload-list-item .upload-status { grid-area: status; }
.upload-list-item .remove-file { grid-area: remove; }
.upload-list-item progress { grid-area: bar; height: .5rem; }
.upload-list-item .upload-label { grid-area: label; margin: 0; font-size: .8rem; }
#move-search { width: 100%; margin-bottom: .75rem; }
.move-folder-list { padding: .25rem; background: var(--brand-surface); border-radius: 8px; border: 1px solid #e3e8f0; max-height: 40vh; overflow: auto; display: flex; flex-direction: column; gap: .15rem; }
.move-folder-item { display: block; width: 100%; text-align: left; background: transparent; color: #243450; border: 1px solid transparent; border-radius: 6px; padding: .5rem .6rem; font-size: .9rem; word-break: break-all; }
.move-folder-item:hover:not(:disabled) { background: var(--brand-primary-soft); }
.move-folder-item.selected { background: var(--brand-primary-soft); border-color: var(--brand-primary); font-weight: 600; }
.move-folder-item:disabled { opacity: .55; cursor: default; }
.upload-status { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .15rem .5rem; border-radius: 999px; background: #e8edf5; color: #243450; }
.upload-status.uploading { background: var(--brand-primary-soft); color: var(--brand-primary); }
.upload-status.done { background: #e3f6e8; color: #1f6b35; }
.upload-status.failed { background: #ffebeb; color: #7b1616; }
.upload-status.cancelled { background: #fff7df; color: #594400; }
.remove-file { padding: .3rem .6rem; font-size: 1.2rem; line-height: 1; min-width: auto; }
.upload-footer { justify-content: space-between; align-items: center; }
.upload-footer p { margin: 0; }
.upload-actions { display: flex; gap: .5rem; }
progress { width: 100%; height: 1rem; }
.muted { color: #66738a; font-size: .9rem; }
.usage-bar { text-align: center; font-size: .78rem; margin: -0.5rem auto .75rem; }
.usage-bar[hidden] { display: none; }
.usage-bar-warning { color: #8a5300; }
.usage-bar-exceeded { color: #7b1616; font-weight: 600; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .8rem .5rem; border-bottom: 1px solid #e3e8f0; text-align: left; }
th { color: #5d6a80; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
td:last-child, th:last-child { text-align: right; }
.file-table { table-layout: fixed; }
.file-table .col-select { width: 2.5rem; }
.file-table .col-size { width: 6.5rem; white-space: nowrap; }
.file-table .col-type { width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-table .col-date { width: 11rem; white-space: nowrap; }
.file-table .col-actions { width: 8.5rem; white-space: nowrap; }
.file-table .col-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.file-table input[type="checkbox"] { width: 1rem; height: 1rem; cursor: pointer; }
.file-table tbody tr:hover { background: #f8f9fa; }
.file-table tr.row-folder { cursor: pointer; }

/* Search inputs and sortable headers */
input[type="search"] {
  padding: .5rem .75rem;
  border: 1px solid #dce3ee;
  border-radius: 8px;
  font: inherit;
  font-size: .85rem;
  min-width: 160px;
  background: #fff;
}
input[type="search"]:focus { outline: 2px solid var(--brand-accent); outline-offset: -1px; border-color: var(--brand-accent); }
.admin-controls select {
  padding: .5rem .75rem;
  border: 1px solid #dce3ee;
  border-radius: 8px;
  font: inherit;
  font-size: .85rem;
  background: #fff;
}
.admin-controls select:focus { outline: 2px solid var(--brand-accent); outline-offset: -1px; border-color: var(--brand-accent); }
.sidebar-tools { display: flex; gap: .4rem; margin-bottom: .5rem; }
.sidebar-tools input[type="search"] { flex: 1; min-width: 0; }
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover { color: #172033; }
th.sortable::after { content: ""; display: inline-block; width: 1em; margin-left: .3em; font-size: .75em; }
th.sortable.sort-asc::after { content: "▲"; color: var(--brand-primary); }
th.sortable.sort-desc::after { content: "▼"; color: var(--brand-primary); }
@media (max-width: 900px) {
  .file-table .col-type, .file-table .col-date { display: none; }
}
footer { padding: 1rem 0 2rem; color: #6b7586; font-size: .85rem; }

/* Explorer Layout */
.explorer-layout {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.folder-sidebar {
  width: 250px;
  flex-shrink: 0;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.sidebar-header h2 {
  margin: 0;
  font-size: 1rem;
}

.folder-tree {
  background: var(--brand-surface);
  border: 1px solid #e3e8f0;
  border-radius: 8px;
  padding: 0.5rem;
  min-height: 200px;
}

.folder-item {
  padding: 0.5rem;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.folder-item:hover {
  background: #e8edf5;
}

.folder-item.active {
  background: var(--brand-accent-soft);
  font-weight: 600;
}

.folder-item .folder-icon {
  font-size: 1rem;
}

.content-area {
  flex: 1;
  min-width: 0;
}

.breadcrumb-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.5rem;
  background: #f8f9fa;
  border-radius: 8px;
}

#breadcrumbs {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.breadcrumb-item {
  color: var(--brand-primary);
  cursor: pointer;
  font-size: 0.9rem;
}

.breadcrumb-item:hover {
  text-decoration: underline;
}

.breadcrumb-item::after {
  content: "›";
  margin-left: 0.5rem;
  color: #66738a;
}

.breadcrumb-item:last-child::after {
  content: "";
}

.breadcrumb-item:last-child {
  color: #172033;
  cursor: default;
  font-weight: 600;
}

.breadcrumb-item:last-child:hover {
  text-decoration: none;
}

.view-controls {
  display: flex;
  gap: 0.5rem;
}

.file-browser {
  background: var(--brand-surface);
  border: 1px solid #e3e8f0;
  border-radius: 8px;
  padding: 1rem;
  min-height: 300px;
  margin-bottom: 1rem;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal[hidden] {
  display: none;
}

.modal-content {
  background: var(--brand-surface);
  border-radius: 12px;
  max-width: 90vw;
  max-height: 90vh;
  width: 800px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #e3e8f0;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.modal-body {
  flex: 1;
  overflow: auto;
  padding: 1rem;
  min-height: 200px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 1rem;
  border-top: 1px solid #e3e8f0;
}

.admin-controls { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.range-picker { position: relative; }
#admin-range-button { display: inline-flex; align-items: center; gap: .5rem; }
.range-caret { font-size: .7rem; color: #5d6a80; }
.range-popover {
  position: absolute;
  top: calc(100% + .35rem);
  left: 0;
  z-index: 30;
  background: var(--brand-surface);
  border: 1px solid #dce3ee;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(23, 34, 52, .16);
  padding: .75rem;
  width: 17.5rem;
}
.range-cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.range-cal-header button { padding: .15rem .6rem; font-size: .95rem; line-height: 1.4; }
.range-month { font-weight: 600; font-size: .85rem; }
.range-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.range-dow { text-align: center; font-size: .68rem; font-weight: 600; color: #5d6a80; padding: .2rem 0; }
.range-day-empty { padding: .25rem 0; }
.range-day {
  border: none;
  background: transparent;
  padding: .25rem 0;
  font-size: .78rem;
  text-align: center;
  border-radius: 6px;
  color: #24304a;
  cursor: pointer;
}
.range-day:hover:not(:disabled) { background: var(--brand-accent-soft, #e8f0fb); }
.range-day:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: -1px; }
.range-day:disabled { color: #b7c0cf; cursor: default; }
.range-day.today { font-weight: 700; box-shadow: inset 0 0 0 1px var(--brand-accent); }
.range-day.in-range { background: var(--brand-accent-soft, #e8f0fb); border-radius: 0; }
.range-day.range-endpoint { background: var(--brand-accent); color: #fff; border-radius: 6px; font-weight: 600; }
.range-popover .admin-range-presets { justify-content: center; margin-top: .6rem; }
.admin-range-presets { display: flex; gap: .25rem; }
.admin-range-presets button { padding: .4rem .65rem; font-size: .8rem; }
.modal-content.admin-modal {
  width: 1400px;
  max-width: 98vw;
  /* Fixed height so tab switches and list loads don't resize the window —
     the body scrolls internally instead. */
  height: min(92vh, 900px);
}
.admin-table { table-layout: auto; font-size: .85rem; }
.admin-table td:last-child, .admin-table th:last-child { text-align: left; }
#admin-table tbody {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: .8rem;
}
#admin-table tr:nth-child(even) { background: #f7f9fb; }
#admin-table tr:hover { background: #eef2f7; }
#admin-table td { word-break: break-word; }
#admin-table td.timestamp { white-space: nowrap; color: #5d6a80; }
#admin-table .outcome-success { color: #1f6b35; font-weight: 700; }
#admin-table .outcome-failed,
#admin-table .outcome-denied { color: #7b1616; font-weight: 700; }
#admin-table .outcome-blocked { color: #8a5300; font-weight: 700; }

.usage-quota-hint { margin: .6rem 0 0; font-size: .85rem; }
.usage-quota-hint.usage-quota-warning { color: #8a5300; }
.usage-quota-hint.usage-quota-exceeded { color: #7b1616; font-weight: 600; }
.usage-quota-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.usage-quota-form input[type="number"] { width: 6rem; padding: .4rem; border: 1px solid #dce3ee; border-radius: 6px; }
.config-section + .config-section { border-top: 1px solid #e3e8f0; margin-top: 1.25rem; padding-top: 1.25rem; }
.config-section h4 { margin: 0 0 .6rem; }
.policy-form fieldset.policy-mode { border: none; padding: 0; margin: 0 0 .75rem; }
.policy-mode legend { font-weight: 600; margin-bottom: .4rem; }
.policy-mode label { display: flex; gap: .5rem; align-items: center; padding: .15rem 0; }
.policy-categories { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem .75rem; margin: .5rem 0 .75rem; }
.policy-category { display: flex; gap: .5rem; align-items: center; border: 1px solid #e3e8f0; border-radius: 8px; padding: .4rem .6rem; font-size: .9rem; }
.policy-category.risky { border-color: #e8c48a; background: #fdf7ea; }
.policy-category input:disabled ~ span { color: #66738a; }
.policy-risk { margin-left: auto; font-size: .75rem; color: #8a5300; font-weight: 600; }
.policy-opt-in-note { font-size: .82rem; margin: 0 0 .75rem; }
.policy-custom-label { display: block; font-weight: 600; margin-bottom: .3rem; }
.policy-form #policy-custom { width: 100%; box-sizing: border-box; padding: .45rem; border: 1px solid #dce3ee; border-radius: 6px; margin-bottom: .75rem; }
.policy-blocked { font-size: .82rem; margin-bottom: .75rem; }
.policy-blocked-label { font-weight: 600; }
.policy-blocked code { word-break: break-word; }
.policy-actions { display: flex; gap: .75rem; align-items: center; margin-bottom: .5rem; }
.upload-policy-hint { margin: .25rem 0 0; }
.admin-tabs { display: flex; gap: .25rem; margin-bottom: 1rem; border-bottom: 1px solid #e3e8f0; }
.admin-tab { background: transparent; border: none; border-bottom: 2px solid transparent; padding: .5rem 1rem; cursor: pointer; color: #546e7a; }
.admin-tab.active { color: var(--brand-primary); border-bottom-color: var(--brand-primary); font-weight: 600; }

.admin-form { margin-bottom: 1rem; }
.admin-form .form-row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.admin-form input[type="email"], .admin-form select { padding: .5rem; border: 1px solid #dce3ee; border-radius: 8px; }
.admin-form input[type="email"] { min-width: 220px; }

.new-user-password { background: #f4f6f8; border: 1px solid #e3e8f0; border-radius: 8px; padding: 1rem; margin-top: .75rem; }
.new-user-password code { display: block; padding: .75rem; background: var(--brand-surface); border: 1px dashed var(--brand-primary); border-radius: 6px; word-break: break-all; font-size: 1.1rem; font-family: monospace; }
.password-actions { display: flex; gap: .5rem; margin-top: .5rem; }

.admin-modal .modal-body { min-height: 340px; }

/* Branding tab */
.branding-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.branding-section { border: 1px solid #e3e8f0; border-radius: 8px; padding: 1rem; }
.branding-section h4 { margin: 0 0 .35rem; }
.branding-section > .muted { font-size: .82rem; }
.branding-preview-row { min-height: 60px; display: flex; align-items: center; margin: .5rem 0; }
.branding-thumb { max-height: 60px; max-width: 100%; border: 1px solid #dce3ee; border-radius: 6px; background: #f8f9fa; object-fit: contain; }
.branding-thumb-logo { max-height: 40px; }
.branding-controls { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .5rem; }
.branding-controls input[type="file"] { font-size: .8rem; max-width: 230px; }
.branding-colors { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: .75rem; }
.branding-colors label { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-size: .85rem; }
.branding-colors input[type="color"] { width: 3rem; height: 2rem; border: 1px solid #dce3ee; border-radius: 6px; padding: 2px; background: var(--brand-surface); cursor: pointer; }
/* Live preview pane — theme vars are set scoped on this element by JS, so the
   draft theme previews here without touching the rest of the UI until Save. */
.branding-preview-pane { border: 1px solid #dce3ee; border-radius: 8px; overflow: hidden; background: var(--brand-page-bg); }
.branding-preview-pane .preview-nav { background: var(--brand-surface); padding: .5rem .75rem; font-size: .8rem; display: flex; justify-content: space-between; align-items: center; }
.branding-preview-pane .preview-card { margin: .75rem; padding: .75rem; background: var(--brand-surface); border: 1px solid #dce3ee; border-radius: 8px; display: flex; gap: .75rem; align-items: center; }
.branding-preview-pane .preview-btn { background: var(--brand-primary); color: var(--brand-on-primary); padding: .4rem .8rem; font-size: .8rem; }
.branding-preview-pane .preview-btn:hover { background: var(--brand-accent); color: var(--brand-on-accent); }
.branding-preview-pane .preview-btn-secondary { background: #e8edf5; color: #243450; padding: .4rem .8rem; font-size: .8rem; }
.branding-preview-pane .preview-btn-strong { background: var(--brand-strong); color: var(--brand-on-strong); padding: .4rem .8rem; font-size: .8rem; }
.branding-preview-pane .preview-link { color: var(--brand-primary); font-size: .8rem; }

@media (max-width: 900px) {
  .branding-grid { grid-template-columns: 1fr; }
  .policy-categories { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .explorer-layout {
    flex-direction: column;
  }
  
  .folder-sidebar {
    width: 100%;
  }
  
  .modal-content {
    width: 95vw;
    max-height: 95vh;
  }
}

@media (max-width: 620px) {
  header { align-items: flex-start; }
  .breadcrumb-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .view-controls {
    width: 100%;
    justify-content: flex-end;
  }
  
  /* Hide storage class column on mobile */
  th:nth-child(4), td:nth-child(4) {
    display: none;
  }
  
  /* Adjust table for mobile */
  .file-browser table {
    font-size: 0.8rem;
  }
  
  .file-browser th, .file-browser td {
    padding: 0.4rem;
  }
}
