/* Custom layout additions for Biography Studio */

.brand-mark-studio {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
}

.studio-grid-layout {
  display: grid;
  grid-template-columns: 260px 1fr 280px;
  gap: 20px;
  align-items: start;
}

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

/* Subject list / existing projects */
.subject-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(10, 15, 30, 0.4);
}

.subject-list li {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-size: 0.82rem;
  transition: background 0.15s, color 0.15s;
}

.subject-list li:last-child {
  border-bottom: none;
}

.subject-list li:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent);
}

.subject-list li.active {
  background: rgba(91, 140, 255, 0.1);
  color: var(--accent);
  font-weight: 600;
  border-left: 3px solid var(--accent);
}

/* Pipeline checkboxes */
.pipeline-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(10, 15, 30, 0.4);
  max-height: 180px;
  overflow-y: auto;
}

.pipeline-checkboxes label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  cursor: pointer;
  user-select: none;
  margin: 0;
}

.pipeline-checkboxes input[type="checkbox"] {
  width: auto;
  margin: 0;
  cursor: pointer;
}

/* Step cards */
.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: border-color 0.20s;
}

.step-card:hover {
  border-color: rgba(91, 140, 255, 0.25);
}

.step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
}

.step-header:hover {
  background: rgba(255, 255, 255, 0.02);
}

.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg2);
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--amber);
  border: 1px solid var(--border);
}

.step-meta {
  flex: 1;
  min-width: 0;
}

.step-meta h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.step-meta p {
  margin: 2px 0 0;
  font-size: 0.76rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.step-body {
  display: none;
  padding: 16px;
  border-top: 1px solid var(--border);
  background: rgba(7, 11, 20, 0.3);
}

.step-card.open .step-body {
  display: block;
}

.step-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.badge {
  font-size: 0.65rem;
  padding: 3px 8px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.badge.done { background: rgba(52, 211, 153, 0.12); color: var(--green); border: 1px solid rgba(52, 211, 153, 0.2); }
.badge.pending { background: rgba(255, 255, 255, 0.04); color: var(--muted); border: 1px solid var(--border); }
.badge.running { background: rgba(91, 140, 255, 0.12); color: var(--accent); border: 1px solid rgba(91, 140, 255, 0.2); }
.badge.failed { background: rgba(248, 113, 113, 0.12); color: var(--red); border: 1px solid rgba(248, 113, 113, 0.2); }

/* Jobs and logs */
.job-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(10, 15, 30, 0.4);
}

.job-list li {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-size: 0.76rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  transition: background 0.15s;
}

.job-list li:last-child {
  border-bottom: none;
}

.job-list li:hover {
  background: rgba(255, 255, 255, 0.05);
}

.job-list li.active {
  background: rgba(91, 140, 255, 0.08);
}

.log-output {
  height: 240px;
  background: rgba(5, 7, 15, 0.95);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  font-family: ui-monospace, SFMono-Regular, SF Pro Mono, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  line-height: 1.4;
  overflow-y: auto;
  white-space: pre-wrap;
  color: #c9d1d9;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.8);
}

.hint {
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
  padding: 10px 0;
}
