:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --line: #d8e1ef;
  --text: #1d2a3a;
  --muted: #617086;
  --accent: #2f80ed;
  --accent-2: #27ae60;
  --warn: #eb5757;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #eef4fb 0%, #f8fbff 100%);
}
.app {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 20px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.06);
}
.sidebar {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
h1 { font-size: 1.5rem; margin: 0 0 8px; }
h2 { font-size: 1rem; margin: 0 0 8px; }
.small, .footer-note { font-size: 0.92rem; color: var(--muted); line-height: 1.45; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1; }
button, select {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.95rem;
}
button { cursor: pointer; font-weight: 600; }
button.primary { background: var(--accent); color: white; border-color: var(--accent); }
button.success { background: var(--accent-2); color: white; border-color: var(--accent-2); }
.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef5ff;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
  width: fit-content;
}
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdff;
}
.stat .label { color: var(--muted); font-size: 0.82rem; margin-bottom: 6px; }
.stat .value { font-size: 1.25rem; font-weight: 700; }
.canvas-wrap { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.status {
  padding: 12px 14px;
  border-radius: 14px;
  background: #f7faff;
  border: 1px solid var(--line);
  color: var(--muted);
  min-height: 48px;
}
canvas {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  touch-action: none;
  display: block;
}
.progress { width: 100%; height: 12px; background: #eaf0f8; border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), #68a7ff); transition: width 0.2s ease; }
@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
}
