/* ============================================================
 * ServiceHot ITSM 功能演示 · 视觉样式
 * 纯前端演示，无第三方依赖
 * ============================================================ */

:root {
  --primary: #2f6fed;
  --primary-dark: #1d5bd8;
  --primary-soft: #eef4ff;
  --teal: #12b8a6;
  --teal-soft: #e8faf7;
  --orange: #f59e0b;
  --orange-soft: #fff7e6;
  --red: #ef4444;
  --red-soft: #fdeeee;
  --purple: #8b5cf6;
  --purple-soft: #f3eeff;
  --green: #10b981;
  --green-soft: #e9f9f2;
  --ink: #0f172a;
  --text: #263244;
  --muted: #6b7a90;
  --line: #e4eaf3;
  --line-strong: #d3dceb;
  --bg: #f4f7fb;
  --sidebar: #0d1424;
  --sidebar-soft: #162136;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 2px 6px rgba(15, 23, 42, .04), 0 10px 28px rgba(15, 23, 42, .05);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, .22);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body.modal-open { overflow: hidden; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
svg { display: block; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #cbd6e6; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

.icon { width: 18px; height: 18px; flex: none; }
.mono { font-family: "SFMono-Regular", Consolas, "Courier New", monospace; font-size: .92em; letter-spacing: -.2px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.clamp-1 { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================================================
 * 布局：侧边栏 / 顶栏 / 内容
 * ============================================================ */

#app { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 244px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0f1830 0%, #0b1222 100%);
  color: #c9d5e8;
  z-index: 40;
  border-right: 1px solid rgba(255, 255, 255, .04);
}

.sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(420px 220px at 10% 0%, rgba(47, 111, 237, .22), transparent 70%);
}

.brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 20px 18px 18px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 19px;
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #12b8a6);
  box-shadow: 0 8px 18px rgba(47, 111, 237, .35);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 15.5px; color: #fff; letter-spacing: .2px; font-weight: 700; }
.brand-text strong i { font-style: normal; color: #6ee7d8; }
.brand-text span { font-size: 11px; color: #7f8ea8; margin-top: 3px; }

.nav {
  position: relative;
  z-index: 1;
  flex: 1;
  overflow-y: auto;
  padding: 6px 12px 18px;
}
.nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14); }

.nav-group { margin-top: 14px; }
.nav-group:first-child { margin-top: 0; }

.nav-title {
  font-size: 10.5px;
  letter-spacing: 1.2px;
  color: #64748b;
  padding: 0 10px 6px;
  font-weight: 600;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  margin-bottom: 2px;
  border-radius: 9px;
  color: #b8c4d8;
  font-size: 13.5px;
  transition: background .16s, color .16s;
}
.nav-item .icon { width: 17px; height: 17px; opacity: .9; }
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(47, 111, 237, .32), rgba(47, 111, 237, .1));
  color: #fff;
  font-weight: 600;
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #5b9bff;
}
.nav-item.active .icon { color: #7db1ff; opacity: 1; }
.nav-label { flex: 1; }

.nav-badge {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 700;
  min-width: 19px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(47, 111, 237, .28);
  color: #a9cbff;
}
.nav-badge.alert { background: rgba(239, 68, 68, .22); color: #fca5a5; }

.sidebar-foot {
  position: relative;
  z-index: 1;
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, .06);
}

.tenant {
  display: flex;
  align-items: center;
  gap: 9px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 9px;
  padding: 9px 10px;
}
.tenant .icon:first-child { color: #7db1ff; }
.tenant > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tenant b { font-size: 12.5px; color: #e8eefb; font-weight: 600; }
.tenant span { font-size: 10.5px; color: #7f8ea8; }
.tenant .chev { width: 14px; height: 14px; color: #64748b; }

.foot-note {
  font-size: 10.5px;
  color: #64748b;
  text-align: center;
  margin-top: 10px;
}

.main {
  margin-left: 244px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 62px;
  padding: 0 24px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}

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

.crumb {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
}
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--primary); }
.crumb .icon { width: 13px; height: 13px; opacity: .55; }
.crumb span { color: var(--text); font-weight: 600; }

.global-search {
  position: relative;
  margin-left: auto;
  width: 330px;
  max-width: 34vw;
}
.global-search > .icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #94a3b8;
  pointer-events: none;
}
.global-search input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 34px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #f7f9fd;
  font-size: 12.5px;
  color: var(--text);
  outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.global-search input::placeholder { color: #9aa8bd; }
.global-search input:focus {
  background: #fff;
  border-color: #b9cdf5;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, .1);
}

.search-panel {
  position: absolute;
  top: 44px;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  max-height: 370px;
  overflow-y: auto;
  z-index: 60;
}

.search-result {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  text-align: left;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
}
.search-result:hover { background: #f4f7fd; }
.search-result > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.search-result b { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result span { font-size: 11px; color: var(--muted); }
.search-result .icon { width: 14px; height: 14px; color: #b6c2d4; }

.search-empty {
  padding: 18px 12px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 9px;
}

.learn-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}
.learn-toggle:hover { border-color: #c8d6ee; color: var(--text); }
.learn-toggle.on { background: var(--primary-soft); border-color: #c9dcff; color: #1d5bd8; }
.learn-toggle .switch {
  width: 28px;
  height: 16px;
  border-radius: 10px;
  background: #d6dfee;
  position: relative;
  transition: background .18s;
}
.learn-toggle .switch i {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  transition: transform .18s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
}
.learn-toggle.on .switch { background: var(--primary); }
.learn-toggle.on .switch i { transform: translateX(12px); }

.icon-btn {
  position: relative;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: #55647a;
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: #f2f6fd; color: var(--primary); }
.icon-btn .icon { width: 18px; height: 18px; }

.bell-dot {
  position: absolute;
  top: 2px;
  right: 1px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  font-size: 9.5px;
  font-style: normal;
  font-weight: 700;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 4px 4px;
  border-radius: 9px;
  cursor: pointer;
  transition: background .15s;
}
.user-chip:hover { background: #f4f7fd; }
.user-chip > div { display: flex; flex-direction: column; line-height: 1.2; }
.user-chip b { font-size: 12.5px; font-weight: 600; }
.user-chip span { font-size: 10.5px; color: var(--muted); }
.user-chip > .icon { width: 13px; height: 13px; color: #94a3b8; }

.avatar {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 600;
  flex: none;
  overflow: hidden;
  vertical-align: middle;
  user-select: none;
}
.avatar-xs { width: 20px; height: 20px; font-size: 10px; }
.avatar-sm { width: 30px; height: 30px; font-size: 12px; }
.avatar-lg { width: 44px; height: 44px; font-size: 16px; }

.content {
  flex: 1;
  width: 100%;
  max-width: 1540px;
  margin: 0 auto;
  padding: 22px 26px 34px;
}

.app-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 26px 22px;
  font-size: 11px;
  color: #93a0b4;
}

/* ============================================================
 * 按钮
 * ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .1s;
}
.btn .icon { width: 15px; height: 15px; }
.btn:hover { border-color: #bcc9dd; background: #fafcff; }
.btn:active { transform: translateY(1px); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 7px; }
.btn-sm .icon { width: 14px; height: 14px; }
.btn-xs { height: 26px; padding: 0 9px; font-size: 11.5px; border-radius: 6px; }
.btn-xs .icon { width: 12px; height: 12px; }

.btn-primary {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 4px 12px rgba(37, 99, 235, .22);
}
.btn-primary:hover { background: linear-gradient(135deg, #2f76ee, #1d4fd7); border-color: transparent; }

.btn-ghost { background: #fff; border-color: var(--line-strong); color: #46566d; }
.btn-ghost:hover { color: var(--primary); border-color: #b9cdf5; background: #f7faff; }

.btn-danger { background: var(--red); border-color: transparent; color: #fff; }
.btn-danger:hover { background: #dc2626; border-color: transparent; }

.btn-danger-ghost { background: #fff; border-color: #f7c7c7; color: #d33; }
.btn-danger-ghost:hover { background: var(--red-soft); border-color: #f0a9a9; }

.text-btn {
  border: 0;
  background: none;
  padding: 0;
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 500;
}
.text-btn:hover { text-decoration: underline; }

.text-link { color: var(--primary); font-size: 12.5px; }
.text-link:hover { text-decoration: underline; }

/* ============================================================
 * 徽章 / 标签 / 芯片
 * ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 21px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: .1px;
}
.badge-blue { background: var(--primary-soft); color: #1e5bd6; }
.badge-green { background: var(--green-soft); color: #0b8a63; }
.badge-teal { background: var(--teal-soft); color: #0d8f82; }
.badge-orange { background: var(--orange-soft); color: #b5760a; }
.badge-red { background: var(--red-soft); color: #c92a2a; }
.badge-purple { background: var(--purple-soft); color: #7143d8; }
.badge-gray { background: #f1f4f9; color: #607086; }
.badge-dark { background: #202b3d; color: #dbe4f3; }
.badge-priority { font-weight: 700; letter-spacing: .4px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #f1f5fb;
  color: #51627a;
  font-size: 11.5px;
  border: 1px solid #e6edf7;
}
.chip .icon { width: 12px; height: 12px; }

.count-chip {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  border-radius: 9px;
  background: #eef3fb;
  color: #51627a;
  font-size: 10.5px;
  font-weight: 700;
}

.type-tag {
  font-size: 11px;
  color: var(--muted);
  background: #f4f7fc;
  border-radius: 5px;
  padding: 2px 6px;
}

.ci-chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.ci-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fbfdff;
  color: var(--text);
  text-align: left;
  transition: border-color .15s, box-shadow .15s;
}
.ci-chip:hover { border-color: #bcd0f2; box-shadow: var(--shadow-sm); }
.ci-chip .icon { color: var(--primary); width: 17px; height: 17px; }
.ci-chip > div { display: flex; flex-direction: column; line-height: 1.3; }
.ci-chip b { font-size: 12px; font-weight: 600; }
.ci-chip em { font-size: 10.5px; color: var(--muted); font-style: normal; }

/* ============================================================
 * 页面头部 / 学习提示 / 卡片
 * ============================================================ */

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.page-head-text h1 { font-size: 21px; font-weight: 700; color: var(--ink); letter-spacing: -.2px; }
.page-head-text p { font-size: 12.5px; color: var(--muted); margin-top: 5px; max-width: 900px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.learn-note {
  display: flex;
  gap: 11px;
  padding: 12px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fffaf0, #fffdf8);
  border: 1px solid #f6e3bd;
  margin-bottom: 16px;
}
.learn-note-icon {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #fff1d6;
  color: #b5760a;
}
.learn-note-icon .icon { width: 16px; height: 16px; }
.learn-note-body b { display: block; font-size: 12.5px; color: #8a5a06; font-weight: 700; margin-bottom: 3px; }
.learn-note-body div { font-size: 12.5px; color: #6b5735; line-height: 1.65; }
.learn-note-body b + div b { display: inline; color: #8a5a06; }
.learn-off .learn-note { display: none; }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  min-width: 0;
  overflow: hidden;
}
.card + .card { margin-top: 16px; }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid #f0f4fa;
}
.card-title { font-size: 13.5px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 7px; }
.card-extra { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.card-body { padding: 16px; }
.card.no-pad .card-body { padding: 0; }
.card.no-pad .card-body > p,
.card.no-pad .card-body > .hint-text { padding: 0 16px 14px; }
.card.no-pad .card-body > .risk-item:first-child,
.card.no-pad .card-body > .notice-item:first-child,
.card.no-pad .card-body > .announce-item:first-child { margin-top: 0; }
.card.no-pad .card-body > .card-foot-link { padding: 11px 16px; }

.card-foot-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-top: 1px solid #f0f4fa;
  color: var(--primary);
  font-size: 12px;
  padding: 10px 0 10px;
  margin-top: 12px;
}
.card-foot-link .icon { width: 13px; height: 13px; }
a.card-foot-link:hover { background: #f8fbff; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.split-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; }
.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.config-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

.hint-text { display: flex; align-items: flex-start; gap: 6px; font-size: 12px; color: var(--muted); padding-top: 10px; }
.hint-text .icon { width: 14px; height: 14px; margin-top: 1px; color: #9aabc1; }

.text-block { font-size: 12.5px; color: #46566d; line-height: 1.7; }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 30px 16px;
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
}
.empty-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f2f6fd;
  color: #a6b6cd;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
}
.empty b { color: #51627a; font-size: 13px; }
.empty span { font-size: 11.5px; }

/* ============================================================
 * KPI 与统计卡
 * ============================================================ */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.kpi-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi-grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}
.stat-icon {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 10px;
  display: grid;
  place-items: center;
}
.stat-icon .icon { width: 19px; height: 19px; }
.stat-text { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.stat-text > span { font-size: 11.5px; color: var(--muted); }
.stat-text strong { font-size: 22px; font-weight: 700; color: var(--ink); letter-spacing: -.4px; margin-top: 2px; }
.stat-text em { font-style: normal; font-size: 10.5px; color: #8b99ad; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tone-blue { background: var(--primary-soft); color: var(--primary); }
.tone-teal { background: var(--teal-soft); color: #0d9488; }
.tone-green { background: var(--green-soft); color: #0b8a63; }
.tone-orange { background: var(--orange-soft); color: #b5760a; }
.tone-red { background: var(--red-soft); color: var(--red); }
.tone-purple { background: var(--purple-soft); color: var(--purple); }
.tone-gray { background: #f1f4f9; color: #607086; }

.progress {
  height: 6px;
  border-radius: 4px;
  background: #edf1f8;
  overflow: hidden;
  margin-top: 7px;
}
.progress i { display: block; height: 100%; border-radius: 4px; transition: width .3s; }

.approval-mini { display: flex; align-items: center; gap: 6px; min-width: 76px; }
.approval-mini .progress { margin-top: 0; flex: 1; min-width: 40px; }
.approval-mini > span { font-size: 11px; font-weight: 600; color: #51627a; white-space: nowrap; }
.tone-bg-blue { background: var(--primary); }
.tone-bg-teal { background: var(--teal); }
.tone-bg-green { background: var(--green); }
.tone-bg-orange { background: var(--orange); }
.tone-bg-red { background: var(--red); }
.tone-bg-purple { background: var(--purple); }
.tone-bg-gray { background: #94a3b8; }

/* ============================================================
 * 工作台
 * ============================================================ */

.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}
.dash-left > .card + .card, .dash-right > .card + .card { margin-top: 16px; }
.dash-right { display: flex; flex-direction: column; }
.dash-right > .card { margin-top: 0; }
.dash-right > .card + .card { margin-top: 16px; }

.chart-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 11.5px;
  color: #51627a;
  margin-bottom: 6px;
}
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.chart-legend i { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }

.chart { width: 100%; height: auto; }
.chart-grid { stroke: #eef2f8; stroke-width: 1; }
.chart-axis { font-size: 10px; fill: #93a2b8; font-family: inherit; }
.chart-line { overflow: visible; }

.chart-foot-note { font-size: 11px; color: var(--muted); margin-top: 6px; }

.risk-item {
  padding: 11px 16px;
  border-bottom: 1px solid #f2f5fa;
}
.risk-item:last-child { border-bottom: 0; }
.risk-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.risk-title { font-size: 12.5px; font-weight: 600; color: var(--text); }
.risk-title:hover { color: var(--primary); }
.risk-meta { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); margin-top: 3px; }

.duty-now { padding: 14px 16px 6px; }
.duty-date { display: flex; align-items: baseline; gap: 8px; margin-bottom: 9px; }
.duty-date b { font-size: 16px; color: var(--ink); }
.duty-date span { font-size: 11.5px; color: var(--muted); }
.duty-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px dashed #eef2f9;
  font-size: 12px;
}
.duty-line:last-child { border-bottom: 0; }
.duty-line > span { color: var(--muted); font-size: 11.5px; }
.duty-line b { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; font-size: 12px; }

.notice-item { padding: 12px 16px; border-bottom: 1px solid #f2f5fa; }
.notice-item:last-of-type { border-bottom: 0; }
.notice-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; }
.notice-head > span { font-size: 10.5px; color: var(--muted); }
.notice-item > b { font-size: 12.5px; font-weight: 600; display: block; }
.notice-item > p { font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.6; }

.value-chain { display: flex; align-items: stretch; gap: 6px; flex-wrap: wrap; }
.chain-item {
  flex: 1;
  min-width: 108px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 8px;
  border-radius: 9px;
  background: #f8fbff;
  border: 1px solid #e9f0fa;
  text-align: center;
  color: var(--text);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.chain-item:hover { border-color: #b9cdf5; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.chain-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid #e6eefb;
  color: var(--primary);
  margin-bottom: 3px;
}
.chain-icon .icon { width: 15px; height: 15px; }
.chain-item b { font-size: 12px; font-weight: 600; }
.chain-item em { font-style: normal; font-size: 10.5px; color: var(--muted); }
.chain-arrow { display: grid; place-items: center; color: #b6c4d8; }
.chain-arrow .icon { width: 14px; height: 14px; }
.chain-tip { font-size: 11.5px; color: var(--muted); margin-top: 12px; }
.chain-card .card-body { padding: 16px; }

/* ============================================================
 * 工单 / 表格
 * ============================================================ */

.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }

.mini-search {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.mini-search .icon {
  position: absolute;
  left: 9px;
  width: 14px;
  height: 14px;
  color: #9aabc1;
  pointer-events: none;
}
.mini-search input {
  height: 32px;
  width: 220px;
  padding: 0 10px 0 29px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
  color: var(--text);
  outline: none;
}
.mini-search input:focus { border-color: #b9cdf5; box-shadow: 0 0 0 3px rgba(47, 111, 237, .09); }

.select-sm, .input.select-sm {
  height: 32px;
  padding: 0 26px 0 10px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 12px;
  outline: none;
}

.tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
  overflow-x: auto;
}
.tab {
  position: relative;
  border: 0;
  background: none;
  padding: 7px 11px 10px;
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.tab em {
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  background: #f0f4fa;
  color: #66768c;
  padding: 1px 5px;
  border-radius: 7px;
}
.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); font-weight: 600; }
.tab.active::after {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
}
.tab.active em { background: var(--primary-soft); color: var(--primary); }

.table-wrap { width: 100%; overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.data-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: #7b8aa0;
  background: #f8fafd;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  letter-spacing: .2px;
}
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5fa;
  vertical-align: middle;
  color: #405066;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table.compact th { padding: 8px 12px; }
.data-table.compact td { padding: 8px 12px; }

.clickable-row { cursor: pointer; transition: background .12s; }
.clickable-row:hover { background: #f7faff; }

.row-title {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #24344a;
  line-height: 1.45;
  max-width: 380px;
}
.row-sub {
  display: block;
  font-style: normal;
  font-size: 10.5px;
  color: #8b99ad;
  margin-top: 2px;
}
.id-link { color: var(--primary); font-weight: 600; font-size: 11.5px; }
.person { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; white-space: nowrap; }

.table-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid #f1f5fa;
  font-size: 11.5px;
  color: var(--muted);
}

.sla-mini { display: flex; flex-direction: column; gap: 4px; min-width: 120px; }
.sla-mini .progress { margin-top: 0; height: 4px; }
.sla-remain { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: #51627a; white-space: nowrap; }
.sla-remain .icon { width: 13px; height: 13px; color: #9aabc1; }

.impact-cell { letter-spacing: 1px; font-size: 11px; color: #66768c; }

/* ============================================================
 * 详情页
 * ============================================================ */

.detail-banner {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border-radius: var(--radius);
  background: linear-gradient(120deg, #ffffff 0%, #f7faff 55%, #eef5ff 100%);
  border: 1px solid #dfe9f8;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}
.detail-banner-main { flex: 1; min-width: 0; }
.detail-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.detail-banner h2 { font-size: 18px; font-weight: 700; color: var(--ink); line-height: 1.4; }
.detail-banner-main > p { font-size: 12.5px; color: #5a6a80; margin-top: 6px; line-height: 1.7; }
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--muted);
}
.detail-meta span { display: inline-flex; align-items: center; gap: 5px; }
.detail-meta .icon { width: 13px; height: 13px; color: #93a4bb; }
.detail-banner-side {
  flex: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-width: 210px;
}

.ticket-banner .detail-banner-side { min-width: 260px; }

.sla-side { min-width: 280px; }
.sla-block {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 11px;
  min-width: 0;
}
.sla-block.good { border-color: #c9f0e3; background: #fbfffd; }
.sla-block.bad { border-color: #f7cccc; background: #fffbfb; }
.sla-block-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 3px; }
.sla-block-head > span { font-size: 10.5px; color: var(--muted); }
.sla-block > b { font-size: 15px; color: var(--ink); display: block; }
.sla-block > em { font-style: normal; font-size: 10.5px; color: #8b99ad; }

.approval-ring {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 6px solid #e8f0fd;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff;
  margin: 0 auto;
}
.approval-ring b { font-size: 18px; color: var(--ink); line-height: 1.1; }
.approval-ring span { font-size: 10px; color: var(--muted); }

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: 16px;
}
.detail-main, .detail-side { min-width: 0; }
.detail-side, .split-side { align-self: start; }
.detail-main > .card + .card, .detail-main > .grid-2 + .card { margin-top: 16px; }
.detail-side > .card + .card { margin-top: 16px; }
.detail-main > .grid-2 { margin-top: 16px; }
.detail-main > .grid-2 .card + .card { margin-top: 0; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
}
.info-grid > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.info-grid span { font-size: 10.5px; color: var(--muted); }
.info-grid b { font-size: 12.5px; font-weight: 600; color: #2d3d53; word-break: break-word; }

.attr-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
}
.attr-grid > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px dashed #eef2f9;
  font-size: 12px;
}
.attr-grid span { color: var(--muted); font-size: 11.5px; }
.attr-grid b { font-weight: 600; color: #34445a; text-align: right; }

.quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.quick-actions .btn { width: 100%; }
.quick-actions .btn .icon { flex: none; }

.timeline { position: relative; padding-left: 18px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 4px;
  width: 2px;
  background: #e8eef8;
  border-radius: 2px;
}
.timeline-item { position: relative; padding-bottom: 14px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -18px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid #a9c4f2;
  box-shadow: 0 0 0 3px #fff;
}
.timeline-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.timeline-head b { font-size: 12.5px; font-weight: 600; color: #2d3d53; }
.timeline-head span { font-size: 10.5px; color: #93a2b8; white-space: nowrap; }
.timeline-content p { font-size: 11.5px; color: var(--muted); margin-top: 2px; line-height: 1.6; }
.timeline-meta { font-size: 10.5px; color: #93a2b8; margin-top: 3px; }
.timeline.compact { padding-left: 15px; }
.timeline.compact .timeline-item { padding-bottom: 11px; }
.timeline.compact .timeline-dot { left: -15px; width: 10px; height: 10px; }

.approval-flow {
  display: flex;
  align-items: flex-start;
  gap: 0;
  flex-wrap: wrap;
}
.approval-node {
  flex: 1;
  min-width: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  padding: 0 4px;
}
.approval-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f1f4f9;
  color: #93a2b8;
  display: grid;
  place-items: center;
  border: 2px solid #e6ecf5;
}
.approval-icon .icon { width: 14px; height: 14px; }
.approval-node.approved .approval-icon { background: var(--green-soft); border-color: #bfeedd; color: #0b8a63; }
.approval-node.rejected .approval-icon { background: var(--red-soft); border-color: #f6c9c9; color: var(--red); }
.approval-node.pending .approval-icon { background: var(--orange-soft); border-color: #fae4b9; color: #b5760a; }
.approval-text b { display: block; font-size: 11.5px; font-weight: 600; color: #2d3d53; }
.approval-text span { display: block; font-size: 10px; color: var(--muted); }
.approval-connector {
  flex: 0 0 24px;
  height: 2px;
  background: #e3ebf6;
  margin-top: 15px;
  border-radius: 2px;
}
.approval-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.approval-preview {
  background: #f8fbff;
  border: 1px dashed #cfe0f7;
  border-radius: 9px;
  padding: 10px 12px;
  margin-bottom: 14px;
}
.approval-preview > b { font-size: 12px; color: #3a5578; display: flex; align-items: center; gap: 5px; }
.approval-preview > b .icon { width: 14px; height: 14px; }
.approval-preview > em { font-style: normal; font-size: 11px; color: var(--muted); display: block; margin-top: 6px; }
.flow-inline { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.flow-inline span {
  font-size: 11px;
  background: #fff;
  border: 1px solid #dbe7f8;
  padding: 3px 8px;
  border-radius: 6px;
  color: #41618c;
}
.flow-inline .icon { width: 12px; height: 12px; color: #a8b9d1; }

.solution-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 11.5px; color: var(--muted); margin-top: 10px; }

.impact-list { display: flex; flex-direction: column; gap: 8px; }
.impact-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  background: #fdf9f9;
  border: 1px solid #f7e2e2;
  border-radius: 8px;
}
.impact-item > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.impact-item b { font-size: 12px; font-weight: 600; }
.impact-item em { font-style: normal; font-size: 10.5px; color: var(--muted); }
.impact-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); flex: none; }

.impact-box {
  padding: 10px 12px;
  border-radius: 9px;
  background: #f9fbff;
  border: 1px solid #e7effb;
}
.impact-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.impact-chip {
  font-size: 11.5px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #dbe7f8;
  color: #3a5578;
}

.rel-list { display: flex; flex-direction: column; gap: 6px; }
.rel-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 7px;
  background: #f8fafd;
  color: var(--text);
  font-size: 12px;
}
.rel-item:hover { background: #f1f6fe; }
.rel-item span { font-size: 10.5px; color: var(--primary); font-weight: 600; white-space: nowrap; }
.rel-item b { font-weight: 500; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.step-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.step-list li { display: flex; gap: 9px; align-items: flex-start; }
.step-list li > span {
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.step-list li > p { font-size: 12.5px; color: #46566d; line-height: 1.55; padding-top: 1px; }

.why-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.why-list li { display: flex; gap: 9px; align-items: flex-start; }
.why-list li > span {
  flex: none;
  font-size: 10px;
  font-weight: 700;
  color: #7143d8;
  background: var(--purple-soft);
  border-radius: 5px;
  padding: 2px 6px;
  margin-top: 1px;
}
.why-list li > div { display: flex; flex-direction: column; gap: 1px; }
.why-list em { font-style: normal; font-size: 11px; color: var(--muted); }
.why-list b { font-size: 12px; font-weight: 600; color: #34445a; }

.check-list { display: flex; flex-direction: column; gap: 6px; }
.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #46566d;
  cursor: pointer;
  padding: 3px 0;
}
.check-row input { accent-color: var(--primary); width: 15px; height: 15px; }

.stars { display: inline-flex; gap: 1px; }
.stars i { font-style: normal; color: #dfe6f0; font-size: 15px; line-height: 1; }
.stars i.on { color: #f5b301; }
.sat-result { display: flex; align-items: center; gap: 9px; }
.sat-result b { font-size: 17px; color: var(--ink); }
.sat-comment { font-size: 12px; color: #51627a; margin-top: 6px; line-height: 1.6; }
.sat-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sat-score { display: flex; align-items: baseline; gap: 8px; }
.sat-score b { font-size: 28px; color: var(--ink); line-height: 1; }
.sat-score span { font-size: 11.5px; color: var(--muted); }
.sat-bars { display: flex; flex-direction: column; gap: 6px; }
.sat-row { display: flex; align-items: center; gap: 8px; font-size: 11.5px; }
.sat-row > span { width: 34px; color: var(--muted); flex: none; }
.sat-row .hbar-track { flex: 1; margin: 0; }
.sat-row > b { width: 22px; text-align: right; font-size: 11px; color: #51627a; }
.sat-callout {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  font-size: 11.5px;
  color: #8a6a20;
  background: #fffbf0;
  border: 1px solid #f7e8c4;
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 12px;
  line-height: 1.6;
}
.sat-callout .icon { width: 14px; height: 14px; margin-top: 1px; color: #d9a21a; }

.rating { display: flex; align-items: center; gap: 6px; }

/* ============================================================
 * 优先级矩阵
 * ============================================================ */

.pm-wrap { display: flex; flex-direction: column; gap: 12px; }
.pm-table { width: 100%; border-collapse: separate; border-spacing: 4px; font-size: 12px; }
.pm-table th {
  font-weight: 600;
  color: #66768c;
  font-size: 11px;
  padding: 4px;
  text-align: center;
}
.pm-table tbody th { text-align: left; white-space: nowrap; font-weight: 500; }
.pm-table td {
  text-align: center;
  font-weight: 700;
  font-size: 12px;
  padding: 8px 4px;
  border-radius: 6px;
  cursor: default;
}
.pm-table td.p-p1 { background: #fdeaea; color: #c92a2a; }
.pm-table td.p-p2 { background: #fff4e0; color: #b5760a; }
.pm-table td.p-p3 { background: #eef4ff; color: #1e5bd6; }
.pm-table td.p-p4 { background: #f3f6fa; color: #607086; }
.pm-table td.sel { outline: 2px solid #1f2937; outline-offset: -1px; box-shadow: 0 0 0 3px rgba(47, 111, 237, .12); }

.pm-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #f8fbff;
  border: 1px solid #e6effc;
  border-radius: 9px;
  padding: 9px 11px;
}
.pm-result > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pm-result > div > span { font-size: 11px; color: var(--muted); }
.pm-result em { font-style: normal; font-size: 11px; color: #51627a; }
.pm-sla { gap: 10px !important; }
.pm-sla span { font-size: 11px; color: #51627a; background: #fff; border: 1px solid #e3ecf9; border-radius: 6px; padding: 2px 7px; }

.priority-preview {
  background: #f8fbff;
  border: 1px solid #e6effc;
  border-radius: 9px;
  padding: 9px 11px;
  margin-bottom: 12px;
  font-size: 11.5px;
  color: #51627a;
}
.assign-preview { font-size: 12px; min-height: 36px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ============================================================
 * CMDB 拓扑
 * ============================================================ */

.topo-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 262px;
  gap: 16px;
}
.topo-canvas {
  background:
    linear-gradient(#f8fbff, #f8fbff) padding-box,
    repeating-linear-gradient(0deg, #eef3fa 0 1px, transparent 1px 26px),
    repeating-linear-gradient(90deg, #eef3fa 0 1px, transparent 1px 26px);
  background-color: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.topo-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 13px;
  background: rgba(255, 255, 255, .9);
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
}
.topo-legend { display: flex; flex-wrap: wrap; gap: 9px; font-size: 10.5px; color: var(--muted); }
.topo-legend span { display: inline-flex; align-items: center; gap: 4px; }
.topo-legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }

.topology { width: 100%; height: auto; padding: 6px; }
.topo-edge { fill: none; stroke: #c3d1e3; stroke-width: 1.4; }
.topo-node { cursor: pointer; }
.topo-node-bg {
  fill: #fff;
  stroke: #d6e2f2;
  stroke-width: 1.3;
  filter: drop-shadow(0 2px 4px rgba(15, 23, 42, .07));
  transition: filter .15s, stroke-width .15s;
}
.topo-node:hover .topo-node-bg {
  stroke-width: 2;
  filter: drop-shadow(0 6px 14px rgba(47, 111, 237, .24));
}
.topo-name { font-size: 12px; font-weight: 700; fill: #253650; font-family: inherit; }
.topo-type { font-size: 9.5px; fill: #8796ab; font-family: inherit; }

.topo-side {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
  align-self: start;
}
.topo-side h4 { font-size: 13px; color: var(--ink); margin-bottom: 5px; }
.topo-side p + .topo-tip { margin-top: 10px; }
.topo-tip {
  background: #f8fbff;
  border: 1px solid #e6effc;
  border-radius: 8px;
  padding: 10px;
  font-size: 11.5px;
  color: #51627a;
}
.topo-tip b { display: block; font-size: 11.5px; color: #1e5bd6; margin-bottom: 3px; }
.topo-tip p { line-height: 1.65; }
.topo-stats { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.topo-stats > div {
  flex: 1;
  min-width: 70px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  text-align: center;
}
.topo-stats b { display: block; font-size: 16px; color: var(--ink); }
.topo-stats span { font-size: 10px; color: var(--muted); }

/* ============================================================
 * 服务目录 / 知识库 / 客户
 * ============================================================ */

.catalog-grid { display: flex; flex-direction: column; gap: 18px; }
.catalog-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.catalog-group > h4 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 9px;
  padding-left: 2px;
}
.catalog-group > h4::before {
  content: "";
  width: 3px;
  height: 13px;
  border-radius: 2px;
  background: var(--primary);
}

.catalog-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px;
  text-align: left;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.catalog-card:hover { border-color: #c3d6f4; box-shadow: var(--shadow); transform: translateY(-1px); }
.catalog-card-top { display: flex; align-items: flex-start; gap: 10px; }
.catalog-icon {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
}
.catalog-icon .icon { width: 17px; height: 17px; }
.catalog-info { flex: 1; min-width: 0; }
.catalog-info b { display: block; font-size: 12.5px; font-weight: 600; color: #24344a; }
.catalog-info p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 1px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.catalog-meta { display: flex; flex-wrap: wrap; gap: 5px 8px; font-size: 10.5px; color: var(--muted); margin-top: 4px; }
.catalog-meta span { display: inline-flex; align-items: center; gap: 3px; }
.catalog-meta .icon { width: 11px; height: 11px; }
.catalog-arrow { display: flex; align-items: center; color: #b6c4d8; flex: none; }
.catalog-card:hover .catalog-arrow { color: var(--primary); }
.catalog-request-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.catalog-request-head .catalog-icon { width: 40px; height: 40px; }
.catalog-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pick-item {
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  transition: border-color .15s, background .15s;
}
.pick-item:hover { border-color: #b9cdf5; background: #f8fbff; }
.pick-item.active { border-color: var(--primary); background: var(--primary-soft); }
.pick-item .icon { color: var(--primary); width: 17px; height: 17px; }
.pick-item b { display: block; font-size: 12px; font-weight: 600; }
.pick-item span { display: block; font-size: 10.5px; color: var(--muted); }

.kb-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.kb-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.kb-card:hover { border-color: #c3d6f4; box-shadow: var(--shadow); transform: translateY(-1px); }
.kb-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kb-cat { font-size: 10.5px; color: #0d8f82; background: var(--teal-soft); padding: 2px 6px; border-radius: 5px; }
.kb-date { font-size: 10.5px; color: var(--muted); }
.kb-card > b { font-size: 13px; font-weight: 600; color: #24344a; line-height: 1.45; }
.kb-card > p { font-size: 11.5px; color: var(--muted); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kb-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 10.5px; color: var(--muted); margin-top: auto; }
.kb-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.kb-tags span { font-size: 10px; color: #607086; background: #f2f5fa; border-radius: 4px; padding: 1px 5px; }

.kb-article { font-size: 13px; color: #405066; line-height: 1.85; }
.kb-article h4 { font-size: 13px; color: var(--ink); margin: 12px 0 4px; }
.kb-article p + p { margin-top: 8px; }
.kb-article ol, .kb-article ul { padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.kb-article-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11px; color: var(--muted); margin-bottom: 10px; }
.kb-article-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #f0f4fa;
  font-size: 11.5px;
  color: var(--muted);
}
.kb-content { font-size: 12.5px; color: #46566d; line-height: 1.8; }

.kb-mini {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  margin-bottom: 7px;
  background: #fbfdff;
}
.kb-mini b { display: block; font-size: 12px; font-weight: 600; color: #2d3d53; }
.kb-mini span { font-size: 10.5px; color: var(--muted); }

.kb-suggest { margin: -4px 0 12px; }
.kb-suggest-label { font-size: 10.5px; color: #b5760a; margin-bottom: 5px; display: block; }
.kb-suggest-item {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  text-align: left;
  padding: 6px 8px;
  border: 1px solid #f3e6c8;
  background: #fffcf5;
  border-radius: 6px;
  font-size: 11.5px;
  color: #8a6a20;
  margin-bottom: 4px;
}
.kb-suggest-item:hover { background: #fff7e6; }
.kb-suggest-item .icon { width: 12px; height: 12px; }

.user-profile { display: flex; align-items: center; gap: 11px; }
.user-profile > div { display: flex; flex-direction: column; }
.user-profile b { font-size: 13px; color: var(--ink); }
.user-profile span { font-size: 11px; color: var(--muted); }

.known-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.known-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  margin-bottom: 7px;
  background: #fbfdff;
}
.known-item b { font-size: 12px; display: block; color: #2d3d53; }
.known-item p { font-size: 11px; color: var(--muted); margin-top: 2px; line-height: 1.6; }

/* ============================================================
 * 巡检 / 值班 / 客户与合同
 * ============================================================ */

.inspection-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.plan-head { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px 8px; }
.plan-icon {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--teal-soft);
  color: #0d8f82;
}
.plan-icon .icon { width: 16px; height: 16px; }
.plan-head > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.plan-head b { font-size: 13px; font-weight: 600; color: #24344a; }
.plan-head span { font-size: 10.5px; color: var(--muted); }
.plan-result {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
  flex: none;
}
.plan-result.ok { background: var(--green-soft); color: #0b8a63; }
.plan-result.warn { background: var(--orange-soft); color: #b5760a; }
.plan-items { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 16px 10px; }
.plan-items span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  color: #51627a;
  background: #f6f9fd;
  border-radius: 5px;
  padding: 2px 6px;
}
.plan-items .icon { width: 10px; height: 10px; color: #10b981; }
.plan-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 16px;
  border-top: 1px solid #f0f4fa;
  font-size: 11px;
  color: var(--muted);
}
.plan-foot b { color: #405066; font-weight: 600; }

.inspection-form { display: flex; flex-direction: column; gap: 12px; }
.inspection-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.inspection-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.inspection-name { font-size: 12.5px; font-weight: 600; color: #2d3d53; }
.inspection-note { font-size: 11px; color: var(--muted); }

.duty-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; padding: 14px 16px; }
.duty-card {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px;
  background: #fbfdff;
  min-width: 0;
}
.duty-card.today { border-color: #b9cdf5; background: linear-gradient(180deg, #f5f9ff, #fff); box-shadow: 0 0 0 2px rgba(47, 111, 237, .08); }
.duty-card-head { display: flex; flex-direction: column; padding-bottom: 6px; border-bottom: 1px dashed #e8eef8; margin-bottom: 5px; }
.duty-card-head b { font-size: 12.5px; color: var(--ink); }
.duty-card-head span { font-size: 9.5px; color: var(--muted); }
.duty-shift { display: flex; flex-direction: column; gap: 1px; padding: 4px 0; }
.duty-shift em { font-style: normal; font-size: 9px; color: #93a2b8; }
.duty-shift b { display: flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 600; color: #3a4b62; white-space: nowrap; overflow: hidden; }
.duty-shift.backup { border-top: 1px dashed #eef2f9; }
.duty-rule {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-top: 1px solid #f0f4fa;
  font-size: 11px;
  color: var(--muted);
}
.duty-rule .icon { width: 13px; height: 13px; color: #9aabc1; }

.announce-list { display: flex; flex-direction: column; }
.announce-item { padding: 11px 16px; border-bottom: 1px solid #f2f5fa; }
.announce-item:last-child { border-bottom: 0; }
.announce-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.announce-time { font-size: 10.5px; color: var(--muted); }
.announce-item > b { font-size: 12.5px; font-weight: 600; display: block; }
.announce-item > p { font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.6; }
.pin { color: #f59e0b; }

.notify-list { display: flex; flex-direction: column; }
.notify-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 16px;
  border-bottom: 1px solid #f2f5fa;
  font-size: 12px;
}
.notify-row:last-child { border-bottom: 0; }
.notify-row > div { display: flex; flex-direction: column; min-width: 0; }
.notify-row b { font-size: 12px; font-weight: 600; color: #2d3d53; }
.notify-row span { font-size: 10.5px; color: var(--muted); }

.cal-info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; padding: 14px 16px 4px; }
.cal-info > div { display: flex; flex-direction: column; gap: 1px; }
.cal-info span { font-size: 10.5px; color: var(--muted); }
.cal-info b { font-size: 12.5px; color: #2d3d53; }

/* ============================================================
 * 报表 / 图表
 * ============================================================ */

.donut-wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.donut {
  width: 158px;
  height: 158px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  position: relative;
}
.donut-hole {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px #f1f5fa;
}
.donut-hole strong { font-size: 22px; color: var(--ink); line-height: 1.1; }
.donut-hole span { font-size: 10px; color: var(--muted); }
.donut-legend { flex: 1; min-width: 150px; display: flex; flex-direction: column; gap: 6px; }
.legend-row { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: #46566d; }
.legend-row i { width: 8px; height: 8px; border-radius: 3px; flex: none; }
.legend-row span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend-row b { font-size: 11.5px; color: #2d3d53; }
.legend-row em { font-style: normal; font-size: 10px; color: #93a2b8; width: 30px; text-align: right; }

.hbars { display: flex; flex-direction: column; gap: 8px; }
.hbar-row { display: flex; align-items: center; gap: 9px; font-size: 11.5px; }
.hbar-label { width: 108px; flex: none; color: #51627a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { flex: 1; height: 8px; border-radius: 5px; background: #f0f4fa; overflow: hidden; }
.hbar-track i { display: block; height: 100%; border-radius: 5px; }
.hbar-row > b { width: 34px; text-align: right; font-size: 11.5px; color: #34445a; }

.gauge-wrap { position: relative; width: 148px; margin: 0 auto; }
.gauge { width: 148px; height: 148px; }
.gauge-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}
.gauge-label strong { font-size: 23px; color: var(--ink); }
.gauge-label span { font-size: 10.5px; color: var(--muted); }
.gauge-block { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.gauge-notes { display: flex; flex-direction: column; gap: 6px; font-size: 11.5px; color: var(--muted); width: 100%; }
.gauge-notes > div { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px dashed #eef2f9; }
.gauge-notes b { color: #34445a; font-weight: 600; }

/* ============================================================
 * 流程引擎 / 配置页
 * ============================================================ */

.flow-canvas {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 16px;
  background: #fbfdff;
  border: 1px dashed #dbe7f8;
  border-radius: 10px;
}
.flow-node {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 9px 12px;
  border-radius: 8px;
  min-width: 92px;
  border: 1px solid transparent;
}
.flow-node b { font-size: 12px; font-weight: 700; }
.flow-node span { font-size: 10px; opacity: .8; }
.flow-node.tone-blue { background: var(--primary-soft); border-color: #d5e4ff; color: #1e5bd6; }
.flow-node.tone-teal { background: var(--teal-soft); border-color: #c8f0e9; color: #0d8f82; }
.flow-node.tone-orange { background: var(--orange-soft); border-color: #fae4b9; color: #b5760a; }
.flow-node.tone-red { background: var(--red-soft); border-color: #f7cccc; color: #c92a2a; }
.flow-node.tone-purple { background: var(--purple-soft); border-color: #e2d6ff; color: #7143d8; }
.flow-node.tone-green { background: var(--green-soft); border-color: #c6efdf; color: #0b8a63; }
.flow-arrow { color: #a9bacf; display: grid; place-items: center; }
.flow-arrow .icon { width: 15px; height: 15px; transform: rotate(180deg); }
.flow-timer {
  position: absolute;
  right: -4px;
  top: -11px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-style: normal;
  font-size: 8.5px;
  font-weight: 600;
  background: #fff;
  border: 1px solid #fae4b9;
  color: #b5760a;
  border-radius: 5px;
  padding: 1px 4px;
  white-space: nowrap;
}
.flow-timer .icon { width: 9px; height: 9px; }
.flow-branches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.branch {
  background: #f8fafd;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
}
.branch b { display: block; font-size: 11.5px; color: #3a4b62; }
.branch span { font-size: 10.5px; color: var(--muted); line-height: 1.5; display: block; margin-top: 1px; }

.rule-timeline { display: flex; flex-direction: column; padding: 14px 16px; gap: 0; }
.rule-step {
  position: relative;
  display: flex;
  gap: 10px;
  padding: 0 0 14px 14px;
  border-left: 2px solid #e6eefb;
}
.rule-step:last-child { padding-bottom: 0; border-left-color: transparent; }
.rule-step::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #96b8ee;
}
.rule-step b {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  color: #1e5bd6;
  background: var(--primary-soft);
  border-radius: 5px;
  padding: 1px 6px;
  height: 19px;
}
.rule-step span { font-size: 11.5px; color: #51627a; line-height: 1.6; }

.config-rows { display: flex; flex-direction: column; }
.config-rows > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dashed #eef2f9;
  font-size: 11.5px;
}
.config-rows > div:last-child { border-bottom: 0; }
.config-rows span { color: var(--muted); }
.config-rows b { color: #34445a; font-weight: 600; text-align: right; }
.config-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.segmented {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fd;
  padding: 2px;
}
.segmented button {
  border: 0;
  background: transparent;
  border-radius: 6px;
  padding: 5px 11px;
  font-size: 11.5px;
  color: var(--muted);
}
.segmented button.on { background: #fff; color: var(--primary); font-weight: 600; box-shadow: var(--shadow-sm); }

.switch-btn {
  width: 34px;
  height: 19px;
  border-radius: 10px;
  border: 0;
  background: #d6dfee;
  position: relative;
  flex: none;
  padding: 0;
}
.switch-btn.on { background: var(--primary); }
.switch-btn::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  transition: transform .16s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
}
.switch-btn.on::after { transform: translateX(15px); }

/* ============================================================
 * 表单 / 弹窗 / 提示
 * ============================================================ */

.form { display: flex; flex-direction: column; gap: 12px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > span { font-size: 11.5px; font-weight: 600; color: #405066; }
.field > em {
  font-style: normal;
  font-size: 10.5px;
  color: #93a2b8;
}
.input {
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--text);
  font-size: 12.5px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: #a3b0c3; }
.input:focus { border-color: #8fb4f2; box-shadow: 0 0 0 3px rgba(47, 111, 237, .11); }
select.input {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7a90' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 13px;
  padding-right: 28px;
}
select.input.multi {
  height: auto;
  min-height: 96px;
  padding: 6px 8px;
  background-image: none;
}
select.input.multi option { padding: 3px 5px; font-size: 12px; }
textarea.input { resize: vertical; min-height: 64px; line-height: 1.6; }

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 4px;
  border-top: 1px solid #f0f4fa;
  margin-top: 2px;
  padding-top: 12px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(13, 20, 36, .46);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 42px 18px;
  overflow-y: auto;
  animation: overlayIn .16s ease;
}
.modal {
  width: 100%;
  max-width: 620px;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  animation: modalIn .2s cubic-bezier(.2, .8, .3, 1);
  margin: auto 0;
}
.modal-sm { max-width: 440px; }
.modal-md { max-width: 620px; }
.modal-lg { max-width: 860px; }
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 13px;
  border-bottom: 1px solid #f0f4fa;
}
.modal-head h3 { font-size: 15.5px; font-weight: 700; color: var(--ink); line-height: 1.4; }
.modal-head p { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.modal-body { padding: 16px 18px; }
.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid #f0f4fa;
  background: #fbfdff;
  border-radius: 0 0 14px 14px;
}

.modal-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.modal-detail { font-size: 12.5px; color: #46566d; line-height: 1.7; }

.mini-card {
  background: #f8fafd;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 11px;
}
.mini-card > b { display: block; font-size: 11.5px; color: #3a4b62; margin-bottom: 6px; }
.mini-row { display: flex; gap: 8px; padding: 4px 0; font-size: 11.5px; }
.mini-row > span { flex: none; color: var(--muted); width: 62px; }
.mini-row > p { color: #405066; line-height: 1.6; }

.notice-pop-list { display: flex; flex-direction: column; gap: 4px; }
.notice-pop {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 9px;
  background: transparent;
  padding: 9px 10px;
  color: var(--text);
}
.notice-pop:hover { background: #f6f9fd; }
.notice-pop > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.notice-pop b { font-size: 12px; font-weight: 600; }
.notice-pop span { font-size: 11px; color: var(--muted); }
.notice-pop > .icon { width: 14px; height: 14px; color: #b6c2d4; }
.notice-tone { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.notice-tone.tone-red { background: var(--red); }
.notice-tone.tone-orange { background: var(--orange); }
.notice-tone.tone-purple { background: var(--purple); }
.notice-tone.tone-blue { background: var(--primary); }
.notice-tone.tone-teal { background: var(--teal); }

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 210px;
  max-width: 380px;
  padding: 10px 13px;
  border-radius: 9px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  font-size: 12.5px;
  color: #2d3d53;
  animation: toastIn .22s ease;
}
.toast-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
}
.toast-icon .icon { width: 13px; height: 13px; }
.toast-ok .toast-icon { background: var(--green-soft); color: #0b8a63; }
.toast-error .toast-icon { background: var(--red-soft); color: var(--red); }
.toast-info .toast-icon { background: var(--primary-soft); color: var(--primary); }

#toast-root {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

/* ============================================================
 * 动画
 * ============================================================ */

@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.99); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ============================================================
 * 响应式
 * ============================================================ */

@media (max-width: 1400px) {
  .kpi-grid-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .topo-layout { grid-template-columns: 1fr; }
  .catalog-cards, .kb-grid, .inspection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .duty-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .flow-branches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .global-search { width: 260px; }
}

@media (max-width: 980px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; }
  body.sidebar-open .sidebar { transform: none; box-shadow: 20px 0 60px rgba(0, 0, 0, .3); }
  .main { margin-left: 0; }
  .mobile-menu { display: grid !important; }
  .content { padding: 16px 16px 28px; }
  .topbar { padding: 0 14px; gap: 8px; }
  .global-search { display: none; }
  .learn-toggle span:last-child { display: none; }
  .learn-toggle { padding: 0 8px; }
  .crumb { display: none; }
  .split-grid, .report-grid, .config-grid, .grid-2 { grid-template-columns: 1fr; }
  .detail-grid .grid-2 { grid-template-columns: 1fr; }
  .detail-banner { flex-direction: column; }
  .detail-banner-side, .sla-side, .ticket-banner .detail-banner-side { min-width: 0; width: 100%; }
  .approval-ring { margin: 0; }
  .detail-banner-side { flex-direction: row; flex-wrap: wrap; }
  .detail-banner-side > * { flex: 1; min-width: 180px; }
}

@media (max-width: 720px) {
  .kpi-grid, .kpi-grid-4, .kpi-grid-6 { grid-template-columns: 1fr; }
  .catalog-grid, .catalog-cards, .kb-grid, .inspection-grid { grid-template-columns: 1fr; }
  .duty-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-head { flex-direction: column; align-items: stretch; }
  .page-actions { justify-content: flex-start; }
  .form-row, .modal-grid-2, .info-grid, .attr-grid, .inspection-options { grid-template-columns: 1fr; }
  .flow-branches { grid-template-columns: 1fr; }
  .user-chip > div, .user-chip > .icon { display: none; }
  .stat-text strong { font-size: 20px; }
  .modal-overlay { padding: 14px 10px; }
  .data-table { min-width: 640px; }
  .value-chain { gap: 8px; }
  .chain-item { flex: 0 0 calc(33.333% - 6px); min-width: 0; }
  .app-foot { flex-direction: column; gap: 4px; }
  .donut-wrap { justify-content: center; }
}
