/* ============================================================
   美团 BD 工作台 — Emerging-Tech Design System (Light)
   Generated via UI/UX Pro Max (Data-Dense Dashboard · Density 8)
   Light cool-gray surfaces · electric-cyan tech accent · Meituan-yellow brand signature
   Type: Fira Code (data/headings) + Fira Sans (body) · monospace numerics
   WCAG AA contrast on light surfaces
   ============================================================ */
:root {
  /* 中性面（浅色，层次递进） */
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --surface-3: #e8eef5;
  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #94a3b8;
  --line: rgba(15, 23, 42, .08);
  --line-strong: rgba(15, 23, 42, .14);

  /* 品牌签名：美团黄（主操作 / 关键数字 / Logo） */
  --accent: #ffc400;
  --accent-ink: #1a1300;
  --accent-soft: rgba(255, 196, 0, .16);
  --accent-press: #f0b400;

  /* 科技强调：电光青（激活态 / 数据 / 焦点 / 进度） */
  --tech: #0ea5e9;            /* 深一档青，保证浅底文字对比度 */
  --tech-bright: #38bdf8;     /* 浅青，用于填充 / 辉光点缀 */
  --tech-soft: rgba(14, 165, 233, .12);
  --tech-glow: rgba(14, 165, 233, .20);

  /* 语义色（浅底高对比） */
  --ok: #10b981;
  --ok-soft: rgba(16, 185, 129, .12);
  --warn: #f59e0b;
  --warn-soft: rgba(245, 158, 11, .14);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, .12);
  --info: #0ea5e9;
  --info-soft: rgba(14, 165, 233, .12);
  --pending: #94a3b8;

  /* 字体：技术感 mono + 干净无衬线 */
  --font-sans: 'Fira Sans', system-ui, -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;

  /* 阴影：浅底用柔和投影；激活态加青色辉光（克制，不位移） */
  --sh: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  --sh-lg: 0 1px 2px rgba(15, 23, 42, .05), 0 14px 40px rgba(15, 23, 42, .12);
  --sh-glow: 0 8px 28px rgba(14, 165, 233, .12), 0 0 0 1px rgba(14, 165, 233, .18);

  --r: 14px;
  --r-sm: 10px;
  --r-xs: 8px;
  --sidebar-w: 236px;
  --topbar-h: 60px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  /* 极淡科技网格背景 */
  background-image:
    linear-gradient(rgba(15, 23, 42, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, .028) 1px, transparent 1px);
  background-size: 30px 30px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, button, textarea { font-family: inherit; }

