:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1d252c;
  background: #f3f5f4;
  --border: #d9dfdc;
  --muted: #69756f;
  --green: #177a52;
  --red: #c63e36;
  --amber: #a3620a;
  --blue: #1b67a8;
}
* { box-sizing: border-box; letter-spacing: 0; }
body { margin: 0; min-width: 320px; background: #f3f5f4; }
header { min-height: 104px; padding: 24px max(24px, calc((100vw - 1440px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 20px; background: #17221e; color: #fff; border-bottom: 4px solid #e0b351; }
.eyebrow { margin: 0 0 4px; color: #91aaa0; font: 600 11px/1.2 ui-monospace, monospace; }
h1 { margin: 0; font-size: 25px; line-height: 1.2; }
.actions { display: flex; align-items: center; gap: 8px; }
button, input { font: inherit; }
button { cursor: pointer; }
.icon-button { width: 38px; height: 38px; border: 1px solid #53615b; background: transparent; color: #fff; border-radius: 5px; }
.icon-button:disabled { opacity: .35; cursor: default; }
.text-button { min-height: 38px; padding: 0 14px; border: 1px solid #246b50; background: #18704f; color: white; border-radius: 5px; font-weight: 650; }
main { width: min(1440px, 100%); margin: 0 auto; padding: 22px 24px 48px; }
.notice { margin-bottom: 16px; padding: 11px 14px; border: 1px solid #e2a19c; background: #fff1f0; color: #8e2821; border-radius: 5px; }
.summary { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); border: 1px solid var(--border); background: white; }
.metric { min-height: 90px; padding: 15px 18px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; border: 0; border-right: 1px solid var(--border); border-bottom: 3px solid transparent; background: white; color: var(--muted); }
.metric:last-child { border-right: 0; }
.metric strong { color: #202a25; font-size: 27px; }
.metric.active { background: #f8faf9; border-bottom-color: #263a31; }
.metric.running.active { border-bottom-color: var(--blue); }
.metric.queued.active { border-bottom-color: var(--amber); }
.metric.succeeded.active { border-bottom-color: var(--green); }
.metric.failed.active { border-bottom-color: var(--red); }
.toolbar { display: flex; justify-content: space-between; gap: 12px; margin: 20px 0 12px; }
.search { width: min(440px, 100%); display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--border); background: white; border-radius: 5px; }
.search input, #add-value { min-width: 0; min-height: 40px; border: 0; outline: 0; background: transparent; }
.search input { width: 100%; }
#add-form { display: flex; gap: 8px; }
#add-value { width: min(340px, 40vw); padding: 0 12px; border: 1px solid var(--border); background: white; border-radius: 5px; }
.task-panel { border: 1px solid var(--border); background: white; }
.panel-head { min-height: 48px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); font-weight: 700; }
.panel-head span:last-child { color: var(--muted); font-size: 13px; font-weight: 500; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th { height: 40px; padding: 0 12px; background: #f7f9f8; color: var(--muted); text-align: left; font-size: 12px; font-weight: 650; }
td { min-height: 56px; padding: 10px 12px; border-top: 1px solid #edf0ee; vertical-align: middle; font-size: 13px; }
th:nth-child(1), td:nth-child(1) { width: 68px; }
th:nth-child(3), td:nth-child(3) { width: 114px; }
th:nth-child(4), td:nth-child(4) { width: 168px; }
th:nth-child(5), td:nth-child(5) { width: 100px; }
th:nth-child(6), td:nth-child(6) { width: 176px; text-align: right; }
.card-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #17231d; font-weight: 650; }
.card-id { display: block; margin-top: 3px; color: var(--muted); font: 11px/1.3 ui-monospace, monospace; }
.status { display: inline-flex; align-items: center; gap: 7px; font-weight: 650; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-running { color: var(--blue); }
.status-queued { color: var(--amber); }
.status-succeeded { color: var(--green); }
.status-failed { color: var(--red); }
.requeue { width: 30px; height: 30px; border: 0; background: transparent; color: #7c8882; font-size: 18px; border-radius: 4px; }
.requeue:hover { color: var(--amber); background: #fff8eb; }
.requeue:disabled { opacity: .3; cursor: default; background: transparent; color: #7c8882; }
.task-actions { min-height: 30px; display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.export { min-height: 30px; padding: 0 9px; display: inline-flex; align-items: center; border: 1px solid #b9d2c7; border-radius: 4px; color: var(--green); text-decoration: none; font-weight: 650; white-space: nowrap; }
.export:hover { border-color: var(--green); background: #eff8f4; }
.empty { padding: 48px; margin: 0; text-align: center; color: var(--muted); }
.pager { min-height: 48px; padding: 8px 14px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.page-button { width: 32px; height: 32px; border: 1px solid var(--border); border-radius: 4px; background: white; color: #27362f; font-size: 20px; }
.page-button:disabled { opacity: .35; cursor: default; }
.logs { margin-top: 16px; border: 1px solid var(--border); background: white; }
.logs summary { padding: 13px 14px; cursor: pointer; font-weight: 700; }
#log-count { color: var(--muted); font-size: 12px; }
#log-list { max-height: 320px; overflow: auto; padding: 10px 14px; border-top: 1px solid var(--border); background: #101713; color: #c9d5cf; font: 11px/1.55 ui-monospace, monospace; }
.log-line { white-space: pre-wrap; overflow-wrap: anywhere; }
.log-error { color: #ff938b; }
.log-success { color: #76d4a8; }
@media (max-width: 760px) {
  header { align-items: flex-start; padding: 20px 16px; }
  main { padding: 16px; }
  .summary { grid-template-columns: repeat(2, 1fr); }
  .metric { min-height: 76px; border-bottom: 1px solid var(--border); }
  .metric:last-child { grid-column: span 2; }
  .toolbar { flex-direction: column; }
  .search, #add-form, #add-value { width: 100%; }
  th:nth-child(4), td:nth-child(4), th:nth-child(5), td:nth-child(5) { display: none; }
}
