:root {
  color-scheme: dark;
  --bg: #000000;
  --fg: #ededed;
  --muted: #a1a1a1;
  --dim: #7d7d7d;
  --line: #262626;
  --line-strong: #3a3a3a;
  --hover: #111111;
  --blue: #3291ff;
  --green: #3dd68c;
  --red: #ff6166;
  --amber: #f5a623;
  --radius: 6px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 56px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; }

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: #ededed;
  color: #000;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: -.04em;
}

.crumb { color: var(--muted); font-size: 13px; white-space: nowrap; }
.crumb.strong { color: var(--fg); font-weight: 500; }
.sep { color: var(--line-strong); font-size: 12px; }

.topbar-actions { display: flex; align-items: center; gap: 12px; }
.updated { color: var(--dim); font-size: 12px; white-space: nowrap; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
}
.icon-btn:hover { background: var(--hover); color: var(--fg); }
.icon-btn:disabled { opacity: .5; cursor: default; }

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #1a1a1a;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 56px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -.02em;
}

.sub {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--hover); }

.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.search {
  position: relative;
  flex: 1 1 280px;
  max-width: 380px;
  color: var(--dim);
}
.search svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.search input {
  width: 100%;
  height: 32px;
  padding: 0 10px 0 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 13px;
  outline: none;
}
.search input::placeholder { color: var(--dim); }
.search input:focus { border-color: #555; }

.select {
  height: 32px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='m2 3.5 3 3 3-3' fill='none' stroke='%237d7d7d' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  color: var(--fg);
  font: inherit;
  font-size: 13px;
  appearance: none;
  outline: none;
  cursor: pointer;
}
.select:focus { border-color: #555; }

.count {
  margin-left: auto;
  color: var(--dim);
  font-size: 12px;
  white-space: nowrap;
}

.table { border-bottom: 1px solid var(--line); }

.thead,
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px 96px 84px 92px 78px 28px;
  align-items: center;
  column-gap: 12px;
  padding: 0 12px;
}

.thead {
  height: 38px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.row {
  min-height: 64px;
  border-bottom: 1px solid var(--line);
  transition: background-color .1s ease;
}
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--hover); }

.cell { min-width: 0; }

.deployment {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}

.deployment-main { min-width: 0; }

.commit {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--fg);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.commit:hover { text-decoration: underline; }
.commit.muted { color: var(--dim); font-weight: 400; }

.meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.meta .repo { color: #d4d4d4; }
.meta code {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.meta .sep { color: var(--line-strong); }

.status-icon {
  position: relative;
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}
.status-icon.success { background: var(--green); color: #fff; }
.status-icon.success::after { content: "✓"; }
.status-icon.failure { background: var(--red); color: #fff; }
.status-icon.failure::after { content: "✕"; }
.status-icon.queued { background: var(--amber); color: #000; }
.status-icon.queued::after { content: "!"; }
.status-icon.neutral { background: #1a1a1a; color: var(--dim); border: 1px solid var(--line); }
.status-icon.neutral::after { content: "–"; }
.status-icon.building {
  background: transparent;
  border: 2px solid var(--blue);
  border-top-color: transparent;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 12px;
  white-space: nowrap;
}
.badge.prod { background: #ededed; border-color: #ededed; color: #000; }
.badge.preview { background: var(--bg); border-color: var(--line); color: var(--muted); }

.status-text { font-size: 13px; white-space: nowrap; }
.status-text.success { color: #3dd68c; }
.status-text.failure { color: var(--red); }
.status-text.building { color: var(--blue); }
.status-text.queued { color: #f5a623; }
.status-text.neutral { color: var(--dim); }

.col-duration, .col-created { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }

.col-runner { color: var(--muted); font-size: 12px; white-space: nowrap; }
.runner-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--line-strong);
  vertical-align: 1px;
}
.runner-dot.online { background: var(--green); }
.runner-dot.busy { background: var(--blue); }
.runner-dot.offline { background: var(--red); }

.action { text-align: right; }
.action a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  color: var(--dim);
  text-decoration: none;
}
.action a:hover { background: #1a1a1a; color: var(--fg); }

.empty {
  margin-top: 24px;
  padding: 48px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  text-align: center;
}
.empty p { margin: 0 0 14px; color: var(--muted); font-size: 13px; }

.error {
  margin: 18px 0 0;
  padding: 10px 12px;
  border: 1px solid #5c1f22;
  border-radius: var(--radius);
  background: #2a1315;
  color: #ff8a8a;
  font-size: 13px;
}

.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 12px;
}
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { text-decoration: underline; }

@media (max-width: 1000px) {
  .thead, .row { grid-template-columns: minmax(0, 1fr) 96px 84px 28px; }
  .col-env, .col-duration { display: none; }
}

@media (max-width: 720px) {
  .page { padding: 24px 16px 40px; }
  .topbar-inner { padding: 0 16px; }
  .updated { display: none; }
  .page-head { align-items: flex-start; flex-direction: column; gap: 12px; }
  .thead, .row { grid-template-columns: minmax(0, 1fr) 28px; column-gap: 8px; }
  .col-env, .col-status, .col-duration, .col-created, .col-runner { display: none; }
  .row { min-height: 60px; }
  .thead span:first-child { font-size: 0; }
  .thead span:first-child::after { content: "Deployment"; font-size: 12px; }
  .search { max-width: none; flex-basis: 100%; }
  .count { margin-left: 0; }
}
