/* BioStudio AI — File Explorer · macOS Sequoia / Finder style */

#os.theme-macos .fe-explorer-root {
  --fe-accent: #0071e3;
  --fe-accent-hover: #0077ed;
  --fe-accent-soft: rgba(0, 113, 227, 0.14);
  --fe-accent-strong: rgba(0, 113, 227, 0.2);
  --fe-surface: #ececec;
  --fe-elevated: #ffffff;
  --fe-sidebar: rgba(246, 246, 246, 0.86);
  --fe-line: rgba(0, 0, 0, 0.08);
  --fe-line-strong: rgba(0, 0, 0, 0.12);
  --fe-ink: #1d1d1f;
  --fe-ink-soft: rgba(0, 0, 0, 0.48);
  --fe-radius: 8px;
  --fe-radius-lg: 10px;
  --fe-shadow: 0 0.5px 0 rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  background: var(--fe-surface);
}

#os.theme-macos.dark .fe-explorer-root {
  --fe-accent: #0a84ff;
  --fe-accent-hover: #409cff;
  --fe-accent-soft: rgba(10, 132, 255, 0.18);
  --fe-accent-strong: rgba(10, 132, 255, 0.26);
  --fe-surface: #1e1e1e;
  --fe-elevated: #2a2a2a;
  --fe-sidebar: rgba(36, 36, 38, 0.92);
  --fe-line: rgba(255, 255, 255, 0.08);
  --fe-line-strong: rgba(255, 255, 255, 0.12);
  --fe-ink: #f5f5f7;
  --fe-ink-soft: rgba(255, 255, 255, 0.55);
  --fe-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

#os.theme-macos .fe-explorer-root .fe-explorer {
  background: transparent;
}

#os.theme-macos .fe-explorer-root .fe-body {
  background: transparent;
  gap: 0;
}

#os.theme-macos .fe-explorer-root .files-main {
  background: var(--fe-elevated);
  border-radius: 0;
  box-shadow: none;
  border-left: 1px solid var(--fe-line);
}

/* Unified Finder toolbar */
#os.theme-macos .fe-explorer-root .fe-command-bar {
  background: rgba(246, 246, 248, 0.72);
  border-bottom: 1px solid var(--fe-line);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  padding: 7px 12px;
  gap: 8px;
}

#os.theme-macos.dark .fe-explorer-root .fe-command-bar {
  background: rgba(42, 42, 46, 0.78);
}

#os.theme-macos .fe-explorer-root .fe-toolbar-group {
  border-right-color: rgba(0, 0, 0, 0.08);
  padding-right: 10px;
  margin-right: 6px;
  gap: 4px;
}

#os.theme-macos.dark .fe-explorer-root .fe-toolbar-group {
  border-right-color: rgba(255, 255, 255, 0.1);
}

#os.theme-macos .fe-explorer-root .fe-tool-btn {
  height: 28px;
  min-width: 28px;
  padding: 0 10px;
  border: none;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.045);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

#os.theme-macos .fe-explorer-root .fe-tool-btn.is-ghost {
  background: transparent;
}

#os.theme-macos .fe-explorer-root .fe-tool-btn:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.08);
}

#os.theme-macos.dark .fe-explorer-root .fe-tool-btn {
  background: rgba(255, 255, 255, 0.08);
}

#os.theme-macos.dark .fe-explorer-root .fe-tool-btn.is-ghost {
  background: transparent;
}

#os.theme-macos.dark .fe-explorer-root .fe-tool-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
}

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

#os.theme-macos .fe-explorer-root .fe-tool-btn.is-danger:hover:not(:disabled) {
  background: rgba(255, 69, 58, 0.12);
  color: #ff453a;
}

/* Sidebar — Finder favorites */
#os.theme-macos .fe-explorer-root .fe-nav-pane,
#os.theme-macos .fe-explorer-root .files-sidebar {
  width: var(--files-sidebar-w, 200px);
  min-width: 170px;
  background: var(--fe-sidebar);
  border-right: none;
  padding: 8px 6px 12px;
  backdrop-filter: blur(30px) saturate(160%);
  -webkit-backdrop-filter: blur(30px) saturate(160%);
}

