:root {
  --brand: #2a5cd8;
  --brand-deep: #1b3a8f;
  --brand-light: #4a7ef0;
  --brand-bg: #eef3fb;
  --card: #ffffff;
  --text: #1f2d3d;
  --muted: #8492a6;
  --border: #e6ebf3;
  --red: #e74c3c;
  --green: #21b573;
  --orange: #f5a623;
  --blue: #2a5cd8;
  --purple: #7b5cd6;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(31, 62, 125, .08);
  --shadow-lg: 0 16px 48px rgba(16, 34, 79, .22);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "PingFang SC", "Microsoft YaHei", -apple-system, "Segoe UI", sans-serif; background: var(--brand-bg); color: var(--text); font-size: 14px; }

/* ===== 登录页 ===== */
.login-wrap { min-height: 100dvh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #16307c 0%, #2a5cd8 55%, #5a8bf5 100%); position: relative; overflow: hidden; }
.login-wrap::before, .login-wrap::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.08); }
.login-wrap::before { width: 520px; height: 520px; top: -180px; right: -120px; }
.login-wrap::after { width: 380px; height: 380px; bottom: -140px; left: -100px; }
.login-card { position: relative; z-index: 1; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); padding: 44px 40px; border-radius: 20px; width: 400px; box-shadow: var(--shadow-lg); }
.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.login-brand .cube { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg, var(--brand), var(--brand-light)); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 20px; }
.login-card h1 { font-size: 21px; }
.login-card .sub { color: var(--muted); margin-bottom: 26px; font-size: 13px; }
.login-card input { width: 100%; padding: 12px 14px; margin-bottom: 14px; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; background: #f7f9fd; transition: border-color .15s, box-shadow .15s; }
.login-card input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(42,92,216,.12); background: #fff; }
.login-card button { width: 100%; padding: 13px; background: linear-gradient(135deg, var(--brand), var(--brand-light)); color: #fff; border: 0; border-radius: 10px; font-size: 15px; cursor: pointer; box-shadow: 0 6px 16px rgba(42,92,216,.35); transition: transform .12s, box-shadow .12s; }
.login-card button:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(42,92,216,.4); }
.login-err { color: var(--red); font-size: 13px; min-height: 18px; margin-bottom: 8px; }
.remember { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); margin: -4px 0 16px; cursor: pointer; }
.remember input { width: auto; margin: 0; accent-color: var(--brand); }
.demo-tip { margin-top: 20px; font-size: 12px; color: var(--muted); line-height: 1.9; border-top: 1px dashed var(--border); padding-top: 14px; }

/* ===== 整体布局 ===== */
.layout { display: flex; min-height: 100dvh; }

