* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #12141a;
  color: #e6e8ef;
}
header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 20px;
  background: #1a1d26;
  border-bottom: 1px solid #2a2e3a;
}
#job-strip {
  margin-left: auto;
  font-size: 12px;
  color: #8892a6;
  padding: 4px 10px;
  border-radius: 6px;
  background: #0e1015;
  border: 1px solid #2a2e3a;
}
#job-strip.running { color: #f0a94e; border-color: #f0a94e; }
header h1 { font-size: 18px; margin: 0; color: #f0a94e; }
nav { display: flex; gap: 8px; }
.tab-btn {
  background: transparent;
  border: 1px solid #2a2e3a;
  color: #aab0c0;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
}
.tab-btn.active { background: #f0a94e; color: #12141a; border-color: #f0a94e; font-weight: 600; }
main { padding: 20px; display: flex; flex-wrap: wrap; gap: 20px; }
.tab { display: none; width: 100%; flex-wrap: wrap; gap: 20px; }
.tab.active { display: flex; }
.panel {
  background: #1a1d26;
  border: 1px solid #2a2e3a;
  border-radius: 10px;
  padding: 16px;
  flex: 1 1 380px;
  min-width: 320px;
}
.panel.wide { flex-basis: 100%; }
h2 { margin-top: 0; font-size: 15px; color: #f0a94e; }
.file-list { list-style: none; padding: 0; margin: 0; max-height: 320px; overflow-y: auto; }
.file-list li { padding: 6px 4px; border-bottom: 1px solid #22252f; font-size: 13px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.file-list li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.raw-file-row { align-items: flex-start !important; flex-direction: column; gap: 6px !important; padding: 10px 4px !important; }
.raw-file-info { display: flex; flex-direction: column; gap: 4px; width: 100%; }
.raw-file-actions { display: flex; gap: 6px; align-self: flex-end; }
.badge-row { display: flex; gap: 6px; }
.badge { font-size: 10px; padding: 2px 7px; border-radius: 10px; border: 1px solid #383d4c; }
.badge-done { color: #6fcf7a; border-color: #2f5c34; background: #16221a; }
.badge-pending { color: #8892a6; }
.both-done-notice { font-size: 11px; color: #f0a94e; }
.archive-btn:hover { border-color: #6fcf7a; color: #6fcf7a; }
.small-btn { background: #2a2e3a; border: 1px solid #383d4c; color: #cfd4e0; font-size: 11px; padding: 3px 8px; border-radius: 5px; cursor: pointer; flex-shrink: 0; }
.small-btn:hover { border-color: #e06666; color: #e06666; }
.output-file { padding: 4px 6px; cursor: pointer; font-size: 12px; border-radius: 4px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.form-group { margin-bottom: 18px; }
.form-group h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #f0a94e; margin: 0 0 8px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 16px; }
.form-grid label { font-size: 11px; }
.form-grid input, .form-grid select { width: 100%; }
.field-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
label { display: flex; flex-direction: column; font-size: 12px; color: #aab0c0; gap: 4px; }
input, select, textarea {
  background: #0e1015;
  border: 1px solid #2a2e3a;
  color: #e6e8ef;
  padding: 6px 8px;
  border-radius: 6px;
  font-family: inherit;
}
button {
  background: #2a2e3a;
  color: #e6e8ef;
  border: 1px solid #383d4c;
  padding: 7px 16px;
  border-radius: 6px;
  cursor: pointer;
}
button:hover { border-color: #f0a94e; }
#run-btn { background: #f0a94e; color: #12141a; font-weight: 600; border: none; }
.log-box {
  background: #0e1015;
  border: 1px solid #2a2e3a;
  border-radius: 6px;
  padding: 10px;
  height: 320px;
  overflow-y: auto;
  font-size: 12px;
  white-space: pre-wrap;
  margin-top: 10px;
}
table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 10px; }
th, td { text-align: left; padding: 6px; border-bottom: 1px solid #22252f; }
tr.job-row { cursor: pointer; }
tr.job-row:hover { background: #22252f; }
.status-done { color: #6fcf7a; }
.status-error { color: #e06666; }
.status-running { color: #f0a94e; }
.status-queued { color: #8892a6; }
.status-cancelled { color: #8892a6; }
.output-group { margin-bottom: 14px; }
.output-group h3 { font-size: 13px; margin: 6px 0; color: #cfd4e0; }
.output-file { padding: 4px 6px; cursor: pointer; font-size: 12px; border-radius: 4px; }
.output-file:hover { background: #22252f; }
#config-text { width: 100%; height: 420px; }
#preview-player { width: 100%; max-height: 480px; background: black; border-radius: 6px; }
details summary { cursor: pointer; color: #f0a94e; font-size: 13px; font-weight: 600; }
details[open] summary { margin-bottom: 10px; }
.checklist { font-size: 13px; line-height: 1.8; padding-left: 20px; margin: 0; }
.checklist code { background: #0e1015; padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.connect-link {
  display: inline-block; background: #f0a94e; color: #12141a; font-weight: 600;
  padding: 8px 18px; border-radius: 6px; text-decoration: none; font-size: 13px;
}
.connect-link:hover { opacity: 0.9; }
#run-status, #config-status { font-size: 12px; margin: 8px 0; color: #8892a6; }