#os.theme-macos .fe-explorer-root .fe-nav-header {
  text-transform: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fe-ink-soft);
  padding: 10px 12px 4px;
}

#os.theme-macos .fe-explorer-root .fe-nav-item,
#os.theme-macos .fe-explorer-root .files-side-item {
  border-radius: 7px;
  margin: 1px 4px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 450;
  gap: 8px;
}

#os.theme-macos .fe-explorer-root .fe-nav-item:hover,
#os.theme-macos .fe-explorer-root .files-side-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

#os.theme-macos.dark .fe-explorer-root .fe-nav-item:hover,
#os.theme-macos.dark .fe-explorer-root .files-side-item:hover {
  background: rgba(255, 255, 255, 0.07);
}

#os.theme-macos .fe-explorer-root .fe-nav-item.active,
#os.theme-macos .fe-explorer-root .files-side-item.active {
  background: var(--fe-accent);
  color: #fff;
  font-weight: 560;
}

#os.theme-macos .fe-explorer-root .fe-nav-item.is-nested {
  padding-left: 26px;
}

/* Search — Spotlight-like pill */
#os.theme-macos .fe-explorer-root .fe-search-wrap {
  height: 28px;
  border-radius: 8px;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.06);
  max-width: 240px;
}

#os.theme-macos.dark .fe-explorer-root .fe-search-wrap {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.08);
}

#os.theme-macos .fe-explorer-root .fe-search-wrap:focus-within {
  background: var(--fe-elevated);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.28), inset 0 0 0 0.5px rgba(0, 113, 227, 0.45);
  border: none;
}

#os.theme-macos .fe-explorer-root .fe-view-switcher {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  padding: 2px;
}

#os.theme-macos .fe-explorer-root .fe-view-btn {
  border-radius: 6px;
  height: 24px;
  width: 28px;
}

#os.theme-macos .fe-explorer-root .fe-view-btn.active {
  background: rgba(255, 255, 255, 0.95);
  color: var(--fe-ink);
  box-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.12);
}

#os.theme-macos.dark .fe-explorer-root .fe-view-btn.active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

/* Path control */
#os.theme-macos .fe-explorer-root .fe-address-bar {
  background: transparent;
  border-bottom: none;
  padding: 6px 12px 4px;
  margin: 0;
}

#os.theme-macos .fe-explorer-root .fe-address-shell {
  border: none;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.04);
  min-height: 30px;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.05);
}

#os.theme-macos.dark .fe-explorer-root .fe-address-shell {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

#os.theme-macos .fe-explorer-root .files-path-crumb {
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 12px;
  font-weight: 500;
}

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

#os.theme-macos .fe-explorer-root .files-path-sep {
  opacity: 0.35;
  font-size: 12px;
}

#os.theme-macos .fe-explorer-root .fe-address-edit {
  border-radius: 6px;
  width: 26px;
  height: 26px;
}

/* Selection strip */
#os.theme-macos .fe-explorer-root .fe-selection-bar {
  margin: 4px 12px 6px;
  border: none;
  border-radius: 10px;
  background: var(--fe-accent-soft);
  padding: 7px 10px;
  box-shadow: inset 0 0 0 0.5px color-mix(in srgb, var(--fe-accent) 25%, transparent);
}

/* Icon grid — Finder icon view */
#os.theme-macos .fe-explorer-root .files-grid {
  background: var(--fe-elevated);
}

#os.theme-macos .fe-explorer-root .files-grid.fe-view-icons {
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 10px 8px;
  padding: 16px 18px;
}

#os.theme-macos .fe-explorer-root .fe-icon-tile {
  border-radius: 10px;
  padding: 10px 6px 8px;
  border: none;
}

#os.theme-macos .fe-explorer-root .fe-icon-tile:hover {
  background: rgba(0, 0, 0, 0.04);
}

