/* Adex 工作室 · 项目管理工作台 */
:root {
  --bg: #f3f7fd;
  --card: #ffffff;
  --ink: #16182a;
  --ink-2: #3a3e55;
  --muted: #7d829b;
  --faint: #a2a7bd;
  --line: #e9eef9;
  --line-2: #dde6f4;
  --brand: #2563eb;
  --brand-deep: #1d4ed8;
  --brand-soft: #e8f1ff;
  --green: #12b76a;
  --green-soft: #e9f9f1;
  --amber: #f79009;
  --amber-soft: #fff5e6;
  --red: #f04438;
  --red-soft: #feecea;
  --blue: #2e90fa;
  --blue-soft: #e8f4ff;
  --pink: #ee46bc;
  --teal: #15b79e;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(21, 32, 64, 0.04), 0 10px 30px -18px rgba(21, 32, 64, 0.26);
  --shadow-lift: 0 6px 16px -8px rgba(23, 37, 84, 0.18), 0 18px 40px -24px rgba(23, 37, 84, 0.32);
  --sidebar: 228px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d9dceb; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #c4c8dd; }
::-webkit-scrollbar-track { background: transparent; }

.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }

/* ------------------------------------------------------------------ 布局 */
.shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  background: linear-gradient(178deg, #1e40af 0%, #2563eb 42%, #3b82f6 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  z-index: 40;
  overflow: hidden;
}
.sidebar::after {
  content: "";
  position: absolute;
  width: 320px; height: 320px;
  right: -160px; top: -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.18), rgba(255,255,255,0) 70%);
  pointer-events: none;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 18px 14px;
  position: relative; z-index: 1;
}
.brand-mark {
  width: 34px; height: 34px; border-radius: 11px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.22);
  display: grid; place-items: center;
  backdrop-filter: blur(6px);
  flex: none;
}
.brand-text { line-height: 1.2; min-width: 0; }
.brand-text b { display: block; font-size: 14px; letter-spacing: .2px; }
.brand-text span { display: block; font-size: 10.5px; color: rgba(255,255,255,.62); letter-spacing: .6px; margin-top: 2px; }

