:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff6ff;
  --bg: #f4f6f9;
  --card: #ffffff;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-soft: #eef2f7;
  --green: #16a34a;
  --green-soft: #ecfdf5;
  --amber: #d97706;
  --amber-soft: #fffbeb;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --violet: #7c3aed;
  --sidebar: #0b1220;
  --sidebar-2: #111b2e;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .04);
  --sidebar-w: 232px;
  --radius: 14px;
  --bottom-nav: 62px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
body.modal-open, body.drawer-open, body.sheet-open { overflow: hidden; }
button, input, select, textarea { font-family: inherit; font-size: 16px; }
button { cursor: pointer; }
a { color: var(--primary); text-decoration: none; }
h1, h2, h3, p { margin: 0; }
strong, b { font-weight: 650; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.path { word-break: break-all; font-weight: 500 !important; color: var(--text-2); }
.ta-right { text-align: right; }
.note { margin-top: 10px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.error-line { color: var(--red); font-size: 14px; min-height: 18px; margin: 4px 0 8px; }
.err-text { color: var(--red); font-size: 12px; display: block; margin-top: 3px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted); flex: none; }
.dot-blue { background: #3b82f6; }
.dot-cyan { background: #06b6d4; }
.dot-gray { background: #94a3b8; }
.dot-green { background: var(--green); }
.dot-red { background: var(--red); }

/* ---------- 基础控件 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-size: 15px;
  font-weight: 550;
  line-height: 1.2;
  text-align: center;
  transition: border-color .15s, background .15s, color .15s, transform .05s;
  white-space: nowrap;
}
.btn:hover { border-color: #bfdbfe; color: var(--primary); background: #f8fbff; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-soft { background: var(--primary-soft); border-color: #dbeafe; color: var(--primary-dark); }
.btn-soft:hover { background: #dbeafe; color: var(--primary-dark); }
.btn-ghost { background: transparent; border-color: rgba(255, 255, 255, .16); color: #cbd5e1; }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .3); }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger-soft { background: var(--red-soft); border-color: #fecaca; color: var(--red); }
.btn-sm { min-height: 36px; padding: 5px 11px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.icon-btn {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font-size: 22px;
  line-height: 1;
}
.icon-btn:hover { background: rgba(15, 23, 42, .06); }
.link-btn {
  border: 0;
  background: none;
  color: var(--primary);
  padding: 4px 2px;
  font-size: 14px;
  font-weight: 600;
}
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > span { font-size: 13px; color: var(--muted); font-weight: 550; }
.field input, .field select, .field textarea,
.filter-field input, .filter-field select,
.inline-select select,
.role-select {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus,
.filter-field input:focus, .filter-field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.textarea { resize: vertical; min-height: 140px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 14px; }
.grow { flex: 1 1 260px; }
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 600;
  background: #f1f5f9;
  color: var(--text-2);
  white-space: nowrap;
}
.badge-ok { background: var(--green-soft); color: #15803d; }
.badge-error { background: var(--red-soft); color: var(--red); }
.badge-no_data { background: var(--amber-soft); color: var(--amber); }
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
  background: #f1f5f9;
  color: var(--text-2);
  white-space: nowrap;
}
.tag-hand { background: #eff6ff; color: #1d4ed8; }
.tag-comm { background: #ecfeff; color: #0e7490; }
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  flex: none;
}
.avatar.sm { width: 30px; height: 30px; border-radius: 9px; font-size: 13px; }
.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 14px;
}
.banner-warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }

/* ---------- 登录 ---------- */
.login-view {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(37, 99, 235, .20), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(14, 165, 233, .16), transparent 60%),
    #0b1220;
}
.login-shell { width: 100%; max-width: 920px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.login-brand { color: #fff; }
.login-brand-logo { display: block; width: 148px; height: auto; margin-bottom: 18px; }
.login-brand h1 { font-size: 34px; letter-spacing: -.5px; margin-bottom: 10px; }
.login-brand p { color: #94a3b8; font-size: 15px; }
.login-card {
  background: rgba(255, 255, 255, .98);
  border-radius: 18px;
  padding: 30px 26px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.login-card .field > span { color: var(--text-2); }
.login-remember { display: flex; align-items: center; gap: 8px; margin-top: -2px; color: var(--text-2); font-size: 13px; cursor: pointer; user-select: none; }
.login-remember input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); }
.login-hint { margin: 2px 0 0; color: var(--muted); font-size: 12px; text-align: center; line-height: 1.6; }

/* ---------- 布局 ---------- */
.app-view { min-height: 100vh; }
.topbar {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}
.topbar .brand { flex: 1; font-weight: 700; font-size: 16px; }
.topbar-user { font-size: 12px; color: var(--muted); max-width: 42vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--sidebar);
  color: #e2e8f0;
  padding: 20px 14px 16px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0 8px 20px;
  text-align: center;
}
.sidebar-brand-logo { display: block; width: 88px; height: auto; }
.sidebar-brand-name { color: #f8fafc; font-size: 18px; font-weight: 750; letter-spacing: .4px; }
.nav-group { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #94a3b8;
  font-size: 15px;
  font-weight: 550;
  text-align: left;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.active { background: linear-gradient(135deg, #2563eb, #1d4ed8); color: #fff; box-shadow: 0 8px 20px rgba(37, 99, 235, .25); }
.nav-ico { width: 20px; text-align: center; font-size: 16px; opacity: .95; }
.sidebar-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .08); display: flex; flex-direction: column; gap: 10px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 6px 8px; }
.user-chip-text { min-width: 0; display: flex; flex-direction: column; }
.user-chip-text strong { font-size: 14px; color: #f1f5f9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip-text span { font-size: 11px; color: #64748b; }
.sidebar-version { text-align: center; color: #475569; font-size: 11px; letter-spacing: .4px; }
.drawer-overlay { position: fixed; inset: 0; background: rgba(2, 6, 23, .55); z-index: 55; backdrop-filter: blur(2px); }

.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  padding: 26px 30px 60px;
  max-width: 1440px;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.page-head h1 { font-size: 25px; line-height: 1.25; letter-spacing: -.4px; }
.page-head .sub { margin-top: 5px; color: var(--muted); font-size: 13px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { font-size: 17px; letter-spacing: -.2px; }
.card-head p { margin-top: 3px; color: var(--muted); font-size: 12px; }
.empty {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 34px 18px;
  text-align: center;
  color: var(--muted);
  background: #fbfdff;
}
.empty strong { display: block; color: var(--text); margin-bottom: 5px; font-size: 15px; }
.empty p { font-size: 13px; }
.empty.small { padding: 18px 12px; font-size: 13px; }
.empty.ok { color: #15803d; background: var(--green-soft); border-color: #bbf7d0; display: flex; align-items: center; justify-content: center; gap: 8px; }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 220px; color: var(--muted); font-size: 14px; }
.loading.small { min-height: 120px; }
.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  border-top-color: var(--primary);
  animation: spin .8s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 工作台 ---------- */
.filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.filter-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 0 0 auto; }
.filter-field > span { font-size: 11px; color: var(--muted); font-weight: 650; letter-spacing: .3px; }
.filter-field input { width: 158px; min-height: 40px; padding: 6px 10px; font-size: 14px; }
.filter-field select { width: 178px; min-height: 40px; padding: 6px 10px; font-size: 14px; }
.filter-field .seg { width: auto; }
.filter-note { margin-left: auto; color: var(--muted); font-size: 12px; padding-bottom: 11px; }
.seg {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid var(--line-soft);
}
.seg button {
  min-height: 34px;
  padding: 4px 15px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 550;
}
.seg button.active { background: #fff; color: var(--primary); box-shadow: 0 1px 4px rgba(15, 23, 42, .12); }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi-grid.kpi-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.kpi.is-hand { border-left: 4px solid #3b82f6; }
.kpi.is-comm { border-left: 4px solid #06b6d4; }
.kpi-top .tag { margin-right: 6px; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 13px; }
.kpi > strong { display: block; font-size: 30px; line-height: 1.15; letter-spacing: -1px; margin: 10px 0 3px; font-weight: 750; }
.kpi-sub { font-size: 12px; color: var(--muted); }
.kpi-sub.up { color: var(--green); font-weight: 600; }
.kpi-sub.down { color: var(--red); font-weight: 600; }
.kpi-ico {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-size: 13px;
  font-weight: 700;
  flex: none;
}
.kpi-ico.blue { background: #eff6ff; color: #2563eb; }
.kpi-ico.green { background: #ecfdf5; color: #16a34a; }
.kpi-ico.amber { background: #fffbeb; color: #d97706; }
.kpi-ico.violet { background: #f5f3ff; color: #7c3aed; }

.module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.module-card { min-width: 0; }
.hand-card { border-top: 4px solid #3b82f6; }
.comm-card { border-top: 4px solid #06b6d4; }
.hand-card .card-head h2 { color: #1d4ed8; }
.comm-card .card-head h2 { color: #0e7490; }
.hand-card .rate-pill { background: #eff6ff; color: #1d4ed8; }
.comm-card .rate-pill { background: #ecfeff; color: #0e7490; }
.dash-total {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 22px;
  padding: 11px 16px;
  margin-bottom: 14px;
  border: 1px solid #dbeafe;
  border-radius: 11px;
  background: linear-gradient(90deg, #eff6ff 0%, #f8fbff 55%, #ecfeff 100%);
  color: var(--text-2);
  font-size: 13px;
}
.dash-total > span:first-child { color: #1e40af; font-weight: 700; }
.dash-total b { color: #0f172a; font-size: 16px; }
.dash-total .up { color: #15803d; font-weight: 650; }
.dash-total .down { color: var(--red); font-weight: 650; }
.dash-total .delta-base { font-style: normal; color: var(--muted); font-weight: 500; font-size: 12px; margin-left: 4px; }
#dash-body.is-loading { opacity: .55; pointer-events: none; transition: opacity .15s; }
.rate-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.module-totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; background: #f8fafc; border: 1px solid var(--line-soft); border-radius: 10px; padding: 11px 12px; margin-bottom: 12px; }
.module-totals > div { display: flex; flex-direction: column; gap: 2px; }
.module-totals span { color: var(--muted); font-size: 11px; }
.module-totals strong { font-size: 18px; letter-spacing: -.3px; }
.segment-list { border: 1px solid var(--line-soft); border-radius: 10px; overflow: hidden; }
.segment-row { display: grid; grid-template-columns: 1.4fr .7fr .7fr; align-items: center; gap: 8px; padding: 9px 12px; border-top: 1px solid var(--line-soft); font-size: 14px; }
.segment-row:first-child { border-top: 0; }
.segment-row span { display: flex; align-items: center; gap: 7px; color: var(--text-2); }
.segment-row b { text-align: right; font-size: 14px; }
.segment-head { background: #f8fafc; color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: .3px; }
.segment-head span { color: var(--muted); }
.segment-head b { color: var(--muted); font-size: 11px; }
.segment-sum { background: #fbfdff; font-weight: 650; }
.segment-sum span { color: var(--text); font-weight: 650; }

.chart-card { margin-top: 16px; }
.chart-wrap { width: 100%; overflow-x: auto; }
.trend-svg { width: 100%; min-width: 560px; height: auto; display: block; }
.grid-line { stroke: #eef2f7; stroke-width: 1; }
.axis-text { fill: #94a3b8; font-size: 10px; }
.axis-hint { fill: #94a3b8; font-size: 10px; }
.bar-hand { fill: #3b82f6; }
.bar-hand:hover { fill: #2563eb; }
.bar-comm { fill: #06b6d4; }
.bar-comm:hover { fill: #0891b2; }
.line-hand-rate { fill: none; stroke: #f59e0b; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.dot-hand-rate { fill: #fff; stroke: #f59e0b; stroke-width: 2; }
.line-comm-rate { fill: none; stroke: #8b5cf6; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.dot-comm-rate { fill: #fff; stroke: #8b5cf6; stroke-width: 2; }
.chart-legend { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-bar-hand { width: 10px; height: 10px; border-radius: 2px; background: #3b82f6; }
.legend-bar-comm { width: 10px; height: 10px; border-radius: 2px; background: #06b6d4; }
.legend-line-hand { width: 16px; height: 3px; border-radius: 2px; background: #f59e0b; }
.legend-line-comm { width: 16px; height: 3px; border-radius: 2px; background: #8b5cf6; }

.two-col { display: grid; grid-template-columns: 1.08fr .92fr; gap: 14px; margin-top: 16px; }
.two-col .card { margin-top: 0; }
.person-list { border: 1px solid var(--line-soft); border-radius: 10px; overflow: hidden; }
.person-row {
  display: grid;
  grid-template-columns: 1.5fr .55fr .6fr .6fr 1fr;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
}
.person-row:first-child { border-top: 0; }
.person-head { background: #f8fafc; color: var(--muted); font-size: 11px; font-weight: 650; }
.person-name { display: flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; }
.person-name .avatar { width: 27px; height: 27px; border-radius: 8px; font-size: 12px; }
.rate-cell { display: flex; flex-direction: column; gap: 4px; }
.rate-cell b { font-size: 13px; }
.bar { display: block; height: 5px; border-radius: 99px; background: #eef2f7; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #60a5fa, #2563eb); }

.anomaly-list { display: flex; flex-direction: column; gap: 9px; }
.anomaly { background: var(--amber-soft); border: 1px solid #fde68a; border-radius: 10px; padding: 11px 12px; }
.anomaly strong { display: block; font-size: 14px; color: #92400e; }
.anomaly p { margin-top: 4px; font-size: 12px; color: #a16207; line-height: 1.55; }
.anomaly .anomaly-fix { color: #854d0e; font-weight: 550; }
.issue-block { margin-top: 14px; }
.block-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 650; margin-bottom: 9px; }
.block-title .muted { font-weight: 400; font-size: 11px; }
.issue-bars { display: flex; flex-direction: column; gap: 8px; }
.issue-row { display: flex; flex-direction: column; gap: 4px; }
.issue-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--text-2); }
.issue-label b { color: var(--text); }
.issue-people { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 9px; }
.issue-people summary { cursor: pointer; font-size: 12px; color: var(--muted); }
.mini-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mini-list span { display: inline-flex; gap: 6px; background: #f1f5f9; border-radius: 6px; padding: 4px 8px; font-size: 12px; color: var(--muted); }
.mini-list b { color: var(--text-2); }

/* ---------- 工具中心 ---------- */
.chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chips.wrap { flex-wrap: wrap; }
.chip {
  min-height: 38px;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 550;
}
.chip:hover { border-color: #bfdbfe; color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tool-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.tool-card[data-status="online"] { border-color: #bbf7d0; }
.tool-card.is-hidden { opacity: .62; border-style: dashed; }
.tool-hidden-tag { font-size: 11px; color: var(--muted); border: 1px dashed #cbd5e1; border-radius: 10px; padding: 1px 7px; margin-left: 4px; }
.tool-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.tool-title { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.tool-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f1f5f9;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex: none;
}
.tool-title h3 { font-size: 15px; line-height: 1.35; }
.tool-title p { margin-top: 2px; font-size: 11px; color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.status-online { color: #15803d; }
.status-offline { color: var(--red); }
.tool-desc { color: var(--muted); font-size: 13px; line-height: 1.55; min-height: 38px; }
.tool-meta { display: flex; gap: 14px; font-size: 11px; color: var(--muted); padding-top: 10px; border-top: 1px solid var(--line-soft); }
.tool-meta b { color: var(--text-2); }
.tool-actions { display: flex; gap: 7px; flex-wrap: wrap; margin-top: auto; }
.tool-actions .btn { min-height: 38px; padding: 5px 13px; font-size: 13px; }

/* ---------- 资料库 ---------- */
.searchbar { display: flex; gap: 8px; margin-bottom: 12px; }
.searchbar input {
  flex: 1;
  min-height: 46px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  outline: none;
}
.searchbar input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.asset-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 12px; color: var(--muted); font-size: 12px; }
.inline-select { display: inline-flex; align-items: center; gap: 8px; }
.inline-select select { min-height: 34px; padding: 3px 8px; font-size: 13px; width: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.asset-list { display: flex; flex-direction: column; gap: 8px; }
.asset-row {
  display: grid;
  grid-template-columns: minmax(240px, 2.1fr) .7fr .6fr .9fr auto;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
  font-size: 13px;
}
.asset-row:hover { border-color: #bfdbfe; }
.asset-head { background: transparent; border: 0; box-shadow: none; padding: 0 14px 2px; color: var(--muted); font-size: 11px; font-weight: 650; }
.asset-file { display: flex; align-items: center; gap: 11px; min-width: 0; }
.asset-file > div { min-width: 0; display: flex; flex-direction: column; }
.asset-file strong { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-file span { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #eff6ff;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .2px;
  flex: none;
}
.file-xls, .file-xlsx, .file-csv, .file-tsv { background: #ecfdf5; color: #15803d; }
.file-md, .file-txt, .file-docx, .file-doc, .file-pdf { background: #fff7ed; color: #c2410c; }
.file-ps1, .file-bat, .file-py, .file-js, .file-json { background: #f5f3ff; color: #6d28d9; }
.asset-actions { display: flex; gap: 6px; justify-content: flex-end; }
.asset-actions .btn { min-height: 34px; font-size: 12px; padding: 4px 10px; }

/* ---------- 表格 / 预览 ---------- */
.table-scroll { width: 100%; overflow: auto; border: 1px solid var(--line-soft); border-radius: 10px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { padding: 9px 11px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
.data-table th { background: #f8fafc; color: var(--muted); font-size: 11px; font-weight: 650; white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.data-table tbody tr:hover { background: #fbfdff; }
.preview-table { min-width: 720px; }
.preview-table td { white-space: nowrap; max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.preview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.preview-head > div { display: flex; flex-direction: column; gap: 2px; }
.preview-head strong { font-size: 15px; }
.preview-head span { font-size: 12px; color: var(--muted); }
.text-preview {
  margin: 0;
  max-height: 66vh;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  background: #0b1220;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 14px;
  font-size: 13px;
  line-height: 1.65;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 9px; margin-bottom: 9px; border-bottom: 1px solid var(--line); }
.tab { min-height: 34px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--muted); font-size: 12px; white-space: nowrap; }
.tab.active { background: var(--primary-soft); border-color: #bfdbfe; color: var(--primary-dark); font-weight: 600; }

/* ---------- 报表 ---------- */
.report-builder { margin-bottom: 16px; }
.report-kind-seg { margin-bottom: 14px; }
.report-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.report-form .field { min-width: 160px; }
.report-form .btn { min-width: 132px; }
.report-list { display: flex; flex-direction: column; gap: 8px; }
.report-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.7fr) .5fr .55fr .6fr .9fr auto;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  font-size: 13px;
  background: #fff;
}
.report-head { border: 0; background: transparent; padding: 0 13px 2px; color: var(--muted); font-size: 11px; font-weight: 650; }
.report-title { display: flex; flex-direction: column; min-width: 0; }
.report-title strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.report-actions .btn { min-height: 32px; font-size: 12px; padding: 4px 9px; }

/* ---------- 设置 ---------- */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.settings-grid .card { margin-top: 0; }
.form-grid { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.form-grid .field { flex: 1 1 170px; }
.form-grid .btn { min-width: 118px; }
.info-list { display: flex; flex-direction: column; }
.info-list > div { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.info-list > div:last-child { border-bottom: 0; }
.info-list span { color: var(--muted); flex: none; }
.info-list b { text-align: right; font-weight: 550; min-width: 0; }
.inline-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.task-form { display: flex; flex-direction: column; gap: 10px; }
.task-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.task-row input[type="time"] { width: 120px; min-height: 40px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 9px; }
.switch-line { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); cursor: pointer; }
.switch { position: relative; width: 42px; height: 25px; display: inline-block; flex: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: #cbd5e1; transition: .18s; }
.switch i::after { content: ""; position: absolute; width: 19px; height: 19px; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: .18s; }
.switch input:checked + i { background: var(--primary); }
.switch input:checked + i::after { transform: translateX(17px); }
.user-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.user-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.3fr) .7fr .6fr .55fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
}
.user-head { border: 0; background: transparent; padding: 0 12px 2px; color: var(--muted); font-size: 11px; font-weight: 650; }
.user-name { display: flex; align-items: center; gap: 9px; min-width: 0; }
.user-name > div { display: flex; flex-direction: column; min-width: 0; }
.user-name span { font-size: 11px; color: var(--muted); }
.role-select { min-height: 34px; padding: 3px 8px; font-size: 12px; border-radius: 8px; }
.root-list { display: flex; flex-direction: column; gap: 8px; }
.root-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.root-row > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.root-row strong { font-size: 13px; }
.root-row .path { font-size: 11px; }
.root-form { margin-top: 12px; }

/* ---------- 弹窗 / 抽屉 / 底栏 ---------- */
.bottom-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  height: calc(var(--bottom-nav) + env(safe-area-inset-bottom));
  padding: 4px 4px env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.bottom-nav button {
  flex: 1;
  min-height: 54px;
  border: 0;
  background: transparent;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10px;
}
.bottom-nav button span { font-size: 18px; line-height: 1; }
.bottom-nav button em { font-style: normal; }
.bottom-nav button.active { color: var(--primary); font-weight: 650; }
.mobile-actionbar { display: none; }

.modal { position: fixed; inset: 0; z-index: 90; }
.modal-mask { position: absolute; inset: 0; background: rgba(2, 6, 23, .5); backdrop-filter: blur(2px); }
.modal-dialog {
  position: absolute;
  left: 50%;
  top: 7vh;
  transform: translateX(-50%);
  width: min(92vw, 620px);
  max-height: 86vh;
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(2, 6, 23, .35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-dialog.modal-wide { width: min(96vw, 1100px); max-height: 90vh; }
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-weight: 650;
  font-size: 15px;
  flex: none;
}
.modal-body { padding: 16px; overflow: auto; -webkit-overflow-scrolling: touch; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); background: #fbfdff; flex: none; flex-wrap: wrap; }
.confirm-text { font-size: 14px; color: var(--text-2); line-height: 1.7; }

.sheet { position: fixed; inset: 0; z-index: 95; }
.sheet-mask { position: absolute; inset: 0; background: rgba(2, 6, 23, .5); }
.sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 82vh;
  background: var(--card);
  border-radius: 18px 18px 0 0;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -20px 60px rgba(2, 6, 23, .25);
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); flex: none; }
.sheet-body { padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); overflow: auto; }
.sheet-title { font-size: 17px; font-weight: 700; margin-bottom: 14px; }
.sheet-body .field { margin-bottom: 16px; }
.field-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sheet-foot { display: flex; gap: 10px; margin-top: 20px; }
.sheet-foot .btn { flex: 1; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%) translateY(16px);
  max-width: min(92vw, 520px);
  padding: 11px 16px;
  border-radius: 10px;
  background: #0f172a;
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 12px 30px rgba(2, 6, 23, .3);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 120;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.only-mobile { display: none !important; }

/* ---------- 移动端 ---------- */
@media (max-width: 1100px) {
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-grid.kpi-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 899px) {
  body { padding-bottom: 0; }
  .desktop-only { display: none !important; }
  .only-mobile { display: inline-flex !important; }
  .topbar { display: flex; }
  .sidebar {
    transform: translateX(-100%);
    transition: transform .24s ease;
    width: min(82vw, 320px);
    box-shadow: 18px 0 50px rgba(2, 6, 23, .25);
    padding-top: max(20px, env(safe-area-inset-top));
  }
  .sidebar.open { transform: translateX(0); }
  .main {
    margin-left: 0;
    padding: 14px 14px calc(150px + env(safe-area-inset-bottom));
    max-width: none;
  }
  .page-head { align-items: center; margin-bottom: 14px; }
  .page-head h1 { font-size: 22px; }
  .page-head .sub { font-size: 12px; }
  .page-actions { display: none; }
  .card { padding: 15px; border-radius: 13px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 13px; }
  .kpi > strong { font-size: 25px; margin-top: 8px; }
  .kpi-top { font-size: 12px; }
  .kpi-sub { font-size: 11px; }
  .module-grid { grid-template-columns: 1fr; gap: 12px; }
  .two-col { grid-template-columns: 1fr; gap: 12px; }
  .settings-grid { grid-template-columns: 1fr; }
  .tool-grid { grid-template-columns: 1fr; }
  .chart-card .card-head { flex-direction: column; }
  .chart-legend { margin-top: 8px; }
  .trend-svg { min-width: 620px; }
  .filter-bar { display: none; }
  .filter-note { display: none; }
  .bottom-nav { display: flex; }
  .mobile-actionbar {
    display: flex;
    gap: 8px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(var(--bottom-nav) + env(safe-area-inset-bottom));
    z-index: 44;
    padding: 9px 12px;
    background: linear-gradient(180deg, rgba(244, 246, 249, .4), rgba(244, 246, 249, .97) 35%);
    border-top: 1px solid rgba(226, 232, 240, .8);
  }
  .mobile-actionbar .btn { flex: 1; min-height: 46px; font-size: 14px; }
  .mobile-actionbar .btn-block { flex: 1; }
  .toast { bottom: calc(160px + env(safe-area-inset-bottom)); }
  .banner { align-items: flex-start; }

  /* 弹窗全屏单列 */
  .modal-dialog, .modal-dialog.modal-wide {
    inset: 0;
    top: 0;
    left: 0;
    transform: none;
    width: 100%;
    max-width: none;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
  }
  .modal-head {
    padding-top: max(12px, env(safe-area-inset-top));
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;
  }
  .modal-body { padding: 14px; }
  .modal-foot {
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    position: sticky;
    bottom: 0;
  }
  .modal-foot .btn { flex: 1; }
  .preview-table { min-width: 760px; }

  /* 筛选弹层 */
  .sheet-panel { max-height: 88dvh; }

  /* 表格转卡片 */
  .asset-list, .report-list, .user-list { gap: 10px; }
  .asset-head, .report-head, .user-head, .person-head { display: none; }
  .asset-row, .report-row, .user-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px 12px;
    padding: 13px;
    border-radius: 12px;
    box-shadow: var(--shadow);
  }
  .asset-row > *[data-label], .report-row > *[data-label], .user-row > *[data-label] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
  }
  .asset-row > *[data-label]::before, .report-row > *[data-label]::before, .user-row > *[data-label]::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 550;
    flex: none;
  }
  .asset-file { grid-column: 1 / -1; }
  .asset-file strong { white-space: normal; }
  .asset-actions { grid-column: 1 / -1; justify-content: flex-end; padding-top: 2px; }
  .asset-actions::before { display: none; }
  .asset-actions .btn { min-height: 40px; padding: 6px 14px; }
  .report-title { grid-column: 1 / -1; }
  .report-title strong { white-space: normal; }
  .report-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .report-actions .btn { min-height: 40px; }
  .user-name { grid-column: 1 / -1; }
  .person-list { border: 0; display: flex; flex-direction: column; gap: 8px; }
  .person-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
  }
  .person-name { grid-column: 1 / -1; }
  .person-row > span[data-label] { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .person-row > span[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 11px; }
  .rate-cell { flex-direction: column; align-items: stretch !important; }
  .person-row > .rate-cell::before { align-self: flex-start; }
  .searchbar { flex-wrap: nowrap; }
  .searchbar input { min-width: 0; }
  .searchbar .btn { flex: none; padding: 8px 13px; }
  .asset-meta { margin-top: 2px; }
  .seg button { min-height: 40px; }
  .filter-field input, .filter-field select { font-size: 16px; }
  .field input, .field select, .field textarea { font-size: 16px; }
  .report-form { flex-direction: column; align-items: stretch; }
  .report-form .field { width: 100%; }
  .report-form .btn { width: 100%; }
  .form-grid { flex-direction: column; align-items: stretch; }
  .form-grid .field { flex: 1 1 auto; }
  .form-grid .btn { width: 100%; }
  .task-row { align-items: flex-start; }
  .task-row input[type="time"] { width: 112px; flex: none; }
  .root-row { align-items: flex-start; }
}

@media (max-width: 480px) {
  .login-shell { grid-template-columns: 1fr; gap: 22px; }
  .login-brand { text-align: center; }
  .login-brand-logo { margin-left: auto; margin-right: auto; }
  .login-brand h1 { font-size: 26px; }
  .login-brand p { font-size: 13px; }
  .login-card { padding: 22px 18px; }
  .kpi-grid { gap: 8px; }
  .kpi > strong { font-size: 22px; }
  .kpi-ico { width: 26px; height: 26px; }
  .module-totals { padding: 9px; }
  .module-totals strong { font-size: 16px; }
  .segment-row { grid-template-columns: 1.2fr .7fr .7fr; padding: 9px 10px; }
  .asset-row, .report-row, .user-row { grid-template-columns: 1fr; }
  .asset-row > *[data-label], .report-row > *[data-label], .user-row > *[data-label] { display: flex; }
  .asset-file, .report-title, .user-name, .asset-actions, .report-actions { grid-column: 1; }
  .tool-grid { gap: 10px; }
  .chart-legend { font-size: 11px; }
}

@media (min-width: 900px) {
  .topbar { display: none; }
  .drawer-overlay { display: none !important; }
  .bottom-nav { display: none !important; }
  .mobile-actionbar { display: none !important; }
  .only-mobile { display: none !important; }
}

/* ---------- 资料库上传 / 金山文件夹同步（本轮新增） ---------- */
.asset-page-head > div:first-child { min-width: 0; }
.asset-upload-bar { display: flex; align-items: center; gap: 8px; flex: none; flex-wrap: wrap; }
.asset-upload-bar .btn { white-space: nowrap; }
.asset-upload-input { display: none; }
.asset-category-select {
  width: 100%;
  max-width: 132px;
  min-height: 34px;
  padding: 4px 8px;
  font-size: 13px;
  color: var(--text-2);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}
.asset-category-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.asset-category-select:disabled { opacity: .6; cursor: wait; }
.asset-category-tip { margin: -4px 0 10px; color: var(--muted); font-size: 12px; }
/* ---------- 资料库：默认隐藏开关 / 杂项标记（本轮新增） ---------- */
.asset-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  flex-wrap: wrap;
  margin: -2px 0 12px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
}
.asset-hidden-toggle { font-size: 13px; color: var(--text-2); user-select: none; }
.asset-hidden-hint { color: var(--muted); font-size: 11px; }
.asset-title-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.asset-title-line strong { min-width: 0; flex: 0 1 auto; }
.asset-file .asset-hidden-tag {
  display: inline-flex;
  align-items: center;
  flex: none;
  padding: 0 6px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 10px;
  font-weight: 600;
  line-height: 17px;
}
.sheet-body .asset-hidden-toggle { margin: 2px 0 14px; }
.sheet-body .asset-hidden-toggle + .note { margin-top: -8px; }
.kdocs-folder-form { display: flex; flex-direction: column; gap: 13px; }
.kdocs-folder-form .switch-line { padding: 2px 0; }
.kdocs-folder-form .field { width: 100%; }
.kdocs-folder-form .inline-actions { margin-top: 2px; }
.kdocs-status { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 12px; line-height: 1.7; }
.kdocs-status b { color: var(--text-2); font-weight: 600; }
.kdocs-status.ok b.kdocs-status-ok { color: #15803d; }
.kdocs-status.error b.kdocs-status-error { color: #b91c1c; }
.kdocs-status-reason { margin-top: 3px; color: #b91c1c; word-break: break-word; }

@media (max-width: 899px) {
  .asset-page-head { align-items: center; gap: 10px; }
  .asset-upload-bar .btn { min-height: 38px; padding: 6px 12px; font-size: 13px; }
  .asset-category-select { min-height: 36px; }
  .kdocs-status { font-size: 12px; }
  .asset-filter-bar { margin-top: 0; padding: 10px 12px; }
  .asset-hidden-toggle { min-height: 36px; }
  .asset-hidden-hint { width: 100%; }
}

@media (max-width: 480px) {
  .asset-page-head { flex-wrap: wrap; }
  .asset-page-head .sub { display: none; }
  .asset-upload-bar { width: 100%; }
  .asset-upload-bar .btn { flex: 1 1 auto; min-height: 36px; padding: 5px 10px; font-size: 12px; }
  .asset-filter-bar { align-items: flex-start; }
  .asset-title-line { gap: 4px; }
}

/* ---------- 问题全量原因展开 / 人员分组（本轮新增） ---------- */
.person-group + .person-group { margin-top: 16px; }
.person-group-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 2px 0 8px;
  font-size: 13px;
}
.person-group-title strong { font-weight: 650; color: var(--text); }
.person-group-title .muted { font-size: 11px; font-weight: 400; color: var(--muted); white-space: nowrap; }
.person-group .person-row { grid-template-columns: minmax(0, 1.6fr) .7fr .7fr minmax(0, 1.1fr); }
.person-group .empty.small { padding: 12px; border: 1px dashed var(--line); border-radius: 10px; }

.issue-all { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 9px; }
.issue-all > summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 550;
  color: var(--primary);
  line-height: 1.5;
}
.issue-all > summary:hover { color: #1d4ed8; }
.issue-all[open] > summary { margin-bottom: 2px; }
.issue-all-list { display: flex; flex-direction: column; }
.issue-all-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
  line-height: 1.45;
}
.issue-all-row:first-child { border-top: 0; }
.issue-all-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.issue-all-count { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.issue-all-share { min-width: 52px; text-align: right; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.issue-all-note { margin-top: 6px; font-size: 11px; color: var(--muted); }

@media (max-width: 899px) {
  .person-group .person-row { grid-template-columns: 1fr 1fr; }
  .person-group-title { margin-top: 0; }
  .issue-all-name { white-space: normal; overflow-wrap: anywhere; }
  .issue-all-row { grid-template-columns: minmax(0, 1fr) auto auto; }
}