/* 侧边栏 */
.sidebar { width: 224px; background: linear-gradient(180deg, var(--brand-deep) 0%, #234cae 60%, var(--brand) 100%); color: #fff; display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; flex-shrink: 0; }
.side-logo { display: flex; align-items: center; gap: 10px; padding: 22px 20px 18px; }
.side-logo .cube { width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,.16); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.side-logo b { font-size: 15px; line-height: 1.3; }
.side-logo small { display: block; font-size: 11px; color: rgba(255,255,255,.6); font-weight: 400; }
.side-user { margin: 4px 14px 14px; background: rgba(255,255,255,.1); border-radius: 12px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #f5a623, #f76b1c); display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.side-user .u-info { min-width: 0; }
.side-user .u-name { font-size: 13px; font-weight: 600; white-space: nowrap; }
.side-user .u-role { font-size: 11px; color: rgba(255,255,255,.65); }
.side-user .u-out { margin-left: auto; background: none; border: none; color: rgba(255,255,255,.7); cursor: pointer; font-size: 15px; }
.side-user .u-out:hover { color: #fff; }
.nav { flex: 1; padding: 4px 12px; overflow-y: auto; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 10px; cursor: pointer; color: rgba(255,255,255,.72); font-size: 14px; margin-bottom: 4px; user-select: none; transition: background .15s, color .15s; }
.nav-item:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav-item.active { background: #fff; color: var(--brand-deep); font-weight: 600; box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.nav-item .n-ico { width: 20px; text-align: center; flex-shrink: 0; }
.nav-divider { margin: 14px 14px 8px; border-top: 1px solid rgba(255,255,255,.14); padding-top: 10px; font-size: 11px; color: rgba(255,255,255,.45); }
.nav-badge { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; border-radius: 9px; padding: 1px 7px; }
.side-foot { margin: 12px 14px 14px; background: rgba(255, 205, 100, .92); color: #6b4300;
  border: none; border-radius: 10px; padding: 9px 12px; font-size: 10.5px; font-weight: 600;
  line-height: 1.7; box-shadow: 0 2px 8px rgba(0,0,0,.12); white-space: nowrap; }

/* 主区 */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { background: var(--card); height: 60px; display: flex; align-items: center; gap: 16px; padding: 0 26px; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 40; }
.topbar .page-title { font-size: 17px; font-weight: 700; }
.topbar .page-date { color: var(--muted); font-size: 13px; }
.topbar .grow { flex: 1; }
.icon-btn { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 18px; padding: 8px; position: relative; border-radius: 8px; }
.icon-btn:hover { background: var(--brand-bg); color: var(--brand); }
.badge { position: absolute; top: 1px; right: 1px; background: var(--red); color: #fff; font-size: 10px; border-radius: 8px; padding: 1px 5px; }
.top-actions { display: flex; gap: 8px; }
.link-btn { background: var(--brand-bg); border: 1px solid var(--border); color: var(--brand-deep); border-radius: 8px; padding: 7px 13px; cursor: pointer; font-size: 13px; transition: background .15s; }
.link-btn:hover { background: #dfe8fa; }
.link-btn.danger { color: var(--red); }

.content { padding: 22px 26px 46px; max-width: 1280px; width: 100%; }

/* ===== 统计卡 ===== */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; display: flex; align-items: center; gap: 14px; transition: transform .15s, box-shadow .15s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(31,62,125,.12); }
.stat-ico { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; color: #fff; flex-shrink: 0; }
.stat-ico.i-total { background: linear-gradient(135deg, #2a5cd8, #4a7ef0); }
.stat-ico.i-doing { background: linear-gradient(135deg, #f5a623, #f7c948); }
.stat-ico.i-overdue { background: linear-gradient(135deg, #e74c3c, #ff7b6e); }
.stat-ico.i-done { background: linear-gradient(135deg, #21b573, #4ed99b); }
.stat-num { font-size: 26px; font-weight: 800; line-height: 1.1; }
.stat-num small { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.stat-label { color: var(--muted); font-size: 12px; margin-top: 3px; }

/* ===== 图表区 ===== */
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.chart-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.chart-card h3 { font-size: 14px; margin-bottom: 14px; display: flex; align-items: center; gap: 6px; }
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 13px; }
.bar-row .b-name { width: 90px; color: var(--muted); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { flex: 1; height: 12px; background: #eef2f9; border-radius: 6px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--brand), var(--brand-light)); min-width: 4px; transition: width .5s ease; }
.bar-fill.b-red { background: linear-gradient(90deg, #e74c3c, #ff9a8f); }
.bar-fill.b-green { background: linear-gradient(90deg, #21b573, #4ed99b); }
.bar-fill.b-orange { background: linear-gradient(90deg, #f5a623, #f7c948); }
.bar-fill.b-purple { background: linear-gradient(90deg, #7b5cd6, #a68df0); }
.bar-count { width: 34px; font-weight: 700; font-size: 13px; }

/* ===== 筛选条 ===== */
.filterbar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 14px; flex-wrap: wrap; }
.filterbar select, .filterbar input { padding: 8px 11px; border: 1px solid var(--border); border-radius: 8px; background: #fff; font-size: 13px; color: var(--text); }
.filterbar select:focus, .filterbar input:focus { outline: none; border-color: var(--brand); }
.filterbar .grow { flex: 1; }
.btn { padding: 9px 18px; border: 0; border-radius: 9px; cursor: pointer; font-size: 14px; background: linear-gradient(135deg, var(--brand), var(--brand-light)); color: #fff; box-shadow: 0 4px 12px rgba(42,92,216,.28); transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(42,92,216,.34); }
.btn.secondary { background: #fff; color: var(--text); border: 1px solid var(--border); box-shadow: none; }
.btn.secondary:hover { background: #f4f7fd; transform: none; }
.btn.danger { background: #fff; color: var(--red); border: 1px solid var(--red); box-shadow: none; margin-left: 6px; }
.btn.danger:hover { background: #fdecea; transform: none; }
.btn.danger:disabled { opacity: .4; cursor: not-allowed; }
.btn.small { padding: 5px 11px; font-size: 12px; border-radius: 7px; }

/* ===== 事项卡片 ===== */
.group-title { margin: 16px 0 10px; font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.group-title .count { background: #e0e9fb; color: var(--brand-deep); font-size: 12px; padding: 2px 10px; border-radius: 10px; font-weight: 600; }
.item-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 15px 20px; margin-bottom: 10px; cursor: pointer; border-left: 4px solid transparent; transition: transform .12s, box-shadow .12s; }
.item-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(31,62,125,.13); }
.item-card.ov { border-left-color: var(--red); background: linear-gradient(90deg, #fff6f5, #fff 30%); }
.item-card.pr-high { border-left-color: var(--red); }
.item-card.pr-mid { border-left-color: var(--orange); }
.item-card.pr-low { border-left-color: var(--green); }
.item-card.closed { opacity: .6; }
.item-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.item-title { font-weight: 600; font-size: 15px; flex: 1; min-width: 200px; }
.chip { font-size: 12px; padding: 2px 10px; border-radius: 10px; white-space: nowrap; font-weight: 500; }
.chip.st-not_started { background: #eef2f9; color: var(--muted); }
.chip.st-in_progress { background: #e8f0ff; color: var(--brand); }
.chip.st-pending_close { background: #fdf3e0; color: #c47d00; }
.chip.st-closed { background: #e6f8ef; color: var(--green); }
.chip.st-done { background: #e6f8ef; color: var(--green); }
.chip.st-overdue { background: #fdeceb; color: var(--red); }
.chip.ov-chip { background: var(--red); color: #fff; font-weight: 600; }
.chip.type-chip { background: #f0f4fb; color: var(--muted); }
.item-meta { display: flex; gap: 18px; margin-top: 9px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.item-meta b { color: var(--text); font-weight: 500; }
.plan-old { text-decoration: line-through; color: #b6c2d4; }
.empty { text-align: center; color: var(--muted); padding: 70px 0; }
.empty .e-ico { font-size: 40px; margin-bottom: 10px; }

/* ===== 弹窗 ===== */
.modal-mask { position: fixed; inset: 0; background: rgba(15, 30, 70, .5); backdrop-filter: blur(2px); display: flex; align-items: flex-start; justify-content: center; z-index: 100; overflow-y: auto; padding: 36px 16px; }
.modal { background: var(--card); border-radius: 18px; width: 760px; max-width: 96vw; padding: 26px 30px; box-shadow: var(--shadow-lg); }
.modal.wide { width: 920px; }
.modal h2 { font-size: 18px; margin-bottom: 18px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.modal h2 .close-x { margin-left: auto; cursor: pointer; color: var(--muted); font-size: 22px; background: none; border: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.field input, .field select, .field textarea { width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px; font-size: 14px; font-family: inherit; background: #f9fbfe; transition: border-color .15s; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); background: #fff; }
.field textarea { resize: vertical; min-height: 64px; }
.modal-actions { margin-top: 20px; display: flex; gap: 10px; justify-content: flex-end; }
.modal-actions .left { margin-right: auto; }

/* ===== 详情 ===== */
.d-section { border-top: 1px solid var(--border); margin-top: 18px; padding-top: 16px; }
.d-section h3 { font-size: 15px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.d-section h3 .spacer { flex: 1; }
.node-row { background: #f6f9fe; border-radius: 10px; padding: 11px 15px; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.node-row .n-name { font-weight: 600; }
.node-row .n-meta { color: var(--muted); font-size: 12px; flex: 1; }
.node-row select { padding: 5px 9px; border: 1px solid var(--border); border-radius: 7px; font-size: 12px; }
.part-chip { display: inline-flex; align-items: center; gap: 4px; background: #eef3fb; border: 1px solid #dbe5f5; border-radius: 12px; padding: 2px 9px; font-size: 12px; margin: 2px 4px 2px 0; }
.part-chip .x { cursor: pointer; color: var(--muted); font-weight: 700; }
.part-editor { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.part-editor select, .part-editor input { padding: 6px 9px; border: 1px solid var(--border); border-radius: 7px; font-size: 12px; }
.comment { padding: 11px 0; border-bottom: 1px dashed var(--border); }
.comment .c-head { font-size: 12px; color: var(--muted); display: flex; gap: 8px; }
.comment .c-head b { color: var(--text); }
.comment .c-body { margin-top: 4px; white-space: pre-wrap; word-break: break-word; }
.comment .c-body .at { color: var(--brand); font-weight: 600; }
.mention-legend { font-size: 12px; color: var(--muted); margin: 6px 0; }
.mention-legend .at { color: var(--brand); cursor: pointer; margin-right: 6px; }
.checks { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin: 8px 0; flex-wrap: wrap; }
.checks label { cursor: pointer; display: flex; align-items: center; gap: 3px; }
.timeline { font-size: 13px; }
.timeline .tl-row { padding: 7px 0; border-bottom: 1px dashed var(--border); color: var(--muted); }
.timeline .tl-row b { color: var(--text); }
.reason-box { background: #fdf3e0; border-radius: 10px; padding: 9px 13px; margin: 6px 0; font-size: 13px; color: #8a5a00; }
.attach-row { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 4px 0; }
.attach-row a { color: var(--brand); text-decoration: none; }

/* ===== 通知下拉 ===== */
.notif-drop { position: fixed; right: 24px; top: 64px; width: 370px; max-height: 440px; overflow-y: auto; background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); color: var(--text); z-index: 200; }
.notif-drop .n-item { padding: 11px 15px; border-bottom: 1px solid var(--border); font-size: 13px; cursor: pointer; }
.notif-drop .n-item:hover { background: #f6f9fe; }
.notif-drop .n-item.unread { background: #fff7f0; }
.notif-drop .n-item .n-time { font-size: 11px; color: var(--muted); margin-top: 3px; }
.notif-drop .n-head { padding: 12px 15px; font-weight: 700; display: flex; align-items: center; }
.notif-drop .n-head button { margin-left: auto; background: none; border: none; color: var(--brand); cursor: pointer; font-size: 12px; }

/* ===== 管理面板 ===== */
.tabs-mini { display: flex; gap: 8px; margin-bottom: 16px; }
.tabs-mini .tm { padding: 8px 17px; border-radius: 9px; cursor: pointer; background: #eef2f9; font-size: 13px; border: 0; color: var(--muted); }
.tabs-mini .tm.active { background: var(--brand); color: #fff; font-weight: 600; }
table.grid { width: 100%; border-collapse: collapse; font-size: 13px; }
table.grid th, table.grid td { padding: 9px 11px; border-bottom: 1px solid var(--border); text-align: left; }
table.grid th { color: var(--muted); font-weight: 600; font-size: 12px; }
table.grid select, table.grid input { padding: 5px 9px; border: 1px solid var(--border); border-radius: 7px; font-size: 12px; }
.toggle-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 14px; }
.toast { position: fixed; bottom: 34px; left: 50%; transform: translateX(-50%); background: #22355c; color: #fff; padding: 11px 24px; border-radius: 10px; font-size: 14px; z-index: 300; box-shadow: var(--shadow-lg); }
.toast.err { background: var(--red); }
.hidden { display: none !important; }

/* 移动端：汉堡按钮 + 抽屉遮罩（默认隐藏，仅窄屏显示） */
.menu-btn { display: none; align-items: center; justify-content: center; background: none; border: none; font-size: 21px; cursor: pointer; color: var(--brand-deep); padding: 4px 8px 4px 0; flex-shrink: 0; }
.drawer-mask { display: none; }

/* 响应式 */
@media (max-width: 1024px) {
  .sidebar { width: 66px; }
  .side-logo b, .side-logo small, .side-user .u-name, .side-user .u-role, .nav-item span:not(.n-ico), .nav-divider { display: none; }
  .nav-item { justify-content: center; padding: 12px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .charts { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .menu-btn { display: inline-flex; }
  .topbar { height: 54px; padding: 0 14px; gap: 8px; }
  .topbar .page-date { display: none; }
  .topbar .page-title { font-size: 16px; white-space: nowrap; }
  .top-actions { display: none; }
  /* 侧边栏改为抽屉：默认移出屏幕，点击汉堡滑入 */
  .sidebar {
    display: flex;
    position: fixed; left: 0; top: 0; z-index: 100;
    width: 268px; height: 100dvh;
    transform: translateX(-102%); transition: transform .25s ease;
    box-shadow: 4px 0 24px rgba(0,0,0,.25);
  }
  .sidebar.open { transform: translateX(0); }
  .drawer-mask.show { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 90; }
  /* 抽屉内恢复完整文字（覆盖 1024 断点的隐藏） */
  .side-logo b, .side-logo small, .side-user .u-name, .side-user .u-role, .nav-item span:not(.n-ico), .nav-divider { display: revert; }
  .nav-item { justify-content: flex-start; padding: 11px 14px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .content { padding: 14px 12px 40px; }
  .filterbar { padding: 10px 12px; gap: 6px; }
  .filterbar select, .filterbar input { flex: 1 1 44%; min-width: 0; width: auto !important; }
  .filterbar .grow { display: none; }
  .filterbar .btn { flex: 1 1 100%; }
}

/* ===== 进展动态流 + 风险预警 ===== */
.risk-chip { background: #fff3e0; color: #d97706; border: 1px solid #fed7aa; }
.update-compose { background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-bottom: 14px; }
.update-compose textarea { width: 100%; min-height: 62px; border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; font-size: 13px; resize: vertical; font-family: inherit; box-sizing: border-box; }
.update-compose textarea:focus { outline: none; border-color: var(--brand); }
.u-milestone { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: #b45309; margin: 8px 0; cursor: pointer; }
.update-list { position: relative; padding-left: 4px; }
.update-row { display: flex; gap: 12px; padding: 10px 0 12px; border-bottom: 1px dashed var(--border); }
.update-row:last-child { border-bottom: none; }
.u-dot { width: 22px; height: 22px; border-radius: 50%; background: #e0e7ff; color: var(--brand-deep); display: flex; align-items: center; justify-content: center; font-size: 10px; flex-shrink: 0; margin-top: 2px; }
.update-row.milestone .u-dot { background: #fef3c7; font-size: 13px; }
.u-body { flex: 1; min-width: 0; }
.u-top { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.u-top b { color: var(--text); }
.u-time { color: var(--muted); font-size: 12px; }
.u-content { font-size: 14px; color: var(--text); margin: 5px 0; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.update-row.milestone .u-content { font-weight: 500; }
.u-actions { display: flex; gap: 12px; align-items: center; }
.link-mini { background: none; border: none; color: var(--brand); font-size: 12px; cursor: pointer; padding: 0; }
.link-mini:hover { text-decoration: underline; }
.link-mini.danger { color: var(--red); }
.mile-tag { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }

/* ===== V1.4：状态行 + 徽标 ===== */
.status-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.status-line select { min-width: 160px; }
.mini-badge { font-size: 12px; border-radius: 10px; padding: 3px 10px; cursor: pointer; white-space: nowrap; user-select: none; }
.mini-badge.ok { background: #e6f8ef; color: var(--green); }
.mini-badge.warn { background: #fdeceb; color: var(--red); }

/* ===== V1.4：关键节点时间线（紧凑） ===== */
.nt-timeline { margin-top: 4px; }
.nt-row { display: flex; gap: 10px; position: relative; padding-bottom: 8px; }
.nt-row::before { content: ""; position: absolute; left: 8px; top: 22px; bottom: 0; width: 2px; background: #dbe5f5; }
.nt-row:last-child::before { display: none; }
.nt-dot { width: 18px; height: 18px; border-radius: 50%; background: #e0e7ff; border: 3px solid #fff; box-shadow: 0 0 0 2px #c3d2f5; flex-shrink: 0; margin-top: 4px; z-index: 1; position: relative; }
.nt-dot.done { background: #35c08a; box-shadow: 0 0 0 2px #9fe3c8; }
.nt-dot.in_progress { background: var(--orange); box-shadow: 0 0 0 2px #f8d9a0; }
.nt-dot.overdue { background: var(--red); box-shadow: 0 0 0 2px #f5b0aa; }
.nt-card { flex: 1; min-width: 0; background: #f6f9fe; border: 1px solid #e6eefb; border-radius: 10px; padding: 8px 12px; }
.nt-head { display: flex; align-items: flex-start; gap: 8px; }
.nt-name { font-weight: 600; font-size: 14px; flex: 1; min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; }
.nt-ops { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nt-ops select { padding: 4px 8px; border: 1px solid var(--border); border-radius: 7px; font-size: 12px; background: #fff; }
.nt-meta { color: var(--muted); font-size: 12px; margin-top: 4px; line-height: 1.5; }

/* ===== V1.4：附件缩略与放大 ===== */
.att-strip { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 2px; }
.att-item { display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--border); border-radius: 9px; padding: 4px 8px; max-width: 100%; }
.att-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 7px; cursor: zoom-in; border: 1px solid var(--border); display: block; }
.att-thumb.sm { width: 34px; height: 34px; margin: 0; display: inline-block; vertical-align: middle; }
.att-file { color: var(--brand); text-decoration: none; font-size: 13px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }
.att-name { font-size: 12px; color: var(--text); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.att-name:hover { color: var(--brand); }
.att-size { color: var(--muted); font-size: 11px; }
.att-ops { display: flex; gap: 6px; flex-shrink: 0; }
.att-src { color: var(--muted); font-size: 12px; }
.attach-row .att-thumb.sm { margin-right: 2px; }
.zoom-mask { position: fixed; inset: 0; background: rgba(10, 20, 45, .78); z-index: 400; display: flex; align-items: center; justify-content: center; padding: 24px; }
.zoom-box { background: #fff; border-radius: 14px; padding: 14px; max-width: min(92vw, 1100px); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 10px; }
.zoom-box img { max-width: 86vw; max-height: 74vh; object-fit: contain; border-radius: 8px; display: block; }
.zoom-bar { display: flex; align-items: center; gap: 10px; }
.zoom-bar span { flex: 1; font-size: 13px; font-weight: 600; word-break: break-all; }

/* ===== V1.4：弹出的文本输入 ===== */
.pp-text { width: 100%; min-height: 140px; border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; font-family: inherit; font-size: 14px; resize: vertical; background: #f9fbfe; }
.pp-text:focus { outline: none; border-color: var(--brand); background: #fff; }

/* ===== V1.4：进展动态工具行 ===== */
.u-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.u-file-names { font-size: 12px; color: var(--green); }

/* ===== V1.4：评论输入加高 ===== */
#cInput { min-height: 120px; }

/* ===== V1.4a：整体紧凑化（压缩留白） ===== */
.modal { padding: 18px 22px; }
.modal h2 { margin-bottom: 12px; font-size: 17px; }
.form-grid { gap: 8px 12px; }
.field label { margin-bottom: 3px; }
.field input, .field select, .field textarea { padding: 7px 10px; }
.field textarea { min-height: 0; }
.modal-actions { margin-top: 12px; }
.d-section { margin-top: 12px; padding-top: 12px; }
.d-section h3 { margin-bottom: 6px; font-size: 14px; }
.d-section h3 .chip { font-size: 11px; padding: 1px 8px; }
.update-compose { padding: 8px 10px; margin-bottom: 10px; }
.update-compose textarea { min-height: 44px; }
.u-milestone { margin: 4px 0; }
.update-row { padding: 8px 0; }
.u-content { margin: 3px 0; }
.u-top { font-size: 12px; }
.comment { padding: 8px 0; }
.checks { margin: 6px 0; }
.mention-legend { margin: 4px 0; }
.nt-card { padding: 6px 10px; }
.nt-row { padding-bottom: 6px; }
.nt-meta { margin-top: 3px; }
.reason-box { padding: 7px 11px; margin: 4px 0; }
.pp-text { min-height: 100px; }
.part-editor { margin-top: 4px; }

/* 评论输入：一行长条（可纵向拉伸） */
#cInput { min-height: 40px !important; height: 40px; }
#cInput:focus { height: auto; min-height: 40px; }

/* ===== V1.4a：放大预览动画 ===== */
.zoom-mask { animation: zfade .15s ease; }
.zoom-box { animation: zpop .18s ease; }
@keyframes zfade { from { opacity: 0; } to { opacity: 1; } }
@keyframes zpop { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ===== V1.4b：评论框一整行 ===== */
#cInput { width: 100%; display: block; }

/* ===== V1.4b：侧边栏加宽防换行 ===== */
.sidebar { width: 250px; }
.side-logo b { font-size: 15px; }
@media (min-width: 1025px) { .content { max-width: 1300px; } }
@media (max-width: 640px) {
  .sidebar { width: 305px; }
  .side-logo b { white-space: nowrap; }
  .side-foot { white-space: nowrap; font-size: 10.5px; }
}
@media (max-width: 1024px) and (min-width: 641px) { .sidebar { width: 66px; } }

/* ===== V1.4b：放大层可二次放大 ===== */
.zoom-box img { cursor: zoom-in; transition: transform .15s ease; }
.zoom-hint { font-size: 11px; color: var(--muted); }

/* ===== V1.5：侧边栏品牌区精修 ===== */
.side-logo { padding: 24px 20px 16px; }
.side-logo .cube { width: 42px; height: 42px; font-size: 21px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,255,255,.28), rgba(255,255,255,.1));
  box-shadow: 0 4px 12px rgba(0,0,0,.18); }
.side-logo b { font-size: 14.5px; font-weight: 700; letter-spacing: .3px; display: block; line-height: 1.4; }
.side-logo small.t2 { font-size: 12.5px; font-weight: 500; color: rgba(255,255,255,.88); margin-top: 3px; letter-spacing: .5px; }
.side-logo small.t3 { font-size: 10px; color: rgba(255,255,255,.6); margin-top: 2px; letter-spacing: 0; white-space: nowrap; }
.side-logo small { margin-top: 4px; letter-spacing: 1.5px; }

/* ===== V1.5：内部使用提醒横幅 ===== */
.notice-bar { display: flex; align-items: center; gap: 8px; background: #fff7e6;
  border: 1px solid #ffe1ad; color: #8a5b00; border-radius: 10px; padding: 8px 14px;
  font-size: 13px; margin-bottom: 12px; }
.notice-bar b { color: #b25e00; }

/* ===== V1.5b：侧边栏内部使用提醒（已恢复原版底部小字样式，卡片样式弃用） ===== */

/* ===== V1.5：使用指南 ===== */
.help-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.help-card { background: #f6f9fe; border: 1px solid #e6eefb; border-radius: 10px; padding: 10px 12px; }
.help-card h4 { margin: 0 0 5px; font-size: 13px; color: var(--brand); }
.help-card p { margin: 0; font-size: 12.5px; line-height: 1.7; color: var(--text); }
.help-card.full { grid-column: 1 / -1; }
@media (max-width: 640px) { .help-grid { grid-template-columns: 1fr; } }
