/* 三跳裁判工作系统 — 设计令牌与公共样式（对照 ui-reference 视觉） */
:root {
  --green-950: #0e2a19;
  --green-900: #14361f;
  --green-800: #1b5e34;
  --green-700: #166534;
  --green-600: #15803d;
  --green-100: #dcf0e3;
  --green-50: #eef7f1;
  --amber-600: #d97706;
  --amber-100: #fef3c7;
  --ink: #1c1917;
  --ink-soft: #44403c;
  --muted: #78716c;
  --line: #e7e5e4;
  --paper: #faf9f7;
  --white: #ffffff;
  --danger: #b91c1c;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(28, 25, 23, .08), 0 4px 16px rgba(28, 25, 23, .06);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
a { color: var(--green-700); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: var(--radius);
  padding: 9px 16px; font-size: 14px; font-weight: 600; line-height: 1.2;
  background: var(--green-700); color: #fff; transition: filter .15s;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.plain { background: var(--white); color: var(--ink); border-color: var(--line); }
.btn.amber { background: var(--amber-600); }
.btn.danger { background: var(--danger); }
.btn.big { padding: 14px 20px; font-size: 17px; border-radius: 14px; }
.btn.small { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }

.tag {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.tag.green { background: var(--green-100); color: var(--green-700); }
.tag.amber { background: var(--amber-100); color: var(--amber-600); }
.tag.gray { background: #f0efee; color: var(--muted); }
.tag.red { background: #fee2e2; color: var(--danger); }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.dot.green { background: #10b981; }
.dot.amber { background: #f59e0b; }
.dot.red { background: #ef4444; }
.dot.gray { background: #a8a29e; }

.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: 14px; padding: 18px; box-shadow: var(--shadow);
}
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }

/* 表格 */
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th {
  text-align: left; font-weight: 600; color: var(--ink-soft);
  background: #f7f6f4; padding: 9px 12px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr.hl { background: var(--green-50); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* 布局工具 */
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 12px; }

/* 弹层 */
.overlay {
  position: fixed; inset: 0; background: rgba(20, 20, 19, .45);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px;
}
.sheet {
  background: var(--white); border-radius: 16px; padding: 22px;
  max-width: 480px; width: 100%; max-height: 86vh; overflow: auto; box-shadow: var(--shadow);
}
.sheet h3 { margin: 0 0 10px; font-size: 17px; }

/* toast */
#toast {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%);
  background: rgba(28, 25, 23, .92); color: #fff; padding: 10px 18px;
  border-radius: 10px; font-size: 14px; z-index: 200; max-width: 86vw; text-align: center;
  display: none;
}
#toast.show { display: block; }
#toast.err { background: rgba(153, 27, 27, .95); }

input.field, select.field {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 12px; font-size: 14px; background: #fff; color: var(--ink);
}
input.field:focus, select.field:focus { outline: 2px solid var(--green-100); border-color: var(--green-600); }
