.file-explorer {
  width: 100%;
  background: #252526;
  border-right: 1px solid #333;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-size: 12px;
  font-family: 'Segoe UI', sans-serif;
}

.file-explorer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  height: 46px;
  color: #9d9d9d;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #333;
  flex-shrink: 0;
}

.file-explorer-header-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.file-explorer-new-btn {
  background: none;
  border: none;
  color: #9d9d9d;
  cursor: pointer;
  padding: 2px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
}

.file-explorer-new-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.file-explorer-save-btn {
  background: none;
  border: none;
  color: #9d9d9d;
  cursor: pointer;
  padding: 2px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
}

.file-explorer-save-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #4fc3f7;
}

.file-explorer-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
  scrollbar-width: thin;
  scrollbar-color: #3c3c3c transparent;
}

.file-explorer-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  cursor: pointer;
  color: #ccc;
  border-radius: 3px;
  margin: 1px 4px;
  white-space: nowrap;
  overflow: hidden;
  user-select: none;
}

.file-explorer-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.file-explorer-item-active {
  background: rgba(79, 195, 247, 0.12);
  color: #e2e2e2;
}

.file-explorer-item-new {
  background: rgba(255, 255, 255, 0.04);
}

.file-explorer-icon {
  font-size: 12px;
  flex-shrink: 0;
  opacity: 0.8;
}

.file-explorer-name {
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.file-explorer-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e8a87c;
  flex-shrink: 0;
}

.file-explorer-rename-input {
  flex: 1;
  background: #3c3c3c;
  border: 1px solid #4fc3f7;
  color: #fff;
  font-size: 12px;
  padding: 1px 4px;
  border-radius: 2px;
  outline: none;
  min-width: 0;
  font-family: inherit;
}

/* Context menu */
.file-explorer-context-menu {
  position: fixed;
  background: #2d2d2d;
  border: 1px solid #3c3c3c;
  border-radius: 4px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  min-width: 120px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.file-explorer-context-menu button {
  background: none;
  border: none;
  color: #ccc;
  padding: 7px 14px;
  text-align: left;
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
}

.file-explorer-context-menu button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.file-explorer-context-menu button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.ctx-delete:hover:not(:disabled) {
  color: #ef5350 !important;
}

/* ─── Board-grouped FileExplorer ─────────────────── */

.fe-board-section {
  margin-bottom: 2px;
}

.fe-board-header {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 6px 5px 4px;
  cursor: pointer;
  color: #aaa;
  border-radius: 3px;
  margin: 0 4px;
  user-select: none;
  position: relative;
}

.fe-board-header:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ddd;
}

.fe-board-header-active {
  background: rgba(255, 255, 255, 0.05);
  color: #e2e2e2;
}

.fe-collapse-btn {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  opacity: 0.6;
}

.fe-collapse-btn:hover {
  opacity: 1;
}

.fe-board-icon {
  font-size: 10px;
  flex-shrink: 0;
  line-height: 1;
}

.fe-board-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fe-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.fe-board-new-btn {
  background: none;
  border: none;
  color: #9d9d9d;
  cursor: pointer;
  padding: 1px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.1s;
}

.fe-board-header:hover .fe-board-new-btn,
.fe-board-header-active .fe-board-new-btn {
  opacity: 1;
}

.fe-board-new-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.fe-board-files {
  /* files are indented to show hierarchy */
}

.fe-file-item {
  padding-left: 26px !important;
}
