:root {
  color-scheme: light;
  --brand: #0b63f6;
  --brand-dark: #084dcc;
  --brand-soft: #edf4ff;
  --brand-line: #c8dcff;
  --ink: #0b1220;
  --ink-2: #1d2939;
  --muted: #475467;
  --line: #e4e7ec;
  --line-soft: #f0f2f5;
  --bg: #f7f8fa;
  --card: #ffffff;
  --ok: #0b8f62;
  --warn: #d97706;
  --danger: #e13c4b;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .035);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: auto;
  text-rendering: optimizeLegibility;
}

body { min-height: 100vh; }
a { color: var(--brand); text-decoration: none; }
button { font: inherit; }
button, summary { -webkit-tap-highlight-color: transparent; }
::selection { color: #fff; background: rgba(23, 105, 224, .82); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #cbd5e4; border: 2px solid transparent; border-radius: 9px; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ───────────────────────── 框架 ───────────────────────── */
.app { display: flex; min-height: 100vh; }

.sidebar {
  position: sticky;
  top: 0;
  width: 232px;
  height: 100vh;
  flex: 0 0 232px;
  padding: 18px 13px 22px;
  overflow-y: auto;
  color: var(--ink-2);
  border-right: 1px solid var(--line);
  background: #fff;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 1px 7px 17px; }
.brand .logo {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 6px 16px rgba(23, 105, 224, .22);
  font-size: 16px;
  font-weight: 800;
}
.brand-copy { min-width: 0; flex: 1; }
.brand-copy b { display: block; color: var(--ink); font-size: 16px; line-height: 1.2; letter-spacing: .06em; }
.brand-copy span { display: block; margin-top: 2px; color: var(--muted); font-size: 10.5px; font-weight: 500; }

.side-health {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 3px 17px;
  padding: 10px 11px;
  border: 1px solid #e5ebf3;
  border-radius: 10px;
  background: #f8fafc;
}
.side-health-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #9aa7b8;
  box-shadow: 0 0 0 3px rgba(154, 167, 184, .12);
}
.side-health-dot.ok { background: #19a974; box-shadow: 0 0 0 3px rgba(25, 169, 116, .12); }
.side-health b { display: block; color: #1d2939; font-size: 13px; line-height: 1.2; }
.side-health span { display: block; margin-top: 1px; color: var(--muted); font-size: 10.5px; font-weight: 500; }

.nav-section { margin: 0 0 12px; }
.nav-group {
  margin: 0 0 4px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .09em;
}
.nav-item {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 37px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  color: var(--ink-2);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  transition: color .14s ease, background .14s ease;
}
.nav-item:hover { color: #194e94; background: #f3f7fd; }
.nav-item.active {
  color: #fff;
  background: var(--brand);
  font-weight: 700;
}
.nav-item.active::before {
  content: none;
}
.nav-item.active .ico { opacity: 1; }
.nav-item .badge-dot {
  min-width: 19px;
  margin-left: auto;
  padding: 1px 6px;
  border-radius: 99px;
  color: #fff;
  background: var(--danger);
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
}
.sidebar-foot { margin: 24px 9px 0; color: var(--muted); font-size: 10px; font-weight: 500; letter-spacing: .05em; }
.nav-toggle { display: none; }

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 20px;
  padding: 10px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .97);
  backdrop-filter: saturate(1.25) blur(12px);
}
.page-heading { min-width: 210px; }
.eyebrow {
  color: var(--brand);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1.3;
  text-transform: uppercase;
}
.page-heading h1 { margin: 2px 0 0; color: var(--ink); font-size: 20px; font-weight: 750; line-height: 1.25; letter-spacing: -.02em; }
.page-heading p { margin: 2px 0 0; color: #475467; font-size: 11.5px; font-weight: 500; }

.global-search-wrap {
  display: flex;
  width: min(360px, 31vw);
  height: 38px;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 0 9px 0 11px;
  border: 1px solid #dfe6f0;
  border-radius: 9px;
  background: #f8fafc;
  transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
}
.global-search-wrap:focus-within {
  border-color: #8bb2ed;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(23, 105, 224, .09);
}
.global-search-wrap .ico { color: var(--muted); }
.global-search {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 12.5px;
}
.global-search::placeholder { color: var(--muted); }
.global-search-wrap kbd {
  padding: 2px 6px;
  border: 1px solid #d9e1ec;
  border-radius: 5px;
  color: var(--muted);
  background: #fff;
  font: 10px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.topbar .right { display: flex; align-items: center; gap: 9px; }
.top-badge { height: 23px; }
.icon-btn {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border: 1px solid #dfe6f0;
  border-radius: 9px;
  color: var(--muted);
  background: #fff;
  cursor: pointer;
}
.icon-btn:hover { color: var(--brand); border-color: var(--brand-line); background: var(--brand-soft); }
.alert-count {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  min-width: 17px;
  height: 17px;
  place-items: center;
  padding: 0 4px;
  border: 2px solid #fff;
  border-radius: 10px;
  color: #fff;
  background: var(--danger);
  font-size: 9px;
  font-weight: 800;
}
.user-chip { display: flex; align-items: center; gap: 8px; padding: 1px 3px; }
.avatar {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 9px;
  color: var(--brand-dark);
  background: #eaf2ff;
  font-size: 12px;
  font-weight: 800;
}
.user-chip b, .user-chip span { display: block; line-height: 1.25; }
.user-chip b { color: var(--ink); font-size: 12.5px; }
.user-chip span { color: var(--muted); font-size: 10px; font-weight: 500; }
.readonly-notice {
  margin: 14px 28px -2px;
  padding: 10px 13px;
  border: 1px solid #efdbab;
  border-radius: 9px;
  color: #805607;
  background: #fffaef;
  font-size: 12px;
}
.content {
  width: 100%;
  max-width: 1600px;
  padding: 24px 28px 60px;
}

/* ───────────────────────── 基础控件 ───────────────────────── */
.card {
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}
.card-hd {
  display: flex;
  min-height: 56px;
  align-items: center;
  gap: 10px;
  padding: 13px 17px;
  border-bottom: 1px solid var(--line-soft);
  background: #fff;
}
.card-hd > div:first-child { min-width: 0; }
.card-hd h3 { margin: 0; color: var(--ink); font-size: 14px; font-weight: 750; }
.card-hd p { margin: 2px 0 0; color: #475467; font-size: 11.5px; font-weight: 500; }
.card-hd .sub { margin-left: auto; color: #475467; font-size: 11.5px; font-weight: 500; }
.card-action { margin-left: auto; color: #475467; font-size: 11.5px; }
.card-hd > .btn:last-child, .card-hd > .badge:last-child { margin-left: auto; }
.card-bd { padding: 17px; }

.btn {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 13px;
  border: 1px solid #d9e1ec;
  border-radius: 8px;
  color: #1d2939;
  background: #fff;
  box-shadow: 0 1px 1px rgba(24, 39, 75, .025);
  cursor: pointer;
  font-weight: 600;
  font-size: 12.5px;
  white-space: nowrap;
  transition: .14s ease;
}
.btn:hover { border-color: #b9c7da; background: #f9fbfe; }
.btn.primary { color: #fff; border-color: var(--brand); background: var(--brand); box-shadow: 0 3px 9px rgba(23, 105, 224, .16); }
.btn.primary:hover { border-color: var(--brand-dark); background: var(--brand-dark); }
.btn.light { color: #214e8d; border-color: #c7dbf6; background: #fff; }
.btn.light:hover { color: var(--brand-dark); border-color: #9dbfed; background: #f7faff; }
.btn.danger { color: var(--danger); border-color: #efc8ce; background: #fff; }
.btn.danger:hover { border-color: #e6a7b0; background: #fff7f8; }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn.ghost:hover { border-color: #e2e8f1; background: #f5f8fc; }
.btn.sm { min-height: 29px; height: 29px; padding: 0 10px; border-radius: 7px; font-size: 11.5px; }
.btn:disabled { opacity: .48; cursor: not-allowed; box-shadow: none; }

.input, .select, textarea.input {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid #dce3ed;
  border-radius: 8px;
  outline: 0;
  color: var(--ink);
  background: #fff;
  font-size: 13px;
  transition: .14s ease;
}
.select { padding-right: 30px; }
textarea.input { height: auto; padding: 8px 10px; font: 12px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; }
.input:hover, .select:hover { border-color: #c3cfdf; }
.input:focus, .select:focus, textarea.input:focus {
  border-color: #80a9e5;
  box-shadow: 0 0 0 3px rgba(23, 105, 224, .09);
}
input[type="checkbox"], input[type="radio"] { width: 15px; height: 15px; accent-color: var(--brand); }

.field { margin-bottom: 13px; }
.field label { display: block; margin-bottom: 5px; color: #344054; font-size: 12px; font-weight: 650; }
.field .hint, .hint { margin-top: 5px; color: #475467; font-size: 11.5px; font-weight: 500; line-height: 1.65; }
.row { display: flex; flex-wrap: wrap; gap: 12px; }
.row > * { min-width: 160px; flex: 1 1 0; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.toolbar .spacer, .spacer { flex: 1; }
.filter-bar { padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.search-field { position: relative; min-width: 230px; flex: 1 1 280px; }
.search-field .ico { position: absolute; top: 9px; left: 11px; color: var(--muted); pointer-events: none; }
.search-field .input { padding-left: 36px; }

.tabs, .tabbar {
  display: flex;
  width: max-content;
  max-width: 100%;
  gap: 3px;
  margin-bottom: 15px;
  padding: 3px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(24, 39, 75, .025);
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar, .tabbar::-webkit-scrollbar { display: none; }
.tab, .gtab {
  flex: 0 0 auto;
  padding: 7px 12px;
  border-radius: 6px;
  color: #344054;
  cursor: pointer;
  font-size: 12.5px;
  white-space: nowrap;
  user-select: none;
}
.tab:hover, .gtab:hover { color: #294568; background: #f4f7fb; }
.tab.active, .tabbar .gtab.active { color: var(--brand-dark); background: var(--brand-soft); font-weight: 700; }

table { width: 100%; border-collapse: separate; border-spacing: 0; }
th {
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
  color: #344054;
  background: #f8fafc;
  font-size: 11px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}
td { padding: 11px 13px; border-bottom: 1px solid var(--line-soft); color: #1d2939; font-size: 12.5px; vertical-align: middle; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8fbff; }
td.mono, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

.badge {
  display: inline-flex;
  height: 22px;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border-radius: 6px;
  color: #344054;
  background: #eef2f7;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.badge.ok { color: #0e724c; background: #e8f7f0; }
.badge.warn { color: #9b5a05; background: #fff3df; }
.badge.danger { color: #ae2734; background: #fdecef; }
.badge.info { color: var(--brand-dark); background: var(--brand-soft); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; }
.dot.on { background: #18a56f; box-shadow: 0 0 0 3px rgba(24, 165, 111, .12); }
.dot.off { background: #9da9b9; }
.chip-list { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  display: inline-flex;
  min-height: 29px;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid #dfe6f0;
  border-radius: 7px;
  color: #27364a;
  background: #fff;
  font-size: 12px;
}
.chip:hover { border-color: #c5d4e7; background: #f8fafc; }
.chip .x { color: #97a4b5; cursor: pointer; font-size: 15px; line-height: 1; }
.tag-soft {
  padding: 4px 8px;
  border: 1px solid #e0e7f0;
  border-radius: 6px;
  color: #475467;
  background: #f8fafc;
  font-size: 11.5px;
  white-space: nowrap;
}
.progress { height: 6px; overflow: hidden; border-radius: 99px; background: #edf1f6; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.progress.ok > i { background: var(--ok); }
.progress.warn > i { background: var(--warn); }
.progress.danger > i { background: var(--danger); }

.empty { padding: 42px 12px; color: #475467; text-align: center; font-weight: 500; }
.empty .big { margin-bottom: 5px; color: #27364a; font-size: 14px; font-weight: 750; }
.empty.compact { padding: 26px 10px; }
.notice {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 11px 13px;
  border-radius: 9px;
  font-size: 12px;
}
.notice.info { color: #315d9d; border: 1px solid #cfe0fb; background: #f4f8ff; }
.notice.warn { color: #825309; border: 1px solid #efd5a3; background: #fff9ed; }

/* ───────────────────────── 工作台 ───────────────────────── */
.hero-panel {
  position: relative;
  display: grid;
  min-height: 176px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  margin-bottom: 16px;
  padding: 24px 27px;
  overflow: hidden;
  border: 1px solid #d8dee8;
  border-top: 3px solid var(--brand);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.hero-panel::after {
  position: absolute;
  right: -70px;
  bottom: -150px;
  width: 380px;
  height: 260px;
  border-radius: 50%;
  background: #f5f8fc;
  opacity: .6;
  content: "";
  pointer-events: none;
}
.hero-copy, .hero-side { position: relative; z-index: 1; }
.hero-copy h2 { max-width: 760px; margin: 5px 0 6px; color: #0b2545; font-size: clamp(24px, 2.2vw, 31px); font-weight: 750; line-height: 1.22; letter-spacing: -.035em; }
.hero-copy p { margin: 0; color: #475467; font-size: 12.5px; font-weight: 500; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hero-side { display: flex; align-items: center; gap: 20px; padding-right: 4px; }
.health-ring {
  --value: 0;
  position: relative;
  display: grid;
  width: 104px;
  height: 104px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#19a974 calc(var(--value) * 1%), #e4ebf4 0);
}
.health-ring::before {
  position: absolute;
  width: 84px;
  height: 84px;
  border: 1px solid #e4ebf3;
  border-radius: 50%;
  background: #fff;
  content: "";
}
.health-ring > div { position: relative; z-index: 1; text-align: center; }
.health-ring b { display: block; color: #244f63; font-size: 23px; line-height: 1.1; letter-spacing: -.03em; }
.health-ring span { color: var(--muted); font-size: 9.5px; font-weight: 500; }
.hero-status { display: grid; gap: 8px; min-width: 105px; color: #475467; font-size: 11.5px; font-weight: 500; }
.hero-status div { display: flex; align-items: center; gap: 7px; }
.hero-status b { color: #1d2939; font-size: 13px; }
.mini-mark { display: inline-block; width: 6px; height: 6px; border-radius: 2px; }
.mini-mark.warn { background: #d89018; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.compact-stats { margin-bottom: 22px; }
.stat {
  position: relative;
  min-height: 105px;
  padding: 15px 17px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.stat::after { content: none; }
.stat .k { color: #344054; font-size: 11.5px; font-weight: 650; }
.stat .v { margin-top: 5px; color: #1b2a40; font-size: 27px; font-weight: 750; line-height: 1.15; letter-spacing: -.035em; }
.stat .d { margin-top: 4px; color: var(--muted); font-size: 10.5px; font-weight: 500; }
.text-danger { color: var(--danger) !important; }

.dashboard-section { margin: 23px 0 18px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 11px; }
.section-heading h2 { margin: 2px 0 0; color: var(--ink); font-size: 17px; font-weight: 750; letter-spacing: -.02em; }
.section-heading > span { color: var(--muted); font-size: 11px; font-weight: 500; }
.quick-module-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.module {
  display: flex;
  width: 100%;
  min-height: 68px;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: inherit;
  background: #fff;
  box-shadow: 0 1px 2px rgba(24, 39, 75, .018);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: .14s ease;
}
.module:hover { border-color: #b9d0ef; box-shadow: 0 7px 18px rgba(36, 73, 124, .07); transform: translateY(-1px); }
.module .mi {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 9px;
  color: var(--brand);
  background: var(--brand-soft);
}
.module .mi svg { width: 19px; height: 19px; }
.module .mb { min-width: 0; flex: 1; }
.module .mb b { display: block; overflow: hidden; color: var(--ink); font-size: 12.5px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.module .mb small { display: block; overflow: hidden; margin-top: 2px; color: var(--muted); font-size: 10.5px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.module-arrow { color: var(--muted); font-size: 20px; line-height: 1; }

.dashboard-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.dashboard-columns .span-2 { grid-column: span 2; }
.alert-list { max-height: 252px; overflow: auto; }
.alert-row { display: flex; align-items: flex-start; gap: 9px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.alert-row:first-child { padding-top: 0; }
.alert-row:last-child { padding-bottom: 0; border-bottom: 0; }
.alert-row b, .alert-row small { display: block; }
.alert-row b { color: #1d2939; font-size: 11.8px; font-weight: 650; line-height: 1.5; }
.alert-row small { margin-top: 2px; color: var(--muted); font-size: 10.5px; font-weight: 500; }
.bar-row { margin-bottom: 12px; }
.bar-meta { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 5px; color: #475467; font-size: 11px; font-weight: 500; }
.group-summary { margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--line-soft); }
.group-summary div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; color: #475467; font-size: 11.5px; }
.group-summary b { color: #344054; font-size: 11px; }
.list-stack { display: grid; gap: 1px; }
.list-row {
  display: flex;
  width: 100%;
  align-items: center;
  padding: 9px 0;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  color: inherit;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.list-row:last-child { border-bottom: 0; }
.list-row:hover .list-main b { color: var(--brand); }
.list-main { min-width: 0; flex: 1; }
.list-main b, .list-main small { display: block; }
.list-main b { color: #1d2939; font-size: 12px; font-weight: 650; }
.list-main small { color: var(--muted); font-size: 10.5px; font-weight: 500; }
.score-pill { padding: 3px 7px; border-radius: 6px; color: #13764f; background: #e9f7f0; font-size: 10.5px; font-weight: 700; }
.score-pill.bad { color: #a05b09; background: #fff2dd; }
.alert-type-row { display: grid; grid-template-columns: 1fr auto auto; gap: 9px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: 11px; }
.alert-type-row:last-child { border-bottom: 0; }
.alert-type-row b { font-size: 11.5px; }
.alert-type-row small { min-width: 34px; color: var(--muted); text-align: right; }

/* ───────────────────────── 业务页 ───────────────────────── */
.bulk-bar {
  position: sticky;
  top: 84px;
  z-index: 18;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
  padding: 9px 10px;
  border: 1px solid #c5daf6;
  border-radius: 10px;
  background: rgba(247, 251, 255, .97);
  box-shadow: 0 7px 20px rgba(23, 105, 224, .07);
  backdrop-filter: blur(10px);
}
.bulk-count { display: flex; min-width: 86px; align-items: baseline; gap: 5px; padding: 0 6px; }
.bulk-count b { color: var(--brand); font-size: 19px; }
.bulk-count span { color: var(--muted); font-size: 11px; font-weight: 500; }
.inline-more { position: relative; }
.inline-more > summary { list-style: none; }
.inline-more > summary::-webkit-details-marker { display: none; }
.inline-more-menu {
  position: absolute;
  top: 35px;
  right: 0;
  z-index: 40;
  display: grid;
  min-width: 150px;
  gap: 6px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(22, 38, 67, .15);
}
.inline-more.up .inline-more-menu { top: auto; bottom: 35px; }
.inline-more-menu .btn { width: 100%; justify-content: flex-start; }
.asset-table { min-width: max-content; }
.asset-table th:last-child, .asset-table td:last-child { position: sticky; right: 0; z-index: 1; background: #fff; box-shadow: -6px 0 12px rgba(29, 48, 77, .045); }
.asset-table th:last-child { z-index: 2; background: #f8fafc; }
.asset-table tbody tr:hover td:last-child { background: #f8fbff; }
.cell-host { max-width: 190px; }
.cell-host b, .cell-host .ell { display: block; overflow: hidden; max-width: 180px; text-overflow: ellipsis; }
.cell-status { width: 84px; }
.cell-os { max-width: 210px; }
.cell-os .ell { max-width: 200px; }
.cell-group { max-width: 96px; }
.ell { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.path-cell { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.software-exemptions > .card { margin: 12px 14px; box-shadow: none; }

.split { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 13px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.rule-list { display: flex; flex-direction: column; gap: 7px; }
.rule-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) 30px; gap: 7px; align-items: center; }
.rule-row .del { color: #98a5b6; cursor: pointer; text-align: center; }
.rule-row .del:hover { color: var(--danger); }

.wlh-list { max-height: 260px; overflow: auto; padding: 5px 7px; border: 1px solid var(--line); border-radius: 8px; }
.wlh-row { display: flex; align-items: center; gap: 9px; padding: 6px 4px; border-radius: 6px; cursor: pointer; font-size: 12.5px; }
.wlh-row:hover { background: #f5f8fc; }
.wlh-name { min-width: 180px; font-weight: 600; }

.kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px 12px; font-size: 12.5px; }
.kv .k { color: #344054; font-weight: 600; }
.tl { padding-left: 6px; }
.tl-item { display: flex; gap: 10px; padding: 7px 0; }
.tl-item + .tl-item { border-top: 1px solid var(--line-soft); }
.tl-dot { width: 8px; height: 8px; flex: 0 0 8px; margin-top: 6px; border-radius: 50%; background: var(--brand); }
.tl-dot.bad { background: var(--danger); }
.tl-dot.ok { background: var(--ok); }

.code {
  max-height: 380px;
  padding: 13px;
  overflow: auto;
  border-radius: 8px;
  color: #d8e2ef;
  background: #142033;
  font: 11.5px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre;
}

/* ───────────────────────── 弹窗与提示 ───────────────────────── */
.modal-mask {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(24, 37, 59, .38);
  backdrop-filter: blur(3px);
}
.modal {
  display: flex;
  width: min(760px, 96vw);
  max-height: 88vh;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 24px 64px rgba(17, 30, 52, .24);
  animation: pop .16s ease;
}
.modal.wide { width: min(1080px, 96vw); }
.modal-hd { display: flex; min-height: 55px; align-items: center; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.modal-hd h3 { margin: 0; color: var(--ink); font-size: 15px; }
.modal-hd .x { margin-left: auto; color: var(--muted); cursor: pointer; font-size: 20px; line-height: 1; }
.modal-hd .x:hover { color: var(--danger); }
.modal-bd { padding: 17px 18px; overflow: auto; }
.modal-ft { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); background: #fbfcfe; }
@keyframes pop { from { opacity: .65; transform: translateY(5px) scale(.995); } }
.toasts { position: fixed; z-index: 200; top: 16px; right: 18px; display: flex; flex-direction: column; gap: 7px; pointer-events: none; }
.toast {
  max-width: 420px;
  padding: 10px 13px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 9px;
  color: #fff;
  background: #233248;
  box-shadow: 0 10px 28px rgba(17, 30, 52, .2);
  font-size: 12.5px;
  pointer-events: auto;
  animation: slide .16s ease;
}
.toast.ok { background: #10754f; }
.toast.err { background: #b12836; }
@keyframes slide { from { opacity: 0; transform: translateX(8px); } }

/* ───────────────────────── 登录 ───────────────────────── */
.login-wrap {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr);
  background: #eef3f9;
}
.login-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: clamp(42px, 7vw, 92px);
  color: #1b3559;
  border-right: 1px solid #d9e4f1;
  background: #fafbfc;
}
.login-visual::before, .login-visual::after {
  position: absolute;
  border: 1px solid rgba(23,105,224,.09);
  border-radius: 50%;
  content: "";
}
.login-visual::before { right: -190px; bottom: -220px; width: 510px; height: 510px; }
.login-visual::after { right: -90px; bottom: -130px; width: 320px; height: 320px; }
.login-logo {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 23px;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 10px 26px rgba(23,105,224,.2);
  font-size: 22px;
  font-weight: 800;
}
.login-visual .eyebrow { color: var(--brand); }
.login-visual h1 { max-width: 650px; margin: 9px 0 14px; font-size: clamp(34px, 4vw, 54px); line-height: 1.13; letter-spacing: -.045em; }
.login-visual > p { max-width: 580px; margin: 0; color: #344054; font-size: 14px; line-height: 1.8; }
.login-points { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 25px; }
.login-points span { padding: 6px 9px; border: 1px solid #dce2ea; border-radius: 7px; color: #344054; background: #fff; font-size: 11px; font-weight: 500; }
.login-panel { display: grid; place-items: center; padding: 34px; background: #fff; }
.login { width: min(410px, 100%); padding: 31px; border: 1px solid #dfe6ef; border-radius: 15px; background: #fff; box-shadow: 0 20px 55px rgba(35, 58, 91, .1); }
.login h2 { margin: 5px 0 4px; color: var(--ink); font-size: 24px; letter-spacing: -.03em; }
.login p { margin: 0 0 21px; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.login-submit { width: 100%; min-height: 40px; margin-top: 3px; }
.login-hint { margin: 16px 0 0 !important; font-size: 10.5px !important; }

/* ───────────────────────── 工具类与页签细节 ───────────────────────── */
.ico { width: 18px; height: 18px; flex: 0 0 18px; opacity: .92; }
.muted { color: var(--muted); }
.small { font-size: 11.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.flex { display: flex; align-items: center; gap: 8px; }
.flex-wrap { flex-wrap: wrap; }
.grow { min-width: 0; flex: 1; }
.hidden { display: none !important; }
.mt0 { margin-top: 0; }
.mt8 { margin-top: 8px; }
.mt14 { margin-top: 14px; }
.mt20 { margin-top: 20px; }
.mb0 { margin-bottom: 0; }
.mb8 { margin-bottom: 8px; }
.mb14 { margin-bottom: 14px; }
.p14 { padding: 14px; }
.gap8 { gap: 8px; }

.btn:focus-visible, .icon-btn:focus-visible, .nav-item:focus-visible, .module:focus-visible,
.tab:focus-visible, .gtab:focus-visible, .chip:focus-visible {
  outline: 3px solid rgba(23, 105, 224, .16);
  outline-offset: 2px;
}

@media (max-width: 1280px) {
  .global-search-wrap { width: min(300px, 27vw); }
}

@media (max-width: 1080px) {
  .app { display: block; }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    width: 100%;
    height: auto;
    flex-wrap: wrap;
    align-items: center;
    padding: 9px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 5px 18px rgba(28, 48, 78, .05);
  }
  .brand { flex: 1 0 100%; padding: 0; }
  .brand .logo { width: 32px; height: 32px; flex-basis: 32px; border-radius: 8px; font-size: 14px; }
  .brand-copy b { font-size: 15px; }
  .side-health { display: none; }
  .nav-toggle {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    padding: 0 9px;
    border: 1px solid #dce4ee;
    border-radius: 7px;
    color: #40536c;
    background: #f8fafc;
    cursor: pointer;
    font-size: 11px;
  }
  .nav-toggle span { color: var(--muted); font-size: 10px; font-weight: 500; }
  .sidebar > .nav-section { display: none; flex: 1 0 100%; }
  .sidebar.nav-open > .nav-section {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px 7px;
    margin: 6px 0 0;
    padding-top: 7px;
    border-top: 1px solid var(--line-soft);
  }
  .sidebar.nav-open .nav-group {
    display: block;
    grid-column: 1 / -1;
    margin: 0;
    padding: 7px 4px 3px;
    color: var(--ink-2);
    font-size: 10px;
  }
  .sidebar.nav-open .nav-item { min-height: 33px; padding: 6px 8px; }
  .sidebar.nav-open .nav-item.active::before { top: 6px; bottom: 6px; left: -14px; }
  .sidebar-foot { display: none; }
  .topbar { top: 58px; padding: 10px 20px; }
  .content { padding: 21px 20px 52px; }
  .bulk-bar { top: 130px; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-visual { min-height: 330px; padding: 42px; }
  .login-visual h1 { font-size: 36px; }
  .login-panel { padding: 34px 20px 60px; }
}

@media (max-width: 820px) {
  .sidebar.nav-open > .nav-section { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { position: relative; top: auto; flex-wrap: wrap; gap: 9px; }
  .page-heading { flex: 1 1 100%; }
  .page-heading p { display: none; }
  .global-search-wrap { order: 3; width: 100%; }
  .topbar .right { margin-left: auto; }
  .user-chip > div:last-child { display: none; }
  .hero-panel { grid-template-columns: 1fr; gap: 18px; padding: 22px; }
  .hero-side { justify-content: flex-start; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-columns, .dashboard-columns.equal { grid-template-columns: 1fr; }
  .dashboard-columns .span-2 { grid-column: auto; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
  .split, .grid-2 { grid-template-columns: 1fr; }
  .readonly-notice { margin: 12px 20px 0; }
  .login-visual { min-height: 290px; padding: 32px 27px; }
  .login-visual h1 { font-size: 31px; }
}

@media (max-width: 560px) {
  .sidebar { padding: 8px 10px; }
  .sidebar.nav-open > .nav-section { grid-template-columns: 1fr 1fr; }
  .nav-item { font-size: 11.5px; }
  .nav-item .ico { display: none; }
  .topbar { padding: 10px 13px; }
  .global-search-wrap kbd { display: none; }
  .content { padding: 16px 13px 46px; }
  .hero-panel { min-height: 0; padding: 18px; }
  .hero-copy h2 { font-size: 24px; }
  .hero-actions .btn { flex: 1 1 120px; }
  .hero-side { gap: 15px; }
  .health-ring { width: 88px; height: 88px; }
  .health-ring::before { width: 70px; height: 70px; }
  .health-ring b { font-size: 20px; }
  .stat-grid { gap: 8px; }
  .stat { min-height: 96px; padding: 13px; }
  .stat .v { font-size: 24px; }
  .quick-module-grid { grid-template-columns: 1fr; gap: 7px; }
  .module { min-height: 62px; }
  .card-hd, .card-bd { padding-left: 13px; padding-right: 13px; }
  .toolbar > * { max-width: none !important; flex: 1 1 140px; }
  .toolbar > .tag-soft { flex-basis: 100%; white-space: normal; line-height: 1.55; overflow-wrap: anywhere; }
  .filter-bar > .search-field, .filter-bar > .btn { flex-basis: 100%; }
  .kv { grid-template-columns: 92px minmax(0, 1fr); }
  .kv > div:nth-child(even) { overflow-wrap: anywhere; }
  .wlh-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 2px 7px; padding: 7px 3px; }
  .wlh-row > input { grid-row: 1 / span 3; }
  .wlh-row .wlh-name { min-width: 0; grid-column: 2; }
  .wlh-row .mono { grid-column: 2; grid-row: 2; }
  .wlh-row .muted:not(.mono) { grid-column: 2; grid-row: 3; }
  .wlh-row .badge { grid-column: 3; grid-row: 1; }
  .input, .select, textarea.input { font-size: 16px; }
  .modal-mask { padding: 7px; }
  .modal, .modal.wide { width: 100%; max-height: 94vh; }
  .modal-ft { flex-wrap: wrap; }
  .modal-ft .btn { flex: 1 1 auto; }
  .toasts { right: 10px; left: 10px; }
  .toast { max-width: none; }
  .login-visual { display: none; }
  .login-panel { min-height: 100vh; padding: 18px; }
  .login { padding: 25px 21px; }
}

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