:root {
  color-scheme: dark;
  --bg: #09111f;
  --surface: #101b2d;
  --surface-raised: #16243a;
  --border: #243852;
  --text: #eef5ff;
  --muted: #91a6c3;
  --blue: #58a6ff;
  --green: #4dd4a8;
  --yellow: #f2c46d;
  --red: #ff7b88;
  --violet: #ae8cff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { background: radial-gradient(circle at 20% -10%, #152c51 0, transparent 36rem), var(--bg); color: var(--text); margin: 0; min-height: 100vh; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.topbar { align-items: center; border-bottom: 1px solid var(--border); display: flex; height: 64px; justify-content: space-between; padding: 0 max(24px, calc((100vw - 1360px) / 2)); }
.brand { font-size: 1.08rem; font-weight: 760; letter-spacing: -.025em; text-decoration: none; }
.brand span { color: var(--blue); }
.topbar-actions { align-items: center; display: flex; gap: 18px; }
.connection { align-items: center; color: var(--muted); display: flex; font-size: .8rem; gap: 7px; }
.connection i { background: var(--yellow); border-radius: 999px; height: 7px; width: 7px; }
.connection.ok i { background: var(--green); box-shadow: 0 0 12px var(--green); }
.connection.error i { background: var(--red); }

.shell { margin: 0 auto; max-width: 1360px; padding: 48px 24px; }
.hero { align-items: end; display: flex; justify-content: space-between; margin-bottom: 30px; }
.eyebrow { color: var(--blue); font-size: .74rem; font-weight: 750; letter-spacing: .12em; margin: 0 0 8px; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(2rem, 4vw, 3.05rem); letter-spacing: -.055em; margin-bottom: 9px; }
h2 { font-size: 1.05rem; letter-spacing: -.025em; margin-bottom: 4px; }
.muted { color: var(--muted); line-height: 1.55; }
.small { font-size: .82rem; margin-bottom: 0; }

.button { border: 1px solid transparent; border-radius: 8px; font-size: .86rem; font-weight: 680; padding: 9px 13px; transition: background .15s, border-color .15s, transform .15s; }
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--blue); color: #071326; }
.button.secondary { background: var(--surface-raised); border-color: var(--border); color: var(--text); }
.button.ghost { background: transparent; color: var(--muted); }
.button.danger { background: transparent; border-color: #753a48; color: var(--red); }
.button.wide { width: 100%; }
.button:disabled { cursor: not-allowed; opacity: .5; transform: none; }

.summary { display: grid; gap: 13px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 24px; }
.metric { background: rgba(16, 27, 45, .78); border: 1px solid var(--border); border-radius: 12px; min-height: 104px; padding: 18px; }
.metric .label { color: var(--muted); font-size: .76rem; font-weight: 650; text-transform: uppercase; }
.metric .value { display: block; font-size: 1.8rem; font-weight: 750; letter-spacing: -.05em; margin-top: 12px; }
.metric.queued .value { color: var(--yellow); }.metric.running .value { color: var(--blue); }.metric.succeeded .value { color: var(--green); }.metric.failed .value { color: var(--red); }

.workspace { display: grid; gap: 24px; grid-template-columns: minmax(420px, .92fr) minmax(500px, 1.35fr); }
.panel { background: rgba(16, 27, 45, .78); border: 1px solid var(--border); border-radius: 12px; min-width: 0; }
.runs-panel { overflow: hidden; }
.panel-heading { align-items: center; border-bottom: 1px solid var(--border); display: flex; gap: 16px; justify-content: space-between; padding: 18px; }
.panel-heading h2 { margin: 0 0 3px; }
input[type="search"], input[type="password"] { background: #0b1627; border: 1px solid var(--border); border-radius: 7px; color: var(--text); outline: none; padding: 9px 11px; }
input[type="search"] { max-width: 270px; width: 48%; }
input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(88, 166, 255, .12); }
.runs { max-height: 670px; overflow-y: auto; }
.run { background: transparent; border: 0; border-bottom: 1px solid rgba(36, 56, 82, .7); color: var(--text); display: grid; gap: 7px; padding: 15px 18px; text-align: left; width: 100%; }
.run:hover, .run.selected { background: rgba(88, 166, 255, .08); }.run.selected { box-shadow: inset 3px 0 var(--blue); }
.run-top, .run-meta { align-items: center; display: flex; gap: 10px; justify-content: space-between; }.run-meta { color: var(--muted); font-size: .76rem; justify-content: flex-start; overflow: hidden; }.run-repo { font-size: .89rem; font-weight: 680; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status { border-radius: 999px; font-size: .68rem; font-weight: 760; letter-spacing: .04em; padding: 4px 8px; text-transform: uppercase; }.status.queued { background: rgba(242,196,109,.14); color: var(--yellow); }.status.running { background: rgba(88,166,255,.14); color: var(--blue); }.status.succeeded { background: rgba(77,212,168,.14); color: var(--green); }.status.failed, .status.canceled { background: rgba(255,123,136,.14); color: var(--red); }

.detail { min-height: 610px; padding: 24px; }.detail-header { border-bottom: 1px solid var(--border); margin-bottom: 20px; padding-bottom: 20px; }.detail-title { align-items: start; display: flex; gap: 12px; justify-content: space-between; }.detail-title h2 { font-size: 1.2rem; margin-bottom: 6px; }.detail-meta { color: var(--muted); font-size: .81rem; line-height: 1.8; }.detail-meta a { color: var(--blue); text-decoration: none; }.actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }.error-box { background: rgba(255,123,136,.09); border: 1px solid rgba(255,123,136,.28); border-radius: 8px; color: #ffd9de; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; line-height: 1.55; margin-bottom: 18px; padding: 12px; white-space: pre-wrap; }.logs-heading { align-items: center; display: flex; justify-content: space-between; margin-bottom: 10px; }.logs { background: #070d18; border: 1px solid #1c2a3d; border-radius: 8px; color: #cfdaeb; font: .76rem/1.58 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; max-height: 490px; min-height: 300px; overflow: auto; padding: 12px; }.log { display: grid; gap: 10px; grid-template-columns: 58px 1fr; padding: 2px 0; white-space: pre-wrap; word-break: break-word; }.log-time { color: #607897; }.log.stderr { color: #ffb2bb; }.log.system { color: #aebfff; }.empty-state { align-items: center; color: var(--muted); display: flex; flex-direction: column; justify-content: center; min-height: 540px; text-align: center; }.empty-icon { align-items: center; background: var(--surface-raised); border: 1px solid var(--border); border-radius: 50%; color: var(--blue); display: flex; font-size: 1.5rem; height: 52px; justify-content: center; margin-bottom: 14px; width: 52px; }.empty-state h2 { color: var(--text); margin-bottom: 6px; }
.toast { background: #193352; border: 1px solid #39689a; border-radius: 8px; bottom: 24px; box-shadow: 0 10px 40px rgba(0,0,0,.35); color: var(--text); font-size: .88rem; padding: 12px 15px; position: fixed; right: 24px; }

.login-body { align-items: center; display: flex; justify-content: center; padding: 24px; }.login-card { background: rgba(16, 27, 45, .88); border: 1px solid var(--border); border-radius: 16px; max-width: 440px; padding: 38px; width: 100%; }.brand-mark { align-items: center; background: linear-gradient(135deg, var(--blue), var(--violet)); border-radius: 11px; color: #071326; display: flex; font-size: 1.35rem; font-weight: 850; height: 42px; justify-content: center; margin-bottom: 25px; width: 42px; }.login-card h1 { font-size: 2.25rem; }.login-form { display: grid; gap: 10px; margin-top: 28px; }.login-form label { font-size: .84rem; font-weight: 650; }.login-form input { margin-bottom: 4px; }.form-error { color: var(--red); font-size: .82rem; margin: 0 0 5px; }

@media (max-width: 960px) { .workspace { grid-template-columns: 1fr; }.detail { min-height: 500px; }.runs { max-height: 450px; }.summary { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .topbar { padding: 0 16px; }.shell { padding: 32px 16px; }.hero { align-items: start; flex-direction: column; gap: 16px; }.summary { gap: 9px; }.metric { min-height: 86px; padding: 13px; }.panel-heading { align-items: stretch; flex-direction: column; }.panel-heading input { max-width: none; width: 100%; }.detail { padding: 18px; }.detail-title { flex-direction: column; }.actions { justify-content: flex-start; }.connection { display: none; } }
