:root {
  --bg: #f5f6f8; --card: #fff; --ink: #1d2330; --muted: #6b7280; --line: #e3e6eb;
  --accent: #1f5fbf; --ok: #1a7f37; --warn: #b26a00; --bad: #c62828;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 14px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.center { min-height: 100vh; display: grid; place-items: center; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.narrow { width: 340px; }
header { display: flex; gap: 16px; align-items: center; padding: 10px 20px; background: var(--ink); color: #fff; }
header nav { display: flex; gap: 4px; flex: 1; }
header nav button { background: transparent; color: #cfd6e4; }
header nav button.active { background: #ffffff1f; color: #fff; }
header .muted { color: #aab3c5; }
main { padding: 20px; max-width: 1280px; margin: auto; }
h1, h2, h3 { margin: 0 0 8px; }
.toolbar { display: flex; gap: 10px; align-items: center; margin: 10px 0; flex-wrap: wrap; }
.toolbar h2, .toolbar h3 { margin: 0; margin-right: auto; }
button { background: var(--accent); color: #fff; border: 0; border-radius: 6px; padding: 7px 12px; cursor: pointer; font: inherit; }
button.secondary { background: #e8eefb; color: var(--accent); }
button.ghost { background: transparent; color: inherit; border: 1px solid var(--line); }
button.small { padding: 3px 8px; font-size: 12px; }
input, select, textarea { font: inherit; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; width: 100%; }
.toolbar input, .toolbar select { width: auto; }
label { display: block; margin: 8px 0; font-size: 12px; color: var(--muted); }
label input, label select, label textarea { margin-top: 3px; color: var(--ink); }
form button[type=submit] { width: 100%; margin-top: 8px; }
table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: #fafbfc; font-size: 12px; color: var(--muted); font-weight: 600; }
tr.click { cursor: pointer; } tr.click:hover { background: #f8fafe; }
td .actions { display: flex; gap: 4px; flex-wrap: wrap; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; background: #eef0f3; }
.badge.done, .badge.approved, .badge.issued, .badge.online { background: #e3f4e8; color: var(--ok); }
.badge.running, .badge.forchecking, .badge.forapproval { background: #fff3dc; color: var(--warn); }
.badge.failed, .badge.offline { background: #fde7e7; color: var(--bad); }
.badge.queued { background: #e8eefb; color: var(--accent); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 12px; }
.stats .card b { font-size: 26px; display: block; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.list-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); gap: 8px; }
dialog { border: 0; border-radius: 10px; padding: 20px; width: 460px; max-width: 95vw; }
dialog::backdrop { background: #0006; }
dialog menu { display: flex; justify-content: flex-end; gap: 8px; padding: 0; margin: 16px 0 0; }
pre { white-space: pre-wrap; background: #f4f5f7; padding: 10px; border-radius: 6px; max-height: 300px; overflow: auto; font-size: 12px; }
@media (max-width: 800px) { .stats { grid-template-columns: 1fr 1fr; } .grid2 { grid-template-columns: 1fr; } header { flex-wrap: wrap; } }
