/* ==========================================================================
   党支部季度考核系统 —— 样式
   ========================================================================== */
:root {
    --red-900: #5E1414;
    --red: #8B1E1E;
    --red-600: #A32626;
    --gold: #C8A063;
    --ink: #1F2329;
    --ink-2: #3F4650;
    --muted: #6B7280;
    --line: #E6E8EB;
    --line-2: #F1F2F4;
    --bg: #F4F5F7;
    --card: #FFFFFF;
    --green: #18794E;
    --green-bg: #E7F4EC;
    --amber: #B45309;
    --amber-bg: #FDF1E1;
    --blue: #1D4ED8;
    --blue-bg: #E8EEFF;
    --red-bg: #FBEAEA;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px -14px rgba(16, 24, 40, .25);
    --sidebar-w: 236px;
    --topbar-h: 60px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Source Han Sans SC",
        -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--bg);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-600); }

h1, h2, h3, h4, h5 { margin: 0; font-weight: 600; letter-spacing: .2px; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.strong { font-weight: 600; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.num { text-align: center; font-variant-numeric: tabular-nums; }
.table th.num { text-align: center; }

/* ---------------------------------------------------------------- 布局 */
.app { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    position: fixed;
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #7C1B1B 0%, #5E1414 100%);
    color: #fff;
    z-index: 40;
    padding-bottom: 14px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 18px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .10);
    position: relative;
}

.brand-mark {
    width: 38px; height: 38px;
    flex: 0 0 38px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #E3C07A, #C8A063 55%, #9C7638);
    color: #5E1414;
    display: grid; place-items: center;
    font-weight: 700; font-size: 18px;
    font-family: "STKaiti", "KaiTi", serif;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .10);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.brand-text strong { font-size: 14.5px; letter-spacing: .5px; white-space: nowrap; }
.brand-text span { font-size: 11.5px; color: rgba(255, 255, 255, .62); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar-close {
    display: none;
    position: absolute; right: 10px; top: 12px;
    background: none; border: 0; color: #fff; font-size: 24px; line-height: 1;
    cursor: pointer;
}

.nav { padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav-group {
    font-size: 11px; letter-spacing: 1.5px;
    color: rgba(255, 255, 255, .45);
    padding: 16px 10px 6px;
}

.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: rgba(255, 255, 255, .82);
    font-size: 13.5px;
    transition: background .15s, color .15s;
}
.nav-item:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav-item.is-active {
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--gold);
}
.nav-item .ico { width: 17px; height: 17px; opacity: .9; flex: 0 0 17px; }
.side-foot { padding: 8px 10px 0; border-top: 1px solid rgba(255, 255, 255, .10); }

.sidebar-mask { display: none; }

.main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); }

.topbar {
    height: var(--topbar-h);
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; gap: 14px;
    padding: 0 26px;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--line);
}

.page-title { font-size: 16px; font-weight: 600; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }

.who { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.3; }
.who-name { font-size: 13.5px; font-weight: 600; }
.who-role { font-size: 11.5px; color: var(--muted); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.menu-btn {
    display: none;
    width: 36px; height: 36px;
    border: 1px solid var(--line); border-radius: 8px;
    background: #fff; color: var(--ink);
    cursor: pointer;
}
.menu-btn svg { width: 18px; height: 18px; }

.content { padding: 22px 26px 40px; max-width: 1440px; }

.foot { margin-top: 34px; color: #9AA1AB; font-size: 12px; text-align: center; }

/* ---------------------------------------------------------------- 页头 */
.page-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 16px; margin-bottom: 18px;
}
.page-h2 { font-size: 21px; letter-spacing: .3px; }
.page-desc { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.page-desc > span + span { margin-left: 14px; }

.picker { display: flex; gap: 8px; }
.picker select {
    appearance: none;
    border: 1px solid var(--line);
    background: #fff url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
    border-radius: 8px;
    padding: 8px 30px 8px 12px;
    font-size: 13.5px; color: var(--ink);
    cursor: pointer;
}
.head-actions { display: flex; align-items: center; gap: 10px; }

/* ---------------------------------------------------------------- 卡片 */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 20px;
    margin-bottom: 18px;
}
.card-flush { padding: 0; overflow: hidden; }

.card-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px; margin-bottom: 14px;
}
.card-flush .card-head { padding: 16px 20px 12px; margin-bottom: 0; }
.card-head h3 { font-size: 15px; }
.card-head p { margin: 2px 0 0; }
.card-actions { display: flex; gap: 8px; align-items: center; }

