:root {
  --brand: #C62828;
  --brand-soft: #fbe9e9;
  --ink: #222;
  --muted: #777;
  --line: #ececec;
  --bg: #fafafa;
  --card: #fff;
  --ok: #2e7d32;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, "Microsoft YaHei", "PingFang SC", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
}
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 22px; background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo {
  width: 40px; height: 40px; border-radius: 8px; background: var(--brand);
  color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center;
  letter-spacing: 1px; font-size: 15px;
}
.title { font-weight: 700; font-size: 17px; }
.subtitle { font-size: 12px; color: var(--muted); margin-top: 2px; }
.topbar-right { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); gap: 4px; }
.field select, .field input {
  font-size: 13px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px;
  color: var(--ink); background: #fff; min-width: 120px;
}
.tabs { display: flex; gap: 4px; padding: 0 22px; background: #fff; border-bottom: 1px solid var(--line); }
.tab {
  border: none; background: none; padding: 12px 16px; cursor: pointer; font-size: 14px;
  color: var(--muted); border-bottom: 2px solid transparent; font-family: inherit;
}
.tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
main { padding: 22px; max-width: 1100px; margin: 0 auto; }
.panel { display: none; }
.panel.active { display: block; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 16px 18px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.03);
}
.card h3 { margin: 0 0 4px; font-size: 15px; }
.card .meta { color: var(--muted); font-size: 12px; margin-bottom: 12px; }
.dept-title { font-size: 16px; font-weight: 700; margin: 18px 0 8px; color: var(--brand); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; background: #fcfcfc; }
td.num, th.num { text-align: right; white-space: nowrap; }
.weight-pill { background: var(--brand-soft); color: var(--brand); border-radius: 20px; padding: 2px 9px; font-size: 12px; font-weight: 600; }
.rater-tag { display: inline-block; background: #f0f0f0; border-radius: 4px; padding: 1px 7px; font-size: 11px; margin: 1px 3px 1px 0; color: #555; }
.emp-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.total-box { background: var(--brand); color: #fff; border-radius: 8px; padding: 10px 16px; font-weight: 700; font-size: 15px; }
.total-box small { font-weight: 400; opacity: .9; }
.btn {
  background: var(--brand); color: #fff; border: none; border-radius: 6px; padding: 8px 16px;
  cursor: pointer; font-size: 13px; font-family: inherit;
}
.btn.ghost { background: #fff; color: var(--brand); border: 1px solid var(--brand); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
input.score {
  width: 72px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; text-align: right;
}
input.score:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.readonly-score { color: var(--muted); font-weight: 600; }
.pending { color: #b26a00; font-size: 12px; }
.criteria { color: var(--muted); font-size: 12px; line-height: 1.5; }
.peer-card { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 14px; }
.peer-card h4 { margin: 0 0 10px; font-size: 14px; }
.dim-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.dim-row .dim-name { width: 90px; font-size: 13px; }
.dim-row .dim-desc { flex: 1; color: var(--muted); font-size: 12px; }
.peer-score-wrap { display: inline-flex; align-items: center; gap: 4px; }
input.peer-score { width: 66px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; text-align: right; font-size: 13px; background: #fff; }
input.peer-score:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.peer-max { color: var(--muted); font-size: 12px; }
.legend { font-size: 12px; color: var(--muted); margin: 6px 0 14px; }
.tag-bad { background: #fff3e0; color: #b26a00; border-radius: 6px; padding: 8px 12px; font-size: 12px; margin-bottom: 14px; }
footer { text-align: center; color: var(--muted); font-size: 12px; padding: 24px; border-top: 1px solid var(--line); margin-top: 30px; }
footer a { color: var(--muted); }
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #222; color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 13px;
  opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 50;
}
.toast.show { opacity: .95; }
.select-row { display: flex; gap: 12px; align-items: flex-end; margin-bottom: 16px; flex-wrap: wrap; }
.muted { color: var(--muted); }
.cal-cell { display: flex; gap: 4px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.cal-adj { width: 56px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; text-align: right; font-size: 13px; }
.cal-reason-input { width: 84px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; }
.cal-save { background: #fff; color: var(--brand); border: 1px solid var(--brand); border-radius: 6px; padding: 4px 10px; cursor: pointer; font-size: 12px; font-family: inherit; }
.cal-save:hover { background: var(--brand); color: #fff; }
.cal-reason { color: var(--muted); font-size: 11px; }
.final-score { color: var(--brand); font-size: 15px; }
.ctx-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: #fff; border-bottom: 1px solid var(--line); padding: 10px 22px; font-size: 13px; }
.ctx-step { background: var(--brand-soft); color: var(--brand); border-radius: 12px; padding: 2px 9px; font-size: 12px; font-weight: 600; }
.ctx-role, .ctx-who { color: var(--brand); font-weight: 700; }
.ctx-sep { color: var(--line); }
.ctx-tip { color: var(--muted); }
.hl { background: #fff3cd; color: #8a5a00; padding: 0 4px; border-radius: 4px; font-weight: 600; }
.editable-row { background: #fffdf2; }
.editable-row:hover { background: #fff8d6; }
input.score { border-color: #f0c36d; background: #fffef8; }
.empty-hint { background: var(--brand-soft); border-radius: 8px; padding: 18px 20px; line-height: 1.9; color: var(--ink); }
.howto h3 { margin-top: 0; }
.howto-list { margin: 8px 0 0; padding-left: 20px; line-height: 1.9; }
.howto-list li { margin-bottom: 4px; }
