/* 评估工作台 - 主样式
 * 由 split_frontend_v20.py 从 index.html 自动拆分，请勿直接编辑本文件
 * 改样式请改本文件后重跑拆分脚本（或直接在源 index.html 里改）
 */
* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
  :root {
    --bg:#0a0f1c; --bg2:#0e1526; --card:rgba(148,163,184,.07); --card-solid:#131c31;
    --border:rgba(148,163,184,.16); --border-soft:rgba(148,163,184,.09);
    --text:#e6edf7; --muted:#8595ae;
    --primary:#4f8cff; --cyan:#22d3ee; --grad:linear-gradient(135deg,#4f8cff,#22d3ee);
    --red:#f4604f; --green:#34d399; --orange:#fbbf24;
    --radius:14px; --shadow:0 4px 24px rgba(2,8,23,.45); --glow:0 0 24px rgba(79,140,255,.18);
    --input-bg:rgba(10,16,30,.7); --topbar-bg:rgba(10,15,28,.78); --tabs-bg:rgba(10,16,30,.6);
    --mask-bg:rgba(3,7,17,.68); --opt-bg:rgba(10,16,30,.5);
    --accent-text:#8fb8ff; --accent-soft:rgba(79,140,255,.13); --accent-border:rgba(79,140,255,.3);
  }
  html { color-scheme:dark; }
  html[data-theme="light"] {
    color-scheme:light;
    --bg:#f3f5fa; --bg2:#e9edf6; --card:rgba(255,255,255,.9); --card-solid:#ffffff;
    --border:rgba(15,23,42,.13); --border-soft:rgba(15,23,42,.07);
    --text:#1e293b; --muted:#64748b;
    --shadow:0 4px 18px rgba(15,23,42,.07); --glow:0 0 18px rgba(79,140,255,.14);
    --input-bg:#ffffff; --topbar-bg:rgba(255,255,255,.85); --tabs-bg:rgba(255,255,255,.8);
    --mask-bg:rgba(15,23,42,.45); --opt-bg:#ffffff;
    --accent-text:#1d4ed8; --accent-soft:rgba(79,140,255,.1); --accent-border:rgba(79,140,255,.35);
  }
  body {
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"PingFang SC","Microsoft YaHei",sans-serif;
    color:var(--text); font-size:15px; line-height:1.55; min-height:100vh;
    background:
      radial-gradient(900px 500px at 85% -10%, rgba(34,211,238,.09), transparent 60%),
      radial-gradient(1000px 620px at -10% 0%, rgba(79,140,255,.13), transparent 55%),
      linear-gradient(180deg, var(--bg2), var(--bg) 420px);
    background-attachment:fixed;
    transition:color .25s ease;
  }
  html[data-theme="light"] body {
    background:
      radial-gradient(900px 500px at 85% -10%, rgba(34,211,238,.12), transparent 60%),
      radial-gradient(1000px 620px at -10% 0%, rgba(79,140,255,.12), transparent 55%),
      linear-gradient(180deg, var(--bg2), var(--bg) 420px);
  }
  ::selection { background:rgba(79,140,255,.35); }
  button { font-family:inherit; cursor:pointer; border:none; border-radius:10px; min-height:44px; font-size:15px; transition:all .18s ease; }
  input,select,textarea {
    font-family:inherit; font-size:16px; padding:11px 13px; width:100%;
    background:var(--input-bg); border:1px solid var(--border); border-radius:10px; color:var(--text);
    transition:border-color .18s ease, box-shadow .18s ease;
  }
  input::placeholder { color:var(--muted); opacity:.7; }
  input:focus,select:focus,textarea:focus { outline:none; border-color:var(--primary); box-shadow:0 0 0 3px rgba(79,140,255,.18); }
  label { display:block; font-size:13px; color:var(--muted); margin:12px 0 5px; letter-spacing:.02em; }

  @keyframes fadeUp { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:none; } }
  @keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

  /* ===== 登录页 ===== */
  .login-mask { position:fixed; inset:0; z-index:300; display:none; align-items:center; justify-content:center; padding:20px;
    background:
      radial-gradient(700px 420px at 80% 10%, rgba(34,211,238,.14), transparent 60%),
      radial-gradient(800px 520px at 10% 90%, rgba(79,140,255,.16), transparent 55%),
      linear-gradient(160deg,#0b1224,#070b16); }
  html[data-theme="light"] .login-mask { background:radial-gradient(700px 420px at 80% 10%, rgba(34,211,238,.15), transparent 60%),radial-gradient(800px 520px at 10% 90%, rgba(79,140,255,.15), transparent 55%),linear-gradient(160deg,#eef2fa,#e2e9f5); }
  .login-mask.show { display:flex; animation:fadeIn .25s ease; }
  /* P-v2.6：登录态未确定或未登录时不暴露工作台界面（消除首屏闪烁） */
  html[data-auth="pending"] .app-shell, html[data-auth="out"] .app-shell { visibility:hidden; }
  html[data-auth="out"] .login-mask { display:flex; }
  .login-card { position:relative; overflow:hidden; background:var(--card-solid); border:1px solid var(--border); border-radius:20px; width:100%; max-width:400px; padding:40px 32px 30px; box-shadow:0 24px 70px rgba(0,0,0,.35), var(--glow); animation:fadeUp .35s ease; }
  .login-card::before { content:''; position:absolute; top:0; left:0; right:0; height:3px; background:var(--grad); }
  html[data-theme="light"] .login-card { box-shadow:0 24px 60px rgba(15,23,42,.14); }
  .login-card .logo { text-align:center; margin-bottom:12px; }
  .login-card h2 { text-align:center; font-size:18px; font-weight:700; background:var(--grad); -webkit-background-clip:text; background-clip:text; color:transparent; }
  .login-card .sub { text-align:center; font-size:12px; color:var(--muted); margin:6px 0 20px; letter-spacing:.14em; }
  .login-card input { padding:12px 14px; font-size:14px; }
  .login-card button.login-btn { width:100%; background:var(--grad); color:#06121f; font-weight:700; padding:13px; margin-top:22px; font-size:16px; letter-spacing:.2em; box-shadow:0 8px 24px rgba(79,140,255,.35); transition:transform .15s ease, box-shadow .15s ease, filter .15s ease; }
  .login-card button.login-btn:hover { filter:brightness(1.08); transform:translateY(-1px); box-shadow:0 12px 30px rgba(79,140,255,.45); }
  .login-card button.login-btn:active { transform:translateY(0); }
  .login-err { color:var(--red); font-size:13px; text-align:center; margin-top:12px; min-height:18px; }

  /* ===== 顶栏 ===== */
  .topbar { position:sticky; top:0; z-index:60; background:var(--topbar-bg); backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px); border-bottom:1px solid var(--border-soft); }
  .topbar-inner { padding:0 16px; display:flex; align-items:center; gap:10px; height:56px; }
  .brand { display:flex; align-items:center; gap:10px; flex:0 0 auto; min-width:0; cursor:pointer; }
  .brand:hover { opacity:.9; }
  .brand .logo-mark { width:36px; height:36px; border-radius:10px; background:var(--grad); display:flex; align-items:center; justify-content:center; flex:0 0 auto; box-shadow:0 4px 16px rgba(79,140,255,.4); }
  .brand .b-name { font-size:15px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .icon-btn { width:44px; height:44px; border-radius:12px; background:var(--card); border:1px solid var(--border); display:flex; align-items:center; justify-content:center; color:var(--text); flex:0 0 auto; }
  .icon-btn:hover { border-color:var(--primary); box-shadow:var(--glow); }
  .user-pill { display:flex; align-items:center; gap:8px; background:var(--card); border:1px solid var(--border); border-radius:24px; padding:5px 13px 5px 5px; color:var(--text); font-size:13px; min-height:44px; }
  .user-pill:hover { border-color:var(--primary); box-shadow:var(--glow); }
  .user-pill .avatar { width:32px; height:32px; border-radius:50%; background:var(--grad); color:#06121f; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:14px; }
  .user-pill .p-meta { line-height:1.25; text-align:left; }
  .user-pill .p-role { font-size:11px; color:var(--muted); }
  .role-badge { font-size:11px; padding:1px 8px; border-radius:10px; font-weight:700; }
  .role-badge.admin { background:linear-gradient(135deg,#fbbf24,#f59e0b); color:#3a2a00; }
  .role-badge.staff { background:var(--accent-soft); color:var(--accent-text); border:1px solid var(--accent-border); }

  .wrap { padding:0; }

  .backup-tip { background:rgba(251,191,36,.08); border:1px solid rgba(251,191,36,.3); color:#d99e18; border-radius:var(--radius); padding:11px 15px; margin:14px 0 0; font-size:13px; display:none; align-items:center; gap:8px; animation:fadeUp .3s ease; }
  html[data-theme="dark"] .backup-tip { color:#f5cf6b; }

  /* ===== 今天要处理（右侧独立面板） ===== */
  .asset-layout { display:flex; gap:14px; align-items:flex-start; }
  .asset-main { flex:1; min-width:0; }
  .today-panel { width:300px; flex-shrink:0; background:var(--card); border:1px solid var(--border-soft); backdrop-filter:blur(10px); border-radius:var(--radius); box-shadow:var(--shadow); overflow:hidden; animation:fadeUp .3s ease; position:sticky; top:71px; max-height:calc(100vh - 85px); display:flex; flex-direction:column; }
  .today-head { padding:13px 17px; font-weight:700; font-size:14px; display:flex; align-items:center; gap:9px; border-bottom:1px solid var(--border-soft); flex-shrink:0; }
  .today-head .dot { width:8px; height:8px; border-radius:50%; background:var(--red); box-shadow:0 0 10px var(--red); animation:pulse 1.8s infinite; }
  .today-head .today-count { margin-left:auto; font-size:12px; font-weight:600; color:#fff; background:var(--red); border-radius:10px; padding:1px 8px; min-width:22px; text-align:center; }
  .today-head .today-toggle { min-height:28px; width:28px; padding:0; font-size:16px; line-height:1; background:transparent; color:var(--muted); border:1px solid var(--border-soft); border-radius:8px; margin-left:4px; }
  .today-head .today-toggle:hover { color:var(--text); border-color:var(--accent-border); background:var(--accent-soft); }
  @keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:.4; } }
  .today-list { padding:4px 14px 10px; overflow-y:auto; flex:1; transition:all .25s ease; max-height:999px; opacity:1; }
  .today-panel.collapsed .today-list { max-height:0; opacity:0; padding:0 14px; }
  .today-panel.collapsed { max-height:48px; overflow:hidden; }
  .today-item { display:flex; flex-direction:column; gap:6px; padding:11px 0; border-bottom:1px dashed var(--border-soft); }
  .today-item:last-child { border-bottom:none; }
  .today-item .info { cursor:pointer; }
  .today-item .info:hover .name { color:var(--primary); }
  .today-item .name { font-weight:600; font-size:14px; line-height:1.4; }
  .today-item .meta { font-size:12px; color:var(--muted); margin-top:3px; line-height:1.4; }
  .today-item .btn-sm { width:100%; text-align:center; }
  .tag-overdue { color:var(--red); font-weight:600; font-size:11px; background:rgba(244,96,79,.12); border:1px solid rgba(244,96,79,.3); padding:2px 8px; border-radius:10px; margin-left:4px; display:inline-block; margin-top:3px; }
  html[data-theme="dark"] .tag-overdue { color:#ff8a7a; }
  .tag-normal { color:#b45309; font-size:11px; background:rgba(251,191,36,.1); border:1px solid rgba(251,191,36,.28); padding:2px 8px; border-radius:10px; margin-left:4px; display:inline-block; margin-top:3px; }
  html[data-theme="dark"] .tag-normal { color:#fcd34d; }
  .today-empty { padding:24px 14px; text-align:center; color:var(--muted); font-size:13px; }
  .btn-sm { padding:8px 15px; min-height:38px; font-size:13px; background:var(--primary); color:#fff; white-space:nowrap; font-weight:600; }
  .btn-sm:hover { filter:brightness(1.12); }
  .btn-sm.green { background:linear-gradient(135deg,#10b981,#34d399); color:#04150e; }

  /* ===== 统计摘要 + 可折叠卡片 ===== */
  .stats-summary { display:flex; align-items:center; justify-content:space-between; gap:10px; background:var(--card); border:1px solid var(--border-soft); border-radius:var(--radius); padding:10px 14px; margin:14px 0; cursor:pointer; transition:all .18s ease; }
  .stats-summary:hover { border-color:var(--accent-border); background:var(--accent-soft); }
  .stats-summary .stats-sum-left { display:flex; align-items:center; gap:14px; flex-wrap:wrap; font-size:13px; color:var(--muted); }
  .stats-summary .stats-sum-left b { color:var(--text); font-weight:700; margin-left:2px; }
  .stats-summary .stats-toggle { min-height:32px; padding:6px 12px; font-size:12px; background:var(--accent-soft); color:var(--accent-text); border:1px solid var(--accent-border); border-radius:8px; font-weight:600; }
  .stats-summary .stats-toggle:hover { background:var(--primary); color:#06121f; }
  .stats-row { display:grid; grid-template-columns:repeat(auto-fit,minmax(130px,1fr)); gap:12px; margin:14px 0; overflow:hidden; transition:all .25s ease; max-height:500px; opacity:1; }
  .stats-row.collapsed { max-height:0; opacity:0; margin:0; }
  .stat-card { position:relative; background:var(--card); border:1px solid var(--border-soft); border-radius:var(--radius); box-shadow:var(--shadow); padding:16px 12px; text-align:center; overflow:hidden; animation:fadeUp .35s ease; transition:transform .18s ease, border-color .18s ease; }
  .stat-card:hover { transform:translateY(-2px); border-color:var(--accent-border); }
  .stat-card::before { content:''; position:absolute; top:0; left:20%; right:20%; height:2px; background:var(--grad); border-radius:2px; opacity:.8; }
  .stat-card .num { font-size:23px; font-weight:800; background:var(--grad); -webkit-background-clip:text; background-clip:text; color:transparent; }
  .stat-card .num.orange { background:linear-gradient(135deg,#fbbf24,#f97316); -webkit-background-clip:text; background-clip:text; }
  .stat-card .num.green { background:linear-gradient(135deg,#34d399,#22d3ee); -webkit-background-clip:text; background-clip:text; }
  .stat-card .num.red { background:linear-gradient(135deg,#f4604f,#fb7185); -webkit-background-clip:text; background-clip:text; }
  .stat-card .num.gray { background:linear-gradient(135deg,#94a3b8,#64748b); -webkit-background-clip:text; background-clip:text; }
  .stat-card .lbl { font-size:12px; color:var(--muted); margin-top:3px; letter-spacing:.04em; }

  /* ===== 标签页（桌面端由侧边栏替代，仅移动端显示） ===== */
  .tabs { display:none; background:var(--tabs-bg); border:1px solid var(--border-soft); border-radius:14px; padding:5px; gap:5px; margin-bottom:14px; position:sticky; top:57px; z-index:50; backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px); overflow-x:auto; }
  .tab { flex:1; text-align:center; padding:11px 8px; border-radius:10px; font-size:14px; font-weight:600; color:var(--muted); cursor:pointer; display:flex; align-items:center; justify-content:center; gap:6px; min-height:44px; background:transparent; transition:all .2s ease; white-space:nowrap; min-width:96px; }
  .tab:hover { color:var(--text); }
  .tab.active { background:var(--grad); color:#06121f; box-shadow:0 4px 18px rgba(79,140,255,.4); }
  .tab .badge { background:rgba(244,96,79,.9); color:#fff; font-size:11px; border-radius:10px; padding:1px 7px; min-width:20px; font-weight:700; }
  .tab.active .badge { background:rgba(6,18,31,.3); color:#06121f; }

  /* ===== 工具条 ===== */
  .toolbar { display:flex; gap:9px; margin-bottom:13px; flex-wrap:wrap; }
  .toolbar input { flex:1; min-width:150px; }
  .toolbar input[type="date"] { flex:0 0 auto; width:auto; min-width:140px; }
  .toolbar select { width:auto; min-width:110px; flex:0 0 auto; }
  .btn-add { background:var(--grad); color:#06121f; padding:11px 19px; font-weight:700; display:flex; align-items:center; gap:6px; white-space:nowrap; box-shadow:0 6px 20px rgba(79,140,255,.35); }
  .btn-add:hover { filter:brightness(1.1); transform:translateY(-1px); }

  /* ===== 数据表格 ===== */
  .table-wrap { background:var(--card); border:1px solid var(--border-soft); border-radius:var(--radius); box-shadow:var(--shadow); overflow:hidden; animation:fadeUp .3s ease; }
  .table-scroll { overflow-x:auto; }
  .data-table { width:100%; border-collapse:collapse; font-size:14px; min-width:640px; }
  .data-table th { text-align:left; font-size:12px; color:var(--muted); letter-spacing:.06em; font-weight:600; padding:12px 14px; border-bottom:1px solid var(--border); white-space:nowrap; background:rgba(148,163,184,.05); }
  .data-table td { padding:12px 14px; border-bottom:1px solid var(--border-soft); vertical-align:middle; }
  .data-table tbody tr { cursor:pointer; transition:background .15s ease; }
  .data-table tbody tr:hover { background:var(--accent-soft); }
  .data-table tbody tr:last-child td { border-bottom:none; }
  .data-table .t-name { font-weight:600; max-width:260px; }
  .data-table .t-no { font-weight:700; color:var(--accent-text); white-space:nowrap; }
  .st-pill { font-size:12px; padding:3px 10px; border-radius:12px; white-space:nowrap; font-weight:600; display:inline-block; }
  .st-pill.blue { background:var(--accent-soft); color:var(--accent-text); border:1px solid var(--accent-border); }
  .st-pill.green { background:rgba(52,211,153,.12); color:#0d9668; border:1px solid rgba(52,211,153,.3); }
  html[data-theme="dark"] .st-pill.green { color:#6ee7b7; }
  .st-pill.red { background:rgba(244,96,79,.12); color:var(--red); border:1px solid rgba(244,96,79,.3); }
  html[data-theme="dark"] .st-pill.red { color:#ff8a7a; }
  .st-pill.gray { background:rgba(148,163,184,.14); color:var(--muted); border:1px solid var(--border); }
  .st-pill.purple { background:rgba(139,92,246,.12); color:#7c3aed; border:1px solid rgba(139,92,246,.3); }
  html[data-theme="dark"] .st-pill.purple { color:#c4b5fd; }
  .st-pill.orange { background:rgba(251,191,36,.1); color:#b45309; border:1px solid rgba(251,191,36,.3); }
  html[data-theme="dark"] .st-pill.orange { color:#fcd34d; }
  .mini-chips { display:flex; gap:4px; flex-wrap:wrap; }
  .mini-chip { font-size:11px; background:rgba(34,211,238,.1); color:#0e7490; border:1px solid rgba(34,211,238,.28); border-radius:10px; padding:1px 8px; font-weight:600; white-space:nowrap; }
  html[data-theme="dark"] .mini-chip { color:#7fe7f7; }
  /* ===== 优先级徽章 / 完工时间提示条 ===== */
  .prio-chip { display:inline-block; font-size:11px; font-weight:800; border-radius:4px; padding:1px 7px; margin-right:6px; vertical-align:1px; letter-spacing:1px; }
  .prio-chip.high { background:rgba(244,96,79,.14); color:var(--red); border:1px solid rgba(244,96,79,.45); }
  html[data-theme="dark"] .prio-chip.high { color:#ff8a7a; }
  .prio-chip.mid { background:rgba(251,191,36,.12); color:#b45309; border:1px solid rgba(251,191,36,.42); }
  html[data-theme="dark"] .prio-chip.mid { color:#fcd34d; }
  .prio-chip.low { background:rgba(59,130,246,.1); color:#1d4ed8; border:1px solid rgba(59,130,246,.35); }
  html[data-theme="dark"] .prio-chip.low { color:#93c5fd; }
  .due-chip { display:inline-block; font-size:11px; font-weight:700; border-radius:4px; padding:1px 8px; white-space:nowrap; }
  .due-chip.overdue { background:rgba(244,96,79,.16); color:var(--red); border:1px solid rgba(244,96,79,.5); }
  html[data-theme="dark"] .due-chip.overdue { color:#ff8a7a; }
  .due-chip.today { background:rgba(244,96,79,.16); color:var(--red); border:1px solid rgba(244,96,79,.5); }
  html[data-theme="dark"] .due-chip.today { color:#ff8a7a; }
  .due-chip.soon { background:rgba(251,191,36,.13); color:#b45309; border:1px solid rgba(251,191,36,.45); }
  html[data-theme="dark"] .due-chip.soon { color:#fcd34d; }
  .due-chip.far { background:rgba(148,163,184,.12); color:var(--muted); border:1px solid var(--border); font-weight:600; }
  /* 截止临近/超期的行：左侧色条突出（不占用列宽，不影响悬停底色） */
  tr.due-row-overdue { box-shadow: inset 4px 0 0 #f4604f; background:rgba(244,96,79,.045); }
  tr.due-row-urgent { box-shadow: inset 4px 0 0 #fbbf24; background:rgba(251,191,36,.05); }
  html[data-theme="dark"] tr.due-row-overdue { background:rgba(244,96,79,.07); }
  html[data-theme="dark"] tr.due-row-urgent { background:rgba(251,191,36,.07); }
  .empty-tip { background:var(--card); border:1px dashed var(--border); border-radius:var(--radius); padding:44px 20px; text-align:center; color:var(--muted); font-size:14px; }

  /* ===== 人员选择器 ===== */
  .assignee-picker { display:flex; gap:8px; flex-wrap:wrap; margin-top:5px; }
  .assignee-opt { display:flex; align-items:center; gap:7px; border:1.5px solid var(--border); border-radius:24px; padding:9px 15px; cursor:pointer; font-size:14px; min-height:44px; user-select:none; background:var(--opt-bg); color:var(--text); transition:all .18s ease; }
  .assignee-opt input { width:auto; margin:0; accent-color:var(--cyan); }
  .assignee-opt.checked { border-color:var(--cyan); background:rgba(34,211,238,.12); color:#0e7490; font-weight:700; box-shadow:0 0 14px rgba(34,211,238,.15); }
  html[data-theme="dark"] .assignee-opt.checked { color:#7fe7f7; }

  /* ===== 人员下拉多选（P-v2.1：搜索 + 标签 + 可移除） ===== */
  .pm-select { position:relative; margin-top:5px; }
  .pm-box { display:flex; align-items:center; gap:6px; flex-wrap:wrap; min-height:44px; border:1.5px solid var(--border); border-radius:10px; padding:6px 34px 6px 10px; cursor:pointer; background:var(--opt-bg); color:var(--text); transition:border-color .18s ease; }
  .pm-box:hover, .pm-select.open .pm-box { border-color:var(--cyan); }
  .pm-arrow { position:absolute; right:12px; top:13px; color:var(--muted); font-size:12px; pointer-events:none; transition:transform .18s ease; }
  .pm-select.open .pm-arrow { transform:rotate(180deg); }
  .pm-tags { display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
  .pm-ph { color:var(--muted); font-size:13px; }
  .pm-tag { display:inline-flex; align-items:center; gap:5px; background:rgba(34,211,238,.14); color:#0e7490; border:1px solid rgba(34,211,238,.4); border-radius:16px; padding:4px 8px 4px 10px; font-size:13px; font-weight:600; }
  html[data-theme="dark"] .pm-tag { color:#7fe7f7; }
  .pm-tag b { cursor:pointer; font-size:15px; line-height:1; opacity:.6; font-weight:400; }
  .pm-tag b:hover { opacity:1; color:var(--red); }
  .pm-tagno { font-size:11px; opacity:.75; font-weight:400; }
  .pm-panel { position:absolute; z-index:60; left:0; right:0; top:calc(100% + 4px); background:var(--card-solid); border:1.5px solid var(--border); border-radius:10px; box-shadow:0 14px 34px rgba(0,0,0,.22); padding:8px; }
  .pm-search { width:100%; margin:0 0 6px; }
  .pm-list { max-height:216px; overflow:auto; }
  .pm-opt { display:flex; align-items:center; gap:8px; padding:8px 10px; border-radius:8px; cursor:pointer; font-size:13px; }
  .pm-opt:hover { background:rgba(34,211,238,.10); }
  .pm-opt.on { background:rgba(34,211,238,.16); font-weight:700; }
  .pm-ck { width:14px; flex:0 0 14px; color:var(--cyan); font-weight:700; }
  .pm-nm { flex:0 0 auto; }
  .pm-no { color:var(--muted); font-size:12px; }
  .pm-pos { margin-left:auto; color:var(--muted); font-size:11px; background:var(--border-soft); border-radius:10px; padding:2px 8px; white-space:nowrap; }
  .pm-legacy { margin-left:auto; color:var(--orange); font-size:11px; white-space:nowrap; }
  .pm-empty { padding:14px; text-align:center; color:var(--muted); font-size:13px; }

  /* ===== 人员管理 ===== */
  .user-row { display:flex; align-items:center; gap:11px; padding:13px 0; border-bottom:1px dashed var(--border-soft); flex-wrap:wrap; }
  .user-row:last-child { border-bottom:none; }
  .user-row .u-avatar { width:38px; height:38px; border-radius:50%; background:var(--grad); color:#06121f; display:flex; align-items:center; justify-content:center; font-weight:800; flex:0 0 auto; }
  .user-row .u-info { flex:1; min-width:140px; }
  .user-row .u-name { font-weight:700; display:flex; align-items:center; gap:7px; }
  .user-row .u-meta { font-size:12px; color:var(--muted); margin-top:2px; }
  .user-row button { min-height:38px; padding:7px 13px; font-size:13px; }

  /* ===== 弹窗 ===== */
  .modal-mask { position:fixed; inset:0; background:var(--mask-bg); backdrop-filter:blur(5px); -webkit-backdrop-filter:blur(5px); z-index:100; display:none; align-items:flex-start; justify-content:center; overflow-y:auto; padding:22px 12px; }
  .modal-mask.show { display:flex; animation:fadeIn .18s ease; }
  .modal { background:var(--card-solid); border:1px solid var(--border); border-radius:18px; width:100%; max-width:560px; padding:22px; margin:auto 0; box-shadow:0 24px 70px rgba(0,0,0,.4); animation:fadeUp .22s ease; }
  html[data-theme="light"] .modal { box-shadow:0 24px 60px rgba(15,23,42,.2); }
  .modal h3 { font-size:17px; margin-bottom:6px; display:flex; align-items:center; gap:8px; }
  .modal .m-sub { font-size:13px; color:var(--muted); margin-bottom:4px; }
  .modal .inherited { background:var(--accent-soft); border:1px solid var(--accent-border); border-radius:10px; padding:11px 13px; font-size:13px; margin-top:10px; color:var(--accent-text); }
  .form-grid { display:grid; grid-template-columns:1fr 1fr; gap:0 13px; }
  .form-grid .full { grid-column:1/-1; }
  .no-preview { background:rgba(34,211,238,.07); border:1px dashed rgba(34,211,238,.45); border-radius:10px; padding:11px 13px; margin-top:12px; font-size:14px; color:#0e7490; font-weight:700; text-align:center; }
  html[data-theme="dark"] .no-preview { color:#7fe7f7; }
  .modal-btns { display:flex; gap:10px; margin-top:20px; }
  .modal-btns button { flex:1; padding:13px; font-weight:700; }
  .m-head-row { display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; }
  .m-head-row h3 { margin:0; }
  .btn-cancel { background:rgba(148,163,184,.12); color:var(--text); border:1px solid var(--border); }
  .btn-ok { background:var(--grad); color:#06121f; box-shadow:0 6px 18px rgba(79,140,255,.3); }
  .btn-ok:hover { filter:brightness(1.1); }
  .btn-ok.green { background:linear-gradient(135deg,#10b981,#34d399); box-shadow:0 6px 18px rgba(52,211,153,.3); }
  .btn-danger { background:linear-gradient(135deg,#f4604f,#fb7185); color:#fff; }

  /* ===== 详情面板 ===== */
  .detail-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px 16px; margin-top:12px; }
  .detail-grid .d-item { padding:9px 12px; background:rgba(148,163,184,.06); border:1px solid var(--border-soft); border-radius:10px; }
  .detail-grid .d-item.full { grid-column:1/-1; }
  .detail-grid .d-k { font-size:11px; color:var(--muted); letter-spacing:.05em; }
  .detail-grid .d-v { font-size:14px; font-weight:600; margin-top:2px; word-break:break-all; }
  .detail-grid .d-v.money { color:var(--red); }
  .abort-box { background:rgba(244,96,79,.08); border:1px solid rgba(244,96,79,.3); border-radius:10px; padding:11px 13px; margin-top:12px; }
  .abort-box .a-k { font-size:12px; color:var(--red); font-weight:700; }
  .abort-box .a-v { font-size:14px; margin-top:4px; line-height:1.6; }
  .detail-actions { display:flex; gap:9px; margin-top:18px; flex-wrap:wrap; }
  .detail-actions button { flex:1; min-width:110px; padding:12px; font-weight:700; font-size:14px; }

  /* ===== P-v2.32：详情弹窗电脑端双栏（方案F）+ 操作条吸底常驻 ===== */
  /* ★ P-v2.39c 修正吸底根因（哥哥 2026-10-13 报「按钮并没有吸底」）：
     原来滚动容器是 .modal-mask（overflow-y:auto），而 .detail-actions 是 .modal-detail 的
     **最后一个子元素** —— sticky 只能在父元素的范围内移动，它下方零空间 →
     位移恒为 0 → 完全不吸底（CSS 写着 sticky，实际一点作用都没有）。
     改成 .modal-detail 自身限高并滚动后，按钮条相对它吸底，滚动全程常驻可见。
     基类：与原来的内联 max-width:620px 等价，内容不长时（不触发限高）行为零变化。 */
  .modal-detail {
    max-width:620px;
    max-height:calc(100vh - 44px);      /* 44px = .modal-mask 上下 padding 22px*2 */
    max-height:calc(100dvh - 44px);     /* 移动端地址栏：不支持 dvh 的浏览器忽略本行 */
    overflow-y:auto;
    overscroll-behavior:contain;
    padding-bottom:0;                   /* 底部留白交给吸底条自己带（下面 padding:10px 0 22px） */
  }
  .detail-actions {
    position:sticky; bottom:0; z-index:3;
    background:var(--card-solid);
    padding:10px 0 22px; margin-top:14px;
    border-top:1px solid var(--border-soft);
  }
  @media (min-width:1040px){
    /* 仅当「报告管理」区有内容时才双栏：
       财务台账详情 d_report 为空串 -> 保持单栏，不浪费半屏。
       不支持 :has() 的老浏览器会忽略下面整段 -> 退回单栏，等于现在的行为，不会更差。 */
    .modal-detail:has(#d_report:not(:empty)){
      max-width:1060px;
      display:grid;
      grid-template-columns:minmax(0,1.08fr) minmax(0,1fr);
      column-gap:22px;
      align-items:start;
      grid-template-areas:
        "head   head"
        "status status"
        "body   report"
        "abort  report"
        "acts   acts";
    }
    .modal-detail:has(#d_report:not(:empty)) > .fd-header-bar  { grid-area:head; }
    .modal-detail:has(#d_report:not(:empty)) > #d_status       { grid-area:status; }
    .modal-detail:has(#d_report:not(:empty)) > #d_body         { grid-area:body; }
    .modal-detail:has(#d_report:not(:empty)) > #d_abort        { grid-area:abort; }
    .modal-detail:has(#d_report:not(:empty)) > #d_report       { grid-area:report; min-width:0; overflow-wrap:anywhere; }
    .modal-detail:has(#d_report:not(:empty)) > .detail-actions { grid-area:acts; }
    /* 右栏顶部不再重复画一条分隔线（左栏正文与它齐平） */
    .modal-detail:has(#d_report:not(:empty)) > #d_report > .report-mgmt { margin-top:0; border-top:none; padding-top:0; }
  }
  .btn-abort { background:rgba(251,191,36,.14); color:#b45309; border:1px solid rgba(251,191,36,.4); }
  html[data-theme="dark"] .btn-abort { color:#fcd34d; }
  .btn-abort:hover { background:rgba(251,191,36,.22); }

  /* ===== 设置抽屉 ===== */
  .drawer-mask { position:fixed; inset:0; background:var(--mask-bg); backdrop-filter:blur(4px); -webkit-backdrop-filter:blur(4px); z-index:150; opacity:0; pointer-events:none; transition:opacity .22s ease; }
  .drawer-mask.show { opacity:1; pointer-events:auto; }
  .drawer { position:fixed; top:0; right:0; bottom:0; width:380px; max-width:94vw; z-index:160; background:var(--card-solid); border-left:1px solid var(--border); box-shadow:-20px 0 60px rgba(0,0,0,.35); transform:translateX(105%); transition:transform .28s cubic-bezier(.32,.72,.35,1); display:flex; flex-direction:column; }
  .drawer.show { transform:none; }
  .drawer-head { padding:18px 20px 14px; border-bottom:1px solid var(--border-soft); display:flex; align-items:center; justify-content:space-between; }
  .drawer-head h3 { font-size:17px; display:flex; align-items:center; gap:9px; }
  .drawer-close { width:38px; height:38px; min-height:38px; border-radius:10px; background:rgba(148,163,184,.1); border:1px solid var(--border); color:var(--muted); display:flex; align-items:center; justify-content:center; }
  .drawer-body { flex:1; overflow-y:auto; padding:16px 20px calc(20px + env(safe-area-inset-bottom)); }
  .profile-card { display:flex; align-items:center; gap:13px; background:var(--accent-soft); border:1px solid var(--accent-border); border-radius:14px; padding:15px; margin-bottom:18px; }
  .profile-card .avatar { width:46px; height:46px; border-radius:50%; background:var(--grad); color:#06121f; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:18px; flex:0 0 auto; }
  .profile-card .p-name { font-weight:700; font-size:16px; display:flex; align-items:center; gap:8px; }
  .profile-card .p-user { font-size:12px; color:var(--muted); margin-top:2px; }
  .set-group { margin-bottom:18px; }
  .set-group .g-title { font-size:12px; color:var(--muted); letter-spacing:.12em; margin:0 2px 8px; }
  .set-item { width:100%; display:flex; align-items:center; gap:12px; padding:13px 14px; background:var(--card); border:1px solid var(--border-soft); border-radius:12px; color:var(--text); font-size:14px; margin-bottom:8px; min-height:50px; text-align:left; transition:all .18s ease; }
  .set-item:hover { border-color:var(--accent-border); background:var(--accent-soft); }
  .set-item .s-icon { width:34px; height:34px; border-radius:9px; background:var(--accent-soft); color:var(--accent-text); display:flex; align-items:center; justify-content:center; flex:0 0 auto; }
  .set-item .s-label { flex:1; }
  .set-item .s-desc { font-size:11px; color:var(--muted); margin-top:1px; }
  .set-item .s-arrow { color:var(--muted); flex:0 0 auto; }
  .set-item.danger .s-icon { background:rgba(244,96,79,.12); color:var(--red); }
  .set-item.danger:hover { border-color:rgba(244,96,79,.4); background:rgba(244,96,79,.06); }
  .drawer .ver { text-align:center; font-size:11px; color:var(--muted); margin-top:6px; letter-spacing:.08em; }

  /* ===== 主题切换 ===== */
  .theme-switch { display:flex; background:var(--card); border:1px solid var(--border-soft); border-radius:12px; padding:5px; gap:5px; }
  .theme-switch button { flex:1; display:flex; align-items:center; justify-content:center; gap:7px; padding:11px; border-radius:9px; background:transparent; color:var(--muted); font-weight:600; font-size:14px; }
  .theme-switch button.active { background:var(--grad); color:#06121f; box-shadow:0 4px 14px rgba(79,140,255,.35); }

  /* ===== Toast ===== */
  .toast { position:fixed; top:20px; left:50%; transform:translateX(-50%); background:var(--card-solid); border:1px solid var(--accent-border); color:var(--text); padding:11px 24px; border-radius:26px; font-size:14px; z-index:400; display:none; box-shadow:0 8px 30px rgba(0,0,0,.35), var(--glow); max-width:88vw; text-align:center; animation:fadeUp .2s ease; }

  .footer-note { text-align:center; color:var(--muted); font-size:12px; margin:28px 0 calc(10px + env(safe-area-inset-bottom)); letter-spacing:.05em; opacity:.7; }

  /* ===== 财务台账 ===== */
  .fin-subtabs { display:none; gap:0; margin-bottom:14px; border-bottom:1px solid var(--border); }
  .fin-subtab { background:none; border:none; border-bottom:2px solid transparent; padding:8px 18px; font-size:14px; color:var(--muted); cursor:pointer; transition:all .15s; font-weight:500; }
  .fin-subtab:hover { color:var(--text); }
  .fin-subtab.active { color:var(--accent-text); border-bottom-color:var(--accent); }
  .fin-subtab .badge.red { background:var(--red); color:#fff; font-size:11px; }
  .fin-summary { display:grid; grid-template-columns:repeat(6,1fr); gap:10px; margin-bottom:14px; }
  .fin-sum-card { background:var(--card); border:1px solid var(--border); border-radius:var(--radius); padding:12px 14px; text-align:center; }
  .fin-sum-card .num { font-size:18px; font-weight:700; color:var(--text); }
  .fin-sum-card .num.green { color:var(--green); }
  .fin-sum-card .num.red { color:var(--red); }
  .fin-sum-card .lbl { font-size:11px; color:var(--muted); margin-top:4px; }
  .fin-detail-tabs { display:flex; gap:0; margin-bottom:14px; border-bottom:1px solid var(--border); }
  .fin-detail-tab { background:none; border:none; border-bottom:2px solid transparent; padding:6px 14px; font-size:13px; color:var(--muted); cursor:pointer; transition:all .15s; }
  .fin-detail-tab.active { color:var(--accent-text); border-bottom-color:var(--accent); }
  .fin-detail-tab .close-x { margin-left:6px; font-size:14px; opacity:0.35; transition:opacity .15s; }
  .fin-detail-tab.active .close-x:hover { opacity:1; color:var(--red); }
  .fin-detail-sub { padding-bottom:14px; margin-bottom:16px; border-bottom:1px dashed var(--border-soft); }
  .fin-detail-sub:last-child { border-bottom:none; margin-bottom:0; padding-bottom:0; }
  .fin-detail-sub::before { content:attr(data-title); display:block; font-size:13px; font-weight:700; color:var(--text); margin-bottom:10px; padding-left:10px; border-left:3px solid var(--primary); }
  #fdt-invoice::before { content:'开票记录'; }
  #fdt-payment::before { content:'回款记录'; }
  #fdt-revenue::before { content:'收入确认'; }
  #fdt-travel::before { content:'差旅费'; }
  #fdt-rebate::before { content:'返点管理'; }
  /* 发票上传拖拽区 */
  .inv-upload-zone { border:2px dashed var(--border); border-radius:10px; padding:18px; text-align:center; cursor:pointer; transition:all .2s; background:var(--bg-secondary); margin-bottom:10px; }
  .inv-upload-zone:hover { border-color:var(--accent); background:var(--card); }
  .inv-upload-zone.dragover { border-color:var(--accent); background:var(--card); box-shadow:0 0 0 3px rgba(59,130,246,0.1); }
  .inv-upload-zone .uz-icon { margin-bottom:6px; opacity:0.5; }
  .inv-upload-zone .uz-text { font-size:13px; color:var(--muted); }
  .inv-upload-zone .uz-text b { color:var(--accent-text); }
  .inv-file-card { display:flex; align-items:center; gap:10px; background:var(--card); border:1px solid var(--border); border-radius:8px; padding:8px 12px; margin-top:8px; }
  .inv-file-card .ifc-icon { width:32px; height:32px; border-radius:6px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
  .inv-file-card .ifc-info { flex:1; min-width:0; }
  .inv-file-card .ifc-name { font-size:13px; font-weight:500; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .inv-file-card .ifc-meta { font-size:11px; color:var(--muted); margin-top:2px; }
  .inv-file-card .ifc-actions { display:flex; gap:6px; flex-shrink:0; }
  /* 删除按钮（右上角图标式） */
  .fd-header-bar { display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
  .fd-del-btn { background:none; border:none; width:28px; height:28px; border-radius:6px; display:flex; align-items:center; justify-content:center; cursor:pointer; color:var(--muted); opacity:0.35; transition:all .15s; }
  .fd-del-btn:hover { opacity:1; color:var(--red); background:rgba(239,68,68,0.08); }
  .fin-stat-section { background:var(--card); border:1px solid var(--border); border-radius:var(--radius); padding:16px; margin-bottom:14px; }
  .fin-stat-section h4 { font-size:14px; font-weight:600; margin:0 0 12px 0; color:var(--text); }
  .fin-stat-table { width:100%; border-collapse:collapse; font-size:13px; }
  .fin-stat-table th { padding:6px 10px; text-align:left; background:var(--bg-secondary); font-weight:600; color:var(--muted); border-bottom:1px solid var(--border); }
  .fin-stat-table td { padding:6px 10px; border-bottom:1px solid var(--border); }
  .fin-bar-wrap { display:inline-block; width:120px; height:16px; background:var(--bg-secondary); border-radius:3px; overflow:hidden; vertical-align:middle; }
  .fin-bar-fill { height:100%; border-radius:3px; }
  /* ---- P-v2.16 统计分析改造 ---- */
  /* 统计筛选栏：一行式紧凑布局（哥哥要求「缩小、做成一行、节省页面空间」） */
  .fin-stat-filter { margin-bottom:8px; }
  .fin-filter-row { display:flex; flex-wrap:nowrap; align-items:center; gap:6px; overflow-x:auto; padding-bottom:2px; }
  .fin-filter-label { font-size:12px; font-weight:600; color:var(--text); white-space:nowrap; }
  .fin-filter-sep { font-size:12px; color:var(--muted); }
  .fin-filter-hint { font-size:11px; color:var(--muted); line-height:1.4; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .fin-filter-row select { font-size:12px; padding:2px 6px; border:1px solid var(--border); border-radius:6px; background:var(--card); color:var(--text); max-width:118px; }
  .fin-filter-row .btn-mini { padding:2px 8px; font-size:12px; white-space:nowrap; }
  .fin-stat-table tr.fin-stat-total td { font-weight:700; background:var(--bg-secondary); }
  .fin-stat-table td.fin-num-neg { color:var(--red); font-weight:600; }
  .fin-stat-note { font-size:12px; color:var(--muted); margin-top:8px; line-height:1.7; }
  .fin-advice { border-left:3px solid var(--border); padding:8px 12px; margin-bottom:8px; background:var(--bg-secondary); border-radius:0 6px 6px 0; }
  .fin-advice-title { font-size:13px; font-weight:600; color:var(--text); margin-bottom:3px; }
  .fin-advice-text { font-size:12px; color:var(--muted); line-height:1.7; }
  .fin-advice-red { border-left-color:var(--red); }
  .fin-advice-orange { border-left-color:#f59e0b; }
  .fin-advice-green { border-left-color:#10b981; }
  .fin-advice-gray { border-left-color:var(--border); }
  .fin-overdue-card { background:var(--card); border:1px solid #f59e0b; border-left:4px solid #f59e0b; border-radius:var(--radius); padding:14px; margin-bottom:10px; }
  .fin-overdue-card .ovw-name { font-weight:600; font-size:14px; margin-bottom:6px; }
  .fin-overdue-card .ovw-info { font-size:13px; color:var(--muted); display:flex; gap:16px; flex-wrap:wrap; }
  .fin-overdue-card .ovw-info b { color:var(--text); }
  .fin-overdue-card .ovw-days { font-size:13px; font-weight:700; color:#f59e0b; }
  @media (max-width:768px){
    .fin-summary{grid-template-columns:repeat(2,1fr);}
    .fin-subtab{padding:6px 10px;font-size:13px;}
  }

  ::-webkit-scrollbar { width:8px; height:8px; }
  ::-webkit-scrollbar-thumb { background:rgba(148,163,184,.25); border-radius:4px; }
  ::-webkit-scrollbar-track { background:transparent; }

  /* ===== 移动端：表格转卡片 ===== */
  @media (max-width:768px) {
    .stats-row { grid-template-columns:repeat(2,1fr); gap:9px; }
    .stats-row .stat-card:last-child { grid-column:1/-1; }
    .form-grid { grid-template-columns:1fr; }
    .detail-grid { grid-template-columns:1fr; }
    .brand .b-name { font-size:14px; }
    .brand .b-sub { display:none; }
    .tabs { top:57px; }
    .tab { font-size:13px; padding:11px 6px; min-width:88px; }
    .user-pill .p-meta { display:none; }
    .user-pill { padding:5px; }
    .drawer { width:100%; max-width:100vw; border-left:none; }
    .data-table { min-width:0; }
    .data-table thead { display:none; }
    .data-table, .data-table tbody { display:block; }
    .data-table tbody tr { display:block; margin:10px; background:var(--card-solid); border:1px solid var(--border-soft); border-radius:12px; padding:5px 13px; box-shadow:var(--shadow); }
    .data-table td { display:flex; justify-content:space-between; align-items:center; gap:12px; border:none; border-bottom:1px dashed var(--border-soft); padding:8px 0; font-size:13px; text-align:right; }
    .data-table td:last-child { border-bottom:none; }
    .data-table td::before { content:attr(data-label); color:var(--muted); font-size:12px; flex:0 0 auto; text-align:left; }
    .data-table .t-name { max-width:none; }
    .table-wrap { background:transparent; border:none; box-shadow:none; }
    .table-scroll { overflow-x:visible; }
  }

  /* ===== 报告管理面板 ===== */
  .report-mgmt { margin-top:16px; border-top:1px solid var(--border-soft); padding-top:14px; }
  .report-mgmt .rm-title { font-size:14px; font-weight:700; display:flex; align-items:center; gap:8px; margin-bottom:10px; }
  .rm-status-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:12px; }
  .rm-status-badge { font-size:13px; padding:5px 14px; border-radius:20px; font-weight:700; white-space:nowrap; }
  .rm-status-badge.draft { background:rgba(251,191,36,.14); color:#b45309; border:1px solid rgba(251,191,36,.35); }
  html[data-theme="dark"] .rm-status-badge.draft { color:#fcd34d; }
  .rm-status-badge.review { background:rgba(79,140,255,.14); color:var(--accent-text); border:1px solid var(--accent-border); }
  .rm-status-badge.passed { background:rgba(52,211,153,.12); color:#0d9668; border:1px solid rgba(52,211,153,.3); }
  html[data-theme="dark"] .rm-status-badge.passed { color:#6ee7b7; }
  .rm-status-badge.returned { background:rgba(244,96,79,.12); color:var(--red); border:1px solid rgba(244,96,79,.3); }
  html[data-theme="dark"] .rm-status-badge.returned { color:#ff8a7a; }
  .rm-status-badge.final { background:rgba(139,92,246,.14); color:#7c3aed; border:1px solid rgba(139,92,246,.3); }
  html[data-theme="dark"] .rm-status-badge.final { color:#c4b5fd; }
  .rm-status-badge.confirmed { background:rgba(52,211,153,.16); color:#0d9668; border:1px solid rgba(52,211,153,.4); }
  html[data-theme="dark"] .rm-status-badge.confirmed { color:#6ee7b7; }

  .rm-steps { display:flex; align-items:center; gap:4px; flex-wrap:wrap; margin-bottom:12px; }
  .rm-step { display:flex; align-items:center; gap:5px; font-size:12px; color:var(--muted); }
  .rm-step .step-dot { width:20px; height:20px; border-radius:50%; border:1.5px solid var(--border); display:flex; align-items:center; justify-content:center; font-size:10px; font-weight:700; }
  .rm-step.active .step-dot { background:var(--grad); border-color:var(--primary); color:#06121f; }
  .rm-step.done .step-dot { background:linear-gradient(135deg,#10b981,#34d399); border-color:#10b981; color:#04150e; }
  .rm-step-arrow { color:var(--border); font-size:14px; }

  /* 报告编号管理 */
  .rm-no-section { background:rgba(148,163,184,.05); border:1px solid var(--border-soft); border-radius:10px; padding:12px 14px; margin-bottom:12px; }
  .rm-no-title { font-size:13px; font-weight:700; color:var(--text2); margin-bottom:8px; display:flex; align-items:center; gap:6px; }
  .rm-no-display { display:flex; align-items:center; gap:8px; margin-bottom:8px; }
  .rm-no-actions { display:flex; gap:8px; flex-wrap:wrap; }
  .rm-no-history { margin-top:10px; padding-top:8px; border-top:1px dashed var(--border-soft); }
  .rnh-title { font-size:12px; font-weight:600; color:var(--muted); margin-bottom:6px; }
  .rnh-item { display:flex; align-items:baseline; gap:8px; font-size:12px; padding:3px 0; flex-wrap:wrap; }
  .rnh-action { font-weight:700; min-width:36px; color:var(--accent-text); }
  .rnh-detail { color:var(--text2); flex:1; }
  .rnh-meta { color:var(--muted); font-size:11px; }

  .upload-area { border:2px dashed var(--border); border-radius:12px; padding:20px; text-align:center; cursor:pointer; transition:all .18s ease; background:rgba(148,163,184,.03); }
  .upload-area:hover { border-color:var(--primary); background:var(--accent-soft); }
  .upload-area .ua-icon { margin-bottom:8px; }
  .upload-area .ua-text { font-size:14px; color:var(--muted); }
  .upload-area .ua-hint { font-size:12px; color:var(--muted); margin-top:4px; opacity:.7; }

  /* 合同拖拽上传区 */
  .contract-drop-zone { border:2px dashed var(--border); border-radius:12px; padding:32px 20px; text-align:center; cursor:pointer; transition:all .2s ease; background:rgba(148,163,184,.03); }
  .contract-drop-zone:hover { border-color:var(--primary); background:var(--accent-soft); }
  .contract-drop-zone.dragover { border-color:var(--accent); background:var(--card); box-shadow:0 0 0 4px rgba(59,130,246,0.12); transform:scale(1.01); }
  .contract-drop-zone .cdz-icon { margin-bottom:10px; }
  .contract-drop-zone .cdz-text { font-size:15px; font-weight:600; color:var(--text); margin-bottom:4px; }
  .contract-drop-zone .cdz-text b { color:var(--accent-text); }
  .contract-drop-zone .cdz-hint { font-size:12px; color:var(--muted); opacity:.8; }

  .file-card { display:flex; align-items:center; gap:11px; background:rgba(148,163,184,.06); border:1px solid var(--border-soft); border-radius:10px; padding:11px 14px; margin-top:10px; }
  .file-card .fc-icon { width:38px; height:38px; border-radius:9px; background:var(--accent-soft); color:var(--accent-text); display:flex; align-items:center; justify-content:center; flex:0 0 auto; }
  .file-card .fc-info { flex:1; min-width:0; }
  .file-card .fc-name { font-size:14px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .file-card .fc-meta { font-size:12px; color:var(--muted); margin-top:2px; }
  .file-card .fc-actions { display:flex; gap:6px; flex:0 0 auto; }
  .file-card .fc-actions button { min-height:36px; padding:6px 12px; font-size:12px; }

  .review-comment-box { background:rgba(148,163,184,.06); border:1px solid var(--border-soft); border-radius:10px; padding:12px 14px; margin-top:10px; }
  .review-comment-box .rc-head { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
  .review-comment-box .rc-reviewer { font-weight:700; font-size:13px; }
  .review-comment-box .rc-date { font-size:12px; color:var(--muted); }
  .review-comment-box .rc-result { font-size:12px; padding:2px 9px; border-radius:10px; font-weight:600; }
  .review-comment-box .rc-result.pass { background:rgba(52,211,153,.14); color:#0d9668; }
  html[data-theme="dark"] .review-comment-box .rc-result.pass { color:#6ee7b7; }
  .review-comment-box .rc-result.return { background:rgba(244,96,79,.14); color:var(--red); }
  html[data-theme="dark"] .review-comment-box .rc-result.return { color:#ff8a7a; }
  .review-comment-box .rc-text { font-size:13px; line-height:1.6; }

  .ai-suggest-box { background:linear-gradient(135deg,rgba(79,140,255,.08),rgba(34,211,238,.06)); border:1px solid rgba(79,140,255,.25); border-radius:12px; padding:14px; margin-top:10px; }
  .ai-suggest-box .ai-head { display:flex; align-items:center; gap:8px; font-weight:700; font-size:14px; margin-bottom:8px; }
  .ai-suggest-box .ai-head .ai-badge { font-size:11px; padding:2px 8px; border-radius:10px; background:var(--grad); color:#06121f; font-weight:700; }
  .ai-suggest-box .ai-fields { display:grid; grid-template-columns:1fr 1fr; gap:6px 14px; }
  .ai-suggest-box .ai-field { display:flex; align-items:center; gap:6px; font-size:13px; }
  .ai-suggest-box .ai-field .af-check { color:#10b981; flex:0 0 auto; }
  .ai-suggest-box .ai-field .af-label { color:var(--muted); }
  .ai-suggest-box .ai-field .af-val { font-weight:600; }
  @media (max-width:768px) { .ai-suggest-box .ai-fields { grid-template-columns:1fr; } }

  .rm-actions { display:flex; gap:9px; flex-wrap:wrap; margin-top:14px; }
  .rm-actions button { flex:1; min-width:120px; padding:12px; font-weight:700; font-size:14px; }
  .btn-upload { background:var(--grad); color:#06121f; }
  .btn-review { background:linear-gradient(135deg,#8b5cf6,#a78bfa); color:#fff; }
  .btn-confirm-issue { background:linear-gradient(135deg,#10b981,#34d399); color:#04150e; box-shadow:0 6px 20px rgba(52,211,153,.3); }
  .btn-excel { background:linear-gradient(135deg,#059669,#10b981); color:#fff; font-weight:700; display:flex; align-items:center; gap:6px; white-space:nowrap; }
  .btn-excel:hover { filter:brightness(1.1); }

  /* 报告版本徽章 */
  .submission-badge { display:inline-flex; align-items:center; gap:4px; font-size:12px; font-weight:700; padding:3px 10px; border-radius:12px; white-space:nowrap; }
  .submission-badge.submission { background:rgba(79,140,255,.12); color:var(--accent-text); border:1px solid var(--accent-border); }
  .submission-badge.final { background:rgba(52,211,153,.14); color:#0d9668; border:1px solid rgba(52,211,153,.3); }
  html[data-theme="dark"] .submission-badge.final { color:#6ee7b7; }
  .submission-badge.returned { background:rgba(244,96,79,.1); color:var(--red); border:1px solid rgba(244,96,79,.25); }
  .rm-history-toggle { display:flex; align-items:center; gap:6px; cursor:pointer; font-size:13px; color:var(--accent-text); padding:6px 12px; border:1px solid var(--accent-border); border-radius:8px; background:var(--accent-soft); transition:all .15s; }
  .rm-history-toggle:hover { filter:brightness(1.05); }
  .rm-history-toggle .arrow { transition:transform .2s; }
  .rm-history-toggle.expanded .arrow { transform:rotate(90deg); }
  .rm-submission-card { border:1px solid var(--border-soft); border-radius:10px; padding:12px 14px; margin-top:8px; background:rgba(148,163,184,.03); }
  .rm-submission-card.final-version { border-color:rgba(52,211,153,.35); background:rgba(52,211,153,.04); }
  .rm-submission-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; }

  .storage-path-box { background:var(--accent-soft); border:1px solid var(--accent-border); border-radius:10px; padding:11px 13px; margin-top:10px; font-size:13px; }
  .storage-path-box .sp-label { color:var(--muted); }
  .storage-path-box .sp-path { font-weight:600; color:var(--accent-text); word-break:break-all; margin-top:2px; }

  /* ===== 模块选择器 ===== */
  .module-selector { position:fixed; inset:0; z-index:200; display:none; align-items:center; justify-content:center; padding:24px;
    background:
      radial-gradient(700px 420px at 80% 10%, rgba(34,211,238,.12), transparent 60%),
      radial-gradient(800px 520px at 10% 90%, rgba(79,140,255,.14), transparent 55%),
      linear-gradient(160deg, var(--bg2), var(--bg));
    animation:fadeIn .3s ease;
  }
  html[data-theme="dark"] .module-selector { background:radial-gradient(700px 420px at 80% 10%, rgba(34,211,238,.1), transparent 60%),radial-gradient(800px 520px at 10% 90%, rgba(79,140,255,.12), transparent 55%),linear-gradient(160deg,#0b1224,#070b16); }
  .module-selector.show { display:flex; }
  .ms-inner { max-width:840px; width:100%; animation:fadeUp .4s ease; }
  .ms-title { text-align:center; margin-bottom:32px; }
  .ms-title .ms-logo { width:56px; height:56px; border-radius:14px; background:var(--grad); display:inline-flex; align-items:center; justify-content:center; margin-bottom:14px; box-shadow:0 8px 28px rgba(79,140,255,.35); }
  .ms-title h2 { font-size:22px; font-weight:700; background:var(--grad); -webkit-background-clip:text; background-clip:text; color:transparent; }
  .ms-title p { font-size:13px; color:var(--muted); margin-top:6px; letter-spacing:.08em; }
  .ms-cards { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
  .ms-card { background:var(--card-solid); border:2px solid var(--border); border-radius:20px; padding:36px 28px; text-align:center; cursor:pointer; transition:all .25s ease; position:relative; overflow:hidden; }
  .ms-card:hover { border-color:var(--primary); transform:translateY(-4px); box-shadow:0 16px 48px rgba(79,140,255,.18), var(--glow); }
  .ms-card::before { content:''; position:absolute; top:0; left:0; right:0; height:4px; opacity:.85; }
  .ms-card.asset::before { background:linear-gradient(90deg,#4f8cff,#22d3ee); }
  .ms-card.finance::before { background:linear-gradient(90deg,#8b5cf6,#a78bfa); }
  .ms-card .msc-icon { width:68px; height:68px; margin:0 auto 18px; border-radius:16px; display:flex; align-items:center; justify-content:center; box-shadow:0 6px 20px rgba(0,0,0,.15); }
  .ms-card.asset .msc-icon { background:linear-gradient(135deg,#4f8cff,#22d3ee); }
  .ms-card.finance .msc-icon { background:linear-gradient(135deg,#8b5cf6,#a78bfa); }
  .ms-card .msc-title { font-size:18px; font-weight:700; margin-bottom:8px; color:var(--text); }
  .ms-card .msc-desc { font-size:13px; color:var(--muted); line-height:1.7; margin-bottom:20px; min-height:44px; }
  .ms-card .msc-enter { display:inline-flex; align-items:center; gap:6px; padding:10px 28px; border-radius:24px; font-size:14px; font-weight:700; transition:all .18s; }
  .ms-card.asset .msc-enter { background:linear-gradient(135deg,#4f8cff,#22d3ee); color:#06121f; }
  .ms-card.finance .msc-enter { background:linear-gradient(135deg,#8b5cf6,#a78bfa); color:#fff; }
  .ms-card:hover .msc-enter { filter:brightness(1.1); gap:9px; }
  .ms-card .msc-badge { position:absolute; top:14px; right:14px; font-size:11px; padding:3px 10px; border-radius:10px; font-weight:600; }
  .ms-card.asset .msc-badge { background:rgba(79,140,255,.13); color:var(--accent-text); }
  .ms-card.finance .msc-badge { background:rgba(139,92,246,.13); color:#8b5cf6; }
  html[data-theme="dark"] .ms-card.finance .msc-badge { color:#c4b5fd; }

  /* 顶部模块导航 */
  .top-nav { display:flex; gap:0; height:100%; align-items:center; flex:1; }
  .top-nav-tab { padding:0 22px; align-self:stretch; display:flex; align-items:center; font-size:15px; font-weight:600; color:var(--muted); cursor:pointer; border-bottom:2px solid transparent; transition:all .18s ease; position:relative; }
  .top-nav-tab:hover { color:var(--text); }
  .top-nav-tab.active { color:var(--accent-text); border-bottom-color:var(--primary); }
  .top-nav-tab .tn-badge { background:rgba(244,96,79,.9); color:#fff; font-size:11px; border-radius:10px; padding:1px 7px; min-width:20px; font-weight:700; margin-left:5px; text-align:center; }

  /* 消息中心：顶栏铃铛 + 未读角标 */
  .msg-bell { position:relative; display:flex; align-items:center; justify-content:center; width:38px; height:38px; margin:0 10px 0 4px; border-radius:12px; background:var(--bg-secondary); border:1px solid var(--border); cursor:pointer; color:var(--text); flex-shrink:0; transition:all .18s; }
  .msg-bell:hover { border-color:var(--primary); color:var(--accent-text); }
  .msg-bell.has-urgent { border-color:var(--red); color:var(--red); animation:msgBellRing 2.6s infinite; }
  @keyframes msgBellRing { 0%,90%,100%{ transform:rotate(0); } 92%{ transform:rotate(13deg); } 94%{ transform:rotate(-11deg); } 96%{ transform:rotate(7deg); } 98%{ transform:rotate(-4deg); } }
  .msg-badge { position:absolute; top:-6px; right:-6px; background:rgba(244,96,79,.96); color:#fff; font-size:10px; font-weight:700; border-radius:10px; min-width:17px; height:17px; padding:0 4px; display:flex; align-items:center; justify-content:center; box-shadow:0 2px 6px rgba(244,96,79,.4); }
  /* 消息筛选行 */
  .msg-filter-row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-top:12px; padding:10px 12px; background:var(--bg-secondary); border-radius:10px; }
  .msg-filter-row select { padding:6px 8px; border:1px solid var(--border); border-radius:8px; font-size:12px; background:var(--card); color:var(--text); }
  .msg-unread-chk { display:flex; align-items:center; gap:5px; font-size:12px; color:var(--muted); cursor:pointer; white-space:nowrap; }
  .msg-unread-chk input { cursor:pointer; }
  .msg-fold-tip { padding:7px 10px;margin-bottom:8px;border:1px dashed var(--border);border-radius:8px;background:var(--card);color:var(--muted);font-size:12px;text-align:center;cursor:pointer;user-select:none; }
  .msg-fold-tip:hover { color:var(--primary);border-color:var(--primary); }
  /* 消息条目 */
  .msg-item { padding:11px 13px; border:1px solid var(--border); border-radius:12px; margin-bottom:8px; background:var(--bg-secondary); position:relative; }
  .msg-item.unread { border-left:3px solid var(--primary); background:var(--accent-soft); }
  .msg-item.urgent { border-color:rgba(244,96,79,.45); }
  .msg-item.overtime { border-color:rgba(244,96,79,.75); box-shadow:0 0 0 2px rgba(244,96,79,.12); }
  .msg-dot { width:8px; height:8px; border-radius:50%; background:var(--primary); flex-shrink:0; }

  /* 应用主框架 */
  .app-shell { display:flex; min-height:calc(100vh - 69px); }
  .sidebar { width:200px; flex-shrink:0; background:var(--card-solid); border-right:1px solid var(--border); padding:10px 0; position:sticky; top:57px; height:calc(100vh - 57px); overflow-y:auto; }
  .sidebar-label { padding:14px 18px 8px; font-size:12px; color:var(--muted); letter-spacing:.05em; font-weight:600; }
  .sidebar-item { padding:11px 18px; font-size:14px; color:var(--muted); cursor:pointer; display:flex; align-items:center; justify-content:space-between; border-left:3px solid transparent; transition:all .15s ease; }
  .sidebar-item:hover { color:var(--text); background:var(--accent-soft); }
  .sidebar-item.active { color:var(--accent-text); background:var(--accent-soft); border-left-color:var(--primary); font-weight:600; }
  .sidebar-item .sb-badge { background:rgba(244,96,79,.9); color:#fff; font-size:11px; border-radius:10px; padding:1px 7px; min-width:20px; font-weight:700; text-align:center; }
  .sidebar-item .sb-badge.warn { background:var(--orange); }
  /* P-v2.27（哥哥第 4/5 条）：报告生成器二级标题 —— 参数存档/生成明细归「生成报告」、
     盖章资料统计归「盖章资料」；常驻缩进 + └ 引导，激活态与主项同款（辨识度靠层级） */
  /* P-v2.33 哥哥新第 1 条（★更正）：三个二级项**往左放**，与上一级（生成报告/盖章资料）文字对齐
     · padding-left 18px = 与父项 .sidebar-item 完全相同 → 文字起点同为 21px，上下齐平
     · └ 保留，改绝对定位：不占布局宽度，所以对齐不会被符号顶偏（仍紧贴文字左侧做层级提示）
     历史反复：P-v2.27 常驻 40px → P-v2.31 提到 28px → 误做成 40px → 哥哥更正为**往左对齐** */
  .sidebar-item.sb-sub { padding:8px 18px; font-size:12.5px; color:var(--muted); position:relative; }
  .sidebar-item.sb-sub::before { content:'└'; position:absolute; left:6px; top:50%; transform:translateY(-50%);
    font-size:11px; color:var(--line,#d5dde6); }
  .sidebar-item.sb-sub:hover { color:var(--text); background:var(--accent-soft); }
  .sidebar-item.sb-sub.active { color:var(--accent-text); background:var(--accent-soft); border-left-color:var(--primary); font-weight:600; }
  .content-area { flex:1; min-width:0; padding:14px 18px; }
  .breadcrumb { display:flex; align-items:center; gap:6px; font-size:13px; color:var(--muted); margin-bottom:14px; padding:0 2px; }
  .breadcrumb .bc-sep { opacity:.4; }
  .breadcrumb .bc-cur { color:var(--text); font-weight:600; }

  /* P-v2.17b 报告生成器页内模块：iframe 撑满内容区（顶栏57 + padding14 + 面包屑~33 + 余量） */
  #module-reportgen { height:calc(100vh - 124px); min-height:520px; overflow:auto; border-radius:12px; background:var(--card-solid); } /* P-v2.19 原生模块容器（iframe 已废） */
  /* P-v2.20 哥哥第⑤条：面包屑隐藏后回收其高度（≈34px：行高 ~20 + margin-bottom 14） */
  body.rg-nobc #module-reportgen { height:calc(100vh - 90px); }
  /* P-v2.21 哥哥拍板方案A+第③条：目录抽屉——缩进 26px + 1px 树线收成「生成报告」子树；
     tocIt 主样式（12px/绿条高亮）在 reportgen.css #sidebar 双发版，此处仅抽屉内微调（11.5px/muted） */
  /* P-v2.31：目录左边界与二级项容器对齐（28px） */
  #sidebar .rg-toc { margin:2px 10px 10px 28px; border-left:1px solid var(--border); padding-left:6px; }
  #sidebar .rg-toc .tocIt { font-size:11.5px; padding:4px 6px; color:var(--muted); }
  #sidebar .rg-toc .tocIt.on { color:var(--text); }
  #sidebar .rg-toc-arr { font-size:11px; color:var(--muted); margin-left:auto; padding-left:8px; }

  @media (max-width:768px) {
    .ms-cards { grid-template-columns:1fr; }
    .ms-card { padding:28px 20px; }
    .sidebar { display:none; }
    .app-shell { display:block; }
    .content-area { padding:0 14px; }
    .tabs { display:flex !important; }
    .fin-subtabs { display:flex !important; }
    .top-nav-tab { padding:0 14px; font-size:14px; }
    #module-reportgen { height:calc(100vh - 104px); border-radius:0; }
    body.rg-nobc #module-reportgen { height:calc(100vh - 70px); } /* P-v2.20 移动端同款回收 */
    .brand .b-sub { display:none; }
    /* 移动端：今日待办变为顶部折叠条 */
    .asset-layout { flex-direction:column; }
    .today-panel { width:100%; position:static; max-height:none; }
  }
  @media (max-width:1100px) and (min-width:769px) {
    /* 中等屏幕：今日面板缩窄 */
    .today-panel { width:260px; }
  }

/* ===== P-v2.5 财务面板简洁化（收支管理 / 成本费用） ===== */
.fin-sub-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:2px 0 10px}
.fin-sub-head .fsh-left{display:flex;align-items:baseline;gap:8px;min-width:0}
.fin-sub-head .fsh-title{font-size:14px;font-weight:700;color:var(--text)}
.fin-sub-head .fsh-sub{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fin-sub-head .fsh-btn{padding:5px 12px;font-size:12px;flex:none}
.fin-stat-strip{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:10px}
.fin-stat-strip .fss-item{flex:1 1 96px;min-width:96px;background:var(--bg-secondary);border:1px solid var(--border-soft);border-radius:8px;padding:8px 10px}
.fin-stat-strip .fss-num{display:block;font-size:15px;font-weight:700;color:var(--text);line-height:1.3}
.fin-stat-strip .fss-num.green{color:var(--green)}
.fin-stat-strip .fss-num.red{color:var(--red)}
.fin-stat-strip .fss-lbl{display:block;font-size:11px;color:var(--muted);margin-top:2px}
.fin-inline-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px;font-size:12px;color:var(--muted);margin-bottom:10px}
.fin-inline-row .fin-inline-sep{margin-left:6px}
.fin-inline-row .fin-mini-select{padding:2px 8px;border:1px solid var(--border);border-radius:6px;background:var(--input-bg);color:var(--text);font-size:12px}
.fin-inline-row .fin-warn{color:#f59e0b;font-weight:600}
.fin-form-card{background:var(--bg-secondary);border-radius:8px;padding:12px}
.fin-form-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:8px}
.fin-form-row label{margin:0;font-size:12px;color:var(--muted);flex:none}
.fin-form-row input{flex:1 1 160px;min-width:140px}
.fin-form-row .btn-ok{flex:none}
.fin-formula{font-size:12px;color:var(--muted);margin-bottom:4px}
.fin-formula b.green{color:var(--green)}
.fin-formula b.red{color:var(--red)}
.fin-edit-title{font-size:13px;font-weight:700;color:var(--text);margin-bottom:8px}
@media (max-width:768px){
  .fin-sub-head .fsh-sub{display:none}
  .fin-stat-strip .fss-item{flex:1 1 44%;min-width:44%}
}

/* P-v2.9 财务台账 · 已关联评估项目只读卡片 */
.fin-link-card{border:1px solid var(--border);border-radius:10px;padding:10px 12px;background:var(--bg-secondary)}
.fin-link-card.warn{border-color:var(--red);background:rgba(244,96,79,.08)}
.fin-link-card .flc-title{font-size:13px;font-weight:600;color:var(--text);margin-bottom:6px}
.fin-link-card .flc-body{font-size:13px;color:var(--text);line-height:1.6}
.fin-link-card .flc-note{font-size:12px;color:var(--muted);margin-top:6px;line-height:1.5}
.fin-link-card .st-pill{margin-right:4px}

  /* ===== P-v2.13 通知渠道卡片（全部走主题变量，深/浅色一致） ===== */
  .nch { border:1px solid var(--border-soft); border-radius:12px; padding:12px 13px; background:var(--card); transition:opacity .2s ease, border-color .2s ease; }
  .nch.off { opacity:.6; }
  .nch-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:8px; }
  .nch-name { font-size:14px; color:var(--text); }
  .nch-hint { font-size:11px; color:var(--muted); margin-top:2px; line-height:1.5; }
  .nch-inp { width:100%; padding:8px 10px; margin-top:6px; border:1px solid var(--border); border-radius:8px; font-size:13px; background:var(--input-bg); color:var(--text); outline:none; }
  .nch-inp:focus { border-color:var(--accent-border); }
  .nch-inp::placeholder { color:var(--muted); opacity:.7; }
  .nch-tip { font-size:11px; color:var(--muted); margin-top:8px; line-height:1.6; }
  .nch-sw { position:relative; display:inline-flex; align-items:center; flex:0 0 auto; cursor:pointer; }
  .nch-sw input { position:absolute; opacity:0; width:0; height:0; }
  .nch-sw i { width:38px; height:22px; border-radius:11px; background:var(--border); display:block; position:relative; transition:background .2s ease; }
  .nch-sw i::after { content:''; position:absolute; left:2px; top:2px; width:18px; height:18px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.25); transition:transform .2s ease; }
  .nch-sw input:checked + i { background:var(--primary); }
  .nch-sw input:checked + i::after { transform:translateX(16px); }
