:root {
  --bg:#ffffff; --bg-subtle:#fafafa; --bg-muted:#f4f4f5; --surface:#ffffff; --surface-2:#fafafa; --surface-hover:#f4f4f5;
  --border:#e4e4e7; --border-strong:#d4d4d8; --text:#18181b; --text-2:#52525b; --text-muted:#a1a1aa;
  --accent:#4f46e5; --accent-hover:#4338ca; --accent-soft:#eef2ff; --accent-ring:rgba(79,70,229,.18);
  --prio-high:#e5484d; --prio-high-bg:#fdecec; --prio-med:#f5a623; --prio-med-bg:#fdf3e1; --prio-low:#10b981; --prio-low-bg:#e7f6ef;
  --shadow-sm:0 1px 2px rgba(24,24,27,.04),0 1px 3px rgba(24,24,27,.06);
  --shadow-lg:0 12px 28px -10px rgba(24,24,27,.18),0 4px 10px -6px rgba(24,24,27,.12);
  --r-sm:6px; --r-md:8px; --r-lg:10px; --spring:cubic-bezier(.34,1.56,.64,1); --ease:cubic-bezier(.4,0,.2,1); --sidebar-w:240px;
}
[data-theme="dark"] {
  --bg:#09090b; --bg-subtle:#0d0d10; --bg-muted:#18181b; --surface:#18181b; --surface-2:#1c1c20; --surface-hover:#27272a;
  --border:#27272a; --border-strong:#3f3f46; --text:#fafafa; --text-2:#a1a1aa; --text-muted:#71717a;
  --accent:#6366f1; --accent-hover:#818cf8; --accent-soft:rgba(99,102,241,.14); --accent-ring:rgba(99,102,241,.30);
  --prio-high-bg:rgba(229,72,77,.14); --prio-med-bg:rgba(245,166,35,.14); --prio-low-bg:rgba(16,185,129,.14);
  --shadow-sm:0 1px 2px rgba(0,0,0,.5); --shadow-lg:0 16px 36px -12px rgba(0,0,0,.7),0 6px 14px -8px rgba(0,0,0,.5);
}
*{box-sizing:border-box} html,body{height:100%}
body{margin:0;font-family:'Inter',system-ui,-apple-system,"Segoe UI",Roboto,"PingFang SC","Microsoft YaHei",sans-serif;background:var(--bg);color:var(--text);font-size:14px;line-height:1.5;-webkit-font-smoothing:antialiased;transition:background .3s var(--ease),color .3s var(--ease)}
.mono{font-family:'JetBrains Mono',monospace;font-variant-numeric:tabular-nums}
::selection{background:var(--accent-soft)}
.app{display:grid;grid-template-columns:var(--sidebar-w) 1fr;min-height:100vh}
.sidebar{border-right:1px solid var(--border);background:var(--bg-subtle);display:flex;flex-direction:column;padding:18px 14px;position:sticky;top:0;height:100vh;transition:background .3s var(--ease),transform .3s var(--ease)}
.brand{display:flex;align-items:center;gap:10px;padding:4px 8px 18px}
.brand .logo{width:30px;height:30px;border-radius:var(--r-md);background:linear-gradient(135deg,var(--accent),#7c75f0);display:grid;place-items:center;color:#fff;flex:none;box-shadow:0 2px 8px var(--accent-ring)}
.brand .name{font-weight:600;font-size:15px;letter-spacing:.2px}
.brand .sub{font-size:11px;color:var(--text-muted)}
.nav{display:flex;flex-direction:column;gap:2px;margin-top:6px}
.nav-label{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--text-muted);padding:14px 10px 6px}
.nav-item{display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:var(--r-md);color:var(--text-2);cursor:pointer;border:none;background:none;font-size:14px;font-weight:500;width:100%;text-align:left;transition:background .15s var(--ease),color .15s var(--ease)}
.nav-item svg{width:17px;height:17px;flex:none}
.nav-item:hover{background:var(--surface-hover);color:var(--text)}
.nav-item.active{background:var(--accent-soft);color:var(--accent)}
.nav-item .kbd{margin-left:auto;font-size:10px;color:var(--text-muted)}
.sidebar-foot{margin-top:auto;display:flex;flex-direction:column;gap:10px}
.toggle-row{display:flex;align-items:center;justify-content:space-between;padding:8px 10px;border-radius:var(--r-md);background:var(--surface);border:1px solid var(--border)}
.toggle-row span{font-size:13px;color:var(--text-2)}
.theme-toggle{width:46px;height:26px;border-radius:999px;border:1px solid var(--border);background:var(--bg-muted);position:relative;cursor:pointer;flex:none;transition:background .2s var(--ease)}
.theme-toggle .knob{position:absolute;top:2px;left:2px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:var(--shadow-sm);display:grid;place-items:center;color:var(--accent);transition:transform .25s var(--spring)}
[data-theme="dark"] .theme-toggle .knob{transform:translateX(20px)}
.theme-toggle .knob svg{width:12px;height:12px}
[data-theme="dark"] .theme-toggle .i-sun{display:none}
[data-theme="light"] .theme-toggle .i-moon{display:none}
.user-card{display:flex;align-items:center;gap:10px;padding:10px;border-radius:var(--r-md);border:1px solid var(--border);background:var(--surface)}
.avatar{width:32px;height:32px;border-radius:50%;flex:none;display:grid;place-items:center;color:#fff;font-weight:600;font-size:13px}
.user-card .ident-meta{line-height:1.25;min-width:0;flex:1}
.user-card .ident-row{display:flex;align-items:center;gap:6px}
.user-card .ident-row .n{font-weight:600;font-size:13px}
.role-badge{font-size:10px;font-weight:600;padding:1px 7px;border-radius:999px;background:var(--accent-soft);color:var(--accent)}
.role-badge.member{background:var(--bg-muted);color:var(--text-2)}
.ident-user{margin-top:4px;font-size:11px;color:var(--text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.btn-logout{width:100%;margin-top:8px;padding:5px 8px;font-size:12px;justify-content:center}
.login-overlay{z-index:100;background:color-mix(in srgb,var(--bg) 72%,#0f172a 28%);backdrop-filter:blur(8px)}
.login-modal{max-width:380px}
.login-error{margin:0;font-size:12px;color:var(--prio-high)}
.proj-switch{font-size:12px;padding:6px 10px;max-width:220px}
body.authed .login-overlay{display:none}
body:not(.authed) .app{visibility:hidden}
[hidden]{display:none !important}
.readonly-banner{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--prio-med);background:var(--prio-med-bg);border:1px solid color-mix(in srgb,var(--prio-med) 35%,var(--border));border-radius:var(--r-md);padding:10px 12px;margin-bottom:16px}
.readonly-banner svg{width:15px;height:15px;flex:none}
.main{display:flex;flex-direction:column;min-width:0}
.topbar{display:flex;align-items:center;gap:12px;padding:16px 28px;border-bottom:1px solid var(--border);background:color-mix(in srgb,var(--bg) 85%,transparent);backdrop-filter:saturate(1.2) blur(6px);position:sticky;top:0;z-index:20}
.hamburger{display:none}
.topbar h1{font-size:18px;font-weight:600;margin:0}
.topbar .crumb{font-size:12px;color:var(--text-muted)}
.spacer{flex:1}
.btn{display:inline-flex;align-items:center;gap:7px;padding:8px 14px;border-radius:var(--r-md);font-weight:500;font-size:13px;border:1px solid var(--border);background:var(--surface);color:var(--text);cursor:pointer;transition:all .18s var(--ease)}
.btn svg{width:15px;height:15px}
.btn:hover{background:var(--surface-hover);border-color:var(--border-strong)}
.btn-primary{background:var(--accent);border-color:var(--accent);color:#fff;box-shadow:0 1px 4px var(--accent-ring)}
.btn-primary:hover{background:var(--accent-hover);border-color:var(--accent-hover)}
.btn-danger{color:var(--prio-high);border-color:color-mix(in srgb,var(--prio-high) 40%,var(--border))}
.btn-danger:hover{background:var(--prio-high-bg)}
.btn .kbd{font-size:10px;opacity:.7}
.content{padding:28px;max-width:1180px;width:100%;margin:0 auto}
.page{display:none;animation:fade .25s var(--ease)}
.page.active{display:block}
@keyframes fade{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.section-title{font-size:13px;font-weight:600;color:var(--text-2);text-transform:uppercase;letter-spacing:.06em;margin:0 0 12px}
.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:26px}
.stat{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);padding:18px;box-shadow:var(--shadow-sm);transition:transform .22s var(--spring),box-shadow .22s var(--ease),border-color .2s}
.stat:hover{transform:translateY(-3px);box-shadow:var(--shadow-lg);border-color:var(--border-strong)}
.stat .top{display:flex;align-items:center;justify-content:space-between}
.stat .label{font-size:12px;color:var(--text-muted);font-weight:500}
.stat .ico{width:30px;height:30px;border-radius:var(--r-md);display:grid;place-items:center;background:var(--accent-soft);color:var(--accent)}
.stat .ico svg{width:16px;height:16px}
.stat .val{font-size:30px;font-weight:600;margin-top:12px;letter-spacing:-.5px}
.stat .delta{font-size:12px;margin-top:4px;color:var(--text-muted)}
.stat .delta.up{color:var(--prio-low)}
.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);padding:20px;box-shadow:var(--shadow-sm)}
.grid-2{display:grid;grid-template-columns:1.4fr 1fr;gap:20px}
.progress-row{margin-bottom:18px}
.progress-row:last-child{margin-bottom:0}
.progress-head{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:8px}
.progress-head .t{font-size:13px;font-weight:500}
.progress-head .v{font-size:13px;font-weight:600}
.bar{height:8px;border-radius:999px;background:var(--bg-muted);overflow:hidden}
.bar-fill{height:100%;border-radius:999px;background:linear-gradient(90deg,var(--accent),#818cf8);width:0;transition:width .6s var(--ease)}
.timeline{list-style:none;margin:0;padding:0}
.timeline li{display:flex;gap:12px;padding:0 0 18px;position:relative}
.timeline li:not(:last-child)::before{content:"";position:absolute;left:14px;top:28px;bottom:-2px;width:1px;background:var(--border)}
.tl-dot{width:28px;height:28px;border-radius:50%;flex:none;display:grid;place-items:center;background:var(--surface-2);border:1px solid var(--border);color:var(--text-2);z-index:1}
.tl-dot svg{width:13px;height:13px}
.tl-body{padding-top:3px}
.tl-body .txt{font-size:13px}
.tl-body .txt b{font-weight:600}
.tl-body .time{font-size:11px;color:var(--text-muted);margin-top:2px}
.board{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;align-items:start}
.col{background:var(--bg-subtle);border:1px solid var(--border);border-radius:var(--r-lg);padding:12px;min-height:200px;transition:background .2s,border-color .2s}
.col-head{display:flex;align-items:center;gap:8px;padding:4px 6px 12px}
.col-dot{width:8px;height:8px;border-radius:50%}
.col-title{font-weight:600;font-size:13px}
.col-count{margin-left:auto;font-size:12px;color:var(--text-muted);background:var(--bg-muted);border-radius:999px;padding:1px 8px}
.col.drag-over{border-color:var(--accent);background:var(--accent-soft)}
.card-task{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-md);padding:12px;margin-bottom:10px;cursor:grab;box-shadow:var(--shadow-sm);transition:transform .2s var(--spring),box-shadow .2s var(--ease),border-color .2s}
.card-task:hover{transform:translateY(-2px);box-shadow:var(--shadow-lg);border-color:var(--border-strong)}
.card-task.dragging{opacity:.45;cursor:grabbing}
.card-task .tt{font-size:13px;font-weight:500;line-height:1.4}
.card-task .meta{display:flex;align-items:center;gap:8px;margin-top:10px;flex-wrap:wrap}
.pill{font-size:11px;font-weight:600;padding:2px 8px;border-radius:999px;display:inline-flex;align-items:center;gap:4px}
.pill.high{color:var(--prio-high);background:var(--prio-high-bg)}
.pill.medium{color:var(--prio-med);background:var(--prio-med-bg)}
.pill.low{color:var(--prio-low);background:var(--prio-low-bg)}
.pill .pdot{width:6px;height:6px;border-radius:50%;background:currentColor}
.due{font-size:11px;color:var(--text-muted);display:inline-flex;align-items:center;gap:4px}
.due.over{color:var(--prio-high)}
.due svg{width:11px;height:11px}
.assignee{margin-left:auto;display:inline-flex;align-items:center;gap:6px}
.mini-avatar{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;color:#fff;font-size:10px;font-weight:600}
.empty-hint{font-size:12px;color:var(--text-muted);text-align:center;padding:18px 0;border:1px dashed var(--border);border-radius:var(--r-md)}
.team-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:16px}
.member{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);padding:18px;box-shadow:var(--shadow-sm);transition:transform .22s var(--spring),box-shadow .22s var(--ease)}
.member:hover{transform:translateY(-3px);box-shadow:var(--shadow-lg)}
.member .m-top{display:flex;align-items:center;gap:12px}
.member .m-name{font-weight:600;font-size:14px}
.member .m-role{font-size:12px;color:var(--text-muted)}
.member .m-mail{font-size:12px;color:var(--text-2);margin-top:12px;display:flex;align-items:center;gap:6px}
.member .m-foot{display:flex;align-items:center;gap:8px;margin-top:14px;padding-top:12px;border-top:1px solid var(--border);font-size:12px;color:var(--text-2)}
.status-dot{width:8px;height:8px;border-radius:50%}
.status-dot.on{background:var(--prio-low)}
.status-dot.off{background:var(--text-muted)}
.form-grid{display:grid;gap:18px;max-width:560px}
.form-grid-2{max-width:760px;grid-template-columns:1fr 1fr}
.form-grid-2 .span-2{grid-column:1 / -1}
@media (max-width:720px){.form-grid-2{grid-template-columns:1fr}}
.field{display:flex;flex-direction:column;gap:6px}
.field label{font-size:13px;font-weight:500}
.field .hint{font-size:12px;color:var(--text-muted)}
.info-lead{font-size:13px;color:var(--text-muted);margin:-4px 0 16px;line-height:1.5}
.proj-switch-wrap{display:inline-flex;align-items:center;gap:6px}
.proj-switch-wrap .proj-switch{min-width:160px}
.proj-switch-wrap .btn{padding:8px 10px}
.input,.select,textarea{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-md);padding:9px 12px;font-size:13px;color:var(--text);font-family:inherit;width:100%;transition:border-color .15s,box-shadow .15s}
.input:focus,.select:focus,textarea:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-ring)}
.switch-row{display:flex;align-items:center;justify-content:space-between;padding:14px 0;border-bottom:1px solid var(--border)}
.switch-row:last-child{border-bottom:none}
.switch-row .st-t{font-size:14px;font-weight:500}
.switch-row .st-d{font-size:12px;color:var(--text-muted);margin-top:2px}
.switch{width:42px;height:24px;border-radius:999px;background:var(--bg-muted);border:1px solid var(--border);position:relative;cursor:pointer;flex:none;transition:background .2s var(--ease)}
.switch .kn{position:absolute;top:2px;left:2px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:var(--shadow-sm);transition:transform .2s var(--spring)}
.switch.on{background:var(--accent);border-color:var(--accent)}
.switch.on .kn{transform:translateX(18px)}
.danger-zone{border:1px solid color-mix(in srgb,var(--prio-high) 35%,var(--border));border-radius:var(--r-lg);padding:18px;background:color-mix(in srgb,var(--prio-high) 5%,var(--surface))}
.danger-zone .dz-t{font-weight:600;color:var(--prio-high);display:flex;align-items:center;gap:8px}
.danger-zone p{font-size:13px;color:var(--text-2);margin:8px 0 14px}
.overlay{position:fixed;inset:0;background:rgba(9,9,11,.5);backdrop-filter:blur(2px);display:none;align-items:center;justify-content:center;z-index:100;padding:20px}
.overlay.show{display:flex;animation:fade .2s var(--ease)}
.modal{width:100%;max-width:460px;background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);box-shadow:var(--shadow-lg);padding:22px}
.modal h3{margin:0 0 4px;font-size:17px;font-weight:600}
.modal .sub{font-size:13px;color:var(--text-muted);margin-bottom:18px}
.modal .actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}
.toast-wrap{position:fixed;right:20px;bottom:20px;display:flex;flex-direction:column;gap:10px;z-index:200}
.toast{display:flex;align-items:center;gap:10px;min-width:240px;max-width:340px;background:var(--surface);border:1px solid var(--border);border-radius:var(--r-md);padding:12px 14px;box-shadow:var(--shadow-lg);font-size:13px;transform:translateX(120%);opacity:0;transition:transform .35s var(--spring),opacity .25s}
.toast.show{transform:translateX(0);opacity:1}
.toast .ti{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;flex:none}
.toast .ti svg{width:13px;height:13px}
.toast.success .ti{background:var(--prio-low-bg);color:var(--prio-low)}
.toast.info .ti{background:var(--accent-soft);color:var(--accent)}
.toast.warn .ti{background:var(--prio-med-bg);color:var(--prio-med)}
.scrim{display:none}
.conn{font-size:11px;color:var(--text-muted);display:inline-flex;align-items:center;gap:5px}
.conn .dot{width:7px;height:7px;border-radius:50%;background:var(--prio-low)}
.conn.off .dot{background:var(--prio-high)}
/* 团队：成员删除 + 添加磁贴 */
.member{position:relative}
.member .m-del{position:absolute;top:12px;right:12px;width:26px;height:26px;border-radius:var(--r-sm);border:1px solid var(--border);background:var(--surface);color:var(--text-muted);display:grid;place-items:center;cursor:pointer;opacity:0;transition:opacity .15s,color .15s,border-color .15s}
.member:hover .m-del{opacity:1}
.member .m-del:hover{color:var(--prio-high);border-color:color-mix(in srgb,var(--prio-high) 40%,var(--border))}
.member .m-del svg{width:13px;height:13px}
/* 绩效概览表 */
.kpi-table{width:100%;border-collapse:collapse;font-size:13px}
.kpi-table th,.kpi-table td{padding:10px 12px;text-align:left;border-bottom:1px solid var(--border);white-space:nowrap}
.kpi-table th{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--text-muted);font-weight:600}
.kpi-table tr:last-child td{border-bottom:none}
.kpi-table td.num{font-family:'JetBrains Mono',monospace;font-variant-numeric:tabular-nums;text-align:right}
.kpi-table .lead{font-weight:600}
.kpi-bar{height:6px;border-radius:999px;background:var(--bg-muted);overflow:hidden;margin-top:0;width:130px;display:inline-block;vertical-align:middle}
.kpi-bar i{display:block;height:100%;background:linear-gradient(90deg,var(--accent),#818cf8);width:0;transition:width .6s var(--ease)}
.member .m-kpi{display:flex;gap:14px;margin-top:12px;padding-top:12px;border-top:1px solid var(--border);font-size:12px;color:var(--text-2);flex-wrap:wrap}
.member .m-kpi b{font-family:'JetBrains Mono',monospace;color:var(--text);font-weight:600}
.member .m-login{margin-top:10px;font-size:12px;font-weight:600}
.member .m-login.ok{color:var(--prio-low)}
.member .m-login.warn{color:var(--prio-med)}
.member .m-foot .m-cred{margin-left:8px;padding:4px 8px;font-size:11px;height:auto;line-height:1.2}
.card-task .meta .due.clock{color:var(--accent)}
.add-tile{border:1px dashed var(--border);border-radius:var(--r-lg);display:grid;place-items:center;min-height:150px;cursor:pointer;color:var(--text-muted);font-weight:500;transition:border-color .15s,color .15s,background .15s;text-align:center;padding:12px}
.add-tile:hover{border-color:var(--accent);color:var(--accent);background:var(--accent-soft)}
.add-tile .plus{width:36px;height:36px;border-radius:50%;background:var(--bg-muted);display:grid;place-items:center;margin-bottom:8px}
.add-tile .plus svg{width:18px;height:18px}
/* 看板：卡片操作（编辑 / 删除）*/
.card-task{position:relative}
.card-task .ta{position:absolute;top:8px;right:8px;display:flex;gap:4px;opacity:0;transition:opacity .15s}
.card-task:hover .ta{opacity:1}
.card-task .ta button{width:24px;height:24px;border-radius:var(--r-sm);border:1px solid var(--border);background:var(--surface);color:var(--text-2);display:grid;place-items:center;cursor:pointer;transition:color .15s,border-color .15s}
.card-task .ta button:hover{color:var(--accent);border-color:var(--accent)}
.card-task .ta button.del:hover{color:var(--prio-high);border-color:color-mix(in srgb,var(--prio-high) 40%,var(--border))}
.card-task .ta svg{width:12px;height:12px}
/* 绩效概览：时间窗分段控件 + 导出 */
.kpi-scroll{overflow-x:auto}
.kpi-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:16px}
.seg{display:inline-flex;background:var(--bg-muted);border:1px solid var(--border);border-radius:var(--r-md);padding:2px}
.seg-btn{border:none;background:none;padding:6px 14px;border-radius:var(--r-sm);font-size:13px;font-weight:500;color:var(--text-2);cursor:pointer;transition:background .15s,color .15s}
.seg-btn:hover{color:var(--text)}
.seg-btn.active{background:var(--surface);color:var(--accent);box-shadow:var(--shadow-sm)}
.kpi-controls .btn{padding:6px 12px;font-size:13px}
.kpi-win-note{font-size:12px;color:var(--text-muted);margin-left:auto}
/* 看板：卡片当前状态停留提示（hover）*/
.card-task .dwell-tip{position:absolute;left:12px;top:38px;background:var(--text);color:var(--bg);font-size:11px;padding:5px 9px;border-radius:6px;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .15s;z-index:30;box-shadow:var(--shadow-lg)}
.card-task:hover .dwell-tip{opacity:1}
/* 主管视图：资源负载 / 风险预警 / 燃尽图 / 看板筛选 / 周报 */
.mgr-grid{display:grid;grid-template-columns:1.3fr 1fr;gap:20px;margin-top:26px}
.mgr-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.wl-row{display:flex;align-items:center;gap:10px;padding:9px 0;border-bottom:1px solid var(--border)}
.wl-row:last-child{border-bottom:none}
.wl-name{width:60px;font-weight:500;font-size:13px;flex:none;display:flex;align-items:center;gap:6px}
.wl-bar{flex:1;height:8px;border-radius:999px;background:var(--bg-muted);overflow:hidden}
.wl-bar i{display:block;height:100%;border-radius:999px;transition:width .6s var(--ease)}
.wl-meta{width:128px;text-align:right;font-size:12px;color:var(--text-2);flex:none}
.wl-meta.over{color:var(--prio-high);font-weight:600}
.wl-load{font-size:11px;color:var(--text-muted);margin-top:2px}
.risk-list{list-style:none;margin:0;padding:0;max-height:300px;overflow:auto}
.risk-item{display:flex;gap:10px;align-items:flex-start;padding:10px 0;border-bottom:1px solid var(--border)}
.risk-item:last-child{border-bottom:none}
.risk-badge{font-size:10px;font-weight:700;padding:2px 7px;border-radius:999px;flex:none;margin-top:1px;white-space:nowrap}
.risk-badge.over{background:var(--prio-high-bg);color:var(--prio-high)}
.risk-badge.soon{background:var(--prio-med-bg);color:var(--prio-med)}
.risk-badge.stuck{background:var(--accent-soft);color:var(--accent)}
.risk-body{flex:1;min-width:0}
.risk-body .rt{font-size:13px;font-weight:500;line-height:1.35}
.risk-body .rm{font-size:11px;color:var(--text-muted);margin-top:3px}
.risk-empty{font-size:12px;color:var(--text-muted);padding:16px 0;text-align:center}
.bd-wrap{margin-top:6px}
.bd-wrap svg{width:100%;height:auto;display:block}
.bd-legend{display:flex;gap:18px;font-size:11px;color:var(--text-muted);margin-top:10px;flex-wrap:wrap}
.bd-legend i{display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:5px;vertical-align:-1px}
.toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:16px}
.toolbar .search{flex:1;min-width:160px;max-width:300px;background:var(--surface);border:1px solid var(--border);border-radius:var(--r-md);padding:8px 12px;font-size:13px;color:var(--text);font-family:inherit}
.toolbar .search:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-ring)}
.toolbar select{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-md);padding:8px 10px;font-size:13px;color:var(--text);font-family:inherit;max-width:160px}
.toolbar .clear{font-size:12px;color:var(--text-muted);cursor:pointer;border:none;background:none;padding:4px 6px}
.toolbar .clear:hover{color:var(--accent)}
.toolbar .count{margin-left:auto;font-size:12px;color:var(--text-muted);white-space:nowrap}
.wk-line{margin:10px 0;line-height:1.7}
.wk-line h4{margin:14px 0 6px;font-size:13px;color:var(--text-2)}
.wk-line .li{display:flex;gap:8px;padding:4px 0;font-size:13px}
.wk-line .li .d{color:var(--text-muted);flex:none;width:14px}
.dep-list{max-height:140px;overflow:auto;border:1px solid var(--border);border-radius:var(--r-md);padding:6px 10px}
.dep-list label{display:flex;align-items:center;gap:8px;padding:4px 0;font-size:13px;cursor:pointer}
.dep-list input{accent-color:var(--accent)}
.comment-list{max-height:180px;overflow:auto;display:flex;flex-direction:column;gap:8px}
.comment{border:1px solid var(--border);border-radius:var(--r-md);padding:8px 10px;background:var(--surface-2)}
.comment .ch{display:flex;justify-content:space-between;font-size:11px;color:var(--text-muted);margin-bottom:3px}
.comment .cb{font-size:13px;line-height:1.45}
.card-task .badges{display:inline-flex;gap:6px;margin-left:6px;color:var(--text-muted)}
.card-task .badges span{display:inline-flex;align-items:center;gap:3px}
.card-task .badges svg{width:11px;height:11px}
.ms-row{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--border)}
.ms-row:last-child{border-bottom:none}
.ms-bar{flex:1;height:6px;border-radius:999px;background:var(--bg-muted);overflow:hidden}
.ms-bar i{display:block;height:100%;background:linear-gradient(90deg,var(--accent),#818cf8);border-radius:999px;transition:width .6s var(--ease)}
.ms-meta{width:120px;text-align:right;font-size:12px;color:var(--text-2);flex:none}
.ms-actions{display:flex;gap:6px;flex:none}
.ms-actions button{width:26px;height:26px;border-radius:var(--r-sm);border:1px solid var(--border);background:var(--surface);color:var(--text-2);cursor:pointer;display:grid;place-items:center}
.ms-actions button:hover{color:var(--accent)}
.ms-actions button.del:hover{color:var(--prio-high)}
@media(max-width:1024px){.stats-grid{grid-template-columns:repeat(2,1fr)}.grid-2{grid-template-columns:1fr}.mgr-grid{grid-template-columns:1fr}}
@media(max-width:900px){.board{grid-template-columns:repeat(2,1fr)}}
@media(max-width:768px){
  .app{grid-template-columns:1fr}
  .sidebar{position:fixed;left:0;top:0;z-index:90;width:var(--sidebar-w);transform:translateX(-100%);box-shadow:var(--shadow-lg)}
  body.drawer-open .sidebar{transform:translateX(0)}
  .scrim{display:block;position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:80;opacity:0;pointer-events:none;transition:opacity .25s}
  body.drawer-open .scrim{opacity:1;pointer-events:auto}
  .hamburger{display:inline-flex}
  .board{grid-template-columns:1fr}
  .content{padding:18px}
  .topbar{padding:14px 18px}
}
@media(max-width:480px){.stats-grid{grid-template-columns:1fr}}
/* ===================== 编码分享区 ===================== */
.snip-toolbar{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:18px}
.snip-toolbar .search{flex:1;min-width:200px;position:relative}
.snip-toolbar .search input{width:100%;padding-left:36px}
.snip-toolbar .search svg{position:absolute;left:11px;top:50%;transform:translateY(-50%);width:16px;height:16px;color:var(--text-muted)}
.snip-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:16px}
.snip-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);padding:16px;display:flex;flex-direction:column;gap:10px;transition:border-color .15s var(--ease),box-shadow .15s var(--ease)}
.snip-card:hover{border-color:var(--accent);box-shadow:0 6px 20px rgba(15,23,42,.10)}
.snip-head{display:flex;align-items:flex-start;gap:10px}
.snip-head .t{font-weight:600;font-size:15px;line-height:1.35;flex:1;min-width:0}
.snip-lang{font-size:11px;font-weight:600;padding:2px 8px;border-radius:999px;background:var(--accent-soft);color:var(--accent);white-space:nowrap;flex:none}
.snip-meta{font-size:12px;color:var(--text-muted);display:flex;align-items:center;gap:8px}
.snip-meta .who{display:flex;align-items:center;gap:6px}
.snip-meta .dot-av{width:18px;height:18px;border-radius:50%;display:grid;place-items:center;color:#fff;font-size:10px;font-weight:600}
.snip-desc{font-size:13px;color:var(--text-2);line-height:1.5}
.snip-code{position:relative;background:var(--code-bg, #0f172a);border-radius:var(--r-md);overflow:hidden}
.snip-code pre{margin:0;padding:14px 14px;max-height:240px;overflow:auto;font-family:var(--mono);font-size:12.5px;line-height:1.55;color:#e2e8f0;white-space:pre;tab-size:2}
.snip-copy{position:absolute;top:8px;right:8px;opacity:0;transition:opacity .15s var(--ease)}
.snip-code:hover .snip-copy{opacity:1}
.snip-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:2px}
.snip-actions .mini{padding:5px 10px;font-size:12px}
.snip-empty{color:var(--text-muted);font-size:14px;padding:40px 0;text-align:center;grid-column:1/-1}
.snip-form{display:flex;flex-direction:column;gap:12px}
.snip-form .row2{display:grid;grid-template-columns:1fr 160px;gap:12px}
@media (max-width:640px){ .snip-form .row2{grid-template-columns:1fr} }
textarea.input.mono{font-family:var(--mono);font-size:13px;line-height:1.5;resize:vertical;min-height:140px}
