:root {
    --bg: #f6f6f4;
    --surface: #ffffff;
    --text: #1d1d1b;
    --muted: #6b6b66;
    --border: #e2e2dd;
    --accent: #2f5bd3;
    --ok: #1f7a3d;
    --bad: #b3261e;
    --busy: #9a6a00;
    --log-bg: #1d1d1b;
    --log-text: #e8e8e3;
    color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #161615;
        --surface: #1f1f1d;
        --text: #e8e8e3;
        --muted: #9a9a93;
        --border: #33332f;
        --accent: #7c9cf0;
        --ok: #5cc27e;
        --bad: #f08a80;
        --busy: #e0b552;
        --log-bg: #0e0e0d;
    }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, sans-serif; }
header { display: flex; justify-content: space-between; align-items: center; padding: 12px 24px; border-bottom: 1px solid var(--border); background: var(--surface); }
header form { margin: 0; }
.brand { font-weight: 700; color: var(--text); text-decoration: none; }
main { max-width: 1000px; margin: 0 auto; padding: 24px 16px; }
a { color: var(--accent); }
h1 { font-size: 24px; margin: 0 0 16px; }
h2 { font-size: 18px; margin: 32px 0 12px; }
.title-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.title-row h1 { margin: 0; }
.actions { display: flex; gap: 8px; align-items: center; }
.actions form { margin: 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 20px; }
.narrow { max-width: 360px; margin: 48px auto; }
form.card label { display: block; margin-bottom: 14px; font-weight: 500; }
form.card small { display: block; font-weight: 400; color: var(--muted); }
input, textarea { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 6px; }
button, .button { display: inline-block; padding: 8px 14px; font: inherit; font-weight: 500; color: #fff; background: var(--accent); border: 0; border-radius: 6px; cursor: pointer; text-decoration: none; }
.button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--border); }
button.link { background: none; color: var(--accent); padding: 0; text-decoration: underline; }
button.danger { background: var(--bad); }
.danger-zone { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: 13px; color: var(--muted); font-weight: 500; }
td form { margin: 0; }
dl.card { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0; }
dt { color: var(--muted); }
dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, monospace; font-size: 13px; }
.error { color: var(--bad); }
.status { font-weight: 600; }
.status.succeeded { color: var(--ok); }
.status.failed { color: var(--bad); }
.status.running, .status.queued { color: var(--busy); }
.log { background: var(--log-bg); color: var(--log-text); padding: 16px; border-radius: 8px; overflow-x: auto; font-size: 12.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 640px) {
    dl.card { grid-template-columns: 1fr; gap: 2px; }
    dd { margin-bottom: 8px; }
    table { display: block; overflow-x: auto; }
}
