:root {
  --brand: #0d5c4d;
  --brand-2: #093f35;
  --brand-3: #14705d;
  --brand-soft: #e7f1ed;
  --accent: #bd9440;
  --accent-soft: #f6efdd;
  --ink: #172a26;
  --muted: #6b7f79;
  --bg: #f2f6f3;
  --panel: #ffffff;
  --line: #dfe8e3;
  --line-strong: #cfded6;
  --red: #b4453d;
  --red-soft: #f9eae8;
  --blue: #2e6f9b;
  --blue-soft: #e9f1f7;
  --green: #1d7a5b;
  --green-soft: #e6f3ed;
  --amber: #a5741d;
  --amber-soft: #fbf2df;
  --shadow: 0 12px 30px rgba(20, 52, 44, .07);
  --shadow-sm: 0 4px 14px rgba(20, 52, 44, .06);
  --radius: 16px;
  --radius-sm: 10px;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", system-ui, -apple-system, sans-serif;
  --serif: "Noto Serif SC", "Songti SC", "STSong", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
li { list-style: none; }
::selection { background: #cfe5da; }

/* ---------- 基础组件 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 18px; border-radius: 9px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; letter-spacing: .2px; transition: all .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 14px rgba(13, 92, 77, .18); }
.btn-primary:hover { background: var(--brand-3); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 6px 14px rgba(189, 148, 64, .2); }
.btn-accent:hover { filter: brightness(1.04); }
.btn-ghost { background: #fff; border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-soft { background: var(--brand-soft); color: var(--brand); }
.btn-soft:hover { background: #d8eae2; }
.btn-danger { background: var(--red); color: #fff; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-outline { background: #fff; border: 1px solid var(--brand); color: var(--brand); display: inline-flex; align-items: center; gap: 6px; }
.btn-outline:hover { background: var(--brand-soft); }
.btn-outline:disabled { opacity: .6; cursor: not-allowed; }
.ai-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(189, 148, 64, .18); }
.field-tip { margin-top: 4px; font-size: 11px; color: var(--muted); }
.settings-form { padding: 4px 22px 20px; max-width: 620px; }
.settings-form .login-notice { margin: 16px 0 0; }
.settings-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.settings-actions .small { line-height: 1.6; }
.btn-lg { height: 46px; padding: 0 24px; font-size: 15px; }
.icon-btn { border: 0; background: transparent; width: 34px; height: 34px; border-radius: 8px; color: var(--muted); font-size: 22px; line-height: 1; }
.icon-btn:hover { background: var(--brand-soft); color: var(--brand); }

.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }
.badge-grade.grade-recommended { background: var(--green-soft); color: var(--green); }
.badge-grade.grade-basic { background: var(--blue-soft); color: var(--blue); }
.badge-grade.grade-none { background: var(--red-soft); color: var(--red); }
.badge-grade.grade-precondition { background: var(--amber-soft); color: var(--amber); }
.badge-grade.grade-pending { background: #eef1f0; color: #778580; }
.badge-status.status-submitted { background: var(--green-soft); color: var(--green); }
.badge-status.status-draft { background: #fff4df; color: var(--amber); }

.rating-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 46px; height: 24px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 700; }
.rating-A { background: var(--green-soft); color: var(--green); }
.rating-B { background: var(--blue-soft); color: var(--blue); }
.rating-NA { background: #eef1f0; color: #778580; }
.rating-none { background: #f4f6f5; color: #93a09b; }

.progress { height: 7px; border-radius: 999px; background: #e8eeeb; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), #42a184); transition: width .4s ease; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 24px; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.panel-title h2 { font-size: 18px; font-weight: 700; letter-spacing: .3px; }
.panel-title .sub { font-size: 13px; color: var(--muted); }

.empty-state { padding: 54px 20px; text-align: center; color: var(--muted); }
.empty-state .empty-icon { width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 16px; background: var(--brand-soft); display: flex; align-items: center; justify-content: center; color: var(--brand); font-size: 24px; font-weight: 700; }

.muted { color: var(--muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.flex { display: flex; align-items: center; }
.gap8 { gap: 8px; } .gap12 { gap: 12px; } .gap16 { gap: 16px; }
.spacer { flex: 1; }

/* ---------- 登录页 ---------- */
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.08fr .92fr; background: #f6f8f6; }
.login-visual {
  position: relative; overflow: hidden; padding: 64px 72px; color: #fff;
  background:
    radial-gradient(circle at 18% 20%, rgba(193, 154, 64, .22), transparent 26%),
    radial-gradient(circle at 84% 78%, rgba(74, 164, 136, .32), transparent 36%),
    linear-gradient(150deg, #0a453a 0%, #0d5c4d 52%, #0a3b32 100%);
  display: flex; flex-direction: column; justify-content: space-between;
}
.login-visual::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.6), transparent 75%);
}
.login-visual::after {
  content: ""; position: absolute; right: -170px; bottom: -220px; width: 520px; height: 520px;
  border-radius: 50%; border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 0 0 56px rgba(255,255,255,.035), 0 0 0 112px rgba(255,255,255,.025);
}
.login-visual > * { position: relative; z-index: 1; }
.login-brand { display: flex; align-items: center; gap: 14px; }
.login-brand .seal { width: 46px; height: 46px; border-radius: 13px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.24); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 19px; letter-spacing: 1px; }
.login-brand .org { font-size: 16px; font-weight: 600; letter-spacing: 1px; }
.login-brand .org span { display: block; font-size: 11px; color: rgba(255,255,255,.55); letter-spacing: 2px; font-weight: 400; margin-top: 2px; }
.login-hero h1 { font-family: var(--serif); font-size: clamp(38px, 4.1vw, 58px); line-height: 1.22; letter-spacing: 2px; font-weight: 700; margin-bottom: 24px; }
.login-hero h1 em { font-style: normal; color: #e4c887; }
.login-hero p { font-size: 15px; line-height: 1.9; color: rgba(255,255,255,.72); max-width: 500px; }
.login-stats { display: flex; gap: 40px; margin-top: 46px; }
.login-stats .item strong { display: block; font-family: var(--serif); font-size: 32px; color: #e4c887; line-height: 1.1; }
.login-stats .item span { font-size: 12px; color: rgba(255,255,255,.62); letter-spacing: 1px; }
.login-foot { font-size: 12px; color: rgba(255,255,255,.45); letter-spacing: 1px; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-card { width: 100%; max-width: 420px; }
.login-card .eyebrow { font-size: 12px; letter-spacing: 3px; color: var(--accent); font-weight: 700; margin-bottom: 10px; }
.login-card h2 { font-family: var(--serif); font-size: 30px; letter-spacing: 1px; margin-bottom: 8px; }
.login-card .desc { color: var(--muted); font-size: 13px; margin-bottom: 34px; }
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; color: #3a4f49; }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line-strong); background: #fff; border-radius: 9px;
  padding: 11px 13px; outline: none; transition: border-color .16s, box-shadow .16s;
}
.input { height: 44px; }
.textarea { min-height: 90px; resize: vertical; line-height: 1.7; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(13, 92, 77, .1); }
.login-error { min-height: 20px; color: var(--red); font-size: 13px; margin: 4px 0 10px; }
.login-card .btn { width: 100%; margin-top: 6px; }
.login-tip { margin-top: 26px; padding: 14px 16px; background: #f3f7f5; border: 1px dashed var(--line-strong); border-radius: 10px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.login-tip strong { color: var(--brand); }
.login-notice { margin: 0 0 14px; padding: 10px 12px; background: #fff8e8; border: 1px solid #f0d9a8; border-radius: 8px; font-size: 12px; color: #8a6414; line-height: 1.6; }

/* ---------- 管理端框架 ---------- */
.app-shell { min-height: 100vh; display: flex; }
.sidebar {
  width: 252px; flex: 0 0 252px; position: fixed; inset: 0 auto 0 0; z-index: 30;
  background: linear-gradient(180deg, #0b4a3e 0%, #0a3e34 100%); color: #fff;
  display: flex; flex-direction: column; padding: 22px 16px 18px;
  overflow-y: auto;
}
.sidebar::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(circle at 80% 8%, rgba(189,148,64,.14), transparent 30%); }
.sidebar > * { position: relative; z-index: 1; }
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 22px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.09); }
.brand-mark { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 16px; color: #e7cb93; }
.brand-text { min-width: 0; }
.brand-text strong { display: block; font-size: clamp(15px, 1.2vw, 17px); letter-spacing: .5px; line-height: 1.35; white-space: nowrap; }
.nav-label { font-size: 10px; letter-spacing: 2px; color: rgba(255,255,255,.36); padding: 22px 12px 8px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; height: 42px; padding: 0 12px; border-radius: 9px;
  color: rgba(255,255,255,.7); font-size: 13.5px; margin-bottom: 3px; transition: all .16s;
}
.nav-item svg { width: 17px; height: 17px; opacity: .8; }
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active { background: rgba(255,255,255,.12); color: #fff; font-weight: 600; box-shadow: inset 2px 0 0 #d8b56b; }
.sidebar-foot { margin-top: auto; padding: 18px 12px 0; border-top: 1px solid rgba(255,255,255,.09); font-size: 11px; color: rgba(255,255,255,.4); line-height: 1.8; }
.main-wrap { flex: 1; margin-left: 252px; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 68px; background: rgba(255,255,255,.86); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 18px; padding: 0 32px; position: sticky; top: 0; z-index: 20;
}
.topbar .crumb { font-size: 13px; color: var(--muted); }
.topbar .crumb strong { color: var(--ink); font-weight: 600; }
.topbar .date { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.user-chip { display: flex; align-items: center; gap: 10px; padding-left: 18px; border-left: 1px solid var(--line); }
.user-chip .name { font-size: 13px; font-weight: 600; line-height: 1.3; }
.user-chip .role { font-size: 11px; color: var(--muted); }
.logout-link { color: var(--muted); font-size: 12px; padding: 4px 6px; border-radius: 5px; }
.logout-link:hover { color: var(--red); background: var(--red-soft); }
.page { padding: 28px 32px 56px; max-width: 1500px; width: 100%; }
.page-head { display: flex; align-items: flex-end; gap: 20px; margin-bottom: 22px; }
.page-head h1 { font-size: 25px; letter-spacing: .5px; line-height: 1.3; }
.page-head p { color: var(--muted); font-size: 13px; margin-top: 5px; }
.page-head .actions { margin-left: auto; display: flex; gap: 10px; }

/* ---------- 仪表盘 ---------- */
.demo-banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid #ead9b4; background: #fdf8ec; color: #7d611f; border-radius: 10px; font-size: 12.5px; margin-bottom: 20px; }
.demo-banner .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.demo-banner .actions { margin-left: auto; display: flex; gap: 8px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px 20px 18px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; right: -20px; top: -22px; width: 84px; height: 84px; border-radius: 50%; background: var(--brand-soft); opacity: .6; }
.kpi .label { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.kpi .value { font-family: var(--serif); font-size: 34px; font-weight: 700; line-height: 1.25; margin-top: 8px; letter-spacing: .5px; }
.kpi .value small { font-family: var(--sans); font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.kpi .foot { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.kpi.kpi-green .value { color: var(--green); }
.kpi.kpi-blue .value { color: var(--blue); }
.kpi.kpi-red .value { color: var(--red); }
.kpi.kpi-gold .value { color: var(--accent); }
.kpi.kpi-brand::after { background: var(--brand-soft); }
.dashboard-grid { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 18px; margin-bottom: 18px; }
.chart-card { padding: 22px; }
.donut-wrap { display: flex; align-items: center; gap: 26px; }
.donut { width: 150px; height: 150px; flex: 0 0 150px; position: relative; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut .center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut .center strong { font-family: var(--serif); font-size: 30px; line-height: 1; }
.donut .center span { font-size: 11px; color: var(--muted); margin-top: 5px; }
.legend { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.legend-row { display: flex; align-items: center; gap: 9px; font-size: 12.5px; }
.legend-row .swatch { width: 9px; height: 9px; border-radius: 3px; }
.legend-row .name { color: var(--muted); }
.legend-row .num { margin-left: auto; font-weight: 700; font-size: 14px; }
.mini-bars { display: flex; flex-direction: column; gap: 16px; padding: 4px 0; }
.mini-bar .row { display: flex; align-items: center; gap: 12px; font-size: 12.5px; margin-bottom: 7px; }
.mini-bar .row .name { font-weight: 600; }
.mini-bar .row .num { margin-left: auto; color: var(--muted); }
.stacked { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: #edf2ef; }
.stacked span { display: block; height: 100%; transition: width .4s; }
.stack-a { background: #2f8a68; } .stack-b { background: #5b90b8; } .stack-na { background: #cfd9d5; }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .search { position: relative; }
.toolbar .search .input { width: 240px; height: 36px; padding-left: 34px; }
.toolbar .search::before { content: "⌕"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #9aaba5; font-size: 18px; }
.toolbar .select { height: 36px; width: auto; min-width: 112px; padding-top: 0; padding-bottom: 0; }
.toolbar .spacer { flex: 1; }

.table-wrap { overflow-x: auto; border-radius: 12px; }
table.data-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.data-table th { text-align: left; font-size: 11.5px; letter-spacing: .6px; color: var(--muted); font-weight: 600; background: #f7faf8; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 13px 14px; border-bottom: 1px solid #edf2ef; vertical-align: middle; }
.data-table tbody tr { transition: background .14s; }
.data-table tbody tr:hover { background: #f8fbf9; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table .org-name { font-weight: 600; }
.data-table .num { font-variant-numeric: tabular-nums; }
.data-table .rate { display: flex; align-items: center; gap: 8px; min-width: 108px; }
.data-table .rate .progress { width: 58px; }
.data-table .rate b { font-size: 12.5px; }
.row-link { color: var(--brand); font-weight: 600; font-size: 12.5px; }
.row-link:hover { text-decoration: underline; }
tr.clickable { cursor: pointer; }

/* ---------- 机构填报 ---------- */
.assess-shell { min-height: 100vh; }
.assess-topbar { height: 64px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 28px; position: sticky; top: 0; z-index: 30; }
.assess-topbar .brand { border: 0; padding: 0; color: var(--ink); }
.assess-topbar .brand-mark { background: var(--brand); color: #fff; border: 0; }
.assess-topbar .brand-text strong { font-size: 14px; }
.assess-topbar .org-chip { margin-left: 20px; padding-left: 20px; border-left: 1px solid var(--line); font-size: 13px; }
.assess-topbar .org-chip strong { font-weight: 600; }
.assess-topbar .right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.assess-layout { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 24px; max-width: 1460px; margin: 0 auto; padding: 24px 28px 40px; }
.assess-sidebar { position: sticky; top: 88px; align-self: start; }
.side-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: var(--shadow-sm); margin-bottom: 14px; }
.side-card .label { font-size: 11px; letter-spacing: 1.4px; color: var(--muted); }
.side-card .big { font-family: var(--serif); font-size: 32px; line-height: 1.3; margin: 4px 0 2px; }
.side-card .sub { font-size: 12px; color: var(--muted); }
.progress-ring { width: 92px; height: 92px; position: relative; margin: 6px auto 10px; }
.progress-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.progress-ring .center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.progress-ring .center b { font-family: var(--serif); font-size: 23px; line-height: 1; }
.progress-ring .center span { font-size: 10px; color: var(--muted); margin-top: 3px; }
.chapter-nav { margin-top: 4px; }
.chapter-nav a { display: flex; align-items: center; gap: 8px; padding: 8px 9px; border-radius: 8px; color: #40534e; font-size: 12.5px; }
.chapter-nav a:hover { background: #f2f7f4; color: var(--brand); }
.chapter-nav a .idx { width: 19px; height: 19px; border-radius: 5px; background: #eff4f1; display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--muted); }
.chapter-nav a .cnt { margin-left: auto; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chapter-nav a .cnt.done { color: var(--green); font-weight: 700; }
.chapter-nav a .cnt.todo { color: var(--amber); }
.chapter-nav a.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.chapter-nav a.active .idx { background: #fff; color: var(--brand); }
.chapter-block { scroll-margin-top: 84px; }
.clause.flash { outline: 2px solid var(--accent); outline-offset: 2px; }
.assess-side-actions { display: flex; flex-direction: column; gap: 8px; }
.assess-main { min-width: 0; }
.eyebrow-line { font-size: 11px; letter-spacing: 2px; color: var(--accent); font-weight: 700; margin-bottom: 6px; }
.grade-line { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); text-align: center; font-size: 11.5px; color: var(--muted); }
.grade-line .badge { margin-left: 5px; }
.mini-counts { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 9px; }
.mini-count { background: #f7faf8; border-radius: 8px; padding: 8px 9px; }
.mini-count .n { font-family: var(--serif); font-size: 20px; line-height: 1.1; }
.mini-count .t { font-size: 10.5px; color: var(--muted); }
.mini-count.a .n { color: var(--green); } .mini-count.b .n { color: var(--blue); } .mini-count.u .n { color: #93a09b; }
.filter-bar { margin-bottom: 10px; }
.assess-hero { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 18px; }
.assess-hero h1 { font-size: 24px; letter-spacing: .5px; }
.assess-hero p { color: var(--muted); font-size: 12.5px; margin-top: 5px; }
.assess-topbar .top-time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.pre-card { padding: 20px 22px; margin-bottom: 18px; }
.pre-card .head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.pre-card .head h2 { font-size: 17px; }
.pre-card .hint { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.pre-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pre-item { border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: #fbfdfb; }
.pre-item .name { font-size: 12.5px; font-weight: 700; margin-bottom: 5px; }
.pre-item .text { font-size: 12px; color: var(--muted); line-height: 1.65; min-height: 60px; }
.pre-item .choice { display: flex; gap: 6px; margin-top: 10px; }
.choice-btn { flex: 1; height: 30px; border: 1px solid var(--line-strong); border-radius: 7px; background: #fff; font-size: 12px; color: var(--muted); }
.choice-btn:hover { border-color: var(--brand); }
.choice-btn.on-yes { background: var(--green-soft); color: var(--green); border-color: #a9d3c0; font-weight: 700; }
.choice-btn.on-no { background: var(--red-soft); color: var(--red); border-color: #e4bbb7; font-weight: 700; }
.scope-card { padding: 18px 22px; margin-bottom: 18px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.scope-card .txt { font-size: 12.5px; color: var(--muted); }
.scope-card .txt strong { color: var(--ink); display: block; margin-bottom: 2px; font-size: 13.5px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; }
.switch { width: 40px; height: 22px; border-radius: 999px; background: #d8e1dc; position: relative; transition: background .18s; cursor: pointer; flex: 0 0 40px; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: transform .18s; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.switch.on { background: var(--brand); }
.switch.on::after { transform: translateX(18px); }

.chapter-block { margin-bottom: 18px; scroll-margin-top: 84px; }
.chapter-head { display: flex; align-items: center; gap: 12px; padding: 0 4px 10px; }
.chapter-head .no { width: 30px; height: 30px; border-radius: 8px; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 15px; }
.chapter-head h2 { font-size: 17px; }
.chapter-head .stat { margin-left: auto; font-size: 11.5px; color: var(--muted); display: flex; gap: 10px; }
.chapter-head .stat b { color: var(--ink); }
.clause-list { display: flex; flex-direction: column; gap: 10px; }
.clause { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 2px 8px rgba(20,52,44,.035); overflow: hidden; transition: border-color .15s; }
.clause:hover { border-color: #c6d8d0; }
.clause.needs { border-color: #e2b6b0; }
.clause.rated-a { border-left: 3px solid var(--green); }
.clause.rated-b { border-left: 3px solid var(--blue); }
.clause.rated-na { border-left: 3px solid #bcc7c2; opacity: .82; }
.clause-head { display: flex; align-items: center; gap: 12px; padding: 12px 15px; cursor: pointer; user-select: none; }
.code-pill { font-size: 11px; font-weight: 700; color: var(--brand); background: var(--brand-soft); padding: 3px 7px; border-radius: 5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.clause-title { font-size: 13.5px; font-weight: 600; min-width: 0; }
.clause-title .star { color: var(--accent); font-size: 11px; margin-left: 4px; border: 1px solid #e2cf9f; background: var(--accent-soft); padding: 0 4px; border-radius: 4px; }
.clause-title .sec { font-size: 11px; color: var(--muted); font-weight: 400; margin-left: 8px; }
.clause-head .rating-group { margin-left: auto; display: flex; align-items: center; gap: 5px; }
.rate-btn { height: 29px; min-width: 42px; padding: 0 9px; border-radius: 7px; border: 1px solid var(--line-strong); background: #fff; color: var(--muted); font-size: 12px; font-weight: 600; }
.rate-btn:hover { border-color: var(--brand); color: var(--brand); }
.rate-btn.active-A { background: var(--green); border-color: var(--green); color: #fff; }
.rate-btn.active-B { background: var(--blue); border-color: var(--blue); color: #fff; }
.rate-btn.active-NA { background: #7d8b86; border-color: #7d8b86; color: #fff; }
.rate-btn:disabled { opacity: .5; cursor: not-allowed; }
.expand-caret { width: 22px; text-align: center; color: #9badA7; font-size: 12px; transition: transform .2s; }
.clause.open .expand-caret { transform: rotate(180deg); }
.clause-body { display: none; border-top: 1px solid #eef3f0; padding: 14px 16px 16px; background: #fcfdfc; }
.clause.open .clause-body { display: block; }
.point-block { margin-bottom: 12px; }
.point-block:last-child { margin-bottom: 0; }
.point-label { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 700; color: var(--muted); letter-spacing: .5px; margin-bottom: 7px; }
.point-label .tag { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 19px; border-radius: 4px; font-size: 10px; }
.tag-b { background: var(--blue-soft); color: var(--blue); }
.tag-a { background: var(--green-soft); color: var(--green); }
.point-list { display: flex; flex-direction: column; gap: 5px; }
.point { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: #3d504a; line-height: 1.65; }
.point .bullet { flex: 0 0 16px; height: 16px; border-radius: 50%; background: #edf3ef; color: #6f817b; font-size: 9px; display: flex; align-items: center; justify-content: center; margin-top: 2px; }
.point.met .bullet { background: var(--green-soft); color: var(--green); }
.point.unmet { color: var(--red); }
.point.unmet .bullet { background: var(--red-soft); color: var(--red); }
.point.selectable { align-items: center; padding: 4px 6px; border-radius: 6px; margin-left: -6px; cursor: pointer; }
.point.selectable:hover { background: #f3f8f5; }
.point.selectable input { width: 15px; height: 15px; accent-color: var(--red); margin: 0; flex: 0 0 15px; }
.a-toggle { display: flex; gap: 6px; margin-left: auto; flex: 0 0 auto; }
.a-toggle button { height: 24px; padding: 0 8px; border-radius: 5px; border: 1px solid var(--line); background: #fff; font-size: 11px; color: var(--muted); }
.a-toggle button.yes.on { background: var(--green-soft); border-color: #a9d3c0; color: var(--green); font-weight: 700; }
.a-toggle button.no.on { background: var(--red-soft); border-color: #e4bbb7; color: var(--red); font-weight: 700; }
.point-wrap { display: flex; flex-direction: column; }
.pick-block { margin: 6px 0 4px 22px; padding: 8px 10px; border: 1px dashed #cfdcd6; border-radius: 9px; background: #fbfcfb; }
.pick-head { font-size: 11.5px; color: var(--muted); margin-bottom: 6px; }
.pick-head b { float: right; font-size: 11.5px; color: #b07d2a; }
.pick-head.ok b { color: var(--green); }
.pick-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pick-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 11.5px; color: #3d504a; cursor: pointer; transition: background .15s, border-color .15s; }
.pick-chip:hover { border-color: #b8d4c7; background: #f4f9f6; }
.pick-chip.on { background: var(--green-soft); border-color: #a9d3c0; color: var(--green); font-weight: 600; }
.pick-chip input { margin: 0; }
.pick-other { flex: 0 1 200px; min-width: 140px; padding: 5px 9px; font-family: inherit; font-size: 12px; color: #7a5c1f; background: #fffdf6; border: 1px dashed #dcc79a; border-radius: 999px; }
.pick-other::placeholder { color: #b0a488; }
.pick-other:focus { outline: none; border-style: solid; border-color: #c9a75f; background: #fff; }
.pick-other:placeholder-shown { border-color: #e6b3ad; background: #fff8f7; }
.point-note { margin: -1px 0 6px 24px; width: calc(100% - 24px); min-height: 34px; padding: 7px 9px; font-family: inherit; font-size: 12px; line-height: 1.6; color: #7a5c1f; background: #fffdf6; border: 1px dashed #dcc79a; border-radius: 6px; resize: vertical; }
.point-note::placeholder { color: #b0a488; }
.point-note:focus { outline: none; border-style: solid; border-color: #c9a75f; background: #fff; }
.point-note:placeholder-shown { border-color: #e6b3ad; background: #fff8f7; }
.rating-hint { font-size: 11.5px; color: var(--muted); background: #f4f8f6; border-radius: 7px; padding: 8px 10px; margin-bottom: 12px; line-height: 1.6; }
.rating-hint.warn { background: #fdf5e8; color: #8a641c; }
.rating-hint.danger { background: #fdf0ee; color: var(--red); }
.clause-foot { display: flex; align-items: center; gap: 10px; margin-top: 9px; font-size: 11px; color: var(--muted); }
.clause-foot .error { color: var(--red); font-weight: 600; }
.disease-pick { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 10px 12px; background: var(--soft, #f6f8f7); border: 1px solid var(--line); border-radius: 10px; font-size: 12px; color: var(--muted); }
.disease-pick .disease-count b { color: var(--ink, #10241f); font-size: 14px; }
.disease-pick .btn { margin-left: auto; }
.disease-need { margin-left: 8px; font-style: normal; color: #8a998f; }
.disease-tools { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.disease-tools .input { flex: 1; }
.disease-sum { font-size: 12px; color: var(--muted); white-space: nowrap; }
.disease-sum b { color: var(--green, #12664f); font-size: 14px; }
.disease-tip { font-size: 11.5px; color: var(--muted); line-height: 1.7; margin-bottom: 10px; }
.disease-scroll { max-height: 46vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px 8px; background: #fcfdfc; }
.disease-group { padding: 0 0 8px; border-bottom: 1px dashed var(--line); }
.disease-group:last-child { border-bottom: 0; padding-bottom: 2px; }
.disease-group-title { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 9px 0 7px; margin-bottom: 6px; background: #fcfdfc; border-bottom: 1px solid #eef2f0; font-size: 12.5px; font-weight: 700; color: var(--ink, #10241f); }
.disease-group-title span { font-weight: 400; font-size: 11px; color: var(--muted); }
.disease-group-title .star { font-size: 12px; font-weight: 700; color: var(--accent); }
.disease-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; align-items: start; }
.disease-item { display: flex; align-items: flex-start; gap: 7px; min-width: 0; padding: 6px 9px; border: 1px solid transparent; border-radius: 8px; background: #f7f9f8; font-size: 12px; cursor: pointer; transition: background .15s, border-color .15s; }
.disease-item:hover { background: #f0f5f2; border-color: #dbe6e1; }
.disease-item input { flex: none; margin: 2px 0 0; }
.d-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.d-name { line-height: 1.5; word-break: break-word; }
.d-code { align-self: flex-start; font-style: normal; font-size: 10.5px; line-height: 1.5; color: #6b7d77; background: #e9efec; border-radius: 4px; padding: 0 4px; word-break: break-all; }
.disease-item:has(input:checked) { background: #eaf6f0; border-color: #b6ddc9; }
@media (max-width: 620px) {
  .modal.modal-lg { max-width: 100%; }
}
.savebar {
  position: static; z-index: 1;
  background: rgba(255,255,255,.94); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
  padding: 10px 28px; display: flex; align-items: center; gap: 16px;
  max-width: 1460px; margin: 0 auto;
}
.savebar .progress { width: 180px; }
.savebar .info { font-size: 12px; color: var(--muted); }
.savebar .info b { color: var(--ink); }
.savebar .actions { margin-left: auto; display: flex; gap: 10px; }
.save-state { font-size: 11.5px; color: var(--muted); min-width: 110px; text-align: right; }
.save-state.saved { color: var(--green); }
.save-state.saving { color: var(--accent); }
.save-state.error { color: var(--red); }

.error-list { max-height: 240px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fbfcfb; }
.error-list div { font-size: 12.5px; color: #4a5c56; padding: 3px 0; }
.error-list div::before { content: "•"; color: var(--red); margin-right: 6px; }

/* ---------- 详情 ---------- */
.detail-hero { display: flex; align-items: flex-start; gap: 24px; padding: 26px 28px; margin-bottom: 18px; background: linear-gradient(135deg, #0b4a3e 0%, #0e6352 68%, #157564 100%); color: #fff; border-radius: var(--radius); position: relative; overflow: hidden; box-shadow: 0 16px 34px rgba(9,63,53,.18); }
.detail-hero::after { content: ""; position: absolute; right: -60px; top: -100px; width: 300px; height: 300px; border-radius: 50%; border: 1px solid rgba(255,255,255,.16); box-shadow: 0 0 0 40px rgba(255,255,255,.04), 0 0 0 80px rgba(255,255,255,.025); }
.detail-hero > * { position: relative; z-index: 1; }
.detail-hero h1 { font-family: var(--serif); font-size: 28px; letter-spacing: 1px; }
.detail-hero .sub { color: rgba(255,255,255,.62); font-size: 12.5px; margin-top: 5px; }
.detail-hero .meta { display: flex; gap: 20px; margin-top: 16px; font-size: 12px; color: rgba(255,255,255,.68); }
.detail-hero .meta b { color: #fff; font-weight: 600; }
.detail-hero .grade-box { margin-left: auto; text-align: center; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 14px; padding: 14px 26px; min-width: 150px; }
.detail-hero .grade-box .label { font-size: 11px; letter-spacing: 2px; color: rgba(255,255,255,.55); }
.detail-hero .grade-box .grade { font-family: var(--serif); font-size: 24px; color: #f0d49a; margin-top: 4px; }
.detail-hero .grade-box .rate { font-size: 11.5px; color: rgba(255,255,255,.7); margin-top: 5px; }
.stat-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 18px; }
.stat-box { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.stat-box .label { font-size: 11.5px; color: var(--muted); }
.stat-box .value { font-family: var(--serif); font-size: 25px; line-height: 1.3; margin-top: 2px; }
.stat-box .value.green { color: var(--green); } .stat-box .value.blue { color: var(--blue); } .stat-box .value.red { color: var(--red); }
.detail-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; margin-bottom: 18px; }
.pre-status-list { display: flex; flex-direction: column; gap: 10px; }
.pre-status { display: flex; gap: 10px; padding: 11px 12px; border-radius: 9px; background: #f8faf9; border: 1px solid #edf2ef; font-size: 12px; line-height: 1.6; }
.pre-status .mark { flex: 0 0 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.pre-status.ok .mark { background: var(--green-soft); color: var(--green); }
.pre-status.bad .mark { background: var(--red-soft); color: var(--red); }
.pre-status .name { font-weight: 700; margin-bottom: 2px; }
.pre-status .desc { color: var(--muted); }
.detail-clause-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.detail-clause { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: #fff; overflow: hidden; }
.detail-clause-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; }
.detail-clause-head .name { font-size: 13px; font-weight: 600; }
.detail-clause-head .r { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: var(--muted); }
.detail-clause-body { display: none; padding: 0 14px 14px; border-top: 1px solid #f0f4f2; background: #fcfdfc; }
.detail-clause.open .detail-clause-body { display: block; }
.detail-points { margin-top: 10px; }
.detail-points .point { padding: 2px 0; }
.note-line { display: block; margin-top: 3px; font-style: normal; font-size: 11.5px; color: #8a641c; }

/* ---------- 汇总 ---------- */
.tabs { display: inline-flex; background: #e9efec; border-radius: 9px; padding: 3px; gap: 2px; }
.tab { height: 32px; padding: 0 16px; border: 0; background: transparent; border-radius: 7px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.tab.active { background: #fff; color: var(--brand); font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,.07); }
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.narrative { padding: 20px 22px; line-height: 1.9; font-size: 13px; color: #40534d; }
.narrative strong { color: var(--brand); }
.gap-table td { vertical-align: top; }
.gap-table .item-list { display: flex; flex-direction: column; gap: 3px; }
.gap-table .item-list span { font-size: 11.5px; color: var(--muted); }
.gap-table .item-list b { color: var(--red); font-weight: 700; }
.cause-inline { display: block; margin-top: 2px; font-style: normal; font-size: 11px; color: #8a7a4a; }
.cause-groups { padding: 0 22px 20px; display: grid; gap: 14px; }
.cause-group { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.cause-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #f6f9f7; font-size: 13px; }
.cause-head strong { color: var(--ink); }
.cause-rank { width: 20px; height: 20px; border-radius: 50%; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; }
.cause-count { margin-left: auto; font-size: 12px; color: var(--muted); }
.cause-list { margin: 0; padding: 8px 14px 12px; list-style: none; display: grid; gap: 6px; }
.cause-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-size: 12px; line-height: 1.7; }
.cause-org { font-weight: 600; color: #40534d; }
.cause-note { color: #7a5c1f; }
.cause-ref { font-size: 11px; color: var(--muted); }
.org-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.org-tag { display: inline-block; font-size: 11px; padding: 2px 7px; border-radius: 999px; background: #f2f6f4; color: #52655f; }
.org-tag.more { background: var(--brand-soft); color: var(--brand); cursor: help; }
.measure-card { padding: 22px; }
.measure-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.measure-toolbar .hint { font-size: 12px; color: var(--muted); }
.measure-text { width: 100%; min-height: 440px; border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; font-size: 13px; line-height: 2; resize: vertical; background: #fbfdfc; color: #344741; }
.measure-text:focus { background: #fff; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(13,92,77,.08); }
.summary-section { margin-bottom: 18px; }
.summary-section h2 { font-size: 17px; margin-bottom: 4px; }
.summary-section .desc { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.pill-filter { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { height: 30px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; font-size: 12px; color: var(--muted); }
.pill.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

/* ---------- 账号 ---------- */
.account-note { display: flex; gap: 14px; padding: 16px 18px; background: #f7faf8; border: 1px solid var(--line); border-radius: 11px; margin-bottom: 18px; font-size: 12.5px; color: var(--muted); line-height: 1.8; }
.account-note .key { width: 34px; height: 34px; border-radius: 9px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; font-weight: 700; flex: 0 0 34px; }
.account-note b { color: var(--ink); }
.pw-pill { display: inline-flex; align-items: center; gap: 6px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: #f2f7f4; border: 1px dashed var(--line-strong); border-radius: 6px; padding: 3px 8px; color: #39514a; }

/* ---------- 模态/提示 ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(9, 31, 26, .45); backdrop-filter: blur(2px); z-index: 100; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .2s; padding: 20px; }
.modal-mask.show { opacity: 1; }
.modal { width: 100%; max-width: 500px; background: #fff; border-radius: 16px; box-shadow: 0 24px 70px rgba(0,0,0,.2); transform: translateY(10px) scale(.98); transition: transform .2s; overflow: hidden; }
.modal-mask.show .modal { transform: none; }
.modal.modal-lg { max-width: 760px; }
.modal-head { display: flex; align-items: center; padding: 18px 20px 10px; }
.modal-head h3 { font-size: 17px; }
.modal-head .icon-btn { margin-left: auto; }
.modal-body { padding: 6px 20px 18px; font-size: 13px; color: #465852; line-height: 1.8; max-height: 60vh; overflow-y: auto; }
.modal-text { color: #465852; }
.modal-foot { display: flex; justify-content: flex-end; gap: 9px; padding: 14px 20px 18px; border-top: 1px solid var(--line); }
.toast-box { position: fixed; top: 24px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: center; gap: 9px; background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.12); border-radius: 9px; padding: 11px 15px; font-size: 13px; transform: translateX(20px); opacity: 0; transition: all .25s; max-width: 360px; }
.toast.show { transform: none; opacity: 1; }
.toast-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); flex: 0 0 7px; }
.toast.error .toast-dot { background: var(--red); }
.toast.warn .toast-dot { background: var(--accent); }

/* ---------- 打印 ---------- */
.print-only { display: none; }
@media print {
  body { background: #fff; }
  .sidebar, .topbar, .assess-topbar, .savebar, .demo-banner .actions, .page-head .actions,
  .toolbar, .tabs, .btn, .no-print, .modal-mask, .toast-box, .detail-clause-toolbar { display: none !important; }
  .main-wrap { margin-left: 0; }
  .page { padding: 0; max-width: none; }
  .card, .panel, .kpi, .detail-hero { box-shadow: none; }
  .detail-hero { color: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .data-table th { background: #f4f6f5 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .detail-clause-body, .clause-body { display: block !important; }
  .clause .rating-group, .clause .expand-caret, .clause .a-toggle { display: none !important; }
  .print-only { display: block; }
  .type-panel { display: block !important; page-break-before: auto; }
  .summary-section { break-inside: avoid; }
  .measure-text { border: 0; background: #fff; padding: 0; min-height: 0; height: auto; overflow: visible; }
  a { color: inherit; }
}

/* ---------- 交互细节与可访问性 ---------- */
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: none; }
body.modal-open { overflow: hidden; }

* { scrollbar-width: thin; scrollbar-color: #c0d2c9 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c3d3cc; border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #a9c0b6; border: 2px solid transparent; background-clip: content-box; }

.pwd-wrap { position: relative; }
.pwd-wrap .input { padding-right: 46px; }
.pwd-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; background: transparent; border-radius: 8px; color: var(--muted); display: flex; align-items: center; justify-content: center; }
.pwd-eye:hover { background: var(--brand-soft); color: var(--brand); }
.pwd-eye svg { display: block; }

.back-top { position: fixed; right: 26px; bottom: 34px; z-index: 90; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-strong); background: #fff; color: var(--brand); font-size: 17px; font-weight: 700; box-shadow: var(--shadow-sm); opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .25s, transform .25s, background .18s, color .18s; }
.back-top.show { opacity: 1; pointer-events: auto; transform: none; }
.back-top:hover { background: var(--brand); border-color: var(--brand); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(3, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .login-page { grid-template-columns: 1fr; }
  .login-visual { min-height: auto; padding: 42px 32px; }
  .login-hero h1 { font-size: 34px; }
  .login-stats { margin-top: 26px; }
  .login-foot { display: none; }
  .assess-layout { grid-template-columns: 1fr; padding: 18px 18px 24px; }
  .assess-sidebar { position: static; }
  .assess-side-card-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .pre-list { grid-template-columns: 1fr; }
  .sidebar { width: 78px; flex: 0 0 78px; padding: 18px 10px; }
  .brand { justify-content: center; padding-left: 0; padding-right: 0; }
  .brand-text, .nav-label, .nav-item span, .sidebar-foot { display: none; }
  .nav-item { justify-content: center; padding: 0; }
  .main-wrap { margin-left: 78px; }
  .topbar { padding: 0 20px; }
  .page { padding: 20px; }
  .user-chip .name, .user-chip .role { display: none; }
}
@media (max-width: 720px) {
  .login-visual { padding: 32px 24px; }
  .login-hero p { font-size: 13px; }
  .login-panel { padding: 28px 22px; }
  .login-stats { gap: 24px; }
  .topbar .date, .topbar .crumb { display: none; }
  .page-head { flex-wrap: wrap; }
  .page-head .actions { margin-left: 0; width: 100%; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 15px; }
  .kpi .value { font-size: 27px; }
  .donut-wrap { flex-direction: column; }
  .assess-layout { padding: 14px 12px 24px; }
  .assess-side-card-wrap { grid-template-columns: 1fr; }
  .assess-hero { flex-wrap: wrap; }
  .clause-head { flex-wrap: wrap; gap: 8px; }
  .clause-head .rating-group { width: 100%; margin-left: 0; }
  .rate-btn { flex: 1; }
  .pre-list { grid-template-columns: 1fr; }
  .savebar { padding: 8px 12px; gap: 8px; }
  .savebar .progress { display: none; }
  .savebar .info { font-size: 11px; }
  .savebar .actions .btn { padding: 0 11px; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .detail-hero { flex-direction: column; padding: 20px; }
  .detail-hero .grade-box { margin-left: 0; width: 100%; }
  .toolbar .search .input { width: 100%; }
  .toolbar .search { width: 100%; }
}
