* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #101318;
  color: #edf2f7;
  font: 14px/1.5 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

.shell {
  display: grid;
  grid-template-columns: 360px 1fr;
  min-height: 100vh;
}

.left {
  border-right: 1px solid #2a313c;
  padding: 24px;
  background: #151a21;
}

header h1 {
  margin: 0;
  font-size: 24px;
}

.composer,
.jobs {
  display: grid;
  gap: 12px;
}

.composer {
  margin-top: 16px;
}

textarea,
input,
select,
button {
  font: inherit;
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid #354150;
  border-radius: 6px;
  background: #0f141b;
  color: #edf2f7;
  padding: 10px;
}

textarea {
  resize: vertical;
}

.controls {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 10px;
}

.controls button {
  grid-column: 1 / -1;
}

button,
#openArtifact {
  border: 0;
  border-radius: 6px;
  background: #2f80ed;
  color: white;
  cursor: pointer;
  padding: 10px 12px;
  text-decoration: none;
}

button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.jobs {
  margin-top: 24px;
}

.jobs h2 {
  margin: 0;
  font-size: 16px;
}

.job {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 1px solid #2a313c;
  background: #0f141b;
  text-align: left;
}

.job.active {
  border-color: #2f80ed;
}

.job span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job small,
#activeMeta {
  color: #9aa7b5;
}

.right {
  display: grid;
  grid-template-rows: auto minmax(360px, 64vh) minmax(220px, 1fr);
  min-width: 0;
}

.statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #2a313c;
  padding: 14px 18px;
}

.statusbar div {
  min-width: 0;
}

#activeTitle {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.previewWrap {
  display: grid;
  min-width: 0;
  min-height: 0;
  background:
    radial-gradient(circle at 50% 35%, rgba(47, 128, 237, 0.14), transparent 34%),
    #0a0e14;
}

.emptyPreview,
iframe {
  grid-area: 1 / 1;
}

.emptyPreview {
  display: grid;
  place-items: center;
  color: #6f7f92;
  font-size: 15px;
  border-bottom: 1px solid #171f2a;
}

iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #0a0e14;
}

pre {
  margin: 0;
  overflow: auto;
  padding: 14px;
  background: #090d13;
  color: #b8c7d9;
  font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.eventsPanel {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
  border-top: 1px solid #2a313c;
  background: #080b10;
}

.tabs {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #202834;
}

.tab {
  border: 1px solid #2c3745;
  background: #111821;
  color: #9aa7b5;
  padding: 6px 12px;
}

.tab.active {
  background: #253142;
  color: #edf2f7;
  border-color: #3e8bff;
}

.timeline {
  overflow: auto;
  padding: 12px;
}

.timelineItem {
  display: grid;
  gap: 4px;
  border-left: 3px solid #3b4654;
  background: #0d1219;
  padding: 9px 12px;
}

.timelineItem + .timelineItem {
  margin-top: 8px;
}

.timelineItem.good {
  border-left-color: #32b67a;
}

.timelineItem.bad {
  border-left-color: #ff5c6c;
}

.timelineItem.asset {
  border-left-color: #d4a72c;
}

.timelineTitle {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #eef4fb;
  font-weight: 650;
}

.timelineTitle time {
  color: #7f8ea3;
  font-weight: 500;
  white-space: nowrap;
}

.timelineBody {
  color: #a8b5c5;
  overflow-wrap: anywhere;
}

.hidden {
  display: none;
}

[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .left {
    border-right: 0;
    border-bottom: 1px solid #2a313c;
  }
}