/* 主题化细节 */
::selection { background: rgba(14, 165, 233, .22); color: #0f172a; }
:focus-visible { outline: 2px solid var(--tech); outline-offset: 2px; border-radius: 4px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
.mono, .tabular { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---------- 登录（浅色玻璃 + 柔和极光） ---------- */
.login-wrap {
  min-height: 100vh; min-height: 100dvh;
  display: grid; place-items: center;
  position: relative; overflow: hidden;
  background: radial-gradient(120% 120% at 50% -10%, #eef4fb 0%, #e2eaf4 70%);
  padding: 20px;
}
.aurora {
  position: absolute; inset: -25%;
  filter: blur(90px); opacity: .5; z-index: 0;
  background:
    radial-gradient(40% 40% at 25% 30%, #ffc400 0%, transparent 60%),
    radial-gradient(45% 45% at 75% 35%, #38bdf8 0%, transparent 60%),
    radial-gradient(40% 40% at 50% 80%, #2ec4b6 0%, transparent 60%);
  animation: drift 20s ease-in-out infinite alternate;
}
@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(4%, -3%) scale(1.08); }
  100% { transform: translate(-3%, 4%) scale(1.03); }
}
.login-card {
  position: relative; z-index: 1;
  width: 392px; max-width: 100%;
  background: rgba(255, 255, 255, .86);
  border: 1px solid rgba(14, 165, 233, .18);
  border-radius: 22px; padding: 40px 34px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .16), 0 0 44px rgba(14, 165, 233, .06);
  backdrop-filter: blur(18px);
  color: var(--ink);
}
.login-logo { display: flex; align-items: center; gap: 13px; margin-bottom: 28px; }
.login-logo .mark {
  width: 46px; height: 46px; border-radius: 13px; flex: none;
  background: var(--accent); display: grid; place-items: center;
  font-size: 23px; font-weight: 800; color: var(--accent-ink);
  box-shadow: 0 0 22px rgba(255, 196, 0, .4);
}
.login-logo h1 { font-size: 19px; font-weight: 800; letter-spacing: .3px; line-height: 1.2; color: #0f172a; }
.login-logo p { font-size: 12px; color: var(--ink-2); margin-top: 3px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 7px; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; height: 46px; padding: 0 14px;
  border: 1.5px solid rgba(15, 23, 42, .12); border-radius: var(--r-sm);
  font-size: 14px; background: #f8fafc; color: var(--ink);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field textarea { height: auto; padding: 12px 14px; min-height: 84px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--tech); box-shadow: 0 0 0 3px var(--tech-soft); background: #fff;
}
.btn {
  height: 46px; border-radius: var(--r-sm);
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 15px;
  width: 100%; transition: background .15s, transform .08s, box-shadow .15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { background: var(--accent-press); box-shadow: 0 6px 20px rgba(255, 196, 0, .28); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; border: 1.5px solid var(--line-strong); color: var(--ink-2); }
.btn.ghost:hover { border-color: var(--tech); color: var(--ink); background: rgba(14, 165, 233, .06); }
.btn.sm { height: 36px; width: auto; padding: 0 16px; font-size: 13px; border-radius: var(--r-xs); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger:hover { background: #dc2626; box-shadow: 0 6px 20px rgba(239, 68, 68, .28); }
.login-hint { margin-top: 18px; font-size: 12px; color: var(--ink-2); background: #f1f5f9; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; line-height: 1.7; }
.login-hint b { color: var(--ink); }
.login-err { color: var(--danger); font-size: 13px; margin-bottom: 12px; min-height: 18px; font-weight: 600; }

/* ---------- 应用骨架 ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar {
  background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
  border-right: 1px solid var(--line);
  color: var(--ink-2); padding: 20px 14px;
  position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto;
  display: flex; flex-direction: column;
  transition: transform .26s cubic-bezier(.22, 1, .36, 1);
}
.side-logo { display: flex; align-items: center; gap: 11px; padding: 6px 8px 18px; }
.side-logo .mark {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  background: var(--accent); display: grid; place-items: center; color: var(--accent-ink);
  font-weight: 800; font-size: 18px; box-shadow: 0 0 18px rgba(255, 196, 0, .4);
}
.side-logo span { font-weight: 800; color: #0f172a; font-size: 16px; letter-spacing: .3px; }
.nav-group-title { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 1.2px; padding: 14px 12px 8px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px;
  color: var(--ink-2); font-weight: 600; font-size: 14px; margin-bottom: 3px;
  transition: background .15s, color .15s, box-shadow .15s; min-height: 44px;
}
.nav-item .ico { width: 22px; height: 22px; display: grid; place-items: center; flex: none; color: inherit; }
.nav-item .ico svg { width: 20px; height: 20px; }
.nav-item:hover { background: rgba(14, 165, 233, .07); color: var(--ink); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(14, 165, 233, .14), rgba(14, 165, 233, .03));
  color: #0369a1; font-weight: 700;
  box-shadow: inset 3px 0 0 var(--tech), 0 0 16px rgba(14, 165, 233, .08);
}
.side-foot { margin-top: auto; padding: 14px 12px; font-size: 11px; color: var(--ink-3); }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: var(--topbar-h);
  background: rgba(255, 255, 255, .82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px;
  position: sticky; top: 0; z-index: 20; gap: 12px;
}
.topbar .crumb { font-size: 15px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar .crumb .sub { font-size: 12px; color: var(--ink-3); font-weight: 500; }
.topbar .user { display: flex; align-items: center; gap: 12px; flex: none; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #ff8a00);
  display: grid; place-items: center; font-weight: 700; color: #1a1300; flex: none;
  box-shadow: 0 0 14px rgba(255, 196, 0, .35);
}
.user .meta { text-align: right; line-height: 1.3; }
.user .meta b { display: block; font-size: 13.5px; color: var(--ink); }
.user .meta span { font-size: 11.5px; color: var(--ink-3); }
.role-tag { font-size: 11px; padding: 3px 9px; border-radius: 20px; background: var(--tech-soft); color: #0369a1; font-weight: 700; border: 1px solid rgba(14, 165, 233, .3); }

.icon-btn { width: 40px; height: 40px; border-radius: 10px; display: none; place-items: center; color: var(--ink-2); transition: background .15s; }
.icon-btn:hover { background: rgba(15, 23, 42, .05); }
.icon-btn svg { width: 22px; height: 22px; }
.hamburger { display: none; }

.content { padding: 26px 24px; flex: 1; }
.page-head { margin-bottom: 22px; }
.page-head h2 { font-size: 22px; font-weight: 800; letter-spacing: .2px; line-height: 1.25; color: #0f172a; }
.page-head p { color: var(--ink-3); font-size: 13px; margin-top: 5px; }
.h-ico { display: inline-flex; align-items: center; vertical-align: middle; margin-right: 9px; color: var(--tech); }
.h-ico svg { width: 22px; height: 22px; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--surface); border-radius: var(--r); box-shadow: var(--sh);
  padding: 20px; border: 1px solid var(--line);
  transition: border-color .18s, box-shadow .2s;
}
.card:hover { border-color: rgba(14, 165, 233, .35); box-shadow: var(--sh-glow); }
.card + .card { margin-top: 18px; }
.card-title { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-title .muted { font-weight: 500; }

.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }

/* 入场动画（标准 stagger，避开密集表格） */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.grid > * { animation: rise .5s cubic-bezier(.22, 1, .36, 1) both; }
.grid > *:nth-child(1) { animation-delay: .03s; }
.grid > *:nth-child(2) { animation-delay: .07s; }
.grid > *:nth-child(3) { animation-delay: .11s; }
.grid > *:nth-child(4) { animation-delay: .15s; }
.grid > *:nth-child(5) { animation-delay: .19s; }
.grid > *:nth-child(6) { animation-delay: .23s; }
.grid > *:nth-child(7) { animation-delay: .27s; }
.grid > *:nth-child(8) { animation-delay: .31s; }

/* KPI 卡片 */
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--sh); padding: 18px 20px; position: relative; overflow: hidden;
  transition: border-color .18s, box-shadow .2s;
}
.kpi:hover { border-color: rgba(14, 165, 233, .35); box-shadow: var(--sh-glow); }
.kpi .k-top { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 13px; font-weight: 600; }
.kpi .k-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--tech-soft); color: var(--tech); flex: none; }
.kpi .k-ico svg { width: 18px; height: 18px; }
.kpi .k-val { font-family: var(--font-mono); font-size: 30px; font-weight: 700; margin-top: 14px; letter-spacing: .3px; font-variant-numeric: tabular-nums; line-height: 1.1; color: #0f172a; }
.kpi .k-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.kpi .k-bar { height: 6px; border-radius: 6px; background: rgba(15, 23, 42, .07); margin-top: 14px; overflow: hidden; }
.kpi .k-bar > i { display: block; height: 100%; border-radius: 6px; box-shadow: 0 0 10px rgba(14, 165, 233, .35); }
.kpi.ring-cell { overflow: visible; display: grid; place-items: center; min-height: 132px; }

/* 看板入口卡 */
.board-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--sh); padding: 20px; cursor: pointer;
  transition: transform .14s, box-shadow .18s, border-color .18s;
}
.board-card:hover { transform: translateY(-3px); box-shadow: var(--sh-glow); border-color: rgba(14, 165, 233, .4); }
.board-card .bh { display: flex; align-items: center; gap: 13px; margin-bottom: 16px; }
.board-card .b-ico {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; flex: none;
  background: var(--surface-3); border: 1px solid var(--line);
}
.board-card .b-ico svg { width: 24px; height: 24px; }
.board-card h3 { font-size: 16px; font-weight: 800; color: #0f172a; }
.board-card .b-desc { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.board-card .b-fig { display: flex; align-items: baseline; gap: 6px; margin-top: 4px; }
.board-card .b-fig b { font-family: var(--font-mono); font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; color: #0f172a; }
.board-card .b-fig span { font-size: 12px; color: var(--ink-3); }
.board-card .b-line { font-size: 12.5px; color: var(--ink-2); margin-top: 8px; font-variant-numeric: tabular-nums; font-family: var(--font-mono); }
.board-card .k-bar { height: 6px; border-radius: 6px; background: rgba(15, 23, 42, .07); margin-top: 14px; overflow: hidden; }
.board-card .k-bar > i { display: block; height: 100%; border-radius: 6px; box-shadow: 0 0 10px rgba(14, 165, 233, .3); }

/* 状态徽章 */
.badge { font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 20px; display: inline-flex; align-items: center; white-space: nowrap; }
.badge.done { background: var(--ok-soft); color: #047857; }
.badge.in_progress { background: var(--info-soft); color: #0284c7; }
.badge.risk { background: var(--danger-soft); color: #dc2626; }
.badge.pending { background: rgba(15, 23, 42, .06); color: var(--ink-3); }

/* 表格 */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; min-width: 560px; }
.table th { text-align: left; font-size: 12px; color: var(--ink-3); font-weight: 700; padding: 11px 14px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.table td { padding: 13px 14px; border-bottom: 1px solid var(--line); font-size: 13.5px; vertical-align: middle; color: var(--ink); }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background .12s; }
.table tr:hover td { background: rgba(14, 165, 233, .045); }
.table .owner { font-weight: 600; color: #0f172a; }
.prog-mini { display: flex; align-items: center; gap: 9px; }
.prog-mini .track { flex: 1; height: 7px; background: rgba(15, 23, 42, .07); border-radius: 6px; overflow: hidden; min-width: 70px; }
.prog-mini .track > i { display: block; height: 100%; border-radius: 6px; box-shadow: 0 0 8px rgba(14, 165, 233, .3); }
.prog-mini .pct { font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--ink-2); min-width: 38px; text-align: right; font-variant-numeric: tabular-nums; }

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(15, 23, 42, .4); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 60; padding: 16px; }
.modal { width: 480px; max-width: 100%; max-height: 92vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 18px; padding: 26px; box-shadow: var(--sh-lg); color: var(--ink); }
.modal h3 { font-size: 17px; font-weight: 800; margin-bottom: 20px; color: #0f172a; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
.modal .btn { width: auto; padding: 0 20px; }
.modal .btn.ghost { flex: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* tabs */
.tabs { display: inline-flex; gap: 4px; background: rgba(15, 23, 42, .04); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 18px; }
.tab { padding: 9px 18px; border-radius: 9px; font-weight: 600; font-size: 13.5px; color: var(--ink-2); transition: background .15s, color .15s; }
.tab.active { background: var(--surface); color: #0f172a; box-shadow: 0 0 0 1px rgba(14, 165, 233, .32), 0 1px 4px rgba(15, 23, 42, .06); }

/* bar rows（图表） */
.bar-row { display: grid; grid-template-columns: 96px 1fr 104px; align-items: center; gap: 12px; margin-bottom: 14px; }
.bar-label { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.bar-track { height: 12px; background: rgba(15, 23, 42, .07); border-radius: 8px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 8px; transition: width .9s cubic-bezier(.22, 1, .36, 1); box-shadow: 0 0 10px rgba(14, 165, 233, .22); }
.bar-value { font-family: var(--font-mono); font-size: 12.5px; text-align: right; color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.bar-pct { color: var(--ink-3); font-weight: 500; }
.stack-bar { display: flex; height: 12px; border-radius: 8px; overflow: hidden; background: rgba(15, 23, 42, .07); width: 100%; }
.stack-seg { height: 100%; }
.col-chart { display: flex; align-items: flex-end; gap: 16px; height: 180px; padding-top: 10px; }
.col-item { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.col-wrap { width: 100%; height: 100%; display: flex; align-items: flex-end; }
.col-bar { width: 100%; border-radius: 8px 8px 0 0; transition: height .9s cubic-bezier(.22, 1, .36, 1); min-height: 4px; box-shadow: 0 0 12px rgba(14, 165, 233, .18); }
.col-val { font-family: var(--font-mono); font-size: 12.5px; font-weight: 700; margin-top: 8px; font-variant-numeric: tabular-nums; color: #0f172a; }
.col-label { font-size: 12px; color: var(--ink-3); margin-top: 2px; text-align: center; }

.empty { color: var(--ink-3); font-size: 13px; text-align: center; padding: 28px 0; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mt16 { margin-top: 16px; }
.muted { color: var(--ink-3); font-size: 12.5px; }

/* 移动端抽屉遮罩 */
.side-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); opacity: 0; visibility: hidden; transition: opacity .26s; z-index: 30; }
.side-overlay.show { opacity: 1; visibility: visible; }

/* 进度环文字（charts.js 内联，此处备用） */
.progress-pct { font-weight: 800; fill: var(--ink); }
.progress-cap { fill: var(--ink-3); }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #ffffff; color: #0f172a; padding: 11px 20px; border-radius: 10px; font-size: 13.5px; z-index: 99; box-shadow: var(--sh-lg), 0 0 0 1px var(--line-strong); animation: toastIn .2s ease; max-width: 90vw; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* 触控目标 & 触摸反馈 */
@media (pointer: coarse) {
  .btn, .field input, .field select, .nav-item, .icon-btn { min-height: 44px; }
  .btn.sm { min-height: 40px; }
  .table tr:active td { background: rgba(14, 165, 233, .07); }
}

/* ============================================================
   响应式断点（内容驱动，保留抽屉 + 表格卡片化）
   ============================================================ */
/* 平板及以下：侧栏折叠为抽屉 */
@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w); max-width: 84vw;
    height: 100vh; height: 100dvh; z-index: 40; transform: translateX(-100%);
    box-shadow: var(--sh-lg);
  }
  .sidebar.open { transform: translateX(0); }
  .hamburger { display: grid; }
  .topbar { padding: 0 16px; }
  .content { padding: 20px 16px; }
}

@media (max-width: 1100px) {
  .grid-6 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* 手机：表格卡片化 */
@media (max-width: 640px) {
  .content { padding: 16px 14px; }
  .page-head h2 { font-size: 19px; }
  .grid-4, .grid-6 { grid-template-columns: 1fr; }
  .kpi .k-val { font-size: 26px; }
  .board-card .b-fig b { font-size: 24px; }
  .row2 { grid-template-columns: 1fr; }
  .modal { padding: 22px 18px; }

  .table-scroll { overflow: visible; }
  .table { min-width: 0; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px 2px; margin-bottom: 12px; }
  .table tbody tr:hover { background: var(--surface); }
  .table td { display: flex; justify-content: space-between; align-items: center; gap: 14px; border: none; padding: 9px 14px; text-align: right; }
  .table td::before { content: attr(data-label); font-size: 12px; color: var(--ink-3); font-weight: 600; text-align: left; flex: none; }
  .table td[data-label="操作"], .table td[data-label="状态"] { justify-content: flex-end; }
  .table td[data-label="任务"] { flex-direction: column; align-items: flex-start; gap: 4px; }
  .table td[data-label="任务"]::before { display: none; }
  .prog-mini { max-width: 60%; }
}

@media (max-width: 380px) {
  .topbar .user .meta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .aurora { animation: none; }
}
