/* ============================================================
 * Wesley Annotation — design tokens (light / dark)
 * Light-first, Roboflow-inspired indigo accent. data-theme on <html>.
 * ============================================================ */
:root {
  color-scheme: light;
  --bg: #f5f6fb;
  --bg-grad-1: #eef0fb;
  --bg-grad-2: #f7f8fc;
  --surface: #ffffff;
  --surface-2: #f3f5fa;
  --surface-3: #eceff6;
  --surface-hover: #f0f2f8;
  --border: #e4e7ef;
  --border-strong: #d2d7e3;
  --text: #1c2230;
  --text-2: #4a5365;
  --muted: #7a8499;
  --muted-2: #9aa3b5;

  --primary: #5b5bf0;
  --primary-600: #4f46e5;
  --primary-700: #4338ca;
  --primary-soft: #ececfe;
  --primary-soft-2: #e0e0fc;
  --on-primary: #ffffff;

  --success: #16a34a;
  --success-soft: #dcfce7;
  --warning: #d97706;
  --warning-soft: #fef3c7;
  --danger: #e11d48;
  --danger-soft: #ffe4e6;
  --info: #2563eb;
  --info-soft: #dbeafe;

  /* status palette: unassigned / assigned / progress / annotating / review(抽检待审) / done */
  --st-unassigned: #9aa3b5;
  --st-assigned: #2563eb;
  --st-review: #7c3aed;
  --st-done: #16a34a;
  --st-progress: #d97706;    /* 进行中：有草稿、尚未完成 = 琥珀 */
  --st-annotating: #0d9488;  /* 正在标注：本人正开着 / 他人持锁 = 青 */

  --shadow-sm: 0 1px 2px rgba(20, 27, 45, 0.06), 0 1px 1px rgba(20, 27, 45, 0.04);
  --shadow-md: 0 6px 22px rgba(28, 36, 60, 0.10);
  --shadow-lg: 0 18px 50px rgba(24, 32, 56, 0.16);
  --shadow-pop: 0 12px 34px rgba(24, 32, 56, 0.18);

  --r-sm: 7px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;

  --rail-left: 304px;
  --rail-right: 288px;
  --topbar-h: 56px;

  --font: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", "JetBrains Mono", "Cascadia Code", Consolas, monospace;

  --canvas-bg: #e9ecf3;
  --canvas-grid: rgba(60, 70, 95, 0.06);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0e18;
  --bg-grad-1: #0d1322;
  --bg-grad-2: #090d16;
  --surface: #121826;
  --surface-2: #161d2e;
  --surface-3: #1c2538;
  --surface-hover: #1d263a;
  --border: #232c40;
  --border-strong: #313c56;
  --text: #e7ebf4;
  --text-2: #b3bccf;
  --muted: #8693ab;
  --muted-2: #66728a;

  --primary: #7c7cf6;
  --primary-600: #6d6ef2;
  --primary-700: #8a8bf8;
  --primary-soft: #20223f;
  --primary-soft-2: #2a2c52;
  --on-primary: #ffffff;

  --success: #34d399;
  --success-soft: #0f3328;
  --warning: #fbbf24;
  --warning-soft: #3a2a0c;
  --danger: #fb7185;
  --danger-soft: #3a1622;
  --info: #60a5fa;
  --info-soft: #11254a;

  --st-unassigned: #66728a;
  --st-assigned: #60a5fa;
  --st-review: #a78bfa;
  --st-done: #34d399;
  --st-progress: #fbbf24;    /* 进行中：有草稿、尚未完成 = 琥珀 */
  --st-annotating: #2dd4bf;  /* 正在标注：本人正开着 / 他人持锁 = 青 */

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 26px rgba(0, 0, 0, 0.42);
  --shadow-lg: 0 22px 56px rgba(0, 0, 0, 0.5);
  --shadow-pop: 0 16px 40px rgba(0, 0, 0, 0.55);

  --canvas-bg: #0c1019;
  --canvas-grid: rgba(150, 165, 200, 0.05);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 8% -8%, var(--bg-grad-1), transparent 60%),
    radial-gradient(1000px 500px at 100% 0%, var(--bg-grad-2), transparent 55%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
/* neutralize Chrome autofill so autofilled fields (e.g. display name) match the others */
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus, textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--surface) inset;
  box-shadow: 0 0 0 1000px var(--surface) inset;
  caret-color: var(--text);
  transition: background-color 9999s ease-in-out 0s;
}
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
[hidden] { display: none !important; }   /* beat class display rules (.queue/.rail set display:flex) */
.muted { color: var(--muted); }
.sm { font-size: 12px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--muted-2); background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* icon sizing (inline SVG injected by JS) */
[data-ico] { display: inline-flex; align-items: center; justify-content: center; }
[data-ico] svg { width: 1em; height: 1em; display: block; }
.gate-ico { font-size: 30px; color: var(--muted-2); }