/* ---------------------------------------------------------------- 统计 */
.stat-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.stat-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.stat {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px;
    display: flex; flex-direction: column; gap: 2px;
    position: relative; overflow: hidden;
}
.stat::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: linear-gradient(180deg, var(--red), var(--gold));
    opacity: .8;
}
.stat-label { font-size: 12.5px; color: var(--muted); }
.stat-value { font-size: 28px; font-weight: 700; letter-spacing: .5px; font-variant-numeric: tabular-nums; }
.stat-foot { font-size: 12px; color: #98A0AA; }

/* ---------------------------------------------------------------- 进度条 */
.progress {
    height: 6px; background: var(--line-2); border-radius: 99px;
    margin: 0 20px 14px; overflow: hidden;
}
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--red), var(--gold)); border-radius: 99px; transition: width .4s; }

/* ---------------------------------------------------------------- 表格 */
.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
    text-align: left;
    font-weight: 600; font-size: 12.5px; color: #6b5a5a;
    background: #F8F5F3;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.table td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--line-2);
    vertical-align: middle;
}
.table tbody tr:hover td { background: #FCFAF9; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .w-40 { width: 40px; } .table .w-50 { width: 50px; }
.table .w-60 { width: 60px; } .table .w-70 { width: 70px; }
.table .w-80 { width: 80px; } .table .w-90 { width: 90px; }
.table .w-100 { width: 100px; } .table .w-110 { width: 110px; }
.table .w-120 { width: 120px; } .table .w-130 { width: 130px; }
.table .w-140 { width: 140px; } .table .w-160 { width: 160px; }
.table .w-180 { width: 180px; } .table .w-200 { width: 200px; } .table .w-240 { width: 240px; }
.table .w-260 { width: 260px; } .table .w-380 { width: 380px; }

.cell-main { font-weight: 500; }
.cell-sub { font-size: 12px; color: var(--muted); }

.row-actions { display: flex; gap: 10px; align-items: center; white-space: nowrap; }
.row-off td { opacity: .55; }

.table-logs td { vertical-align: top; }

/* ---------------------------------------------------------------- 标签与等次 */
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--line-2);
    color: #5B6470;
    font-size: 12px;
    white-space: nowrap;
}