#os.theme-macos.dark .fe-explorer-root .fe-icon-tile:hover {
  background: rgba(255, 255, 255, 0.06);
}

#os.theme-macos .fe-explorer-root .fe-icon-tile .fe-icon-svg {
  width: 56px;
  height: 56px;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.08));
}

#os.theme-macos .fe-explorer-root .fe-icon-tile .file-name {
  font-size: 12px;
  font-weight: 450;
  letter-spacing: -0.01em;
}

#os.theme-macos .fe-explorer-root .fe-icon-meta {
  font-size: 10px;
  opacity: 0.75;
}

#os.theme-macos .fe-explorer-root .file-item.selected,
#os.theme-macos .fe-explorer-root .fe-icon-tile.selected,
#os.theme-macos .fe-explorer-root .fe-list-row.selected {
  background: var(--fe-accent-strong) !important;
  outline: none;
  border: none;
  border-radius: 10px;
}

#os.theme-macos .fe-explorer-root .file-item.selected .file-name,
#os.theme-macos .fe-explorer-root .fe-list-row.selected .fe-list-name {
  color: var(--fe-accent);
  font-weight: 560;
}

#os.theme-macos .fe-explorer-root .files-marquee {
  border-color: var(--fe-accent);
  background: var(--fe-accent-soft);
  border-radius: 6px;
}

#os.theme-macos .fe-explorer-root .fe-drop-target {
  background: var(--fe-accent-soft) !important;
  outline: 2px dashed var(--fe-accent);
  border-radius: 10px;
}

/* List / columns feel */
#os.theme-macos .fe-explorer-root .fe-details-header {
  background: rgba(246, 246, 248, 0.9);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--fe-line);
  font-size: 11px;
  font-weight: 600;
  color: var(--fe-ink-soft);
  padding: 7px 16px;
}

#os.theme-macos.dark .fe-explorer-root .fe-details-header {
  background: rgba(40, 40, 42, 0.92);
}

#os.theme-macos .fe-explorer-root .fe-list-row {
  padding: 5px 16px;
  border-radius: 0;
}

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

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

/* Preview inspector */
#os.theme-macos .fe-explorer-root .files-preview {
  background: var(--fe-sidebar);
  border-left: 1px solid var(--fe-line);
  backdrop-filter: blur(20px);
}

#os.theme-macos .fe-explorer-root .files-preview-head {
  padding: 16px;
}

#os.theme-macos .fe-explorer-root .fe-preview-stats > div {
  background: rgba(0, 0, 0, 0.035);
  box-shadow: none;
  border-radius: 10px;
}

#os.theme-macos.dark .fe-explorer-root .fe-preview-stats > div {
  background: rgba(255, 255, 255, 0.06);
}

/* Status / empty / quick look */
#os.theme-macos .fe-explorer-root .fe-statusbar,
#os.theme-macos .fe-explorer-root .app-statusbar {
  background: rgba(246, 246, 248, 0.85);
  border-top-color: var(--fe-line);
  backdrop-filter: blur(16px);
  font-size: 11px;
  padding: 5px 14px;
}

#os.theme-macos.dark .fe-explorer-root .fe-statusbar,
#os.theme-macos.dark .fe-explorer-root .app-statusbar {
  background: rgba(36, 36, 38, 0.9);
}

#os.theme-macos .fe-explorer-root .fe-empty-title {
  font-size: 18px;
  font-weight: 620;
  letter-spacing: -0.02em;
}

#os.theme-macos .fe-explorer-root .fe-empty-copy {
  font-size: 13px;
}

#os.theme-macos .fe-explorer-root .fe-quicklook {
  backdrop-filter: blur(28px) saturate(140%);
  background: rgba(0, 0, 0, 0.28);
}

#os.theme-macos .fe-explorer-root .fe-quicklook-inner {
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

#os.theme-macos .fe-properties-dialog {
  border-radius: 14px;
  border: none;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

#os.theme-macos .fe-prop-titles h3 {
  letter-spacing: -0.02em;
}
