/* Portaal-lay-out. Rapportstijl staat in report.css. Geen inline styles (CSP). */
:root {
  --ink: #1b1f24; --muted: #6b7280; --line: #e5e7eb; --bg: #f6f7f9; --card: #ffffff;
  --accent: #0f4c81; --accent-ink: #ffffff; --red: #b91c1c; --green: #15803d; --yellow: #b45309;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif; color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.5; }
nav.top { display: flex; align-items: center; gap: 18px; padding: 10px 20px; background: var(--accent); color: var(--accent-ink); }
nav.top a { color: var(--accent-ink); text-decoration: none; }
nav.top .brand { font-weight: 700; letter-spacing: .04em; }
nav.top .spacer { flex: 1; }
nav.top .who { opacity: .85; font-size: 13px; }
main { max-width: 1200px; margin: 0 auto; padding: 20px; }
h1 { font-size: 24px; margin: 0 0 12px; }
h2 { font-size: 18px; margin: 20px 0 8px; }
h3 { font-size: 15px; margin: 14px 0 6px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; margin: 0 0 16px; }
.card.narrow { max-width: 420px; margin: 40px auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: Consolas, "Courier New", monospace; font-size: 13px; }
.flash { padding: 10px 14px; border-radius: 6px; margin: 0 0 14px; }
.flash.ok { background: #dcfce7; color: var(--green); }
.flash.err { background: #fee2e2; color: var(--red); }
form label { display: block; margin: 8px 0; font-size: 14px; }
form input[type=text], form input[type=email], form input[type=password], form input[type=file], form select, form textarea {
  width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 5px; font: inherit; background: #fff;
}
form.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
form.row label { flex: 1 1 160px; margin: 4px 0; }
form.inline { display: inline; }
button { font: inherit; padding: 7px 14px; border-radius: 5px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button.danger { background: #fff; color: var(--red); border-color: var(--red); }
button.link { background: none; border: none; color: inherit; text-decoration: underline; padding: 0; }
table { width: 100%; border-collapse: collapse; margin: 6px 0 12px; font-size: 14px; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; background: #eef2f7; color: var(--muted); }
.badge.done, .badge.released, .badge.ok { background: #dcfce7; color: var(--green); }
.badge.failed, .badge.error { background: #fee2e2; color: var(--red); }
.badge.running, .badge.awaiting_batch, .badge.summarizing, .badge.rendering, .badge.queued, .badge.draft, .badge.new { background: #fef3c7; color: var(--yellow); }
.warn { color: var(--red); }
.row-fields { display: flex; gap: 10px; flex-wrap: wrap; }
.row-fields label { flex: 1 1 200px; }
form.card h2 { margin-top: 18px; }
form.card h2:first-of-type { margin-top: 0; }
.actions a.button, p.actions a.button { padding: 7px 14px; border-radius: 5px; border: 1px solid var(--accent); color: var(--accent); text-decoration: none; background: #fff; }
button[disabled] { opacity: .5; cursor: not-allowed; }
details.card > summary { font-weight: 600; color: var(--ink); }
pre.log { background: #0f172a; color: #e2e8f0; padding: 12px; border-radius: 6px; font-size: 12px; max-height: 420px; overflow: auto; white-space: pre-wrap; }
.tiles { display: flex; gap: 12px; flex-wrap: wrap; margin: 8px 0 16px; }
.tile { flex: 1 1 140px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; }
.tile .num { display: block; font-size: 26px; font-weight: 600; }
.tile .lbl { display: block; font-size: 12px; color: var(--muted); }
details { margin: 6px 0; }
summary { cursor: pointer; color: var(--accent); }
.filterbar { display: flex; gap: 8px; align-items: center; margin: 8px 0 12px; flex-wrap: wrap; }
.filterbar a { padding: 4px 10px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); font-size: 13px; background: #fff; }
.filterbar a.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.report-wrap { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px 18px; }
.actions { display: flex; gap: 10px; align-items: center; margin: 8px 0 14px; flex-wrap: wrap; }
.actions a.button { padding: 7px 14px; border-radius: 5px; border: 1px solid var(--accent); color: var(--accent); text-decoration: none; background: #fff; }
.htmx-request .spinner, .spinner.htmx-request { display: inline; }
.spinner { display: none; color: var(--muted); font-size: 13px; }
@media (max-width: 700px) { main { padding: 12px; } nav.top { gap: 10px; padding: 8px 12px; } }
.progress { margin: 4px 0 10px; }
.checklist { list-style: none; padding: 0; margin: 6px 0; font-size: 14px; }
.checklist li { padding: 2px 0; }
.checklist .mark { display: inline-block; width: 1.4em; font-weight: 700; }
.checklist li.done .mark { color: var(--green); }
.checklist li.busy .mark { color: var(--yellow); }
.checklist li.failed .mark, .checklist li.failed { color: var(--red); }
.checklist li.todo { color: var(--muted); }
.cloud-tree details.sub { border-bottom: 1px solid var(--line); padding: 4px 0; }
.cloud-tree details.sub > summary { cursor: pointer; padding: 4px 0; }
.cloud-tree details.sub table { margin: 4px 0 8px 18px; width: calc(100% - 18px); }
table.sysrows { width: auto; min-width: 60%; margin: 4px 0 6px 1.6em; font-size: 13px; }
table.sysrows td, table.sysrows th { padding: 3px 10px 3px 0; }
table.sysrows tr.done .mark { color: var(--green); }
table.sysrows tr.busy .mark { color: var(--yellow); }
table.sysrows tr.failed td { color: var(--red); }
table.sysrows tr.todo td { color: var(--muted); }
