/* BioStudio AI — File Explorer · Windows 11 Fluent style */

.fe-explorer-root {
  --fe-accent: #005fb8;
  --fe-accent-hover: #003f75;
  --fe-accent-soft: rgba(0, 95, 184, 0.12);
  --fe-accent-strong: rgba(0, 95, 184, 0.22);
  --fe-surface: #f3f3f3;
  --fe-elevated: #ffffff;
  --fe-sidebar: #f9f9f9;
  --fe-line: rgba(0, 0, 0, 0.06);
  --fe-line-strong: rgba(0, 0, 0, 0.1);
  --fe-ink: #1a1a1a;
  --fe-ink-soft: #5d5d5d;
  --fe-radius: 6px;
  --fe-radius-lg: 8px;
  --fe-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.04);
  color: var(--fe-ink);
  background: var(--fe-surface);
}

.dark .fe-explorer-root {
  --fe-accent: #60cdff;
  --fe-accent-hover: #99ebff;
  --fe-accent-soft: rgba(96, 205, 255, 0.14);
  --fe-accent-strong: rgba(96, 205, 255, 0.24);
  --fe-surface: #202020;
  --fe-elevated: #2c2c2c;
  --fe-sidebar: #272727;
  --fe-line: rgba(255, 255, 255, 0.06);
  --fe-line-strong: rgba(255, 255, 255, 0.1);
  --fe-ink: #ffffff;
  --fe-ink-soft: #c5c5c5;
  --fe-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.fe-explorer-root .fe-explorer {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: var(--fe-surface);
}

.fe-explorer-root .fe-body {
  flex: 1 1 auto;
  min-height: 0;
  background: var(--fe-surface);
}

.fe-explorer-root .files-main {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  background: var(--fe-elevated);
  border-radius: var(--fe-radius-lg) 0 0 0;
  box-shadow: var(--fe-shadow);
  overflow: hidden;
}

.fe-explorer-root .fe-command-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--fe-line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.2)),
    var(--fe-surface);
  backdrop-filter: blur(28px) saturate(1.2);
  flex-wrap: wrap;
}

.dark .fe-explorer-root .fe-command-bar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    var(--fe-surface);
}

.fe-explorer-root .fe-toolbar-group {
  display: flex;
  align-items: center;
  gap: 2px;
  padding-right: 8px;
  margin-right: 4px;
  border-right: 1px solid var(--fe-line);
}

.fe-explorer-root .fe-toolbar-group:last-of-type,
.fe-explorer-root .fe-toolbar-trailing {
  border-right: none;
  padding-right: 0;
  margin-right: 0;
}

.fe-explorer-root .fe-toolbar-trailing {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  justify-content: flex-end;
  flex-wrap: wrap;
  min-width: 220px;
}

.fe-explorer-root .fe-nav-buttons { display: flex; gap: 2px; }

.fe-explorer-root .fe-tool-btn {
  height: 32px;
  min-width: 32px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: var(--fe-radius);
  background: transparent;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--fe-ink);
  white-space: nowrap;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.fe-explorer-root .fe-tool-btn:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.04);
}

.dark .fe-explorer-root .fe-tool-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
}

.fe-explorer-root .fe-tool-btn.is-active {
  background: var(--fe-accent-soft);
  color: var(--fe-accent);
}

.fe-explorer-root .fe-tool-btn.is-danger:hover:not(:disabled) {
  background: rgba(196, 43, 28, 0.1);
  color: #c42b1c;
}

.fe-explorer-root .fe-tool-btn:disabled {
  opacity: 0.38;
  cursor: default;
}

.fe-explorer-root .fe-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 180px;
  max-width: 280px;
  min-width: 150px;
  padding: 0 12px;
  height: 32px;
  border: 1px solid var(--fe-line-strong);
  border-radius: 999px;
  background: var(--fe-elevated);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.fe-explorer-root .fe-search-icon {
  color: var(--fe-ink-soft);
  font-size: 13px;
}

.fe-explorer-root .fe-search-wrap .fe-search-input,
.fe-explorer-root .fe-search-input {
  flex: 1;
  min-width: 0;
  max-width: none;
  border: none;
  background: transparent;
  padding: 0;
  box-shadow: none;
  outline: none;
  font-size: 13px;
  color: var(--fe-ink);
}

.fe-explorer-root .fe-search-wrap:focus-within {
  border-color: var(--fe-accent);
  box-shadow: 0 0 0 1px var(--fe-accent);
}

.fe-explorer-root .fe-filter-group .fe-tool-btn {
  padding: 0 10px;
  border-radius: 999px;
  height: 28px;
}

.fe-explorer-root .fe-view-switcher {
  display: flex;
  gap: 0;
  padding: 2px;
  border-radius: var(--fe-radius-lg);
  background: rgba(0, 0, 0, 0.04);
}

