/* CB 系统 —— 版式、配色、部件按法务界面稿（浅色、企业合规风格） */
:root{
  --primary:#2f5cff; --primary-600:#2450e8; --primary-700:#1c42c4; --primary-50:#eef3ff; --primary-100:#e0e9ff;
  --indigo:#5b5bd6; --violet:#7c5cff;
  --success:#12855a; --success-50:#e6f6ef; --warning:#c67a06; --warning-50:#fff5e2;
  --danger:#d43b45; --danger-50:#fdecee; --info:#0b7fa3; --info-50:#e5f5fa;
  --bg:#f5f7fb; --surface:#fff; --surface-2:#fafbfe; --surface-3:#f2f5fb;
  --border:#e6eaf2; --border-strong:#d5dbe8;
  --text:#1c2434; --text-2:#525e73; --text-3:#8a94a8; --text-4:#aab3c4;
  --sidebar-w:244px; --sidebar-collapsed:76px; --topbar-h:64px;
  --radius:12px; --radius-sm:8px; --radius-lg:16px;
  --shadow-sm:0 1px 3px rgba(20,34,64,.06),0 1px 2px rgba(20,34,64,.04);
  --shadow:0 6px 20px rgba(20,34,64,.08); --shadow-lg:0 18px 48px rgba(20,34,64,.16);
  --font:"PingFang SC","Microsoft YaHei","Hiragino Sans GB","Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{font-family:var(--font);color:var(--text);background:var(--bg);font-size:14px;line-height:1.55;-webkit-font-smoothing:antialiased}
.hidden{display:none!important}
svg{display:block}
button,input,select,textarea{font-family:inherit;font-size:inherit;color:inherit}
button{cursor:pointer}
a{color:var(--primary);text-decoration:none}

/* ================= 登录页 ================= */
.login-page{position:fixed;inset:0;z-index:100;display:flex;overflow:auto;background:linear-gradient(135deg,#f7f9ff 0%,#eef2ff 50%,#f4f7ff 100%)}
.login-bg{position:fixed;inset:0;overflow:hidden;pointer-events:none}
.login-grid{position:absolute;inset:-2px;background-image:linear-gradient(rgba(47,92,255,.05) 1px,transparent 1px),linear-gradient(90deg,rgba(47,92,255,.05) 1px,transparent 1px);background-size:44px 44px;mask-image:radial-gradient(ellipse 80% 70% at 50% 45%,#000 40%,transparent 100%)}
.login-orb{position:absolute;border-radius:50%;filter:blur(2px)}
.orb-1{width:520px;height:520px;top:-160px;left:-120px;background:radial-gradient(circle at 30% 30%,rgba(47,92,255,.18),rgba(47,92,255,0) 70%)}
.orb-2{width:560px;height:560px;bottom:-220px;right:-140px;background:radial-gradient(circle at 60% 40%,rgba(124,92,255,.16),rgba(124,92,255,0) 70%)}
.login-wrap{position:relative;z-index:2;width:100%;max-width:500px;padding:24px;margin:auto}
.login-brand{text-align:center;margin-bottom:24px}
.brand-mark{width:56px;height:56px;border-radius:16px;background:linear-gradient(145deg,var(--primary),var(--violet));color:#fff;display:flex;align-items:center;justify-content:center;margin:0 auto 14px;box-shadow:0 10px 26px rgba(47,92,255,.32)}
.brand-mark svg{width:32px;height:32px}
.login-brand h1{font-size:30px;font-weight:800;letter-spacing:.5px;color:#18213a}
.login-brand h1 span{font-size:13px;font-weight:600;color:var(--primary);letter-spacing:1.2px;vertical-align:middle;margin-left:6px}
.login-brand p{color:var(--text-2);font-size:13px;margin-top:6px;letter-spacing:.5px}
.login-card{background:rgba(255,255,255,.9);backdrop-filter:blur(12px);border:1px solid #fff;border-radius:20px;padding:28px 30px;box-shadow:var(--shadow-lg)}
.login-card h2{font-size:20px;font-weight:700}
.login-sub{color:var(--text-3);font-size:13px;margin:4px 0 18px}
.role-cards{display:flex;flex-direction:column;gap:10px}
.role-card{display:flex;align-items:center;gap:14px;width:100%;padding:12px 14px;border:1.5px solid var(--border);border-radius:14px;background:#fff;text-align:left;transition:.18s}
.role-card:hover{border-color:var(--primary);background:var(--primary-50);transform:translateY(-2px);box-shadow:var(--shadow)}
.role-icon{width:42px;height:42px;border-radius:12px;background:var(--primary-50);color:var(--primary);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.role-icon svg{width:22px;height:22px}
.role-text{display:flex;flex-direction:column;flex:1}
.role-text strong{font-size:15px;font-weight:700}
.role-text span{font-size:12px;color:var(--text-3);margin-top:1px}
.role-arrow{width:20px;height:20px;color:var(--text-4)}
.role-card:hover .role-arrow{color:var(--primary)}
.login-foot{display:flex;align-items:center;justify-content:space-between;margin-top:18px;padding-top:14px;border-top:1px solid var(--border);font-size:11px;color:var(--text-4)}
.login-tip{text-align:center;color:var(--text-4);font-size:11px;margin-top:18px;letter-spacing:.3px}

/* ================= 应用骨架 ================= */
.app{display:flex;height:100vh;overflow:hidden}
.sidebar{width:var(--sidebar-w);flex-shrink:0;background:var(--surface);border-right:1px solid var(--border);display:flex;flex-direction:column;transition:width .22s;z-index:30}
.sidebar.collapsed{width:var(--sidebar-collapsed)}
.sidebar-head{height:var(--topbar-h);display:flex;align-items:center;gap:10px;padding:0 16px;border-bottom:1px solid var(--border);flex-shrink:0}
.brand-mark.small{width:36px;height:36px;border-radius:10px;margin:0;flex-shrink:0;box-shadow:none}
.brand-mark.small svg{width:22px;height:22px}
.brand-title{display:flex;flex-direction:column;flex:1;overflow:hidden;white-space:nowrap}
.brand-title strong{font-size:16px;font-weight:800;letter-spacing:.5px}
.brand-title span{font-size:9px;color:var(--primary);font-weight:700;letter-spacing:.8px}
.sidebar-collapse{border:none;background:transparent;color:var(--text-4);padding:4px;border-radius:6px;transition:.15s}
.sidebar-collapse:hover{background:var(--surface-3);color:var(--text)}
.sidebar-collapse svg{width:18px;height:18px}
.sidebar.collapsed .sidebar-collapse svg{transform:rotate(180deg)}
.sidebar.collapsed .brand-title,.sidebar.collapsed .nav-label,.sidebar.collapsed .nav-group-title,.sidebar.collapsed .sidebar-role-text,.sidebar.collapsed .sidebar-help span,.sidebar.collapsed .nav-badge,.sidebar.collapsed .brand-mark.small{display:none}
.sidebar.collapsed .sidebar-head{padding:0 26px}
.sidebar.collapsed .sidebar-nav .nav-item{justify-content:center;padding:10px 0}
.sidebar.collapsed .sidebar-role{justify-content:center}
.sidebar-role{margin:14px 14px 4px;padding:10px 12px;background:linear-gradient(100deg,var(--primary-50),#f3f0ff);border:1px solid var(--primary-100);border-radius:10px;display:flex;align-items:center;gap:10px}
.sidebar-role .sr-dot{width:8px;height:8px;border-radius:50%;background:var(--primary);flex-shrink:0;box-shadow:0 0 0 4px rgba(47,92,255,.12)}
.sidebar-role-text{display:flex;flex-direction:column;overflow:hidden;white-space:nowrap}
.sidebar-role-text strong{font-size:12px;color:var(--primary-700)}
.sidebar-role-text span{font-size:10px;color:var(--text-3)}
.sidebar-nav{flex:1;overflow-y:auto;padding:8px 12px 20px}
.sidebar-nav::-webkit-scrollbar{width:5px}
.sidebar-nav::-webkit-scrollbar-thumb{background:var(--border-strong);border-radius:3px}
.nav-group-title{font-size:10px;font-weight:700;color:var(--text-4);letter-spacing:1px;padding:16px 12px 6px}
.nav-item{display:flex;align-items:center;gap:12px;width:100%;padding:10px 12px;border:none;background:transparent;border-radius:var(--radius-sm);color:var(--text-2);font-size:13px;font-weight:600;text-align:left;transition:.14s;margin-bottom:2px;position:relative}
.nav-item:hover{background:var(--surface-3);color:var(--text)}
.nav-item.active{background:var(--primary-50);color:var(--primary)}
.nav-item.active::before{content:"";position:absolute;left:0;top:9px;bottom:9px;width:3px;border-radius:0 3px 3px 0;background:var(--primary)}
.nav-icon{width:19px;height:19px;flex-shrink:0;display:flex;align-items:center;justify-content:center}
.nav-icon svg{width:19px;height:19px}
.nav-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nav-badge{margin-left:auto;font-size:10px;font-weight:700;background:var(--danger);color:#fff;min-width:18px;height:18px;border-radius:9px;display:flex;align-items:center;justify-content:center;padding:0 5px}
.sidebar-foot{padding:12px;border-top:1px solid var(--border)}
.sidebar-help{display:flex;align-items:center;gap:11px;padding:10px 12px;color:var(--text-3);font-size:12px;cursor:pointer;border-radius:8px;border:none;background:none;width:100%}
.sidebar-help:hover{background:var(--surface-3)}
.sidebar-help svg{width:18px;height:18px;flex-shrink:0}

.app-main{flex:1;display:flex;flex-direction:column;min-width:0}
.topbar{height:var(--topbar-h);flex-shrink:0;background:var(--surface);border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;padding:0 24px;z-index:20;gap:16px}
.topbar-left,.topbar-right{display:flex;align-items:center;gap:12px;min-width:0}
.breadcrumb{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--text-3);white-space:nowrap;overflow:hidden}
.breadcrumb .bc-cur{color:var(--text);font-weight:700;overflow:hidden;text-overflow:ellipsis}
.breadcrumb .bc-sep{color:var(--text-4)}
.topbar-search{display:flex;align-items:center;gap:8px;background:var(--surface-2);border:1px solid var(--border);border-radius:9px;padding:7px 10px;width:260px;transition:.15s}
.topbar-search:focus-within{border-color:var(--primary);background:#fff;box-shadow:0 0 0 3px rgba(47,92,255,.08)}
.topbar-search svg{width:16px;height:16px;color:var(--text-4);flex-shrink:0}
.topbar-search input{border:none;background:transparent;outline:none;flex:1;width:100%;font-size:12px;padding:0;box-shadow:none}
.topbar-search kbd{font-size:10px;color:var(--text-4);background:var(--surface-3);border:1px solid var(--border);border-radius:4px;padding:1px 5px;font-family:inherit;white-space:nowrap}
.icon-btn{width:36px;height:36px;border:none;background:transparent;border-radius:9px;color:var(--text-2);display:flex;align-items:center;justify-content:center;position:relative;transition:.15s;flex-shrink:0}
.icon-btn:hover{background:var(--surface-3);color:var(--text)}
.icon-btn svg{width:19px;height:19px}
.notif-dot{position:absolute;top:7px;right:8px;width:7px;height:7px;background:var(--danger);border-radius:50%;border:1.5px solid var(--surface)}
.user-menu{display:flex;align-items:center;gap:9px;padding:4px 8px 4px 4px;border-radius:9px;cursor:pointer;transition:.15s;border:none;background:none}
.user-menu:hover{background:var(--surface-3)}
.avatar{width:34px;height:34px;border-radius:9px;background:linear-gradient(145deg,var(--primary),var(--indigo));color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:13px;flex-shrink:0}
.user-info{display:flex;flex-direction:column;line-height:1.25;text-align:left;white-space:nowrap}
.user-info strong{font-size:12px;font-weight:700}
.user-info span{font-size:10px;color:var(--text-3)}
.chev{width:15px;height:15px;color:var(--text-4)}
.view-container{flex:1;overflow-y:auto;padding:24px 28px 48px}
.view-container::-webkit-scrollbar{width:8px}
.view-container::-webkit-scrollbar-thumb{background:var(--border-strong);border-radius:4px}

/* ================= 通用页面元素 ================= */
.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:22px}
.page-head h1{font-size:22px;font-weight:800;letter-spacing:.2px}
.page-head p{color:var(--text-3);font-size:13px;margin-top:4px}
.page-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;justify-content:flex-end}

.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:9px 15px;border-radius:9px;border:1px solid var(--border-strong);background:var(--surface);color:var(--text);font-size:13px;font-weight:600;transition:.15s;white-space:nowrap}
.btn svg{width:16px;height:16px}
.btn:hover{background:var(--surface-3);border-color:var(--text-4);text-decoration:none}
.btn.primary{background:var(--primary);color:#fff;border-color:transparent;box-shadow:0 2px 8px rgba(47,92,255,.22)}
.btn.primary:hover{background:var(--primary-600)}
.btn.danger{background:var(--danger-50);color:var(--danger);border-color:transparent}
.btn.danger:hover{background:#fadde1}
.btn.ghost{background:transparent;border-color:transparent;color:var(--text-2)}
.btn.ghost:hover{background:var(--surface-3)}
.btn.sm{padding:6px 10px;font-size:12px;border-radius:7px}
.btn.sm svg{width:14px;height:14px}
.btn:disabled{opacity:.5;cursor:not-allowed}
.link-btn{color:var(--primary);background:none;border:none;font-size:12px;font-weight:600;padding:2px 4px;display:inline-flex;align-items:center;gap:4px}
.link-btn:hover{text-decoration:underline}
.link-btn svg{width:14px;height:14px}

.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-sm);padding:18px 20px;margin-bottom:16px}
.card.flush{padding:0;overflow:hidden}
.card-head{padding:16px 20px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--border);gap:12px}
.card-head h3{font-size:15px;font-weight:700;display:flex;align-items:center;gap:8px;margin:0}
.card-body{padding:20px}
.card h3{font-size:15px;font-weight:700;margin-bottom:10px}
.card h4{font-size:13px;margin:14px 0 6px;color:var(--text-2)}
.grid{display:grid;gap:16px;margin-bottom:16px}
.grid>.card,.grid>.stat-card{margin-bottom:0}
.g-2{grid-template-columns:repeat(2,1fr)}
.g-3{grid-template-columns:repeat(3,1fr)}
.g-4{grid-template-columns:repeat(4,1fr)}
@media(max-width:1200px){.g-4{grid-template-columns:repeat(2,1fr)}.g-3{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){.g-2,.g-3,.g-4{grid-template-columns:1fr}}
.row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.between{justify-content:space-between}
.grow{flex:1;min-width:0}
.muted{color:var(--text-3);font-size:12px}

.stat-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:18px 20px;box-shadow:var(--shadow-sm)}
.stat-card .sc-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.stat-card .sc-label{font-size:12px;color:var(--text-3);font-weight:600}
.stat-card .sc-icon{width:38px;height:38px;border-radius:10px;display:flex;align-items:center;justify-content:center}
.stat-card .sc-icon svg{width:20px;height:20px}
.stat-card .sc-value{font-size:28px;font-weight:800;line-height:1.1;letter-spacing:-.5px}
.stat-card .sc-foot{font-size:11px;color:var(--text-3);margin-top:8px}
.ic-blue{background:var(--primary-50);color:var(--primary)}
.ic-green{background:var(--success-50);color:var(--success)}
.ic-orange{background:var(--warning-50);color:var(--warning)}
.ic-red{background:var(--danger-50);color:var(--danger)}
.ic-purple{background:#f1edff;color:var(--violet)}
.ic-gray{background:var(--surface-3);color:var(--text-3)}

.badge,.tag{display:inline-flex;align-items:center;gap:5px;padding:3px 9px;border-radius:20px;font-size:11px;font-weight:700;line-height:1.5;background:var(--surface-3);color:var(--text-2);white-space:nowrap}
.badge .dot{width:6px;height:6px;border-radius:50%;background:currentColor}
.badge-blue,.tag.blue{background:var(--primary-50);color:var(--primary)}
.badge-green,.tag.green{background:var(--success-50);color:var(--success)}
.badge-orange,.tag.amber{background:var(--warning-50);color:var(--warning)}
.badge-red,.tag.red{background:var(--danger-50);color:var(--danger)}
.badge-purple{background:#f1edff;color:var(--violet)}
.risk-level{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:700;white-space:nowrap}
.risk-level .rdot{width:8px;height:8px;border-radius:50%;background:var(--text-4)}
.rl-high{color:var(--danger)}.rl-high .rdot{background:var(--danger)}
.rl-mid{color:var(--warning)}.rl-mid .rdot{background:var(--warning)}
.rl-low{color:var(--success)}.rl-low .rdot{background:var(--success)}

.table-wrap,.grid-wrap{overflow-x:auto}
table.t{width:100%;border-collapse:collapse;font-size:13px}
table.t th{text-align:left;padding:12px 16px;background:var(--surface-2);color:var(--text-3);font-size:11px;font-weight:700;letter-spacing:.3px;white-space:nowrap;border-bottom:1px solid var(--border)}
table.t td{padding:13px 16px;border-bottom:1px solid var(--border);vertical-align:middle}
table.t tr{transition:.12s}
table.t tr:hover td{background:var(--surface-2)}
table.t tr:last-child td{border-bottom:none}
table.t.bordered th,table.t.bordered td{border:1px solid var(--border);vertical-align:top;padding:9px 12px}
.cell-title{font-weight:600;color:var(--text)}
a.cell-title:hover{color:var(--primary)}
.cell-sub{font-size:11px;color:var(--text-3);margin-top:2px}
.cell-actions{display:flex;gap:6px;justify-content:flex-end;flex-wrap:wrap}
.empty,.empty-state{text-align:center;padding:48px 20px;color:var(--text-3);font-size:13px}
.empty-state svg{width:48px;height:48px;margin:0 auto 12px;color:var(--text-4)}

.toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:16px}
.toolbar .spacer{flex:1}
.search-inline{position:relative}
.search-inline svg{position:absolute;left:11px;top:50%;transform:translateY(-50%);width:15px;height:15px;color:var(--text-4)}
.search-inline input{padding-left:34px;height:36px;min-width:240px;font-size:12px}

.tabs{display:flex;gap:2px;border-bottom:1px solid var(--border);margin-bottom:20px;overflow-x:auto}
.tab{padding:10px 16px;border:none;background:transparent;color:var(--text-2);font-size:13px;font-weight:600;white-space:nowrap;position:relative;transition:.15s;display:inline-flex;align-items:center}
.tab:hover{color:var(--text);text-decoration:none}
.tab.active{color:var(--primary)}
.tab.active::after{content:"";position:absolute;left:12px;right:12px;bottom:-1px;height:2px;background:var(--primary);border-radius:2px}
.tab-count{font-size:10px;background:var(--surface-3);padding:1px 6px;border-radius:8px;margin-left:6px;color:var(--text-3)}
.tab.active .tab-count{background:var(--primary-50);color:var(--primary)}
.pills{display:flex;gap:6px;margin-bottom:14px}
.pills button{border:1px solid var(--border-strong);background:#fff;border-radius:20px;padding:5px 16px;font-weight:600;color:var(--text-2);font-size:12px}
.pills button.active{background:var(--primary);border-color:var(--primary);color:#fff}

.progress{height:6px;background:var(--surface-3);border-radius:4px;overflow:hidden;width:100%}
.progress .fill{height:100%;background:linear-gradient(90deg,var(--primary),var(--indigo));border-radius:4px;transition:width .4s}
.progress.green .fill{background:linear-gradient(90deg,#20b487,var(--success))}
.progress-cell{display:flex;align-items:center;gap:10px;min-width:120px}
.progress-cell span{font-size:11px;color:var(--text-2);font-weight:600;min-width:34px}

.timeline{position:relative;padding-left:26px}
.timeline::before{content:"";position:absolute;left:7px;top:6px;bottom:6px;width:2px;background:var(--border)}
.tl-item{position:relative;padding-bottom:20px}
.tl-item:last-child{padding-bottom:0}
.tl-item::before{content:"";position:absolute;left:-23px;top:3px;width:10px;height:10px;border-radius:50%;background:var(--surface);border:2px solid var(--border-strong)}
.tl-item.done::before{background:var(--success);border-color:var(--success)}
.tl-item.back::before{background:var(--danger);border-color:var(--danger)}
.tl-item.current::before{background:var(--primary);border-color:var(--primary);box-shadow:0 0 0 4px var(--primary-50)}
.tl-title{font-size:13px;font-weight:600;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.tl-meta{font-size:11px;color:var(--text-3);margin-top:2px}
.tl-body{font-size:13px;color:var(--text-2);margin-top:4px}

/* 流程步骤条 */
.steps{display:flex;align-items:center;gap:0;overflow-x:auto;padding:4px 0}
.step{display:flex;align-items:center;gap:9px;white-space:nowrap;color:var(--text-3);font-size:12px;font-weight:600}
.step .num{width:26px;height:26px;border-radius:50%;border:2px solid var(--border-strong);display:flex;align-items:center;justify-content:center;font-size:11px;background:#fff;flex-shrink:0}
.step .num svg{width:13px;height:13px}
.step.done{color:var(--success)}.step.done .num{background:var(--success);border-color:var(--success);color:#fff}
.step.cur{color:var(--primary)}.step.cur .num{border-color:var(--primary);color:var(--primary);box-shadow:0 0 0 4px var(--primary-50)}
.step-line{flex:1;min-width:28px;height:2px;background:var(--border);margin:0 10px}
.step-line.done{background:var(--success)}

/* 工作台列表与评估卡片 */
.todo-item{display:flex;align-items:center;gap:14px;padding:14px 20px;border-bottom:1px solid var(--border)}
.todo-item:last-child{border-bottom:none}
.todo-item:hover{background:var(--surface-2)}
.ti-icon{width:36px;height:36px;border-radius:10px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.ti-icon svg{width:18px;height:18px}
.assess-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-sm);padding:18px 20px;display:block;color:inherit;transition:.15s}
.assess-card:hover{border-color:var(--primary);box-shadow:var(--shadow);transform:translateY(-2px)}
.assess-card h4{font-size:15px;font-weight:700;margin:10px 0 2px;color:var(--text)}
.ac-foot{display:flex;justify-content:space-between;align-items:center;margin-top:12px;font-size:11px;color:var(--text-3);gap:10px}
.chart-box svg{width:100%;height:auto;overflow:visible}
.chart-legend{display:flex;flex-wrap:wrap;gap:10px 18px;margin-top:14px;justify-content:center}
.legend-item{display:flex;align-items:center;gap:7px;font-size:11px;color:var(--text-2)}
.legend-item .lg-dot{width:9px;height:9px;border-radius:3px}
.tip{display:flex;gap:12px;background:var(--warning-50);border:1px solid #f3dba8;border-radius:10px;padding:12px 14px;color:#8a5604;font-size:13px;margin-bottom:10px}
.tip:last-child{margin-bottom:0}
.tip svg{width:18px;height:18px;flex-shrink:0;margin-top:2px}
.tip b{display:block}

/* 表单 */
input[type=text],input[type=password],input[type=date],select,textarea{border:1px solid var(--border-strong);border-radius:8px;padding:9px 11px;font-size:13px;background:var(--surface);width:100%;outline:none;transition:.15s}
input:focus,select:focus,textarea:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(47,92,255,.08)}
textarea{resize:vertical;min-height:38px;line-height:1.5}
label.f{display:block;font-size:12px;color:var(--text-2);margin:12px 0 6px;font-weight:600}
.form-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:4px 16px}
.banner{border-radius:10px;padding:11px 14px;margin-bottom:14px;font-size:13px;border:1px solid}
.banner.info{background:var(--info-50);border-color:#bfe3ee;color:#0a5f7a}
.banner.warn{background:var(--warning-50);border-color:#f3dba8;color:#8a5604}
.banner.ok{background:var(--success-50);border-color:#b9e3d0;color:#0d6746}
.banner.bad{background:var(--danger-50);border-color:#f3c5c9;color:#a52b34}
.kv{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:14px 20px;font-size:13px}
.kv div span{display:block;font-size:11px;color:var(--text-3);margin-bottom:2px}

/* 填写页 */
.fill{display:flex;gap:18px;align-items:flex-start}
.parts{width:236px;flex-shrink:0;position:sticky;top:0;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:8px;box-shadow:var(--shadow-sm)}
.parts a{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:9px 10px;border-radius:var(--radius-sm);color:var(--text-2);font-size:13px;font-weight:600}
.parts a .pn{display:flex;gap:9px;align-items:center}
.parts a .pk{width:22px;height:22px;border-radius:50%;background:var(--surface-3);display:flex;align-items:center;justify-content:center;font-size:11px;flex-shrink:0}
.parts a.full .pk{background:var(--success);color:#fff}
.parts a.active{background:var(--primary-50);color:var(--primary)}
.parts a.active .pk{background:var(--primary);color:#fff}
.parts a:hover{background:var(--surface-3)}
.parts .cnt{color:var(--text-4);font-size:11px;white-space:nowrap}
.q{padding:16px 0;border-bottom:1px dashed var(--border)}
.q:last-child{border-bottom:0}
.q-head{display:flex;gap:10px;margin-bottom:10px}
.q-id{font-weight:700;color:var(--primary);white-space:nowrap;min-width:50px;font-size:13px}
.q-id.star::before{content:"★ ";color:var(--warning)}
.q-text{flex:1;font-weight:600}
.q-text b{color:var(--primary-700)}
.opts{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 8px 60px}
.opt{display:flex;align-items:flex-start;gap:7px;border:1.5px solid var(--border);border-radius:9px;padding:7px 13px;cursor:pointer;background:#fff;max-width:100%;transition:.12s;font-size:13px}
.opt:hover{border-color:var(--primary)}
.opt input{margin-top:4px;accent-color:var(--primary)}
.opt.on{border-color:var(--primary);background:var(--primary-50);color:var(--primary-700);font-weight:600}
.q-note{margin-left:60px}
.q.att{background:linear-gradient(90deg,var(--warning-50),transparent 70%);margin:0 -20px;padding-left:20px;padding-right:20px}
.note{background:var(--surface-3);border-left:3px solid var(--primary);border-radius:6px;padding:10px 13px;margin:10px 0;color:var(--text-2);font-size:13px}
.sub-h{font-size:14px;font-weight:700;margin:20px 0 4px;padding-top:14px;border-top:1px solid var(--border)}
.grid-wrap{margin:10px 0}
.grid-wrap td textarea{min-width:120px;border-color:transparent;padding:4px 6px;background:var(--surface-2)}
.saved{font-size:12px;color:var(--text-3)}
details{border:1px solid var(--border);border-radius:var(--radius-sm);margin-bottom:8px;background:#fff}
details summary{padding:11px 14px;font-weight:600;cursor:pointer;font-size:13px}
details .in{padding:0 14px 12px}

/* 帮助 */
.doc h2{font-size:16px;margin:22px 0 8px;padding-left:10px;border-left:4px solid var(--primary)}
.doc h2:first-child{margin-top:0}
.doc p,.doc li{margin:6px 0;color:var(--text-2)}
.doc ul,.doc ol{padding-left:22px}
.doc table{margin:8px 0}

/* ================= 弹窗、下拉、提示 ================= */
.mask{position:fixed;inset:0;background:rgba(16,24,44,.42);backdrop-filter:blur(2px);z-index:200;display:flex;align-items:center;justify-content:center;padding:24px;animation:fadeIn .18s}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
@keyframes slideUp{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
.dialog{background:var(--surface);border-radius:var(--radius-lg);box-shadow:var(--shadow-lg);width:100%;max-width:640px;max-height:90vh;display:flex;flex-direction:column;animation:slideUp .22s}
.dialog.wide{max-width:900px}
.modal-head{padding:18px 22px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between}
.modal-head h3{font-size:16px;font-weight:700}
.modal-close{width:30px;height:30px;border:none;background:transparent;border-radius:7px;color:var(--text-3);display:flex;align-items:center;justify-content:center}
.modal-close:hover{background:var(--surface-3);color:var(--text)}
.modal-close svg{width:18px;height:18px}
.modal-body{padding:8px 22px 22px;overflow-y:auto}
.modal-body>p:first-child{margin-top:14px}
.modal-foot{padding:14px 22px;border-top:1px solid var(--border);display:flex;justify-content:flex-end;gap:10px;background:var(--surface-2);border-radius:0 0 var(--radius-lg) var(--radius-lg)}
.toast-root{position:fixed;top:20px;left:50%;transform:translateX(-50%);align-items:center;z-index:500;display:flex;flex-direction:column;gap:10px}
.toast{background:var(--surface);border:1px solid var(--border);border-left:4px solid var(--success);border-radius:10px;padding:12px 16px;box-shadow:var(--shadow-lg);display:flex;align-items:center;gap:10px;min-width:240px;max-width:420px;font-size:13px;animation:toastIn .25s}
@keyframes toastIn{from{opacity:0;transform:translateX(30px)}to{opacity:1;transform:none}}
.toast svg{width:18px;height:18px;flex-shrink:0;color:var(--success)}
.toast.err{border-left-color:var(--danger)}.toast.err svg{color:var(--danger)}
.notif-panel,.user-dropdown{position:fixed;top:58px;right:24px;width:340px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-lg);z-index:150;overflow:hidden;animation:slideUp .18s}
.user-dropdown{width:230px}
.panel-head{padding:14px 16px;border-bottom:1px solid var(--border);font-weight:700;font-size:14px}
.notif-list{max-height:380px;overflow-y:auto}
.notif-item{padding:13px 16px;border-bottom:1px solid var(--border);display:flex;gap:11px;cursor:pointer;transition:.12s;color:inherit}
.notif-item:hover{background:var(--surface-2)}
.notif-item .ni-title{font-size:12px;font-weight:600}
.notif-item .ni-desc{font-size:11px;color:var(--text-3);margin-top:2px}
.dd-item{display:flex;align-items:center;gap:10px;padding:11px 16px;font-size:13px;color:var(--text-2);cursor:pointer;width:100%;border:none;background:transparent;text-align:left}
.dd-item:hover{background:var(--surface-3)}
.dd-item svg{width:17px;height:17px}
.dd-divider{height:1px;background:var(--border);margin:4px 0}
@media(max-width:900px){.sidebar{display:none}.fill{flex-direction:column}.parts{width:100%;position:static}.topbar-search{display:none}}

.cell-actions{flex-wrap:nowrap;white-space:nowrap}
table.t th{white-space:nowrap}
.nw,.link-btn,.badge,.risk-level{white-space:nowrap}
input[type=password]:focus{border-color:var(--primary);box-shadow:0 0 0 3px var(--primary-50)}
.login-card form .f:first-child{margin-top:0}