.pill {
    display: inline-flex; align-items: center;
    padding: 2px 10px;
    border-radius: 99px;
    font-size: 12px; font-weight: 500;
    white-space: nowrap;
}
.pill-green { background: var(--green-bg); color: var(--green); }
.pill-amber { background: var(--amber-bg); color: var(--amber); }
.pill-red   { background: var(--red-bg); color: var(--red); }
.pill-blue  { background: var(--blue-bg); color: var(--blue); }
.pill-gray  { background: #EFF1F3; color: #5B6470; }

.grade {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 12.5px; font-weight: 600;
    white-space: nowrap;
}
.grade-green { background: var(--green-bg); color: var(--green); }
.grade-blue  { background: var(--blue-bg); color: var(--blue); }
.grade-amber { background: var(--amber-bg); color: var(--amber); }
.grade-red   { background: var(--red-bg); color: var(--red); }
.grade-gray  { background: #EFF1F3; color: #5B6470; }

.dot {
    display: inline-block; width: 6px; height: 6px; border-radius: 50%;
    vertical-align: middle;
}
.dot-gray  { background: #9AA1AB; }
.dot-amber { background: #D97706; }
.dot-green { background: #18794E; }
.dot-red   { background: #B91C1C; }

.rank {
    display: inline-grid; place-items: center;
    width: 24px; height: 24px; border-radius: 50%;
    background: var(--line-2); color: #5B6470;
    font-size: 12.5px; font-weight: 600;
}
.rank-1 { background: linear-gradient(135deg, #D9B675, #B4873F); color: #fff; }

.qscore {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--ink);
    padding: 2px 6px; border-radius: 6px;
}
.qscore:hover { background: var(--line-2); }

.legend { display: flex; gap: 18px; padding: 12px 20px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------------------------------------------------------------- 按钮 */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 36px; padding: 0 15px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 13.5px; font-weight: 500;
    cursor: pointer;
    transition: background .15s, border-color .15s, box-shadow .15s, transform .05s;
    white-space: nowrap;
    text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
    background: linear-gradient(180deg, #972222, #7C1B1B);
    color: #fff;
    box-shadow: 0 1px 2px rgba(94, 20, 20, .25), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.btn-primary:hover { color: #fff; background: linear-gradient(180deg, #a32626, #871d1d); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: #cfd4da; background: #FAFAFB; }
.btn-danger { background: #fff; border-color: #F1C6C6; color: #B91C1C; }
.btn-danger:hover { background: #FBEAEA; border-color: #E9A8A8; color: #991B1B; }
.btn-sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 7px; }
.btn-block { width: 100%; }

.link { color: var(--red); font-size: 13px; }
.link.danger { color: #B91C1C; }
.link-btn {
    background: none; border: 0; padding: 0 0 0 8px;
    color: var(--red); font-size: 12px; cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.icon-btn {
    width: 30px; height: 30px; border-radius: 7px;
    border: 1px solid var(--line); background: #fff; color: #9AA1AB;
    cursor: pointer; font-size: 16px; line-height: 1;
}
.icon-btn:hover { color: #B91C1C; border-color: #f1c6c6; }
.inline { display: inline; }

/* ---------------------------------------------------------------- 表单 */
.form { display: flex; flex-direction: column; gap: 14px; }
.form-wide { max-width: 940px; }
.form-narrow { max-width: 460px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.field em { color: #B91C1C; font-style: normal; }
.field-grow { flex: 1; }
.field-block { display: block; margin-top: 14px; }

.input, .field input[type="text"], .field input[type="password"],
.field input[type="number"], .field select, textarea.input {
    width: 100%;
    border: 1px solid #DDE1E6;
    border-radius: 8px;
    padding: 8px 11px;
    font-size: 13.5px;
    font-family: inherit;
    color: var(--ink);
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.input:focus, .field input:focus, .field select:focus, textarea.input:focus {
    outline: none;
    border-color: #B98A8A;
    box-shadow: 0 0 0 3px rgba(139, 30, 30, .10);
}
textarea.input { resize: vertical; line-height: 1.7; }
.input:disabled, .field input:disabled, .field select:disabled, textarea:disabled {
    background: #F7F8FA; color: #5B6470; cursor: not-allowed;
}

.form-row { display: flex; gap: 14px; flex-wrap: wrap; }
.form-row .field { flex: 1 1 160px; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 4px 0 8px; }
.form-foot > div { display: flex; gap: 10px; }

.check { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; padding: 4px 0 12px; cursor: pointer; }
.check input { margin-top: 4px; width: 16px; height: 16px; accent-color: var(--red); }

/* ---------------------------------------------------------------- 提示 */
.flashes { margin-bottom: 16px; display: flex; flex-direction: column; gap: 8px; }
.flash {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    border-radius: 9px;
    border: 1px solid transparent;
    font-size: 13.5px;
    position: relative;
}
.flash-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; }
.flash-ok { background: var(--green-bg); border-color: #C7E6D3; color: #145C3B; }
.flash-ok .flash-dot { background: var(--green); }
.flash-error { background: var(--red-bg); border-color: #F1C6C6; color: #8A1C1C; }
.flash-error .flash-dot { background: #B91C1C; }
.flash-warn { background: var(--amber-bg); border-color: #F3D9B0; color: #8A4B08; }
.flash-warn .flash-dot { background: #D97706; }
.flash-x {
    margin-left: auto; background: none; border: 0; font-size: 18px; line-height: 1;
    color: inherit; opacity: .5; cursor: pointer;
}
.flash-x:hover { opacity: .9; }

.notice {
    background: #F8F5F3;
    border: 1px solid #EADFD6;
    border-left: 3px solid var(--red);
    border-radius: 8px;
    padding: 11px 14px;
    font-size: 13px;
    color: #5B4238;
    margin-bottom: 16px;
}
.notice-warn { background: var(--amber-bg); border-color: #F0D6AE; border-left-color: #D97706; color: #7A4408; }

.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty p { margin: 0 0 14px; }

/* ---------------------------------------------------------------- 工作台 */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-side { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(300px, .9fr); gap: 18px; align-items: start; }

.tips { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 13.5px; }
.tips li { margin-bottom: 8px; }

.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.steps li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-2); }
.steps li span {
    width: 22px; height: 22px; flex: 0 0 22px;
    border-radius: 50%;
    background: #F6F1EE; color: var(--red);
    display: grid; place-items: center;
    font-size: 12px; font-weight: 600;
}

.industry-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chip {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 99px;
    background: #F8F5F3;
    border: 1px solid #EADFD6;
    color: #6B4B45;
    font-size: 12.5px;
}

/* ---------------------------------------------------------------- 考核填报 */
.assess-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 18px; margin-bottom: 16px;
}
.crumb { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--red); }
.assess-title { font-size: 22px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.assess-head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

.assess-form { position: relative; }

.scorebar {
    position: sticky;
    top: calc(var(--topbar-h) + 8px);
    z-index: 20;
    display: flex; align-items: center; gap: 26px;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: saturate(180%) blur(8px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 6px 20px -12px rgba(16, 24, 40, .35);
    padding: 12px 18px;
    margin-bottom: 16px;
}
.sb-item { display: flex; flex-direction: column; line-height: 1.25; }
.sb-item > span { font-size: 11.5px; color: var(--muted); }
.sb-item strong { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sb-item strong em { font-style: normal; font-size: 12.5px; color: var(--muted); font-weight: 400; }
.sb-item strong.accent { color: var(--red); }
.sb-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.table-assess th { position: relative; }
.table-assess td { vertical-align: top; padding: 10px 12px; }
.table-assess .item-row:hover td { background: #FDFBFA; }

.cat-row td {
    background: #F6F1EE !important;
    color: #6B4B45;
    font-weight: 600;
    font-size: 12.5px;
    letter-spacing: .5px;
    padding: 7px 12px;
}

.item-name { font-weight: 500; line-height: 1.5; }
.item-note { margin-top: 4px; font-size: 12px; color: #8A8F98; line-height: 1.55; }

.score-input {
    width: 68px;
    text-align: center;
    border: 1px solid #DDE1E6;
    border-radius: 7px;
    padding: 7px 4px;
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--red);
    background: #FFFDF8;
}
.score-input:focus { outline: none; border-color: #B98A8A; box-shadow: 0 0 0 3px rgba(139, 30, 30, .10); }
.score-input:disabled { background: #F7F8FA; color: #6B7280; }

textarea.mini {
    width: 100%;
    min-height: 32px;
    border: 1px solid #E3E6EA;
    border-radius: 7px;
    padding: 6px 9px;
    font-size: 12.5px;
    font-family: inherit;
    line-height: 1.55;
    resize: vertical;
    background: #fff;
}
textarea.mini + textarea.mini { margin-top: 6px; }
textarea.mini:focus { outline: none; border-color: #B98A8A; box-shadow: 0 0 0 3px rgba(139, 30, 30, .08); }

.item-detail td { background: #FCFBF9; padding: 0 12px 12px 52px; }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding: 14px 16px; background: #fff; border: 1px dashed #E3DAD3; border-radius: 9px; }
.detail-grid h5 { font-size: 12px; color: var(--red); margin-bottom: 6px; letter-spacing: .5px; }
.detail-grid p { margin: 0; font-size: 12.5px; color: #4B5563; line-height: 1.75; }
.detail-rules p { white-space: normal; }

.adj-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.adj-row { display: flex; gap: 8px; align-items: center; }
.adj-reason { flex: 1; min-width: 0; border: 1px solid #DDE1E6; border-radius: 8px; padding: 7px 10px; font-size: 13px; font-family: inherit; }
.adj-points { width: 72px; border: 1px solid #DDE1E6; border-radius: 8px; padding: 7px 8px; font-size: 13px; text-align: center; font-family: inherit; }
.adj-reason:focus, .adj-points:focus { outline: none; border-color: #B98A8A; box-shadow: 0 0 0 3px rgba(139, 30, 30, .08); }

/* ---------------------------------------------------------------- 参考资料 */
.tab-bar { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.tab {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink-2);
    padding: 8px 16px;
    border-radius: 99px;
    font-size: 13.5px;
    cursor: pointer;
}
.tab:hover { border-color: #cfd4da; }
.tab.is-active {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
    font-weight: 500;
}
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

.prose { padding: 26px 30px; }
.prose h3 { font-size: 15px; color: var(--red); margin: 22px 0 8px; padding-left: 10px; border-left: 3px solid var(--gold); }
.prose h3:first-child { margin-top: 0; }
.prose p { margin: 0 0 4px; color: var(--ink-2); line-height: 1.9; }

.table-ref td { vertical-align: top; font-size: 13px; line-height: 1.65; }
.table-ref td:first-child { white-space: nowrap; }

.weight-sums { display: flex; gap: 10px; flex-wrap: wrap; }
.weight-sum {
    font-size: 12.5px; color: var(--muted);
    background: #F8F5F3; border: 1px solid #EADFD6;
    border-radius: 7px; padding: 4px 10px;
}
.weight-sum strong { color: var(--ink); margin-left: 4px; }
.weight-sum.is-warn { background: var(--red-bg); border-color: #F1C6C6; color: #8A1C1C; }

/* ---------------------------------------------------------------- 登录 */
.login-body { background: #F4F5F7; }
.login-wrap {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
}
.login-visual {
    background:
        radial-gradient(1200px 500px at -10% -10%, rgba(200, 160, 99, .28), transparent 60%),
        linear-gradient(155deg, #7C1B1B 0%, #5E1414 55%, #4A1010 100%);
    color: #fff;
    padding: 64px 60px;
    display: flex; flex-direction: column; justify-content: center;
    position: relative;
    overflow: hidden;
}
.login-visual::after {
    content: ""; position: absolute; right: -120px; bottom: -120px;
    width: 360px; height: 360px; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .10);
    box-shadow: 0 0 0 40px rgba(255, 255, 255, .03), 0 0 0 90px rgba(255, 255, 255, .02);
}
.login-emblem {
    width: 58px; height: 58px; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #E7C88C, #C8A063 55%, #9C7638);
    color: #5E1414;
    display: grid; place-items: center;
    font-family: "STKaiti", "KaiTi", serif;
    font-size: 28px; font-weight: 700;
    margin-bottom: 26px;
    box-shadow: 0 0 0 6px rgba(255, 255, 255, .08);
}
.login-visual h1 { font-size: 30px; letter-spacing: 2px; margin-bottom: 8px; }
.login-sub { color: rgba(255, 255, 255, .72); font-size: 14px; letter-spacing: 1px; margin: 0 0 34px; }
.login-points { list-style: none; padding: 0; margin: 0 0 44px; }
.login-points li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 14px;
    color: rgba(255, 255, 255, .86);
    font-size: 14px;
}
.login-points li::before {
    content: ""; position: absolute; left: 0; top: 9px;
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--gold);
}
.login-foot { color: rgba(255, 255, 255, .45); font-size: 12.5px; letter-spacing: .5px; }

.login-panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.login-form {
    width: 100%; max-width: 400px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 34px 34px 28px;
    box-shadow: 0 24px 60px -30px rgba(16, 24, 40, .35);
}
.login-form h2 { font-size: 22px; margin-bottom: 4px; }
.login-form .muted { margin: 0 0 22px; font-size: 13px; }
.login-form .field { margin-bottom: 14px; }
.login-form .btn { margin-top: 6px; height: 42px; }
.login-tip { margin-top: 16px; font-size: 12.5px; color: #9AA1AB; text-align: center; }
.login-form .flash { margin-bottom: 12px; }

/* ---------------------------------------------------------------- 打印 */
.print-body { background: #EDEFF2; }
.print-toolbar {
    position: sticky; top: 0; z-index: 5;
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px;
    padding: 12px 22px;
    background: #fff;
    border-bottom: 1px solid var(--line);
}
.sheet {
    width: 210mm;
    min-height: 297mm;
    margin: 18px auto;
    background: #fff;
    padding: 16mm 14mm;
    box-shadow: 0 8px 30px rgba(16, 24, 40, .12);
    color: #000;
    font-size: 10.5pt;
}
.sheet-title { text-align: center; font-size: 20pt; letter-spacing: 4px; margin: 0 0 10px; font-family: "SimSun", "Songti SC", serif; }
.sheet-meta { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 10pt; margin-bottom: 8px; color: #333; }
.sheet-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.sheet-table th, .sheet-table td { border: 1px solid #555; padding: 4px 5px; vertical-align: top; font-size: 9.5pt; line-height: 1.5; }
.sheet-table th { background: #F2F2F2; font-weight: 600; text-align: center; }
.sheet-table .c { text-align: center; }
.sheet-table .r { text-align: right; }
.sheet-table .small { font-size: 9pt; }
.sheet-cat td { background: #F7F7F7; font-weight: 600; }
.sheet-block { margin-top: 10px; }
.sheet-block h4 { font-size: 10.5pt; margin: 0 0 4px; }
.sheet-block p, .sheet-block li { font-size: 10pt; margin: 2px 0; }
.sheet-veto { border: 1px solid #000; padding: 6px 8px; }
.sheet-sign { display: flex; justify-content: space-between; margin-top: 26px; font-size: 10pt; gap: 10px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 1180px) {
    .grid-side { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; gap: 12px; }
}

@media (max-width: 900px) {
    .table { min-width: 760px; }
    .table-assess { min-width: 900px; }
    .table-assess th:nth-child(1), .table-assess td:nth-child(1) { display: none; }
    .card-head { flex-wrap: wrap; }
    .card-actions { flex-wrap: wrap; }
    .login-form { padding: 26px 22px 22px; border-radius: 12px; }
    .sidebar { transform: translateX(-100%); transition: transform .25s ease; }
    .sidebar-close { display: block; }
    .main { margin-left: 0; }
    .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
    body.sidebar-open .sidebar { transform: none; }
    body.sidebar-open .sidebar-mask {
        display: block; position: fixed; inset: 0; z-index: 35;
        background: rgba(15, 20, 25, .45);
    }
    .content { padding: 16px 14px 32px; }
    .topbar { padding: 0 14px; }
    .page-head { flex-direction: column; align-items: stretch; }
    .page-head .btn, .head-actions { align-self: flex-start; }
    .stat-row, .stat-row-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .assess-head { flex-direction: column; }
    .assess-head-actions { justify-content: flex-start; }
    .scorebar {
        gap: 14px; flex-wrap: wrap; padding: 10px 12px;
        top: calc(var(--topbar-h) + 4px);
    }
    .sb-item strong { font-size: 16px; }
    .sb-actions { margin-left: 0; width: 100%; }
    .sb-actions .btn { flex: 1; }
    .login-wrap { grid-template-columns: 1fr; }
    .login-visual { padding: 40px 28px; }
    .login-points, .login-foot { display: none; }
    .table-assess .w-380 { min-width: 260px; }
    .form-row { flex-direction: column; }
    .print-toolbar { flex-direction: column; align-items: flex-start; }
    .sheet { width: auto; margin: 10px; padding: 12px; }
}

@media print {
    @page { size: A4 portrait; margin: 12mm; }
    body { background: #fff; }
    .no-print, .print-toolbar { display: none !important; }
    .sidebar, .sidebar-mask, .topbar, .menu-btn, .flashes, .foot { display: none !important; }
    .main { margin-left: 0 !important; }
    .content { padding: 0 !important; max-width: none; }
    .card { box-shadow: none; border-color: #d0d0d0; break-inside: avoid; }
    .page-head .btn, .head-actions .btn, .head-actions .picker, .row-actions, .card-actions,
    .tabs .tab-bar, .qscore .dot { display: none !important; }
    .table th, .table td { border-bottom: 1px solid #d9d9d9; }
    .sheet { width: auto; min-height: 0; margin: 0; padding: 0; box-shadow: none; }
    .sheet-table tr { page-break-inside: avoid; }
    .sheet-table thead { display: table-header-group; }
}

/* ---------------------------------------------------------------- 公开指标页 */
.login-guide {
    display: block;
    margin-top: 16px;
    text-align: center;
    font-size: 13px;
    color: var(--red);
}
.login-guide:hover { text-decoration: underline; }

.guide-body { background: var(--bg); }
.guide-top {
    position: sticky; top: 0; z-index: 10;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 12px 28px;
    background: rgba(255, 255, 255, .95);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--line);
}
.guide-brand { display: flex; align-items: center; gap: 10px; }
.guide-brand strong { display: block; font-size: 14.5px; letter-spacing: .3px; }
.guide-brand span { display: block; font-size: 12px; color: var(--muted); }
.guide-top-actions { display: flex; gap: 10px; }

.guide-main { max-width: 1120px; margin: 0 auto; padding: 26px 22px 60px; }

.guide-hero {
    padding: 8px 4px 4px;
}
.guide-kicker {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 99px;
    background: var(--red-bg);
    color: var(--red);
    font-size: 12px;
    letter-spacing: .5px;
    margin-bottom: 12px;
}
.guide-hero h1 { font-size: 30px; letter-spacing: .5px; margin: 0 0 12px; }
.guide-hero p { margin: 0; max-width: 860px; color: var(--ink-2); line-height: 1.9; font-size: 14px; }
.guide-facts { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 18px; color: var(--muted); font-size: 13px; }
.guide-facts strong { color: var(--red); font-size: 22px; margin-right: 4px; font-variant-numeric: tabular-nums; }

.guide-toolbar {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    margin: 22px 0 14px; flex-wrap: wrap;
}
.guide-quarter { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.guide-quarter .tab { padding: 6px 14px; font-size: 13px; }

.guide-section-title { font-size: 21px; margin: 30px 0 6px; }
.guide-cat {
    margin: 24px 0 10px;
    padding-left: 10px;
    border-left: 4px solid var(--gold);
    font-size: 16px;
    font-weight: 600;
    color: var(--red);
}
.guide-item { margin-bottom: 12px; }
.guide-item-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.guide-seq {
    width: 32px; height: 32px; flex: 0 0 32px;
    border-radius: 8px;
    background: #F6F1EE;
    color: var(--red);
    display: grid; place-items: center;
    font-size: 13px; font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.guide-item-head h3 { font-size: 16px; flex: 1; min-width: 200px; }
.guide-weight {
    font-size: 12.5px;
    color: var(--red);
    background: var(--red-bg);
    border-radius: 6px;
    padding: 3px 10px;
    white-space: nowrap;
}
.guide-weight.is-zero { color: var(--muted); background: var(--line-2); }
.guide-basis {
    margin: 10px 0 12px;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.7;
    padding-left: 44px;
}
.guide-basis span {
    display: inline-block;
    margin-right: 8px;
    padding: 1px 7px;
    border-radius: 4px;
    background: var(--line-2);
    color: #5B6470;
}
.guide-item-body {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1.3fr;
    gap: 20px;
    padding: 14px 16px;
    background: #FCFBF9;
    border: 1px solid var(--line-2);
    border-radius: 9px;
}
.guide-item-body h5 { font-size: 12px; color: var(--red); margin: 0 0 6px; letter-spacing: .5px; }
.guide-item-body p { margin: 0; font-size: 13px; color: #4B5563; line-height: 1.8; }

.guide-total-row td { background: #FBF7F4; }

.guide-fold { padding: 0; }
.guide-fold summary {
    cursor: pointer;
    padding: 16px 20px;
    font-weight: 600;
    font-size: 15px;
    list-style: none;
}
.guide-fold summary::-webkit-details-marker { display: none; }
.guide-fold summary::after { content: "＋"; float: right; color: var(--muted); font-weight: 400; }
.guide-fold[open] summary::after { content: "－"; }
.guide-fold .prose { padding: 0 24px 20px; }
.guide-fold .table-wrap { padding: 0 8px 12px; }

.guide-foot {
    display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
    margin-top: 34px; padding-top: 18px;
    border-top: 1px solid var(--line);
    color: var(--muted); font-size: 12.5px;
}

@media (max-width: 900px) {
    .guide-top { padding: 10px 14px; }
    .guide-top-actions .btn-ghost { display: none; }
    .guide-main { padding: 18px 14px 40px; }
    .guide-hero h1 { font-size: 23px; }
    .guide-item-body { grid-template-columns: 1fr; gap: 14px; }
    .guide-basis { padding-left: 0; }
    .guide-facts { gap: 16px; }
    .guide-facts strong { font-size: 18px; }
}

@media print {
    .guide-top, .guide-top-actions, .guide-toolbar, .guide-foot { display: none !important; }
    .guide-main { max-width: none; padding: 0; }
    .guide-item { break-inside: avoid; box-shadow: none; }
    .guide-fold { display: none; }
}

/* ---------------------------------------------------------------- 设置与筛选 */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filters select {
    appearance: none;
    border: 1px solid var(--line);
    background: #fff url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
    border-radius: 8px;
    padding: 8px 30px 8px 12px;
    font-size: 13.5px; color: var(--ink);
    cursor: pointer;
}

.repeat-list { display: flex; flex-direction: column; gap: 12px; }
.repeat-row {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr) 32px;
    gap: 10px;
    align-items: start;
    padding: 12px;
    background: #FCFBF9;
    border: 1px solid var(--line-2);
    border-radius: 9px;
}
.repeat-row textarea { min-height: 72px; }
.cal-row { grid-template-columns: 90px 100px minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr) 32px; }
.cal-row .icon-btn { align-self: center; }
.repeat-title { font-weight: 600; }

@media (max-width: 900px) {
    .repeat-row, .cal-row { grid-template-columns: 1fr 32px; }
    .cal-row input:nth-child(n+2) { grid-column: 1; }
    .repeat-row .icon-btn, .cal-row .icon-btn { grid-column: 2; grid-row: 1; }
}