.dark .fe-explorer-root .fe-view-switcher {
  background: rgba(255, 255, 255, 0.06);
}

.fe-explorer-root .fe-view-btn {
  width: 30px;
  height: 28px;
  border: none;
  border-radius: var(--fe-radius);
  background: transparent;
  cursor: pointer;
  color: var(--fe-ink-soft);
}

.fe-explorer-root .fe-view-btn.active {
  background: var(--fe-elevated);
  color: var(--fe-accent);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.fe-explorer-root .fe-nav-pane,
.fe-explorer-root .files-sidebar {
  width: var(--files-sidebar-w, 220px);
  min-width: 180px;
  background: var(--fe-sidebar);
  border-right: 1px solid var(--fe-line);
  padding: 10px 8px;
}

.fe-explorer-root .fe-nav-header {
  font-size: 11px;
  font-weight: 600;
  color: var(--fe-ink-soft);
  padding: 10px 12px 6px;
  text-transform: none;
  letter-spacing: 0;
}

.fe-explorer-root .fe-nav-item,
.fe-explorer-root .files-side-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 10px;
  border-radius: var(--fe-radius);
  font-size: 13px;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--fe-ink);
  cursor: pointer;
  margin: 1px 0;
  transition: background 100ms ease;
}

.fe-explorer-root .fe-nav-item:hover,
.fe-explorer-root .files-side-item:hover {
  background: rgba(0, 0, 0, 0.04);
}

.dark .fe-explorer-root .fe-nav-item:hover,
.dark .fe-explorer-root .files-side-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.fe-explorer-root .fe-nav-item.active,
.fe-explorer-root .files-side-item.active {
  background: var(--fe-accent-soft);
  color: var(--fe-accent);
  font-weight: 600;
}

.fe-explorer-root .fe-nav-item.is-nested {
  padding-left: 28px;
  font-size: 12.5px;
}

.fe-explorer-root .fe-nav-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fe-explorer-root .fe-nav-icon {
  width: 18px;
  text-align: center;
  flex: 0 0 auto;
}

.fe-explorer-root .fe-address-bar,
.fe-explorer-root .files-path {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 8px;
  background: var(--fe-elevated);
  border-bottom: 1px solid var(--fe-line);
}

.fe-explorer-root .fe-address-shell {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 34px;
  padding: 2px 4px 2px 6px;
  border: 1px solid var(--fe-line-strong);
  border-radius: var(--fe-radius-lg);
  background: var(--fe-surface);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.fe-explorer-root .fe-address-shell:hover {
  border-color: color-mix(in srgb, var(--fe-accent) 35%, var(--fe-line-strong));
}

.fe-explorer-root .fe-crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  flex: 1;
  min-width: 0;
}

.fe-explorer-root .files-path-crumb {
  background: transparent;
  border: 0;
  padding: 5px 8px;
  border-radius: var(--fe-radius);
  color: var(--fe-ink-soft);
  font-size: 12.5px;
  cursor: pointer;
}

.fe-explorer-root .files-path-crumb:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--fe-ink);
}

.dark .fe-explorer-root .files-path-crumb:hover {
  background: rgba(255, 255, 255, 0.07);
}

.fe-explorer-root .files-path-crumb.current {
  color: var(--fe-ink);
  font-weight: 600;
}

.fe-explorer-root .files-path-sep {
  color: var(--fe-ink-soft);
  opacity: 0.55;
  padding: 0 1px;
  font-size: 11px;
}

.fe-explorer-root .fe-address-tools { display: flex; gap: 2px; }

.fe-explorer-root .fe-address-edit {
  border: none;
  background: transparent;
  cursor: pointer;
  opacity: 0.55;
  font-size: 12px;
  width: 28px;
  height: 28px;
  border-radius: var(--fe-radius);
  color: var(--fe-ink);
}

.fe-explorer-root .fe-address-edit:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.05);
}

.fe-explorer-root .fe-address-input {
  flex: 1;
  min-width: 200px;
  padding: 7px 12px;
  border: 1px solid var(--fe-accent);
  border-radius: var(--fe-radius-lg);
  font-size: 13px;
  background: var(--fe-elevated);
  color: var(--fe-ink);
  outline: none;
  box-shadow: 0 0 0 1px var(--fe-accent);
}

.fe-explorer-root .fe-selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: 8px 12px 0;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--fe-accent) 28%, transparent);
  border-radius: var(--fe-radius-lg);
  background: var(--fe-accent-soft);
}

.fe-explorer-root .fe-selection-bar[hidden] { display: none !important; }

.fe-explorer-root .fe-selection-summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12.5px;
}

