/* ============================================================
   新员工评测体系 —— 共享样式
   ============================================================ */
:root {
    --brand: #2f6fed;
    --brand-dark: #1e4fc4;
    --brand-soft: #eaf1ff;
    --ok: #17a673;
    --warn: #f0a020;
    --danger: #e5484d;
    --ink: #1c2333;
    --muted: #6b7688;
    --line: #e3e8f0;
    --bg: #f4f6fb;
    --card: #ffffff;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06);
}

* { box-sizing: border-box; }

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 18px 14px 56px;
    color: var(--ink);
    background: var(--bg);
    -webkit-text-size-adjust: 100%;
}

.wrap { max-width: 960px; margin: 0 auto; }
.wrap.narrow { max-width: 680px; }

/* ---------- 页头 ---------- */
.page-head {
    background: linear-gradient(135deg, var(--brand) 0%, #5b8cf7 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 22px 22px 20px;
    box-shadow: var(--shadow);
    margin-bottom: 18px;
}
.page-head h1 { margin: 0 0 6px; font-size: 21px; letter-spacing: .5px; }
.page-head p { margin: 0; opacity: .92; font-size: 13.5px; line-height: 1.6; }
.page-head .doc-tag {
    display: inline-block;
    margin-top: 10px;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .22);
}

/* ---------- 卡片 ---------- */
.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
    margin-bottom: 16px;
}
.card > h2, .card > h3 {
    margin: 0 0 14px;
    font-size: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 8px;
}
.card > h2::before, .card > h3::before {
    content: "";
    width: 4px; height: 16px;
    border-radius: 2px;
    background: var(--brand);
}
.card .hint { color: var(--muted); font-size: 13px; line-height: 1.7; margin: 0 0 12px; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
.field > label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: #46506b;
    margin-bottom: 6px;
}
.field > label .req { color: var(--danger); margin-left: 3px; }
input[type="text"], input[type="date"], input[type="number"], select, textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    color: var(--ink);
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(47, 111, 237, .13);
}
textarea { resize: vertical; min-height: 96px; line-height: 1.65; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- 按钮 ---------- */
button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 18px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    background: var(--brand);
    color: #fff;
    transition: background .15s, transform .05s, opacity .15s;
}
button:hover, .btn:hover { background: var(--brand-dark); }
button:active, .btn:active { transform: translateY(1px); }
button:disabled { opacity: .55; cursor: not-allowed; }
button.block { width: 100%; padding: 14px; font-size: 16px; }
button.ghost { background: #eef2fa; color: #3c4661; }
button.ghost:hover { background: #e2e9f7; }
button.danger { background: var(--danger); }
button.danger:hover { background: #c93a3f; }
button.ok { background: var(--ok); }
button.ok:hover { background: #12905f; }
button.sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- 评分项 ---------- */
.score-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px dashed var(--line);
}
.score-item:last-of-type { border-bottom: none; }
.score-item .idx {
    flex: 0 0 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 12.5px;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.score-item .txt { flex: 1; font-size: 14px; line-height: 1.55; }
.score-item .txt .grade {
    display: inline-block;
    margin-left: 6px;
    font-size: 11.5px;
    padding: 1px 7px;
    border-radius: 999px;
    background: #f1f4fa;
    color: var(--muted);
    vertical-align: 1px;
}
.score-item input[type="number"] { flex: 0 0 84px; width: 84px; text-align: center; font-weight: 700; }
@media (max-width: 480px) {
    .score-item { flex-wrap: wrap; }
    .score-item .txt { flex: 1 1 100%; order: 2; }
    .score-item input[type="number"] { order: 3; }
}

.grade-legend {
    display: flex; flex-wrap: wrap; gap: 8px;
    font-size: 12.5px; color: var(--muted); margin: 0 0 6px;
}
.grade-legend span { background: #f1f4fa; padding: 3px 9px; border-radius: 999px; }

/* ---------- 组长的「本人评分」区（可折叠）---------- */
details.leader-score {
    border: 1px solid var(--line); border-radius: 12px;
    padding: 10px 12px; background: #fbfcff;
}
details.leader-score > summary {
    cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink);
    list-style: none; display: flex; align-items: center; gap: 8px;
}
details.leader-score > summary::-webkit-details-marker { display: none; }
details.leader-score > summary::before {
    content: '▸'; color: var(--brand); font-size: 13px; transition: transform .15s;
}
details.leader-score[open] > summary::before { transform: rotate(90deg); }
details.leader-score > summary small { font-weight: 400; color: var(--muted); font-size: 12px; }
details.leader-score .score-item { border-bottom: 1px dashed var(--line); }
details.leader-score .score-item:last-of-type { border-bottom: none; }
.leader-score-total {
    margin-top: 10px; font-size: 13.5px; color: #46506b;
    background: #f1f6ff; border-radius: 10px; padding: 9px 12px;
}
.leader-score-total b { color: var(--brand-dark); font-size: 15px; }

/* ---------- 表格 ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 9px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: #f7f9fd; font-size: 12.5px; color: #55607a; font-weight: 700; }
tbody tr:hover { background: #fafcff; }
td.num, th.num { text-align: center; }
.score-pill {
    display: inline-block;
    min-width: 46px;
    padding: 3px 8px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13.5px;
    background: var(--brand-soft);
    color: var(--brand-dark);
}
.score-pill.g-excellent { background: #e4f7ef; color: #0d7a53; }
.score-pill.g-good { background: #e8f1ff; color: #1a4fb8; }
.score-pill.g-mid { background: #fdf3e2; color: #a76a05; }
.score-pill.g-poor { background: #fdeaea; color: #b3282d; }

/* ---------- 报告 / 条目列表（看板问题 3）---------- */
.report {
    background: #fbfcfe;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 15px 17px;
    font-size: 14.5px;
    line-height: 1.9;
}
.report .rp-title {
    display: block;
    margin: 16px 0 8px;
    font-weight: 700;
    font-size: 15px;
    color: var(--brand-dark);
    padding-left: 9px;
    border-left: 3px solid var(--brand);
}
.report .rp-title:first-child { margin-top: 0; }
.report ol { margin: 0; padding-left: 22px; }
.report li { margin-bottom: 5px; line-height: 1.8; }
.report .rp-note {
    display: block;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 12.5px;
}
.report .rp-para { margin: 0 0 6px; }
.report .rp-bullet {
    display: block;
    padding-left: 16px;
    position: relative;
    margin-bottom: 5px;
}
.report .rp-bullet::before {
    content: "•";
    position: absolute; left: 4px;
    color: var(--brand);
}
.report .rp-empty { color: var(--muted); }
.report.loading { color: var(--muted); }

.comment-box {
    background: #fffdf5;
    border: 1px solid #f4e6bf;
    border-radius: 12px;
    padding: 13px 15px;
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-wrap;
}

/* ---------- 雷达图（看板问题 2）---------- */
.chart-box {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 6px;
}
.chart { width: 100%; height: 420px; }
.chart.tall { height: 470px; }
@media (max-width: 520px) { .chart { height: 360px; } .chart.tall { height: 400px; } }

/* ---------- 二维码 ---------- */
.qr-tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.qr-tabs button {
    background: #eef2fa; color: #46506b;
    font-size: 13.5px; padding: 8px 14px;
}
.qr-tabs button.active { background: var(--brand); color: #fff; }
.qr-panel { text-align: center; }
.qr-panel img {
    width: 100%; max-width: 240px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px;
    background: #fff;
}
.qr-panel .qr-url {
    margin-top: 12px;
    font-size: 12.5px;
    color: var(--muted);
    word-break: break-all;
    line-height: 1.7;
}
.qr-panel .qr-url code {
    background: #f1f4fa;
    padding: 3px 7px;
    border-radius: 6px;
    font-size: 12.5px;
}

/* 二维码地址可达范围提示：公网可扫 / 仅局域网 */
.qr-net-note {
    margin-top: 12px;
    font-size: 12.5px;
    line-height: 1.75;
    padding: 10px 12px;
    border-radius: 10px;
    word-break: break-all;
}
.qr-net-note.ok { background: #e9f7ef; color: #1d6b3f; border: 1px solid #bfe6cd; }
.qr-net-note.warn { background: #fff5e6; color: #8a5300; border: 1px solid #ffdfb0; }
.qr-net-note code {
    background: rgba(255, 255, 255, .7);
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 12px;
}
.qr-net-note a { color: inherit; font-weight: 600; text-decoration: underline; }

/* 二维码弹窗里的「完整链接 + 排障提示」 */
.qr-fullurl {
    margin-top: 12px; padding: 10px 12px;
    background: #f6f8fd; border: 1px dashed #cfd8ea; border-radius: 10px;
    font-size: 12.5px; color: #46506b; line-height: 1.8; word-break: break-all;
}
.qr-fullurl code { background: #fff; padding: 2px 6px; border-radius: 5px; font-size: 12px; }
.qr-tip {
    margin-top: 8px; font-size: 12.5px; line-height: 1.75;
    color: #8a5300; background: #fff5e6; border: 1px solid #ffdfb0;
    padding: 9px 11px; border-radius: 9px;
}

/* 扫码页右上角的「地址是不是联网可用」提示胶囊 */
.net-pill {
    position: fixed; top: 10px; right: 10px; z-index: 60;
    font-size: 12px; font-weight: 600;
    padding: 5px 10px; border-radius: 999px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .12);
    max-width: 70vw;
}
.net-pill.ok { background: #e9f7ef; color: #1d6b3f; border: 1px solid #bfe6cd; }
.net-pill.warn { background: #fff5e6; color: #8a5300; border: 1px solid #ffdfb0; }
@media (max-width: 520px) { .net-pill { max-width: 62vw; font-size: 11.5px; } }

/* ---------- 徽标 / 状态 ---------- */
.badge {
    display: inline-block;
    font-size: 12px;
    padding: 3px 9px;
    border-radius: 999px;
    background: #eef2fa;
    color: #55607a;
    font-weight: 600;
}
.badge.judge { background: #e8f1ff; color: #1a4fb8; }
.badge.leader { background: #f3e8ff; color: #6b2fb8; }
.badge.test { background: #fdeaea; color: #b3282d; }

/* ---------- 提示条 ---------- */
.alert {
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 13.5px;
    line-height: 1.7;
    margin-bottom: 14px;
}
.alert.info { background: var(--brand-soft); color: #1b3f96; }
.alert.warn { background: #fff6e5; color: #8a5a00; }
.alert.err { background: #fdeaea; color: #a8232a; }
.alert.ok { background: #e7f8f1; color: #0d7a53; }

.toast {
    position: fixed;
    left: 50%; bottom: 26px;
    transform: translateX(-50%) translateY(80px);
    background: #1c2333; color: #fff;
    padding: 12px 20px; border-radius: 999px;
    font-size: 14px; z-index: 999;
    opacity: 0; transition: opacity .22s, transform .22s;
    max-width: 88vw; text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .22);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: #c0392f; }

.hidden { display: none !important; }
.empty { text-align: center; color: var(--muted); padding: 26px 10px; font-size: 14px; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

/* 顶部工具条 */
.toolbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
.toolbar .title { font-size: 15px; font-weight: 700; }
