/* ─── The Finder window ─────────────────────────────── */
.finder-window {
  border: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  width: 680px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.45),
    0 20px 60px rgba(0, 0, 0, 0.55),
    0 4px 12px rgba(0, 0, 0, 0.3);
  background: #f5f5f5;
}

/* ─── Title bar ─────────────────────────────────────── */
.finder-titlebar {
  height: 38px;
  background: linear-gradient(to bottom, #e8e8e8, #d8d8d8);
  border-bottom: 1px solid #b0b0b0;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 8px;
  position: relative;
  user-select: none;
}

.finder-titlebar .title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  font-weight: 600;
  color: #333;
  letter-spacing: -0.01em;
}

/* Traffic light buttons */
.traffic-lights {
  display: flex;
  gap: 8px;
}

.tl {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 0.5px solid rgba(0, 0, 0, 0.18);
}
.tl.close {
  background: #ff5f57;
}
.tl.minimize {
  background: #febc2e;
}
.tl.expand {
  background: #28c840;
}

/* ─── Toolbar ────────────────────────────────────────── */
.finder-toolbar {
  height: 40px;
  background: linear-gradient(to bottom, #e0e0e0, #d4d4d4);
  border-bottom: 1px solid #b8b8b8;
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 6px;
}

.tb-btn {
  width: 28px;
  height: 24px;
  border-radius: 5px;
  background: linear-gradient(to bottom, #eee, #ddd);
  border: 1px solid #b0b0b0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  color: #555;
  font-size: 11px;
}

.tb-btn svg {
  width: 13px;
  height: 13px;
  fill: #555;
}

.tb-spacer {
  flex: 1;
}

.tb-search {
  width: 140px;
  height: 22px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid #bbb;
  padding: 0 10px 0 24px;
  font-size: 12px;
  color: #888;
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
}
.tb-search::before {
  content: "🔍";
  font-size: 10px;
  position: absolute;
  left: 7px;
  top: 50%;
  transform: translateY(-50%);
}

/* ─── Body layout ────────────────────────────────────── */
.finder-body {
  display: flex;
  height: 320px;
}

/* Sidebar */
.finder-sidebar {
  width: 160px;
  background: #e8e8e8;
  border-right: 1px solid #c0c0c0;
  padding: 10px 0;
  overflow-y: auto;
  flex-shrink: 0;
}

.sidebar-section {
  margin-bottom: 4px;
}

.sidebar-heading {
  font-size: 10px;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 12px 2px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 3px 12px;
  font-size: 12.5px;
  color: #2a2a2a;
  border-radius: 5px;
  margin: 0 4px;
  cursor: default;
}

.sidebar-item:hover {
  background: rgba(0, 0, 0, 0.07);
}
.sidebar-item.active {
  background: #2563eb;
  color: #fff;
}
.sidebar-item.active .si-icon {
  filter: brightness(10);
}

.si-icon {
  font-size: 14px;
  width: 16px;
  text-align: center;
}

/* Main content area */
.finder-content {
  flex: 1;
  background: #fff;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, 80px);
  gap: 8px;
  align-content: start;
  overflow-y: auto;
}

.file-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 4px;
  border-radius: 6px;
  cursor: default;
  text-align: center;
}

.file-item:hover {
  background: rgba(0, 100, 255, 0.08);
}
.file-item.selected {
  background: rgba(37, 99, 235, 0.15);
}

.file-icon {
  font-size: 36px;
  line-height: 1;
}
.file-name {
  font-size: 11px;
  color: #1a1a1a;
  line-height: 1.3;
  word-break: break-word;
  max-width: 76px;
}

/* ─── Status bar ─────────────────────────────────────── */
.finder-statusbar {
  height: 22px;
  background: linear-gradient(to bottom, #e2e2e2, #d6d6d6);
  border-top: 1px solid #b8b8b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #666;
}