.fe-explorer-root .fe-selection-meta { color: var(--fe-ink-soft); }
.fe-explorer-root .fe-selection-actions { display: flex; flex-wrap: wrap; gap: 2px; }

.fe-explorer-root .files-grid {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  background: var(--fe-elevated);
}

.fe-explorer-root .files-grid.fe-view-icons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 6px;
  padding: 14px;
  align-content: start;
}

.fe-explorer-root .fe-icon-tile {
  border-radius: var(--fe-radius-lg);
  padding: 10px 6px 8px;
  border: 1px solid transparent;
  transition: background 100ms ease, border-color 100ms ease;
}

.fe-explorer-root .fe-icon-tile:hover {
  background: rgba(0, 0, 0, 0.035);
}

.dark .fe-explorer-root .fe-icon-tile:hover {
  background: rgba(255, 255, 255, 0.05);
}

.fe-explorer-root .fe-icon-tile .fe-icon-svg {
  width: 44px;
  height: 44px;
}

.fe-explorer-root .fe-icon-tile .file-name {
  font-size: 12px;
  line-height: 1.25;
  color: var(--fe-ink);
}

.fe-explorer-root .fe-icon-meta {
  display: block;
  font-size: 10.5px;
  color: var(--fe-ink-soft);
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fe-explorer-root .file-item.selected,
.fe-explorer-root .fe-icon-tile.selected {
  background: var(--fe-accent-strong) !important;
  outline: none;
  border-color: color-mix(in srgb, var(--fe-accent) 45%, transparent);
}

.fe-explorer-root .files-marquee {
  border: 1px solid var(--fe-accent);
  background: var(--fe-accent-soft);
  border-radius: 2px;
}

.fe-explorer-root .fe-drop-target {
  background: var(--fe-accent-soft) !important;
  outline: 2px dashed var(--fe-accent);
  outline-offset: -2px;
}

.fe-explorer-root .files-grid.fe-view-list,
.fe-explorer-root .files-grid.fe-view-details {
  display: flex;
  flex-direction: column;
  padding: 4px 0;
}

.fe-explorer-root .fe-details-header,
.fe-explorer-root .fe-list-row {
  display: grid;
  grid-template-columns: 28px 1fr 150px 110px 88px;
  align-items: center;
  gap: 8px;
  text-align: left;
  width: 100%;
  border-radius: 0;
  padding: 6px 14px;
  border: none;
  background: transparent;
  color: var(--fe-ink);
}

.fe-explorer-root .fe-details-header {
  font-size: 12px;
  font-weight: 600;
  color: var(--fe-ink-soft);
  border-bottom: 1px solid var(--fe-line);
  background: color-mix(in srgb, var(--fe-surface) 70%, var(--fe-elevated));
  padding: 8px 14px;
  position: sticky;
  top: 0;
  z-index: 1;
}

.fe-explorer-root .fe-col-sort {
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
  padding: 2px 4px;
  border-radius: 4px;
}

.fe-explorer-root .fe-col-sort:hover,
.fe-explorer-root .fe-col-sort.active {
  color: var(--fe-accent);
}

.fe-explorer-root .fe-list-row { border-bottom: 1px solid transparent; }

.fe-explorer-root .fe-list-row:hover {
  background: rgba(0, 0, 0, 0.035);
}

.dark .fe-explorer-root .fe-list-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.fe-explorer-root .fe-list-row.selected {
  background: var(--fe-accent-strong) !important;
}

.fe-explorer-root .fe-list-icon .fe-icon-svg {
  width: 20px;
  height: 20px;
}

.fe-explorer-root .fe-list-name { font-size: 13px; text-align: left; }
.fe-explorer-root .fe-list-modified,
.fe-explorer-root .fe-list-type,
.fe-explorer-root .fe-list-size {
  font-size: 12px;
  color: var(--fe-ink-soft);
}

.fe-explorer-root .fe-rename-input {
  width: 100%;
  font-size: 12px;
  padding: 3px 6px;
  border: 1px solid var(--fe-accent);
  border-radius: 4px;
  text-align: center;
  outline: none;
  box-shadow: 0 0 0 1px var(--fe-accent);
}

.fe-explorer-root .fe-list-row .fe-rename-input { text-align: left; }

.fe-explorer-root .fe-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 56px 24px;
  text-align: center;
  grid-column: 1 / -1;
}

.fe-explorer-root .fe-empty-glyph { font-size: 48px; line-height: 1; opacity: 0.8; }
.fe-explorer-root .fe-empty-title { margin: 0; font-size: 17px; font-weight: 600; }
.fe-explorer-root .fe-empty-copy {
  margin: 0;
  max-width: 340px;
  color: var(--fe-ink-soft);
  font-size: 13px;
}
.fe-explorer-root .fe-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
}

