/* ============ 同事互评系统 - 共用样式 ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #4F63F6;
  --primary-dark: #3B4BD4;
  --primary-light: #EEF1FE;
  --violet: #7B4DDB;
  --bg: #F4F6FC;
  --card: #FFFFFF;
  --text: #1A2033;
  --text-2: #6B7280;
  --text-3: #9CA3AF;
  --border: #E5E9F2;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(23,32,84,.06), 0 8px 24px rgba(23,32,84,.06);
  --shadow-lg: 0 12px 40px rgba(23,32,84,.16);
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); font-size: 14.5px; min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: 14px; color: var(--text); }
a { color: var(--primary); text-decoration: none; }

/* ---------- 按钮 ---------- */
.btn {
  padding: 9px 18px; border-radius: 10px; border: none; cursor: pointer; font-size: 14px; font-weight: 500;
  transition: all .15s; display: inline-flex; align-items: center; gap: 6px; justify-content: center;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(79,99,246,.35); }
.btn.primary:hover { background: var(--primary-dark); }
.btn.ghost { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn.ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger:hover { background: #DC2626; }
.btn.text-danger { background: transparent; color: var(--danger); padding: 6px 10px; }
.btn.text-danger:hover { background: #FEF2F2; }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- 表单 ---------- */
.input, textarea, select.sel {
  border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; font-size: 14px; background: #fff;
  outline: none; transition: border .15s, box-shadow .15s; width: 100%;
}
.input:focus, textarea:focus, select.sel:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,99,246,.14); }
label.flabel { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- 卡片 / 通用 ---------- */
.card { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.card-sub { font-size: 13px; color: var(--text-2); margin-bottom: 16px; }
.empty { text-align: center; padding: 44px 20px; color: var(--text-2); }
.empty .emoji { font-size: 40px; margin-bottom: 12px; }
.empty h3 { color: var(--text); font-size: 16px; margin-bottom: 6px; }
.empty p { font-size: 13.5px; margin-bottom: 16px; }

/* ---------- 头像 ---------- */
.avatar {
  width: 38px; height: 38px; border-radius: 11px; color: #fff; display: inline-flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: 16px; flex: none;
}
.avatar.sm { width: 28px; height: 28px; font-size: 13px; border-radius: 8px; }
.avatar.lg { width: 52px; height: 52px; font-size: 22px; border-radius: 15px; }

/* ---------- 徽章 / 标签 ---------- */
.tag { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.tag.blue { background: var(--primary-light); color: var(--primary-dark); }
.tag.green { background: #E7F8F1; color: #0B7A57; }
.tag.gray { background: #EFF2F8; color: var(--text-2); }
.tag.orange { background: #FEF4E2; color: #96660A; }
.tag.red { background: #FDEEEE; color: #B42318; }
.tag.violet { background: #F5EEFD; color: #6D28D9; }

/* ---------- 表格 ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th, .tbl td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl th { color: var(--text-2); font-weight: 600; background: #FAFBFE; }
.tbl tr:hover td { background: #F7F9FE; }
.tbl td.actions { text-align: right; }
.tbl td.actions .btn { margin-left: 4px; }

/* ---------- 进度 ---------- */
.progress-track { height: 9px; background: #E9EDF7; border-radius: 6px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--primary), var(--violet)); transition: width .5s; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(16,22,44,.45); backdrop-filter: blur(4px);
  display: none; align-items: flex-start; justify-content: center; z-index: 100; padding: 30px 16px; overflow-y: auto;
}
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 18px; width: 560px; max-width: 100%; box-shadow: var(--shadow-lg); margin: auto; animation: popIn .22s cubic-bezier(.34,1.4,.64,1); }
.modal.wide { width: 860px; }
@keyframes popIn { from { opacity: 0; transform: scale(.95) translateY(10px); } to { opacity: 1; transform: none; } }
.modal-head { padding: 18px 22px 0; font-size: 16px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.modal-x { border: none; background: transparent; font-size: 18px; color: var(--text-3); cursor: pointer; width: 30px; height: 30px; border-radius: 8px; }
.modal-x:hover { background: var(--bg); color: var(--text); }
.modal-body { padding: 14px 22px 8px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 22px 20px; }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; bottom: 26px; right: 26px; z-index: 300; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: #1A2033; color: #fff; padding: 12px 20px; border-radius: 12px; font-size: 13.5px;
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 8px; max-width: 340px;
  animation: toastIn .3s cubic-bezier(.34,1.3,.64,1);
}
.toast.out { animation: toastOut .25s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }

/* ---------- 打分滑块 ---------- */
.dim-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--border); }
.dim-row:last-child { border-bottom: none; }
.dim-info { flex: 1; min-width: 0; }
.dim-info .dn { font-weight: 600; font-size: 14px; }
.dim-info .dd { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.dim-ctrl { display: flex; align-items: center; gap: 10px; }
.dim-ctrl input[type=range] { width: 150px; accent-color: var(--primary); cursor: pointer; }
.dim-num { width: 60px; text-align: center; border: 1px solid var(--border); border-radius: 8px; padding: 6px 4px; font-size: 14.5px; font-weight: 700; outline: none; }
.dim-num:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,99,246,.14); }
.dim-max { font-size: 12px; color: var(--text-3); width: 28px; }

/* ---------- 维度条形 ---------- */
.dim-bars { display: flex; flex-direction: column; gap: 6px; }
.dim-bar { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.dim-bar .dbn { width: 62px; color: var(--text-2); flex: none; text-align: right; }
.dim-bar .dbt { flex: 1; height: 7px; background: #EDF0F8; border-radius: 4px; overflow: hidden; }
.dim-bar .dbf { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--primary), var(--violet)); transition: width .5s; }
.dim-bar .dbv { width: 64px; font-weight: 700; color: var(--text); flex: none; }

/* ---------- 热力色 ---------- */
.score-pill { display: inline-block; min-width: 38px; padding: 2px 8px; border-radius: 20px; color: #fff; font-weight: 700; font-size: 12px; }

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
  .card { padding: 15px; }
  .toast-wrap { left: 16px; right: 16px; bottom: 16px; }
  .toast { max-width: none; }
  .tbl-scroll { overflow-x: auto; }
}
