.dashboard-toolbar > .fx-toolbar-extras { display: none; margin-left: auto; align-items: center; gap: 12px; }
body:has(#fileExchangeModal.active) .dashboard-toolbar > .fx-toolbar-extras { display: flex; }
.fx-usage { width: 160px; height: 6px; overflow: hidden; border-radius: 3px; background: var(--ui-border); }
.fx-usage[hidden] { display: none; }
.fx-usage span { display: block; height: 100%; background: var(--ui-primary); }
.fx-search { position: relative; display: flex; align-items: center; }
#fxSearch { position: absolute; top: 50%; right: calc(100% + 6px); width: 280px; max-width: 50vw; min-height: 36px; padding: 6px 10px; border: 1px solid var(--ui-border-strong); border-radius: var(--ui-radius-sm); background: var(--ui-surface); color: inherit; font: inherit; opacity: 0; visibility: hidden; transform: translate(12px, -50%); transition: opacity .2s ease, transform .25s ease, visibility 0s linear .25s; }
.fx-search.is-open #fxSearch { opacity: 1; visibility: visible; transform: translate(0, -50%); transition-delay: 0s; }
#fxSearchToggle { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--ui-border); border-radius: var(--ui-radius-sm); background: var(--ui-surface); color: inherit; cursor: pointer; }
#fxSearchToggle:hover { filter: brightness(.96); }
#fxSearchToggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fx-search.is-open #fxSearchToggle { color: var(--ui-primary); border-color: var(--ui-primary); }

:where(#fileExchangeModal, #presentationsModal .fx-actions) button { min-height: var(--ui-control-height); padding: 0 14px; border: 1px solid var(--ui-border-strong); border-radius: var(--ui-radius-sm); background: var(--ui-surface); color: var(--ui-text-secondary); font: inherit; font-weight: 600; cursor: pointer; }
:where(#fileExchangeModal, #presentationsModal .fx-actions) button:hover:not(:disabled) { border-color: #a9c7eb; background: var(--ui-primary-soft); color: var(--ui-primary); }
#fileExchangeModal button:disabled { opacity: .5; cursor: not-allowed; }
#fileExchangeModal [hidden] { display: none !important; }
#fileExchangeModal .fx-primary, #presentationsModal .fx-primary { border-color: var(--ui-primary); background: var(--ui-primary); color: #fff; }
#fileExchangeModal .fx-primary:hover:not(:disabled), #presentationsModal .fx-primary:hover:not(:disabled) { border-color: var(--ui-primary-hover); background: var(--ui-primary-hover); color: #fff; }
#fileExchangeModal .fx-danger { color: var(--ui-danger); }
#fileExchangeModal .fx-danger:hover:not(:disabled) { border-color: var(--ui-danger); background: var(--ui-danger-soft); color: var(--ui-danger); }

.fx-page { position: relative; }
.fx-commands { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.fx-breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; font-size: 15px; }
#fileExchangeModal .fx-breadcrumbs button, #presentationsModal .fx-breadcrumbs button { min-height: 28px; padding: 0 4px; border: 0; background: none; color: var(--ui-primary); font-weight: 600; }
#fileExchangeModal .fx-breadcrumbs button:hover, #presentationsModal .fx-breadcrumbs button:hover { background: var(--ui-primary-soft); }
.fx-breadcrumbs [aria-current] { color: var(--ui-text); font-weight: 700; overflow-wrap: anywhere; }
.fx-crumb-sep { color: var(--ui-border-strong); }
.fx-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fx-readonly { padding: 4px 12px; border: 1px solid var(--ui-border-strong); border-radius: 999px; background: var(--ui-surface-subtle); color: var(--ui-text-secondary); font-size: 12px; font-weight: 600; }
.fx-menu { position: fixed; z-index: var(--ui-z-menu); min-width: 200px; padding: 4px; display: grid; border: 1px solid var(--ui-border); border-radius: var(--ui-radius-md); background: var(--ui-surface); box-shadow: var(--ui-shadow-sm); }
.fx-menu[hidden] { display: none; }
.fx-menu button { min-height: 34px; padding: 0 12px; border: 0; border-radius: var(--ui-radius-sm); background: none; color: var(--ui-text); font: inherit; text-align: left; cursor: pointer; }
.fx-menu button[hidden] { display: none; }
.fx-menu button:hover:not(:disabled), .fx-menu button:focus-visible { background: var(--ui-primary-soft); color: var(--ui-primary); outline: none; }
.fx-menu button:disabled { opacity: .5; cursor: not-allowed; }
.fx-menu .fx-danger { color: var(--ui-danger); }
.fx-menu .fx-danger:hover:not(:disabled), .fx-menu .fx-danger:focus-visible { background: var(--ui-danger-soft); color: var(--ui-danger); }
.fx-table-wrap { overflow: auto; max-height: calc(100vh - 260px); border: 1px solid var(--ui-border); border-radius: var(--ui-radius-md); background: var(--ui-surface); }
.fx-table { width: 100%; border-collapse: collapse; }
.fx-table th, .fx-table td { padding: 10px 12px; border-bottom: 1px solid #e9edf2; text-align: left; }
.fx-table thead th { position: sticky; top: 0; z-index: 1; background: var(--ui-surface-subtle); color: var(--ui-text-secondary); font-size: 12px; font-weight: 600; }
.fx-table th.fx-optional, .fx-table td.fx-optional { width: 160px; white-space: nowrap; color: var(--ui-text-secondary); }
.fx-table tbody tr { cursor: pointer; user-select: none; }
.fx-table tbody tr:hover td { background: rgba(31, 95, 174, .035); }
.fx-table tbody tr.is-selected td { background: var(--ui-primary-soft); }
.fx-marquee { position: fixed; z-index: var(--ui-z-menu); border: 1px solid var(--ui-primary); border-radius: 2px; background: rgba(31, 95, 174, .12); pointer-events: none; }
.fx-marquee[hidden] { display: none; }
body.fx-marquee-active { user-select: none; cursor: default; }

#fxPreviewModal .fx-preview { position: relative; display: flex; flex-direction: column; gap: 12px; width: 96vw; max-width: none; height: 92vh; max-height: 92vh; padding: 20px; overflow: hidden; }
#fxPreviewModal h2 { margin: 0; padding-right: 120px; font-size: 17px; overflow-wrap: anywhere; }
#fxPreviewModal .fx-preview-tabs { display: flex; flex-wrap: wrap; }
#fxPreviewModal .fx-preview-tabs[hidden] { display: none; }
.fx-preview-body { flex: 1 1 auto; min-height: 0; overflow: auto; border: 1px solid var(--ui-border); border-radius: var(--ui-radius-md); background: var(--ui-surface); }
.fx-preview-note { margin: 16px; color: var(--ui-text-secondary); }
.fx-preview-body > button { margin: 0 16px 16px; min-height: var(--ui-control-height); padding: 0 14px; border: 1px solid var(--ui-primary); border-radius: var(--ui-radius-sm); background: var(--ui-primary); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.fx-preview-body > .fx-preview-media { display: block; border: 0; }
.fx-preview-body > iframe.fx-preview-media { width: 100%; height: 100%; }
.fx-preview-body > img.fx-preview-media { max-width: 100%; max-height: 100%; margin: 0 auto; object-fit: contain; }
#fxPreviewModal .fx-preview-actions { position: absolute; top: 10px; right: 48px; display: flex; gap: 4px; }
#fxPreviewModal .fx-preview-action { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 0; border-radius: var(--ui-radius-sm); background: none; color: var(--ui-text-muted); cursor: pointer; }
#fxPreviewModal .fx-preview-action:hover { background: var(--ui-surface-subtle); color: var(--ui-text); }
#fxPreviewModal .fx-preview-action[hidden] { display: none; }
#fxPreviewModal .fx-sheet { width: max-content; min-width: 0; border-collapse: collapse; font-size: 13px; line-height: 1.35; }
#fxPreviewModal .fx-sheet th, #fxPreviewModal .fx-sheet td { height: auto; padding: 3px 6px; border: 1px solid #e2e6ec; white-space: nowrap; vertical-align: bottom; }
.fx-sheet td.is-wrapped { white-space: pre-wrap; }
.fx-sheet thead th { position: sticky; top: 0; z-index: 2; background: var(--ui-surface-subtle); color: var(--ui-text-secondary); font-weight: 600; text-align: center; }
.fx-sheet tbody th { position: sticky; left: 0; z-index: 1; min-width: 40px; background: var(--ui-surface-subtle); color: var(--ui-text-secondary); font-weight: 600; text-align: right; }
.fx-sheet .fx-sheet-corner { left: 0; z-index: 3; }
.fx-docx-host { min-height: 100%; background: #eef1f5; }
.fx-docx-host .fx-docx-wrapper { background: transparent; }
.fx-table tbody tr:focus-visible { outline: 2px solid var(--ui-focus); outline-offset: -2px; }
.fx-table tbody tr:last-child td { border-bottom: 0; }
#fileExchangeModal .fx-name { min-height: 24px; padding: 0; display: inline-flex; align-items: center; gap: 10px; border: 0; background: none; color: var(--ui-text); font-weight: 500; text-align: left; overflow-wrap: anywhere; }
#fileExchangeModal .fx-name:hover { background: none; color: var(--ui-primary); }
#fileExchangeModal .fx-name.folder { color: var(--ui-primary); font-weight: 600; }
.fx-name .ui-icon { width: 18px; height: 18px; flex: 0 0 auto; }
.fx-name.file .ui-icon { color: var(--ui-text-muted); }
.fx-empty { padding: 32px 16px; color: var(--ui-text-secondary); text-align: center; }

#fileExchangeModal .modal.drag-over > *:not(.drop-overlay) { filter: blur(3px); pointer-events: none; }
#fileExchangeModal .modal.drag-over .drop-overlay { display: flex; }

@media (max-width: 650px) {
  .fx-table .fx-optional { display: none; }
  .fx-actions { width: 100%; }
  .fx-actions button { flex: 1 1 calc(50% - 8px); }
  .fx-menu button { min-height: 44px; }
  .fx-usage { width: 96px; }
}
@media (prefers-reduced-motion: reduce) { #fxSearch { transition: none; } }
