:root { --ink:#1f2328; --muted:#636c76; --line:#d8dee4; --bg:#f6f8fa; --accent:#1f5fbf;
  --b1:#8fb8e8; --b2:#e8c66a; --b3:#e8955a; --b4:#d1495b; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
* { box-sizing: border-box; }
body { margin:0; color:var(--ink); background:var(--bg); }
.top { display:flex; gap:24px; align-items:center; padding:12px 20px; background:#fff; border-bottom:1px solid var(--line); flex-wrap:wrap; }
.brand { color:var(--ink); text-decoration:none; }
nav a { margin-right:16px; color:var(--muted); text-decoration:none; }
nav a.on { color:var(--accent); font-weight:600; }
main { max-width:1100px; margin:0 auto; padding:20px; }
h1 { font-size:1.4rem; margin:0 0 16px; }
h2 { font-size:1.1rem; margin:24px 0 8px; }
.card { background:#fff; border:1px solid var(--line); border-radius:8px; padding:16px; margin-bottom:16px; }
.row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin:6px 0; }
.muted { color:var(--muted); }
input, textarea, select { font:inherit; padding:6px 8px; border:1px solid var(--line); border-radius:6px; }
textarea { width:100%; min-height:80px; }
input.wide { flex:1; min-width:200px; }
input.num { width:80px; }
button { font:inherit; padding:6px 12px; border-radius:6px; border:1px solid var(--line); background:#fff; cursor:pointer; }
button.primary { background:var(--accent); border-color:var(--accent); color:#fff; }
button.danger { color:var(--b4); }
button:disabled { opacity:.5; cursor:default; }
table { width:100%; border-collapse:collapse; }
th, td { text-align:left; padding:8px; border-bottom:1px solid var(--line); vertical-align:top; }
.pill { display:inline-block; padding:2px 8px; border-radius:999px; font-size:.85rem; }
.just_started { background:#e3eefa; } .midway { background:#faf1d6; } .nearing { background:#fae3d3; } .overdue { background:#f8d7dc; }
.flow { overflow-x:auto; }
.flow svg { min-width:600px; width:100%; height:auto; }
.flow .stage { cursor:pointer; }
.legend span { margin-right:12px; }
.legend i { display:inline-block; width:12px; height:12px; border-radius:2px; margin-right:4px; vertical-align:-1px; }
.legend .l1 { background:var(--b1); } .legend .l2 { background:var(--b2); } .legend .l3 { background:var(--b3); } .legend .l4 { background:var(--b4); }
ul.plain { list-style:none; padding:0; margin:0; }
ul.plain li { padding:6px 0; border-bottom:1px solid var(--line); }
#toast { position:fixed; bottom:20px; left:50%; transform:translateX(-50%); background:var(--ink); color:#fff; padding:10px 16px; border-radius:8px; }
.error { color:var(--b4); }
.pre { white-space:pre-wrap; margin:4px 0; }
