/* ── Project list page ─────────────────────────────────────────────────────── */

.project-page {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  width: 100%;
}

.project-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  min-height: 54px;
  border-bottom: 1px solid var(--bs-border-color);
  background: var(--bs-tertiary-bg);
  flex-shrink: 0;
}

.project-page-title {
  margin: 0;
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Grid ── */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  padding: 20px;
  align-content: start;
  overflow-y: auto;
  flex: 1;
}

/* ── Card ── */

.project-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.project-card:hover {
  border-color: var(--bs-primary-border-subtle, #9ec5fe);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.project-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.project-card-title {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.3;
  flex: 1;
  min-width: 0;
}

.project-card-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.project-card-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--bs-secondary-color);
  opacity: 0.6;
  cursor: pointer;
  transition: opacity 0.12s, background 0.12s;
}

.project-card-icon-btn:hover {
  opacity: 1;
  background: var(--bs-secondary-bg);
}

.project-card-icon-btn--danger:hover {
  color: var(--bs-danger, #dc3545);
  background: rgba(220, 53, 69, 0.08);
}

.project-card-path {
  font-size: 0.78rem;
  color: var(--bs-secondary-color);
  font-family: var(--bs-font-monospace, monospace);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-card-desc {
  font-size: 0.82rem;
  color: var(--bs-secondary-color);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-card-meta {
  font-size: 0.72rem;
  color: var(--bs-secondary-color);
  margin-top: auto;
  padding-top: 4px;
}
