/* deploy-portal: one small stylesheet, no frameworks. */
:root {
  --bg: #f4f5f7; --card: #fff; --text: #1d2330; --muted: #6b7280; --line: #e3e6eb;
  --accent: #1f5fae; --accent-text: #fff; --ok: #1e7b3a; --warn: #9a6400; --bad: #b42318;
  --info: #3b5b8a; --radius: 6px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px; color: var(--text); background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.45; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
h1 { font-size: 22px; margin: 0 0 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
h2 { font-size: 16px; margin: 0 0 12px; }
h3 { font-size: 14px; margin: 16px 0 8px; }

.topbar { display: flex; align-items: center; gap: 24px; padding: 0 24px; height: 52px;
  background: #18202e; color: #e8ecf2; position: sticky; top: 0; z-index: 10; }
.topbar a { color: #c9d3e3; }
.topbar .brand { font-weight: 700; color: #fff; letter-spacing: .2px; }
.topbar nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.topbar nav a { padding: 6px 10px; border-radius: var(--radius); }
.topbar nav a.active, .topbar nav a:hover { background: #2c3850; color: #fff; text-decoration: none; }
.userbox { display: flex; gap: 12px; align-items: center; }
.linkbutton { background: none; border: 0; color: #c9d3e3; cursor: pointer; padding: 0; font: inherit; }
.linkbutton:hover { color: #fff; text-decoration: underline; }

main { max-width: 1400px; margin: 0 auto; padding: 24px; }
footer { text-align: center; color: var(--muted); font-size: 12px; padding: 16px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 20px; overflow-x: auto; }
.card.narrow { max-width: 460px; margin: 40px auto; }
.columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 20px; }
.columns .card { margin-bottom: 20px; }

table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
tbody tr:hover { background: #f8f9fb; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.bad { color: var(--bad); font-weight: 600; }
td.msg { max-width: 520px; word-break: break-word; color: #3a4252; }
.nowrap { white-space: nowrap; }
.muted { color: var(--muted); font-weight: normal; font-size: 12.5px; }

dl.grid { display: grid; grid-template-columns: 150px 1fr; gap: 6px 16px; margin: 0 0 16px; }
dl.grid dt { color: var(--muted); }
dl.grid dd { margin: 0; }
pre.summary { background: #f6f7f9; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; white-space: pre-wrap; max-height: 360px; overflow: auto; }

form.stack { display: flex; flex-direction: column; gap: 12px; }
form.stack label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
form.stack label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: normal; }
form.inline { display: inline; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 4px 16px; }
legend { font-weight: 600; padding: 0 4px; }
.filters { display: flex; gap: 12px; align-items: flex-end; margin-bottom: 16px; flex-wrap: wrap; }
.filters label { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: var(--muted); }
.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.actions { display: flex; gap: 8px; }

input, select, textarea { font: inherit; padding: 6px 8px; border: 1px solid #c8cdd5; border-radius: var(--radius); background: #fff; color: var(--text); font-weight: normal; }
textarea { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
input:focus, select:focus, textarea:focus { outline: 2px solid #9cc0ee; border-color: var(--accent); }
input[readonly] { background: #f1f2f4; }
button, .button { font: inherit; padding: 6px 14px; border-radius: var(--radius); border: 1px solid #c8cdd5; background: #fff; color: var(--text); cursor: pointer; display: inline-block; }
button:hover, .button:hover { background: #f1f3f6; text-decoration: none; }
button.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
button.primary:hover { background: #194f92; }
button.danger { color: var(--bad); border-color: #e7b4ae; }
button.danger:hover { background: #fdf0ee; }
button.small { padding: 2px 10px; font-size: 12.5px; }
h1 .button { font-size: 13px; font-weight: normal; }

.flash { padding: 10px 14px; border-radius: var(--radius); margin-bottom: 14px; border: 1px solid; }
.flash ul { margin: 6px 0 0; padding-left: 20px; }
.flash-ok { background: #ecf7ef; border-color: #b5dfc0; color: var(--ok); }
.flash-info { background: #eef3fa; border-color: #c5d5ec; color: var(--info); }
.flash-warn { background: #fdf6e7; border-color: #ecd49f; color: var(--warn); }
.flash-error { background: #fdf0ee; border-color: #f0c0b9; color: var(--bad); }

.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #eceef2; color: #4a5263; white-space: nowrap; }
.b-queued, .b-claimed { background: #eef3fa; color: var(--info); }
.b-running, .b-started { background: #fff4d6; color: var(--warn); }
.b-deployed, .b-succeeded, .b-ok, .b-active { background: #e4f4e8; color: var(--ok); }
.b-changed { background: #fff0db; color: #a35200; }
.b-failed, .b-unreachable, .b-disabled { background: #fde7e4; color: var(--bad); }
.b-cancelled, .b-skipped { background: #eceef2; color: var(--muted); }
