:root {
  --ink: #172033;
  --muted: #667085;
  --line: #d8e0ec;
  --navy: #17356d;
  --bg: #f4f7fb;
  --panel: #ffffff;
  --red: #dc2626;
  --orange: #f59e0b;
  --green: #2f9e44;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 32px;
  color: white;
  background: var(--navy);
}
.topbar h1 { margin: 0; font-size: 25px; letter-spacing: 0; }
.topbar p { margin: 6px 0 0; color: #dbe7ff; }
.access-pill {
  border: 1px solid rgba(255,255,255,.36);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255,255,255,.1);
  font-weight: 700;
}
main { max-width: 1220px; margin: 0 auto; padding: 24px; }
.metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.metric, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.metric { padding: 15px; min-height: 92px; }
.metric span { display: block; color: var(--muted); font-size: 12px; }
.metric strong { display: block; margin-top: 8px; font-size: 26px; }
.panel { padding: 16px; margin-bottom: 16px; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panel-title h2 { margin: 0; font-size: 18px; }
.panel-title span { color: var(--muted); font-weight: 700; }
.urgent { border-color: #f7bf57; }
.empty { padding: 18px; color: var(--muted); background: #f9fbfe; border: 1px dashed var(--line); border-radius: 8px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.card { border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: #fff; }
.card h3 { margin: 0 0 6px; font-size: 16px; }
.meta { color: var(--muted); font-size: 13px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 700;
  font-size: 12px;
}
.dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.progress { height: 10px; background: #e7ecf3; border-radius: 999px; overflow: hidden; margin: 10px 0; }
.bar { height: 100%; background: var(--green); width: 0%; }
.task-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.alert-action_required { border-left: 5px solid var(--orange); }
.alert-warning { border-left: 5px solid #facc15; }
.alert-critical { border-left: 5px solid var(--red); }
.alert-info { border-left: 5px solid var(--green); }
.event-row {
  display: grid;
  grid-template-columns: 190px 190px 1fr;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
code { background: #eef2f7; padding: 2px 5px; border-radius: 4px; }
.state-done { background: #e9f7ee; border-color: #2f9e44; color: #172033; } .dot-done { background: #2f9e44; }
.state-implementing { background: #eef4ff; border-color: #2563eb; color: #172033; } .dot-implementing { background: #2563eb; }
.state-reviewing { background: #eef6ff; border-color: #3b82f6; color: #172033; } .dot-reviewing { background: #3b82f6; }
.state-verifying { background: #f4f0ff; border-color: #7c3aed; color: #172033; } .dot-verifying { background: #7c3aed; }
.state-blocked_for_decision { background: #fff7e6; border-color: #f59e0b; color: #172033; } .dot-blocked_for_decision { background: #f59e0b; }
.state-todo { background: #f4f6f8; border-color: #94a3b8; color: #172033; } .dot-todo { background: #94a3b8; }
.state-cancelled { background: #fff1f2; border-color: #dc2626; color: #172033; } .dot-cancelled { background: #dc2626; }
@media (max-width: 900px) {
  .topbar { align-items: flex-start; flex-direction: column; padding: 20px; }
  main { padding: 14px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .event-row { grid-template-columns: 1fr; }
}
