:root {
  --bg: #0f1115;
  --panel: #181b22;
  --line: #2a2f3a;
  --text: #e6e8ec;
  --muted: #9aa0ad;
  --accent: #4f8cff;
  --accent-2: #7aa9ff;
  --ok: #3fb37f;
  --err: #ff5d5d;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.muted { color: var(--muted); }
kbd {
  background: #2a2f3a; border: 1px solid #3a3f4a; padding: 1px 6px;
  border-radius: 4px; font-size: 12px;
}

/* Auth page */
body.auth main {
  max-width: 420px; margin: 12vh auto; padding: 32px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
}
body.auth h1 { margin: 0 0 6px; font-size: 22px; }
body.auth label { display: block; margin: 18px 0 6px; font-size: 13px; color: var(--muted); }
body.auth input {
  width: 100%; padding: 10px 12px;
  background: #11141a; color: var(--text);
  border: 1px solid var(--line); border-radius: 8px;
}
body.auth button {
  margin-top: 16px; width: 100%;
  padding: 10px 14px; background: var(--accent); color: white;
  border: none; border-radius: 8px; font-weight: 600; cursor: pointer;
}
body.auth button:hover { background: var(--accent-2); }

/* Annotate page */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line);
}
.topbar .brand { font-weight: 700; }
.topbar .meta { display: flex; gap: 14px; align-items: center; font-size: 13px; }
.topbar button.link {
  background: none; border: none; color: var(--muted); cursor: pointer;
  text-decoration: underline; font-size: 13px;
}

.annotate-main {
  max-width: 1200px; margin: 0 auto; padding: 14px;
}
.instructions {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 12px; font-size: 14px;
  margin-bottom: 12px;
}
.canvas-wrap {
  background: #000; border: 1px solid var(--line); border-radius: 8px;
  overflow: auto;
  height: calc(100vh - 280px);
  min-height: 420px;
  position: relative;
}
canvas {
  display: block; cursor: crosshair;
  margin: 0 auto;            /* centre when smaller than wrap */
  user-select: none; -webkit-user-select: none;
}

.toolbar {
  display: flex; gap: 10px; align-items: center;
  margin-top: 12px; padding: 10px 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
}
.toolbar .spacer { flex: 1; }
.toolbar .divider {
  width: 1px; height: 22px; background: var(--line); margin: 0 4px;
}
.toolbar button {
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 6px;
  background: #1f242d; color: var(--text); cursor: pointer;
}
.toolbar button:hover { background: #262c37; }
.toolbar button.primary {
  background: var(--accent); border-color: var(--accent); color: white; font-weight: 600;
}
.toolbar button.primary:hover { background: var(--accent-2); }

.status { min-height: 20px; padding: 6px 4px; font-size: 13px; color: var(--muted); }
.status.ok { color: var(--ok); }
.status.err { color: var(--err); }