.nav { flex: 1; overflow-y: auto; padding: 6px 12px 20px; position: relative; z-index: 1; }
.nav::-webkit-scrollbar { width: 0; }
.nav-group { margin-top: 14px; }
.nav-group-title {
  font-size: 10px; letter-spacing: 1.4px; color: rgba(255,255,255,.45);
  padding: 0 10px 6px; text-transform: uppercase;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 10px;
  color: rgba(255,255,255,.78); font-size: 13px;
  margin-bottom: 2px; position: relative;
  transition: background .16s ease, color .16s ease;
  cursor: pointer;
}
.nav-item svg { width: 16px; height: 16px; flex: none; opacity: .85; }
.nav-item:hover { background: rgba(255,255,255,.10); color: #fff; }
.nav-item.active { background: rgba(255,255,255,.18); color: #fff; font-weight: 500; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.nav-item.active svg { opacity: 1; }
.nav-item .badge {
  margin-left: auto; font-size: 10.5px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: rgba(255,255,255,.9); color: #1d4ed8;
  display: grid; place-items: center; font-weight: 600;
}
.sidebar-foot {
  padding: 12px 16px 16px; font-size: 11px; color: rgba(255,255,255,.5);
  border-top: 1px solid rgba(255,255,255,.12); position: relative; z-index: 1;
}
.sidebar-foot b { color: rgba(255,255,255,.8); font-weight: 500; }

.main { margin-left: var(--sidebar); min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  background: linear-gradient(104deg, #1d4ed8 0%, #2563eb 46%, #60a5fa 100%);
  color: #fff;
  padding: 15px 24px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: 0 10px 26px -22px rgba(30, 64, 175, .9);
  overflow: hidden;
}
.topbar::before {
  content: ""; position: absolute; right: -60px; top: -90px; width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(255,255,255,.16), rgba(255,255,255,0) 68%);
  pointer-events: none;
}
.topbar::after {
  content: ""; position: absolute; right: 200px; bottom: -120px; width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(255,255,255,.10), rgba(255,255,255,0) 70%);
  pointer-events: none;
}
.topbar-title { min-width: 0; position: relative; z-index: 1; }
.topbar-title h1 { font-size: 19px; font-weight: 600; letter-spacing: .3px; }
.topbar-title p { font-size: 11.5px; color: rgba(255,255,255,.72); margin-top: 3px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; }
.menu-btn { display: none; }

.user-chip {
  display: flex; align-items: center; gap: 9px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px; padding: 4px 12px 4px 4px;
  color: #fff; cursor: pointer;
}
.user-chip:hover { background: rgba(255,255,255,.22); }
.user-chip .avatar { width: 26px; height: 26px; font-size: 11px; }
.user-chip span { font-size: 12.5px; }
.user-chip small { display: block; font-size: 10px; color: rgba(255,255,255,.7); margin-top: -2px; }

.content { padding: 20px 24px 40px; flex: 1; max-width: 1600px; width: 100%; }

/* ------------------------------------------------------------------ 通用组件 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: 9px;
  border: 1px solid var(--line-2); background: #fff; color: var(--ink-2);
  font-size: 13px; font-weight: 500; white-space: nowrap;
  transition: all .16s ease;
}
.btn:hover { border-color: #cfd3e6; background: #fbfbff; box-shadow: 0 2px 8px -4px rgba(15,35,80,.18); }
.btn svg { width: 15px; height: 15px; }
.btn-primary {
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  border-color: transparent; color: #fff;
  box-shadow: 0 6px 14px -8px rgba(37, 99, 235, .9);
}
.btn-primary:hover { background: linear-gradient(135deg, #1d4ed8, #3b82f6); box-shadow: 0 8px 18px -8px rgba(37, 99, 235, .95); }
.btn-ghost { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.22); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.24); border-color: rgba(255,255,255,.3); box-shadow: none; }
.btn-danger { color: var(--red); border-color: #f6cfcb; }
.btn-danger:hover { background: var(--red-soft); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn-icon { width: 34px; padding: 0; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  min-width: 0;
}
.card.pad-0 { padding: 0; }
.card-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.card-head h3 { font-size: 14px; font-weight: 600; letter-spacing: .2px; }
.card-head .sub { font-size: 11.5px; color: var(--muted); }
.card-head .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.card-link { font-size: 12px; color: var(--brand); cursor: pointer; white-space: nowrap; }
.card-link:hover { text-decoration: underline; }

.pill {
  display: inline-flex; align-items: center; gap: 4px;
  height: 21px; padding: 0 8px; border-radius: 6px;
  font-size: 11px; font-weight: 500; white-space: nowrap;
  background: #f2f3f9; color: var(--muted);
}
.pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .9; }
.pill.no-dot::before { display: none; }
.pill-green { background: var(--green-soft); color: #0d8f54; }
.pill-amber { background: var(--amber-soft); color: #b76a00; }
.pill-red { background: var(--red-soft); color: #cf3529; }
.pill-brand { background: var(--brand-soft); color: #1d4ed8; }
.pill-blue { background: var(--blue-soft); color: #1a6fc4; }
.pill-gray { background: #f2f3f9; color: #6b7088; }
.pill-teal { background: #e6f8f4; color: #0d8f7d; }

.tag {
  display: inline-block; padding: 1px 6px; border-radius: 5px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .2px;
  border: 1px solid transparent;
}
.tag-p0 { background: #feecea; color: #d92d20; border-color: #fbd6d2; }
.tag-p1 { background: #fff5e6; color: #b76a00; border-color: #fbe3c2; }
.tag-p2 { background: #eef4ff; color: #2a6bc4; border-color: #d9e6fb; }
.tag-plain { background: #f4f5fa; color: #6b7088; border-color: #e8eaf4; }

.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: inline-grid; place-items: center;
  color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .3px;
  flex: none; position: relative; overflow: hidden;
  background: #8b8fa8;
}
.avatar-sm { width: 22px; height: 22px; font-size: 10px; }
.avatar-lg { width: 42px; height: 42px; font-size: 15px; }
.avatar-xl { width: 54px; height: 54px; font-size: 18px; border-radius: 16px; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { margin-left: -7px; border: 2px solid #fff; }
.avatar-stack .avatar:first-child { margin-left: 0; }

.progress {
  height: 6px; border-radius: 999px; background: #eef0f7; overflow: hidden;
  flex: 1; min-width: 40px;
}
.progress > i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  transition: width .3s ease;
}
.progress.green > i { background: linear-gradient(90deg, #12b76a, #35d18d); }
.progress.amber > i { background: linear-gradient(90deg, #f79009, #fdb022); }
.progress.red > i { background: linear-gradient(90deg, #f04438, #f97066); }
.progress.blue > i { background: linear-gradient(90deg, #2e90fa, #64b6ff); }
.progress-line { display: flex; align-items: center; gap: 8px; }
.progress-line b { font-size: 11.5px; font-weight: 600; color: var(--ink-2); min-width: 32px; text-align: right; font-variant-numeric: tabular-nums; }

.empty {
  padding: 30px 10px; text-align: center; color: var(--faint); font-size: 12.5px;
}
.empty svg { width: 34px; height: 34px; opacity: .4; margin-bottom: 8px; }

/* 表格 */
.table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.table th {
  text-align: left; font-weight: 500; color: var(--faint); font-size: 11px;
  padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 10px; border-bottom: 1px solid #f4f5fa; vertical-align: middle; }
.table tbody tr { transition: background .14s ease; }
.table tbody tr:hover { background: #fafaff; }
.table tbody tr:last-child td { border-bottom: none; }
.table .cell-title { font-weight: 500; color: var(--ink); }
.table .cell-sub { font-size: 11px; color: var(--faint); margin-top: 1px; }
.table .right { text-align: right; }
.table-wrap { overflow-x: auto; margin: 0 -4px; }

/* 工具栏 / 筛选 */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }
.search {
  position: relative; display: flex; align-items: center;
  height: 34px; background: #fff; border: 1px solid var(--line-2); border-radius: 9px;
  padding: 0 10px; gap: 7px; min-width: 210px;
}
.search svg { width: 15px; height: 15px; color: var(--faint); flex: none; }
.search input { border: 0; outline: 0; background: transparent; width: 100%; font-size: 12.5px; }
.select {
  height: 34px; border: 1px solid var(--line-2); border-radius: 9px; background: #fff;
  padding: 0 28px 0 10px; font-size: 12.5px; color: var(--ink-2); outline: 0;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237d829b' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center;
  cursor: pointer;
}
.select:focus, .search:focus-within { border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(37,99,235,.10); }

.tabs { display: inline-flex; padding: 3px; background: #f1f2f9; border-radius: 10px; gap: 2px; }
.tabs button {
  border: 0; background: transparent; color: var(--muted);
  font-size: 12px; padding: 5px 12px; border-radius: 8px; font-weight: 500;
  transition: all .15s ease;
}
.tabs button:hover { color: var(--ink-2); }
.tabs button.active { background: #fff; color: var(--brand); box-shadow: 0 1px 3px rgba(15,35,80,.12); }

/* ------------------------------------------------------------------ 顶栏欢迎条 */
.welcome {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 16px; margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.welcome .wave { font-size: 20px; }
.welcome b { font-size: 14px; font-weight: 600; }
.welcome p { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.welcome .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.week-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px; border-radius: 999px;
  background: var(--brand-soft); color: #1d4ed8; font-size: 11.5px; font-weight: 500;
}

/* ------------------------------------------------------------------ 概览 */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 14px 12px; box-shadow: var(--shadow);
  display: flex; gap: 10px; align-items: flex-start;
  min-width: 0; transition: transform .18s ease, box-shadow .18s ease;
}
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.kpi-icon {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
}
.kpi-icon svg { width: 17px; height: 17px; }
.kpi-body { min-width: 0; }
.kpi-value { font-size: 22px; font-weight: 600; line-height: 1.1; letter-spacing: -.4px; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: 11px; font-weight: 500; color: var(--faint); margin-left: 3px; letter-spacing: 0; }
.kpi-label { font-size: 11.5px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-sub { font-size: 10.5px; color: var(--faint); margin-top: 3px; display: flex; align-items: center; gap: 4px; }
.kpi-sub .up { color: var(--red); }
.kpi-sub .down { color: var(--green); }
.tone-brand { background: var(--brand-soft); color: #2563eb; }
.tone-green { background: var(--green-soft); color: #0d8f54; }
.tone-amber { background: var(--amber-soft); color: #b76a00; }
.tone-red { background: var(--red-soft); color: #d92d20; }
.tone-blue { background: var(--blue-soft); color: #1a6fc4; }
.tone-teal { background: #e6f8f4; color: #0d8f7d; }

.dash-grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dash-main { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.dash-split { grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr); }
.mt-16 { margin-top: 16px; }

.donut-wrap { display: flex; align-items: center; gap: 18px; }
.donut { width: 132px; height: 132px; flex: none; }
.donut text.value { font-size: 23px; font-weight: 600; fill: var(--ink); }
.donut text.label { font-size: 9px; fill: var(--faint); letter-spacing: .4px; }
.donut-track { fill: none; stroke: #f0f1f8; stroke-width: 11; }
.donut-value { fill: none; stroke-width: 11; stroke-linecap: round; transition: stroke-dasharray .6s ease; }
.legend { display: flex; flex-direction: column; gap: 9px; min-width: 0; flex: 1; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); }
.legend-item .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.legend-item .lv { margin-left: auto; color: var(--faint); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.legend-item b { font-weight: 600; }

.trend-chart { width: 100%; height: 176px; display: block; }
.chart-legend { display: flex; gap: 14px; font-size: 11px; color: var(--muted); }
.chart-legend i { width: 8px; height: 8px; border-radius: 3px; display: inline-block; margin-right: 5px; }

.type-list { display: flex; flex-direction: column; gap: 10px; }
.type-row { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.type-row .name { width: 70px; color: var(--ink-2); flex: none; }
.type-row .bar { flex: 1; height: 6px; border-radius: 999px; background: #f1f2f8; overflow: hidden; }
.type-row .bar i { display: block; height: 100%; border-radius: 999px; }
.type-row .val { width: 52px; text-align: right; color: var(--faint); font-size: 11px; font-variant-numeric: tabular-nums; }
.type-total { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; }
.type-total b { font-size: 22px; font-weight: 600; letter-spacing: -.4px; }
.type-total span { font-size: 11.5px; color: var(--faint); }

.list { display: flex; flex-direction: column; }
.list-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0; border-bottom: 1px dashed #f1f2f8;
  font-size: 12.5px; min-width: 0;
}
.list-row:last-child { border-bottom: none; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .title { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .meta { font-size: 11px; color: var(--faint); margin-top: 2px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.list-row .tail { font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.list-row .tail .warn { color: var(--red); }
.check {
  width: 15px; height: 15px; border-radius: 5px; border: 1.5px solid #d3d7e8;
  flex: none; display: grid; place-items: center;
}
.check.done { background: var(--brand); border-color: var(--brand); }
.check.done svg { width: 9px; height: 9px; color: #fff; }

.workload-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 12.5px; }
.workload-row .who { width: 92px; display: flex; align-items: center; gap: 7px; flex: none; min-width: 0; }
.workload-row .who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workload-row .bar { flex: 1; }
.workload-row .pct { width: 42px; text-align: right; font-size: 11.5px; color: var(--ink-2); font-weight: 500; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ 项目 */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.project-card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 15px 16px; box-shadow: var(--shadow); cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
  position: relative; overflow: hidden;
}
.project-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: #e0dcfb; }
.project-card::before {
  content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%;
  background: linear-gradient(90deg, #3b82f6, #93c5fd);
  opacity: 0; transition: opacity .2s;
}
.project-card:hover::before { opacity: 1; }
.project-top { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.project-top h4 { font-size: 14px; font-weight: 600; line-height: 1.35; flex: 1; min-width: 0; }
.project-desc {
  font-size: 11.5px; color: var(--muted); line-height: 1.55; height: 36px; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-bottom: 10px;
}
.project-meta { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--faint); margin-bottom: 10px; }
.project-meta .avatar { width: 20px; height: 20px; font-size: 9px; }
.project-next {
  font-size: 11.5px; color: var(--ink-2); background: #f8f8fe; border-radius: 8px;
  padding: 7px 9px; margin-bottom: 10px; display: flex; gap: 6px; align-items: flex-start;
}
.project-next b { color: var(--brand); font-weight: 600; }
.project-foot { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--faint); }
.project-foot .progress { height: 5px; }
.project-foot .pct { font-weight: 600; color: var(--ink-2); font-size: 11.5px; }

/* ------------------------------------------------------------------ 看板 */
.board {
  display: grid; grid-template-columns: repeat(5, minmax(216px, 1fr));
  gap: 12px; align-items: start; overflow-x: auto; padding-bottom: 8px;
}
.board-col { background: #f6f7fc; border: 1px solid #eef0f8; border-radius: 14px; padding: 9px; min-width: 0; }
.board-col-head {
  display: flex; align-items: center; gap: 7px; padding: 3px 4px 9px; font-size: 12px; font-weight: 600; color: var(--ink-2);
}
.board-col-head .dot { width: 7px; height: 7px; border-radius: 50%; }
.board-col-head .count {
  margin-left: auto; font-size: 10.5px; color: var(--faint); background: #fff;
  border-radius: 6px; padding: 1px 6px; font-weight: 500;
}
.board-col-body { display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.task-card {
  background: #fff; border: 1px solid #edeef7; border-radius: 11px;
  padding: 10px 11px; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s;
  box-shadow: 0 1px 2px rgba(24,27,60,.03);
}
.task-card:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -12px rgba(40,35,90,.4); border-color: #ddd9fb; }
.task-tags { display: flex; align-items: center; gap: 5px; margin-bottom: 6px; }
.task-tags .proj { font-size: 10px; color: var(--faint); margin-left: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%; }
.task-title { font-size: 12.5px; font-weight: 500; line-height: 1.45; color: var(--ink); margin-bottom: 8px; }
.task-foot { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--faint); }
.task-foot .avatar { width: 18px; height: 18px; font-size: 8.5px; }
.task-foot .due { margin-left: auto; display: flex; align-items: center; gap: 3px; }
.task-foot .due.over { color: var(--red); font-weight: 500; }
.task-foot svg { width: 11px; height: 11px; }
.task-progress { margin-top: 8px; }

/* ------------------------------------------------------------------ 成员 */
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 14px; }
.member-card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 15px;
  box-shadow: var(--shadow); cursor: pointer; transition: transform .18s, box-shadow .18s;
}
.member-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.member-head { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; }
.member-head .who { min-width: 0; flex: 1; }
.member-head b { font-size: 13.5px; font-weight: 600; display: block; }
.member-head span { font-size: 11px; color: var(--faint); }
.member-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.member-stat { background: #f9f9fd; border-radius: 8px; padding: 6px 8px; }
.member-stat b { display: block; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.member-stat span { font-size: 10px; color: var(--faint); }
.member-projects { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 9px; }

/* ------------------------------------------------------------------ 审批 / 会议 / 文档 */
.approval-card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
  box-shadow: var(--shadow); margin-bottom: 10px;
}
.approval-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.approval-head b { font-size: 13.5px; font-weight: 600; }
.approval-head .right { margin-left: auto; }
.approval-detail { font-size: 12px; color: var(--muted); line-height: 1.6; margin-bottom: 10px; }
.approval-meta { display: flex; align-items: center; gap: 12px; font-size: 11px; color: var(--faint); flex-wrap: wrap; }
.approval-actions { display: flex; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed #f0f1f8; }
.approval-actions .spacer { flex: 1; }

.meeting-row {
  display: flex; gap: 14px; padding: 14px 16px; background: #fff;
  border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; box-shadow: var(--shadow);
}
.meeting-date {
  width: 58px; flex: none; text-align: center; border-radius: 10px;
  background: var(--brand-soft); color: #1d4ed8; padding: 9px 0 8px;
}
.meeting-date b { display: block; font-size: 18px; font-weight: 600; line-height: 1.05; }
.meeting-date span { font-size: 9.5px; white-space: nowrap; opacity: .85; }
.meeting-body { flex: 1; min-width: 0; }
.meeting-body h4 { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.meeting-body .agenda { font-size: 12px; color: var(--muted); margin-top: 4px; }
.meeting-body .decisions {
  font-size: 11.5px; color: var(--ink-2); background: #f8f8fe; border-left: 2px solid #93c5fd;
  padding: 7px 10px; border-radius: 0 8px 8px 0; margin-top: 8px;
}

/* ------------------------------------------------------------------ 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(22, 20, 45, .42);
  backdrop-filter: blur(3px); z-index: 100;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 56px 16px 32px; overflow-y: auto;
  animation: fadeIn .18s ease;
}
.modal {
  background: #fff; border-radius: 18px; width: 100%; max-width: 560px;
  box-shadow: 0 30px 80px -30px rgba(20, 15, 60, .55);
  animation: slideUp .22s cubic-bezier(.2,.8,.3,1);
  overflow: hidden;
}
.modal.wide { max-width: 760px; }
.modal-head { padding: 18px 20px 12px; display: flex; align-items: flex-start; gap: 10px; }
.modal-head h3 { font-size: 16px; font-weight: 600; }
.modal-head p { font-size: 11.5px; color: var(--faint); margin-top: 3px; }
.modal-close {
  margin-left: auto; width: 28px; height: 28px; border-radius: 8px; border: 0; background: #f5f5fa;
  color: var(--muted); display: grid; place-items: center; flex: none;
}
.modal-close:hover { background: #ececf6; color: var(--ink); }
.modal-body { padding: 4px 20px 18px; max-height: min(66vh, 640px); overflow-y: auto; }
.modal-foot {
  padding: 12px 20px; background: #fbfbfe; border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px;
}
.modal-foot .spacer { flex: 1; }

.field { display: block; margin-bottom: 12px; }
.field-label { display: block; font-size: 12px; color: var(--ink-2); font-weight: 500; margin-bottom: 5px; }
.field-label em { color: var(--red); font-style: normal; margin-left: 2px; }
.field-hint { font-size: 11px; color: var(--faint); margin-top: 4px; font-style: normal; }
.input, .textarea, select.input {
  width: 100%; border: 1px solid var(--line-2); border-radius: 9px;
  padding: 8px 11px; font-size: 13px; outline: 0; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .textarea:focus { border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(37,99,235,.10); }
.textarea { min-height: 76px; resize: vertical; line-height: 1.6; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.range-row { display: flex; align-items: center; gap: 10px; }
.range-row input[type="range"] { flex: 1; accent-color: var(--brand); }
.range-row b { width: 42px; text-align: right; font-variant-numeric: tabular-nums; }

/* 详情抽屉内容 */
.detail-hero { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.detail-hero h3 { font-size: 17px; font-weight: 600; line-height: 1.35; }
.detail-hero p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.detail-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.detail-meta div { background: #f9f9fd; border-radius: 10px; padding: 8px 10px; }
.detail-meta span { display: block; font-size: 10.5px; color: var(--faint); }
.detail-meta b { display: block; font-size: 12.5px; font-weight: 600; margin-top: 2px; }
.section-title { font-size: 12px; font-weight: 600; color: var(--ink-2); margin: 16px 0 8px; display: flex; align-items: center; gap: 8px; }
.section-title .line { flex: 1; height: 1px; background: #f1f2f8; }

/* Toast */
.toast-root { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: #1f2135; color: #fff; padding: 9px 16px; border-radius: 10px;
  font-size: 12.5px; box-shadow: 0 12px 26px -12px rgba(0,0,0,.5);
  animation: toastIn .22s ease; display: flex; align-items: center; gap: 8px;
  pointer-events: auto; max-width: 90vw;
}
.toast svg { width: 15px; height: 15px; flex: none; }
.toast.ok svg { color: #4ade80; }
.toast.err svg { color: #fca5a5; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ 登录 */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.02fr .98fr; background: #fff; }
.auth-side {
  position: relative; overflow: hidden; color: #fff; padding: 48px 52px;
  background: linear-gradient(150deg, #1e3a8a 0%, #2563eb 45%, #60a5fa 100%);
  display: flex; flex-direction: column;
}
.auth-side::before, .auth-side::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
}
.auth-side::before {
  width: 460px; height: 460px; right: -160px; top: -140px;
  background: radial-gradient(circle, rgba(255,255,255,.20), rgba(255,255,255,0) 66%);
}
.auth-side::after {
  width: 520px; height: 520px; left: -220px; bottom: -260px;
  background: radial-gradient(circle, rgba(255,255,255,.13), rgba(255,255,255,0) 68%);
}
.auth-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.auth-brand .brand-mark { width: 42px; height: 42px; border-radius: 13px; }
.auth-brand b { font-size: 17px; letter-spacing: .3px; }
.auth-brand span { display: block; font-size: 11px; color: rgba(255,255,255,.66); letter-spacing: 1.2px; }
.auth-hero { margin-top: auto; margin-bottom: auto; position: relative; z-index: 1; padding: 24px 0; }
.auth-hero h1 { font-size: 38px; line-height: 1.28; font-weight: 700; letter-spacing: .5px; }
.auth-hero h1 em { font-style: normal; color: #bfdbfe; }
.auth-hero p { margin-top: 14px; font-size: 13.5px; color: rgba(255,255,255,.76); line-height: 1.8; max-width: 420px; }
.auth-points { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 26px; max-width: 440px; }
.auth-point {
  display: flex; align-items: center; gap: 8px; font-size: 12px; color: rgba(255,255,255,.86);
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px; padding: 9px 11px; backdrop-filter: blur(4px);
}
.auth-point svg { width: 14px; height: 14px; opacity: .9; }
.auth-foot { font-size: 11.5px; color: rgba(255,255,255,.5); position: relative; z-index: 1; }

.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: #fbfbfe; }
.auth-card { width: 100%; max-width: 372px; }
.auth-card h2 { font-size: 23px; font-weight: 600; letter-spacing: .3px; }
.auth-card > p { font-size: 12.5px; color: var(--muted); margin-top: 6px; margin-bottom: 24px; }
.auth-form .field { margin-bottom: 14px; }
.auth-input { position: relative; }
.auth-input svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--faint); }
.auth-input .input { padding-left: 34px; height: 42px; border-radius: 10px; }
.auth-actions { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 18px; }
.auth-check { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.auth-check input { accent-color: var(--brand); }
.auth-submit {
  width: 100%; height: 44px; border-radius: 11px; border: 0; color: #fff; font-size: 14px; font-weight: 600;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  box-shadow: 0 12px 24px -14px rgba(37,99,235,.9);
  transition: transform .15s, box-shadow .15s;
}
.auth-submit:hover { transform: translateY(-1px); box-shadow: 0 16px 30px -14px rgba(37,99,235,.95); }
.auth-submit:disabled { opacity: .7; cursor: wait; transform: none; }
.auth-error {
  display: none; margin-bottom: 12px; padding: 9px 12px; border-radius: 9px;
  background: var(--red-soft); color: #c62b21; font-size: 12px;
}
.auth-error.show { display: block; }
.auth-demo { margin-top: 22px; padding-top: 18px; border-top: 1px dashed #e6e7f2; }
.auth-demo p { font-size: 11.5px; color: var(--faint); margin-bottom: 9px; }
.demo-chips { display: flex; gap: 8px; }
.demo-chip {
  flex: 1; border: 1px solid var(--line-2); background: #fff; border-radius: 10px;
  padding: 9px 10px; text-align: left; transition: all .15s;
}
.demo-chip:hover { border-color: #93c5fd; background: #f5f9ff; }
.demo-chip b { display: block; font-size: 12px; }
.demo-chip span { font-size: 10.5px; color: var(--faint); }
.auth-note { margin-top: 20px; font-size: 11px; color: var(--faint); line-height: 1.7; }

/* ------------------------------------------------------------------ 响应式 */
@media (max-width: 1320px) {
  .kpi-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  .dash-main, .dash-split, .cols-3 { grid-template-columns: minmax(0, 1fr); }
  .cols-2 { grid-template-columns: minmax(0, 1fr); }
  .board { grid-template-columns: repeat(5, 216px); }
}
@media (max-width: 960px) {
  :root { --sidebar: 0px; }
  .sidebar {
    transform: translateX(-100%); transition: transform .26s ease; width: 236px;
    box-shadow: 0 20px 60px -20px rgba(20,15,60,.5);
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after {
    content: ""; position: fixed; inset: 0; background: rgba(20,18,40,.4); z-index: 35;
  }
  .main { margin-left: 0; }
  .menu-btn { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.12); color: #fff; }
  .content { padding: 16px 14px 32px; }
  .topbar { padding: 12px 14px; }
  .topbar-title h1 { font-size: 16px; }
  .user-chip small { display: none; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-main { background: #fff; }
}
@media (max-width: 720px) {
  .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { padding: 12px; }
  .kpi-value { font-size: 19px; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .detail-meta { grid-template-columns: 1fr 1fr; }
  .welcome { flex-wrap: wrap; }
  .welcome .right { width: 100%; margin-left: 0; }
  .modal-mask { padding: 12px; align-items: flex-end; }
  .modal { border-radius: 16px; }
  .modal-body { max-height: 68vh; }
  .toolbar .search { min-width: 0; flex: 1; }
  .project-grid, .member-grid { grid-template-columns: 1fr; }
  .donut-wrap { flex-direction: column; align-items: flex-start; }
}

/* 启动占位 */
.boot-screen {
  position: fixed; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
  background: linear-gradient(160deg, #f7f6fe, #eef0fb);
  color: var(--muted); font-size: 12.5px;
}
.boot-mark {
  width: 52px; height: 52px; border-radius: 16px;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  display: grid; place-items: center;
  box-shadow: 0 18px 34px -18px rgba(37, 99, 235, .9);
  animation: bootPulse 1.6s ease-in-out infinite;
}
.boot-mark svg { width: 26px; height: 26px; }
@keyframes bootPulse {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-5px) scale(1.03); }
}

/* 空工作台引导 */
.step-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.step {
  border: 1px solid var(--line); border-radius: 12px; padding: 14px;
  background: linear-gradient(180deg, #fbfdff, #f6f9ff);
}
.step-no {
  width: 24px; height: 24px; border-radius: 8px; background: var(--brand-soft);
  color: var(--brand-deep); display: grid; place-items: center;
  font-size: 12px; font-weight: 600; margin-bottom: 8px;
}
.step h4 { font-size: 13px; margin-bottom: 4px; font-weight: 600; }
.step p { font-size: 11.5px; color: var(--muted); line-height: 1.6; min-height: 38px; margin-bottom: 10px; }
.empty-hero { text-align: center; padding: 52px 24px; }
.empty-hero .ico {
  width: 56px; height: 56px; border-radius: 18px; background: var(--brand-soft);
  color: var(--brand); display: grid; place-items: center; margin: 0 auto 14px;
}
.empty-hero h3 { font-size: 16px; margin-bottom: 6px; }
.empty-hero p { font-size: 12.5px; color: var(--muted); }
.hint-box {
  background: #f5f9ff; border: 1px solid #e2ecfb; color: #334155;
  border-radius: 10px; padding: 12px 14px; font-size: 12.5px; line-height: 1.7;
}
@media (max-width: 720px) {
  .step-list { grid-template-columns: 1fr; }
}

/* 小组 */
.group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; }
.group-card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 15px 16px;
  box-shadow: var(--shadow); cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
}
.group-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: #c7dbff; }
.group-card.group-mine { border-color: #bcd6ff; box-shadow: 0 0 0 1px #dbe8ff inset, var(--shadow); }
.group-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.group-dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.group-top h4 { font-size: 14px; font-weight: 600; flex: 1; min-width: 0; }
.group-top .right { margin-left: auto; }
.group-focus { font-size: 11.5px; color: var(--muted); margin-bottom: 9px; }
.group-leader { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-2); }
.group-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 4px; }
.group-stats div { background: #f9fafd; border-radius: 9px; padding: 7px 9px; }
.group-stats b { display: block; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.group-stats span { font-size: 10px; color: var(--faint); }
.group-recent { margin-top: 11px; border-top: 1px dashed #f0f2f8; padding-top: 9px; display: flex; flex-direction: column; gap: 6px; }
.group-recent-row { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-2); min-width: 0; }
.group-recent-row .ellipsis { flex: 1; min-width: 0; }
.group-claim { margin-top: 9px; font-size: 11px; color: #1d4ed8; background: #eaf2ff; border-radius: 7px; padding: 5px 8px; display: inline-block; }

/* 任务卡片：小组标签 / 待领取 */
.task-group {
  font-size: 10px; color: #1d4ed8; background: #eaf2ff; border-radius: 5px;
  padding: 1px 5px; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.task-claim { font-size: 10.5px; color: #b76a00; background: #fff5e6; border-radius: 5px; padding: 1px 6px; }
.task-foot { flex-wrap: wrap; }

/* 弹窗多选 */
.check-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.check-chip {
  display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line-2);
  border-radius: 8px; padding: 5px 9px; font-size: 12px; cursor: pointer; background: #fff;
}
.check-chip:hover { border-color: #93c5fd; }
.check-chip input { accent-color: var(--brand); margin: 0; }

@media (max-width: 720px) {
  .group-grid { grid-template-columns: 1fr; }
}

.check-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.check-head .btn { margin-left: auto; }

.file-ext {
  display: inline-grid; place-items: center; min-width: 34px; height: 20px; padding: 0 5px;
  border-radius: 5px; background: var(--brand-soft); color: var(--brand-deep);
  font-size: 10px; font-weight: 600; letter-spacing: .3px; flex: none;
}

.doc-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 260px;
  padding: 4px 9px 4px 6px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 11.5px; color: var(--ink); background: #fff; text-decoration: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.doc-chip:hover { border-color: var(--brand); color: var(--brand-deep); background: var(--brand-soft); }
