.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.detail-header h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.detail-sub {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  color: var(--text-dim);
  font-size: 0.88rem;
  margin-top: 0.35rem;
}
.detail-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }

.quick-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}
.quick-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.quick-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.quick-stat span { font-size: 0.72rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.quick-stat strong { font-size: 1.1rem; font-weight: 700; }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}
.detail-grid .span-2 { grid-column: 1 / -1; }

.field-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 0.8rem;
}
.field-label input, .field-label textarea { margin-top: 0.3rem; }

/* ---------- Repos ---------- */

.repo-list {
  list-style: none;
  margin: 0 0 0.25rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.repo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
  transition: background 0.15s, transform 0.15s var(--ease-out);
}
.repo-item:hover { background: var(--accent-soft); transform: translateX(2px); }
.repo-item a { font-size: 0.85rem; text-decoration: none; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.repo-item a:hover { color: var(--accent); }

.repo-panel { position: relative; overflow: hidden; }
.repo-panel::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-primary);
}

/* ---------- Env checklist ---------- */

.env-checklist {
  list-style: none;
  margin: 0 0 0.25rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.env-checklist li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
}
.env-checklist li:hover { background: var(--bg-hover); }
.env-checklist label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; cursor: pointer; }
.env-checklist input[type="checkbox"] { width: auto; }
.env-checklist .done { text-decoration: line-through; color: var(--text-faint); }

/* ---------- README ---------- */

.readme-toolbar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.readme-tabs { display: none; }

.import-md-btn {
  cursor: pointer;
  position: relative;
}

.readme-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}

.readme-textarea {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  resize: vertical;
  min-height: 260px;
}
.readme-preview {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text);
  min-height: 260px;
  max-height: 480px;
  overflow-y: auto;
  padding: 0.85rem 1rem;
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.readme-preview h3, .readme-preview h4, .readme-preview h5, .readme-preview h6 { margin: 0.8rem 0 0.4rem; }
.readme-preview h3:first-child { margin-top: 0; }
.readme-preview p { margin: 0.5rem 0; }
.readme-preview ul { margin: 0.4rem 0; padding-left: 1.3rem; }
.readme-preview a { color: var(--accent); }

/* ---------- Change requests ---------- */

.cr-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.cr-card {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.9rem;
  animation: cardIn 0.35s var(--ease-out) both;
  transition: border-color 0.15s, transform 0.15s var(--ease-out);
}
.cr-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.cr-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; }
.cr-head h4 { font-size: 0.92rem; font-weight: 700; }
.cr-desc { font-size: 0.82rem; color: var(--text-dim); margin-top: 0.3rem; line-height: 1.5; }
.cr-controls { display: flex; gap: 0.5rem; margin-top: 0.6rem; flex-wrap: wrap; }
.cr-select {
  width: auto;
  font-size: 0.76rem;
  padding: 0.3rem 0.5rem;
  font-weight: 600;
}

/* ---------- Settings ---------- */

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}
.theme-toggle-row { display: flex; align-items: center; justify-content: space-between; }
.export-actions { margin-top: 0.75rem; }

.account-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}
.account-row .info-rows { flex: 1; min-width: 0; }
.user-avatar-lg {
  width: 3rem;
  height: 3rem;
  font-size: 1.1rem;
  flex-shrink: 0;
}