.fe-explorer-root .files-preview {
  width: var(--files-preview-w, 280px);
  background: var(--fe-sidebar);
  border-left: 1px solid var(--fe-line);
}

.fe-explorer-root .files-preview.fe-preview-active {
  display: flex;
  flex-direction: column;
}

.fe-explorer-root .files-preview.fe-preview-active:empty::before { content: none; }

.fe-explorer-root .files-preview-head {
  padding: 14px;
  border-bottom: 1px solid var(--fe-line);
  gap: 10px;
}

.fe-explorer-root .fe-preview-body {
  padding: 12px;
  overflow: auto;
  flex: 1;
}

.fe-explorer-root .fe-preview-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: var(--fe-radius);
}

.fe-explorer-root .fe-preview-pdf {
  width: 100%;
  height: 320px;
  border: none;
  border-radius: var(--fe-radius);
}

.fe-explorer-root .fe-preview-icon { text-align: center; padding: 28px; }
.fe-explorer-root .fe-preview-icon .fe-icon-svg { width: 72px; height: 72px; }
.fe-explorer-root .fe-preview-placeholder {
  color: var(--fe-ink-soft);
  text-align: center;
  padding: 16px;
  font-size: 12.5px;
}

.fe-explorer-root .fe-preview-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.fe-explorer-root .fe-preview-stats > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 8px;
  border-radius: var(--fe-radius-lg);
  background: var(--fe-elevated);
  text-align: center;
  box-shadow: var(--fe-shadow);
}

.fe-explorer-root .fe-preview-stats strong { font-size: 14px; }
.fe-explorer-root .fe-preview-stats span { font-size: 11px; color: var(--fe-ink-soft); }

.fe-explorer-root .fe-preview-list {
  margin: 0;
  padding: 0 0 0 18px;
  font-size: 12.5px;
  color: var(--fe-ink-soft);
}

.fe-explorer-root .fe-statusbar,
.fe-explorer-root .app-statusbar {
  border-top: 1px solid var(--fe-line);
  background: var(--fe-surface);
  font-size: 12px;
  color: var(--fe-ink-soft);
  padding: 6px 14px;
}

.fe-explorer-root .fe-sync-badge {
  font-size: 11px;
  color: var(--fe-ink-soft);
  margin-left: 4px;
}

.fe-explorer-root .fe-quicklook {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(8px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fe-explorer-root .fe-quicklook[hidden] { display: none; }

.fe-explorer-root .fe-quicklook-inner {
  background: var(--fe-elevated);
  border-radius: 12px;
  padding: 18px;
  max-width: 80%;
  max-height: 80%;
  overflow: auto;
  position: relative;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
}

.fe-explorer-root .fe-quicklook-close {
  position: absolute;
  top: 8px;
  right: 8px;
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
  color: var(--fe-ink);
}

.fe-explorer-root .fe-sort-btn,
.fe-explorer-root .fe-view-menu-btn,
.fe-explorer-root .fe-preview-toggle {
  border: none;
  border-radius: var(--fe-radius);
  background: transparent;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
}

.fe-properties-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  outline: none;
}

.fe-properties-dialog {
  background: var(--fe-elevated, #fff);
  color: var(--fe-ink, #1a1a1a);
  border-radius: 12px;
  padding: 0;
  width: min(420px, calc(100vw - 32px));
  max-height: min(80vh, 640px);
  overflow: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
  border: 1px solid var(--fe-line-strong, rgba(0, 0, 0, 0.08));
}

.fe-prop-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px 12px;
  border-bottom: 1px solid var(--fe-line, rgba(0, 0, 0, 0.07));
}

.fe-prop-glyph { font-size: 30px; line-height: 1; flex: 0 0 auto; }
.fe-prop-titles h3 { margin: 0; font-size: 16px; font-weight: 650; word-break: break-word; }
.fe-prop-sub { margin: 4px 0 0; font-size: 12.5px; color: var(--fe-ink-soft, #667085); }

.fe-prop-grid {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 8px 14px;
  margin: 0;
  padding: 14px 20px;
  font-size: 13px;
}

.fe-prop-grid dt { color: var(--fe-ink-soft, #667085); font-weight: 500; }
.fe-prop-grid dd { margin: 0; word-break: break-word; }
.fe-prop-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}
.fe-prop-soft { color: var(--fe-ink-soft, #667085); }
.fe-prop-note { margin: 0 20px; font-size: 12px; color: var(--fe-ink-soft, #667085); }
.fe-prop-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--fe-line, rgba(0, 0, 0, 0.07));
}

.dark .fe-properties-dialog {
  background: #2c2c2c;
  color: #f3f3f3;
}
