/* ============================================================
   设备任务与汇报平台 · 设计系统
   ============================================================ */
:root {
  /* 字号刻度：全站只用这 6 档 */
  --fs-1: 12px;   /* 辅助信息、徽章、表头 */
  --fs-2: 13px;   /* 次要正文 */
  --fs-3: 14px;   /* 正文默认 */
  --fs-4: 16px;   /* 卡片标题 */
  --fs-5: 20px;   /* 区块标题 */
  --fs-6: 26px;   /* 页面主标题 */

  --bg: #f3f6fb;
  --bg-2: #eef2f8;
  --panel: #ffffff;
  --ink: #16203a;
  --ink-2: #344054;
  --muted: #52627a;
  --line: #e4e9f1;
  --line-2: #eef1f7;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-soft: #eaf1ff;
  --navy: #0b1526;
  --navy-2: #14243d;
  --green: #0f9d58;
  --green-soft: #e7f7ee;
  --amber: #e08a00;
  --amber-soft: #fff5e2;
  --red: #dc3d43;
  --red-soft: #fdecec;
  --violet: #7c3aed;
  --violet-soft: #f2ecff;
  --cyan: #0e8ea8;
  --cyan-soft: #e5f7fa;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .05);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, .18);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-3);
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
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; }
a, button { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
svg { display: block; }
::selection { background: #c7dbff; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #cfd7e3; border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #b6c1d1; background-clip: content-box; border: 2px solid transparent; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------- 基础工具 ---------------- */
.muted { color: var(--muted); }
.small { font-size: var(--fs-2); }
.tiny { font-size: var(--fs-1); }
.strong { font-weight: 600; }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.flex { display: flex; align-items: center; }
.between { display: flex; align-items: center; justify-content: space-between; }
.center { display: flex; align-items: center; justify-content: center; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; }
.gap-10 { gap: 10px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.w-full { width: 100%; }
.text-right { text-align: right; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.divider { height: 1px; background: var(--line-2); margin: 14px 0; }

[data-icon] { display: inline-flex; align-items: center; justify-content: center; flex: none; }
[data-icon] svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.9; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 15px;
  border: 1px solid var(--line); border-radius: 9px;
  background: #fff; color: var(--ink-2);
  font-size: var(--fs-3); font-weight: 550; cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .05s;
  white-space: nowrap;
}
.btn:hover { background: #f7f9fd; border-color: #d5dce8; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn [data-icon] svg { width: 16px; height: 16px; }
.btn.primary {
  background: linear-gradient(180deg, #3273f6, var(--brand));
  border-color: var(--brand-dark); color: #fff;
  box-shadow: 0 1px 2px rgba(29, 78, 216, .3), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn.primary:hover { background: linear-gradient(180deg, #2a68e8, #1f57d6); }
.btn.soft { background: var(--brand-soft); border-color: #d7e4ff; color: var(--brand-dark); }
.btn.soft:hover { background: #dfeaff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: #eef1f7; color: var(--ink); }
.btn.danger { background: #fff; border-color: #f2c9ca; color: var(--red); }
.btn.danger:hover { background: var(--red-soft); }
.btn.success { background: var(--green); border-color: #0b8a4c; color: #fff; }
.btn.success:hover { background: #0c8f50; }
.btn.sm { height: 30px; padding: 0 11px; font-size: var(--fs-2); border-radius: 8px; }
.btn.lg { height: 42px; font-size: var(--fs-4); padding: 0 22px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn.icon-only { width: 34px; padding: 0; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px;
  border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: #eef1f7; color: var(--ink); }

/* ---------------- 表单 ---------------- */
.field { display: block; margin-bottom: 14px; }
.field > span.label, .field > .label {
  display: block; margin-bottom: 6px;
  font-size: var(--fs-2); font-weight: 600; color: var(--ink-2);
}
.field .hint { font-size: var(--fs-1); color: var(--muted); margin-top: 5px; }
.input, .select, .textarea {
  width: 100%; border: 1px solid #dbe2ec; border-radius: 9px;
  background: #fff; color: var(--ink);
  padding: 9px 11px; font-size: var(--fs-3); line-height: 1.5;
  transition: border-color .15s, box-shadow .15s; outline: none;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: #9dbcfb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.input::placeholder, .textarea::placeholder { color: #a4afc0; }
.textarea { resize: vertical; min-height: 82px; }
.select {
  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='%236b7a90' 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 11px center; padding-right: 30px;
}
.input.sm, .select.sm { height: 34px; padding-top: 0; padding-bottom: 0; font-size: var(--fs-2); }
.pick-select { position: relative; }
.pick-trigger { width: 100%; display: flex; align-items: center; justify-content: space-between; text-align: left; cursor: pointer; color: var(--ink); font-size: var(--fs-3); }
.pick-menu { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 80; padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(16, 24, 40, .16); max-height: 250px; overflow: auto; }
.pick-opt { display: flex; width: 100%; align-items: center; border: 0; background: transparent; padding: 9px 10px; border-radius: 7px; font-size: var(--fs-3); color: var(--ink); text-align: left; cursor: pointer; }
.pick-opt:hover { background: #f1f6ff; color: var(--brand-dark); }
.pick-opt.selected { background: #eaf2ff; color: var(--brand-dark); font-weight: 600; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.duration-row { display: flex; gap: 8px; align-items: center; }.duration-row .input { flex: 1 1 auto; min-width: 0; }
.duration-row .select { flex: 0 0 88px; width: 88px; }
.form-grid.three { grid-template-columns: repeat(3, 1fr); }
.form-error {
  background: var(--red-soft); color: #b42318; border: 1px solid #f5cdcd;
  padding: 9px 12px; border-radius: 8px; font-size: var(--fs-2); margin-bottom: 12px;
}
.form-ok {
  background: var(--green-soft); color: #087443; border: 1px solid #bfe8d2;
  padding: 9px 12px; border-radius: 8px; font-size: var(--fs-2);
}
.checkline { display: flex; align-items: center; gap: 8px; font-size: var(--fs-2); color: var(--ink-2); cursor: pointer; }
.checkline input { width: 15px; height: 15px; accent-color: var(--brand); }

.search-box { position: relative; }
.search-box [data-icon] { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: #98a4b6; }
.search-box [data-icon] svg { width: 15px; height: 15px; }
.search-box .input { padding-left: 32px; }

/* ---------------- 徽章 ---------------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 99px;
  font-size: var(--fs-1); font-weight: 600; line-height: 1.6; white-space: nowrap;
  background: #f1f4f9; color: #52627a;
}
.badge.dot::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.b-todo { background: #eef2f8; color: #5b6b82; }
.b-doing { background: var(--brand-soft); color: #1d4ed8; }
.b-review { background: var(--violet-soft); color: #6d28d9; }
.b-done { background: var(--green-soft); color: #087443; }
.b-cancelled { background: #f1f2f4; color: #8b95a5; }
.b-high { background: var(--red-soft); color: #b42318; }
.b-normal { background: var(--amber-soft); color: #a15c00; }
.b-low { background: #eef2f8; color: #52627a; }
.b-running { background: var(--green-soft); color: #087443; }
.b-planned { background: #eef4ff; color: #3b5bdb; }
.b-debugging { background: #e3f2fd; color: #0369a1; }
.b-idle { background: #eef2f8; color: #52627a; }
.b-maintenance { background: var(--amber-soft); color: #a15c00; }
.b-stopped { background: var(--red-soft); color: #b42318; }
.b-submitted { background: var(--green-soft); color: #087443; }
.b-draft { background: #eef2f8; color: #5b6b82; }
.b-none { background: #f6f7f9; color: #98a2b3; }
.b-overdue { background: var(--red-soft); color: #b42318; }
.b-info { background: var(--cyan-soft); color: #0b7185; }

.dot-status { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.dot-status.running { background: #12b76a; box-shadow: 0 0 0 3px rgba(18, 183, 106, .16); }
.dot-status.planned { background: #6366f1; box-shadow: 0 0 0 3px rgba(99, 102, 241, .16); }
.dot-status.debugging { background: #0ea5e9; box-shadow: 0 0 0 3px rgba(14, 165, 233, .16); }
.dot-status.idle { background: #98a2b3; }
.dot-status.maintenance { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, .16); }
.dot-status.stopped { background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, .16); }

/* ---------------- 卡片 ---------------- */
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-head {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--line-2);
}
.card-title { font-size: var(--fs-4); font-weight: 650; letter-spacing: -.1px; }
.card-sub { font-size: var(--fs-2); color: var(--muted); margin-top: 2px; }
.card-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.card-body { padding: 18px 20px; }
.card-body.tight { padding: 12px 14px; }
.card-foot { padding: 12px 20px; border-top: 1px solid var(--line-2); background: #fbfcfe; border-radius: 0 0 var(--radius) var(--radius); }

.section-title { font-size: var(--fs-2); font-weight: 650; color: var(--ink-2); margin: 0 0 10px; display: flex; align-items: center; gap: 7px; }
.section-title .muted { font-weight: 400; }

/* ---------------- 布局 ---------------- */
.shell { display: block; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 238px; z-index: 40;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #0a1425 0%, #0e1c33 55%, #10203a 100%);
  color: #c5d0e0;
}
.side-brand {
  display: flex; align-items: center; gap: 9px;
  padding: 20px 12px 18px;
}
.side-logo { display: block; height: 22px; width: auto; flex: none; }
.side-brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.side-brand-text b { color: #fff; font-size: var(--fs-3); letter-spacing: .1px; white-space: nowrap; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  box-shadow: 0 6px 14px rgba(37, 99, 235, .35), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.logo-mark [data-icon] svg { width: 19px; height: 19px; }
.logo-mark.lg { width: 42px; height: 42px; border-radius: 12px; }

.side-nav { flex: 1; overflow-y: auto; padding: 4px 12px 12px; }
.nav-group {
  font-size: var(--fs-1); letter-spacing: 1.4px; color: #566a86;
  padding: 16px 10px 7px; text-transform: uppercase;
}
.nav-item {
  position: relative; display: flex; align-items: center; gap: 10px;
  padding: 9.5px 11px; margin-bottom: 2px; border-radius: 8px;
  color: #a9b8cc; font-size: var(--fs-3); font-weight: 500;
  transition: background .15s, color .15s;
}
.nav-item [data-icon] svg { width: 17px; height: 17px; }
.nav-item:hover { background: rgba(255, 255, 255, .055); color: #e6edf7; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(59, 130, 246, .26), rgba(59, 130, 246, .07));
  color: #fff; font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, .16);
}
.nav-item.active::before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px;
  width: 3px; border-radius: 0 3px 3px 0; background: #60a5fa;
}
.nav-dot { margin-left: auto; width: 17px; height: 17px; border-radius: 99px; background: #2563eb; color: #fff; font-size: var(--fs-1); font-style: normal; display: grid; place-items: center; font-weight: 700; }
.nav-dot.overdue { background: #dc2626; }

.side-foot { padding: 12px; border-top: 1px solid rgba(255, 255, 255, .07); position: relative; }
.side-user {
  width: 100%; display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 10px; padding: 9px 10px; cursor: pointer; color: inherit; text-align: left;
}
.side-user:hover { background: rgba(255, 255, 255, .08); }
.side-user-info { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.side-user-info b { color: #fff; font-size: var(--fs-2); font-weight: 600; }
.side-user-info small { display: flex; flex-direction: column; gap: 1px; color: #7386a1; font-size: var(--fs-1); line-height: 1.4; }
.side-user-info small span:first-child { color: #8ea2bc; }
.side-user-more { margin-left: auto; color: #64748b; }
.side-user-more svg { width: 16px; height: 16px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #4f8df7, #2563eb);
  color: #fff; font-size: var(--fs-2); font-weight: 600; letter-spacing: .5px;
}
.avatar.sm { width: 24px; height: 24px; font-size: var(--fs-1); }
.avatar.gray { background: linear-gradient(135deg, #94a3b8, #64748b); }
.user-menu {
  position: absolute; left: 12px; right: 12px; bottom: 66px; z-index: 5;
  background: #16263f; border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 10px; padding: 5px; box-shadow: 0 16px 40px rgba(0, 0, 0, .35);
}
.user-menu button, .user-menu .user-menu-link {
  display: block; width: 100%; text-align: left; background: none; border: 0;
  color: #c7d2e3; padding: 8px 10px; border-radius: 7px; font-size: var(--fs-2); cursor: pointer; text-decoration: none;
}
.user-menu button:hover, .user-menu .user-menu-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }

.main { margin-left: 238px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 14px;
  height: 64px; padding: 0 26px;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-title { min-width: 0; }
.topbar-title h1 { font-size: var(--fs-4); font-weight: 680; letter-spacing: -.2px; line-height: 1.3; }
.topbar-title p { font-size: var(--fs-1); color: var(--muted); margin-top: 1px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.topbar-side { display: flex; align-items: center; gap: 12px; padding-left: 14px; border-left: 1px solid var(--line); }
.notif-wrap { position: relative; }
.notif-wrap #notif-btn { position: relative; }
.notif-dot { position: absolute; top: -2px; right: -2px; margin-left: 0; min-width: 16px; height: 16px; padding: 0 4px; font-size: var(--fs-1); }
.notif-panel { position: absolute; right: 0; top: calc(100% + 10px); width: 350px; max-height: 430px; overflow: auto; background: #fff; border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 18px 44px rgba(15, 23, 42, .16); z-index: 70; }
.notif-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; background: #fff; border-bottom: 1px solid var(--line-2); font-size: var(--fs-2); }
.notif-list { display: flex; flex-direction: column; }
.notif-item { padding: 10px 12px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.notif-item:last-child { border-bottom: 0; }
.notif-item:hover { background: #f8fafc; }
.notif-item.unread { background: #f2f7ff; }
.notif-title { font-size: var(--fs-2); font-weight: 600; color: var(--ink); line-height: 1.4; }
.notif-body { margin-top: 3px; font-size: var(--fs-1); color: var(--muted); line-height: 1.5; }
.notif-time { margin-top: 5px; font-size: var(--fs-1); color: #98a2b3; }
.notif-empty { padding: 22px 14px; text-align: center; font-size: var(--fs-1); color: var(--muted); }
.today-chip { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-2); color: var(--muted); }
.today-chip [data-icon] svg { width: 15px; height: 15px; }
.today-chip b { color: var(--ink-2); font-weight: 600; }
.menu-btn { display: none; }
.page { flex: 1; padding: 22px 26px 40px; max-width: 1560px; width: 100%; margin: 0 auto; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h2 { font-size: var(--fs-5); font-weight: 700; letter-spacing: -.3px; }
.page-head p { color: var(--muted); font-size: var(--fs-2); margin-top: 3px; }
.page-head .actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(300px, 1fr); gap: 18px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 18px; }

/* ---------------- KPI ---------------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi {
  display: flex; align-items: center; gap: 13px;
  padding: 15px 17px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  min-width: 0;
}
.kpi-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.kpi-icon svg { width: 21px; height: 21px; }
.kpi-label { font-size: var(--fs-2); color: var(--muted); font-weight: 500; }
.kpi-value { font-size: var(--fs-6); font-weight: 720; line-height: 1.15; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: var(--fs-1); font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 3px; }
.kpi-foot { font-size: var(--fs-1); color: var(--muted); margin-top: 1px; }
.kpi.blue .kpi-icon { background: var(--brand-soft); color: var(--brand); }
.kpi.amber .kpi-icon { background: var(--amber-soft); color: #c27803; }
.kpi.violet .kpi-icon { background: var(--violet-soft); color: var(--violet); }
.kpi.red .kpi-icon { background: var(--red-soft); color: var(--red); }
.kpi.green .kpi-icon { background: var(--green-soft); color: var(--green); }
.kpi.cyan .kpi-icon { background: var(--cyan-soft); color: var(--cyan); }

/* ---------------- 任务列表 ---------------- */
.task-list { display: flex; flex-direction: column; gap: 8px; }
.task-group { background: #fff; border: 1px solid #dbe4f3; border-radius: 16px; overflow: hidden; margin-bottom: 22px; box-shadow: 0 6px 18px rgba(15, 23, 42, .06); }
.task-group:last-child { margin-bottom: 0; }
.task-group-head {
  display: flex; align-items: center; gap: 14px; padding: 15px 18px;
  background: linear-gradient(135deg, var(--group-bg, #f2f7ff), var(--group-bg2, #e4eeff));
  color: var(--group-text, #1e3a8a); cursor: pointer; user-select: none;
  box-shadow: inset 6px 0 0 var(--group-accent, #2563eb);
  border-bottom: 1px solid var(--group-soft, #c7d9fb);
}
.task-group.has-overdue .task-group-head { box-shadow: inset 6px 0 0 #ef4444; }
.task-group-head:focus-visible { outline: 2px solid var(--group-accent, #2563eb); outline-offset: -2px; }
.task-group-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--group-soft, #c7d9fb); display: flex; align-items: center; justify-content: center; color: var(--group-accent, #2563eb); flex: none; }
.task-group-icon svg { width: 22px; height: 22px; }
.avatar.lg { width: 42px; height: 42px; font-size: var(--fs-4); flex: none; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--group-soft, #c7d9fb); }
.task-group-title { flex: 1; min-width: 0; }
.task-group-name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: var(--fs-5); font-weight: 750; color: var(--group-text, #1e3a8a); line-height: 1.35; }
.task-group-count { font-size: var(--fs-2); font-weight: 650; color: var(--group-accent, #2563eb); background: #fff; border: 1px solid var(--group-soft, #c7d9fb); border-radius: 99px; padding: 2px 9px; }
.task-group-meta { font-size: var(--fs-2); color: #475569; margin-top: 5px; font-weight: 500; }
.task-group-meta .overdue-text { color: #b42318; font-weight: 700; }
.task-group-head .badge.b-overdue { background: #fee4e2; color: #b42318; border: 1px solid #fecdca; font-weight: 700; }
.task-group-index { font-size: var(--fs-6); font-weight: 800; color: var(--group-accent, #2563eb); opacity: .25; letter-spacing: 1px; line-height: 1; margin-left: 2px; }
.task-group-toggle { width: 30px; height: 30px; flex: none; border-radius: 8px; border: 1px solid var(--group-soft, #c7d9fb); background: #fff; color: var(--group-accent, #2563eb); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.task-group-toggle svg { width: 16px; height: 16px; transition: transform .15s ease; }
.task-group.collapsed .task-group-toggle svg { transform: rotate(-90deg); }
.task-group.collapsed .task-group-body { display: none; }
.task-group-body { padding: 14px 16px 16px; background: #fff; }
.task-group-body .task-list { gap: 6px; }

/* ---------------- 甘特图 ---------------- */
.gantt { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.gantt-scroll { overflow-x: auto; }
.gantt-inner { min-width: max-content; }
.gantt-head-row { display: flex; position: relative; z-index: 1; background: #fafbfd; border-bottom: 1px solid var(--line); }
.gantt-name {
  width: 260px; min-width: 260px; flex: none; padding: 9px 12px;
  border-right: 1px solid var(--line); position: sticky; left: 0; z-index: 3;
  background: #fafbfd; font-size: var(--fs-1); font-weight: 650; color: var(--muted);
  display: flex; flex-direction: column; justify-content: center; min-height: 38px;
}
.gantt-days { display: flex; }
.gantt-day {
  width: 40px; flex: none; padding: 4px 0 3px; text-align: center;
  border-right: 1px solid var(--line-2); color: var(--muted);
  display: flex; flex-direction: column; line-height: 1.35;
}
.gantt-day b { font-size: var(--fs-1); font-weight: 650; color: var(--ink-2); }
.gantt-day span { font-size: var(--fs-1); }
.gantt-day.weekend { background: #f1f5f9; }
.gantt-day.today { background: var(--brand-soft); }
.gantt-day.today b { color: var(--brand-dark); }
.gantt-group-head {
  display: flex; align-items: center; gap: 8px; min-width: 100%;
  padding: 9px 12px; background: #f1f5fb; border-bottom: 1px solid var(--line);
  font-size: var(--fs-2); font-weight: 650;
}
.gantt-group-head [data-icon] svg { width: 15px; height: 15px; color: var(--muted); }
.gantt-row { display: flex; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.gantt-row:last-child { border-bottom: 0; }
.gantt-row:hover { background: #fafcff; }
.gantt-row .gantt-name {
  background: #fff; font-size: var(--fs-2); color: var(--ink); font-weight: 500;
  padding: 5px 12px; gap: 1px;
}
.gantt-row:hover .gantt-name { background: #fafcff; }
.gantt-row .gantt-name .gantt-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gantt-row .gantt-name .gantt-sub { font-size: var(--fs-1); color: var(--muted); font-weight: 400; }
.gantt-track {
  position: relative; flex: none; display: grid; grid-auto-flow: column;
  grid-auto-columns: 40px; min-height: 38px;
}
.gantt-cell { border-right: 1px solid #f1f4f9; min-height: 38px; }
.gantt-cell.weekend { background: #f8fafc; }
.gantt-bar {
  position: absolute; top: 9px; height: 17px; border-radius: 4px;
  background: #cbd5e1; cursor: pointer; opacity: .95;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .06);
}
.gantt-bar.doing { background: linear-gradient(180deg, #60a5fa, #2563eb); }
.gantt-bar.review { background: linear-gradient(180deg, #a78bfa, #7c3aed); }
.gantt-bar.done { background: linear-gradient(180deg, #34d399, #059669); }
.gantt-bar.todo { background: #cbd5e1; }
.gantt-bar.cancelled { background: #e2e8f0; }
.gantt-bar.overdue { box-shadow: inset 0 0 0 2px #ef4444; }
.gantt-unscheduled { margin-top: 16px; }

.task-item {
  position: relative; display: flex; align-items: center; gap: 13px;
  padding: 12px 14px 12px 16px; background: #fff;
  border: 1px solid var(--line); border-radius: 11px;
  cursor: pointer; transition: box-shadow .15s, border-color .15s, transform .1s;
  overflow: hidden;
}
.task-item:hover { border-color: #cdd9ee; box-shadow: 0 6px 18px rgba(16, 24, 40, .07); }
.task-item .pri-stripe { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.task-item .task-check { display: inline-flex; align-items: center; margin: -2px 0; flex: none; }
.task-item .task-check input { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }
.pri-high { background: #ef4444; }
.pri-normal { background: #f0b429; }
.pri-low { background: #c7d0dd; }
.task-main { flex: 1; min-width: 0; }
.task-title { font-size: var(--fs-3); font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.task-title .title-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-meta { display: flex; align-items: center; gap: 10px; margin-top: 4px; font-size: var(--fs-2); color: var(--muted); flex-wrap: wrap; }
.task-meta .dev { display: inline-flex; align-items: center; gap: 4px; color: #52627a; }
.task-meta .dev svg { width: 13px; height: 13px; }
.task-side { display: flex; align-items: center; gap: 14px; flex: none; }
.task-progress { width: 86px; }
.task-progress .progress { height: 5px; }
.task-progress small { font-size: var(--fs-1); color: var(--muted); display: block; margin-top: 2px; text-align: right; }

.progress { height: 6px; background: #edf1f7; border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #60a5fa, #2563eb); transition: width .3s; }
.progress.green > i { background: linear-gradient(90deg, #34d399, #059669); }
.progress.amber > i { background: linear-gradient(90deg, #fbbf24, #d97706); }
.progress.red > i { background: linear-gradient(90deg, #f87171, #dc2626); }

/* ---------------- 看板 ---------------- */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(215px, 1fr)); gap: 13px; align-items: start; }
.kcol { background: #eaeff7; border-radius: 13px; padding: 9px; min-height: 120px; }
.kcol-head { display: flex; align-items: center; gap: 7px; padding: 3px 5px 9px; font-size: var(--fs-2); font-weight: 650; color: #52627a; }
.kcol-head .count { margin-left: auto; background: rgba(255, 255, 255, .8); border-radius: 99px; padding: 0 7px; font-size: var(--fs-1); color: #64748b; }
.kcard {
  background: #fff; border: 1px solid #e2e8f2; border-radius: 10px;
  padding: 11px 12px; margin-bottom: 8px; cursor: pointer;
  transition: box-shadow .15s, border-color .15s;
}
.kcard:hover { border-color: #c8d6ee; box-shadow: 0 5px 14px rgba(16, 24, 40, .08); }
.kcard-title { font-size: var(--fs-2); font-weight: 600; line-height: 1.45; }
.kcard-meta { display: flex; align-items: center; gap: 6px; margin-top: 7px; font-size: var(--fs-1); color: var(--muted); flex-wrap: wrap; }
.kcard-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; gap: 8px; }
.kcard-foot .progress { flex: 1; height: 4px; }

/* ---------------- 设备 ---------------- */
.dash-device-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.dash-device-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; color: var(--ink); font-size: var(--fs-2); cursor: pointer; }
.dash-device-chip:hover { border-color: #b9cdef; background: #f2f7ff; }
.dash-device-chip b { font-size: var(--fs-3); font-weight: 650; }
.dash-device-chip span { font-size: var(--fs-1); color: #5b6b82; }
.subsystem-rows { display: flex; flex-direction: column; gap: 8px; }
.subsystem-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 32px; gap: 8px; align-items: center; }
.subsystem-row .input { min-width: 0; }
.device-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.device-card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 18px 15px; cursor: pointer; position: relative; overflow: hidden;
  transition: box-shadow .15s, border-color .15s;
}
.device-card:hover { border-color: #cdd9ee; box-shadow: 0 8px 22px rgba(16, 24, 40, .07); }
.device-code { font-size: var(--fs-4); font-weight: 750; letter-spacing: .2px; color: var(--ink); }
.device-name { font-size: var(--fs-4); font-weight: 650; margin-top: 2px; }
.device-sub { font-size: var(--fs-3); color: var(--ink-2); margin-top: 6px; font-weight: 500; }
.device-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: var(--fs-3); color: var(--ink-2); }
.device-foot .owner { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.device-foot .owner [data-icon] svg { width: 16px; height: 16px; color: var(--muted); }
.device-open { font-size: var(--fs-2); color: #3f4f66; background: #eef3fa; border-radius: 99px; padding: 3px 9px; font-weight: 600; }
.device-open.has { background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; }
.device-last { margin-top: 10px; font-size: var(--fs-2); color: #475569; font-weight: 500; }

/* ---------------- 工作台小甘特 ---------------- */
.dg { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.dg-scroll { overflow: auto; max-height: 380px; overscroll-behavior: contain; }
.dg-inner { min-width: 510px; width: 100%; }
.dg-head, .dg-row { display: flex; }
.dg-head { position: sticky; top: 0; z-index: 4; background: #f8fafc; border-bottom: 1px solid var(--line); }
.dg-name { width: 190px; min-width: 190px; flex: none; position: sticky; left: 0; z-index: 2; border-right: 1px solid var(--line); }
.dg-head .dg-name { z-index: 5; padding: 8px 10px; background: #f8fafc; font-size: var(--fs-1); font-weight: 650; color: #475569; }
.dg-days { flex: 1; display: grid; grid-template-columns: repeat(8, minmax(40px, 1fr)); }
.dg-day { padding: 3px 0; text-align: center; border-right: 1px solid #f1f4f9; color: var(--muted); line-height: 1.3; }
.dg-day b { display: block; font-size: var(--fs-1); color: #475569; font-weight: 650; }
.dg-day span { font-size: var(--fs-1); }
.dg-day.weekend { background: #f7f9fc; }
.dg-day.today { background: #eaf1ff; }
.dg-day.today b { color: var(--brand-dark); }
.dg-row { border-bottom: 1px solid var(--line-2); cursor: pointer; }
.dg-row:last-child { border-bottom: 0; }
.dg-row:hover { background: #fafcff; }
.dg-row .dg-name { padding: 6px 10px; background: #fff; display: flex; flex-direction: column; justify-content: center; gap: 1px; min-height: 38px; }
.dg-row:hover .dg-name { background: #fafcff; }
.dg-title { font-size: var(--fs-2); color: var(--ink); font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dg-sub { font-size: var(--fs-1); color: #5b6b82; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dg-track { position: relative; flex: 1; display: grid; grid-template-columns: repeat(8, minmax(40px, 1fr)); min-height: 38px; }
.dg-cell { min-height: 38px; border-right: 1px solid #f6f8fb; }
.dg-cell.weekend { background: #fafbfd; }
.dg-cell.today { background: #f4f8ff; }
.dg-bar {
  position: absolute; top: 7px; height: 20px; border-radius: 6px;
  display: flex; align-items: center; padding: 0 5px;
  font-size: var(--fs-1); font-weight: 650; white-space: nowrap; overflow: hidden;
  box-sizing: border-box; border: 1px solid transparent;
}
.dg-bar span { overflow: hidden; text-overflow: ellipsis; }
.dg-bar.todo { background: #e8f0ff; color: #2f5fbf; border-color: #c9dbff; }
.dg-bar.doing { background: #fff0d4; color: #9a5b00; border-color: #f6d69b; }
.dg-bar.review { background: #f1e8ff; color: #6d28d9; border-color: #ddc9fb; }
.dg-bar.done { background: #dcfce7; color: #15803d; border-color: #b7efc9; }
.dg-bar.cancelled { background: #eef2f7; color: #64748b; border-color: #dbe3ee; }
.dg-bar.overdue {
  background: repeating-linear-gradient(135deg, #fee4e2 0, #fee4e2 6px, #ffd3cf 6px, #ffd3cf 12px);
  color: #b42318; border-color: #f7b6b1;
}
.dg-bar.outside { opacity: .35; }
.dg-foot { padding: 10px 2px 0; font-size: var(--fs-1); color: var(--muted); }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: var(--fs-2); font-weight: 650; color: #475569;
  padding: 10px 12px; border-bottom: 1px solid var(--line); background: #f5f8fc; white-space: nowrap;
}
.table th:first-child { border-radius: 8px 0 0 8px; }
.table th:last-child { border-radius: 0 8px 8px 0; }
.table td { padding: 12px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; font-size: var(--fs-3); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fafcff; }
.table .clickable { cursor: pointer; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .tiny { font-size: var(--fs-1); color: #5b6b82; }
.table .btn.ghost { color: #475569; font-weight: 500; }

/* ---------------- 日报 ---------------- */
.report-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 18px; align-items: start; }
.report-side { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 14px; }
.device-block {
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  margin-bottom: 12px; overflow: hidden;
}
.device-block-head { display: flex; align-items: center; gap: 9px; padding: 10px 13px; background: #f8fafd; border-bottom: 1px solid var(--line-2); }
.device-block-head .dev-code { font-size: var(--fs-1); font-weight: 700; color: #7d8ca3; letter-spacing: .5px; }
.device-block-body { padding: 13px; }
.task-hour-list { display: flex; flex-direction: column; gap: 8px; max-height: 220px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: #fbfcff; margin-bottom: 12px; }
.task-hour-item { display: flex; flex-direction: column; gap: 5px; padding-bottom: 7px; border-bottom: 1px dashed var(--line-2); }
.task-hour-item:last-child { border-bottom: 0; padding-bottom: 0; }
.task-note-field { display: flex; align-items: center; gap: 7px; }
.task-note-field span { flex: none; font-size: var(--fs-1); color: #b42318; font-weight: 650; }
.task-note-field .input { flex: 1; height: 30px; font-size: var(--fs-1); }
.task-note-field[hidden] { display: none; }
.task-hour-note { font-size: var(--fs-1); color: #b42318; margin-top: 3px; }
.task-hour-row { display: flex; align-items: center; gap: 8px; min-height: 30px; }
.task-status-select { width: 160px; flex: none; height: 32px; font-size: var(--fs-2); padding: 0 30px 0 10px; }
.task-hour-title { flex: 1; min-width: 0; font-size: var(--fs-2); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-hour-progress { flex: none; font-size: var(--fs-1); color: var(--muted); white-space: nowrap; }
.task-hour-row .input { width: 74px; height: 30px; flex: none; text-align: right; padding: 0 6px; }
.task-hour-row .task-progress-input { width: 58px; }
.task-progress-unit { font-size: var(--fs-1); color: var(--muted); flex: none; }
.task-hour-unit { font-size: var(--fs-1); color: var(--muted); }
.task-hour-row .icon-btn { flex: none; }
.task-hour-input { flex: 1 1 auto !important; width: auto !important; min-width: 0; height: 30px; font-size: var(--fs-2); }
.task-hour-row .task-hour-input { text-align: left; }
.device-total { font-size: var(--fs-2); color: var(--ink-2); background: #f1f5fa; border-radius: 99px; padding: 3px 9px; font-weight: 500; white-space: nowrap; }
.device-total b { color: var(--brand-dark); font-weight: 700; }
.pick-list { max-height: 380px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.pick-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.pick-row:last-child { border-bottom: 0; }
.pick-row:hover { background: #fafcff; }
.pick-row input { width: 16px; height: 16px; flex: none; accent-color: var(--brand); }
.pick-main { flex: 1; min-width: 0; }
.pick-title { font-size: var(--fs-2); font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-sub { font-size: var(--fs-1); color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-row.added { opacity: .55; cursor: default; }
.pick-empty { padding: 32px 12px; text-align: center; color: var(--muted); font-size: var(--fs-2); }
.device-block .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.device-block .row-3 { display: grid; grid-template-columns: 1fr 1fr 110px; gap: 10px; }
.device-block .field { margin-bottom: 10px; }
.device-block .field:last-child { margin-bottom: 0; }
.device-block .field > .label { font-size: var(--fs-1); margin-bottom: 4px; color: #64748b; }
.device-block .textarea { min-height: 62px; font-size: var(--fs-2); }
.device-block .input { font-size: var(--fs-2); }

.report-status-bar {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px;
}
.status-banner { border-radius: 10px; padding: 10px 14px; font-size: var(--fs-2); display: flex; align-items: center; gap: 8px; }
.status-banner.ok { background: var(--green-soft); color: #087443; border: 1px solid #c9edd9; }
.status-banner.warn { background: var(--amber-soft); color: #a15c00; border: 1px solid #f6dfae; }
.status-banner.info { background: var(--brand-soft); color: #1d4ed8; border: 1px solid #d5e3ff; }

/* ---------------- 周报 ---------------- */
.auto-panel { background: #f8fafd; border: 1px solid var(--line-2); border-radius: 12px; }
.auto-device { padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
.auto-device:last-child { border-bottom: 0; }
.auto-device-head { display: flex; align-items: center; gap: 8px; font-size: var(--fs-2); font-weight: 600; }
.auto-line { display: flex; gap: 7px; font-size: var(--fs-2); color: var(--ink-2); margin-top: 6px; line-height: 1.5; }
.auto-line .bullet { width: 6px; height: 6px; border-radius: 50%; margin-top: 6px; flex: none; }
.bullet.green { background: #12b76a; } .bullet.amber { background: #f59e0b; } .bullet.red { background: #ef4444; } .bullet.blue { background: #3b82f6; }
.auto-device { padding: 16px 16px 18px; }
.auto-device-head { display: flex; align-items: center; gap: 10px; }
.auto-device-icon { width: 34px; height: 34px; border-radius: 9px; background: #eef3fb; display: flex; align-items: center; justify-content: center; color: var(--brand); flex: none; }
.auto-device-icon svg { width: 18px; height: 18px; }
.auto-device-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.auto-device-title b { font-size: var(--fs-3); color: var(--ink); line-height: 1.35; }
.auto-device-title span { font-size: var(--fs-1); color: var(--muted); }
.auto-device-hours { display: flex; align-items: baseline; gap: 5px; color: var(--muted); font-size: var(--fs-1); }
.auto-device-hours b { font-size: var(--fs-4); color: var(--ink); font-weight: 700; }
.auto-stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 12px 0; }
.auto-stat { display: flex; flex-direction: column; gap: 1px; padding: 7px 10px; background: #f8fafc; border: 1px solid var(--line-2); border-radius: 8px; }
.auto-stat span { font-size: var(--fs-1); color: #475569; font-weight: 500; }
.auto-stat b { font-size: var(--fs-5); font-weight: 750; line-height: 1.15; color: var(--ink); }
.auto-stat.green b { color: #15803d; }
.auto-stat.blue b { color: #1d4ed8; }
.auto-stat.amber b { color: #b45309; }
.auto-stat.violet b { color: #6d28d9; }
.auto-stat.red b { color: #b42318; }
.auto-task-list { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-top: 4px; }
.auto-task-row { display: grid; grid-template-columns: minmax(0, 1fr) 64px 96px; align-items: center; gap: 8px; padding: 8px 11px; border-bottom: 1px solid var(--line-2); background: #fff; font-size: var(--fs-2); }
.auto-task-row:last-child { border-bottom: 0; }
.auto-task-row.overdue { background: #fff7f6; box-shadow: inset 3px 0 0 #ef4444; }
.auto-task-row.done { background: #f8fdf9; }
.auto-task-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-weight: 500; font-size: var(--fs-3); }
.auto-task-row .badge { justify-self: start; }
.auto-task-progress { font-size: var(--fs-1); color: #475569; text-align: right; }
.auto-task-due { font-size: var(--fs-1); color: #5b6b82; text-align: right; white-space: nowrap; }
.auto-task-due.late { color: #b42318; font-weight: 600; }
.auto-issue-line { margin-top: 9px; padding: 7px 10px; background: #fff7f6; border-left: 3px solid #ef4444; border-radius: 0 6px 6px 0; font-size: var(--fs-1); color: var(--ink-2); }
.auto-issue-line b { color: #b42318; margin-right: 6px; }
.auto-summary-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 10px 0 4px; padding: 8px 10px; background: #f6f9ff; border: 1px solid #e3ebf8; border-radius: 8px; font-size: var(--fs-2); color: #475569; }
.auto-summary-line b { color: var(--ink); font-size: var(--fs-2); }
.auto-summary-line .auto-overdue { color: #b42318; font-weight: 700; }
.auto-details { margin-top: 6px; }
.auto-details summary { cursor: pointer; font-size: var(--fs-1); font-weight: 600; color: var(--brand-dark); padding: 4px 0; }
.auto-open-all { max-height: 280px; overflow-y: auto; margin-top: 4px; padding: 6px 10px; background: #fbfcff; border: 1px solid var(--line-2); border-radius: 8px; }
.auto-open-all .auto-line { font-size: var(--fs-1); margin-top: 3px; }
.auto-more summary { cursor: pointer; font-size: var(--fs-1); color: var(--muted); padding: 4px 0; }
.auto-open-list { max-height: 180px; overflow-y: auto; margin-top: 8px; padding: 6px 10px; background: #fbfcff; border: 1px solid var(--line-2); border-radius: 8px; }
.auto-open-list .auto-line { font-size: var(--fs-1); margin-top: 3px; }
.auto-hint { font-size: var(--fs-1); color: var(--muted); padding: 4px 0 2px; }

/* ---------------- 例会 ---------------- */
.meeting-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.mkpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.mkpi .label { font-size: var(--fs-2); color: #475569; font-weight: 500; }
.mkpi .value { font-size: var(--fs-6); font-weight: 720; letter-spacing: -.4px; margin-top: 2px; }
.mkpi .value small { font-size: var(--fs-1); font-weight: 500; color: #5b6b82; }

.meeting-device { border: 1px solid var(--line); border-radius: 13px; background: #fff; overflow: hidden; break-inside: avoid; }
.md-head { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line-2); background: linear-gradient(180deg, #fbfcfe, #fff); flex-wrap: wrap; }
.md-title { font-size: var(--fs-4); font-weight: 750; color: var(--ink); }
.md-head .small { font-size: var(--fs-2); color: #5b6b82; }
.md-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 12px 16px 10px; }
.md-stat { display: flex; flex-direction: column; gap: 2px; padding: 9px 11px; background: #f8fafc; border: 1px solid var(--line-2); border-radius: 8px; }
.md-stat span { font-size: var(--fs-2); color: #475569; font-weight: 500; }
.md-stat b { font-size: var(--fs-5); font-weight: 750; color: var(--ink); line-height: 1.15; }
.md-stat.danger b { color: #b42318; }
.md-rate { padding: 0 16px 14px; }
.md-rate .between { font-size: var(--fs-3); color: #475569; margin-bottom: 6px; font-weight: 500; }
.md-rate b { color: var(--ink); font-size: var(--fs-4); }
.md-results { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 14px; }
.md-result-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 999px; font-size: var(--fs-1); font-weight: 600; background: #f1f5f9; color: #475569; }
.md-result-chip b { font-size: var(--fs-2); color: var(--ink); }
.md-result-done { background: #e9f8ef; color: #15803d; }
.md-result-failed { background: #fff1f0; color: #b42318; }
.md-result-blocked { background: #fff7e6; color: #b45309; }
.md-result-doing { background: #eef4ff; color: #2563eb; }
.md-focus { padding: 12px 16px 13px; border-top: 1px solid var(--line-2); background: #fbfcff; }
.md-risk { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--line-2); }
.md-risk:last-child { border-bottom: 0; }
.md-risk-title { flex: 1; min-width: 0; font-size: var(--fs-3); font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-risk-meta { font-size: var(--fs-1); color: #5b6b82; white-space: nowrap; }
.md-issue { margin-top: 7px; padding: 8px 10px; background: #fff7f6; border-left: 3px solid #ef4444; border-radius: 0 6px 6px 0; font-size: var(--fs-2); color: var(--ink-2); }
.md-issue b { color: #b42318; margin-right: 4px; }
.md-works { padding: 12px 16px 13px; border-top: 1px solid var(--line-2); background: #fff; }
.md-work-list { max-height: 330px; overflow-y: auto; padding-right: 6px; display: flex; flex-direction: column; gap: 12px; }
.md-work { border-left: 3px solid #dbe4f0; padding-left: 10px; }
.md-work-head { display: flex; align-items: center; gap: 8px; font-size: var(--fs-1); color: var(--muted); }
.md-work-date { font-weight: 600; color: #5b6b82; }
.md-work-name { font-weight: 600; font-size: var(--fs-3); color: var(--ink); }
.md-work-hours { background: #eef4ff; color: #2563eb; border-radius: 99px; padding: 1px 8px; font-weight: 600; }
.md-work-points { margin: 5px 0 0; padding-left: 18px; font-size: var(--fs-3); line-height: 1.75; color: var(--ink-2); }
.md-work-points li { margin: 2px 0; }
.md-weekly-list { max-height: 330px; overflow-y: auto; padding-right: 6px; display: flex; flex-direction: column; gap: 14px; }
.md-weekly-item { border-left: 3px solid #e5e9f2; padding-left: 10px; }
.md-weekly-head b { font-size: var(--fs-3); color: var(--ink); }
.md-weekly-text { margin: 4px 0 0; font-size: var(--fs-3); line-height: 1.8; color: var(--ink-2); }
.md-weekly-label { display: inline-block; min-width: 34px; margin-right: 6px; padding: 0 6px; border-radius: 4px; background: #f1f5fa; color: #5b6b82; font-size: var(--fs-1); font-weight: 600; }
.md-work-list::-webkit-scrollbar, .md-weekly-list::-webkit-scrollbar { width: 6px; }
.md-work-list::-webkit-scrollbar-thumb, .md-weekly-list::-webkit-scrollbar-thumb { background: #cfd8e3; border-radius: 3px; }
.md-weekly { padding: 12px 16px 13px; border-top: 1px solid var(--line-2); background: #f8fbff; }
.md-weekly-row { display: flex; gap: 8px; padding: 5px 0; font-size: var(--fs-2); line-height: 1.65; color: var(--ink-2); border-bottom: 1px dashed var(--line-2); }
.md-weekly-row:last-child { border-bottom: 0; }
.md-weekly-row b { flex: 0 0 auto; font-weight: 700; color: var(--ink); }
.md-foot { padding: 8px 16px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; background: #fff; }
.md-foot a { font-size: var(--fs-2); font-weight: 600; }
.md-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; padding: 16px; border-top: 1px solid var(--line-2); background: #fbfcff; }
.md-done-col { min-width: 0; }
/* 左边完成列限高 = 右边两块（逾期 160 + 异常 160 + 间距 6） */
.md-done-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 0 22px; max-height: 326px; overflow-y: auto; padding-right: 12px; }
.md-done-list::-webkit-scrollbar { width: 6px; }
.md-done-list::-webkit-scrollbar-thumb { background: #cfd8e3; border-radius: 3px; }
.md-done-row { display: flex; align-items: flex-start; gap: 7px; padding: 8px 0; border-bottom: 1px dashed var(--line-2); font-size: var(--fs-3); }
.md-done-body { min-width: 0; flex: 1; }
.md-done-title { font-weight: 500; color: var(--ink); line-height: 1.5; }
.md-done-meta { margin-top: 2px; font-size: var(--fs-1); color: #5b6b82; }
.md-done-row:last-child { border-bottom: 0; }
.md-done-check { color: #15803d; flex: none; display: flex; }
.md-done-check svg { width: 16px; height: 16px; }
.md-done-title { min-width: 0; color: var(--ink); font-weight: 500; }
.md-done-meta { flex: none; font-size: var(--fs-1); color: #5b6b82; white-space: nowrap; }
.md-detail-grid .md-focus { padding: 0; border: 0; background: transparent; }
.md-body { padding: 14px 16px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px; }
.md-col-title { font-size: var(--fs-3); font-weight: 700; color: #334155; margin-bottom: 9px; }
.md-task { display: flex; align-items: flex-start; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--line-2); font-size: var(--fs-2); }
.md-task:last-child { border-bottom: 0; }
.md-task .t-title { flex: 1; min-width: 0; line-height: 1.45; }
.md-task .t-meta { font-size: var(--fs-1); color: var(--muted); margin-top: 2px; }
.issue-line { font-size: var(--fs-2); line-height: 1.5; padding: 6px 9px; background: #fff8f0; border-left: 2px solid #f0b429; border-radius: 0 6px 6px 0; margin-bottom: 6px; color: #6b4a00; }
.issue-line b { font-weight: 600; }
.note-line { font-size: var(--fs-2); color: var(--ink-2); padding: 6px 0; border-bottom: 1px dashed var(--line-2); }
.note-line:last-child { border-bottom: 0; }

.weekly-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 560px) {
  .weekly-kpis { grid-template-columns: 1fr 1fr; gap: 9px; }
}
.meeting-statusline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding: 9px 12px; background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; font-size: var(--fs-3); color: #475569; }
.meeting-statusline b { color: var(--ink); font-weight: 700; }
.meeting-statusline .ms-label { font-size: var(--fs-2); color: #475569; font-weight: 600; }
.meeting-statusline .ms-sep { color: #cbd5e1; }
.meeting-statusline .btn { margin-left: auto; }
.duty-matrix { overflow-x: auto; margin-top: 6px; max-width: 760px; }
.matrix-table { width: 100%; border-collapse: collapse; font-size: var(--fs-1); }
.matrix-table th { padding: 3px 5px; border-bottom: 1px solid var(--line); color: var(--muted); font-weight: 600; text-align: center; white-space: nowrap; }
.matrix-table th:first-child { text-align: left; }
.matrix-table th span { display: block; font-size: var(--fs-1); font-weight: 400; color: #94a3b8; }
.matrix-table td { padding: 3px 5px; border-bottom: 1px solid var(--line-2); text-align: center; }
.matrix-table tbody tr:last-child td { border-bottom: 0; }
.matrix-table td:first-child { text-align: left; white-space: nowrap; color: var(--ink); font-weight: 500; }
.matrix-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #e2e8f0; vertical-align: middle; }
.matrix-dot.ok { background: #22c55e; box-shadow: 0 0 0 2px #dcfce7; }
.matrix-dot.miss { background: #ef4444; box-shadow: 0 0 0 2px #fee2e2; }
.matrix-legend { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: var(--fs-1); color: var(--muted); }
.issue-sync { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 99px; font-size: var(--fs-1); font-weight: 600; white-space: nowrap; }
.issue-sync.ok { background: #e8f8ee; color: #15803d; }
.issue-sync.fail { background: #ffefee; color: #b42318; }
.issue-sync.pending { background: #fff4de; color: #b45309; }
.issue-table tbody tr { cursor: pointer; }
.push-panel { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; align-items: end; }
.push-panel .field { margin: 0; }
.readonly-field { display: flex; align-items: center; height: 38px; background: #f5f7fb; color: var(--ink-2); border-color: var(--line-2); cursor: default; }
.follow-list { display: flex; flex-direction: column; gap: 8px; max-height: 280px; overflow-y: auto; }
.follow-item { padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: #fbfcfe; }
.follow-meta { display: flex; align-items: center; gap: 8px; }
.follow-meta b { font-size: var(--fs-2); }
.follow-meta .btn { margin-left: auto; }
.follow-text { margin-top: 4px; font-size: var(--fs-2); line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.follow-add { margin-top: 10px; }
@media (max-width: 720px) { .push-panel { grid-template-columns: 1fr; } }
.issue-mini-list { display: flex; flex-direction: column; gap: 7px; max-height: 220px; overflow-y: auto; }
.issue-mini { padding: 8px 10px; border: 1px solid var(--line-2); border-left: 3px solid #f59e0b; border-radius: 0 8px 8px 0; background: #fffdf8; }
.issue-mini-title { font-size: var(--fs-2); font-weight: 600; color: var(--ink); }
.issue-mini-meta { margin-top: 3px; font-size: var(--fs-1); color: var(--muted); }
.issue-mini:last-child { margin-bottom: 0; }
.member-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 99px; background: #f4f6fa; font-size: var(--fs-2); color: #3f4f66; margin: 0 5px 5px 0; }
.member-chip.miss { background: var(--red-soft); color: #b42318; }

/* ---------------- 统计 ---------------- */
.bars { display: flex; align-items: flex-end; gap: 8px; height: 170px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; height: 100%; min-width: 0; }
.bar-pair { display: flex; align-items: flex-end; gap: 4px; width: 100%; height: 100%; justify-content: center; }
.bar { width: 26%; min-width: 8px; border-radius: 5px 5px 0 0; background: linear-gradient(180deg, #93c5fd, #3b82f6); transition: height .4s; min-height: 3px; }
.bar.alt { background: linear-gradient(180deg, #6ee7b7, #10b981); }
.bar-label { font-size: var(--fs-1); color: var(--muted); white-space: nowrap; }
.bar-legend { display: flex; gap: 16px; font-size: var(--fs-1); color: var(--muted); }
.bar-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

.rank-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line-2); font-size: var(--fs-2); }
.rank-row:last-child { border-bottom: 0; }
.rank-no { width: 20px; height: 20px; border-radius: 6px; background: #f1f4f9; color: #64748b; font-size: var(--fs-1); font-weight: 700; display: grid; place-items: center; }
.rank-no.top { background: var(--brand-soft); color: var(--brand-dark); }
.rank-bar { flex: 1; height: 6px; background: #eef1f7; border-radius: 99px; overflow: hidden; }
.rank-bar i { display: block; height: 100%; background: linear-gradient(90deg, #60a5fa, #2563eb); border-radius: 99px; }

/* ---------------- 抽屉 / 弹窗 ---------------- */
.overlay {
  position: fixed; inset: 0; background: rgba(10, 20, 37, .46);
  backdrop-filter: blur(2px); z-index: 60; opacity: 0; transition: opacity .18s;
}
.overlay.show { opacity: 1; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(680px, 96vw); z-index: 70;
  background: #fff; display: flex; flex-direction: column;
  transform: translateX(102%); transition: transform .24s cubic-bezier(.22, .8, .3, 1);
  box-shadow: -24px 0 60px rgba(15, 23, 42, .2);
}
.drawer.open { transform: none; }
.drawer-head { padding: 16px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; gap: 12px; }
.drawer-head h3 { font-size: var(--fs-4); font-weight: 680; letter-spacing: -.2px; line-height: 1.35; }
.drawer-head .sub { font-size: var(--fs-2); color: var(--muted); margin-top: 3px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.drawer-close { margin-left: auto; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 22px 26px; }
.drawer-foot { padding: 13px 22px; border-top: 1px solid var(--line); background: #fbfcfe; display: flex; gap: 9px; justify-content: flex-end; flex-wrap: wrap; }

.modal {
  position: fixed; left: 50%; top: 50%; z-index: 70;
  width: min(580px, 94vw); max-height: 90vh; display: flex; flex-direction: column;
  background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg);
  transform: translate(-50%, -48%) scale(.98); opacity: 0; transition: transform .18s, opacity .18s;
}
.modal.open { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.modal.wide { width: min(760px, 94vw); }
.modal.xwide { width: min(1120px, 96vw); }
.tpl-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.tpl-gantt { border: 1px solid var(--line); border-radius: 10px; background: #fff; max-height: 260px; overflow: auto; margin-bottom: 12px; }
.tpl-g-head { display: flex; position: sticky; top: 0; z-index: 3; background: #f8fafc; border-bottom: 1px solid var(--line); }
.tpl-g-row { display: flex; min-height: 30px; border-bottom: 1px solid var(--line-2); }
.tpl-g-row:last-child { border-bottom: 0; }
.tpl-g-name { width: 220px; min-width: 220px; flex: none; padding: 6px 10px; border-right: 1px solid var(--line); position: sticky; left: 0; z-index: 2; background: #fff; color: var(--ink); font-size: var(--fs-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpl-g-head .tpl-g-name { background: #f8fafc; color: #475569; font-size: var(--fs-1); font-weight: 650; }
.tpl-g-days { flex: 1; display: grid; grid-template-columns: repeat(var(--days), minmax(0, 1fr)); min-width: 0; }
.tpl-g-days span { padding: 6px 0; text-align: center; border-right: 1px solid #f1f4f9; color: #64748b; font-size: var(--fs-1); white-space: nowrap; overflow: hidden; }
.tpl-g-track { position: relative; flex: 1; min-height: 30px; background-image: repeating-linear-gradient(to right, transparent 0, transparent calc(100% / var(--days) - 1px), #f1f4f9 calc(100% / var(--days) - 1px), #f1f4f9 calc(100% / var(--days))); }
.tpl-g-bar { position: absolute; top: 7px; height: 16px; min-width: 4px; border-radius: 4px; background: linear-gradient(180deg, #60a5fa, #2563eb); }
.tpl-table-wrap { max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.tpl-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.tpl-table th { position: sticky; top: 0; z-index: 2; padding: 7px 8px; text-align: left; border-bottom: 1px solid var(--line); background: #f8fafc; color: #475569; font-size: var(--fs-1); font-weight: 650; }
.tpl-table td { padding: 4px 6px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tpl-table tbody tr:last-child td { border-bottom: 0; }
.tpl-table .input, .tpl-table .select { height: 30px; font-size: var(--fs-1); width: 100%; }
.tpl-table .col-grip { width: 26px; min-width: 26px; max-width: 26px; padding: 4px 2px; text-align: center; }
.tpl-table .col-name { width: 26%; min-width: 150px; }
.tpl-table .col-desc { width: 40%; min-width: 200px; }
.tpl-table .col-day { width: 96px; }
.tpl-table .col-day .input { width: 64px; }
.tpl-table .col-cross { width: 190px; min-width: 170px; }
.tpl-table .col-act { width: 64px; white-space: nowrap; }
.tpl-cross { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.tpl-cross .checkline { white-space: nowrap; }
.tpl-cross-days { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-1); color: var(--ink-2); }
.tpl-cross-days .input { width: 54px !important; height: 30px; text-align: center; }
.modal-head { padding: 17px 22px 14px; display: flex; align-items: flex-start; gap: 10px; }
.modal-head h3 { font-size: var(--fs-4); font-weight: 680; }
.modal-head .sub { font-size: var(--fs-1); color: var(--muted); margin-top: 2px; }
.modal-body { padding: 2px 22px 18px; overflow-y: auto; }
.modal-foot { padding: 13px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 9px; background: #fbfcfe; border-radius: 0 0 16px 16px; }
.modal-close { margin-left: auto; }

.toast-root { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: #101f36; color: #fff; padding: 9px 18px; border-radius: 99px;
  font-size: var(--fs-2); box-shadow: 0 10px 30px rgba(15, 23, 42, .28);
  display: flex; align-items: center; gap: 8px; animation: toast-in .2s ease-out;
  max-width: 78vw;
}
.toast [data-icon] svg { width: 16px; height: 16px; }
.toast.ok [data-icon] { color: #4ade80; }
.toast.err [data-icon] { color: #f87171; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------------- 空状态 ---------------- */
.empty { padding: 34px 18px; text-align: center; color: var(--muted); }
.empty .empty-icon { width: 48px; height: 48px; border-radius: 14px; background: #f1f5fa; color: #9aa8ba; display: inline-grid; place-items: center; margin-bottom: 10px; }
.empty .empty-icon svg { width: 22px; height: 22px; }
.empty p { font-size: var(--fs-2); }
.empty .empty-sub { font-size: var(--fs-1); color: #98a2b3; margin-top: 3px; }

/* ---------------- 时间线 ---------------- */
.timeline { position: relative; margin: 4px 0 0 5px; padding-left: 18px; border-left: 2px solid #edf0f5; }
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item:last-child { padding-bottom: 2px; }
.tl-item::before {
  content: ""; position: absolute; left: -25px; top: 4px; width: 8px; height: 8px;
  border-radius: 50%; background: #cbd5e1; box-shadow: 0 0 0 3px #fff;
}
.tl-item.hot::before { background: #2563eb; }
.tl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: var(--fs-2); }
.tl-head b { font-weight: 600; }
.tl-time { color: #98a2b3; font-size: var(--fs-1); }
.tl-content { font-size: var(--fs-2); color: var(--ink-2); margin-top: 3px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }

/* ---------------- 登录 ---------------- */
.login {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(900px 480px at 50% -10%, #e8f0ff 0%, transparent 60%), #f4f7fb;
}
.login-panel { width: 100%; max-width: 400px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0; background: transparent; }
.login-card { width: 100%; max-width: 400px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 30px 30px 26px; box-shadow: 0 18px 50px rgba(16, 24, 40, .08); }
.login-brandline { display: flex; align-items: center; gap: 10px; padding-bottom: 20px; margin-bottom: 22px; border-bottom: 1px solid var(--line-2); }
.istar-logo { display: block; height: 30px; width: auto; }
.login-brandline span { font-size: var(--fs-3); font-weight: 650; color: var(--ink); }
.login-card h2 { font-size: var(--fs-5); font-weight: 700; letter-spacing: -.3px; }
.login-card > .muted { font-size: var(--fs-2); margin: 4px 0 22px; }
.login-card .field { margin-bottom: 16px; }
.login-card .field > span { font-size: var(--fs-2); }
.login-card .input { height: 42px; }
.login-card .btn.lg { margin-top: 6px; }
.login-hint { display: flex; gap: 7px; align-items: flex-start; margin-top: 15px; padding: 0; background: transparent; border: 0; font-size: var(--fs-1); color: #5b6b82; line-height: 1.55; }
.login-hint [data-icon] { color: #6b7a90; margin-top: 1px; }
.login-hint [data-icon] svg { width: 14px; height: 14px; }
.login-copyright { margin-top: 18px; font-size: var(--fs-1); color: #98a2b3; }

/* ---------------- 其他 ---------------- */
.meta-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.meta-item .label { font-size: var(--fs-1); color: var(--muted); }
.meta-item .value { font-size: var(--fs-3); font-weight: 550; margin-top: 2px; }
.info-list { display: flex; flex-direction: column; gap: 11px; }
.info-row { display: flex; align-items: flex-start; gap: 10px; font-size: var(--fs-2); }
.info-row .k { width: 74px; color: var(--muted); flex: none; }
.info-row .v { color: var(--ink-2); word-break: break-word; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tab {
  padding: 9px 14px; border: 0; background: none; cursor: pointer;
  color: var(--muted); font-size: var(--fs-3); font-weight: 550; border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.tab:hover { color: var(--ink-2); }
.tab.active { color: var(--brand-dark); border-color: var(--brand); }

.filters { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 14px; }
.filters .grow { min-width: 160px; }

.seg { display: inline-flex; background: #eaeff7; border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 5px 11px; border-radius: 8px; color: #5b6b82; cursor: pointer; font-size: var(--fs-2); font-weight: 500; white-space: nowrap; }
.seg button.active { background: #fff; box-shadow: 0 1px 3px rgba(16, 24, 40, .14); color: var(--ink); font-weight: 650; }
.seg button .n { color: #98a2b3; font-size: var(--fs-1); margin-left: 2px; }

.week-nav { display: flex; align-items: center; gap: 6px; }
.week-label { font-size: var(--fs-2); font-weight: 600; min-width: 190px; text-align: center; color: var(--ink-2); }

.upload-zone {
  border: 1.5px dashed #cfdaea; border-radius: 12px; padding: 22px; text-align: center;
  background: #fbfcfe; cursor: pointer; transition: border-color .15s, background .15s;
}
.upload-zone:hover, .upload-zone.drag { border-color: #93b4f8; background: #f5f9ff; }
.upload-zone .up-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: inline-grid; place-items: center; margin-bottom: 8px; }
.upload-zone b { font-size: var(--fs-3); }
.upload-zone p { font-size: var(--fs-1); color: var(--muted); margin-top: 3px; }

.pill-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.pill-tab { padding: 5px 12px; border-radius: 99px; border: 1px solid var(--line); background: #fff; font-size: var(--fs-2); color: #5b6b82; cursor: pointer; }
.pill-tab.active { background: var(--brand-soft); border-color: #c7dbff; color: var(--brand-dark); font-weight: 600; }

.stat-line { display: flex; align-items: center; justify-content: space-between; font-size: var(--fs-2); margin-bottom: 7px; gap: 10px; }
.stat-line .k { color: var(--muted); }
.stat-line .v { font-weight: 600; font-variant-numeric: tabular-nums; }

.code-block {
  background: #0f1e35; color: #d6e2f5; border-radius: 12px; padding: 15px 17px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: var(--fs-2);
  white-space: pre-wrap; word-break: break-word; max-height: 320px; overflow: auto; line-height: 1.7;
}
.print-only { display: none; }

@media (max-width: 1240px) {
  .report-layout { grid-template-columns: minmax(0, 1fr) 280px; }
  .meeting-kpis { grid-template-columns: repeat(3, 1fr); }
  .md-body { grid-template-columns: 1fr; }
}
@media (max-width: 1080px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .dash-grid, .report-layout { grid-template-columns: 1fr; }
  .report-side { position: static; }
  .kanban { grid-template-columns: repeat(4, 260px); overflow-x: auto; padding-bottom: 8px; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-102%); transition: transform .22s; box-shadow: 20px 0 50px rgba(0, 0, 0, .25); }
  .sidebar.open { transform: none; }
  .sidebar-mask { position: fixed; inset: 0; background: rgba(10, 20, 37, .4); z-index: 35; opacity: 0; pointer-events: none; transition: opacity .2s; }
  .sidebar-mask.show { opacity: 1; pointer-events: auto; }
  .main { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 0 16px; gap: 10px; }
  .topbar-side { display: none; }
  .page { padding: 16px 16px 34px; }
  .login { padding: 16px; }
  .login-card { padding: 26px 22px 24px; }
  .task-side .task-progress { display: none; }
  .meta-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid, .form-grid.three { grid-template-columns: 1fr; }
  .meeting-kpis { grid-template-columns: repeat(2, 1fr); }
  .topbar-actions .btn span.txt { display: none; }
  .device-block .row-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 12px; gap: 10px; }
  .kpi-icon { width: 36px; height: 36px; }
  .kpi-value { font-size: var(--fs-5); }
  .task-side { gap: 8px; }
  .page-head h2 { font-size: var(--fs-5); }
  .drawer { width: 100vw; }
  .modal { width: 96vw; }
  .toast { font-size: var(--fs-2); }
  .device-block .row-2, .device-block .row-3 { grid-template-columns: 1fr; }
  .task-hour-list { max-height: 320px; min-width: 0; }
  .device-block, .device-block-body, .device-block-head { min-width: 0; }
  .device-block-head { flex-wrap: wrap; gap: 8px; }
  .device-block-head .dev-select { max-width: none !important; flex: 1 1 160px; min-width: 0; }
  .device-total { flex: none; padding: 3px 8px; font-size: var(--fs-1); }
  .task-hour-row { display: grid; grid-template-columns: minmax(112px,1fr) 72px 18px 30px; align-items: center; gap: 7px 8px; min-height: 0; }
  .task-hour-title { grid-column: 1 / -1; white-space: normal; overflow: visible; font-size: var(--fs-2); line-height: 1.4; }
  .task-hour-row .input { width: 100%; min-width: 0; }
  .task-status-select { width: 100%; min-width: 112px; padding: 0 26px 0 8px; }
  .task-hour-row .task-hour-unit { text-align: center; font-size: var(--fs-1); color: #475569; }
  .task-hour-row .icon-btn { justify-self: end; }
  .task-hour-note { grid-column: 1 / -1; }
  .form-grid, .form-grid.three { grid-template-columns: 1fr; }
  .meta-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .meta-item .label { font-size: var(--fs-1); }
  .meta-item .value { font-size: var(--fs-2); }
  .card-head { flex-wrap: wrap; align-items: flex-start; }
  .card-head > div:first-child { flex: 1 1 100%; min-width: 0; }
  .card-head .card-actions { flex: 1 1 100%; margin-left: 0; flex-wrap: wrap; }
  .filters .search-box { max-width: none !important; width: 100%; }
  #status-seg { width: 100%; flex-wrap: wrap; overflow: visible; justify-content: flex-start; }
  #status-seg button { flex: none; }
  .tabs { flex-wrap: wrap; overflow: visible; }
  .dg-head { display: none; }
  .dg-inner { min-width: 0; width: 100%; }
  .dg-row { display: block; border-bottom: 1px solid var(--line-2); }
  .dg-name { width: 100%; min-width: 0; min-height: 0; padding: 9px 12px; border-right: 0; position: static; }
  .dg-track { display: none; }
  .dg-title { font-size: var(--fs-2); line-height: 1.35; white-space: normal; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .dg-sub { font-size: var(--fs-1); }
  .dg-scroll { max-height: 420px; }
  .task-group-index { display: none; }
  .task-group-head { padding: 12px 14px; gap: 8px; }
  .task-group-name { font-size: var(--fs-4); }
  .auto-stat-grid { grid-template-columns: repeat(3, 1fr); gap: 7px; }
  .auto-task-row { grid-template-columns: auto 1fr; grid-template-areas: "title title" "badge badge" "due due"; gap: 5px 8px; padding: 9px 10px; }
  .auto-task-title { grid-area: title; white-space: normal; overflow: visible; }
  .auto-task-row .badge { grid-area: badge; }
  .auto-task-due { grid-area: due; text-align: left; }
  .md-stat-grid { grid-template-columns: 1fr 1fr; }
  .md-detail-grid { grid-template-columns: 1fr; gap: 16px; }
  .meeting-statusline .btn { margin-left: 0; }
}

@media print {
  .sidebar, .topbar, .sidebar-mask, .no-print, .drawer, .modal, .overlay, .toast-root { display: none !important; }
  .main { margin-left: 0; }
  .page { padding: 0; max-width: none; }
  body { background: #fff; }
  .card, .meeting-device { box-shadow: none; border-color: #d0d7e2; break-inside: avoid; }
  .print-only { display: block; }
  .page-head .actions { display: none; }
  .meeting-device .md-body { grid-template-columns: 1.3fr 1fr; }
}

.assignee-chips { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: thin; }
.assignee-chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink-2); font-size: var(--fs-2); font-weight: 500; cursor: pointer; white-space: nowrap; }
.assignee-chip:hover { border-color: var(--brand); color: var(--brand); }
.assignee-chip .n { font-size: var(--fs-1); color: #98a2b3; background: var(--bg-2); border-radius: 999px; padding: 1px 6px; }
.assignee-chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.assignee-chip.active .n { background: rgba(255, 255, 255, .25); color: #fff; }
@media (max-width: 720px) { .assignee-chips { padding-top: 8px; } }

.md-risk-list { max-height: 160px; overflow-y: auto; padding-right: 4px; }
.md-issue-list { margin-top: 6px; max-height: 160px; overflow-y: auto; padding-right: 4px; }
.md-more-hint { margin-top: 4px; font-size: var(--fs-1); color: var(--muted); }
.md-risk-list::-webkit-scrollbar, .md-issue-list::-webkit-scrollbar { width: 6px; }
.md-risk-list::-webkit-scrollbar-thumb, .md-issue-list::-webkit-scrollbar-thumb { background: #cfd8e3; border-radius: 3px; }
.per-device-list { display: flex; flex-direction: column; gap: 12px; }
.per-device { border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe; overflow: hidden; }
.per-device.collapsed .per-device-body { display: none; }
.per-device-head { display: flex; align-items: center; gap: 9px; width: 100%; padding: 10px 14px; background: #f4f7fc; border: 0; cursor: pointer; text-align: left; }
.per-device-head:hover { background: #eef3fb; }
.per-device-head b { font-size: var(--fs-3); color: var(--ink); }
.pd-caret { display: flex; color: #7d8ba0; transition: transform .15s; }
.pd-caret svg { width: 16px; height: 16px; }
.per-device.collapsed .pd-caret { transform: rotate(-90deg); }
.pd-state { margin-left: auto; padding: 1px 9px; border-radius: 999px; background: #eef1f7; color: #7d8ba0; font-size: var(--fs-1); font-weight: 600; }
.pd-state.on { background: #e7f6ee; color: #15803d; }
.pd-progress { margin-left: 10px; padding: 1px 9px; border-radius: 999px; background: #eef4ff; color: #2563eb; font-size: var(--fs-1); font-weight: 600; }
.per-device-body { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 12px; padding: 12px 14px 14px; }
.pd-side { display: flex; flex-direction: column; gap: 8px; }
.per-device-body .field { margin: 0; }
.per-device-body .sm-label { font-size: var(--fs-1); color: var(--muted); margin-bottom: 3px; }
@media (max-width: 900px) { .per-device-body { grid-template-columns: 1fr; } }
.md-work-cat { background: #eef2f8; color: #465a75; border-radius: 99px; padding: 1px 8px; font-size: var(--fs-1); font-weight: 600; }
.rank-tail { display: flex; align-items: center; gap: 8px; flex: none; }
.tpl-grip { cursor: grab; color: #9aa7b8; text-align: center; user-select: none; font-size: var(--fs-4); }
.tpl-grip:active { cursor: grabbing; }
.tpl-row.dragging { opacity: .45; }
.tpl-row.drag-over { box-shadow: inset 0 2px 0 0 #2563eb; }
.tpl-row-actions { white-space: nowrap; }

/* ---------------- 例会看板 · 投屏模式 ---------------- */
/* --p：投屏字号倍率，页面右上角 A- / A+ 调整，范围 1 ~ 2 */
.present-nav { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; flex-wrap: wrap; }
.present-nav[hidden] { display: none; }
.present-hint { font-size: var(--fs-1); color: var(--muted); }
.zoom-box { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.zoom-box .zoom-label { font-size: var(--fs-1); color: var(--muted); min-width: 42px; text-align: center; }

body.present { --p: 1.25; font-size: calc(17px * var(--p)); }
body.present .meeting-kpis,
body.present .meeting-statusline,
body.present .risk-summary,
body.present #m-print,
body.present #m-minutes,
body.present #m-export { display: none !important; }
body.present .sidebar { display: none; }
body.present .main { margin-left: 0; padding-left: 24px; padding-right: 24px; }
body.present .meeting-section-head { display: none !important; }
body.present .meeting-page-head h2 { font-size: calc(30px * var(--p)); }
body.present .meeting-page-head p { font-size: calc(16px * var(--p)); }
body.present .assignee-chip { font-size: calc(15px * var(--p)); padding: 7px 16px; }
body.present .md-head { padding: 14px 18px; }
body.present .md-title { font-size: calc(30px * var(--p)); }
body.present .md-stat b { font-size: calc(40px * var(--p)); }
body.present .md-stat span,
body.present .md-rate .between span { font-size: calc(15px * var(--p)); }
body.present .md-rate .between b { font-size: calc(20px * var(--p)); }
body.present .md-col-title { font-size: calc(18px * var(--p)); }
body.present .md-risk { padding: 12px 0; gap: 12px; }
body.present .md-risk-title { font-size: calc(21px * var(--p)); }
body.present .md-risk-meta { font-size: calc(16px * var(--p)); }
body.present .md-issue { font-size: calc(18px * var(--p)); padding: 11px 14px; line-height: 1.7; }
body.present .md-done-list { grid-template-columns: repeat(auto-fill, minmax(calc(430px * var(--p)), 1fr)); }
body.present .md-done-row { font-size: calc(19px * var(--p)); padding: 10px 0; }
body.present .md-done-meta { font-size: calc(15px * var(--p)); }
body.present .md-work-head { font-size: calc(14px * var(--p)); }
body.present .md-work-name { font-size: calc(20px * var(--p)); }
body.present .md-work-hours { font-size: calc(14px * var(--p)); padding: 2px 10px; }
body.present .md-work-points { font-size: calc(18px * var(--p)); line-height: 1.9; }
body.present .md-weekly-text { font-size: calc(17px * var(--p)); line-height: 1.95; }
body.present .md-weekly-label { font-size: calc(13px * var(--p)); }
body.present .md-weekly-head b { font-size: calc(20px * var(--p)); }
body.present .md-risk-list,
body.present .md-issue-list { max-height: calc(320px * var(--p)); }
body.present .md-done-list,
body.present .md-work-list,
body.present .md-weekly-list { max-height: calc(460px * var(--p)); }
body.present .badge { font-size: calc(13px * var(--p)); padding: 3px 10px; }
body.present .md-foot a { font-size: calc(15px * var(--p)); }
@media print { body.present .present-nav { display: none; } }

/* ---------------- 设备卡片页签 ---------------- */
.md-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px 0; }
.md-tab { display: inline-flex; align-items: center; gap: 7px; padding: 7px 15px; border: 1px solid var(--line-2); border-radius: 999px; background: #fff; color: #5b6b82; font-size: var(--fs-3); font-weight: 600; cursor: pointer; transition: all .12s; }
.md-tab:hover { border-color: #c7d7ef; color: var(--ink); }
.md-tab .n { min-width: 20px; padding: 1px 7px; border-radius: 999px; background: #f0f4fa; color: #5b6b82; font-size: var(--fs-1); text-align: center; }
.md-tab.active { background: #eef4ff; border-color: #bfd4f7; color: #2563eb; }
.md-tab.active .n { background: #dbe8ff; color: #2563eb; }
.md-panels { padding: 12px 16px 16px; border-top: 1px solid var(--line-2); margin-top: 12px; background: #fbfcff; }
.md-panel { display: none; }
.md-panel.active { display: block; }
.md-panel .md-done-list,
.md-panel .md-risk-list,
.md-panel .md-issue-list,
.md-panel .md-work-list,
.md-panel .md-weekly-list { max-height: 400px; }
body.present .md-tab { font-size: calc(15px * var(--p)); padding: 9px 18px; }
body.present .md-tab .n { font-size: calc(13px * var(--p)); }
body.present .md-panel .md-done-list,
body.present .md-panel .md-risk-list,
body.present .md-panel .md-issue-list,
body.present .md-panel .md-work-list,
body.present .md-panel .md-weekly-list { max-height: calc(520px * var(--p)); }
.md-issue-done { background: #f4faf6; border-left-color: #15803d; }
.md-issue-state { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 99px; background: #e7f6ec; color: #15803d; font-size: var(--fs-1); font-weight: 600; }
body.present .md-issue-state { font-size: calc(14px * var(--p)); padding: 2px 10px; }
.md-panel-sum { margin-bottom: 8px; font-size: var(--fs-2); color: var(--muted); }
.md-panel-sum b { color: var(--ink); }
body.present .md-panel-sum { font-size: calc(15px * var(--p)); }

/* ---------------- 筛选行 / 成员折叠条 ---------------- */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.chips-bar { margin-bottom: 14px; }
.chips-toggle { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink-2); font-size: var(--fs-1); font-weight: 600; cursor: pointer; }
.chips-toggle:hover { border-color: #c7d7ef; }
.chips-toggle svg { width: 15px; height: 15px; }
.chips-toggle.open > svg:last-child { transform: rotate(180deg); }
.chips-bar .assignee-chips { margin-top: 10px; margin-bottom: 0; }
.status-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcff; font-size: var(--fs-1); color: var(--ink-2); }
.status-strip b { color: var(--ink); font-weight: 700; }
.ss-sep { color: #c2cbd8; }
.ss-link { margin-left: auto; font-weight: 600; color: var(--brand); }
.issue-table td { vertical-align: top; }
.issue-title { font-weight: 600; color: var(--ink); line-height: 1.45; }
.issue-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 0; margin-top: 4px; font-size: var(--fs-1); color: var(--muted); }
.issue-meta-item { display: inline-flex; align-items: baseline; gap: 5px; white-space: nowrap; }
.issue-meta-item + .issue-meta-item { margin-left: 12px; padding-left: 12px; border-left: 1px solid var(--line-2); }
.issue-meta-item .k { color: var(--muted); }
.issue-meta-item .v { color: var(--ink-2); font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.issue-push { margin-top: 3px; font-size: var(--fs-1); color: var(--ink-2); }
.issue-sev { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 99px; background: #f1f5fa; color: #5b6b82; font-size: var(--fs-1); font-weight: 600; }

/* ---------------- 使用说明 / 更新说明 ---------------- */
.help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(430px, 1fr)); gap: 16px; }
.help-releases { display: flex; flex-direction: column; gap: 14px; }
.help-list { margin: 0; padding-left: 18px; font-size: var(--fs-3); line-height: 1.85; color: var(--ink-2); }
.help-list li { margin: 3px 0; }
.help-list li::marker { color: #9aa7b8; }
.card-title svg { width: 17px; height: 17px; vertical-align: -3px; margin-right: 5px; color: var(--brand); }
@media (max-width: 900px) { .help-grid { grid-template-columns: 1fr; } }

/* ---------------- 异常登记表单 ---------------- */
/* 左栏：问题 / 设备与归属；右栏：分类与严重程度 / 时间 */
/* 表单分区：全站弹窗共用一套（轻量分组，不做卡片套卡片） */
.form-sections { display: flex; flex-direction: column; gap: 6px; }
.form-section { border: 0; border-radius: 0; padding: 0 0 4px; background: transparent; }
.form-section + .form-section { margin-top: 6px; border-top: 1px solid var(--line-2); padding-top: 14px; }
.form-section-title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 0; border: 0; font-size: var(--fs-2); font-weight: 700; color: var(--ink); }
.form-section-title::before { content: ""; width: 3px; height: 14px; border-radius: 2px; background: var(--brand); }
.form-section .form-grid { gap: 0 14px; }
.form-section .field { margin-bottom: 12px; }

.issue-form { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 10px 18px; align-items: start; }
.issue-form > .form-section { padding: 2px 0; }
/* 整行分层的版式：问题 / 严重程度 / （设备 | 分类）/ 时间，避免两列上下错位 */
.issue-form > .form-section:nth-of-type(1) { grid-column: 1; grid-row: 1; }         /* 问题 */
.issue-form > .form-section:nth-of-type(2) { grid-column: 1; grid-row: 2; }         /* 设备与归属 */
.issue-form > .form-section:nth-of-type(3) { grid-column: 2; grid-row: 1; }         /* 严重程度 */
.issue-form > .form-section:nth-of-type(4) { grid-column: 2; grid-row: 2; }         /* 分类 */
.issue-form > .form-section:nth-of-type(5) { grid-column: 1 / -1; grid-row: 3; }    /* 时间 */
.issue-form > .form-note { grid-column: 1 / -1; margin-top: 4px; }
@media (max-width: 900px) {
  .issue-form { grid-template-columns: 1fr; }
  .issue-form > .form-section:nth-of-type(1),
  .issue-form > .form-section:nth-of-type(2),
  .issue-form > .form-section:nth-of-type(3),
  .issue-form > .form-section:nth-of-type(4),
  .issue-form > .form-note { grid-column: 1; grid-row: auto; }
}
.issue-form .field { margin-bottom: 7px; }
.issue-form .textarea { min-height: 48px; }
.issue-form .form-grid { gap: 0 14px; }
.span-2 { grid-column: 1 / -1; }
.issue-form .hint { margin-top: 4px; }
/* 左栏「问题标题」前有字段标签行；右栏补同高占位标签，让严重程度 2×2 卡片与输入框同排 */
.issue-form .sev-label-spacer { display: block; margin-bottom: 6px; font-size: var(--fs-2); font-weight: 600; visibility: hidden; }
@media (max-width: 900px) { .issue-form .sev-label-spacer { display: none; } }

/* 严重程度：四张卡片单选 */
.sev-pills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sev-pill { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; transition: border-color .12s, background .12s; }
.sev-pill:hover { border-color: #c3d4f0; }
.sev-pill input { position: absolute; opacity: 0; pointer-events: none; }
.sev-pill-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.sev-pill-head b { font-size: var(--fs-3); font-weight: 700; }
.sev-dot { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #cbd5e3; flex: none; }
.sev-pill-desc { font-size: var(--fs-1); color: var(--muted); line-height: 1.5; }
.sev-pill.sev-1 { border-color: #f6d5d0; }
.sev-pill.sev-2 { border-color: #f7e0bd; }
.sev-pill.sev-3 { border-color: #d5e3fb; }
.sev-pill.sev-4 { border-color: #e2e8f1; }
.sev-pill:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px rgba(37, 99, 235, .08); }
.sev-pill:has(input:checked) .sev-dot { border-color: var(--brand); background: var(--brand); box-shadow: inset 0 0 0 3px #fff; }
.sev-pill.sev-1:has(input:checked) { border-color: #d92d20; background: #fff4f2; box-shadow: 0 0 0 3px rgba(217, 45, 32, .08); }
.sev-pill.sev-1:has(input:checked) .sev-dot { border-color: #d92d20; background: #d92d20; }
.sev-pill.sev-2:has(input:checked) { border-color: #b45309; background: #fff8ec; box-shadow: 0 0 0 3px rgba(180, 83, 9, .08); }
.sev-pill.sev-2:has(input:checked) .sev-dot { border-color: #b45309; background: #b45309; }
.sev-pill.sev-3:has(input:checked) { border-color: #1d4ed8; background: #f2f7ff; box-shadow: 0 0 0 3px rgba(29, 78, 216, .08); }
.sev-pill.sev-3:has(input:checked) .sev-dot { border-color: #1d4ed8; background: #1d4ed8; }
.sev-pill.sev-4:has(input:checked) { border-color: #5b6b82; background: #f5f7fa; box-shadow: 0 0 0 3px rgba(91, 107, 130, .08); }
.sev-pill.sev-4:has(input:checked) .sev-dot { border-color: #5b6b82; background: #5b6b82; }

/* 级别徽章（列表/详情用） */
.sev-badge { padding: 1px 8px; border-radius: 99px; font-weight: 700; font-size: var(--fs-1); }
.sev-1.sev-badge, .issue-sev.sev-1 { background: #ffe9e6; color: #b42318; }
.sev-2.sev-badge, .issue-sev.sev-2 { background: #fff2e0; color: #b45309; }
.sev-3.sev-badge, .issue-sev.sev-3 { background: #eaf1ff; color: #1d4ed8; }
.sev-4.sev-badge, .issue-sev.sev-4 { background: #eef2f8; color: #5b6b82; }
.issue-sev { font-weight: 700; }

@media (max-width: 720px) {
  .sev-pills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 手机：表格横向滚动、统计表格可读 */
@media (max-width: 640px) {
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .member-table { min-width: 560px; }
  .issue-table { min-width: 560px; }
  .md-panels { padding-left: 12px; padding-right: 12px; }
  .assignee-chips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .assignee-chips .assignee-chip { flex: none; }
}

/* 手机：单列且不再被表格最小宽度撑开 */
@media (max-width: 640px) {
  .dash-grid, .report-layout { grid-template-columns: minmax(0, 1fr); }
  .stack, .card, .card-body { min-width: 0; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.form-note { margin-top: auto; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 9px; background: #f8fafd; color: var(--muted); font-size: var(--fs-1); line-height: 1.7; }

/* 手机：登记异常弹窗更紧凑、控件够大、避免 iOS 自动放大 */
@media (max-width: 640px) {
  .modal { max-height: 92vh; width: min(96vw, 560px); }
  .modal-head { padding: 14px 16px 10px; }
  .modal-body { padding: 2px 14px 14px; }
  .modal-foot { padding: 11px 14px; }
  .issue-form { gap: 10px; }
  .form-section-title { margin-bottom: 9px; }
  .issue-form .field { margin-bottom: 7px; }
  .issue-form .form-grid,
  .issue-form .form-grid.three { grid-template-columns: 1fr; gap: 0; }
  .issue-form .textarea { min-height: 46px; }
  .issue-form > .form-section { padding: 2px 0; }
  /* 手机端严重程度：一行一条，名称与说明同排 */
  .sev-pills { grid-template-columns: 1fr; gap: 6px; }
  .sev-pill { flex-direction: row; align-items: center; gap: 8px; padding: 7px 10px; min-height: 38px; }
  .sev-pill-head { flex: 0 0 auto; gap: 0; }
  .sev-pill-head b { font-size: var(--fs-2); }
  .sev-pill-desc { font-size: 12px; line-height: 1.35; }
  .sev-pill .sev-dot { margin-left: 4px; }
  .modal-body { padding-left: 14px; padding-right: 14px; }
  /* 输入类控件 16px：iOS 聚焦时才不会把整页放大 */
  .input, .select, .textarea, input[type="date"], input[type="datetime-local"], input[type="number"] { font-size: 16px; }
  .modal-foot .btn { min-height: 42px; }
}

/* 弹窗骨架：头/脚固定，中间可滚动；避免底部按钮被内容推到屏幕外 */
.modal { overflow: hidden; }
.modal-head, .modal-foot { flex: 0 0 auto; }
.modal-body { flex: 1 1 auto; min-height: 0; overscroll-behavior: contain; }
.tpl-tasks-section { margin-top: 14px; border-top: 1px solid var(--line-2); padding-top: 14px; }
.tpl-tasks-section .form-section-title { margin-bottom: 10px; }
.chip-overdue.active { background: #ffe9e6; border-color: #f6c9c2; color: #b42318; }
.md-hours-note { margin-left: 6px; color: #9aa7b8; font-size: var(--fs-1); }
body.present .md-hours-note { font-size: calc(12px * var(--p)); }

/* ---------------- 日报只读视图（团队日报抽屉） ---------------- */
.daily-read-list { display: flex; flex-direction: column; gap: 10px; }
.daily-read-item { border-left: 3px solid var(--line); padding: 2px 0 2px 10px; }
.daily-read-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.daily-read-title { min-width: 0; font-size: var(--fs-3); font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.daily-read-hours { margin-left: auto; font-size: var(--fs-1); color: var(--muted); white-space: nowrap; }
.daily-read-note { margin-top: 4px; font-size: var(--fs-2); line-height: 1.75; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.daily-issue-list { display: flex; flex-direction: column; gap: 10px; }
.daily-issue { border-left: 3px solid #f59e0b; border-radius: 0 8px 8px 0; background: #fffdf8; padding: 8px 10px; }
.daily-issue.is-resolved { border-left-color: var(--line); background: #fbfcfe; }
.daily-issue-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.daily-issue-head b { min-width: 0; overflow-wrap: anywhere; }
.daily-issue-dev { margin-left: auto; white-space: nowrap; }
.daily-issue-detail { margin-top: 4px; font-size: var(--fs-2); line-height: 1.75; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.rate-value { min-width: 44px; text-align: right; font-size: var(--fs-2); font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.rate-value.good { color: #15803d; }
.rate-value.low { color: #b42318; }

/* ---------------- 团队日报按人卡片 ---------------- */
.team-miss-card { border: 1px solid #f6c9c2; border-radius: var(--r-3); background: #fff7f5; padding: 10px 14px; }
.team-miss-head { display: flex; align-items: center; gap: 6px; font-size: var(--fs-2); font-weight: 700; color: #b42318; margin-bottom: 6px; }
.team-miss-body { display: flex; flex-wrap: wrap; gap: 0; }
.team-miss-group { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-right: 14px; }
.team-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(540px, 1fr)); gap: 8px; }
.team-card { border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s; overflow: hidden; }
.team-card:hover { border-color: var(--brand-soft, #bcd3fb); box-shadow: 0 2px 8px rgba(23, 43, 77, .07); }
.team-card-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 6px 10px; border-bottom: 1px solid var(--line-2); background: #fbfcfe; }
.team-card-head b { font-size: var(--fs-3); }
.team-stat { font-size: 11px; color: var(--ink-2); background: #f1f4f9; border-radius: 99px; padding: 1px 7px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.team-card-body { padding: 7px 10px 8px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 12px; align-items: start; }
.team-devices { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px; }
.team-device { display: inline-flex; align-items: baseline; gap: 4px; padding: 1px 7px; border-radius: 6px; background: #f6f8fb; font-size: var(--fs-2); font-weight: 600; color: var(--ink); }
.team-device i { font-style: normal; font-weight: 400; font-size: 11px; color: var(--muted); }
.team-col { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.team-col-right { border-left: 1px dashed var(--line-2); padding-left: 10px; }
.team-col-title { font-size: 11px; font-weight: 700; color: var(--muted); margin-bottom: 1px; }
.team-tasklines { display: flex; flex-direction: column; gap: 2px; }
.team-taskline { display: flex; align-items: flex-start; gap: 6px; min-width: 0; }
.team-tasktitle { flex: 1; min-width: 0; font-size: var(--fs-2); color: var(--ink-2); line-height: 1.5; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.team-issue-group { display: flex; flex-direction: column; gap: 1px; }
.team-issue-group + .team-issue-group { margin-top: 3px; }
.team-issue-item { font-size: var(--fs-2); line-height: 1.45; color: var(--ink-2); padding-left: 7px; border-left: 2px solid #f59e0b; overflow-wrap: anywhere; }
.team-issue-item.is-resolved { border-left-color: var(--line); color: var(--muted); }
.team-issue-item i { font-style: normal; font-size: 11px; color: var(--muted); margin-left: 5px; }
.team-group-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 8px; padding-left: 2px; }
.team-group-head b { font-size: var(--fs-3); color: var(--ink); }
.team-group-stat { font-size: 11px; color: var(--muted); background: #eef1f6; border-radius: 99px; padding: 1px 8px; white-space: nowrap; }
@media (max-width: 1100px) {
  .team-cards { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .team-card-body { grid-template-columns: 1fr; }
  .team-col-right { border-left: 0; padding-left: 0; border-top: 1px dashed var(--line-2); padding-top: 6px; margin-top: 2px; }
}


/* ---------------- 成员完成率（重点模块） ---------------- */
.rate-hero { padding: 0; }
.rate-hero-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 20px 12px; }
.rate-hero-head .card-title { font-size: var(--fs-5); }
.rate-overview { display: grid; grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)); gap: 14px; padding: 0 20px 16px; }
.rate-big { padding: 14px 18px; border-radius: 12px; background: linear-gradient(135deg, #eef4ff, #f7faff); border: 1px solid #dbe7fb; }
.rate-big-value { font-size: 40px; font-weight: 750; line-height: 1.1; color: var(--ink); letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.rate-big-value.good { color: #15803d; }
.rate-big-value.low { color: #b42318; }
.rate-big-label { margin-top: 2px; font-size: var(--fs-2); color: var(--ink-2); font-weight: 600; }
.rate-big-foot { margin-top: 6px; font-size: var(--fs-1); color: var(--muted); }
.rate-mini { display: flex; flex-direction: column; justify-content: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.rate-mini-value { font-size: 26px; font-weight: 750; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.rate-mini-value.good { color: #15803d; }
.rate-mini-value.low { color: #b42318; }
.rate-mini-label { margin-top: 3px; font-size: var(--fs-1); color: var(--muted); }

.rate-table { border-top: 1px solid var(--line-2); }

.rate-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 118px 72px 72px 96px; align-items: center; gap: 14px; padding: 10px 20px; border-bottom: 1px solid var(--line-2); }
.rate-row:last-child { border-bottom: 0; }
.rate-row-head { position: sticky; top: 0; z-index: 1; background: #f8fafc; font-size: var(--fs-1); color: #5b6b82; font-weight: 650; padding: 9px 20px; }
.rate-row.is-low { background: #fffafa; }
.rate-name { font-size: var(--fs-3); font-weight: 650; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rate-bar-wrap { height: 12px; border-radius: 99px; background: #eef1f7; overflow: hidden; }
.rate-bar { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #60a5fa, #2563eb); }
.rate-row.is-low .rate-bar { background: linear-gradient(90deg, #fca5a5, #dc2626); }
.rate-row .num { text-align: right; }
.rate-row-head .num { text-align: right; }
.rate-count { font-size: var(--fs-2); color: var(--ink-2); }
.rate-pct { font-size: var(--fs-3); font-weight: 750; color: var(--ink); }
.rate-pct.good { color: #15803d; }
.rate-pct.low { color: #b42318; }
.rate-debt { display: block; text-align: right; }

@media (max-width: 900px) {
  .rate-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rate-row { grid-template-columns: 84px minmax(0, 1fr) 70px 64px; row-gap: 6px; padding: 10px 14px; }
  .rate-row-head { display: none; }
  .rate-debt { grid-column: 2 / -1; justify-content: flex-start; }
}
.rate-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.period-nav { display: flex; align-items: center; gap: 6px; }
.period-nav.is-hidden { display: none; }
.period-label { min-width: 116px; text-align: center; font-size: var(--fs-2); font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }
.rate-debt { font-size: var(--fs-2); font-variant-numeric: tabular-nums; color: var(--muted); }
.rate-debt.has-debt { color: #b42318; font-weight: 700; }
.rate-ontime { font-size: var(--fs-2); font-weight: 650; color: var(--ink-2); }
.rate-ontime.good { color: #15803d; }
.rate-ontime.low { color: #b42318; }
.rate-mini-sub { margin-left: 2px; font-size: var(--fs-1); font-weight: 600; color: var(--muted); }
.stats-head { align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.stats-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.issue-form .form-grid > .field,
.issue-form .form-grid.three > .field { min-width: 0; }
.issue-form .form-grid .input,
.issue-form .form-grid .select,
.issue-form .form-grid.three .input,
.issue-form .form-grid.three .select { width: 100%; min-width: 0; }
.issue-form input[type="datetime-local"] { min-width: 0; }

/* 两列小栅格：手机端也保持两列（短下拉框） */
.issue-form .form-grid.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; margin-bottom: 2px; }
.issue-form .form-grid.two-up > .field { margin-bottom: 7px; }

.form-section-hint { margin-left: 8px; font-size: var(--fs-1); font-weight: 500; color: var(--muted); }
/* 时间整行：三个日期/时长控件等宽，日期框不再被挤 */
.issue-form > .form-section:nth-of-type(5) .form-grid.three { gap: 0 16px; }
.issue-form > .form-section:nth-of-type(5) { padding-bottom: 0; }
.issue-form > .form-section:nth-of-type(5) input[type="datetime-local"] { min-width: 0; width: 100%; font-variant-numeric: tabular-nums; }

.issue-form .issue-problem-fields { display: block; }
.issue-form .issue-problem-fields .textarea { min-height: 62px; }
/* 严重程度：右列顶部，四个级别 2×2，不拉伸不留空 */
.issue-form > .form-section:nth-of-type(3) .sev-pills { grid-auto-rows: auto; align-content: start; }
@media (max-width: 640px) {
  .issue-form > .form-section:nth-of-type(3) .sev-pills { grid-template-columns: 1fr; }
}
/* 登记异常：两列版式里段与段之间不要额外上边距和分隔线，否则左右两段标题错开 */
.issue-form > .form-section + .form-section { margin-top: 0; border-top: 0; padding-top: 2px; }

/* ---------------- 个人任务负担 ---------------- */
.load-table { display: flex; flex-direction: column; }
.load-row { display: grid; grid-template-columns: 82px minmax(70px, 1.5fr) 48px 70px 70px 70px 54px 52px 64px 56px; align-items: center; gap: 8px; padding: 8px 4px; border-bottom: 1px solid var(--line-2); }
.load-row:last-child { border-bottom: 0; }
.load-row-head { position: sticky; top: 0; z-index: 1; background: #f8fafc; font-size: var(--fs-1); font-weight: 650; color: #5b6b82; }
.load-row .num { text-align: right; font-variant-numeric: tabular-nums; }
.load-name { font-size: var(--fs-3); font-weight: 650; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.load-bar-wrap { display: block; height: 10px; border-radius: 99px; background: #eef1f7; overflow: hidden; }
.load-bar { display: block; height: 100%; border-radius: 99px; background: #93b4f7; }
.load-bar.over { background: linear-gradient(90deg, #fca5a5, #dc2626); }
.load-bar.idle { background: #cbd5e1; }
.load-doing { font-weight: 700; color: var(--ink); }
.net-up { color: #b42318; font-weight: 650; }
.net-down { color: #15803d; font-weight: 650; }
.load-tag { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: var(--fs-1); font-weight: 650; }
.load-tag.over { background: #fee4e2; color: #b42318; }
.load-tag.normal { background: #e7f6ec; color: #15803d; }
.load-tag.idle { background: #eef1f7; color: #5b6b82; }
.load-legend { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-1); color: var(--muted); margin-left: 10px; }
.load-legend i { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }
.load-legend i.over { background: #dc2626; }
.load-legend i.normal { background: #15803d; }
.load-legend i.idle { background: #94a3b8; }

@media (max-width: 1180px) {
  .load-row { grid-template-columns: 70px minmax(56px, 1fr) 42px 60px 56px 56px 48px 44px 44px; row-gap: 4px; }
  .load-row > .load-tag, .load-row-head > :last-child { display: none; }
  .load-row-head { font-size: 11px; }
  .load-row > :nth-child(9) { display: none; }
}
@media (max-width: 640px) {
  .load-row { grid-template-columns: 64px minmax(44px, 1fr) 38px 54px 50px 50px 44px 38px; }
  .load-row > :nth-child(8) { display: none; }
  .load-row-head > :nth-child(8) { display: none; }
}


/* 多人任务（批次） */
.assignee-multi {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 8px 10px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 8px;
  background: #fff;
  max-height: 180px;
  overflow: auto;
}
.batch-members {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.batch-member {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  color: var(--ink-2, #374151);
  cursor: pointer;
}
.batch-member.current {
  border-color: var(--brand, #2563eb);
  background: #f2f7ff;
}
.batch-member .batch-remove {
  border: 0;
  background: transparent;
  color: var(--muted, #9ca3af);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 0 0 0 2px;
}
.batch-member .batch-remove:hover {
  color: #b42318;
}
.task-batch .title-text {
  font-weight: 600;
}
.batch-block {
  border-left: 2px solid var(--line, #e5e7eb);
  padding-left: 10px;
  margin: 6px 0 10px;
}
.batch-block .task-item {
  margin-bottom: 4px;
}
.batch-toggle {
  margin-left: auto;
  align-self: center;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 6px;
  background: #fff;
  padding: 4px 6px;
  cursor: pointer;
  color: var(--ink-2, #374151);
}
.batch-toggle svg {
  transition: transform .18s ease;
}
.batch-block.collapsed .batch-toggle svg {
  transform: rotate(-90deg);
}
.batch-children {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 2px 0 4px 16px;
}
.batch-block.collapsed .batch-children {
  display: none;
}
.batch-child {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 8px;
  background: #fafafa;
  font-size: 13px;
  cursor: pointer;
}
.batch-child:hover {
  border-color: var(--brand, #2563eb);
}
.batch-child .bc-name {
  font-weight: 600;
  min-width: 56px;
}
.batch-child .bc-due {
  color: var(--muted, #9ca3af);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.batch-child .bc-note {
  color: var(--muted, #9ca3af);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 260px;
}
.help-shot { display:block; width:100%; max-width:760px; margin-top:12px; border:1px solid var(--border); border-radius:10px; }
.wi-card { border:1px solid var(--border); border-radius:10px; margin-bottom:12px; overflow:hidden; }
.wi-card-manual { border-left:3px solid var(--brand); }
.borrow-form { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-bottom:12px; }
.borrow-form .select, .borrow-form .input { flex:1 1 150px; min-width:0; }
.borrow-form #borrow-add { flex:0 0 auto; }
.borrow-device { border:1px solid var(--border); border-radius:10px; margin-bottom:12px; overflow:hidden; }
.borrow-dev-head { display:flex; align-items:center; gap:8px; padding:10px 12px; border-bottom:1px solid var(--border); }
.borrow-rows { padding:10px 12px 12px; }
.borrow-item { display:grid; grid-template-columns:1fr 1.4fr 100px 64px; gap:8px; margin-bottom:8px; }
.borrow-item:last-child { margin-bottom:0; }
@media (max-width: 640px) { .borrow-item { grid-template-columns:1fr; } }
.issue-picker-bar { display:flex; gap:8px; align-items:center; margin-bottom:8px; }
.issue-picker-bar .input { flex:1; min-width:0; }
.issue-picker-list { margin-top:10px; max-height:52vh; overflow:auto; border:1px solid var(--border); border-radius:10px; }
.issue-pick-row { display:flex; width:100%; gap:10px; align-items:center; text-align:left; padding:10px 12px; background:none; border:0; border-bottom:1px solid var(--border); cursor:pointer; }
.issue-pick-row:last-child { border-bottom:0; }
.issue-pick-row:hover:not(:disabled) { background:#f6f8fb; }
.issue-pick-row:disabled { opacity:.55; cursor:default; }
.pick-main { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.pick-main b { font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pick-act { flex:0 0 auto; font-size:12px; color:var(--brand); font-weight:600; }
.issue-pick-row:disabled .pick-act { color:var(--muted, #7a8696); }
.wi-head { display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding:10px 12px; border-bottom:1px solid var(--border); }
.wi-title { flex:1; min-width:160px; }
.wi-meta { padding:6px 12px 0; }
.wi-grid { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:12px; padding:12px; align-items:start; }
.wi-field { display:flex; flex-direction:column; margin:0; }
.wi-field > .label { min-height:20px; margin-bottom:4px; white-space:nowrap; }
.wi-box { height:84px; resize:vertical; }
.wi-hint { margin-top:4px; font-size:12px; line-height:1.4; color:var(--muted, #7a8696); }
@media (max-width: 1100px) { .wi-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .wi-grid { grid-template-columns:1fr; } .wi-field > .label { white-space:normal; } }
@media (max-width: 640px) {
  .issue-picker-bar { flex-wrap:wrap; }
  .issue-picker-list { max-height:60vh; }
  .issue-pick-row { padding:12px; }
  .pick-main b { white-space:normal; }
}
.resolve-row { display:flex; gap:16px; align-items:flex-start; flex-wrap:wrap; margin-top:4px; }
.resolve-actions { align-items:flex-end; padding-bottom:24px; }
.resolve-refresh { margin-top:22px; }

/* ============================================================
   手机端整体优化：更大字号与点按目标、更松的留白、全屏表单
   ============================================================ */
@media (max-width: 640px) {
  :root {
    --fs-1: 13px;
    --fs-2: 14px;
    --fs-3: 15px;
    --fs-4: 17px;
    --fs-5: 22px;
  }
  body { font-size: var(--fs-3); line-height: 1.6; }

  /* 页面留白与节奏 */
  .page { padding: 14px 14px calc(36px + env(safe-area-inset-bottom)); }
  .page-head { gap: 12px; margin-bottom: 16px; }
  .page-head h2 { font-size: var(--fs-5); }
  .page-head .actions { gap: 8px; }
  .page-head .actions .btn { min-height: 42px; }
  .stack, .dash-grid { gap: 16px; }
  .card-head { padding: 14px 14px 12px; gap: 10px; }
  .card-body { padding: 14px; }
  .card-foot { padding: 12px 14px; }
  .card-title { font-size: var(--fs-4); }

  /* 点按目标 */
  .btn { min-height: 42px; padding: 0 14px; }
  .btn.sm { min-height: 38px; height: auto; padding: 0 12px; }
  .icon-btn { width: 42px; height: 42px; }
  .task-group-toggle, .batch-toggle { width: 40px; height: 40px; }
  .task-group-toggle svg, .batch-toggle svg { width: 18px; height: 18px; }
  .md-foot a.small { display: inline-flex; align-items: center; min-height: 40px; padding: 0 4px; }
  .tab { padding: 9px 12px; min-height: 40px; }
  .seg { padding: 4px; }
  .seg button { padding: 8px 12px; min-height: 36px; }

  /* 表单：单列、控件够大、iOS 不缩放 */
  .input, .select, .textarea { font-size: 16px; }
  .input, .select { min-height: 46px; }
  .textarea { min-height: 96px; }
  .field { margin-bottom: 16px; }
  .field > span.label, .field > .label { font-size: var(--fs-2); margin-bottom: 8px; }
  .form-grid, .form-grid.three { gap: 0; }
  .checkline { min-height: 36px; }
  .checkline input { width: 20px; height: 20px; }
  .filters { gap: 10px; margin-bottom: 12px; }
  .filters .input, .filters .select { min-height: 42px; }

  /* 表格：占满卡片宽度再横向滚动 */
  .card-body .table-wrap { margin-left: -14px; margin-right: -14px; padding-left: 14px; padding-right: 14px; }
  .table th { padding: 10px 12px; }
  .table td { padding: 12px; }

  /* KPI 与信息块 */
  .kpis { gap: 10px; }
  .kpi { padding: 14px; gap: 11px; }
  .kpi-value { font-size: 24px; }
  .meta-grid { gap: 12px; }
  .meta-item .value { font-size: var(--fs-3); }

  /* 弹窗：全屏表单，头脚固定、中间滚动 */
  .modal, .modal.open,
  .modal.wide, .modal.wide.open,
  .modal.xwide, .modal.xwide.open {
    left: 0; top: 0; width: 100vw; max-width: 100vw;
    height: 100vh; height: 100dvh; max-height: none;
    border-radius: 0; transform: none;
  }
  .modal { opacity: 0; transition: opacity .15s; }
  .modal.open { opacity: 1; }
  .modal-head { padding: calc(14px + env(safe-area-inset-top)) 16px 12px; border-bottom: 1px solid var(--line); }
  .modal-head h3 { font-size: 18px; }
  .modal-body { padding: 14px 16px 18px; }
  .modal-foot {
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    display: flex; flex-wrap: wrap; gap: 8px; justify-content: stretch;
    background: #fff;
  }
  .modal-foot .btn { flex: 1 1 calc(50% - 4px); min-height: 44px; }
  /* 确认类小弹窗保持居中，不铺满整屏 */
  .modal.modal-compact {
    left: 50%; top: 50%; width: min(92vw, 420px); max-width: 92vw;
    height: auto; max-height: 80vh; border-radius: 14px;
    transform: translate(-50%, -50%);
  }
  .modal.modal-compact .modal-head { padding: 16px 18px 10px; }
  .modal.modal-compact .modal-body { padding: 4px 18px 16px; }
  .modal.modal-compact .modal-foot { padding: 10px 18px 14px; }

  /* 抽屉：全宽、底部按钮够大 */
  .drawer { width: 100vw; }
  .drawer-head { padding: calc(14px + env(safe-area-inset-top)) 16px 12px; }
  .drawer-body { padding: 14px 16px calc(20px + env(safe-area-inset-bottom)); }
  .drawer-foot { padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
  .drawer-foot .btn { flex: 1 1 calc(50% - 4px); min-height: 44px; }

  /* 顶栏与通知面板 */
  .topbar { padding: 0 14px; height: calc(58px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); }
  .notif-panel { width: calc(100vw - 28px); right: -46px; }
}

