:root {
  color-scheme: dark;
  --bg: #111827;
  --surface: #172033;
  --surface-2: #0f172a;
  --line: #334155;
  --text: #f8fafc;
  --muted: #cbd5e1;
  --soft: #94a3b8;
  --blue: #60a5fa;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #fb7185;
  --button: #2563eb;
  --button-hover: #1d4ed8;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.shell {
  width: min(1240px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 28px 0 42px;
}

.hidden {
  display: none !important;
}

.login-view {
  min-height: calc(100vh - 70px);
  display: grid;
  place-items: center;
}

.login-box {
  width: min(440px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 18px 0 24px;
}

.top-actions,
.form-actions,
.job-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}

.tab {
  color: var(--muted);
  background: transparent;
  padding: 13px 18px;
  border-bottom: 3px solid transparent;
}

.tab.active {
  color: var(--text);
  border-bottom-color: var(--blue);
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.compose,
.detail,
.settings-grid,
.list {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.compose {
  padding: 22px;
}

.stack {
  display: grid;
  gap: 16px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
  padding: 12px 13px;
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 170px;
  line-height: 1.55;
}

input:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgb(96 165 250 / 20%);
}

.primary,
.ghost,
.danger,
.secondary {
  min-height: 40px;
  border-radius: 6px;
  padding: 0 16px;
  color: var(--text);
  white-space: nowrap;
}

.primary {
  background: var(--button);
}

.primary:hover {
  background: var(--button-hover);
}

.secondary {
  background: #374151;
}

.danger {
  background: #be123c;
}

.ghost {
  background: transparent;
  border: 1px solid var(--line);
}

.check {
  display: flex;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  align-items: center;
  gap: 9px;
}

.check input {
  width: 18px;
  height: 18px;
}

.notice {
  min-height: 22px;
  color: var(--amber);
}

.split {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 18px;
}

.list {
  min-height: 520px;
  overflow: hidden;
}

.job-item,
.game-item {
  width: 100%;
  display: block;
  text-align: left;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
}

.job-item:hover {
  background: #1f2937;
}

.job-item.active {
  background: #1e3a5f;
}

.meta {
  color: var(--soft);
  font-size: 13px;
  line-height: 1.5;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  color: var(--text);
  background: #334155;
  font-size: 13px;
}

.pill.success {
  background: #065f46;
}

.pill.running {
  background: #1d4ed8;
}

.pill.failed {
  background: #9f1239;
}

.pill.queued {
  background: #92400e;
}

.detail {
  min-height: 520px;
  padding: 18px;
  overflow: hidden;
}

.detail-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 15px;
  margin-bottom: 15px;
}

.prompt {
  color: var(--muted);
  line-height: 1.6;
}

.log {
  height: 360px;
  overflow: auto;
  background: #020617;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 13px;
  color: #d1fae5;
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 22px;
}

.password-grid {
  margin-top: 22px;
}

.empty {
  color: var(--soft);
}

a {
  color: var(--blue);
}

@media (max-width: 860px) {
  .topbar,
  .detail-head {
    align-items: stretch;
    flex-direction: column;
  }

  .field-row,
  .split,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .tabs {
    overflow-x: auto;
  }
}
