/* ── Project Detail Panel ── */
.project-detail {
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.project-detail:empty { display: none; }

.pd-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pd-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pd-icon {
  flex-shrink: 0;
  color: var(--accent);
}

.pd-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.pd-badge {
  font-size: 0.58rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 8px;
  background: var(--accent-glow);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pd-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pd-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.pd-close:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--text-muted);
}

.pd-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  padding-left: 24px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  row-gap: 2px;
}

.pd-sep {
  color: var(--border);
  margin: 0 3px;
  flex-shrink: 0;
}

.pd-path-text {
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(100%, 360px);
  flex-shrink: 1;
}

.pd-branch {
  color: var(--green);
  white-space: nowrap;
  flex-shrink: 0;
}

.pd-branch::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 3px;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='2.5' xmlns='http://www.w3.org/2000/svg'%3E%3Cline x1='6' y1='3' x2='6' y2='15'/%3E%3Ccircle cx='18' cy='6' r='3'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Cpath d='M18 9a9 9 0 0 1-9 9'/%3E%3C/svg%3E") no-repeat center / contain;
  vertical-align: middle;
}

.pd-remote {
  color: var(--text-muted);
  opacity: 0.75;
  white-space: nowrap;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.pd-stats {
  display: flex;
  gap: 8px;
  padding: 10px 0 2px 24px;
  flex-wrap: wrap;
}

.pd-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5px 12px;
  border-radius: 8px;
  background: var(--bg);
  min-width: 50px;
}

.pd-stat-val {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text);
  font-family: var(--font-mono);
  line-height: 1.2;
}

.pd-stat-label {
  font-size: 0.58rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 1px;
}

.pd-running { background: var(--blue-dim); }
.pd-running .pd-stat-val { color: var(--blue); }
.pd-done { background: var(--green-dim); }
.pd-done .pd-stat-val { color: var(--green); }
.pd-failed { background: var(--red-dim); }
.pd-failed .pd-stat-val { color: var(--red); }
.pd-rate-ok .pd-stat-val { color: var(--green); }
.pd-rate-warn .pd-stat-val { color: var(--red); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .project-detail { padding: 12px 14px 10px; }
  .pd-meta { padding-left: 0; }
  .pd-path-text { max-width: min(100%, 260px); }
  .pd-stats { padding-left: 0; gap: 6px; }
  .pd-stat { padding: 4px 10px; min-width: 44px; }
}

@media (max-width: 600px) {
  .project-detail { padding: 10px 12px 8px; }
  .pd-title-row { flex-wrap: wrap; gap: 6px; }
  .pd-meta { padding-left: 0; font-size: 0.66rem; }
  .pd-path-text { max-width: 100%; }
  .pd-remote { max-width: 150px; }
  .pd-stats { padding: 8px 0 2px 0; gap: 5px; }
  .pd-stat { padding: 4px 8px; min-width: 40px; }
  .pd-stat-val { font-size: 0.78rem; }
  .pd-stat-label { font-size: 0.54rem; }
  .pd-actions .btn { font-size: 0.68rem; padding: 4px 8px; }
}
