/* ==========================================================================
   进度执行工作台 · Progress Execution Workbench
   Dark industrial theme — near-black canvas, hairline borders, orange accent
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

:root {
  color-scheme: dark;

  --bg: #080b11;
  --bg-2: #0a0e15;
  --surface: #0f141c;
  --surface-2: #131a24;
  --surface-3: #18212d;

  --line: rgba(255, 255, 255, .075);
  --line-2: rgba(255, 255, 255, .05);
  --line-strong: rgba(255, 255, 255, .14);

  --ink: #eef2f7;
  --ink-2: #d5dde7;
  --muted: #94a3b8;
  --muted-2: #64748b;

  --accent: #ff8a1e;
  --accent-2: #f0770a;
  --accent-3: #ffb066;
  --accent-soft: rgba(255, 138, 30, .12);
  --accent-line: rgba(255, 138, 30, .32);

  --ok: #10b981;
  --ok-soft: rgba(16, 185, 129, .12);
  --warn: #f59e0b;
  --warn-soft: rgba(245, 158, 11, .12);
  --danger: #f43f5e;
  --danger-soft: rgba(244, 63, 94, .12);
  --info: #22d3ee;
  --info-soft: rgba(34, 211, 238, .12);

  --r-sm: 8px;
  --r-md: 11px;
  --r-lg: 14px;
  --r-xl: 18px;

  --shadow-sm: 0 1px 0 rgba(255, 255, 255, .03) inset;
  --shadow-md: 0 18px 40px -30px rgba(0, 0, 0, .95);
  --shadow-lg: 0 40px 90px -34px rgba(0, 0, 0, .95);
  --ring: 0 0 0 3px rgba(255, 138, 30, .16);

  --font: "Microsoft YaHei", "PingFang SC", "Segoe UI", "Hiragino Sans GB", system-ui, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
}

html, body { height: 100%; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  background:
    radial-gradient(1100px 560px at 76% -12%, rgba(255, 138, 30, .085), transparent 62%),
    radial-gradient(900px 480px at 6% 4%, rgba(34, 211, 238, .04), transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 10%, transparent 78%);
}

h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
svg { display: block; }
::selection { background: rgba(255, 138, 30, .32); color: #fff; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 18px; height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #26303f; border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #3a4759; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-corner { background: transparent; }

/* ------------------------------- boot ---------------------------------- */

.boot { min-height: 100vh; display: grid; place-items: center; position: relative; z-index: 1; }
.boot-inner { display: flex; flex-direction: column; align-items: center; gap: 16px; color: var(--muted); font-size: 12.5px; }
.boot-mark {
  width: 44px; height: 44px; border-radius: 13px;
  background: linear-gradient(150deg, #ffa64d, var(--accent-2));
  box-shadow: 0 12px 30px -10px rgba(255, 138, 30, .8);
  animation: pulse 1.4s ease-in-out infinite;
}

/* --------------------------------- shell -------------------------------- */

.shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; position: relative; z-index: 1; }

.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 20px 14px 14px;
  background: linear-gradient(180deg, #0a0e15 0%, #080b11 60%, #070a0f 100%);
  border-right: 1px solid var(--line);
  overflow-y: auto;
}

