/* Admin › Products & branches: a card per product, a block per repository (its demo build settings, its branches,
   the form to add one). Builds on application.css: badges, .progress steps, .build-error, fields and buttons. */
.prod { display: grid; gap: 18px; }
.prod-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.prod-head .head-text { flex: 1 1 240px; min-width: 0; }

.repo { display: grid; gap: 14px; padding-top: 16px; border-top: 1px solid var(--border); min-width: 0; scroll-margin-top: 16px; }
.repo-head h3 a { text-decoration: none; }
.repo-head h3 a:hover { text-decoration: underline; }
.repo-build { display: grid; gap: 8px; justify-items: start; min-width: 0; }

.settings { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 6px 16px; width: 100%; }
.settings > div { display: grid; gap: 2px; min-width: 0; }
.settings dt { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.settings dd { margin: 0; overflow-wrap: anywhere; }
.settings .settings-app { grid-column: 1 / -1; }

.settings-edit { width: 100%; }
.settings-edit > summary { list-style: none; cursor: pointer; width: max-content; }
.settings-edit > summary::-webkit-details-marker { display: none; }
.settings-edit[open] > summary { margin-bottom: 12px; }
.settings-form { max-width: 760px; }
.settings-form .field input { font-family: var(--mono); font-size: 12.5px; }
.settings-form .field.full { grid-column: 1 / -1; }
.notice-box.warn { margin: 0; display: block; background: var(--alert-bg); color: var(--alert); border-color: transparent; }

.branch-table td { vertical-align: top; }
.branch-table .branch-cell { min-width: 180px; }
.branch-table .status-cell { min-width: 240px; display: grid; gap: 6px; }
.branch-table .status-cell p { margin: 0; }
.branch-table .commit-cell, .branch-table .updates-cell { white-space: nowrap; }
.branch-table .updates-cell form, .branch-table .actions form { margin: 0; }
.branch-table .actions { justify-content: flex-end; flex-wrap: nowrap; }
.branch-table tr.has-history td { border-bottom: 0; }
.branch-table .history-row td { padding-top: 0; }
.btn.danger { color: var(--neg); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.last-update { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.removed > summary, .history-row summary { cursor: pointer; color: var(--muted); font-weight: 600; width: max-content; }
.removed .preview-list { margin-top: 6px; }

.add-branch { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 10px; align-items: end; margin: 0; }
.add-branch .add-error { grid-column: 1 / -1; margin: 0; }

.history { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 12px; }
.history > li { display: grid; gap: 4px; padding-left: 12px; border-left: 2px solid var(--border); }
.history p { margin: 0; }

@media (max-width: 720px) {
  .add-branch { grid-template-columns: minmax(0, 1fr); }
  .branch-table .commit-cell, .branch-table .updates-cell { white-space: normal; }
}
