/* Just Deploy — plain CSS on purpose. This is the panel you open when something needs to
   ship or has gone wrong; it must not depend on vite, npm or a build step being healthy. */

:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #14181f;
  --ink-soft: #5b6472;
  --ink-faint: #8a94a3;
  --line: #e3e7ec;
  --line-soft: #eef1f4;
  --accent: #1f6feb;
  --accent-ink: #ffffff;
  --ok: #1a7f4b;
  --ok-bg: #e6f5ec;
  --warn: #8a5a00;
  --warn-bg: #fdf3dc;
  --bad: #b3261e;
  --bad-bg: #fdeceb;
  --wait: #5b3fa8;
  --wait-bg: #f0ebfb;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 14px/1.5 var(--sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- shell ---- */
.shell { display: flex; min-height: 100vh; }

.side {
  width: 232px;
  flex: 0 0 232px;
  background: #101520;
  color: #c9d1dc;
  padding: 18px 0;
  display: flex;
  flex-direction: column;
}
.brand {
  padding: 0 18px 18px;
  font-weight: 650;
  font-size: 15px;
  color: #fff;
  letter-spacing: -0.01em;
}
.brand small { display: block; font-weight: 400; color: #7d8799; font-size: 11.5px; letter-spacing: 0; }
.side nav { display: flex; flex-direction: column; gap: 1px; }
.side nav a {
  padding: 9px 18px;
  color: #c9d1dc;
  font-size: 13.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-left: 2px solid transparent;
}
.side nav a:hover { background: #1a2130; text-decoration: none; color: #fff; }
.side nav a.on { background: #1a2130; color: #fff; border-left-color: var(--accent); font-weight: 550; }
.side-foot { margin-top: auto; padding: 14px 18px 0; border-top: 1px solid #222a38; font-size: 12px; color: #7d8799; }
.side-foot strong { color: #c9d1dc; display: block; font-weight: 550; }

.main { flex: 1; min-width: 0; padding: 26px 30px 60px; }
.main > header { margin-bottom: 22px; }
.main h1 { font-size: 21px; margin: 0 0 4px; letter-spacing: -0.02em; font-weight: 650; }
.main header p { margin: 0; color: var(--ink-soft); font-size: 13.5px; }

/* ---- panels ---- */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 18px;
  overflow: hidden;
}
.panel > h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  margin: 0;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  font-weight: 600;
}
.panel-body { padding: 16px; }
.panel-body > :first-child { margin-top: 0; }
.panel-body > :last-child { margin-bottom: 0; }

/* ---- stat row ---- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; }
.stat b { display: block; font-size: 26px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.1; }
.stat span { color: var(--ink-soft); font-size: 12.5px; }
.stat.hot b { color: var(--wait); }
.stat.go b { color: var(--ok); }
.stat.risk b { color: var(--bad); }

/* ---- tables ---- */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  font-weight: 600;
  padding: 9px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: #fbfcfd;
}
td { padding: 11px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcfd; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.scroll-x { overflow-x: auto; }

/* ---- pills ---- */
.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}
.pill.draft   { background: var(--line-soft); color: var(--ink-soft); }
.pill.testing { background: var(--warn-bg); color: var(--warn); }
.pill.tested  { background: var(--ok-bg); color: var(--ok); }
.pill.test_failed { background: var(--bad-bg); color: var(--bad); }
.pill.submitted { background: var(--wait-bg); color: var(--wait); }
.pill.approved  { background: var(--ok-bg); color: var(--ok); }
.pill.rejected  { background: var(--bad-bg); color: var(--bad); }
.pill.shipped   { background: #e8eefc; color: var(--accent); }
.pill.queued, .pill.running { background: var(--warn-bg); color: var(--warn); }
.pill.success { background: var(--ok-bg); color: var(--ok); }
.pill.failed  { background: var(--bad-bg); color: var(--bad); }
.pill.muted   { background: var(--line-soft); color: var(--ink-faint); }

/* ---- buttons ---- */
.btn {
  display: inline-block;
  padding: 7px 13px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
  line-height: 1.3;
}
.btn:hover { background: #f6f7f9; text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: #1a5fd0; }
.btn.go { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.go:hover { background: #14663c; }
.btn.danger { background: #fff; border-color: #e7b6b2; color: var(--bad); }
.btn.danger:hover { background: var(--bad-bg); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.sm { padding: 4px 9px; font-size: 12px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---- forms ---- */
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 5px; }
input[type=text], input[type=email], input[type=password], textarea, select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  font-size: 13.5px;
  background: #fff;
  color: var(--ink);
}
input:focus, textarea:focus { outline: 2px solid #cfe0fb; border-color: var(--accent); }
textarea { min-height: 72px; resize: vertical; }
.field { margin-bottom: 13px; }

/* ---- notices ---- */
.note { padding: 11px 14px; border-radius: 7px; font-size: 13.5px; margin-bottom: 16px; border: 1px solid; }
.note.ok   { background: var(--ok-bg); border-color: #bfe3cd; color: #145c37; }
.note.bad  { background: var(--bad-bg); border-color: #f0c4c0; color: #8c1d17; }
.note.warn { background: var(--warn-bg); border-color: #ecd9a6; color: #6d4700; }
.note ul { margin: 6px 0 0; padding-left: 18px; }

/* ---- misc ---- */
code, .mono { font-family: var(--mono); font-size: 12.5px; }
.sha { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); }
.muted { color: var(--ink-soft); }
.faint { color: var(--ink-faint); font-size: 12.5px; }
.empty { padding: 30px 16px; text-align: center; color: var(--ink-faint); font-size: 13.5px; }
.stack { display: flex; flex-direction: column; gap: 2px; }
.stack small { color: var(--ink-faint); font-size: 12px; }

pre.log {
  background: #0d1117;
  color: #c9d1d9;
  padding: 14px 16px;
  border-radius: 7px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  overflow-x: auto;
  max-height: 520px;
  overflow-y: auto;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}
pre.diff {
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
  overflow-x: auto;
  max-height: 520px;
  overflow-y: auto;
  margin: 0;
}
.diff-add { color: var(--ok); }
.diff-del { color: var(--bad); }
.diff-hunk { color: var(--wait); font-weight: 600; }

.files { font-family: var(--mono); font-size: 12.5px; margin: 0; padding-left: 0; list-style: none; }
.files li { padding: 3px 0; border-bottom: 1px solid var(--line-soft); }
.files li:last-child { border-bottom: 0; }

/* ---- login ---- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login { width: 100%; max-width: 340px; }
.login .brand { text-align: center; color: var(--ink); padding-bottom: 20px; }
.login .brand small { color: var(--ink-faint); }
.login .panel-body { padding: 20px; }

/* ---- env row on the board ---- */
.envs { display: flex; flex-direction: column; gap: 4px; }
.env { display: flex; align-items: baseline; gap: 7px; font-size: 12.5px; }
.env b { font-weight: 600; min-width: 34px; color: var(--ink-soft); font-size: 11.5px; text-transform: uppercase; }

@media (max-width: 820px) {
  .shell { flex-direction: column; }
  .side { width: auto; flex: none; padding: 12px 0; }
  .side nav { flex-direction: row; overflow-x: auto; }
  .side nav a { border-left: 0; border-bottom: 2px solid transparent; white-space: nowrap; }
  .side nav a.on { border-bottom-color: var(--accent); }
  .side-foot { margin-top: 12px; }
  .main { padding: 18px 16px 40px; }
}