.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 22px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  display: grid; place-items: center;
  color: #180f04; font-size: 18px; font-weight: 800; letter-spacing: 0;
  background: linear-gradient(150deg, #ffa94f, var(--accent-2));
  box-shadow: 0 8px 22px -8px rgba(255, 138, 30, .9), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.brand-text strong { display: block; color: #fff; font-size: 14.5px; font-weight: 700; letter-spacing: .02em; }
.brand-text span { display: block; font-size: 8px; letter-spacing: .16em; text-transform: uppercase; color: #56637a; margin-top: 2px; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: 9px;
  color: #8b9ab0; font-size: 13px; font-weight: 500;
  transition: background .16s, color .16s;
}
.nav-item .icon { width: 17px; height: 17px; opacity: .85; }
.nav-item:hover { background: rgba(255, 255, 255, .04); color: #dfe7f1; }
.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(255, 138, 30, .16), rgba(255, 138, 30, .02) 70%, transparent);
}
.nav-item.active::before {
  content: "";
  position: absolute; left: -14px; top: 8px; bottom: 8px;
  width: 2px; border-radius: 0 2px 2px 0;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(255, 138, 30, .8);
}
.nav-item.active .icon { color: var(--accent); opacity: 1; }
.nav-badge {
  margin-left: auto; min-width: 20px; height: 18px; padding: 0 6px;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 700; color: #ffc38a;
  background: rgba(255, 138, 30, .16); border-radius: 99px;
  font-variant-numeric: tabular-nums;
}

.side-section { margin-top: 24px; flex: 1; min-height: 0; }
.side-title {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 11px 8px;
  font-size: 9.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #4b586e;
}
.side-add {
  width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center;
  color: #64748b; transition: .15s;
}
.side-add:hover { background: rgba(255, 138, 30, .14); color: var(--accent); }
.side-add .icon { width: 13px; height: 13px; stroke-width: 2.2; }

.side-projects { display: flex; flex-direction: column; gap: 1px; }
.side-project {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 11px; border-radius: 8px;
  font-size: 12.5px; color: #8593a8;
  transition: .15s;
}
.side-project:hover { background: rgba(255, 255, 255, .04); color: #e2e8f0; }
.side-project.active { background: rgba(255, 255, 255, .05); color: #fff; }
.side-project .dot { width: 7px; height: 7px; border-radius: 2px; flex: none; }
.side-project span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-project em { margin-left: auto; font-style: normal; font-size: 10.5px; color: #55627a; font-variant-numeric: tabular-nums; }

.side-foot { padding-top: 12px; border-top: 1px solid var(--line-2); }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 6px; border-radius: 9px; transition: background .15s; }
.user-chip:hover { background: rgba(255, 255, 255, .04); }
.user-chip .meta { min-width: 0; flex: 1; text-align: left; }
.user-chip .meta b { display: block; color: #e8eef7; font-size: 12.5px; font-weight: 600; }
.user-chip .meta span { display: block; font-size: 10px; color: #5d6b84; }
.user-chip .icon-btn { color: #55627a; }
.user-chip .icon-btn:hover { background: rgba(244, 63, 94, .14); color: #fb7185; }

.main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 14px;
  padding: 15px 28px;
  background: rgba(8, 11, 17, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-title { min-width: 0; flex: 1; }
.topbar-title h1 { font-size: 19px; font-weight: 700; letter-spacing: .01em; }
.topbar-title p { margin-top: 1px; font-size: 11.5px; color: var(--muted-2); }
.topbar-actions { display: flex; align-items: center; gap: 8px; }

.content { padding: 24px 28px 56px; width: 100%; max-width: 1560px; margin: 0 auto; }

.sidebar-scrim { display: none; position: fixed; inset: 0; z-index: 55; background: rgba(3, 6, 11, .65); backdrop-filter: blur(2px); }

.menu-btn { display: none; }

/* ------------------------------- buttons -------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 35px; padding: 0 13px;
  border-radius: 9px;
  font-size: 12.5px; font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: transform .12s, background .15s, border-color .15s, box-shadow .15s, color .15s;
}
.btn:active { transform: translateY(1px); }
.btn .icon { width: 15px; height: 15px; stroke-width: 2; }
.btn.primary {
  color: #1b1207;
  background: linear-gradient(180deg, #ffa03f, #f5841a);
  border-color: rgba(255, 160, 63, .5);
  box-shadow: 0 6px 18px -10px rgba(255, 138, 30, .9), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn.primary:hover { background: linear-gradient(180deg, #ffae57, #ff8a1e); }
.btn.ghost {
  background: rgba(255, 255, 255, .035);
  border-color: var(--line);
  color: var(--ink-2);
}
.btn.ghost:hover { background: rgba(255, 255, 255, .07); border-color: var(--line-strong); color: #fff; }
.btn.soft { background: rgba(255, 138, 30, .13); color: #ffb066; border-color: rgba(255, 138, 30, .22); }
.btn.soft:hover { background: rgba(255, 138, 30, .2); }
.btn.danger { background: var(--danger-soft); color: #fda4af; border-color: rgba(244, 63, 94, .22); }
.btn.danger:hover { background: rgba(244, 63, 94, .2); }
.btn.sm { height: 29px; padding: 0 10px; font-size: 11.5px; border-radius: 7px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.icon-btn {
  width: 32px; height: 32px; border-radius: 8px;
  display: inline-grid; place-items: center;
  color: var(--muted);
  transition: .15s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .06); color: var(--ink); }
.icon-btn .icon { width: 16px; height: 16px; }
.icon-btn.danger:hover { background: var(--danger-soft); color: #fb7185; }

.link-btn { color: var(--accent-3); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }
.link-btn:hover { color: #ffd0a0; }
.link-btn .icon { width: 13px; height: 13px; }

/* topbar widgets */

.search-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 9px 0 11px;
  min-width: 196px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  color: var(--muted-2);
  font-size: 12px;
  transition: .15s;
}
.search-trigger:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, .05); color: var(--muted); }
.search-trigger .icon { width: 14px; height: 14px; }
.search-trigger kbd {
  margin-left: auto;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .04em;
  padding: 1px 5px; border-radius: 4px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  color: #56637a;
}

.date-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 10px;
  border-radius: 9px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}
.date-chip .icon { width: 13px; height: 13px; color: var(--accent); }

.user-btn {
  width: 34px; height: 34px; border-radius: 50%;
  padding: 0; display: grid; place-items: center;
  border: 1px solid var(--line);
  background: none;
  transition: .15s;
}
.user-btn:hover { border-color: var(--accent-line); box-shadow: 0 0 0 3px rgba(255, 138, 30, .1); }
.user-btn .avatar { width: 28px; height: 28px; font-size: 9.5px; }

.user-pop {
  position: absolute; top: 58px; right: 28px; z-index: 70;
  width: 208px; padding: 6px;
  background: #10161f;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  box-shadow: var(--shadow-lg);
  animation: popIn .14s ease-out;
}
.user-pop-head { display: flex; align-items: center; gap: 9px; padding: 8px 8px 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 5px; }
.user-pop-head b { display: block; font-size: 12.5px; }
.user-pop-head span { display: block; font-size: 10px; color: var(--muted-2); }
.user-pop-item {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 8px 9px; border-radius: 7px;
  font-size: 12.5px; color: var(--ink-2);
  transition: .13s;
}
.user-pop-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.user-pop-item .icon { width: 15px; height: 15px; color: var(--muted-2); }
.user-pop-item.danger:hover { background: var(--danger-soft); color: #fda4af; }
.user-pop-item.danger:hover .icon { color: #fb7185; }

/* --------------------------------- chips -------------------------------- */

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 21px; padding: 0 7px;
  border-radius: 6px;
  font-size: 10.5px; font-weight: 600;
  background: rgba(255, 255, 255, .06); color: #b9c5d6;
  border: 1px solid transparent;
  white-space: nowrap;
}
.chip .dot { width: 5px; height: 5px; border-radius: 99px; background: currentColor; }
.chip.ok { background: var(--ok-soft); color: #6ee7b7; border-color: rgba(16, 185, 129, .2); }
.chip.warn { background: var(--warn-soft); color: #fcd34d; border-color: rgba(245, 158, 11, .2); }
.chip.danger { background: var(--danger-soft); color: #fda4af; border-color: rgba(244, 63, 94, .22); }
.chip.info { background: var(--info-soft); color: #67e8f9; border-color: rgba(34, 211, 238, .2); }
.chip.brand { background: var(--accent-soft); color: #ffb066; border-color: rgba(255, 138, 30, .24); }
.chip.outline { background: transparent; border-color: var(--line); color: var(--muted); }

.badge-count {
  min-width: 22px; height: 20px; padding: 0 6px;
  display: inline-grid; place-items: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, .06);
  font-size: 10.5px; font-weight: 700; color: #b9c5d6;
  font-variant-numeric: tabular-nums;
}

/* -------------------------------- avatar -------------------------------- */

.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: inline-grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #0b1119;
  letter-spacing: .02em; flex: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
  user-select: none;
}
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.avatar.lg { width: 40px; height: 40px; font-size: 14px; }
.avatar.xs { width: 20px; height: 20px; font-size: 9px; }

/* --------------------------------- cards -------------------------------- */

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .032), rgba(255, 255, 255, .008));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.card.pad { padding: 20px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px 10px;
}
.card-head h2 { font-size: 13.5px; font-weight: 700; letter-spacing: .01em; }
.card-head .sub { font-size: 10.5px; color: var(--muted-2); letter-spacing: .04em; text-transform: uppercase; }
.card-body { padding: 0 18px 18px; }

.card-foot-link {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  margin: 2px 18px 14px; padding: 7px;
  border-radius: 7px;
  border: 1px dashed rgba(255, 255, 255, .09);
  font-size: 10.5px; font-weight: 500; color: var(--muted-2);
  transition: .15s;
}
.card-foot-link:hover { border-color: var(--accent-line); color: var(--accent-3); background: rgba(255, 138, 30, .05); }
.card-foot-link .icon { width: 12px; height: 12px; }

/* ---------------------------------- kpi --------------------------------- */

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }

.kpi {
  position: relative;
  display: flex; align-items: flex-start; gap: 13px;
  padding: 17px 17px 16px;
  overflow: hidden;
}
.kpi::after {
  content: "";
  position: absolute; right: -30px; top: -40px;
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .05), transparent 70%);
  pointer-events: none;
}
.kpi-icon {
  width: 40px; height: 40px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  border: 1px solid transparent;
}
.kpi-icon .icon { width: 18px; height: 18px; stroke-width: 1.9; }
.tint-orange { background: rgba(255, 138, 30, .12); color: #ffa14f; border-color: rgba(255, 138, 30, .2); }
.tint-cyan { background: rgba(34, 211, 238, .1); color: #67e8f9; border-color: rgba(34, 211, 238, .2); }
.tint-green { background: rgba(16, 185, 129, .1); color: #6ee7b7; border-color: rgba(16, 185, 129, .2); }
.tint-rose { background: rgba(244, 63, 94, .1); color: #fda4af; border-color: rgba(244, 63, 94, .2); }
.tint-indigo { background: rgba(255, 138, 30, .12); color: #ffa14f; border-color: rgba(255, 138, 30, .2); }
.tint-sky { background: rgba(34, 211, 238, .1); color: #67e8f9; border-color: rgba(34, 211, 238, .2); }
.tint-amber { background: rgba(245, 158, 11, .12); color: #fcd34d; border-color: rgba(245, 158, 11, .2); }
.tint-red { background: rgba(244, 63, 94, .1); color: #fda4af; border-color: rgba(244, 63, 94, .2); }

.kpi-label { font-size: 11px; color: var(--muted-2); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.kpi-value { font-size: 27px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: 12px; font-weight: 600; color: var(--muted-2); letter-spacing: 0; margin-left: 2px; }
.kpi-sub { font-size: 11px; color: var(--muted-2); margin-top: 3px; }
.kpi-sub strong { color: #cbd5e1; font-weight: 600; }

/* ------------------------------ dashboard ------------------------------- */

.dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

.project-progress { display: flex; flex-direction: column; gap: 16px; padding: 4px 18px 18px; }
.pp-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 7px; }
.pp-name { font-size: 12.5px; font-weight: 600; }
.pp-code { font-size: 9px; font-weight: 700; color: var(--muted-2); letter-spacing: .1em; }
.pp-count { margin-left: auto; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pp-count b { color: var(--ink); font-weight: 650; }

.bar { height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.bar > i {
  display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, #ffa64d, var(--accent-2));
  transition: width .5s cubic-bezier(.2, .8, .2, 1);
}
.bar.thin { height: 4px; }
.bar.sm { height: 3px; }

.donut-wrap { display: flex; align-items: center; justify-content: center; padding: 6px 18px 4px; }
.donut { position: relative; width: 164px; height: 164px; }
.donut svg { transform: rotate(-90deg); }
.donut-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.donut-center b { font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.donut-center b span { font-size: 12px; font-weight: 600; color: var(--muted-2); }
.donut-center small { margin-top: 5px; font-size: 10px; color: var(--muted-2); letter-spacing: .1em; text-transform: uppercase; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 6px 18px 18px; justify-content: center; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.legend-item b { color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.swatch { width: 7px; height: 7px; border-radius: 2px; }

.mini-list { display: flex; flex-direction: column; }
.mini-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 18px;
  border-top: 1px solid var(--line-2);
  transition: background .14s;
}
.mini-item:hover { background: rgba(255, 255, 255, .035); }
.mini-item:first-child { border-top: 0; }
.mini-item .grow { min-width: 0; flex: 1; }
.mini-item h3 {
  font-size: 12.5px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mini-item p { font-size: 10.5px; color: var(--muted-2); margin-top: 1px; }

.due {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 600; color: var(--muted);
  white-space: nowrap;
}
.due .icon { width: 11px; height: 11px; stroke-width: 2; }
.due.overdue { color: #fb7185; }
.due.today { color: #fcd34d; }
.due.soon { color: #fdba74; }

.activity { display: flex; flex-direction: column; padding: 2px 0 6px; }
.activity-item { display: flex; gap: 10px; padding: 8px 18px; }
.activity-item .dot-col { display: flex; flex-direction: column; align-items: center; gap: 3px; padding-top: 5px; }
.activity-item .dot-col i { width: 6px; height: 6px; border-radius: 99px; flex: none; }
.activity-item .dot-col .line { width: 1px; flex: 1; background: var(--line-2); }
.activity-item:last-child .dot-col .line { display: none; }
.activity-item p { font-size: 11.5px; color: var(--ink-2); line-height: 1.5; }
.activity-item p b { font-weight: 650; color: #fff; }
.activity-item span { font-size: 10px; color: var(--muted-2); }

.milestone-mini { display: flex; flex-direction: column; padding-bottom: 6px; }
.ms-mini { display: flex; align-items: center; gap: 10px; padding: 8px 18px; }
.ms-mini .flag {
  width: 26px; height: 26px; border-radius: 8px; flex: none;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .04); color: var(--muted-2);
  border: 1px solid var(--line-2);
}
.ms-mini .flag .icon { width: 13px; height: 13px; }
.ms-mini.reached .flag { background: var(--ok-soft); color: #6ee7b7; border-color: rgba(16, 185, 129, .2); }
.ms-mini.overdue .flag { background: var(--danger-soft); color: #fda4af; border-color: rgba(244, 63, 94, .2); }
.ms-mini .grow { min-width: 0; flex: 1; }
.ms-mini h3 { font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-mini p { font-size: 10.5px; color: var(--muted-2); }

/* 风险雷达 */

.risk-list { display: flex; flex-direction: column; gap: 8px; padding: 2px 18px 12px; }
.risk-row {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center; gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .025);
}
.risk-row i {
  width: 26px; height: 26px; border-radius: 7px;
  display: grid; place-items: center;
  font-style: normal; font-size: 12px;
  background: rgba(255, 255, 255, .05);
  color: var(--muted);
}
.risk-row span { font-size: 12px; color: var(--ink-2); }
.risk-row b { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.risk-row.danger { border-color: rgba(244, 63, 94, .18); background: rgba(244, 63, 94, .05); }
.risk-row.danger i { background: var(--danger-soft); color: #fda4af; }
.risk-row.danger b { color: #fb7185; }
.risk-row.warn { border-color: rgba(245, 158, 11, .16); background: rgba(245, 158, 11, .045); }
.risk-row.warn i { background: var(--warn-soft); color: #fcd34d; }
.risk-row.warn b { color: #fcd34d; }
.risk-row.neutral i { background: rgba(148, 163, 184, .1); color: #cbd5e1; }

.risk-tasks { border-top: 1px solid var(--line-2); padding: 4px 0 8px; }
.risk-task {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 18px;
  font-size: 11.5px;
  cursor: pointer;
}
.risk-task:hover { background: rgba(255, 255, 255, .035); }
.risk-task .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.risk-task .due { margin-left: auto; }
.risk-task .grow { font-size: 11.5px; color: var(--ink-2); }

/* 团队负载 */

.workload { display: flex; flex-direction: column; padding: 4px 18px 18px; gap: 11px; }
.wl-row { display: flex; align-items: center; gap: 10px; }
.wl-name { width: 92px; flex: none; display: flex; flex-direction: column; }
.wl-name b { font-size: 12px; font-weight: 600; }
.wl-name span { font-size: 9.5px; color: var(--muted-2); }
.wl-track { flex: 1; height: 7px; border-radius: 99px; background: rgba(255, 255, 255, .05); display: flex; overflow: hidden; }
.wl-seg { height: 100%; }
.wl-seg.doing { background: linear-gradient(90deg, #22d3ee, #06b6d4); }
.wl-seg.todo { background: rgba(148, 163, 184, .45); }
.wl-seg.overdue { background: linear-gradient(90deg, #fb7185, #f43f5e); }
.wl-num { width: 58px; text-align: right; flex: none; font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.3; }
.wl-num b { color: var(--ink); font-weight: 650; font-size: 12px; }
.wl-num em { font-style: normal; font-size: 9px; color: #fb7185; }
.wl-legend { display: flex; gap: 14px; padding: 0 18px 16px; }
.wl-legend span { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; color: var(--muted-2); }
.wl-legend i { width: 6px; height: 6px; border-radius: 2px; }

/* --------------------------------- board -------------------------------- */

.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .spacer { flex: 1; }

.select, .input, .textarea {
  height: 35px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  background: #0b1017;
  font-size: 12px;
  color: var(--ink-2);
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.select { padding-right: 28px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238895ab' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }
.select option { background: #0f141c; color: var(--ink); }
.select:hover, .input:hover, .textarea:hover { border-color: rgba(255, 255, 255, .18); }
.select:focus, .input:focus, .textarea:focus { border-color: var(--accent-line); box-shadow: var(--ring); background: #0d131b; }
.input::placeholder, .textarea::placeholder { color: #4d5a70; }
.textarea { height: auto; min-height: 80px; padding: 9px 10px; resize: vertical; line-height: 1.6; }
input[type="date"] { color-scheme: dark; }

.searchbox { position: relative; }
.searchbox .icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--muted-2); }
.searchbox .input { padding-left: 31px; width: 196px; }

.toggle-pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 35px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 8px;
  background: rgba(255, 255, 255, .02);
  font-size: 12px; color: var(--muted); font-weight: 500;
  cursor: pointer; user-select: none;
  transition: .15s;
}
.toggle-pill input { accent-color: var(--accent); width: 12px; height: 12px; margin: 0; }
.toggle-pill.on { border-color: var(--accent-line); background: var(--accent-soft); color: #ffb066; }

.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }

.board-col {
  background: rgba(255, 255, 255, .022);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  padding: 9px;
  display: flex; flex-direction: column;
  min-height: 160px;
}
.col-head { display: flex; align-items: center; gap: 8px; padding: 4px 5px 9px; }
.col-dot { width: 7px; height: 7px; border-radius: 2px; }
.col-head h2 { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.col-body { display: flex; flex-direction: column; gap: 8px; min-height: 64px; border-radius: 10px; transition: background .15s, box-shadow .15s; padding: 2px; }
.col-body.drag-over { background: rgba(255, 138, 30, .06); box-shadow: inset 0 0 0 1.5px var(--accent-line); }
.col-add {
  margin-top: 8px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  font-size: 11.5px; font-weight: 600; color: #6b7a91;
  border: 1px dashed rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .012);
  transition: .15s;
}
.col-add:hover { color: var(--accent-3); border-color: var(--accent-line); background: rgba(255, 138, 30, .05); }
.col-add .icon { width: 13px; height: 13px; }

.task-card {
  background: linear-gradient(180deg, #121924, #0f151e);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 10px;
  padding: 10px 11px 9px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset;
  cursor: pointer;
  transition: transform .13s, box-shadow .13s, border-color .13s;
  position: relative;
}
.task-card:hover { transform: translateY(-1px); border-color: rgba(255, 138, 30, .32); box-shadow: 0 14px 28px -20px rgba(0, 0, 0, .95); }
.task-card.dragging { opacity: .4; transform: rotate(1.2deg) scale(.99); }
.task-card .tc-head { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }

.prio {
  display: inline-flex; align-items: center; gap: 4px;
  height: 18px; padding: 0 5px; border-radius: 4px;
  font-size: 9.5px; font-weight: 700; letter-spacing: .02em;
  border: 1px solid transparent;
}
.prio::before { content: ""; width: 4px; height: 4px; border-radius: 99px; background: currentColor; }
.prio-urgent { background: rgba(244, 63, 94, .13); color: #fda4af; border-color: rgba(244, 63, 94, .2); }
.prio-high { background: rgba(245, 158, 11, .13); color: #fcd34d; border-color: rgba(245, 158, 11, .2); }
.prio-normal { background: rgba(34, 211, 238, .11); color: #67e8f9; border-color: rgba(34, 211, 238, .18); }
.prio-low { background: rgba(148, 163, 184, .1); color: #cbd5e1; border-color: rgba(148, 163, 184, .16); }

.tc-proj { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 9px; font-weight: 700; letter-spacing: .08em; color: var(--muted-2); }
.tc-proj i { width: 5px; height: 5px; border-radius: 1px; }

.tc-title { font-size: 12.5px; font-weight: 600; line-height: 1.45; word-break: break-word; color: var(--ink); }
.tc-desc {
  margin-top: 3px; font-size: 11px; color: var(--muted-2); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tc-progress { display: flex; align-items: center; gap: 8px; margin-top: 9px; }
.tc-progress .bar { flex: 1; height: 3px; }
.tc-progress span { font-size: 9.5px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.tc-foot { display: flex; align-items: center; gap: 7px; margin-top: 8px; }
.tc-foot .due { margin-left: auto; }
.tc-foot .ms-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 9.5px; color: var(--muted-2); }
.tc-foot .ms-tag .icon { width: 10px; height: 10px; }

.col-empty {
  display: grid; place-items: center;
  min-height: 60px; border-radius: 9px;
  border: 1px dashed rgba(255, 255, 255, .08);
  font-size: 11px; color: #55627a;
}

/* --------------------------------- gantt -------------------------------- */

.gantt-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 3px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line-2); border-radius: 8px; gap: 2px; }
.seg button {
  height: 27px; padding: 0 12px; border-radius: 6px;
  font-size: 11.5px; font-weight: 600; color: var(--muted);
  transition: .15s;
}
.seg button:hover { color: var(--ink); }
.seg button.active { background: rgba(255, 138, 30, .16); color: #ffb066; box-shadow: inset 0 0 0 1px rgba(255, 138, 30, .22); }

.gantt {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #0b1017;
  overflow: hidden;
}
.gantt-scroll { overflow: auto; max-height: calc(100vh - 226px); position: relative; }

.gantt-head {
  display: flex; position: sticky; top: 0; z-index: 6;
  background: #0a0f16; border-bottom: 1px solid var(--line);
  min-width: max-content;
}
.gantt-corner {
  position: sticky; left: 0; z-index: 8;
  width: 264px; flex: none;
  display: flex; align-items: flex-end;
  padding: 9px 13px;
  background: #0a0f16;
  border-right: 1px solid var(--line);
  font-size: 9.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #55627a;
}
.gantt-axis { position: relative; flex: none; height: 52px; }
.axis-month {
  position: absolute; top: 0; height: 25px;
  display: flex; align-items: center; gap: 6px;
  padding-left: 8px;
  font-size: 10.5px; font-weight: 700; color: #cbd5e1; letter-spacing: .02em;
  border-left: 1px solid var(--line);
  white-space: nowrap;
}
.axis-tick {
  position: absolute; bottom: 0; height: 27px;
  display: flex; align-items: center; justify-content: center;
  font-size: 9.5px; color: #5b6b80;
  font-variant-numeric: tabular-nums;
  border-left: 1px dashed rgba(255, 255, 255, .05);
}
.axis-tick.weekend { color: #3f4c60; }
.axis-tick.today { color: var(--accent); font-weight: 700; }

.gantt-body { position: relative; min-width: max-content; }
.g-row { display: flex; min-width: max-content; border-bottom: 1px solid rgba(255, 255, 255, .035); }
.g-row:last-child { border-bottom: 0; }
.g-row:hover .g-label { background: #101722; }
.g-label {
  position: sticky; left: 0; z-index: 4;
  width: 264px; flex: none;
  display: flex; align-items: center; gap: 8px;
  padding: 0 13px;
  background: #0c121a;
  border-right: 1px solid var(--line);
  box-shadow: 10px 0 14px -12px rgba(0, 0, 0, .9);
  min-height: 36px;
  font-size: 12px;
}
.g-label .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.g-label .status-dot { width: 5px; height: 5px; border-radius: 99px; flex: none; }
.g-label .who { margin-left: auto; }
.g-label .tiny { font-size: 10px; color: var(--muted-2); }
.g-row.is-group { background: rgba(255, 255, 255, .018); }
.g-row.is-group .g-label { background: rgba(255, 255, 255, .018); font-weight: 700; gap: 8px; }
.g-row.is-group .g-label .name { color: var(--ink); }
.g-row.is-group .g-label .proj-dot { width: 8px; height: 8px; border-radius: 2px; }
.g-row.is-group .g-label .count { margin-left: auto; font-size: 9.5px; font-weight: 600; color: var(--muted-2); }
.g-track {
  position: relative; flex: none;
  background-image: linear-gradient(to right, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: var(--gridw, var(--dayw, 30px)) 100%;
}
.g-row .g-track:hover { background-color: rgba(255, 255, 255, .012); }

.g-bar {
  position: absolute; top: 50%; transform: translateY(-50%);
  height: 21px; border-radius: 6px;
  display: flex; align-items: center;
  cursor: pointer;
  overflow: hidden;
  border: 1px solid transparent;
  transition: box-shadow .15s, filter .15s;
}
.g-bar:hover { filter: brightness(1.12); box-shadow: 0 8px 18px -12px rgba(0, 0, 0, 1); }
.g-bar-fill { position: absolute; inset: 0 auto 0 0; }
.g-bar-label {
  position: relative; z-index: 2;
  padding: 0 7px; font-size: 10px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.g-bar.st-todo { background: rgba(148, 163, 184, .13); border-color: rgba(148, 163, 184, .22); }
.g-bar.st-todo .g-bar-fill { background: rgba(148, 163, 184, .28); border-radius: 5px; }
.g-bar.st-todo .g-bar-label { color: #cbd5e1; }
.g-bar.st-doing { background: rgba(34, 211, 238, .12); border-color: rgba(34, 211, 238, .3); }
.g-bar.st-doing .g-bar-fill { background: rgba(34, 211, 238, .42); border-radius: 5px; }
.g-bar.st-doing .g-bar-label { color: #d7fbff; }
.g-bar.st-done { background: rgba(16, 185, 129, .11); border-color: rgba(16, 185, 129, .28); }
.g-bar.st-done .g-bar-fill { background: rgba(16, 185, 129, .35); border-radius: 5px; }
.g-bar.st-done .g-bar-label { color: #c7f9e5; }
.g-bar.overdue { box-shadow: 0 0 0 1.5px rgba(244, 63, 94, .6); }
.g-bar.overdue.st-doing { background: rgba(34, 211, 238, .13); border-color: rgba(34, 211, 238, .32); }
.g-bar.overdue.st-doing .g-bar-fill { background: rgba(34, 211, 238, .45); }
.g-bar.overdue.st-doing .g-bar-label { color: #d7fbff; }
.g-bar.overdue.st-todo { background: rgba(148, 163, 184, .13); border-color: rgba(148, 163, 184, .24); }
.g-bar.overdue.st-todo .g-bar-fill { background: rgba(148, 163, 184, .3); }
.g-bar.overdue.st-done { box-shadow: none; }

.g-ms { position: absolute; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 6px; }
.g-ms i {
  width: 9px; height: 9px; flex: none;
  background: var(--accent); transform: rotate(45deg); border-radius: 2px;
  box-shadow: 0 0 0 3px rgba(255, 138, 30, .16);
}
.g-ms.reached i { background: var(--ok); box-shadow: 0 0 0 3px rgba(16, 185, 129, .16); }
.g-ms.overdue i { background: var(--danger); box-shadow: 0 0 0 3px rgba(244, 63, 94, .18); animation: blink 2.2s infinite; }
.g-ms span {
  font-size: 9.5px; font-weight: 600; color: #cbd5e1;
  background: rgba(15, 20, 28, .92); padding: 1px 5px; border-radius: 4px;
  white-space: nowrap; border: 1px solid var(--line);
}
.g-ms.reached span { color: #6ee7b7; border-color: rgba(16, 185, 129, .22); }
.g-ms.overdue span { color: #fda4af; border-color: rgba(244, 63, 94, .25); }

.today-line {
  position: absolute; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(180deg, rgba(255, 138, 30, .9), rgba(255, 138, 30, .28));
  z-index: 3; pointer-events: none;
}
.today-chip {
  position: absolute; top: 30px; transform: translateX(-50%);
  padding: 1px 6px; border-radius: 4px;
  background: var(--accent); color: #1b1207;
  font-size: 9px; font-weight: 800; letter-spacing: .04em; white-space: nowrap;
  box-shadow: 0 3px 10px rgba(255, 138, 30, .5);
  z-index: 9; pointer-events: none;
}

.unscheduled { font-size: 10px; color: var(--muted-2); }

/* ------------------------------ milestones ------------------------------ */

.ms-summary { display: flex; gap: 9px; margin-bottom: 16px; flex-wrap: wrap; }
.ms-stat {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px 9px 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .032), rgba(255, 255, 255, .008));
  border: 1px solid var(--line); border-radius: 10px;
}
.ms-stat .icon-wrap { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; background: rgba(255, 255, 255, .05); color: var(--muted); }
.ms-stat .icon-wrap .icon { width: 14px; height: 14px; }
.ms-stat b { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.ms-stat > div { display: flex; flex-direction: column; }
.ms-stat span { font-size: 10.5px; color: var(--muted); }
.ms-stat.danger .icon-wrap { background: var(--danger-soft); color: #fda4af; }
.ms-stat.warn .icon-wrap { background: var(--warn-soft); color: #fcd34d; }
.ms-stat.ok .icon-wrap { background: var(--ok-soft); color: #6ee7b7; }

.ms-group { margin-bottom: 20px; }
.ms-group-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; padding-left: 2px; }
.ms-group-head i { width: 7px; height: 7px; border-radius: 2px; }
.ms-group-head h2 { font-size: 12.5px; font-weight: 700; }
.ms-group-head span { font-size: 10.5px; color: var(--muted-2); }
.ms-list { display: flex; flex-direction: column; gap: 8px; }

.ms-card {
  display: flex; align-items: center; gap: 13px;
  padding: 13px 15px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .008));
  border: 1px solid var(--line); border-radius: 11px;
  transition: border-color .15s, background .15s;
}
.ms-card:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, .035); }
.ms-card.overdue { border-left: 2px solid var(--danger); }
.ms-card.upcoming { border-left: 2px solid var(--warn); }
.ms-card.reached { border-left: 2px solid var(--ok); }
.ms-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: rgba(255, 255, 255, .05); color: var(--muted-2); flex: none; }
.ms-icon .icon { width: 16px; height: 16px; }
.ms-card.overdue .ms-icon { background: var(--danger-soft); color: #fda4af; }
.ms-card.upcoming .ms-icon { background: var(--warn-soft); color: #fcd34d; }
.ms-card.reached .ms-icon { background: var(--ok-soft); color: #6ee7b7; }
.ms-body { flex: 1; min-width: 0; }
.ms-body h3 { font-size: 13px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.ms-body p { font-size: 11px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-meta { display: flex; align-items: center; gap: 10px; margin-top: 5px; }
.ms-meta span { font-size: 10.5px; color: var(--muted-2); display: inline-flex; align-items: center; gap: 4px; }
.ms-meta .icon { width: 11px; height: 11px; }
.ms-side { display: flex; align-items: center; gap: 7px; flex: none; }

/* ------------------------------- projects ------------------------------- */

.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.project-card { padding: 17px; display: flex; flex-direction: column; gap: 11px; transition: border-color .15s, transform .15s; }
.project-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.pc-top { display: flex; align-items: flex-start; gap: 11px; }
.pc-mark {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  display: grid; place-items: center; color: #0b1119;
  font-size: 10.5px; font-weight: 800; letter-spacing: .04em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}
.pc-name { font-size: 13.5px; font-weight: 700; letter-spacing: .01em; }
.pc-code { font-size: 9px; font-weight: 700; letter-spacing: .14em; color: var(--muted-2); margin-top: 2px; }
.pc-desc { font-size: 11.5px; color: var(--muted); line-height: 1.55; min-height: 34px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-stats { display: flex; gap: 14px; }
.pc-stats div { font-size: 10px; color: var(--muted-2); letter-spacing: .02em; }
.pc-stats b { display: block; font-size: 14.5px; color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; margin-bottom: 1px; }
.pc-dates { display: flex; flex-direction: column; gap: 4px; padding: 8px 0 2px; }
.pc-date-row { display: flex; align-items: center; gap: 6px; font-size: 10.5px; }
.pc-date-label { width: 46px; flex: none; color: var(--muted-2); }
.pc-date-row b { font-size: 11px; font-weight: 600; color: var(--ink); }
.pc-date-row em { margin-left: auto; font-style: normal; color: var(--muted); }
.pc-date-row.actual em { color: var(--accent); }

.pc-foot { display: flex; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.pc-foot .meta { font-size: 10.5px; color: var(--muted-2); }
.pc-foot .spacer { flex: 1; }
.project-card.archived { opacity: .6; }
.project-card.archived:hover { opacity: 1; }

/* -------------------------------- members ------------------------------- */

.members-card { overflow: hidden; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: center; padding: 10px 16px;
  font-size: 9.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted-2); background: rgba(255, 255, 255, .025); border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td { padding: 11px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: rgba(255, 255, 255, .025); }
.member-cell { display: flex; align-items: center; gap: 10px; }
.member-cell b { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.member-cell div > span { display: block; font-size: 10.5px; color: var(--muted-2); font-family: var(--mono); }
.role-tag { display: inline-flex; align-items: center; height: 21px; padding: 0 7px; border-radius: 5px; font-size: 10.5px; font-weight: 700; border: 1px solid transparent; }
.role-admin { background: var(--accent-soft); color: #ffb066; border-color: rgba(255, 138, 30, .22); }
.role-manager { background: var(--info-soft); color: #67e8f9; border-color: rgba(34, 211, 238, .2); }
.role-member { background: rgba(148, 163, 184, .1); color: #cbd5e1; border-color: rgba(148, 163, 184, .16); }

.switch { position: relative; display: inline-block; width: 36px; height: 20px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: rgba(255, 255, 255, .12); transition: .18s; cursor: pointer; }
.switch span::after {
  content: ""; position: absolute; width: 14px; height: 14px; left: 3px; top: 3px;
  background: #cbd5e1; border-radius: 50%; transition: .18s;
}
.switch input:checked + span { background: rgba(16, 185, 129, .75); }
.switch input:checked + span::after { transform: translateX(16px); background: #fff; }
.switch input:disabled + span { opacity: .5; cursor: not-allowed; }

.perm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.perm-item { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.perm-item p { font-size: 11px; color: var(--muted); line-height: 1.6; }

/* --------------------------------- modal -------------------------------- */

.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(3, 6, 11, .74);
  backdrop-filter: blur(5px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 6vh 16px 40px;
  overflow-y: auto;
  animation: fadeIn .16s ease-out;
}
.modal {
  width: min(680px, 100%);
  background: #0f141c;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  animation: popIn .18s cubic-bezier(.2, .9, .3, 1.1);
  overflow: hidden;
}
.modal.wide { width: min(820px, 100%); }
.modal.sm { width: min(440px, 100%); }
.modal-head {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 19px 21px 13px;
  border-bottom: 1px solid var(--line-2);
}
.modal-head h2 { font-size: 15.5px; font-weight: 700; letter-spacing: .01em; }
.modal-head p { font-size: 11px; color: var(--muted-2); margin-top: 2px; }
.modal-head .icon-btn { margin-left: auto; margin-top: -4px; }
.modal-body { padding: 17px 21px 19px; }
.modal-foot {
  display: flex; align-items: center; gap: 9px;
  padding: 13px 21px;
  background: rgba(255, 255, 255, .022);
  border-top: 1px solid var(--line-2);
}
.modal-foot .spacer { flex: 1; }

.field { display: flex; flex-direction: column; gap: 5px; }
.field > label { font-size: 10.5px; font-weight: 600; color: var(--muted); letter-spacing: .04em; }
.field .input, .field .select, .field .textarea { width: 100%; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.field-row.three { grid-template-columns: 1fr 1fr 1fr; }
.form-stack { display: flex; flex-direction: column; gap: 13px; }

.range-row { display: flex; align-items: center; gap: 11px; }
.range-row input[type="range"] {
  flex: 1; height: 4px; border-radius: 99px;
  -webkit-appearance: none; appearance: none;
  background: rgba(255, 255, 255, .12);
  outline: none; cursor: pointer;
}
.range-row input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 99px; background: transparent; }
.range-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px; margin-top: -5px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #12161d;
  box-shadow: 0 0 0 3px rgba(255, 138, 30, .18);
}
.range-value { width: 42px; text-align: right; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent-3); }

.form-error {
  display: none; align-items: center; gap: 7px;
  padding: 8px 10px; margin-bottom: 11px;
  background: var(--danger-soft); color: #fda4af;
  border: 1px solid rgba(244, 63, 94, .25);
  border-radius: 8px; font-size: 11.5px;
}
.form-error.show { display: flex; }
.form-error .icon { width: 13px; height: 13px; }

.task-meta { display: flex; flex-wrap: wrap; gap: 5px 12px; margin-top: 13px; padding-top: 11px; border-top: 1px dashed var(--line); font-size: 10.5px; color: var(--muted-2); }
.task-meta b { color: var(--muted); font-weight: 600; }

.history { margin-top: 13px; padding-top: 11px; border-top: 1px dashed var(--line); }
.history-title { font-size: 9.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 7px; }
.history-item { display: flex; gap: 8px; font-size: 11px; color: var(--muted); padding: 3px 0; line-height: 1.5; }
.history-item b { color: var(--ink-2); font-weight: 600; }
.history-item time { margin-left: auto; color: #4d5a70; font-size: 10px; white-space: nowrap; }

/* profile */

.profile-head { display: flex; align-items: center; gap: 13px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px dashed var(--line); }
.profile-head .avatar { width: 48px; height: 48px; font-size: 16px; }
.profile-head b { display: block; font-size: 14px; }
.profile-head span { font-size: 11px; color: var(--muted-2); }
.profile-section { font-size: 9.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); margin: 16px 0 10px; }
.profile-section:first-of-type { margin-top: 0; }

/* --------------------------------搜索面板 ------------------------------- */

.cmdk-backdrop {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(3, 6, 11, .72);
  backdrop-filter: blur(6px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 12vh 16px 40px;
  animation: fadeIn .12s ease-out;
}
.cmdk {
  width: min(620px, 100%);
  background: #0f141c;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: popIn .16s cubic-bezier(.2, .9, .3, 1.1);
}
.cmdk-input { display: flex; align-items: center; gap: 10px; padding: 13px 15px; border-bottom: 1px solid var(--line-2); }
.cmdk-input .icon { width: 17px; height: 17px; color: var(--accent); }
.cmdk-input input {
  flex: 1; border: 0; outline: none; background: none;
  font-size: 14px; color: var(--ink);
}
.cmdk-input input::placeholder { color: #4d5a70; }
.cmdk-input kbd {
  font-family: var(--mono); font-size: 9px; padding: 2px 5px; border-radius: 4px;
  border: 1px solid var(--line); color: var(--muted-2);
}
.cmdk-body { max-height: 52vh; overflow-y: auto; padding: 6px; }
.cmdk-group + .cmdk-group { margin-top: 4px; }
.cmdk-label { font-size: 9px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #4d5a70; padding: 7px 9px 5px; }
.cmdk-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 8px 9px; border-radius: 8px;
  text-align: left; transition: background .1s;
}
.cmdk-item.active { background: rgba(255, 138, 30, .12); box-shadow: inset 0 0 0 1px rgba(255, 138, 30, .2); }
.cmdk-item .ic {
  width: 26px; height: 26px; border-radius: 7px; flex: none;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .05); color: var(--muted);
}
.cmdk-item .ic .icon { width: 13px; height: 13px; }
.cmdk-item .ic i { width: 6px; height: 6px; border-radius: 2px; }
.cmdk-item .txt { min-width: 0; flex: 1; }
.cmdk-item b { display: block; font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-item span { display: block; font-size: 10.5px; color: var(--muted-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-item .hint { font-size: 9.5px; color: #4d5a70; font-family: var(--mono); }
.cmdk-foot { display: flex; gap: 12px; padding: 8px 14px; border-top: 1px solid var(--line-2); font-size: 10px; color: #4d5a70; }

/* --------------------------------- toast -------------------------------- */

.toast-root {
  position: fixed; right: 20px; bottom: 20px; z-index: 200;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-end;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 13px 9px 10px;
  background: #141b25; color: var(--ink-2);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-size: 12px; font-weight: 500;
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .95);
  animation: toastIn .22s cubic-bezier(.2, .9, .3, 1.1);
  pointer-events: auto;
}
.toast .icon { width: 14px; height: 14px; }
.toast.success .icon { color: #34d399; }
.toast.error .icon { color: #fb7185; }
.toast.leaving { animation: toastOut .18s ease-in forwards; }

/* --------------------------------- login -------------------------------- */

.login {
  min-height: 100vh; width: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
  position: relative;
  overflow: hidden;
}
.login::before {
  content: "";
  position: absolute; width: 720px; height: 720px;
  top: -320px; left: 50%; transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255, 138, 30, .16), transparent 62%);
  pointer-events: none;
}
.login::after {
  content: "";
  position: absolute; width: 900px; height: 500px;
  bottom: -320px; left: 50%; transform: translateX(-50%);
  background: radial-gradient(circle, rgba(34, 211, 238, .07), transparent 65%);
  pointer-events: none;
}
.login-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(77, 208, 201, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 208, 201, .05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 78%);
  pointer-events: none;
}

.login-shell { position: relative; z-index: 2; width: min(392px, 100%); }

.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 38px; }
.login-brand .brand-mark { width: 42px; height: 42px; border-radius: 12px; font-size: 20px; }
.login-brand strong { display: block; font-size: 19px; font-weight: 700; letter-spacing: .04em; color: #fff; }
.login-brand span { display: block; font-size: 8px; letter-spacing: .22em; color: #56637a; margin-top: 3px; text-transform: uppercase; }

.login h1 { font-size: 30px; font-weight: 800; letter-spacing: .03em; line-height: 1.25; }
.login .lead { margin-top: 8px; font-size: 12px; color: var(--muted-2); letter-spacing: .02em; }

.login-card {
  margin-top: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .012));
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 20px;
  box-shadow: 0 30px 60px -40px rgba(0, 0, 0, 1);
}
.login-card .field + .field { margin-top: 12px; }
.login-card .input { height: 40px; border-radius: 8px; }
.login-card .btn { height: 40px; width: 100%; margin-top: 16px; font-size: 13px; }
.login-error {
  display: none; align-items: center; gap: 7px;
  margin-bottom: 12px; padding: 8px 10px;
  background: var(--danger-soft); color: #fda4af;
  border: 1px solid rgba(244, 63, 94, .25);
  border-radius: 8px; font-size: 11.5px;
}
.login-error.show { display: flex; }
.login-error .icon { width: 13px; height: 13px; }

.login-note { margin-top: 14px; text-align: center; font-size: 10.5px; color: #4d5a70; letter-spacing: .02em; }

.demo { margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--line); }
.demo p { font-size: 9px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #4d5a70; margin-bottom: 8px; }
.demo-list { display: flex; flex-wrap: wrap; gap: 5px; }
.demo-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px 3px 4px; border-radius: 7px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .02);
  font-size: 10.5px; color: var(--muted); font-weight: 500;
  transition: .15s;
}
.demo-btn:hover { border-color: var(--accent-line); background: var(--accent-soft); color: #ffb066; }
.demo-btn .avatar { width: 16px; height: 16px; font-size: 8px; }

.login-foot { margin-top: 26px; text-align: center; font-size: 9.5px; color: #3f4c60; letter-spacing: .04em; }

/* --------------------------------- misc --------------------------------- */

.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 20px; text-align: center; }
.empty-icon { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: rgba(255, 255, 255, .04); color: #55627a; }
.empty-icon .icon { width: 19px; height: 19px; }
.empty h3 { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.empty p { font-size: 11px; color: var(--muted-2); max-width: 260px; }

.muted { color: var(--muted); }
.tiny { font-size: 10.5px; }
.mono { font-family: var(--mono); }
.spacer { flex: 1; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }
.hide-sm { display: inline; }

.view { animation: viewIn .2s ease-out; }

.color-row { display: flex; gap: 8px; flex-wrap: wrap; }
.color-dot {
  width: 25px; height: 25px; border-radius: 7px;
  background: var(--c); position: relative; cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .3);
  transition: transform .12s, box-shadow .12s;
}
.color-dot:hover { transform: translateY(-1px); }
.color-dot input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.color-dot:has(input:checked) { box-shadow: 0 0 0 2px #0f141c, 0 0 0 3.5px var(--c); }

.alert-strip {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  margin-bottom: 14px;
  border: 1px solid rgba(244, 63, 94, .22);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(244, 63, 94, .08), rgba(244, 63, 94, .02));
}
.alert-icon {
  width: 32px; height: 32px; border-radius: 8px; flex: none;
  display: grid; place-items: center;
  background: var(--danger-soft); color: #fb7185;
}
.alert-icon .icon { width: 16px; height: 16px; }
.alert-strip b { display: block; font-size: 12.5px; color: #fecdd3; }
.alert-strip .grow span { display: block; font-size: 10.5px; color: #fda4af; opacity: .85; }

/* ------------------------------ 经营与计划 ------------------------------ */

.chart-wrap { padding: 2px 18px 2px; }
.chart-wrap.small { padding-bottom: 0; }
.chart-svg { width: 100%; height: auto; display: block; }
.chart-tick { fill: #64748b; font-size: 10px; font-family: var(--font); }
.chart-flag { fill: #ffb066; font-size: 10px; font-weight: 700; font-family: var(--font); }
.chart-today { fill: #ff8a1e; font-size: 9px; font-weight: 700; font-family: var(--font); }
.chart-legend { display: flex; gap: 16px; padding: 2px 18px 15px; justify-content: center; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--muted); }
.chart-legend i { width: 12px; height: 3px; border-radius: 2px; }
.chart-empty { display: grid; place-items: center; height: 190px; color: var(--muted-2); font-size: 12px; }

.table-wrap { overflow-x: auto; padding-bottom: 4px; }
.table.compact th { padding: 8px 14px; font-size: 9px; }
.table.compact td { padding: 8px 14px; font-size: 11.5px; }
.table .num { text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-link { cursor: pointer; }
.row-danger { background: rgba(244, 63, 94, .05); }
.row-danger:hover { background: rgba(244, 63, 94, .08) !important; }
.cell-project { display: flex; align-items: center; gap: 9px; min-width: 0; }
.cell-project i { width: 7px; height: 7px; border-radius: 2px; flex: none; }
.cell-project b { display: block; font-size: 11.5px; font-weight: 600; }
.cell-project span { display: block; font-size: 9.5px; color: var(--muted-2); }
.cell-strong { font-size: 11.5px; font-weight: 600; }
.table-progress { display: flex; align-items: center; gap: 8px; min-width: 112px; }
.table-progress .bar { flex: 1; height: 4px; }
.table-progress span { width: 34px; text-align: right; font-size: 9.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

.stage-badge {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px;
  border-radius: 5px; font-size: 9.5px; font-weight: 700; letter-spacing: .04em;
  color: var(--stage, #94a3b8);
  background: color-mix(in srgb, var(--stage, #94a3b8) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--stage, #94a3b8) 30%, transparent);
  white-space: nowrap;
}

.stage-stack { display: flex; height: 9px; margin: 4px 18px 14px; gap: 2px; border-radius: 99px; overflow: hidden; background: rgba(255, 255, 255, .05); }
.stage-stack span { height: 100%; }
.stage-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 0 18px 16px; }
.stage-row { display: flex; align-items: center; gap: 7px; font-size: 10.5px; color: var(--muted); }
.stage-row i { width: 7px; height: 7px; border-radius: 2px; flex: none; }
.stage-row span { flex: 1; }
.stage-row b { color: var(--ink); font-variant-numeric: tabular-nums; }
.muted-row { opacity: .4; }

.alert-list { display: flex; flex-direction: column; padding-bottom: 6px; }
.alert-item { display: flex; gap: 10px; align-items: flex-start; padding: 9px 18px; border-bottom: 1px solid var(--line-2); }
.alert-item:last-child { border-bottom: 0; }
.alert-item:hover { background: rgba(255, 255, 255, .03); }
.alert-item .ic { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; flex: none; background: rgba(255, 255, 255, .05); color: var(--muted); }
.alert-item .ic.danger { background: var(--danger-soft); color: #fda4af; }
.alert-item .ic.warn { background: var(--warn-soft); color: #fcd34d; }
.alert-item .ic .icon { width: 12px; height: 12px; }
.alert-item b { display: block; font-size: 11.5px; font-weight: 600; line-height: 1.45; }
.alert-item span { display: block; font-size: 9.5px; color: var(--muted-2); margin-top: 1px; }

.back-link { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted-2); margin-bottom: 12px; }
.back-link:hover { color: var(--accent-3); }
.back-link .icon { width: 12px; height: 12px; }
.detail-head { display: flex; align-items: center; gap: 13px; margin-bottom: 16px; }
.detail-head .pc-mark.big { width: 46px; height: 46px; border-radius: 12px; font-size: 12px; }
.detail-title h2 { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 9px; letter-spacing: .01em; }
.detail-title p { font-size: 10.5px; color: var(--muted-2); margin-top: 3px; }
.detail-actions { display: flex; align-items: center; gap: 8px; }

.pc-title { flex: 1; min-width: 0; }
.pc-title b { display: block; font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-title span { display: block; font-size: 9.5px; color: var(--muted-2); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-stats.four { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pc-stats.four div { font-size: 9px; color: var(--muted-2); line-height: 1.35; letter-spacing: .02em; }
.pc-stats.four b { display: block; font-size: 14px; color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.pc-progress { display: flex; flex-direction: column; gap: 5px; }
.pc-progress-head { display: flex; justify-content: space-between; font-size: 9.5px; color: var(--muted-2); letter-spacing: .04em; }
.pc-progress-head b { color: var(--ink); font-variant-numeric: tabular-nums; }
.pc-actions {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  display: flex; gap: 1px; padding: 2px;
  background: #141b25; border: 1px solid var(--line); border-radius: 8px;
  opacity: 0; pointer-events: none; transition: opacity .14s;
}
.project-card { position: relative; }
.project-card:hover .pc-actions { opacity: 1; pointer-events: auto; }
.project-card:hover .pc-top .stage-badge { opacity: 0; }

.progress-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 0 18px 12px; }
.ps-item { background: rgba(255, 255, 255, .03); border: 1px solid var(--line-2); border-radius: 9px; padding: 8px 10px; }
.ps-item span { display: block; font-size: 9px; color: var(--muted-2); letter-spacing: .08em; }
.ps-item b { display: block; font-size: 17px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.ps-item.bad b { color: #fb7185; }
.ps-item.good b { color: #34d399; }

.finance-block { display: flex; flex-direction: column; gap: 8px; padding: 0 18px 12px; }
.fb-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 10.5px; color: var(--muted); }
.fb-row b { color: var(--ink); font-size: 13px; font-variant-numeric: tabular-nums; }

.kind-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; padding: 0 18px 12px; }
.kind-card { border: 1px solid var(--line-2); border-radius: 9px; padding: 8px 9px; display: flex; flex-direction: column; gap: 6px; }
.kind-head { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); }
.kind-head b { color: var(--ink); font-variant-numeric: tabular-nums; }

.collection-list { display: flex; flex-direction: column; gap: 12px; padding: 0 18px 16px; }
.collection-row { display: flex; flex-direction: column; gap: 5px; }
.cr-head { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); }
.cr-head b { color: var(--ink); font-variant-numeric: tabular-nums; }
.cr-sub { display: flex; justify-content: space-between; font-size: 9px; color: var(--muted-2); }

.dep-layer { position: absolute; top: 0; pointer-events: none; z-index: 2; overflow: visible; }
.g-bar { z-index: 3; }
.g-who { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; }

.plan-label { flex-direction: column; justify-content: center; align-items: stretch; gap: 3px; padding: 5px 12px; position: sticky; }
.pl-main { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pl-code { font-family: var(--mono); font-size: 8.5px; color: var(--muted-2); flex: none; }
.pl-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }
.pl-pct { font-size: 9.5px; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.pl-bar { height: 2px; border-radius: 99px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.pl-bar i { display: block; height: 100%; border-radius: 99px; opacity: .85; transition: width .3s; }
.pl-weight { position: absolute; right: 10px; bottom: 3px; font-size: 8.5px; color: #46536a; }
.pl-actions { display: none; margin-left: auto; gap: 1px; }
.g-row:hover .pl-actions { display: flex; }
.g-row:hover .pl-pct { display: none; }
.plan-row { cursor: pointer; }
.plan-row:hover .g-label { background: #101722; }
.pl-actions .icon-btn { width: 21px; height: 21px; border-radius: 5px; }
.pl-actions .icon { width: 11px; height: 11px; }

.dep-list { display: flex; flex-direction: column; gap: 6px; }
.dep-row { display: flex; align-items: center; gap: 6px; }
.dep-row .dep-select { flex: 1; min-width: 0; }
.dep-row .dep-lag { width: 62px; flex: none; }
.dep-row .tiny { flex: none; }

.quick-row { display: flex; gap: 6px; margin-top: 7px; }
.quick-row .chip { cursor: pointer; }
.quick-row .chip:hover { border-color: var(--accent-line); color: var(--accent-3); }

/* ------------------------------- responsive ------------------------------ */

@media (max-width: 1420px) {
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1240px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-8, .span-4, .span-5, .span-6, .span-7 { grid-column: span 12; }
  .search-trigger { min-width: 0; width: 36px; padding: 0; justify-content: center; }
  .search-trigger span, .search-trigger kbd { display: none; }
}

@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 60;
    width: 256px; transform: translateX(-100%);
    transition: transform .22s ease;
  }
  .sidebar.open { transform: none; box-shadow: 0 0 60px rgba(0, 0, 0, .7); }
  body.nav-open .sidebar-scrim { display: block; }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 12px 16px; }
  .content { padding: 16px 16px 44px; }
  .board { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
  .table th:nth-child(3), .table td:nth-child(3) { display: none; }
  .date-chip { display: none; }
  .gantt-scroll { max-height: none; }
  .gantt-corner, .g-label { width: 196px; }
  .ms-card { flex-wrap: wrap; }
  .perm-grid { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  .user-pop { right: 16px; }
}

@media (max-width: 640px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .kpi { padding: 12px; gap: 9px; }
  .kpi-icon { width: 30px; height: 30px; border-radius: 8px; }
  .kpi-icon .icon { width: 14px; height: 14px; }
  .kpi-label { font-size: 9.5px; }
  .kpi-value { font-size: 20px; }
  .kpi-sub { font-size: 9.5px; line-height: 1.45; }
  .topbar-title h1 { font-size: 16px; }
  .topbar-title p { display: none; }
  .field-row, .field-row.three { grid-template-columns: 1fr; }
  .content { padding: 12px 12px 40px; }
  .modal-body { padding: 15px; }
  .login h1 { font-size: 25px; }
}

/* ------------------------------- animations ------------------------------ */

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(.9); opacity: .7; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------------------------- 重点工作台账 ---------------------------- */

.kt-summary { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 10px; }
.kt-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel);
  color: var(--muted); font-size: 11px; font-weight: 600;
}
.kt-chip b { font-variant-numeric: tabular-nums; color: var(--ink); }
.kt-chip:hover { border-color: var(--line-3); color: var(--ink); }
.kt-chip.on { border-color: rgba(255,138,30,.55); background: rgba(255,138,30,.12); color: var(--accent); }
.kt-chip.on b { color: var(--accent); }
.kt-chip.danger.on { border-color: rgba(244,63,94,.55); background: rgba(244,63,94,.12); color: #f43f5e; }
.kt-chip.danger.on b { color: #f43f5e; }
.kt-chip.warn.on { border-color: rgba(245,158,11,.55); background: rgba(245,158,11,.12); color: #f59e0b; }
.kt-chip.warn.on b { color: #f59e0b; }
.kt-chip.ok.on { border-color: rgba(16,185,129,.55); background: rgba(16,185,129,.12); color: #10b981; }
.kt-chip.ok.on b { color: #10b981; }
.kt-chip.late.on { border-color: rgba(167,139,250,.55); background: rgba(167,139,250,.12); color: #a78bfa; }
.kt-chip.late.on b { color: #a78bfa; }
.kt-chip.star.on { border-color: rgba(250,204,21,.6); background: rgba(250,204,21,.12); color: #facc15; }
.kt-chip.star.on b { color: #facc15; }

.table-scroll { overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.kt-table { min-width: 1160px; }
.kt-table thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--panel-2, #0e131c);
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted-2); font-weight: 700; padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.kt-table tbody td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.kt-row { cursor: pointer; }
.kt-row:hover td { background: rgba(255,255,255,.025); }
.kt-star-cell { width: 34px; text-align: center; }
.kt-star {
  background: none; border: 0; cursor: pointer; font-size: 17px; line-height: 1;
  color: var(--muted-2); padding: 2px;
}
.kt-star:hover { color: #facc15; transform: scale(1.12); }
.kt-star.on { color: #facc15; }

.kt-status {
  display: inline-flex; align-items: center; white-space: nowrap;
  padding: 3px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700;
  border: 1px solid transparent;
}
.kt-status.danger { color: #f43f5e; background: rgba(244,63,94,.12); border-color: rgba(244,63,94,.3); }
.kt-status.warn { color: #f59e0b; background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.3); }
.kt-status.doing { color: #22d3ee; background: rgba(34,211,238,.1); border-color: rgba(34,211,238,.28); }
.kt-status.ok { color: #10b981; background: rgba(16,185,129,.1); border-color: rgba(16,185,129,.28); }
.kt-status.late { color: #a78bfa; background: rgba(167,139,250,.1); border-color: rgba(167,139,250,.28); }
.kt-status.muted { color: var(--muted); background: rgba(148,163,184,.08); border-color: var(--line); }
.kt-hint { display: block; margin-top: 4px; font-size: 10px; color: var(--muted-2); white-space: nowrap; }

.kt-main b { font-size: 12px; color: var(--ink); font-weight: 600; }
.kt-main p { margin: 3px 0 0; font-size: 10.5px; color: var(--muted-2); max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kt-main .ms-tag { margin-left: 6px; }

.kt-proj { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kt-proj i { width: 6px; height: 6px; border-radius: 2px; display: inline-block; flex: none; }
.kt-edit-progress { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; color: var(--muted-2); }
.kt-progress-input {
  width: 58px; padding: 4px 6px; text-align: right;
  background: var(--panel-2, #0e131c); border: 1px solid var(--line-3);
  border-radius: 7px; color: var(--ink); font-size: 11px; font-variant-numeric: tabular-nums;
}
.kt-progress-input:focus { outline: none; border-color: rgba(255,138,30,.6); box-shadow: 0 0 0 2px rgba(255,138,30,.12); }
.kt-prio { height: 27px; padding: 0 6px; font-size: 10.5px; min-width: 62px; }
.kt-source { height: 27px; padding: 0 6px; font-size: 10.5px; min-width: 76px; background: transparent; }
.kt-source-chip {
  display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px;
  font-size: 10.5px; font-weight: 600; border: 1px solid transparent; white-space: nowrap;
}
.kt-date-input {
  width: 112px; padding: 4px 6px; background: var(--panel-2, #0e131c);
  border: 1px solid var(--line-3); border-radius: 7px; color: var(--ink); font-size: 10.5px;
}
.kt-date-input:focus { outline: none; border-color: rgba(255,138,30,.6); box-shadow: 0 0 0 2px rgba(255,138,30,.12); }
.kt-note-cell { min-width: 220px; }
.kt-note-input {
  width: 100%; min-width: 168px; padding: 5px 8px; background: var(--panel-2, #0e131c);
  border: 1px solid var(--line-3); border-radius: 7px; color: var(--ink); font-size: 11px;
}
.kt-note-input::placeholder { color: var(--muted-2); }
.kt-note-input:focus { outline: none; border-color: rgba(255,138,30,.6); box-shadow: 0 0 0 2px rgba(255,138,30,.12); }
.kt-note-text { display: block; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: var(--muted); }
.kt-note-wrap { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.kt-note-count { background: none; border: 0; padding: 0; color: var(--accent); font-size: 10px; cursor: pointer; opacity: .9; }
.kt-note-count:hover { text-decoration: underline; }
.kt-history { display: flex; flex-direction: column; gap: 10px; max-height: 320px; overflow: auto; margin-bottom: 14px; }
.kt-hist-item { border-left: 2px solid rgba(255,138,30,.45); padding-left: 10px; }
.kt-hist-meta { display: flex; gap: 8px; font-size: 10px; color: var(--muted-2); }
.kt-hist-meta b { color: var(--ink); font-weight: 600; }
.kt-hist-note { margin-top: 3px; font-size: 12px; color: var(--ink); white-space: pre-wrap; line-height: 1.55; }
.kt-owner { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.kt-date { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.kt-progress { display: flex; align-items: center; gap: 6px; min-width: 105px; }
.kt-progress .bar { width: 68px; }
.kt-progress span { font-size: 10px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.kt-empty { padding: 40px; text-align: center; color: var(--muted-2); font-size: 12px; }

/* -------------------------- 每日追踪事项（表格版） -------------------------- */

.kt-panel { margin-top: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.kt-panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.kt-panel-head h2 { margin: 0; font-size: 14px; color: var(--ink); letter-spacing: .02em; }
.kt-tip { margin: 4px 0 0; font-size: 10.5px; color: var(--muted-2); }
.kt-total { flex: none; font-size: 10.5px; color: var(--muted); background: var(--panel-2, #0e131c); border: 1px solid var(--line); padding: 4px 10px; border-radius: 999px; }
.kt-table { min-width: 1380px; }
.kt-idx { width: 48px; color: var(--muted-2); font-size: 10px; font-variant-numeric: tabular-nums; }
.kt-title-input {
  width: 100%; padding: 3px 5px; margin-left: -5px;
  background: transparent; border: 1px solid transparent; border-radius: 6px;
  color: var(--ink); font-size: 12px; font-weight: 600;
}
.kt-title-input:hover { border-color: var(--line-3); }
.kt-title-input:focus { outline: none; border-color: rgba(255,138,30,.6); background: var(--panel-2, #0e131c); }
.kt-draft-project { margin-top: 4px; height: 25px; font-size: 10px; max-width: 190px; }
.kt-assignee { height: 27px; padding: 0 6px; font-size: 10.5px; min-width: 88px; }
.kt-status-cell {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  max-width: 280px; background: none; border: 0; padding: 0; cursor: pointer; text-align: left;
}
.kt-status-cell b { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; font-weight: 600; color: var(--ink); }
.kt-status-cell span { font-size: 9.5px; color: var(--muted-2); white-space: nowrap; }
.kt-status-cell:hover b { color: var(--accent); }
.kt-actions { white-space: nowrap; }
.kt-act { padding: 3px 9px; border-radius: 6px; font-size: 10px; cursor: pointer; background: transparent; border: 1px solid var(--line-3); color: var(--muted); }
.kt-act.done { color: #10b981; border-color: rgba(16,185,129,.4); }
.kt-act.done:hover { background: rgba(16,185,129,.12); }
.kt-act.undo { color: var(--muted); }
.kt-act.undo:hover { color: var(--ink); border-color: var(--line-3); }
.kt-draft td { background: rgba(255,138,30,.05); }
.kt-add-row {
  display: flex; align-items: center; gap: 6px; width: 100%;
  padding: 12px 18px; background: none; border: 0; border-top: 1px dashed var(--line-3);
  color: var(--muted); font-size: 11px; cursor: pointer;
}
.kt-add-row:hover { color: var(--accent); background: rgba(255,138,30,.05); }


/* 追踪事项表格压缩，保证 1512 宽度下完整显示 */
.kt-table { min-width: 1180px; }
.kt-table thead th, .kt-table tbody td { padding: 8px 6px; }
.kt-date-input { width: 102px; }
.kt-status-cell b { max-width: 165px; }
.kt-status-cell span { font-size: 9px; }
.kt-source { min-width: 70px; }
.kt-prio { min-width: 52px; }
.kt-assignee { min-width: 74px; }
.kt-title-input { font-size: 11.5px; }


/* ---------------------- 进度模块：子菜单 / 分析与人力 ---------------------- */

.nav-sub { display: flex; flex-direction: column; gap: 2px; margin: 1px 0 6px 34px; }
.nav-subitem { padding: 5px 9px; border-radius: 7px; font-size: 11px; color: var(--muted-2); border: 1px solid transparent; }
.nav-subitem:hover { color: var(--ink); background: rgba(255,255,255,.035); }
.nav-subitem.active { color: var(--accent); background: rgba(255,138,30,.1); border-color: rgba(255,138,30,.22); }
.nav-caret { margin-left: auto; font-size: 9px; color: var(--muted-2); }

.crit-badge { display: inline-flex; padding: 1px 6px; border-radius: 5px; font-size: 9px; font-weight: 700; color: #f43f5e; background: rgba(244,63,94,.12); border: 1px solid rgba(244,63,94,.3); }
.float-tag { display: inline-flex; padding: 1px 6px; border-radius: 5px; font-size: 9px; color: var(--muted); background: rgba(148,163,184,.08); border: 1px solid var(--line); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.chart-card { margin-top: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.card-title { margin: 0 0 10px; font-size: 12.5px; font-weight: 700; color: var(--ink); letter-spacing: .02em; }
.card-head .card-title { margin-bottom: 0; }
.mini-table { font-size: 11px; }
.mini-table th { font-size: 9.5px; }
.mini-table td, .mini-table th { padding: 7px 8px; }
.pos { color: #10b981; }
.neg { color: #f43f5e; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.btn.small { padding: 4px 9px; font-size: 10.5px; height: 27px; }
.kpi-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi-grid.five { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.fb-table { min-width: 1080px; }
.fb-title { font-size: 11.5px; font-weight: 600; color: var(--ink); }
.fb-title span { display: block; margin-top: 2px; font-size: 9px; color: var(--muted-2); font-weight: 400; }
.fb-table .fb-input { height: 27px; padding: 2px 4px; font-size: 10.5px; width: 64px; }
.fb-table .fb-note { width: 78px; }
.line-chart { display: block; }

@media (max-width: 1100px) {
  .two-col { grid-template-columns: 1fr; }
  .kpi-grid.three { grid-template-columns: 1fr; }
}

.progress-switch { height: 30px; min-width: 96px; font-size: 10.5px; margin-right: 4px; }

.progress-switch-wrap.hidden { display: none; }

.fb-sub { display: block; margin-top: 2px; font-size: 9px; color: var(--muted-2); font-weight: 400; }


/* 计划网络：行内编辑 + 更窄横道 */
.pl-edit { display: flex; align-items: center; gap: 6px; margin-top: 3px; min-width: 0; }
.pl-edit label { display: flex; align-items: center; gap: 3px; font-size: 8.5px; color: var(--muted-2); white-space: nowrap; }
.pl-input {
  height: 21px; width: 96px; padding: 0 4px; border-radius: 4px;
  background: var(--panel-2, #0e131c); border: 1px solid var(--line-3);
  color: var(--ink); font-size: 9.5px;
}
.pl-input:focus { outline: none; border-color: rgba(255,138,30,.6); }
.pl-edit [data-pred] { width: 132px; }
.pl-static { font-size: 8.5px; color: var(--muted-2); }


/* 计划编制与反馈合并 / 甘特隐藏 / 进度看板 */
.pl-feedback { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.pl-fb-pct { min-width: 52px; font-size: 9px; color: var(--muted); }
.pl-feedback .pl-qty { width: 76px; }
.pl-feedback .pl-pct { width: 52px; }
.pl-feedback .btn.small { height: 21px; padding: 0 8px; font-size: 9px; }
.gantt.hide-gantt .gantt-axis,
.gantt.hide-gantt .g-track,
.gantt.hide-gantt .dep-layer,
.gantt.hide-gantt .today-line,
.gantt.hide-gantt .today-chip { display: none !important; }
.gantt.hide-gantt .gantt-scroll { overflow-x: hidden; }
.gantt.hide-gantt .plan-label { width: 100% !important; flex: 1; }
.gantt.hide-gantt .gantt-corner { width: 100% !important; }
.pb-stats { display: flex; gap: 26px; }
.pb-stats b { display: block; font-size: 22px; color: var(--ink); font-variant-numeric: tabular-nums; }
.pb-stats span { font-size: 10px; color: var(--muted-2); }
.pb-status { display: flex; flex-wrap: wrap; gap: 8px; }


.wbs-badge { display:inline-flex; padding:1px 5px; border-radius:4px; font-size:8px; font-weight:700; color:#a78bfa; background:rgba(167,139,250,.12); border:1px solid rgba(167,139,250,.3); }
.g-bar.is-group { background: rgba(167,139,250,.18) !important; border:1px solid rgba(167,139,250,.45); }
.dep-type { width: 64px; height: 28px; padding: 0 4px; font-size: 10px; }
.pl-actual { gap: 6px; }
.pl-actual .pl-input { width: 96px; }
.pl-actual [data-qty] { width: 72px; }


/* Project 风格计划表 */
.pj-gantt .gantt-corner { padding: 0; }
.pj-grid {
  display: grid; width: 100%; height: 100%; align-items: stretch;
  grid-template-columns: 50px 86px 176px 46px 96px 96px 100px 96px 96px 62px 50px 112px;
}
.pj-head { font-size: 9px; color: var(--muted-2); background: #0b1119; }
.pj-head .pj-c { justify-content: center; }
.pj-head .pj-c:nth-child(2) { justify-content: center; }
.pj-head .pj-c:nth-child(3) { justify-content: flex-start; }
.pj-c {
  display: flex; align-items: center; justify-content: center; min-width: 0; height: 100%;
  padding: 0 5px; border-right: 1px solid rgba(255,255,255,.05);
  font-size: 10px; color: var(--ink-2); white-space: nowrap; overflow: hidden;
}
.pj-num { justify-content: flex-end; font-variant-numeric: tabular-nums; }
.pj-label { padding: 0 !important; }
.pj-row .pj-grid { border-bottom: 1px solid rgba(255,255,255,.045); }
.pj-name b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.pj-name .pj-code { font-family: var(--mono); font-size: 8px; color: var(--muted-2); margin-right: 4px; font-style: normal; }
.pj-row.is-summary .pj-name b { font-weight: 700; color: var(--ink); }
.pj-row.is-summary { background: rgba(255,255,255,.022); }
.pj-expand { color: var(--muted); font-size: 10px; width: 16px; height: 16px; line-height: 1; }
.pj-dot { color: #334155; font-size: 8px; }
.pj-input {
  width: 100%; height: 24px; padding: 0 2px; border: 1px solid transparent;
  border-radius: 3px; background: transparent; color: var(--ink-2); font-size: 9.5px;
}
.pj-input:hover { border-color: rgba(255,255,255,.1); background: rgba(255,255,255,.03); }
.pj-input:focus { outline: none; border-color: rgba(255,138,30,.55); background: #0b1119; }
.pj-pred { font-size: 9px; }
.pj-qty { width: 54px; text-align: right; }
/* 工期行内编辑：数字 + 天 */
.pj-dur-edit { display: flex; align-items: center; gap: 1px; width: 100%; }
.pj-dur-edit input { flex: 1; min-width: 0; width: 100%; padding: 0 1px; text-align: right; font-variant-numeric: tabular-nums; }
.pj-dur-edit i { font-style: normal; font-size: 8px; color: var(--muted-2); }
.pj-duration { appearance: textfield; -moz-appearance: textfield; }
.pj-duration::-webkit-outer-spin-button,
.pj-duration::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pj-ops { justify-content: center; gap: 1px; border-right: none; }
.pj-ops .icon-btn { width: 20px; height: 20px; }
.pj-ops .icon { width: 11px; height: 11px; }
.gantt.hide-gantt .pj-label { width: 100% !important; flex: 1; }

.pj-head .pj-c:first-child { font-size: 8px; padding: 0 2px; }


.pj-title {
  width: 100%; min-width: 0; border: 1px solid transparent; border-radius: 3px;
  background: transparent; color: var(--ink-2); font-size: 10px; padding: 2px 3px;
}
.pj-title:hover { border-color: rgba(255,255,255,.1); background: rgba(255,255,255,.03); }
.pj-title:focus { outline: none; border-color: rgba(255,138,30,.55); background: #0b1119; color: var(--ink); }
.pj-row.is-summary .pj-title { font-weight: 700; color: var(--ink); }
.pj-hover { opacity: 0; font-size: 8px; font-weight: 700; color: var(--accent); }
.pj-row:hover .pj-hover { opacity: 1; }
.pj-hover:hover { background: rgba(255,138,30,.12); }

/* ---------------- 作业类型：WBS 汇总 / 里程碑 / 普通作业 ---------------- */
.pj-kind-cell { padding: 0 4px; }
.pj-kind {
  width: 100%; height: 22px; padding: 0 9px 0 1px; border-radius: 4px;
  background-color: transparent; border: 1px solid transparent; color: var(--ink-2);
  font-size: 9px; font-weight: 700; text-align: center; text-align-last: center;
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='4' viewBox='0 0 6 4'%3E%3Cpath d='M0 0l3 4 3-4z' fill='%2394a3b8'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 3px center;
}
.pj-kind:hover { border-color: rgba(255,255,255,.16); background-color: rgba(255,255,255,.045); }
.pj-kind:focus { outline: none; border-color: rgba(255,138,30,.55); }
.pj-kind.kind-wbs { color: #c4b5fd; background-color: rgba(196,181,253,.12); }
.pj-kind.kind-milestone { color: #fbbf24; background-color: rgba(251,191,36,.1); }
.pj-kind.kind-task { color: #7dd3fc; background-color: rgba(125,211,252,.10); }
.pj-kind option { background: #0b1119; color: #e2e8f0; }

.kind-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; height: 18px; padding: 0 4px; border-radius: 4px;
  font-size: 8.5px; font-weight: 700; white-space: nowrap;
}
.kind-badge.kind-wbs { color: #c4b5fd; background: rgba(196,181,253,.14); border: 1px solid rgba(196,181,253,.35); }
.kind-badge.kind-milestone { color: #fbbf24; background: rgba(251,191,36,.14); border: 1px solid rgba(251,191,36,.35); }
.kind-badge.kind-task { color: #7dd3fc; background: rgba(125,211,252,.12); border: 1px solid rgba(125,211,252,.3); }

/* 整行用左侧色条 + 低饱和底色区分三种类型（色值与字体色一致） */
.pj-row.kind-wbs { background: rgba(196,181,253,.06); box-shadow: inset 3px 0 0 #c4b5fd; }
.pj-row.kind-milestone { background: rgba(251,191,36,.06); box-shadow: inset 3px 0 0 #fbbf24; }
.pj-row.kind-task { background: rgba(125,211,252,.03); box-shadow: inset 2px 0 0 rgba(125,211,252,.45); }
/* 左侧固定列是不透明底色，需同步着色 */
.pj-row.kind-wbs .g-label { background: #17122b; }
.pj-row.kind-milestone .g-label { background: #1c1708; }
.pj-row.kind-wbs:hover .g-label { background: #1e1837; }
.pj-row.kind-milestone:hover .g-label { background: #26200c; }
.pj-row.kind-wbs .pj-title { font-weight: 700; color: var(--ink); }
.pj-row.kind-milestone .pj-title { color: #fde68a; font-weight: 600; }
.pj-row.kind-wbs .pj-code { color: #a78bfa; }
.pj-row.kind-milestone .pj-code { color: #f59e0b; }

/* 类型列内名称前的折叠箭头 */
.pj-name .pj-expand { flex: none; margin-right: 2px; }
/* 没有子项的行也占住折叠槽位，保证同一层级的 WBS/作业名称左对齐 */
.pj-expand-slot { display: inline-block; visibility: hidden; pointer-events: none; }
.pj-name .pj-title { flex: 1; min-width: 0; width: auto; }
.pj-pred-text {
  display: block; width: 100%; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; font-size: 9px; color: var(--muted);
}

/* 甘特图里程碑：菱形节点 */
.pj-ms {
  position: absolute; top: 13px; width: 13px; height: 13px; z-index: 2;
  background: #fbbf24; border: 1px solid #fde68a; border-radius: 2px;
  transform: rotate(45deg); box-shadow: 0 0 0 3px rgba(251,191,36,.12);
}
.pj-ms.overdue { border-color: #fb7185; box-shadow: 0 0 0 3px rgba(244,63,94,.4); }
.pj-ms.st-done { background: #fcd34d; border-color: #fef3c7; }

/* 图例 */
.plan-legend { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 9.5px; color: var(--muted-2); }
.plan-legend .lg { display: inline-flex; align-items: center; gap: 5px; }
.plan-legend i { width: 9px; height: 9px; display: inline-block; border-radius: 2px; }
.plan-legend .kind-wbs i { background: #c4b5fd; }
.plan-legend .kind-milestone i { background: #fbbf24; transform: rotate(45deg); border-radius: 1px; }
.plan-legend .kind-task i { background: #7dd3fc; }

/* 弹窗中的类型选择 */
.kind-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kind-opt {
  position: relative; display: flex; flex-direction: column; gap: 3px;
  padding: 8px 10px; border: 1px solid var(--line-3); border-radius: 8px;
  background: rgba(255,255,255,.02); cursor: pointer;
  transition: border-color .15s, background .15s;
}
.kind-opt input { position: absolute; opacity: 0; pointer-events: none; }
.kind-opt b { font-size: 11px; font-weight: 700; }
.kind-opt span { font-size: 9px; color: var(--muted-2); line-height: 1.5; }
.kind-opt.kind-task b { color: #7dd3fc; }
.kind-opt.kind-milestone b { color: #fbbf24; }
.kind-opt.kind-wbs b { color: #c4b5fd; }
.kind-opt:hover { border-color: rgba(255,255,255,.2); }
.kind-opt.active.kind-task { border-color: rgba(56,189,248,.55); background: rgba(56,189,248,.08); }
.kind-opt.active.kind-milestone { border-color: rgba(251,191,36,.55); background: rgba(251,191,36,.08); }
.kind-opt.active.kind-wbs { border-color: rgba(167,139,250,.55); background: rgba(167,139,250,.08); }
.field-hint { margin: 6px 0 0; font-size: 9.5px; line-height: 1.6; color: var(--muted-2); }


/* Project 计划导入 */
.import-picker { padding: 12px; border: 1px dashed var(--line-3); border-radius: 8px; background: rgba(255,255,255,.02); }
.import-picker input[type=file] { font-size: 11px; color: var(--ink-2); }
.import-preview { margin-top: 12px; max-height: 360px; overflow: auto; }
.import-stats { display: flex; flex-wrap: wrap; gap: 18px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 10px; }
.import-stats b { display: block; font-size: 18px; color: var(--ink); font-variant-numeric: tabular-nums; }
.import-stats span { font-size: 9.5px; color: var(--muted-2); }
.import-list { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.import-row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 10px; border-bottom: 1px solid rgba(255,255,255,.04); font-size: 10.5px; }
.import-row:last-child { border-bottom: none; }
.import-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-date { flex: none; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.import-error { padding: 12px; border: 1px solid rgba(244,63,94,.35); background: rgba(244,63,94,.08); color: #fda4af; border-radius: 8px; font-size: 11px; line-height: 1.7; }


.pj-kind-head { display: flex; align-items: center; gap: 4px; }
.pj-mode { display: flex; align-items: center; gap: 4px; }
.pj-mode input, .pj-kind-head input {
  width: 12px; height: 12px; accent-color: var(--accent); margin: 0; flex: none;
}
.pj-tools { display: flex; align-items: center; gap: 4px; }
.pj-tools .btn { height: 27px; padding: 0 7px; font-size: 10px; }
.pj-tools .btn:disabled { opacity: .35; cursor: not-allowed; }
.pj-hover.danger { color: #f43f5e; }

.pj-kind-cell { display: flex; align-items: center; gap: 3px; }
.pj-kind-cell input { width: 12px; height: 12px; accent-color: var(--accent); margin: 0; flex: none; }
.pj-kind { width: 58px; font-size: 9px; }


.pj-seq, .pj-seq-head { justify-content: center; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.pj-seq { color: var(--muted); }


/* 表格统一：除任务名称列外居中 */
.table th, .table td { text-align: center; }
.table .num { text-align: center; }
.eff-table { table-layout: fixed; }
.eff-table .eff-name { text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eff-table th.eff-name { text-align: left; }
.pj-name { justify-content: flex-start; text-align: left; }
.pj-input { text-align: center; }
.pj-title, .pj-pred { text-align: left; }
.pj-kind-cell { justify-content: flex-start; }


.pj-check-hit {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 100%; margin-left: -5px; cursor: pointer;
}
.pj-check-hit input {
  width: 16px; height: 16px; margin: 0; accent-color: var(--accent); cursor: pointer;
}
.pj-kind-cell { padding-left: 0; gap: 2px; }
.pj-kind-head { gap: 3px; }


.pj-c { position: relative; }
.pj-resize {
  position: absolute; right: 0; top: 0; width: 6px; height: 100%;
  cursor: col-resize; z-index: 6;
}
.pj-resize:hover { background: rgba(255,138,30,.45); }
.pj-weight, .pj-assignee { width: 100%; font-size: 9px; }
.col-settings { display: flex; flex-direction: column; gap: 5px; }
.col-setting-row { display: flex; align-items: center; gap: 8px; }
.col-setting-name { flex: 1; display: flex; align-items: center; gap: 6px; font-size: 11px; }
.col-setting-name input { accent-color: var(--accent); }
.col-width { width: 72px; height: 26px; text-align: center; }


.pj-seq { gap: 2px; }
.pj-seq .pj-check-hit { width: 24px; margin-left: -3px; }
.pj-kind-head { gap: 2px; }


/* 三种作业类型：任务名称 / 类型文字用类型色区分（底色与甘特图保持上一版） */
.pj-row.kind-wbs .pj-title { color: #c4b5fd; font-weight: 700; }
.pj-row.kind-milestone .pj-title { color: #fbbf24; font-weight: 600; }
.pj-row.kind-task .pj-title { color: #7dd3fc; }
.plan-legend .kind-wbs { color: #c4b5fd; }
.plan-legend .kind-milestone { color: #fbbf24; }
.plan-legend .kind-task { color: #7dd3fc; }

/* 甘特图与字体色保持一致 */
.pj-gantt .g-bar.is-group {
  background: rgba(196, 181, 253, .20) !important;
  border: 1.5px solid #c4b5fd !important;
  border-radius: 4px !important;
}
.pj-gantt .g-bar.is-group .g-bar-fill { background: rgba(196, 181, 253, .40); border-radius: 3px; }
.pj-gantt .g-bar.is-group .g-bar-label { color: #ede9fe; font-weight: 700; }
.pj-gantt .g-bar.is-group.overdue { box-shadow: 0 0 0 2px rgba(244, 63, 94, .45); }

.pj-gantt .g-bar:not(.is-group) {
  background: rgba(125, 211, 252, .14) !important;
  border: 1.5px solid #7dd3fc !important;
}
.pj-gantt .g-bar:not(.is-group) .g-bar-fill { background: rgba(125, 211, 252, .45); border-radius: 5px; }
.pj-gantt .g-bar:not(.is-group).st-todo .g-bar-fill { background: rgba(125, 211, 252, .22); }
.pj-gantt .g-bar:not(.is-group).st-doing .g-bar-fill { background: rgba(125, 211, 252, .45); }
.pj-gantt .g-bar:not(.is-group).st-done .g-bar-fill { background: rgba(125, 211, 252, .70); }
.pj-gantt .g-bar:not(.is-group) .g-bar-label { color: #e0f2fe; }
.pj-gantt .g-bar:not(.is-group).overdue { box-shadow: 0 0 0 2px rgba(244, 63, 94, .55); }

/* 进度反馈弹窗：首次反馈日期提醒 */
.field-note { margin-left: 6px; font-size: 9.5px; font-weight: 800; color: #fbbf24; letter-spacing: .01em; }

/* 前置任务：手动输入 + 勾选选择 */
.pj-pred-wrap { display: flex; align-items: center; gap: 1px; width: 100%; min-width: 0; }
.pj-pred-wrap .pj-pred { flex: 1; min-width: 0; width: auto; }
.pj-pred-pick {
  flex: none; width: 12px; height: 20px; padding: 0; border: 0; border-radius: 3px;
  background: transparent; color: var(--accent); font-size: 11px; font-weight: 800;
  line-height: 1; cursor: pointer; opacity: .3; transition: opacity .12s;
}
.pj-row:hover .pj-pred-pick,
.pj-pred-wrap:hover .pj-pred-pick,
.pj-pred-pick:focus-visible { opacity: 1; }
.pj-pred-pick:hover { background: rgba(255,138,30,.18); }
.pj-pred-pick:focus-visible { outline: 1px solid var(--accent); }

.pred-tools { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.pred-tools .input { flex: 1; height: 28px; }
.pred-list { max-height: 340px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.pred-opt {
  display: flex; align-items: center; gap: 7px; padding: 6px 9px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  font-size: 10.5px; color: var(--ink-2);
}
.pred-opt:last-child { border-bottom: 0; }
.pred-opt:hover { background: rgba(255,255,255,.035); }
.pred-opt.is-wbs { background: rgba(196,181,253,.05); }
.pred-opt.is-wbs .pred-name { color: #c4b5fd; font-weight: 700; }
.pred-check { display: flex; align-items: center; flex: none; cursor: pointer; }
.pred-opt input[type="checkbox"] { width: 13px; height: 13px; accent-color: var(--accent); flex: none; margin: 0; }
.pred-seq { width: 26px; flex: none; text-align: right; color: var(--muted-2); font-variant-numeric: tabular-nums; font-size: 9px; }
.pred-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pred-opt .kind-badge { flex: none; }
.pred-link { display: none; align-items: center; gap: 4px; flex: none; }
.pred-opt.is-checked .pred-link { display: flex; }
.pred-type { width: 52px; height: 24px; padding: 0 2px; font-size: 9px; text-align: center; flex: none; }
.pred-lag-input { width: 48px; height: 24px; padding: 0 3px; text-align: right; font-size: 9.5px; flex: none; }
.pred-lag-unit { font-size: 8px; color: var(--muted-2); flex: none; }
.pred-empty { padding: 16px; text-align: center; color: var(--muted-2); font-size: 10px; }
.pred-hint { margin: 8px 0 0; line-height: 1.6; }


/* 计划编制工具栏吸顶 */
.plan-toolbar {
  position: sticky;
  top: var(--topbar-h, 79px);
  z-index: 25;
  margin: 0 0 14px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px;
  background: rgba(8, 11, 17, .94);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .28);
}
@media (max-width: 760px) {
  .plan-toolbar { padding: 6px; }
}


.pj-progress-input {
  width: 40px; height: 24px; padding: 0 2px; text-align: center;
  font-variant-numeric: tabular-nums;
}


/* 前置任务选择：宽度减半 */
.modal.pred-picker { width: min(410px, 96vw); }
.pred-picker .modal-head p { font-size: 10.5px; }
.pred-picker .pred-tools { flex-wrap: wrap; gap: 6px; }
.pred-picker .pred-opt { grid-template-columns: 24px 28px minmax(0, 1fr) auto; gap: 5px; }
.pred-picker .pred-opt .kind-badge { display: inline-flex; flex: none; font-size: 8px; min-width: 26px; height: 16px; padding: 0 3px; }
.pred-picker .pred-link { gap: 3px; }
.pred-picker .pred-type { width: 54px; padding: 0 4px; }
.pred-picker .pred-lag-input { width: 48px; padding: 0 4px; text-align: center; }
.pred-picker .pred-lag-unit { display: none; }
.pred-picker .pred-list { max-height: 52vh; }

/* 关键路径：行、名称徽标、浮时、甘特图 */
.pj-row.is-critical { box-shadow: inset 4px 0 0 #fb7185; }
.pj-row.is-critical .g-label { box-shadow: inset 4px 0 0 #fb7185, 10px 0 14px -12px rgba(0,0,0,.9); }
.pj-cp-badge {
  flex: none; margin: 0; padding: 1px 4px; border-radius: 3px;
  background: rgba(244,63,94,.16); border: 1px solid rgba(244,63,94,.42);
  color: #fda4af; font-size: 8px; font-style: normal; font-weight: 800;
  line-height: 1.4; white-space: nowrap;
}
/* 名称列最左侧固定徽标槽，关键标识与层级缩进互不影响 */
.pj-name .pj-cp-slot { flex: none; width: 28px; height: 100%; display: flex; align-items: center; }
.pj-name .pj-name-main { flex: 1; min-width: 0; height: 100%; display: flex; align-items: center; }
.pj-float { font-variant-numeric: tabular-nums; color: var(--ink-2); }
.pj-float.is-critical { color: #fda4af; font-weight: 800; }
.pj-float.muted { color: var(--muted-2); }
.pj-gantt .g-bar.is-critical {
  border-color: #fb7185 !important;
  box-shadow: 0 0 0 2px rgba(244,63,94,.55), 0 0 12px rgba(244,63,94,.28) !important;
}
.pj-gantt .pj-ms.is-critical {
  border-color: #fb7185;
  box-shadow: 0 0 0 4px rgba(244,63,94,.35), 0 0 12px rgba(244,63,94,.4);
}
.plan-legend .cp { color: #fda4af; }
.plan-legend .cp i { width: 14px; height: 4px; border-radius: 2px; background: #fb7185; }

/* 前锋线：按实际进度连成的折线 / 拉直后的检查日期竖线 */
.front-layer { position: absolute; top: 0; pointer-events: none; z-index: 6; }
.front-layer polyline { filter: drop-shadow(0 0 4px rgba(232,121,249,.55)); }
.pj-front-tools { display: inline-flex; align-items: center; gap: 4px; }
.gantt.hide-gantt .front-layer { display: none; }
.btn.ghost.small.is-on { color: #f0abfc; border-color: rgba(232,121,249,.5); background: rgba(232,121,249,.1); }
.plan-legend .front { color: #f0abfc; }
.plan-legend .front i { width: 14px; height: 2px; border: 0; border-radius: 0; background: #e879f9; }
.straighten-list { margin: 2px 0 10px; padding-left: 18px; color: var(--ink-2); font-size: 10.5px; line-height: 1.9; }
.straighten-list b { color: var(--ink); font-weight: 700; }

/* 普通作业横道线宽减半；WBS 汇总条保持原宽，里程碑菱形不变 */
.pj-gantt .g-bar:not(.is-group) { height: 10.5px; border-radius: 3px; }
.pj-gantt .g-bar:not(.is-group) .g-bar-fill { border-radius: 3px; }
.pj-gantt .g-bar:not(.is-group) .g-bar-label { font-size: 8px; padding: 0 5px; line-height: 1; }

/* 工效分析：WBS 层级行 */
.eff-table tr.eff-group td { background: rgba(196,181,253,.055); border-top: 1px solid rgba(196,181,253,.12); }
.eff-table tr.eff-group .eff-name { color: #c4b5fd; font-weight: 700; }
.eff-table tr.eff-group .kind-badge { margin-right: 5px; vertical-align: 1px; }
.eff-table tr.eff-group td.num { color: var(--muted-2); }
.eff-table .eff-type { text-align: center; }
.eff-table .eff-type .kind-badge { min-width: 44px; justify-content: center; }
.eff-table tr.kind-wbs .eff-name { color: #c4b5fd; font-weight: 700; }
.eff-table tr.kind-milestone .eff-name { color: #fbbf24; font-weight: 700; }
.eff-table tr.kind-task .eff-name { color: #7dd3fc; }


.pj-value { width: 72px; text-align: right; }
.principle-list { display: flex; flex-direction: column; gap: 8px; }
.principle-option {
  display: flex; align-items: flex-start; gap: 9px; padding: 10px;
  border: 1px solid var(--line-2); border-radius: 8px; cursor: pointer;
  background: rgba(255,255,255,.02);
}
.principle-option.is-active { border-color: rgba(255,138,30,.55); background: rgba(255,138,30,.07); }
.principle-option input { margin-top: 2px; accent-color: var(--accent); }
.principle-option b { display: block; font-size: 12px; color: var(--ink); margin-bottom: 3px; }
.principle-option em { display: block; font-style: normal; font-size: 10px; line-height: 1.6; color: var(--muted-2); }


.combo-hit { cursor: crosshair; }
.combo-guide { stroke: rgba(255,255,255,.25); stroke-width: 1; stroke-dasharray: 3 3; }
.combo-tip { pointer-events: none; }
.combo-tip-line { font-size: 10px; fill: #cdd6e2; }
.combo-tip-line:first-child { fill: var(--ink); font-weight: 700; }

/* 产值清单 / Excel 计划导入共用 */
.output-import .output-tools, .plan-excel .output-tools { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.output-import .output-file, .plan-excel .output-file { flex: 1; min-width: 240px; height: 28px; padding: 4px; }
.output-import .output-text, .plan-excel .output-text { width: 100%; min-height: 84px; resize: vertical; font-family: inherit; line-height: 1.6; }
.output-import .output-actions, .plan-excel .output-actions { display: flex; align-items: center; gap: 10px; margin: 10px 0 8px; }
.output-import .output-table, .plan-excel .output-table { max-height: 320px; }
.output-import .output-table td, .plan-excel .output-table td { font-size: 10px; }
.output-import .output-match { min-width: 190px; max-width: 280px; height: 26px; font-size: 9px; }
.output-import .output-status { font-size: 9px; color: var(--muted-2); white-space: nowrap; }
.output-import .output-status.ok { color: #34d399; }
.output-import .output-status.warn { color: #fbbf24; }
.plan-excel .output-text { min-height: 100px; }

/* 导入计划下拉 */
.import-menu-wrap { position: relative; display: inline-flex; }
.import-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 45;
  min-width: 150px; padding: 4px; display: flex; flex-direction: column; gap: 1px;
  border: 1px solid var(--line); border-radius: 9px; background: #0b1119;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .8);
}
.import-menu.hidden { display: none; }
.import-menu button {
  border: 0; background: transparent; color: var(--ink-2); text-align: left;
  padding: 8px 10px; border-radius: 6px; font-size: 10.5px; cursor: pointer;
}
.import-menu button:hover { background: rgba(255, 255, 255, .06); color: var(--ink); }

/* Excel 计划导入 */
.plan-excel .output-text { min-height: 88px; }
.plan-excel .plan-cover { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; font-size: 10px; color: var(--muted-2); line-height: 1.6; }
.plan-excel .plan-cover input { margin-top: 2px; accent-color: var(--accent); }
.plan-excel .plan-warnings { margin-top: 8px; padding: 8px 10px; border-radius: 7px; background: rgba(251, 191, 36, .06); border: 1px solid rgba(251, 191, 36, .18); }
.plan-excel .plan-warnings p { margin: 2px 0; font-size: 9.5px; color: #fbbf24; }
.plan-excel .plan-preview .output-table { max-height: 300px; }
.plan-excel .plan-preview .kind-badge { min-width: 38px; justify-content: center; }

/* 工效分析：按作业类型平均工效 */
.eff-type-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 0 12px 12px; }
.eff-type-card { border: 1px solid var(--line-2); border-radius: 10px; background: rgba(255, 255, 255, .02); padding: 10px 12px; }
.eff-type-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.eff-type-top b { color: var(--ink); font-size: 11.5px; }
.eff-type-top span { color: var(--muted-2); font-size: 9px; white-space: nowrap; }
.eff-type-value { margin: 6px 0 5px; font-size: 20px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.eff-type-value small { margin-left: 4px; font-size: 9px; font-weight: 600; color: var(--muted-2); }
.eff-type-bar { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.eff-type-bar i { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, #ff8a1e, #fbbf24); }
.eff-type-meta { margin-top: 6px; font-size: 9px; color: var(--muted-2); }
.eff-type-empty { grid-column: 1 / -1; padding: 14px; text-align: center; color: var(--muted-2); font-size: 10px; }
@media (max-width: 1200px) { .eff-type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .eff-type-grid { grid-template-columns: 1fr; } }
.eff-type-none { color: var(--muted-2); font-weight: 600; font-size: 18px; }
button.eff-type-card { width: 100%; display: block; text-align: left; cursor: pointer; font-family: inherit; color: inherit; }
.eff-type-card:hover { border-color: rgba(255, 138, 30, .35); background: rgba(255, 138, 30, .04); }
.eff-type-card.is-active { border-color: rgba(255, 138, 30, .65); background: rgba(255, 138, 30, .08); }
.eff-type-card:focus-visible { outline: 1px solid var(--accent); }
.eff-path { display: block; margin-top: 2px; font-size: 8.5px; font-weight: 400; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eff-table-card { scroll-margin-top: calc(var(--topbar-h, 79px) + 16px); }
.eff-type-top b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eff-type-top span { flex: none; }
.eff-type-top .eff-type-wbs { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted-2); font-size: 9px; }
.eff-type-top span:last-child { flex: none; }
.eff-type-name { display: block; margin-top: 4px; color: var(--ink); font-size: 11.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eff-type-columns { display: flex; gap: 12px; padding: 0 12px 12px; align-items: flex-start; overflow-x: auto; }
.eff-type-column { flex: 0 0 288px; min-width: 0; border: 1px solid var(--line-2); border-radius: 10px; background: rgba(255, 255, 255, .015); padding: 8px; }
.eff-type-column-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 2px 4px 8px; margin-bottom: 8px; border-bottom: 1px solid var(--line-2); }
.eff-type-column-head b { color: var(--ink); font-size: 11px; }
.eff-type-column-head span { color: var(--muted-2); font-size: 9px; }
.eff-type-column-body { display: flex; flex-direction: column; gap: 8px; }
.eff-type-column .eff-type-card { padding: 8px 10px; }
.eff-type-column .eff-type-value { font-size: 18px; margin: 4px 0; }
/* 卡片区固定高度：左右切换工种列，上下滚动列内卡片，下方明细表保持可见 */
.eff-type-columns { height: 420px; align-items: stretch; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.eff-type-column { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.eff-type-column-body { flex: 1; min-height: 0; overflow-y: auto; padding-right: 2px; scrollbar-width: thin; }

/* ---------- 全周期关键节点/事项 ---------- */
.kn-view .toolbar { align-items: center; }
.kn-search { position: relative; width: 220px; flex: 0 1 220px; }
.kn-search .icon { position: absolute; left: 9px; top: 50%; width: 13px; height: 13px; transform: translateY(-50%); color: var(--muted-2); pointer-events: none; }
.kn-search .input { height: 30px; padding-left: 28px; font-size: 11px; }
.kn-kpis { margin-top: 0; }
.kn-board-card { margin-top: 14px; }
.kn-board-card .card-head { padding-bottom: 9px; }
.kn-board { display: flex; gap: 12px; padding: 0 12px 12px; align-items: flex-start; overflow-x: auto; }
.kn-stage { flex: 0 0 272px; min-width: 0; min-height: 170px; padding: 10px; border: 1px solid var(--line-2); border-radius: 10px; background: rgba(255, 255, 255, .012); }
.kn-stage-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.kn-stage-title { display: flex; align-items: center; gap: 6px; min-width: 0; }
.kn-stage-title i { width: 7px; height: 7px; border-radius: 50%; background: var(--stage-color); box-shadow: 0 0 0 3px color-mix(in srgb, var(--stage-color) 12%, transparent); }
.kn-stage-title b { color: var(--ink); font-size: 11.5px; white-space: nowrap; }
.kn-stage-title span { color: var(--muted-2); font-size: 9px; white-space: nowrap; }
.kn-stage-add { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid var(--line-2); border-radius: 6px; background: transparent; color: var(--muted-2); cursor: pointer; }
.kn-stage-add .icon { width: 12px; height: 12px; }
.kn-stage-add:hover { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.kn-stage-hint { margin: 3px 0 9px 13px; color: var(--muted-2); font-size: 8.5px; }
.kn-stage-body { display: flex; flex-direction: column; gap: 8px; }
.kn-stage-empty { padding: 14px 8px; border: 1px dashed var(--line-2); border-radius: 8px; color: var(--muted-2); font-size: 9.5px; text-align: center; }
.kn-card { position: relative; padding: 9px 10px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--panel); cursor: pointer; transition: border-color .15s, background .15s; }
.kn-card:hover { border-color: rgba(255, 138, 30, .28); background: rgba(255, 138, 30, .025); }
.kn-card.overdue { border-left: 2px solid var(--danger); }
.kn-card.warn { border-left: 2px solid var(--warn); }
.kn-card.done { border-left: 2px solid #22c55e; }
.kn-card-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.kn-project { display: flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; color: var(--muted-2); font-size: 8.5px; white-space: nowrap; text-overflow: ellipsis; }
.kn-project i { flex: none; width: 5px; height: 5px; border-radius: 50%; }
.kn-kind { display: inline-flex; align-items: center; gap: 3px; flex: none; padding: 1px 5px; border-radius: 4px; font-size: 8.5px; }
.kn-kind .icon { width: 10px; height: 10px; }
.kn-kind.key { color: #c084fc; background: rgba(168, 85, 247, .12); }
.kn-kind.client { color: #38bdf8; background: rgba(56, 189, 248, .12); }
.kn-kind.leader { color: #fbbf24; background: rgba(245, 158, 11, .12); }
.kn-card h3 { margin: 6px 0 5px; color: var(--ink); font-size: 11.5px; font-weight: 700; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.kn-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; color: var(--muted-2); font-size: 9px; }
.kn-meta span { display: inline-flex; align-items: center; gap: 3px; }
.kn-meta .icon { width: 10px; height: 10px; }
.kn-meta .done { color: #4ade80; }
.kn-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 7px; padding-top: 6px; border-top: 1px solid var(--line-2); }
.kn-owner { display: flex; align-items: center; gap: 4px; min-width: 0; color: var(--muted-2); font-size: 9px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.kn-status { flex: none; padding: 1px 6px; border-radius: 4px; font-size: 8.5px; }
.kn-status.ok { color: #4ade80; background: rgba(34, 197, 94, .12); }
.kn-status.doing { color: #38bdf8; background: rgba(56, 189, 248, .12); }
.kn-status.warn { color: var(--warn); background: var(--warn-soft); }
.kn-status.danger { color: #fb7185; background: var(--danger-soft); }
.kn-status.muted { color: var(--muted-2); background: rgba(148, 163, 184, .1); }
.kn-empty-banner { margin: 0 12px 12px; padding: 14px; border: 1px dashed var(--line-2); border-radius: 9px; color: var(--muted-2); font-size: 11px; text-align: center; }
@media (max-width: 900px) {
  .kn-search { width: 100%; flex: 1 1 100%; }
  .kn-stage { flex-basis: 250px; }
}


.nav-sub:not(.is-open) { display: none; }
.nav-caret { cursor: pointer; transition: transform .18s ease; }
.nav-item:not(.is-open) .nav-caret { transform: rotate(-90deg); }

/* 全周期关键节点/事项：列表与 Excel 导入 */
.kn-list-card { margin-top: 14px; }
.kn-list-card .card-head { padding-bottom: 8px; }
.kn-table { width: 100%; }
.kn-table th { white-space: nowrap; }
.kn-table td { vertical-align: middle; }
.kn-row { cursor: default; }
.kn-row:hover { background: rgba(255, 138, 30, .035); }
.kn-row.overdue { background: rgba(244, 63, 94, .035); }
.kn-row.overdue:hover { background: rgba(244, 63, 94, .06); }
.kn-row.warn { background: rgba(245, 158, 11, .025); }
.kn-idx { color: var(--muted-2); font-size: 9.5px; }
.kn-project-cell { display: inline-flex; align-items: center; gap: 5px; min-width: 0; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); font-size: 10px; }
.kn-project-cell i { flex: none; width: 6px; height: 6px; border-radius: 50%; }
.kn-stage-chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 6px; border-radius: 4px; background: rgba(255, 255, 255, .03); color: var(--ink-2); font-size: 9px; white-space: nowrap; }
.kn-stage-chip i { width: 5px; height: 5px; border-radius: 50%; background: var(--stage-color); }
.kn-main { min-width: 220px; }
.kn-main b { display: block; color: var(--ink); font-size: 10.5px; font-weight: 600; }
.kn-main small { display: block; margin-top: 2px; color: var(--muted-2); font-size: 8.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 520px; }
.kn-date { color: var(--ink-2); font-size: 10px; white-space: nowrap; }
.kn-date.is-manual .kn-date-input { color: #a78bfa; }
.kn-ops { text-align: center; white-space: nowrap; overflow: visible; text-overflow: clip; }
.kn-inline-table td.kn-ops { overflow: visible; text-overflow: clip; }
.kn-ops-actions { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid var(--line-2); border-radius: 8px; background: rgba(255,255,255,.025); box-shadow: inset 0 1px 0 rgba(255,255,255,.03); }
.kn-op-btn { display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 0; margin: 0; border: 1px solid transparent; border-radius: 6px; background: transparent; cursor: pointer; transition: color .12s, background .12s, border-color .12s; }
.kn-op-btn .icon { width: 14px; height: 14px; }
.kn-op-add { color: var(--accent); }
.kn-op-add:hover { color: #0b1220; background: var(--accent); border-color: var(--accent); }
.kn-op-del { position: relative; color: #fb7185; }
.kn-op-del::before { content: ''; position: absolute; left: -2px; top: 5px; bottom: 5px; width: 1px; background: var(--line-2); }
.kn-op-del:hover { color: #fff; background: var(--danger); border-color: var(--danger); }
.kn-op-x { position: relative; display: block; width: 11px; height: 11px; }
.kn-op-x::before, .kn-op-x::after { content: ''; position: absolute; left: 50%; top: 50%; width: 11px; height: 1.5px; border-radius: 2px; background: currentColor; }
.kn-op-x::before { transform: translate(-50%, -50%) rotate(45deg); }
.kn-op-x::after { transform: translate(-50%, -50%) rotate(-45deg); }
.kn-edit { display: inline-grid; place-items: center; width: 23px; height: 23px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--muted-2); cursor: pointer; }
.kn-edit .icon { width: 13px; height: 13px; }
.kn-edit:hover { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.kn-table-empty { padding: 26px 10px; color: var(--muted-2); font-size: 11px; text-align: center; }
.kn-import-help { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; margin-bottom: 10px; border: 1px solid var(--line-2); border-radius: 8px; color: var(--muted-2); font-size: 9.5px; }
.kn-import-help span { display: inline-flex; align-items: center; gap: 5px; }
.kn-import-help .icon { width: 12px; height: 12px; }
.kn-import-file { display: flex; gap: 9px; align-items: center; margin-bottom: 10px; }
.kn-import-file .output-file { flex: 1; }
.kn-import-preview { min-height: 80px; }
.kn-import-empty { padding: 26px 12px; border: 1px dashed var(--line-2); border-radius: 8px; color: var(--muted-2); font-size: 10px; text-align: center; }
.kn-import-summary { margin-bottom: 7px; color: var(--muted-2); font-size: 9.5px; }
.kn-import-summary b { color: var(--accent); }
.kn-import-scroll { max-height: 330px; overflow: auto; border: 1px solid var(--line-2); border-radius: 7px; }
.kn-import-table th { position: sticky; top: 0; z-index: 1; background: var(--panel); }
.kn-import-table td { font-size: 9.5px; white-space: nowrap; }
.kn-import-table tr.bad td { background: rgba(244, 63, 94, .055); }
.kn-import-table tr.warn td { background: rgba(245, 158, 11, .035); }
.kn-import-check { min-width: 130px; max-width: 260px; white-space: normal !important; color: var(--muted-2); }
.kn-import-check .ok { color: #4ade80; }
.kn-import-count { color: var(--muted-2); font-size: 9.5px; margin-right: 4px; }
@media (max-width: 900px) {
  .kn-import-file { flex-direction: column; align-items: stretch; }
  .kn-main small { max-width: 220px; }
}
.kn-table th:nth-child(2), .kn-table td:nth-child(2), .kn-table th:nth-child(5), .kn-table td:nth-child(5) { text-align: left; }
.kn-main { text-align: left; }
/* 全周期默认模板 */
.kn-template-toolbar { display: flex; align-items: center; gap: 10px; margin: 8px 0 7px; color: var(--muted-2); font-size: 9.5px; }
.kn-template-all { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); cursor: pointer; }
.kn-template-all input { accent-color: var(--accent); }
.kn-template-toolbar b { color: var(--accent); }
.kn-template-hint { margin-left: auto; color: var(--muted-2); font-size: 8.5px; }
.kn-template-list { max-height: 360px; overflow: auto; border: 1px solid var(--line-2); border-radius: 8px; padding: 4px 0; }
.kn-template-group { display: flex; align-items: center; justify-content: space-between; padding: 7px 10px 5px; color: var(--muted-2); font-size: 9px; background: rgba(255, 255, 255, .018); }
.kn-template-group b { color: var(--ink-2); font-size: 9.5px; }
.kn-template-item { display: flex; align-items: center; gap: 7px; padding: 5px 10px; color: var(--ink-2); font-size: 9.5px; cursor: pointer; }
.kn-template-item:hover { background: rgba(255, 138, 30, .04); }
.kn-template-item input { accent-color: var(--accent); flex: none; }
.kn-template-order { flex: none; width: 22px; color: var(--muted-2); font-size: 8.5px; }
.kn-template-item span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 900px) {
  .kn-template-hint { display: none; }
}

/* 关键节点：行内编辑 + 当前进度 + 历史 */
.kn-inline-table th, .kn-inline-table td { padding-top: 5px; padding-bottom: 5px; }
.kn-inline-input { width: 100%; height: 24px; padding: 2px 5px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--ink-2); font-size: 10px; font-family: inherit; }
.kn-inline-input:hover { border-color: var(--line-2); }
.kn-inline-input:focus { outline: none; border-color: var(--accent-line); background: var(--accent-soft); color: var(--ink); }
.kn-title-input { font-weight: 600; min-width: 180px; }
.kn-date-input { font-size: 9.5px; padding: 1px 3px; }
.kn-inline-select { height: 24px; padding: 1px 5px; border-color: transparent; background: transparent; font-size: 9.5px; color: var(--ink-2); }
.kn-inline-select:hover { border-color: var(--line-2); }
.kn-inline-select:focus { border-color: var(--accent-line); }
.kn-owner-select { max-width: 108px; }
.kn-progress-cell { white-space: nowrap; }
.kn-progress-input { display: inline-block; width: 44px; height: 24px; padding: 1px 3px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--ink); font-size: 10px; text-align: right; }
.kn-progress-input:hover { border-color: var(--line-2); }
.kn-progress-input:focus { outline: none; border-color: var(--accent-line); background: var(--accent-soft); }
.kn-progress-text { color: var(--ink); font-size: 10px; }
.kn-history-btn { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-left: 3px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--muted-2); cursor: pointer; vertical-align: middle; }
.kn-history-btn .icon { width: 12px; height: 12px; }
.kn-history-btn:hover { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.kn-history-list { max-height: 250px; overflow: auto; padding: 2px 0; }
.kn-history-item { padding: 7px 8px; border-bottom: 1px solid var(--line-2); }
.kn-history-item:last-child { border-bottom: 0; }
.kn-history-top { display: flex; align-items: center; gap: 10px; color: var(--muted-2); font-size: 9.5px; }
.kn-history-top b { color: var(--ink-2); }
.kn-history-top span:nth-child(2) { color: var(--accent); font-weight: 700; }
.kn-history-note { margin-top: 3px; color: var(--ink-2); font-size: 10px; line-height: 1.45; }
.kn-history-empty { padding: 20px; color: var(--muted-2); font-size: 10px; text-align: center; }
.kn-history-add { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.kn-inline-select { padding: 1px 5px !important; background-image: none !important; }
.kn-stage-cell .kn-inline-select { width: 92px; }
.kn-kind-cell .kn-inline-select { width: 64px; }
.kn-owner-select { width: 104px; max-width: 104px; }


.pc-centers { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.pc-center { display: flex; flex-direction: column; gap: 3px; min-width: 150px; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.025);
  color: var(--muted); text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.pc-center:hover { border-color: rgba(255,138,30,.4); background: rgba(255,138,30,.05); }
.pc-center.active { border-color: rgba(255,138,30,.65); background: rgba(255,138,30,.09); color: var(--ink); }
.pc-center b { font-size: 13px; color: var(--ink); }
.pc-center span { font-size: 11px; }
.pc-center em { font-style: normal; font-size: 11px; color: var(--accent); }


/* 关键节点：阶段分层展示 */
.kn-stage-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin: 2px 0 14px; }
.kn-stage-tile { --stage-color: #ff8a1e; position: relative; overflow: hidden; padding: 10px 12px 9px;
  border: 1px solid var(--line-2); border-radius: 10px; background: linear-gradient(145deg, rgba(255,255,255,.035), rgba(255,255,255,.008));
  color: var(--muted); text-align: left; cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.kn-stage-tile::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--stage-color); opacity: .75; }
.kn-stage-tile:hover { border-color: color-mix(in srgb, var(--stage-color) 45%, transparent); transform: translateY(-1px); }
.kn-stage-tile.active { border-color: color-mix(in srgb, var(--stage-color) 65%, transparent);
  background: color-mix(in srgb, var(--stage-color) 11%, var(--panel)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--stage-color) 20%, transparent); }
.kn-stage-tile.all { --stage-color: #ff8a1e; }
.kn-stage-tile-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.kn-stage-tile-top span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: 10.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kn-stage-tile-top i { width: 7px; height: 7px; border-radius: 50%; flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--stage-color) 14%, transparent); }
.kn-stage-tile-top b { color: var(--ink); font-size: 16px; line-height: 1; }
.kn-stage-tile-bar { height: 4px; margin: 9px 0 6px; border-radius: 3px; background: rgba(255,255,255,.07); overflow: hidden; }
.kn-stage-tile-bar i { display: block; height: 100%; border-radius: 3px; opacity: .85; }
.kn-stage-tile small { color: var(--muted-2); font-size: 9px; }

.kn-row td:first-child { border-left: 2px solid var(--stage-color, transparent); }
.kn-row td { transition: background .12s; }
.kn-row-anchor td { animation: knRowAnchor 2s ease-out; }
@keyframes knRowAnchor { 0% { background: rgba(245, 158, 11, .24); } 100% { background: transparent; } }

.kn-pill-select { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 1px 4px 1px 6px;
  border: 1px solid color-mix(in srgb, var(--pill, #94a3b8) 26%, transparent); border-radius: 6px;
  background: color-mix(in srgb, var(--pill, #94a3b8) 10%, transparent); vertical-align: middle; }
.kn-pill-select > i { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--pill, #94a3b8); }
.kn-pill-select.kn-kind-select.key { --pill: #c084fc; }
.kn-pill-select.kn-kind-select.client { --pill: #38bdf8; }
.kn-pill-select.kn-kind-select.leader { --pill: #fbbf24; }
.kn-pill-select .kn-inline-select { padding: 1px 2px !important; height: 22px; background: transparent !important; font-weight: 600; }
.kn-stage-cell .kn-pill-select { padding-right: 2px; }
.kn-stage-cell .kn-inline-select { width: 74px; color: var(--pill); }
.kn-kind-cell .kn-inline-select { width: 76px; color: var(--pill); }

.kn-progress-box { display: flex; flex-direction: column; gap: 3px; min-width: 100px; }
.kn-progress-bar { height: 4px; border-radius: 3px; background: rgba(255,255,255,.07); overflow: hidden; }
.kn-progress-bar i { display: block; height: 100%; border-radius: 3px; opacity: .9; }
.kn-progress-line { display: flex; align-items: center; gap: 3px; }
.kn-progress-line > span { color: var(--muted-2); font-size: 9px; }
.kn-progress-line .kn-progress-input { width: 42px; padding: 1px 2px; }
.kn-progress-line .kn-history-btn { margin-left: auto; }

.kn-date.is-overdue, .kn-date.is-overdue .kn-inline-input { color: #fb7185; }
.kn-date.is-soon, .kn-date.is-soon .kn-inline-input { color: #fbbf24; }

@media (max-width: 1100px) {
  .kn-stage-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .kn-stage-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


.kn-toolbar { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.kn-filter-row { display: flex; flex: 1 1 auto; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.kn-action-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; width: 100%; }
.kn-filter-row .kn-search { flex: 1 1 190px; width: auto; max-width: 250px; }
.kn-inline-table { table-layout: fixed; }
.kn-inline-table td { overflow: hidden; text-overflow: ellipsis; }
.kn-inline-table .kn-main { overflow: hidden; }
.kn-date .kn-inline-input { width: 100%; }
.kn-project-cell { max-width: 140px; }
.kn-progress-cell { width: 110px; }
@media (max-width: 1180px) {
  .kn-filter-row .kn-search { max-width: none; }
}

.kn-date .kn-inline-input { font-size: 9px; }


.kn-view .kn-toolbar { align-items: stretch; }
.kn-view .kn-filter-row, .kn-view .kn-action-row { width: 100%; }


.kn-date-wrap { position: relative; display: block; width: 100%; }
.kn-date-empty { display: none; position: absolute; left: 6px; top: 50%; transform: translateY(-50%);
  color: var(--muted-2); font-size: 10px; pointer-events: none; }
.kn-date-wrap.is-empty .kn-date-empty { display: inline; }
.kn-date-wrap.is-empty .kn-date-input { color: transparent; }
.kn-date-wrap.is-empty .kn-date-input::-webkit-datetime-edit { color: transparent; }
.kn-date-wrap.is-empty .kn-date-input:focus { color: var(--ink-2); }
.kn-date-wrap.is-empty .kn-date-input:focus::-webkit-datetime-edit { color: var(--ink-2); }

/* ---------- 关键节点：顶部整体固定，仅表格滚动；顶栏压缩为原高度约一半 ---------- */
.kn-view {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--topbar-h, 79px) - 80px);
  height: calc(100dvh - var(--topbar-h, 79px) - 80px);
  min-height: 480px;
}

.kn-view.has-gantt { height: auto; min-height: 0; }
.kn-view.has-gantt > .kn-list-card { flex: none; height: 620px; min-height: 620px; }

/* 1) 工具栏：筛选与操作并成一行，控件压到 28px */
.kn-view > .kn-toolbar { flex: none; margin-bottom: 8px; }
.kn-view .kn-toolbar { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.kn-view .kn-filter-row { flex: 1 1 auto; width: auto; flex-wrap: wrap; gap: 6px; }
.kn-view .kn-action-row { flex: 0 0 auto; width: auto; margin-left: auto; flex-wrap: wrap; gap: 6px; }
.kn-view .kn-toolbar .select,
.kn-view .kn-toolbar .input { height: 28px; font-size: 10.5px; border-radius: 7px; }
.kn-view .kn-toolbar .select { padding-right: 24px; background-position: right 7px center; }
.kn-view .kn-toolbar .btn { height: 28px; padding: 0 9px; font-size: 10.5px; border-radius: 7px; gap: 5px; }
.kn-view .kn-toolbar .btn .icon { width: 12px; height: 12px; }
.kn-view .kn-search { width: 180px; flex: 1 1 180px; max-width: 200px; }
.kn-view .kn-search .input { height: 28px; padding-left: 26px; font-size: 10.5px; }
.kn-view .kn-search .icon { left: 8px; width: 12px; height: 12px; }

/* 2) KPI：横向紧凑卡片 */
.kn-view .kn-kpis { flex: none; gap: 8px; }
.kn-view .kn-kpis .kpi { padding: 6px 10px; gap: 8px; align-items: center; border-radius: 10px; }
.kn-view .kn-kpis .kpi-icon { width: 26px; height: 26px; border-radius: 7px; }
.kn-view .kn-kpis .kpi-icon .icon { width: 13px; height: 13px; }
.kn-view .kn-kpis .kpi-label { font-size: 9px; line-height: 1.15; letter-spacing: .04em; }
.kn-view .kn-kpis .kpi-value { margin-top: 0; font-size: 17px; line-height: 1.1; }
.kn-view .kn-kpis .kpi-value small { font-size: 9px; }
.kn-view .kn-kpis .kpi-sub { margin-top: 0; font-size: 9px; line-height: 1.15; }

/* 3) 阶段条：压缩内边距与字号 */
.kn-view .kn-stage-strip { flex: none; gap: 6px; margin: 8px 0; }
.kn-view .kn-stage-tile { padding: 4px 9px; border-radius: 8px; }
.kn-view .kn-stage-tile-top { min-height: 13px; }
.kn-view .kn-stage-tile-top span { gap: 4px; font-size: 9.5px; line-height: 1.2; }
.kn-view .kn-stage-tile-top i { width: 6px; height: 6px; box-shadow: 0 0 0 2px color-mix(in srgb, var(--stage-color) 14%, transparent); }
.kn-view .kn-stage-tile-top b { font-size: 13px; line-height: 1; }
.kn-view .kn-stage-tile-bar { height: 3px; margin: 3px 0 2px; }
.kn-view .kn-stage-tile small { display: block; font-size: 8.5px; line-height: 1.1; }

/* 4) 清单卡片：占满剩余高度，仅表体滚动，表头吸顶 */
.kn-view > .kn-list-card {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-top: 0;
  overflow: hidden;
}
.kn-view .kn-list-card > .card-head {
  flex: none;
  min-height: 44px;
  padding: 8px 12px;
  margin-bottom: 0;
  gap: 8px;
  border-bottom: 1px solid var(--line-2);
}
.kn-view .kn-list-card .card-head h2 { font-size: 13px; line-height: 1.35; }
.kn-view .kn-list-card .card-head .sub { display: block; font-size: 9px; line-height: 1.3; letter-spacing: .02em; text-transform: none; }
.kn-view .kn-list-card .card-head .chip { height: 18px; padding: 0 6px; font-size: 9px; }
.kn-view .kn-list-card > .table-scroll { flex: 1 1 auto; min-height: 0; border: 0; border-radius: 0; }
.kn-view .kn-list-card .table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #0d1219;
  box-shadow: 0 1px 0 var(--line);
}
.kn-view .kn-list-card .table-scroll thead { position: sticky; top: 0; z-index: 4; }
.kn-view .kn-list-card .kn-empty-banner { flex: none; margin: 8px 12px 0; }

@media (max-width: 980px) {
  .kn-view { height: calc(100vh - var(--topbar-h, 79px) - 60px); height: calc(100dvh - var(--topbar-h, 79px) - 60px); }
}
@media (min-width: 900px) {
  .kn-view .kn-stage-strip { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (min-width: 761px) {
  .kn-view .kn-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .kn-view { display: block; height: auto; min-height: 0; }
  .kn-view > .kn-list-card { display: block; }
  .kn-view .kn-list-card > .table-scroll { max-height: 65vh; }
  .kn-view .kn-kpis .kpi-sub { display: none; }
  .kn-view .kn-kpis .kpi { padding: 5px 8px; }
  .kn-view .kn-kpis .kpi-value { font-size: 15px; }
  .kn-view .kn-stage-tile small { display: none; }
  .kn-view .kn-list-card .card-head .sub { display: none; }
}


.kn-inline-table th { position: relative; }
.kn-col-resizer { position: absolute; right: -4px; top: 0; bottom: 0; width: 8px; z-index: 3; cursor: col-resize; }
.kn-col-resizer::after { content: ''; position: absolute; left: 3px; top: 22%; bottom: 22%; width: 1px; background: transparent; transition: background .12s; }
.kn-col-resizer:hover::after { background: var(--accent); }
body.kn-resizing { cursor: col-resize; user-select: none; }
body.kn-resizing * { cursor: col-resize !important; }

.kn-progress-box { width: 100%; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.kn-progress-head { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.kn-progress-value { color: var(--ink); font-size: 12px; line-height: 1.1; }
.kn-progress-state { padding: 1px 5px; border-radius: 4px; font-size: 8.5px; white-space: nowrap; }
.kn-progress-state.ok { color: #4ade80; background: rgba(34,197,94,.12); }
.kn-progress-state.doing { color: #38bdf8; background: rgba(56,189,248,.12); }
.kn-progress-state.warn { color: var(--warn); background: var(--warn-soft); }
.kn-progress-state.danger { color: #fb7185; background: var(--danger-soft); }
.kn-progress-state.muted { color: var(--muted-2); background: rgba(148,163,184,.1); }
.kn-progress-head .kn-history-btn { margin-left: auto; }
.kn-progress-unit { color: var(--muted-2); font-size: 9px; margin-left: -2px; }
.kn-progress-head .kn-progress-input { width: 50px; height: 24px; padding: 1px 3px; font-size: 12px; font-weight: 600; color: var(--ink); }
.kn-progress-edit { display: flex; align-items: center; gap: 3px; }
.kn-progress-edit .kn-progress-input { width: 52px; }
.kn-progress-edit > span { color: var(--muted-2); font-size: 9px; }
.kn-feedback { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; min-width: 0; padding: 2px 4px; border: 0; border-radius: 5px; background: none; color: inherit; font: inherit; text-align: center; cursor: pointer; }
.kn-feedback-text { width: 100%; max-width: 100%; color: var(--ink); font-size: 11.5px; line-height: 1.3; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kn-feedback-meta { width: 100%; max-width: 100%; color: var(--muted); font-size: 9px; line-height: 1.3; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kn-feedback.is-empty .kn-feedback-text { color: var(--muted-2); }
.kn-feedback:hover { background: rgba(255,255,255,.04); }
.kn-feedback:hover .kn-feedback-text { color: var(--accent); }
.kn-feedback:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; border-radius: 4px; }


.pc-confirm { display: flex; align-items: center; gap: 14px; margin: 8px 0 2px; padding: 7px 0;
  border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); font-size: 9.5px; color: var(--muted-2); }
.pc-confirm b { color: var(--ink); font-size: 10.5px; }

/* 项目台账卡片：精简版 */
.project-grid { gap: 16px; }
.project-card { padding: 16px 18px; gap: 10px; border-radius: 12px; background: linear-gradient(180deg, rgba(255,255,255,.022), rgba(255,255,255,.006)); }
.pc-top { align-items: center; gap: 12px; }
.pc-mark { width: 40px; height: 40px; border-radius: 11px; font-size: 10px; }
.pc-title b { font-size: 14px; }
.pc-title span { font-size: 9.5px; margin-top: 3px; }
.pc-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: -2px; }
.pc-tag { padding: 2px 7px; border: 1px solid var(--line-2); border-radius: 5px; color: var(--muted); font-size: 8.5px; line-height: 1.4; }
.pc-tag.muted { color: var(--muted-2); }
.pc-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; padding: 11px 13px; border: 1px solid var(--line-2); border-radius: 10px; background: rgba(255,255,255,.018); }
.pc-metric { min-width: 0; }
.pc-metric span { display: block; color: var(--muted-2); font-size: 9px; letter-spacing: .04em; }
.pc-metric b { display: block; margin-top: 3px; color: var(--ink); font-size: 15px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-metric em { display: block; margin-top: 2px; color: var(--muted); font-size: 8.5px; font-style: normal; white-space: nowrap; }
.pc-progress { padding: 0 2px; gap: 5px; }
.pc-progress-head { font-size: 9.5px; }
.pc-dates { gap: 5px; padding: 0; }
.pc-date-row { font-size: 10px; }
.pc-date-label { width: 52px; }
.pc-date-row b { font-size: 10.5px; }
.pc-date-row em { font-size: 9.5px; }
.pc-foot { padding-top: 10px; margin-top: 0; gap: 7px; }
.pc-foot .meta { font-size: 10px; }
.pc-foot .chip { padding: 2px 6px; font-size: 8.5px; }

/* 项目台账：横向一行一个项目 */
.project-list { display: flex; flex-direction: column; gap: 8px; }
.project-list-head,
.project-row {
  display: grid;
  grid-template-columns: minmax(250px, 1.7fr) 92px 108px 108px 96px 120px minmax(168px, 1.1fr) minmax(150px, .9fr) 76px;
  gap: 12px;
  align-items: center;
}
.project-list-head { padding: 0 16px 3px; color: var(--muted-2); font-size: 9px; letter-spacing: .05em; }
.project-list-head .num { text-align: right; }
.project-row {
  padding: 11px 16px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,.018), rgba(255,255,255,.004));
  cursor: pointer;
  transition: border-color .14s, background .14s;
}
.project-row:hover { border-color: var(--line-strong); background: rgba(255,255,255,.028); }
.project-row.archived { opacity: .6; }
.project-row.archived:hover { opacity: 1; }
.pr-main { display: flex; align-items: center; gap: 11px; min-width: 0; }
.pr-mark { width: 38px; height: 38px; border-radius: 10px; flex: none; display: grid; place-items: center; color: #0b1119; font-size: 10px; font-weight: 800; letter-spacing: .03em; box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }
.pr-identity { min-width: 0; }
.pr-title b { display: block; color: var(--ink); font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-title span { display: block; margin-top: 1px; color: var(--muted-2); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 3px; }
.pr-tags .stage-badge { font-size: 8px; padding: 1px 5px; }
.pr-tags .pc-tag { padding: 1px 5px; font-size: 8px; }
.pr-metric { min-width: 0; text-align: right; }
.pr-metric b { display: block; color: var(--ink); font-size: 13px; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.pr-metric em { display: block; margin-top: 2px; color: var(--muted-2); font-size: 8px; font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-progress { min-width: 0; }
.pr-progress-head { display: flex; justify-content: flex-end; margin-bottom: 5px; color: var(--ink); font-size: 10px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pr-progress .bar { height: 4px; }
.pr-dates { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pr-date-line { display: flex; align-items: center; gap: 5px; min-width: 0; color: var(--muted-2); font-size: 8.5px; }
.pr-date-line > span { width: 24px; flex: none; }
.pr-date-line b { flex: 1; min-width: 0; color: var(--ink-2); font-size: 9px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-date-line em { flex: none; color: var(--muted); font-size: 8px; font-style: normal; }
.pr-date-line.actual b { color: var(--accent); }
.pr-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; min-width: 0; }
.pr-owner { color: var(--muted); font-size: 9px; white-space: nowrap; }
.pr-extra { max-width: 100%; color: var(--muted-2); font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-foot .chip { padding: 1px 5px; font-size: 8px; }
.pr-actions-cell { display: flex; justify-content: flex-end; gap: 1px; opacity: .28; transition: opacity .14s; }
.project-row:hover .pr-actions-cell { opacity: 1; }

@media (max-width: 1500px) {
  .project-list-head,
  .project-row { grid-template-columns: minmax(210px, 1.5fr) 82px 96px 96px 88px 104px minmax(145px, 1fr) minmax(120px, .8fr) 66px; gap: 9px; }
}

@media (max-width: 1250px) {
  .project-list-head { display: none; }
  .project-row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 12px; padding: 12px 14px; }
  .pr-main { grid-column: 1 / -1; }
  .pr-metric { text-align: left; }
  .pr-progress { grid-column: 1 / 2; }
  .pr-dates { grid-column: 2 / 4; }
  .pr-foot { grid-column: 1 / 4; }
  .pr-actions-cell { grid-column: 4 / 5; grid-row: 1; align-self: center; }
}


/* ------------------------------- 页面主题 ------------------------------- */
html[data-theme="navy"] {
  color-scheme: dark;
  --bg: #06111f; --bg-2: #081827; --surface: #0c1d30; --surface-2: #10253b; --surface-3: #16304a;
  --line: rgba(148, 197, 255, .12); --line-2: rgba(148, 197, 255, .075); --line-strong: rgba(148, 197, 255, .22);
  --ink: #eaf4ff; --ink-2: #cfe2f7; --muted: #8ba6c4; --muted-2: #5d7896;
  --accent: #38bdf8; --accent-2: #0ea5e9; --accent-3: #7dd3fc;
  --accent-soft: rgba(56, 189, 248, .13); --accent-line: rgba(56, 189, 248, .36);
  --ring: 0 0 0 3px rgba(56, 189, 248, .18);
}
html[data-theme="navy"] body {
  background: radial-gradient(1100px 560px at 76% -12%, rgba(56, 189, 248, .12), transparent 62%),
              radial-gradient(900px 480px at 6% 4%, rgba(99, 102, 241, .08), transparent 60%), var(--bg);
}
html[data-theme="navy"] .sidebar { background: linear-gradient(180deg, #081827 0%, #06111f 60%, #040d18 100%); }
html[data-theme="navy"] .topbar { background: rgba(6, 17, 31, .84); }
html[data-theme="navy"] .brand-mark { background: linear-gradient(150deg, var(--accent-3), var(--accent-2)); color: #042033; }
html[data-theme="navy"] .nav-item.active { color: #f0f9ff; background: linear-gradient(90deg, rgba(56,189,248,.18), rgba(56,189,248,.02) 70%, transparent); }
html[data-theme="navy"] .nav-item:hover { color: #e0f2fe; }

html[data-theme="forest"] {
  color-scheme: dark;
  --bg: #07130f; --bg-2: #091a14; --surface: #0c2119; --surface-2: #102a20; --surface-3: #153729;
  --line: rgba(167, 243, 208, .12); --line-2: rgba(167, 243, 208, .07); --line-strong: rgba(167, 243, 208, .21);
  --ink: #e9fff5; --ink-2: #cfe9dc; --muted: #88a99a; --muted-2: #5d7f70;
  --accent: #34d399; --accent-2: #10b981; --accent-3: #6ee7b7;
  --accent-soft: rgba(52, 211, 153, .13); --accent-line: rgba(52, 211, 153, .34);
  --ring: 0 0 0 3px rgba(52, 211, 153, .18);
}
html[data-theme="forest"] body {
  background: radial-gradient(1100px 560px at 76% -12%, rgba(52, 211, 153, .12), transparent 62%),
              radial-gradient(900px 480px at 6% 4%, rgba(20, 184, 166, .07), transparent 60%), var(--bg);
}
html[data-theme="forest"] .sidebar { background: linear-gradient(180deg, #091a14 0%, #07130f 60%, #050e0b 100%); }
html[data-theme="forest"] .topbar { background: rgba(7, 19, 15, .84); }
html[data-theme="forest"] .brand-mark { background: linear-gradient(150deg, var(--accent-3), var(--accent-2)); color: #03261b; }
html[data-theme="forest"] .nav-item.active { color: #ecfdf5; background: linear-gradient(90deg, rgba(52,211,153,.17), rgba(52,211,153,.02) 70%, transparent); }

html[data-theme="sunset"] {
  color-scheme: dark;
  --bg: #120b1b; --bg-2: #170e22; --surface: #1d122b; --surface-2: #251735; --surface-3: #2f1d43;
  --line: rgba(249, 168, 212, .12); --line-2: rgba(249, 168, 212, .07); --line-strong: rgba(249, 168, 212, .21);
  --ink: #f8edff; --ink-2: #e4d4f3; --muted: #a58bb8; --muted-2: #7a638d;
  --accent: #f472b6; --accent-2: #ec4899; --accent-3: #f9a8d4;
  --accent-soft: rgba(244, 114, 182, .13); --accent-line: rgba(244, 114, 182, .35);
  --ring: 0 0 0 3px rgba(244, 114, 182, .18);
}
html[data-theme="sunset"] body {
  background: radial-gradient(1100px 560px at 76% -12%, rgba(244, 114, 182, .13), transparent 62%),
              radial-gradient(900px 480px at 6% 4%, rgba(139, 92, 246, .09), transparent 60%), var(--bg);
}
html[data-theme="sunset"] .sidebar { background: linear-gradient(180deg, #170e22 0%, #120b1b 60%, #0c0713 100%); }
html[data-theme="sunset"] .topbar { background: rgba(18, 11, 27, .84); }
html[data-theme="sunset"] .brand-mark { background: linear-gradient(150deg, var(--accent-3), var(--accent-2)); color: #3b0624; }
html[data-theme="sunset"] .nav-item.active { color: #fdf2f8; background: linear-gradient(90deg, rgba(244,114,182,.18), rgba(244,114,182,.02) 70%, transparent); }

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6fb; --bg-2: #eef2f8; --surface: #ffffff; --surface-2: #f7f9fc; --surface-3: #eef2f7;
  --line: #dbe3ee; --line-2: #e8eef6; --line-strong: #c8d3e1;
  --ink: #1a2433; --ink-2: #334155; --muted: #64748b; --muted-2: #94a3b8;
  --accent: #ea580c; --accent-2: #c2410c; --accent-3: #fb923c;
  --accent-soft: rgba(234, 88, 12, .09); --accent-line: rgba(234, 88, 12, .3);
  --ring: 0 0 0 3px rgba(234, 88, 12, .16);
  --shadow-sm: 0 1px 0 rgba(15, 23, 42, .03) inset;
  --shadow-md: 0 16px 36px -30px rgba(15, 23, 42, .25);
  --shadow-lg: 0 30px 80px -38px rgba(15, 23, 42, .28);
}
html[data-theme="light"] body {
  background: radial-gradient(1100px 560px at 76% -12%, rgba(251, 146, 60, .16), transparent 62%),
              radial-gradient(900px 480px at 6% 4%, rgba(56, 189, 248, .08), transparent 60%), var(--bg);
}
html[data-theme="light"] body::before {
  background-image: linear-gradient(rgba(15, 23, 42, .035) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(15, 23, 42, .035) 1px, transparent 1px);
}
html[data-theme="light"] .sidebar { background: linear-gradient(180deg, #ffffff 0%, #f6f8fc 60%, #eef2f8 100%); border-right-color: var(--line); }
html[data-theme="light"] .brand-text strong { color: #0f172a; }
html[data-theme="light"] .brand-text span { color: #64748b; }
html[data-theme="light"] .brand-mark { color: #fff; }
html[data-theme="light"] .nav-item { color: #475569; }
html[data-theme="light"] .nav-item:hover { background: rgba(15, 23, 42, .055); color: #0f172a; }
html[data-theme="light"] .nav-item.active { color: #9a3412; background: linear-gradient(90deg, rgba(234,88,12,.14), rgba(234,88,12,.02) 70%, transparent); }
html[data-theme="light"] .nav-subitem { color: #64748b; }
html[data-theme="light"] .nav-subitem:hover { color: #0f172a; background: rgba(15,23,42,.045); }
html[data-theme="light"] .side-title, html[data-theme="light"] .side-project { color: #475569; }
html[data-theme="light"] .side-project:hover { background: rgba(15,23,42,.045); color: #0f172a; }
html[data-theme="light"] .user-chip .meta b { color: #0f172a; }
html[data-theme="light"] .user-chip .meta span { color: #64748b; }
html[data-theme="light"] .topbar { background: rgba(255, 255, 255, .86); border-bottom-color: var(--line); }
html[data-theme="light"] .topbar-title h1 { color: #0f172a; }
html[data-theme="light"] .card { background: #ffffff; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
html[data-theme="light"] .table th { background: #f1f5f9; color: #64748b; }
html[data-theme="light"] .table tbody tr:hover { background: #f8fafc; }
html[data-theme="light"] .modal { background: #ffffff; }
html[data-theme="light"] .select option { background: #ffffff; color: #0f172a; }
html[data-theme="light"] .input, html[data-theme="light"] .select, html[data-theme="light"] .textarea {
  background: rgba(15, 23, 42, .025); border-color: #dbe3ee; color: #1e293b;
}
html[data-theme="light"] .search-trigger { background: #f1f5f9; border-color: #e2e8f0; color: #475569; }
html[data-theme="light"] .search-trigger kbd { background: #e2e8f0; color: #475569; }
html[data-theme="light"] .icon-btn:hover { background: #e2e8f0; color: #0f172a; }
html[data-theme="light"] .modal-backdrop { background: rgba(15, 23, 42, .35); }
html[data-theme="light"] .pc-center { background: #fff; }
html[data-theme="light"] .pc-center:hover { background: #fff7ed; }
html[data-theme="light"] .kn-view .kn-list-card .table-scroll thead th { background: #f8fafc; }
html[data-theme="light"] .kn-inline-input, html[data-theme="light"] .kn-inline-select { color: #334155; }
html[data-theme="light"] .combo-tip-line { fill: #334155; }
html[data-theme="light"] .chart-tick { fill: #64748b; }

.theme-grid { display: flex; flex-direction: column; gap: 8px; }
.theme-option { display: flex; align-items: center; gap: 12px; padding: 9px 11px; border: 1px solid var(--line);
  border-radius: 10px; background: rgba(255,255,255,.02); text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.theme-option:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.theme-option.active { border-color: var(--accent); background: var(--accent-soft); }
.theme-swatch { flex: none; width: 64px; height: 40px; border-radius: 7px; background: var(--swatch-bg);
  border: 1px solid var(--line); display: flex; align-items: flex-end; gap: 3px; padding: 7px; }
.theme-swatch i { display: block; width: 11px; border-radius: 2px; background: var(--swatch-accent); opacity: .9; }
.theme-swatch i:nth-child(1) { height: 10px; opacity: .45; }
.theme-swatch i:nth-child(2) { height: 18px; }
.theme-swatch i:nth-child(3) { height: 25px; opacity: .7; }
.theme-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.theme-meta b { color: var(--ink); font-size: 12px; }
.theme-meta small { color: var(--muted-2); font-size: 9.5px; }
.theme-check { margin-left: auto; color: var(--accent); }
.theme-check .icon { width: 16px; height: 16px; }

.kn-pred { color: var(--muted-2); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }


.tpl-table { table-layout: fixed; width: 100%; }
.tpl-table th, .tpl-table td { padding-left: 6px; padding-right: 6px; }
.tpl-table .input, .tpl-table .select { width: 100%; min-width: 0; padding-left: 6px; padding-right: 22px; }
.tpl-table td:last-child, .tpl-table th:last-child { padding-left: 4px; padding-right: 4px; text-align: center; }

.tpl-table input[type=number]::-webkit-inner-spin-button, .tpl-table input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.tpl-table input[type=number] { -moz-appearance: textfield; }


.kn-date.is-manual, .kn-date.is-manual .kn-date-input { color: #a78bfa; }
.kn-date.is-manual .kn-date-input::-webkit-datetime-edit { color: #a78bfa; }
.kn-date.is-manual .kn-date-empty { color: #a78bfa; }


.kn-date.is-manual { color: #a78bfa !important; }
.kn-date.is-manual .kn-date-input { color: #a78bfa !important; -webkit-text-fill-color: #a78bfa !important; font-weight: 600; }
.kn-date.is-manual .kn-date-input::-webkit-datetime-edit { color: #a78bfa !important; -webkit-text-fill-color: #a78bfa !important; }


.kn-project-picker { display: inline-flex; align-items: center; gap: 9px; flex: none; padding: 4px 8px 4px 11px;
  border: 1px solid color-mix(in srgb, var(--project-color, var(--accent)) 42%, transparent); border-radius: 10px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--project-color, var(--accent)) 14%, transparent), rgba(255,255,255,.015)); }
.kn-project-kicker { color: var(--project-color, var(--accent)); font-size: 9px; font-weight: 700; letter-spacing: .12em; white-space: nowrap; }
.kn-project-picker .select { height: 32px; min-width: 190px; max-width: 260px; padding: 0 26px 0 0; border: 0; background: transparent;
  color: var(--ink); font-size: 13px; font-weight: 700; }
.kn-project-picker .select:hover { border: 0; }
.kn-project-picker .select:focus { border: 0; outline: none; box-shadow: none; }


.kn-pick, .kn-pick-head { padding-left: 8px !important; padding-right: 2px !important; text-align: center; }
.kn-pick input, .kn-pick-head input { width: 14px; height: 14px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.kn-row.is-selected { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.kn-row.is-selected td:first-child { border-left-color: var(--accent); }

/* 总览：项目全面进度 */
.progress-board { overflow: hidden; }
.progress-pillar-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; padding: 0 12px 12px; }
.progress-pillar { min-width: 0; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.005)); }
.progress-pillar.is-overall { border-color: color-mix(in srgb, var(--pillar-tone) 45%, transparent); background: color-mix(in srgb, var(--pillar-tone) 8%, transparent); }
.pp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 9.5px; }
.pp-head span { display: inline-flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-head .icon { width: 11px; height: 11px; color: var(--pillar-tone); }
.pp-head b { color: var(--ink); font-size: 19px; font-variant-numeric: tabular-nums; }
.pp-bar { height: 4px; margin: 8px 0 5px; border-radius: 99px; background: rgba(255,255,255,.07); overflow: hidden; }
.pp-bar i { display: block; height: 100%; border-radius: inherit; }
.pp-meta { color: var(--muted-2); font-size: 8px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress-matrix-wrap { max-height: 430px; overflow: auto; border-top: 1px solid var(--line-2); }
.progress-matrix { min-width: 1080px; }
.progress-matrix thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); }
.progress-matrix th:nth-child(n+2), .progress-matrix td:nth-child(n+2) { width: 132px; }
.progress-matrix th:nth-child(2), .progress-matrix td:nth-child(2) { width: 150px; }
.pm-cell { display: grid; grid-template-columns: minmax(48px, 1fr) 34px; grid-template-areas: "bar value" "meta meta"; align-items: center; gap: 2px 6px; min-width: 0; }
.pm-cell .pm-bar { grid-area: bar; height: 4px; border-radius: 99px; background: rgba(255,255,255,.07); overflow: hidden; }
.pm-cell .pm-bar i { display: block; height: 100%; border-radius: inherit; }
.pm-cell > span { grid-area: value; color: var(--ink); font-size: 9px; text-align: right; font-variant-numeric: tabular-nums; }
.pm-cell > em { grid-area: meta; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted-2); font-size: 8px; font-style: normal; }
.pm-cell.is-overall { grid-template-columns: minmax(66px, 1fr) 38px; }
.pm-cell.is-overall > span { font-size: 11px; font-weight: 700; }
.progress-matrix tbody tr:hover { background: rgba(255,138,30,.035); }

@media (max-width: 1200px) {
  .progress-pillar-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .progress-pillar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 全周期节点周期横图 */
.kn-gantt-toggle.is-active { color: var(--accent); border-color: rgba(255,138,30,.55); background: rgba(255,138,30,.09); }
.kn-gantt-card { margin-top: 14px; overflow: hidden; flex: none; }
.kn-gantt-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 14px 18px 11px; border-bottom: 1px solid var(--line-2); }
.kn-gantt-head h2 { margin: 0; color: var(--ink); font-size: 13px; font-weight: 700; }
.kn-gantt-head p { margin: 4px 0 0; color: var(--muted-2); font-size: 9.5px; }
.kn-gantt-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px 12px; padding-top: 2px; color: var(--muted-2); font-size: 8.5px; }
.kn-gantt-legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.kn-gantt-legend i { display: inline-block; width: 15px; height: 6px; border-radius: 2px; background: rgba(148,163,184,.55); }
.kn-gantt-legend i.done { background: #34d399; }
.kn-gantt-legend i.overdue { background: #f87171; }
.kn-gantt-legend i.actual { width: 7px; height: 7px; border-radius: 1px; background: var(--ink); transform: rotate(45deg); }
.kn-gantt-legend i.today { width: 1px; height: 12px; border-radius: 0; background: var(--accent); }
.kn-gantt-empty { padding: 26px 18px; color: var(--muted-2); font-size: 11px; text-align: center; }
.kn-gantt-scroll { overflow: auto; max-height: 620px; background: var(--surface); }
.kn-gantt-canvas { --kn-gantt-label: 300px; width: max-content; min-width: 100%; }
.kn-gantt-axis { position: sticky; top: 0; z-index: 7; display: flex; height: 34px; background: var(--surface-2); border-bottom: 1px solid var(--line-2); }
.kn-gantt-axis-label { position: sticky; left: 0; z-index: 8; flex: none; width: var(--kn-gantt-label); padding: 0 14px; display: flex; align-items: center; background: var(--surface-2); border-right: 1px solid var(--line-2); color: var(--muted); font-size: 9px; font-weight: 600; letter-spacing: .04em; }
.kn-gantt-axis-track { position: relative; flex: none; height: 34px; }
.kn-gantt-tick { position: absolute; top: 0; bottom: 0; padding: 10px 0 0 5px; border-left: 1px solid rgba(148,163,184,.14); color: var(--muted-2); font-size: 8.5px; white-space: nowrap; }
.kn-gantt-group { display: flex; height: 27px; }
.kn-gantt-group-label { position: sticky; left: 0; z-index: 4; flex: none; width: var(--kn-gantt-label); padding: 0 14px; display: flex; align-items: center; gap: 6px; background: color-mix(in srgb, var(--stage-color) 8%, var(--surface)); border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); color: var(--ink); font-size: 9.5px; font-weight: 700; }
.kn-gantt-group-label i { width: 6px; height: 6px; border-radius: 2px; background: var(--stage-color); }
.kn-gantt-group-label em { margin-left: auto; color: var(--muted-2); font-size: 8px; font-style: normal; font-weight: 500; }
.kn-gantt-group-track { flex: none; background: color-mix(in srgb, var(--stage-color) 5%, var(--surface)); border-bottom: 1px solid var(--line-2); }
.kn-gantt-row { display: flex; height: 32px; }
.kn-gantt-label { position: sticky; left: 0; z-index: 4; flex: none; width: var(--kn-gantt-label); padding: 0 12px 0 14px; display: flex; align-items: center; gap: 7px; background: var(--surface); border-right: 1px solid var(--line-2); border-bottom: 1px solid rgba(148,163,184,.07); }
.kn-gantt-dot { width: 4px; height: 14px; flex: none; border-radius: 2px; opacity: .8; }
.kn-gantt-label-text { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.kn-gantt-label-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); font-size: 9.5px; line-height: 1.35; }
.kn-gantt-label-text em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted-2); font-size: 8px; line-height: 1.25; font-style: normal; }
.kn-gantt-track { position: relative; flex: none; height: 32px; background: var(--surface); border-bottom: 1px solid rgba(148,163,184,.07); }
.kn-gantt-grid { position: absolute; top: 0; bottom: 0; border-left: 1px solid rgba(148,163,184,.08); }
.kn-gantt-bar { position: absolute; top: 9px; height: 14px; border-radius: 4px; background: var(--bar); box-shadow: 0 0 0 1px rgba(255,255,255,.06) inset; z-index: 2; }
.kn-gantt-bar span { display: block; padding: 1px 4px; overflow: hidden; color: rgba(8,12,18,.8); font-size: 7.5px; font-weight: 700; line-height: 12px; white-space: nowrap; }
.kn-gantt-bar.done { background: #34d399; }
.kn-gantt-bar.overdue { background: #f87171; }
.kn-gantt-bar.soon { background: #fbbf24; }
.kn-gantt-bar.doing { background: var(--bar); }
.kn-gantt-bar.todo { background: var(--bar); opacity: .55; }
.kn-gantt-actual { position: absolute; top: 50%; width: 7px; height: 7px; margin-left: -3.5px; transform: translateY(-50%) rotate(45deg); background: var(--ink); border: 1px solid #0b1119; z-index: 3; }
.kn-gantt-today { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--accent); opacity: .75; z-index: 1; pointer-events: none; }
.kn-gantt-row:hover .kn-gantt-label, .kn-gantt-row:hover .kn-gantt-track { background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }

@media (max-width: 900px) {
  .kn-gantt-head { flex-direction: column; gap: 8px; }
  .kn-gantt-legend { justify-content: flex-start; }
  .kn-gantt-canvas { --kn-gantt-label: 220px; }
  .kn-gantt-head h2 { font-size: 12px; }
}


.kn-timeline-card { margin-bottom: 14px; }
.kn-timeline-card .card-head { padding-bottom: 6px; }
.kn-timeline-legend { display: flex; gap: 12px; color: var(--muted-2); font-size: 9.5px; }
.kn-timeline-legend span { display: inline-flex; align-items: center; gap: 4px; }
.kn-timeline-legend i { width: 12px; height: 5px; border-radius: 2px; display: inline-block; }
.kn-timeline-scroll { max-height: 560px; overflow: auto; border-top: 1px solid var(--line-2); }
.kn-timeline-stage { font-size: 10px; font-weight: 700; }
.kn-timeline-name { font-size: 10px; fill: var(--ink-2); }
.kn-timeline-bar-text { font-size: 8.5px; fill: #03131f; font-weight: 600; }

.kn-timeline-unscheduled { font-size: 8.5px; fill: var(--muted-2); }


.kn-gantt-axis, .kn-gantt-axis-track, .kn-gantt-axis-label { height: 50px; }
.kn-gantt-axis-label { align-items: flex-end; padding-bottom: 9px; }
.kn-gantt-stage-band { position: absolute; top: 3px; height: 18px; border-radius: 4px; z-index: 2;
  background: color-mix(in srgb, var(--stage-color) 20%, transparent); border: 1px solid color-mix(in srgb, var(--stage-color) 45%, transparent);
  display: flex; align-items: center; justify-content: center; overflow: hidden; }
.kn-gantt-stage-band span { color: var(--stage-color); font-size: 8px; font-weight: 700; white-space: nowrap; letter-spacing: .04em; }
.kn-gantt-tick { top: 22px; padding-top: 9px; }
.kn-gantt-bar, .kn-gantt-bar.done, .kn-gantt-bar.overdue, .kn-gantt-bar.soon, .kn-gantt-bar.doing { background: #38bdf8; }
.kn-gantt-bar.done { box-shadow: inset 0 0 0 1px #34d399; }
.kn-gantt-bar.overdue { box-shadow: inset 0 0 0 1px #f87171; }
.kn-gantt-bar.soon { box-shadow: inset 0 0 0 1px #fbbf24; }
.kn-gantt-actual { background: #22c55e; border-color: var(--surface); }
.kn-gantt-legend i.plan { background: #38bdf8; }
.kn-gantt-legend i.actual { background: #22c55e; }


.kn-gantt-plan-pin { position: absolute; top: 7px; width: 9px; height: 9px; margin-left: -4.5px; transform: rotate(45deg);
  background: #38bdf8; border: 1px solid #0b1119; z-index: 3; }
.kn-gantt-actual-pin { position: absolute; top: 19px; width: 11px; height: 11px; margin-left: -5.5px; border-radius: 50%;
  background: #22c55e; border: 1px solid var(--surface); z-index: 4; display: flex; align-items: center; justify-content: center; }
.kn-gantt-actual-pin::after { content: "✓"; color: #052013; font-size: 7px; font-weight: 800; line-height: 1; }
.kn-gantt-legend i.plan { width: 8px; height: 8px; border-radius: 1px; transform: rotate(45deg); background: #38bdf8; }
.kn-gantt-legend i.actual { width: 8px; height: 8px; border-radius: 50%; transform: none; background: #22c55e; }


.kn-gantt-tick.is-last { transform: translateX(-100%); padding: 9px 5px 0 0; border-left: 0; border-right: 1px solid rgba(148,163,184,.14); text-align: right; }


/* 打开横图时隐藏页面背景网格，避免被误认为时间线超出图表 */
body:has(.kn-gantt-card)::before { display: none; }
.kn-gantt-card { background: var(--surface); }
.kn-gantt-head { background: var(--surface); border-radius: var(--r-lg) var(--r-lg) 0 0; }


/* 横图与任务表格分开显示，避免表格列线穿过横图 */
.kn-view.has-gantt .kn-list-card { display: none; }

body::before { display: none !important; }


/* 阶段分组轨道需建立定位上下文，防止周网格线相对页面定位而穿透到横图外 */
.kn-gantt-group-track { position: relative; overflow: hidden; }
.kn-gantt-track { overflow: hidden; }



/* 紧凑表格对齐：首列左对齐，数值列右对齐 */
.table.compact th:first-child, .table.compact td:first-child { text-align: left; }
.table.compact th.num, .table.compact td.num { text-align: right; }
.table.compact td:first-child .cell-project { justify-content: flex-start; }
.table.compact td:last-child .table-progress { justify-content: flex-start; }


/* 总览项目经营表：给项目列留出宽度，数值列紧凑右对齐 */
.card.span-8 .table.compact th, .card.span-8 .table.compact td { padding-left: 6px; padding-right: 6px; }
.card.span-8 .table.compact th:first-child, .card.span-8 .table.compact td:first-child { min-width: 186px; }
.card.span-8 .table.compact .cell-project > div { min-width: 0; }
.card.span-8 .table.compact .cell-project b, .card.span-8 .table.compact .cell-project span {
  display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card.span-8 .table.compact .table-progress { min-width: 86px; gap: 6px; }


/* ------------------------------- 在线成员 ------------------------------- */
.presence-chip { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 9px;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.025); color: var(--muted); font-size: 10px; transition: .15s; }
.presence-chip:hover { border-color: var(--accent-line); background: var(--accent-soft); color: var(--ink-2); }
.presence-dot { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.12); flex: none; }
.presence-chip.is-empty .presence-dot { background: var(--muted-2); box-shadow: none; }
.presence-stack { display: flex; align-items: center; padding-left: 3px; }
.presence-stack .avatar { width: 20px; height: 20px; margin-left: -7px; border: 2px solid var(--surface); font-size: 7px; }
.presence-stack .avatar:first-child { margin-left: 0; }
.presence-pop-count { margin-left: auto; min-width: 18px; height: 16px; padding: 0 5px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: 9px; font-weight: 700; display: inline-grid; place-items: center; }
.presence-pop-count:empty { display: none; }
.presence-list { display: flex; flex-direction: column; gap: 5px; }
.presence-person { display: flex; align-items: center; gap: 10px; padding: 8px 9px; border: 1px solid var(--line-2); border-radius: 9px; background: rgba(255,255,255,.018); }
.presence-person-avatar { position: relative; flex: none; display: inline-flex; }
.presence-person-avatar i { position: absolute; right: -1px; bottom: -1px; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; border: 1.5px solid var(--surface); }
.presence-person-main { min-width: 0; flex: 1; }
.presence-person-main b { display: block; font-size: 11.5px; color: var(--ink); }
.presence-person-main span { display: block; font-size: 9px; color: var(--muted-2); }
.presence-person-time { flex: none; font-size: 8.5px; color: var(--muted-2); }
.presence-empty { padding: 24px; text-align: center; color: var(--muted-2); font-size: 11px; }
@media (max-width: 1280px) { .presence-stack { display: none; } }
@media (max-width: 1060px) { .presence-chip [data-presence-label] { display: none; } }
