/* Meine Projekte — Übersichts-Grid */

.pj-stage {
  min-height: calc(100vh - 120px);
  padding: 2.5rem 1.75rem 4rem;
  display: flex;
  justify-content: center;
}
.pj-wrap { width: 100%; max-width: 820px; }

.pj-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.pj-title {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #1d1d1f;
  margin-bottom: 0.3rem;
}
.pj-sub { font-size: 0.95rem; color: #6e6e73; line-height: 1.5; max-width: 48ch; }
.pj-new-link { flex-shrink: 0; white-space: nowrap; }

/* Anlegen */
.pj-create {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}
.pj-create .input-box { flex: 1; }

/* Grid — auto-fit lässt leere Spalten kollabieren; Card-Breite gedeckelt,
   damit einzelne Projekte nicht absurd breit werden */
.pj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
}

.pj-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  max-width: 400px;
  padding: 1.25rem 1.3rem;
  background: #fff;
  border: 1px solid #e5e5ea;
  border-radius: 16px;
  text-decoration: none;
  transition: border-color 0.14s, box-shadow 0.14s, transform 0.14s;
}
.pj-card:hover {
  border-color: #d0d0d8;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.pj-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.pj-tile {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 700;
  flex-shrink: 0;
}
.pj-role {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #8e8e93;
  background: #f0f0f5;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}
.pj-role--owner { color: #4f6ef7; background: #eef0fb; }

/* Kebab-Button (Aktionsmenü) */
.pj-kebab {
  border: none;
  background: none;
  cursor: pointer;
  color: #b0b0b8;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0.1rem 0.45rem;
  border-radius: 8px;
  transition: color 0.12s, background 0.12s;
}
.pj-kebab:hover { color: #1d1d1f; background: #f0f0f5; }

/* Kontextmenü (Kebab + Rechtsklick) */
.pj-menu {
  position: fixed;
  z-index: 1000;
  background: #fff;
  border: 1px solid #e5e5ea;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
  padding: 0.35rem;
  min-width: 180px;
}
.pj-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
  color: #1d1d1f;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
}
.pj-menu-item:hover { background: #f5f5f7; }
.pj-menu-item--danger { color: #e05252; }
.pj-menu-item--danger:hover { background: #fdecec; }

.pj-card-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: #1d1d1f;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pj-card-meta {
  font-size: 0.82rem;
  color: #1d1d1f;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.pj-card-meta .dot { color: #c7c7cc; }

/* Fuß: letzte Aktivität + Öffnen-Chevron */
.pj-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.7rem;
  border-top: 1px solid #f3f3f6;
}
.pj-card-activity {
  font-size: 0.78rem;
  color: #a0a0a8;
}
.pj-card-chevron {
  color: #c7c7cc;
  flex-shrink: 0;
  transition: color 0.14s, transform 0.14s;
}
.pj-card:hover .pj-card-chevron { color: #4f6ef7; transform: translateX(2px); }

/* Leerzustand — mit Tile, Titel, Text und CTA */
.pj-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3.5rem 1rem;
}
.pj-empty-tile {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: #eef0fb;
  color: #4f6ef7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 300;
  line-height: 1;
  margin-bottom: 1rem;
}
.pj-empty-title { font-size: 1.1rem; font-weight: 600; color: #1d1d1f; margin-bottom: 0.35rem; }
.pj-empty-text { font-size: 0.9rem; color: #8e8e93; line-height: 1.5; max-width: 38ch; margin-bottom: 1.25rem; }

@media (max-width: 640px) {
  .pj-stage { padding: 1.75rem 1rem 3rem; }
  .pj-title { font-size: 1.6rem; }
  .pj-head { flex-direction: column; }
  .pj-grid { grid-template-columns: 1fr; }
}
