:root {
  --bg: #f2f5fa;
  --card: #ffffff;
  --line: #e5eaf3;
  --line-strong: #d3dbe8;
  --text: #101828;
  --text-2: #5b6b83;
  --text-3: #8b9ab0;
  --brand: #2563eb;
  --brand-soft: #eaf1ff;
  --brand-deep: #1d4ed8;
  --good: #0f9d58;
  --good-soft: #e6f6ee;
  --warn: #f59e0b;
  --warn-soft: #fef4e2;
  --bad: #e0403a;
  --bad-soft: #fdeceb;
  --purple: #7c5cf0;
  --teal: #0d9488;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px -12px rgba(16, 24, 40, .14);
  --shadow-lg: 0 24px 60px -20px rgba(16, 24, 40, .28);
  --sidebar-w: 216px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

/* ---------- boot ---------- */
.boot {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 16px; background: var(--bg); z-index: 60;
}
.spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2.5px solid #d7e0ee; border-top-color: var(--brand);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.boot-text { color: var(--text-2); font-size: 13px; }

/* ---------- auth ---------- */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 32px 20px;
  background:
    radial-gradient(1100px 520px at 12% -10%, #e3ecff 0%, rgba(227, 236, 255, 0) 60%),
    radial-gradient(900px 460px at 100% 110%, #e6f7f2 0%, rgba(230, 247, 242, 0) 55%),
    var(--bg);
}
.auth-card {
  width: 100%; max-width: 940px; background: var(--card); border-radius: 20px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--line);
  display: grid; grid-template-columns: 1fr 1fr; overflow: hidden;
}
.auth-side {
  padding: 44px 40px; color: #fff;
  background: linear-gradient(150deg, #1e3a8a 0%, #2563eb 46%, #0d9488 100%);
  position: relative; overflow: hidden;
}
.auth-side::after {
  content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%;
  right: -120px; bottom: -140px; background: rgba(255, 255, 255, .1);
}
.auth-side h1 { margin: 0 0 10px; font-size: 25px; letter-spacing: .5px; }
.auth-side p { margin: 0; color: rgba(255, 255, 255, .82); font-size: 13.5px; line-height: 1.8; }
.auth-side ul { margin: 26px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; position: relative; z-index: 1; }
.auth-side li { font-size: 13px; color: rgba(255, 255, 255, .92); display: flex; gap: 9px; align-items: flex-start; }
.auth-side li i {
  font-style: normal; width: 18px; height: 18px; border-radius: 6px; flex: none;
  background: rgba(255, 255, 255, .2); display: grid; place-items: center; font-size: 11px; margin-top: 1px;
}
.auth-side .mark {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: 1px;
  text-transform: uppercase; color: rgba(255, 255, 255, .7); margin-bottom: 26px;
}
.auth-main { padding: 38px 40px; }
.auth-tabs { display: flex; gap: 4px; background: #f1f4fa; border-radius: 11px; padding: 4px; margin-bottom: 24px; }
.auth-tabs button {
  flex: 1; border: 0; background: transparent; padding: 9px 6px; border-radius: 8px;
  color: var(--text-2); font-size: 13px; font-weight: 500; transition: .16s;
}
.auth-tabs button.on { background: #fff; color: var(--brand-deep); box-shadow: 0 1px 3px rgba(16, 24, 40, .1); }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; font-weight: 500; }
.input, .select, .textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 9px;
  background: #fff; outline: none; transition: .16s; font-size: 13.5px;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.textarea { resize: vertical; min-height: 74px; line-height: 1.6; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 9px; border: 1px solid var(--line-strong);
  background: #fff; color: var(--text); font-size: 13.5px; font-weight: 500; transition: .16s; white-space: nowrap;
}
.btn:hover { border-color: #b9c5d8; background: #fafcff; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-deep); border-color: var(--brand-deep); }
.btn-danger { color: var(--bad); border-color: #f3c4c1; background: #fff; }
.btn-danger:hover { background: var(--bad-soft); }
.btn-block { width: 100%; padding: 11px; }
.btn-sm { padding: 5px 10px; font-size: 12.5px; border-radius: 7px; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: #f1f4fa; color: var(--text); }
.link { background: none; border: 0; color: var(--brand); padding: 0; font-size: 13px; }
.link:hover { text-decoration: underline; }
.auth-msg { font-size: 12.5px; padding: 9px 12px; border-radius: 8px; margin-bottom: 14px; display: none; }
.auth-msg.show { display: block; }
.auth-msg.err { background: var(--bad-soft); color: #a02b26; }
.auth-msg.ok { background: var(--good-soft); color: #0a6b3c; }
.auth-foot { margin-top: 18px; display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--text-3); }
.auth-note {
  margin-top: 14px; padding: 10px 12px; border-radius: 10px;
  background: #f6f8fb; border: 1px solid #e6ebf2;
  font-size: 12px; line-height: 1.7; color: #7b8798;
}
.auth-note b { color: #4a5668; font-weight: 600; }

/* ---------- layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: none; background: #fff; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 30;
}
.brand { padding: 20px 18px 16px; display: flex; gap: 10px; align-items: center; }
.brand-logo {
  width: 34px; height: 34px; border-radius: 10px; flex: none; display: grid; place-items: center;
  background: linear-gradient(140deg, #2563eb, #0d9488); color: #fff; font-weight: 700; font-size: 15px;
}
.brand-name { font-weight: 650; font-size: 14.5px; line-height: 1.25; }
.brand-sub { font-size: 11px; color: var(--text-3); letter-spacing: .4px; }
.nav { padding: 8px 10px; display: grid; gap: 2px; flex: 1; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 9px;
  border: 0; background: transparent; color: var(--text-2); font-size: 13.5px; text-align: left; width: 100%; transition: .14s;
}
.nav-item svg { width: 17px; height: 17px; flex: none; opacity: .75; }
.nav-item:hover { background: #f4f7fc; color: var(--text); }
.nav-item.on { background: var(--brand-soft); color: var(--brand-deep); font-weight: 600; }
.nav-item.on svg { opacity: 1; }
.nav-label { padding: 14px 12px 6px; font-size: 11px; color: var(--text-3); letter-spacing: .8px; }
.side-foot { padding: 12px; border-top: 1px solid var(--line); }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: 10px; background: #f7f9fd; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: linear-gradient(140deg, #cfe0ff, #d5efe8); color: #1e3a8a; font-weight: 650; font-size: 12.5px;
}
.user-meta { min-width: 0; flex: 1; }
.user-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-role { font-size: 11px; color: var(--text-3); }

.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 60px; padding: 0 26px; display: flex; align-items: center; gap: 14px;
  background: rgba(255, 255, 255, .82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
}
.topbar h2 { margin: 0; font-size: 16px; font-weight: 650; }
.topbar .sub { font-size: 12px; color: var(--text-3); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.view { padding: 22px 26px 60px; display: grid; gap: 18px; align-content: start; }

/* ---------- cards / grids ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; min-width: 0;
}
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-title { font-size: 14px; font-weight: 650; margin: 0; }
.card-desc { font-size: 12px; color: var(--text-3); margin: 2px 0 0; }
.card-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.grid { display: grid; gap: 18px; }
.g-kpi { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.g-kpi2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 560px; }
/* 看板首行：总量 + 四档评级 + 预警 */
.g-kpi6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.g-kpi6 .kpi { padding: 14px 14px 12px; }
.g-kpi6 .kpi-value { font-size: 26px; }

/* 区块小标题 */
.section-title { font-size: 13px; font-weight: 600; color: var(--text-2); letter-spacing: .4px;
  margin: 4px 0 -8px; display: flex; align-items: center; gap: 8px; }
.section-title::before { content: ''; width: 3px; height: 13px; border-radius: 2px; background: var(--brand); }

/* 分数分布金字塔 */
.pyramid { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 10px 0 4px; }
.pyr-row { height: 42px; border-radius: 8px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px; color: #fff; font-size: 12.5px; font-weight: 600;
  box-shadow: 0 1px 3px rgba(16, 32, 64, .12); transition: filter .15s; }
.pyr-row:hover { filter: brightness(1.07); }
.pyr-row.zero { opacity: .32; }
.pyr-label { letter-spacing: .3px; white-space: nowrap; }
.pyr-n { font-weight: 500; font-size: 12px; white-space: nowrap; }
.pyr-n b { font-size: 15px; font-weight: 700; margin-right: 2px; }
.pyr-n i { font-style: normal; opacity: .82; margin-left: 6px; font-size: 11.5px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-32 { grid-template-columns: 1.55fr 1fr; }
.g-23 { grid-template-columns: 1fr 1.6fr; }

.kpi { padding: 16px 18px; }
.kpi-label { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.kpi-value { font-size: 27px; font-weight: 680; letter-spacing: -.6px; margin: 6px 0 2px; line-height: 1.1; }
.kpi-value small { font-size: 13px; font-weight: 500; color: var(--text-3); margin-left: 3px; }
.kpi-foot { font-size: 11.5px; color: var(--text-3); display: flex; align-items: center; gap: 5px; }
.delta { font-weight: 600; }
.delta.up { color: var(--good); }
.delta.down { color: var(--bad); }
.delta.flat { color: var(--text-3); }

.chart-box { position: relative; width: 100%; }
.chart-box canvas { width: 100% !important; }
.h-220 { height: 220px; }
.h-260 { height: 260px; }
.h-300 { height: 300px; }
.h-340 { height: 340px; }

/* ---------- table ---------- */
.table-wrap { overflow-x: auto; margin: 0 -18px -18px; padding: 0 18px 4px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th {
  text-align: left; font-weight: 600; font-size: 11.5px; color: var(--text-3);
  letter-spacing: .4px; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
  background: #fafbfe; position: sticky; top: 0;
}
table.tbl td { padding: 10px; border-bottom: 1px solid #f1f4fa; vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tbody tr:hover { background: #fafcff; }
.num { font-variant-numeric: tabular-nums; }
.t-right { text-align: right; }
.t-center { text-align: center; }

.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.badge.good { background: var(--good-soft); color: #0a6b3c; }
.badge.warn { background: var(--warn-soft); color: #96620a; }
.badge.bad { background: var(--bad-soft); color: #a02b26; }
.badge.info { background: var(--brand-soft); color: var(--brand-deep); }
.badge.mute { background: #f1f4fa; color: var(--text-2); }
.badge.purple { background: #f0ecff; color: #5b3fd6; }

.score-pill {
  display: inline-flex; align-items: baseline; gap: 2px; font-weight: 680; font-variant-numeric: tabular-nums;
  padding: 2px 9px; border-radius: 7px; font-size: 13px;
}
.score-pill.good { background: var(--good-soft); color: #0a6b3c; }
.score-pill.warn { background: var(--warn-soft); color: #96620a; }
.score-pill.bad { background: var(--bad-soft); color: #a02b26; }
.score-pill.na { background: #f1f4fa; color: var(--text-3); }

.heat { border-radius: 6px; padding: 3px 0; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 12.5px; }
.heat.has-note { position: relative; cursor: help; }
.heat.has-note .note-dot {
  position: absolute; top: 3px; right: 4px; width: 5px; height: 5px;
  border-radius: 50%; background: #e0403a; opacity: .8;
}

/* 维度矩阵悬浮提示 */
.dash-tip {
  position: fixed; left: 0; top: 0; z-index: 960; min-width: 170px; max-width: 300px;
  padding: 10px 12px; border-radius: 10px; background: #1c2733; color: #fff;
  box-shadow: 0 14px 30px rgba(15, 28, 45, .26);
  font-size: 12.5px; line-height: 1.55; pointer-events: none;
  opacity: 0; visibility: hidden; transform: translateY(4px);
  transition: opacity .12s ease, transform .12s ease;
}
.dash-tip.on { opacity: 1; visibility: visible; transform: translateY(0); }
.dash-tip .tip-t { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.dash-tip .tip-s { color: #9fb3c8; font-size: 11.5px; }
.dash-tip .tip-empty { color: #9fb3c8; margin-top: 6px; font-size: 11.5px; }
.dash-tip .tip-rows { margin-top: 6px; border-top: 1px solid rgba(255, 255, 255, .12); }
.dash-tip .tip-row { padding: 5px 0; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.dash-tip .tip-row:last-child { border-bottom: 0; padding-bottom: 0; }
.dash-tip .tip-row-h { display: flex; align-items: baseline; gap: 6px; }
.dash-tip .tip-who { font-weight: 600; }
.dash-tip .tip-sc { margin-left: auto; color: #ffd479; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.dash-tip .tip-msg { color: #d8e3ee; font-size: 12px; word-break: break-word; }

/* ---------- 评分明细：可展开行 ---------- */
.tbl-detail .d-row { cursor: pointer; transition: background .12s; }
.tbl-detail .d-row:hover { background: #f7fafd; }
.tbl-detail .d-row.open { background: #f2f7fd; }
.tbl-detail .d-row.open > td { border-bottom-color: transparent; }
.d-caret {
  display: inline-block; width: 12px; margin-right: 4px; color: #9fb0c6;
  font-style: normal; font-size: 11px; transition: transform .16s ease;
}
.d-row.open .d-caret { transform: rotate(90deg); color: #2563eb; }

.exp-row > td { padding: 0 !important; background: #f7fafe; }
.dx { padding: 12px 14px 14px; border-top: 1px dashed #dbe6f3; }
.dx-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.dx-head > b { font-size: 13.5px; color: #22303f; }
.dx-meta { color: #7d8ea3; font-size: 12px; }
.dx-meta em { color: #c0392b; font-style: normal; }

.dx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.dx-item {
  background: #fff; border: 1px solid #e7eef7; border-radius: 9px;
  padding: 8px 10px 9px; min-width: 0;
}
.dx-item.na { background: #fbfcfe; border-style: dashed; }
.dx-item-h { display: flex; align-items: baseline; gap: 6px; margin-bottom: 6px; }
.dx-name { font-size: 12.5px; font-weight: 600; color: #22303f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dx-dept {
  margin-left: auto; flex: none; font-size: 10.5px; color: #7d8ea3;
  background: #f1f5fb; border-radius: 5px; padding: 1px 5px;
}
.dx-mid { display: flex; align-items: center; gap: 8px; }
.dx-score {
  flex: none; min-width: 58px; border-radius: 6px; padding: 2px 6px;
  font-size: 12.5px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums;
}
.dx-score small { font-size: 10.5px; font-weight: 400; opacity: .75; }
.dx-bar { position: relative; flex: 1; height: 5px; border-radius: 3px; background: #eef2f8; overflow: hidden; }
.dx-bar > i { display: block; height: 100%; border-radius: 3px; }
.dx-pct { flex: none; width: 34px; text-align: right; font-size: 11.5px; color: #7d8ea3; font-variant-numeric: tabular-nums; }
.dx-notes { margin-top: 6px; display: grid; gap: 3px; }
.dx-note { font-size: 11.5px; color: #55677d; line-height: 1.55; word-break: break-word; }
.dx-note > b { color: #22303f; font-weight: 600; margin-right: 4px; }
.dx-note > i { font-style: normal; color: #b8860b; margin-right: 5px; }
.dx-note.mute { color: #a3b1c6; }

/* 展开明细里的「上月得分」对比 */
.dx-cmp-total { font-size: 12px; color: #64748b; }
.dx-prev {
  display: flex; align-items: center; gap: 6px; margin-top: 5px;
  font-size: 11px; color: #8b9aad; font-variant-numeric: tabular-nums;
}
.dx-prev-lab {
  flex: none; font-size: 10px; line-height: 15px; color: #93a2b5;
  background: #f2f6fb; border: 1px solid #e6eef7; border-radius: 4px; padding: 0 4px;
}
.dx-prev-val { white-space: nowrap; }
.dx-prev-val small { font-size: 10px; opacity: .8; }
.dx-prev-val.mute { color: #bcc7d4; }
.dx-prev .delta { margin-left: auto; font-size: 11px; }
.dx-mark {
  position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px;
  background: #5b6b83; border-radius: 1px; opacity: .55;
}
.dx-more { margin-top: 5px; }
.dx-more > summary {
  cursor: pointer; font-size: 11px; color: #7d8ea3; list-style: none; outline: none;
  user-select: none; width: fit-content;
}
.dx-more > summary::-webkit-details-marker { display: none; }
.dx-more > summary::before { content: '▸'; margin-right: 4px; font-size: 9px; }
.dx-more[open] > summary::before { content: '▾'; }
.dx-more > summary:hover { color: #2563eb; }
.dx-more .dx-notes {
  margin-top: 5px; padding: 5px 8px; background: #f6f9fd;
  border: 1px dashed #e2ebf6; border-radius: 6px;
}
.dx-notes.prev .dx-note { color: #74849a; }
.dx-notes.prev .dx-note > b { color: #4a5a70; }

.sub-sec { margin-top: 4px; border-top: 1px solid #edf2f9; padding-top: 12px; }
.sub-sec-head { display: flex; align-items: baseline; gap: 8px; margin: 0 2px 8px; }
.sub-sec-head > b { font-size: 13px; color: #22303f; }
.sub-sec-head > span { font-size: 12px; color: #7d8ea3; }

/* ---------- scoring ---------- */
.score-layout { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: 18px; align-items: start; }
.sup-list { display: grid; gap: 6px; max-height: 620px; overflow-y: auto; padding-right: 2px; }
.sup-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 11px; border-radius: 10px;
  border: 1px solid transparent; background: #f8fafd; cursor: pointer; transition: .14s; text-align: left; width: 100%;
}
.sup-item:hover { border-color: #d8e2f3; background: #fff; }
.sup-item.on { background: var(--brand-soft); border-color: #bcd2f8; }
.sup-item .nm { font-size: 13px; font-weight: 600; line-height: 1.3; }
.sup-item .ct { font-size: 11.5px; color: var(--text-3); }
.ring { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; color: var(--text-2); }

.dim-row {
  display: grid; grid-template-columns: minmax(150px, 1.2fr) auto 106px;
  gap: 14px; align-items: center; padding: 13px 0; border-bottom: 1px dashed #eaeff8;
}
.dim-row:last-child { border-bottom: 0; }
.dim-name { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.dim-cat { font-size: 11px; color: var(--text-3); font-weight: 500; }
.dim-desc { font-size: 11.5px; color: var(--text-3); margin-top: 2px; white-space: pre-line; line-height: 1.55; }
.dim-ctl { display: flex; align-items: center; gap: 12px; }
.seg { display: flex; gap: 4px; }
.seg button {
  min-width: 34px; height: 30px; padding: 0 8px; border-radius: 7px; border: 1px solid var(--line-strong);
  background: #fff; font-size: 12.5px; font-weight: 600; color: var(--text-2); transition: .12s;
  font-variant-numeric: tabular-nums;
}
.seg button:hover { border-color: var(--brand); color: var(--brand); }
.seg button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.seg button.veto.on { background: var(--bad); border-color: var(--bad); }
input[type=range] { -webkit-appearance: none; appearance: none; height: 4px; border-radius: 3px; background: #e2e9f4; outline: none; flex: 1; min-width: 70px; }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 15px; height: 15px; border-radius: 50%;
  background: #fff; border: 2.5px solid var(--brand); cursor: pointer;
}
.dim-score {
  display: flex; align-items: baseline; justify-content: flex-end; gap: 3px;
  font-size: 19px; font-weight: 680; font-variant-numeric: tabular-nums;
}
.dim-score.empty { color: var(--text-3); }
.dim-score input {
  width: 58px; text-align: right; border: 0; border-bottom: 1.5px solid #dfe7f3;
  background: transparent; outline: none; padding: 2px 0;
  font: inherit; color: inherit; font-variant-numeric: tabular-nums;
}
.dim-score input:focus { border-bottom-color: var(--brand); background: #f7faff; }
.dim-score.empty input { border-bottom-style: dashed; }
.dim-score input::placeholder { color: var(--text-3); font-weight: 500; font-size: 13px; }
.dim-score input::-webkit-outer-spin-button,
.dim-score input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.dim-score input[type=number] { -moz-appearance: textfield; }
.dim-max { font-size: 11px; color: var(--text-3); font-weight: 500; white-space: nowrap; flex: none; }
.dim-note { grid-column: 1 / -1; margin-top: -4px; }
.dim-note input {
  width: 100%; border: 0; border-bottom: 1px dashed #e2e8f2; padding: 4px 0; font-size: 12.5px;
  background: transparent; outline: none; color: var(--text-2);
}
.dim-note input:focus { border-bottom-color: var(--brand); color: var(--text); }

.score-summary { display: flex; gap: 22px; align-items: center; padding: 14px 16px; background: #f7f9fd; border-radius: 12px; margin-top: 4px; flex-wrap: wrap; }
.sum-item { display: grid; gap: 1px; }
.sum-label { font-size: 11.5px; color: var(--text-3); }
.sum-value { font-size: 19px; font-weight: 680; font-variant-numeric: tabular-nums; line-height: 1.2; }

.progress-bar { height: 6px; border-radius: 4px; background: #e8eef8; overflow: hidden; }
.progress-bar > i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #2563eb, #0d9488); transition: width .3s; }

/* ---------- misc ---------- */
.empty { padding: 34px 16px; text-align: center; color: var(--text-3); font-size: 13px; }
.empty b { display: block; color: var(--text-2); font-size: 13.5px; margin-bottom: 4px; font-weight: 600; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- 上月对照 / 扣分必填 ---------- */
.dim-prev { font-size: 11.5px; color: #8b9ab0; margin-top: 3px; }
.dim-note.req input { border-bottom-color: #f0a9a4; color: #a02b26; background: #fffafa; }
.dim-note.req input::placeholder { color: #d97b74; opacity: 1; }
.dim-row.miss { background: #fffaf9; }
.dim-row.miss .dim-note input { border-bottom: 1px solid #e0403a; }
.sum-sub { font-size: 11px; color: var(--text-3); margin-top: 1px; white-space: nowrap; }

/* ---------- 提醒 / 类别 / 外发 ---------- */
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }
.miss-list { display: grid; gap: 6px; }
.miss-row {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2);
  padding: 6px 10px; background: #fafbfe; border-radius: 8px; border: 1px solid #f1f4fa;
}
.miss-row .nm { font-weight: 600; color: var(--text); }
.join-list { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.email-input {
  width: 100%; border: 1px solid transparent; background: #f7f9fd; border-radius: 7px;
  padding: 5px 8px; font-size: 12.5px; outline: none; color: var(--text);
}
.email-input:focus { border-color: var(--brand); background: #fff; }
.email-input.filled { border-color: #d7e3f5; background: #fff; }
.email-input:placeholder-shown { color: var(--text-3); }
.mail-preview iframe { width: 100%; height: 540px; border: 0; display: block; background: #f4f7fb; }
.mail-meta { display: grid; gap: 6px; margin-bottom: 12px; font-size: 12.5px; color: var(--text-2); }
.mail-meta b { color: var(--text); font-weight: 600; }
.cat-pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; cursor: pointer; border: 1px solid var(--line); background: #fff; color: var(--text-2);
}
.cat-pill.on { background: var(--brand-soft); border-color: #c7dbff; color: var(--brand-deep); }

/* 品类切换条：一次只看一个品类 */
.cat-switch { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 4px 0 -8px; }
.cat-switch .section-title { margin: 0; }
.cat-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.cat-pills .cat-pill:hover { border-color: #c7dbff; color: var(--brand-deep); }
.cat-pills .cat-pill.on { box-shadow: 0 1px 4px rgba(37, 99, 235, .18); }
.mini-bar { height: 5px; border-radius: 3px; background: #eef2f8; overflow: hidden; min-width: 60px; }
.mini-bar > i { display: block; height: 100%; border-radius: 3px; }
.select-sm { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line-strong); background: #fff; font-size: 12.5px; outline: none; }
.select-sm:focus { border-color: var(--brand); }
.hint { font-size: 12px; color: var(--text-3); }
.field label .opt { font-weight: 400; color: var(--text-3); font-size: 12px; }
.code-chip { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; letter-spacing: 1px;
  background: #f0f3f9; border: 1px dashed #c8d1e0; border-radius: 6px; padding: 2px 8px; color: #2b3b55; }
.invite-form { display: grid; grid-template-columns: 1.4fr 1fr .9fr .8fr .9fr auto; gap: 10px; align-items: end; }
.invite-form .field { margin-bottom: 0; }
@media (max-width: 1180px) { .invite-form { grid-template-columns: 1fr 1fr; } }
.tag-list { display: flex; gap: 6px; flex-wrap: wrap; }
.divider { height: 1px; background: var(--line); margin: 4px 0; }

/* ---------- modal ---------- */
.modal-root {
  position: fixed; inset: 0; z-index: 50; background: rgba(16, 24, 40, .42);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  backdrop-filter: blur(2px);
}
.modal {
  background: #fff; border-radius: 16px; width: 100%; max-width: 520px; max-height: 88vh;
  display: flex; flex-direction: column; box-shadow: var(--shadow-lg); overflow: hidden;
  animation: pop .18s ease-out;
}
.modal.wide { max-width: 720px; }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.modal-head h3 { margin: 0; font-size: 15px; font-weight: 650; }
.modal-head .x { margin-left: auto; border: 0; background: none; font-size: 20px; color: var(--text-3); line-height: 1; padding: 0 4px; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { padding: 13px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; background: #fbfcfe; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- toast ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 8px; z-index: 80; }
.toast {
  background: #101828; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 13px;
  box-shadow: var(--shadow-lg); animation: slidein .2s ease-out; max-width: 360px;
}
.toast.err { background: #b3261e; }
.toast.ok { background: #0a6b3c; }
@keyframes slidein { from { transform: translateY(8px); opacity: 0; } }

.mobile-bar { display: none; }

@media (max-width: 1180px) {
  .g-kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g-kpi6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g-32, .g-23, .g-3 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .auth-card { grid-template-columns: 1fr; max-width: 440px; }
  .auth-side { display: none; }
  .auth-main { padding: 28px 24px; }
  .sidebar {
    position: fixed; inset: auto 0 0 0; width: 100%; height: 58px; flex-direction: row;
    border-right: 0; border-top: 1px solid var(--line); z-index: 40;
  }
  .brand, .nav-label, .side-foot { display: none; }
  .nav { display: flex; padding: 6px 8px; gap: 2px; overflow-x: auto; }
  .nav-item { flex-direction: column; gap: 2px; font-size: 10.5px; padding: 5px 8px; min-width: 58px; text-align: center; }
  .nav-item svg { width: 18px; height: 18px; }
  .main { margin-left: 0; padding-bottom: 62px; }
  .view { padding: 16px 14px 40px; }
  .topbar { padding: 0 14px; height: 54px; }
  .g-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-kpi6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-2 { grid-template-columns: 1fr; }
  .score-layout { grid-template-columns: 1fr; }
  .sup-list { max-height: 210px; }
  .dim-row { grid-template-columns: 1fr; gap: 8px; }
  .dim-ctl { justify-content: space-between; }
  .dim-score { text-align: left; }
  .h-260, .h-300, .h-340 { height: 240px; }
}

/* 评分快捷档位（按满分分组编辑） */
.q-item { padding: 11px 0; border-bottom: 1px dashed #eaeff8; }
.q-item:last-of-type { border-bottom: 0; }
.q-lab {
  font-size: 13px; font-weight: 620; color: var(--text-1);
  margin-bottom: 8px; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
}
.q-lab .hint { font-weight: 400; }
.q-line { display: flex; gap: 12px; align-items: center; }
.q-line .input { flex: 1 1 auto; min-width: 0; }
.q-line .tag-list { flex: 0 0 auto; min-width: 130px; justify-content: flex-end; }

/* 评分页部门分组标题 */
.dim-dept { margin-top: 6px; }
.dim-dept-head {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  margin: 16px 0 2px; padding-bottom: 7px; border-bottom: 1.5px solid #e6eefa;
  font-size: 13px; font-weight: 680; color: var(--brand-deep);
}
.dim-dept:first-child .dim-dept-head { margin-top: 4px; }
.dim-dept-head .hint { font-weight: 400; }
