:root {
  --bg: #0f1419;
  --panel: #171d25;
  --line: #2a3340;
  --text: #e8eef5;
  --muted: #8b97a8;
  --accent: #3d8bfd;
  --green: #2fbf71;
  --amber: #e3b341;
  --red: #e35d6a;
}
body { background: var(--bg); color: var(--text); }
.navbar { background: var(--panel); border-bottom: 1px solid var(--line); }
.card, .table {
  --bs-table-bg: var(--panel);
  --bs-table-color: var(--text);
  --bs-table-striped-color: var(--text);
  --bs-table-hover-color: var(--text);
  --bs-table-border-color: var(--line);
  background: var(--panel);
  color: var(--text);
  border-color: var(--line);
}
.table>:not(caption)>*>* { color: var(--text); }
.form-control, .form-select, textarea { background: #10151c; color: var(--text); border-color: var(--line); }
.form-control:focus { background: #10151c; color: var(--text); }
.light { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.light.green { background: var(--green); }
.light.amber { background: var(--amber); }
.light.red { background: var(--red); }
.muted { color: var(--muted); }
.btn-accent { background: var(--accent); color: #fff; }
.form-check-input { background-color: #3a4452; border-color: var(--line); cursor: pointer; }
.form-check-input:checked { background-color: var(--green); border-color: var(--green); }
.form-switch .form-check-input { width: 2.4em; height: 1.25em; }
pre.log { background: #10151c; padding: 1rem; border-radius: 8px; max-height: 420px; overflow: auto; }
.ticker-text { max-width: 28rem; white-space: normal; }
.badge.text-bg-danger { white-space: normal; }
.episode-lights table {
  table-layout: fixed;
  width: 100%;
  min-width: 52rem;
}
.episode-lights .col-programme { width: 26%; }
.episode-lights .col-video { width: auto; }
.episode-lights .col-light { width: 5.75rem; }
.episode-lights th:nth-child(n+3),
.episode-lights td.light-cell {
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}
.episode-lights .programme-name {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.episode-lights .status-note {
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.episode-lights .video-link {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.source-list table {
  table-layout: fixed;
  width: 100%;
  min-width: 58rem;
}
.source-list .col-name { width: 16%; }
.source-list .col-url { width: auto; }
.source-list .col-today { width: 5rem; }
.source-list .col-active { width: 8rem; }
.source-list .col-actions { width: 15.5rem; }
.source-list .source-name { overflow-wrap: anywhere; }
.source-list .source-error {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.source-list .source-url {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.source-list .source-today,
.source-list .source-active,
.source-list .source-actions-cell {
  text-align: center;
  white-space: nowrap;
}
.source-list .source-active .form-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}
.source-list .source-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  justify-content: center;
  align-items: center;
}
.source-list .source-actions form { margin: 0; }
.source-list .source-actions .btn { white-space: nowrap; }
.sort-link { color: var(--text); text-decoration: none; }
.sort-link:hover { color: #fff; text-decoration: underline; }
.episode-date-row td {
  background: #10151c;
  font-weight: 600;
  padding-top: 0.85rem;
  padding-bottom: 0.55rem;
  border-bottom-color: var(--line);
}
.job-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
@media (min-width: 768px) {
  .job-grid { grid-template-columns: 1fr 1fr; }
}
.job-card {
  background: #10151c;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.9rem 1rem;
}
.job-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
}
.job-card p {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
  margin: 0 0 0.75rem;
}
.job-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.job-pick { width: auto; min-width: 16rem; max-width: 100%; }
.schedule-list table { width: 100%; }
.schedule-title { font-weight: 600; }
.schedule-settings {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
}
.schedule-interval { width: auto; min-width: 7.5rem; }
.schedule-pause-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.schedule-pause { width: 4.5rem; }
.schedule-on,
.schedule-actions-cell {
  text-align: center;
  white-space: nowrap;
}
.schedule-on .form-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}
.schedule-soon td { color: var(--muted); }
.program-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  justify-content: flex-end;
}
.caption-file {
  max-height: 70vh;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
