:root {
  --bg: #eef3fb;
  --panel: #ffffff;
  --panel-soft: #f7faff;
  --text: #102238;
  --muted: #5f7288;
  --line: #d7e1ee;
  --accent: #0b8a63;
  --accent-2: #216fce;
  --shadow: 0 20px 42px rgba(17, 35, 62, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 420px at 90% -10%, rgba(11, 138, 99, 0.18), transparent 60%),
    radial-gradient(760px 340px at -10% 10%, rgba(33, 111, 206, 0.16), transparent 60%),
    var(--bg);
}

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

.sidebar,
.workspace {
  padding: 18px;
}

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

.content-grid {
  display: grid;
  grid-template-columns: 0.88fr 1.08fr 1.12fr;
  gap: 16px;
}

.panel,
.subpanel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 16px;
}

.subpanel {
  padding: 12px;
}

.brand {
  margin: 0 0 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.muted {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.panel-head,
.row,
.stack-inline {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.panel-head {
  margin-bottom: 12px;
}

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

.gap-sm {
  gap: 8px;
}

.top-space {
  margin-top: 12px;
}

.compact {
  justify-content: flex-end;
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid #c9d8e7;
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  padding: 11px 12px;
  font-size: 14px;
  font-family: inherit;
}

.textarea {
  min-height: 124px;
  resize: vertical;
}

.btn,
.mini {
  border: 1px solid #c4d6e8;
  border-radius: 12px;
  background: #fff;
  color: #284d74;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 14px;
  cursor: pointer;
}

.btn.primary {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.pill {
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 800;
  color: #145843;
  background: #e7f7ef;
  border: 1px solid #caeadf;
}

.session-list,
.stage-list,
#outputsList {
  display: grid;
  gap: 8px;
}

.session-card,
.stage-card,
.output-card {
  border: 1px solid #d8e3ef;
  border-radius: 14px;
  padding: 12px;
  background: var(--panel-soft);
  cursor: pointer;
}

.session-card.active,
.stage-card.active,
.output-card.active {
  border-color: #8db9ea;
  box-shadow: inset 0 0 0 1px #8db9ea;
  background: #eef6ff;
}

.session-card h3,
.stage-card h3,
.subpanel h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.kicker {
  margin: 0 0 6px;
  color: #3f5f81;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 12px;
  font-weight: 800;
}

.field-card {
  border: 1px solid #dae4f1;
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}

.field-card label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 700;
}

.field-help {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.summary {
  min-height: 78px;
  border: 1px dashed #bed2e9;
  border-radius: 14px;
  padding: 12px;
  background: #f5f9ff;
  font-size: 14px;
  line-height: 1.45;
}

.output-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  font-size: 14px;
  line-height: 1.4;
}

details {
  border: 1px solid #d8e3ef;
  border-radius: 14px;
  background: var(--panel-soft);
  padding: 12px;
}

summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

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

  .content-grid {
    grid-template-columns: 1fr;
  }
}
