/* 设计令牌 · 对齐 Art Design Pro（https://www.artd.pro 工作台） */
:root {
  /* 主色 / 语义色 */
  --primary: #5d87ff;
  --primary-dark: #4a76f0;
  --primary-soft: #ecf2ff;
  --primary-glow: rgba(93, 135, 255, .18);
  --success: #13deb9;
  --warning: #ffae1f;
  --orange: #fa896b;
  --danger: #fa4d4d;
  --purple: #8965e5;
  --cyan: #49beff;
  /* 文本层级（art-gray 900 / 700 / 500） */
  --text-primary: #323251;
  --text-secondary: #4d5875;
  --text-muted: #949eb7;
  --text-faint: #c0c4cc;
  /* 背景 */
  --bg-page: #fafbfc;
  --bg-soft: #f9fafb;
  --bg-hover: #edeff0;
  /* 描边：Art Design Pro 用极细描边代替重投影，这是“高级感”的关键 */
  --border: #e6eaeb;
  --border-strong: #dbdfe1;
  --border-card: rgba(0, 0, 0, .08);
  --sidebar-bg: #ffffff;
  --sidebar-text: #4d5875;
  --sidebar-width: 238px;
  /* 圆角：基准 12px，卡片 +4px = 16px，控件 6px（同 Element Plus base） */
  --radius-sm: 4px;
  --radius: 6px;
  --radius-card: 16px;
  --shadow-sm: 0 1px 2px rgba(50, 50, 81, .04);
  --shadow: 0 2px 8px rgba(50, 50, 81, .06);
  --shadow-lg: 0 12px 32px rgba(50, 50, 81, .12);
  /* 卡片默认无投影，仅极细描边；悬浮时描边加深 */
  --shadow-card: none;
  --shadow-card-hover: none;
  --lift: 0px;
  --ease: cubic-bezier(.4, 0, .2, 1);
  --topbar-h: 50px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-primary);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

img {
  max-width: 100%;
}

::selection {
  background: rgba(93, 135, 255, .2);
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: rgba(134, 144, 156, .3);
  border-radius: 8px;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(134, 144, 156, .5);
}

.layout {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 100;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  border-right: 1px solid var(--border);
  transition: transform .3s var(--ease), width .3s var(--ease);
  overflow: hidden;
}

.brand {
  height: var(--topbar-h);
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.logo-img {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--primary-soft);
}

.brand .name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--text-primary);
  white-space: nowrap;
  line-height: 1.3;
}

.brand .sub {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: .04em;
  white-space: nowrap;
  margin-top: 1px;
}

#nav {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 8px 16px;
}

#nav .group {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .02em;
  text-transform: none;
  color: var(--text-muted);
  padding: 16px 10px 6px;
  white-space: nowrap;
  overflow: hidden;
}

#nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  margin-bottom: 2px;
  padding: 0 10px;
  border-radius: var(--radius);
  color: var(--sidebar-text);
  font-size: 14px;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease);
}

#nav a:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

#nav a.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 500;
}

#nav a.active::before {
  content: none;
}

#nav a .ico {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: .9;
}

#nav a .ico svg {
  width: 17px;
  height: 17px;
  display: block;
}

#nav a .ico i {
  font-size: 17px;
  line-height: 1;
}

#nav a .lb {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar .foot {
  flex: 0 0 auto;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  letter-spacing: .02em;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
}

.main {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  min-width: 0;
  display: flex;
  flex-direction: column;
  transition: margin-left .3s var(--ease);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 14px;
  height: var(--topbar-h);
  padding: 0 20px;
  background: var(--sidebar-bg);
  border-bottom: 1px solid var(--border);
}

.hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .2s var(--ease);
}

.hamburger:hover {
  background: var(--bg-hover);
  border-color: var(--border);
  color: var(--primary);
}

.hamburger svg {
  width: 18px;
  height: 18px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.bc-home {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

.bc-sep {
  color: var(--text-faint);
  font-size: 12px;
}

.page-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: .01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.user-menu {
  position: relative;
}

.user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 8px 3px 3px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .2s var(--ease);
}

.user-btn:hover,
.user-menu.open .user-btn {
  background: var(--bg-hover);
  border-color: var(--border);
}

.avatar,
.avatar-img {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.avatar-img {
  object-fit: cover;
  background: var(--bg-hover);
  display: block;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .02em;
}

.user-btn .name {
  font-size: 13.5px;
  font-weight: 400;
  color: var(--text-secondary);
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-btn .caret {
  color: var(--text-muted);
  transition: transform .25s var(--ease);
}

.user-menu.open .user-btn .caret {
  transform: rotate(180deg);
}

.user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 120;
  width: 244px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
}

.user-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.ud-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  margin-bottom: 6px;
  background: var(--bg-soft);
  border-radius: var(--radius);
}

.ud-avatar,
.ud-avatar-fallback {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.ud-avatar {
  object-fit: cover;
  background: var(--bg-hover);
  display: block;
}

.ud-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.ud-id {
  min-width: 0;
}

.ud-id b {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ud-id small {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ud-item {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-secondary);
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
  transition: all .18s var(--ease);
}

.ud-item:hover {
  background: var(--bg-hover);
  color: var(--primary);
}

.ud-item.danger {
  color: var(--danger);
}

.ud-item.danger:hover {
  background: rgba(245, 63, 63, .08);
  color: var(--danger);
}

.ud-divider {
  height: 1px;
  margin: 6px 4px;
  background: var(--border);
}

.content {
  flex: 1 1 auto;
  width: 100%;
  padding: 20px 20px 28px;
  min-width: 0;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.page-eyebrow {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.page-h {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text-primary);
  line-height: 1.35;
}

.page-sub {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.card {
  position: relative;
  background: #fff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 20px;
  margin-bottom: 16px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.card-title small {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}

.card.accent-soft {
  background: linear-gradient(180deg, rgba(93, 135, 255, .05), #fff 58%);
  border-color: rgba(93, 135, 255, .16);
}

.card.accent-warn {
  background: linear-gradient(180deg, rgba(250, 137, 107, .05), #fff 58%);
  border-color: rgba(250, 137, 107, .2);
}

.card.accent {
  background: linear-gradient(180deg, rgba(137, 101, 229, .05), #fff 58%);
  border-color: rgba(137, 101, 229, .14);
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.card-head .toolbar {
  margin-bottom: 0;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="search"],
input[type="url"],
input[type="tel"],
select,
textarea {
  height: 32px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  outline: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}

textarea {
  height: auto;
  min-height: 84px;
  padding: 6px 11px;
  line-height: 1.65;
  resize: vertical;
}

select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2386909c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}

input[type="text"]::placeholder,
input[type="password"]::placeholder,
input[type="email"]::placeholder,
input[type="number"]::placeholder,
input[type="search"]::placeholder,
input[type="url"]::placeholder,
input[type="tel"]::placeholder,
textarea::placeholder {
  color: var(--text-faint);
}

input[type="text"]:hover,
input[type="password"]:hover,
input[type="email"]:hover,
input[type="number"]:hover,
input[type="search"]:hover,
input[type="url"]:hover,
input[type="tel"]:hover,
select:hover,
textarea:hover {
  border-color: var(--border-strong);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.file-input {
  width: 100%;
  padding: 8px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-soft);
  font-size: 13px;
  color: var(--text-secondary);
}

.scene-select,
.tpl-select {
  width: 100%;
}

.dialog-input {
  width: 100%;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: all .2s var(--ease);
}

.btn svg {
  width: 15px;
  height: 15px;
}

.btn i {
  flex: 0 0 auto;
  font-size: 15px;
  line-height: 1;
}

.btn:hover {
  background: #7ba0ff;
}

.btn:active {
  background: var(--primary-dark);
}

.btn.primary {
  background: var(--primary);
  color: #fff;
}

.btn.ghost {
  background: #fff;
  border-color: var(--border);
  color: var(--text-secondary);
}

.btn.ghost:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.btn.danger {
  background: var(--danger);
  color: #fff;
}

.btn.danger:hover {
  background: #f76560;
}

.btn.small {
  height: 28px;
  padding: 0 10px;
  border-radius: var(--radius);
  font-size: 13px;
}

.btn.small svg {
  width: 13px;
  height: 13px;
}

.btn.small i {
  font-size: 13px;
  line-height: 1;
}

.btn.small.danger {
  background: #ffece8;
  border-color: #ffece8;
  color: var(--danger);
}

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

.btn:disabled,
.btn[disabled] {
  opacity: .4;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn:disabled:hover {
  background: var(--primary);
  box-shadow: none;
}

.btn.small.ghost:disabled:hover {
  background: #fff;
  border-color: var(--border);
  color: var(--text-secondary);
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  background: var(--bg-hover);
  color: var(--text-secondary);
}

.badge.blue {
  background: var(--primary-soft);
  color: var(--primary);
}

.badge.green {
  background: #e8ffea;
  color: var(--success);
}

.badge.gold {
  background: #fff7e8;
  color: var(--warning);
}

.badge.red {
  background: #ffece8;
  color: var(--danger);
}

.badge.gray {
  background: var(--bg-hover);
  color: var(--text-muted);
}

.tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  background: var(--bg-hover);
  border-radius: var(--radius);
}

.tab {
  height: 28px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
  cursor: pointer;
  transition: all .2s var(--ease);
}

.tab:hover {
  color: var(--text-primary);
}

.tab.on {
  background: #fff;
  color: var(--primary);
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(29, 33, 41, .08);
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

.table th {
  padding: 12px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.table th:first-child {
  border-radius: var(--radius) 0 0 var(--radius);
}

.table th:last-child {
  border-radius: 0 var(--radius) var(--radius) 0;
}

.table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: middle;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table tbody tr {
  transition: background .18s var(--ease);
}

.table tbody tr:hover td {
  background: var(--bg-hover);
}

.table td .badge {
  vertical-align: middle;
}

.table td .btn + .btn {
  margin-left: 2px;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.empty {
  padding: 40px 14px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stat {
  background: #fff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 16px 18px;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}

.stat:hover {
  border-color: rgba(0, 0, 0, .14);
  box-shadow: 0 6px 20px rgba(50, 50, 81, .06);
}

.stat-info .label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
}

.stat-info .value {
  margin-top: 6px;
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0;
  line-height: 1.2;
}

.tone-green {
  color: var(--success);
}

.tone-orange {
  color: var(--orange);
}

.tone-purple {
  color: var(--purple);
}

.tone-gray {
  color: var(--text-muted);
}

.stat-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 84px;
  padding: 9px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.stat-num {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.25;
}

.stat-num.green {
  color: var(--success);
}

.stat-num.gray {
  color: var(--text-muted);
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
}

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

/* 指标卡 · Art Design Pro 工作台同款：白底 + 16px 圆角 + 极细描边，默认无投影 */
.kpi {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 140px;
  padding: 0 20px;
  background: #fff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  transition: border-color .22s var(--ease), box-shadow .22s var(--ease);
}

.kpi:hover {
  border-color: rgba(0, 0, 0, .14);
  box-shadow: 0 6px 20px rgba(50, 50, 81, .06);
}

/* 右上角圆角图标徽章：50×50 / 20px 圆角，10% 主题色底 + 同色图标 */
.kpi-ico {
  position: absolute;
  top: 0;
  right: 20px;
  bottom: 0;
  margin: auto;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  background: var(--bg-hover);
  color: var(--text-secondary);
}

.kpi-ico i {
  font-size: 20px;
  line-height: 1;
}

.kpi-ico svg {
  width: 22px;
  height: 22px;
}

/* 每项指标一套 10% 浅色底 + 同色系图标 */
.kpi-ico.blue {
  background: rgba(93, 135, 255, .1);
  color: #5d87ff;
}

.kpi-ico.gold {
  background: rgba(255, 174, 31, .12);
  color: #ffae1f;
}

.kpi-ico.green {
  background: rgba(19, 222, 185, .12);
  color: #13deb9;
}

.kpi-ico.purple {
  background: rgba(137, 101, 229, .12);
  color: #8965e5;
}

.kpi-ico.red {
  background: rgba(250, 77, 77, .12);
  color: #fa4d4d;
}

.kpi-ico.orange {
  background: rgba(250, 137, 107, .14);
  color: #fa896b;
}

.kpi-ico.cyan {
  background: rgba(73, 190, 255, .12);
  color: #49beff;
}

.kpi-ico.deep {
  background: rgba(99, 102, 241, .12);
  color: #6366f1;
}

/* 文案层级：标签在上、大数字居中、脚注在下 */
.kpi-label {
  order: 1;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0;
  line-height: 1.4;
}

.kpi-value {
  order: 2;
  margin-top: 8px;
  padding-right: 66px;
  font-size: 26px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

.kpi-value small {
  margin: 0 2px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
}

.kpi-foot {
  order: 3;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
  padding-right: 66px;
  font-size: 12px;
  color: var(--text-muted);
}

.trend {
  display: inline;
  height: auto;
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--success);
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
}

.trend.flat {
  background: none;
  color: var(--text-muted);
}

.trend.hot {
  background: none;
  color: var(--danger);
}

.panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.panel-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.panel-sub {
  margin-top: 3px;
  font-size: 12px;
  color: var(--text-muted);
}

.panel-body {
  flex: 1 1 auto;
  padding: 18px 20px;
}

.panel-body.tight {
  padding: 8px 20px;
}

.grid-main {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.grid-half {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.grid-main > *,
.grid-half > * {
  min-width: 0;
}

.grid-main > .hero,
.grid-half > .panel {
  margin-bottom: 0;
}

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.grid-auto.sm {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.span-all {
  grid-column: 1 / -1;
}

.chart {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 200px;
  padding-top: 8px;
}

.chart-col {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.chart-v {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.4;
}

.chart-track {
  flex: 1 1 auto;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
}

.chart-bar {
  width: 100%;
  max-width: 38px;
  height: var(--h, 10%);
  min-height: 6px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: #94bfff;
  transition: height .4s var(--ease);
}

.chart-col.is-today .chart-bar {
  background: var(--primary);
}

.chart-x {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  white-space: nowrap;
}

.chart-empty {
  flex: 1 1 auto;
  width: 100%;
  height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 16px;
  text-align: center;
  background: var(--bg-soft);
  border: 1px dashed var(--border);
  border-radius: var(--radius-card);
  color: var(--text-muted);
  font-size: 13px;
}

.chart-empty svg {
  width: 32px;
  height: 32px;
  opacity: .45;
}

.chart-empty i {
  font-size: 32px;
  line-height: 1;
  opacity: .45;
}

.data-list {
  display: flex;
  flex-direction: column;
}

.data-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}

.data-row:last-child {
  border-bottom: 0;
}

.data-row .k {
  font-size: 13px;
  color: var(--text-muted);
}

.data-row .v {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.data-row .v.alert {
  color: var(--danger);
}

.list {
  display: flex;
  flex-direction: column;
}

.list-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.list-row:last-child {
  border-bottom: 0;
}

.list-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-hover);
}

.list-main {
  flex: 1 1 auto;
  min-width: 0;
}

.list-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-meta {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--success);
}

.quick {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quick-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
  transition: all .2s var(--ease);
}

.quick-btn i {
  flex: 0 0 auto;
  font-size: 16px;
  line-height: 1;
  color: var(--primary);
}

.quick-btn svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--primary);
}

.quick-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.hero {
  padding: 20px;
  background: #fff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.hero-eyebrow {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-muted);
}

.hero-title {
  margin: 6px 0 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.4;
  color: var(--text-primary);
}

.hero-sub {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-hover);
  color: var(--text-secondary);
  font-size: 12px;
  white-space: nowrap;
}

.hero-badge svg {
  width: 15px;
  height: 15px;
}

.hero-badge i {
  font-size: 15px;
  line-height: 1;
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.hero-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 118px;
}

.hero-metric span {
  font-size: 12px;
  color: var(--text-muted);
}

.hero-metric b {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text-primary);
}

.ring-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 6px 0;
}

.ring {
  position: relative;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(var(--primary) calc(var(--p, 0) * 1%), var(--bg-hover) 0);
}

.ring::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: #fff;
}

.ring-in {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.ring-in span {
  font-size: 12px;
  color: var(--text-muted);
}

.ring-in b {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0;
}

.seg {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  background: var(--bg-hover);
  border-radius: var(--radius);
}

.seg-btn {
  height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
  cursor: pointer;
  transition: all .2s var(--ease);
}

.seg-btn:hover {
  color: var(--text-primary);
}

.seg-btn.on {
  background: #fff;
  color: var(--primary);
  font-weight: 500;
}

.mini-card {
  padding: 14px;
  background: #fff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}

.mini-card:hover {
  border-color: rgba(0, 0, 0, .14);
  box-shadow: 0 6px 20px rgba(50, 50, 81, .06);
}

.mini-card.media-card {
  padding: 0;
  overflow: hidden;
}

.media-card img {
  display: block;
  width: 100%;
  height: 132px;
  object-fit: cover;
  background: var(--bg-hover);
}

.media-body {
  padding: 12px 14px 14px;
}

.media-name {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.frame-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 18px 12px 14px;
  text-align: center;
}

.frame-ring {
  width: 56px;
  height: 56px;
  margin-bottom: 8px;
  border: 3px solid var(--primary);
  border-radius: 50%;
  background: var(--bg-soft);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.frame-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px 18px;
}

.form-item {
  min-width: 0;
}

.form-item label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
}

.form-item input[type="text"],
.form-item input[type="password"],
.form-item input[type="email"],
.form-item input[type="number"],
.form-item select,
.form-item textarea {
  width: 100%;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
}

.hint {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--text-muted);
}

.hint.warn,
.hint.warning {
  color: var(--warning);
}

.hint.info {
  color: var(--primary);
}

.form-label.msg-ok {
  color: var(--success);
}

.form-label.msg-warn {
  color: var(--warning);
}

.reply-ok,
.reply-warn {
  border-left-width: 3px;
  border-left-style: solid;
}

.reply-ok {
  border-left-color: var(--success);
  background: #f7fdf9;
}

.reply-warn {
  border-left-color: var(--warning);
  background: #fffdf6;
}

.reply-ok:focus {
  border-color: var(--success);
  box-shadow: 0 0 0 2px rgba(0, 186, 42, .14);
}

.reply-warn:focus {
  border-color: var(--warning);
  box-shadow: 0 0 0 2px rgba(255, 125, 0, .14);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
}

.inline-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

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

.avatar-sm {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  margin-right: 6px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  background: var(--bg-hover);
}

.cls-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  object-fit: cover;
  vertical-align: middle;
  background: var(--bg-hover);
}

.cls-icon-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  background: var(--bg-hover);
  font-size: 17px;
  vertical-align: middle;
}

.cls-icon-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  vertical-align: middle;
}

.muted {
  color: var(--text-muted);
}

.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(29, 33, 41, .5);
  animation: maskIn .18s var(--ease);
}

.modal {
  display: flex;
  flex-direction: column;
  width: 640px;
  max-width: 100%;
  max-height: 88vh;
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-lg);
  animation: modalIn .22s var(--ease);
}

.modal.sm {
  width: 424px;
}

.m-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}

.m-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.m-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: all .18s var(--ease);
}

.m-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.m-body {
  flex: 1 1 auto;
  padding: 22px;
  overflow-y: auto;
}

.m-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  border-radius: 0 0 var(--radius-card) var(--radius-card);
}

.dialog-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.profile-box {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 4px 0 10px;
}

.p-avatar {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-hover);
}

.p-rows {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
}

.p-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--border);
  font-size: 13px;
}

.p-row span {
  color: var(--text-muted);
  flex: 0 0 auto;
}

.p-row b {
  min-width: 0;
  color: var(--text-primary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.theme-pick p {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--text-muted);
}

.theme-opt {
  width: 100%;
  height: auto;
  justify-content: flex-start;
  margin-bottom: 8px;
  padding: 12px 14px;
  background: #fff;
  border-color: var(--border);
  color: var(--text-primary);
}

.theme-opt:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
  color: var(--text-primary);
  box-shadow: none;
}

.theme-opt.is-off {
  opacity: .6;
}

.theme-opt.is-off:hover {
  opacity: 1;
}

.err-card {
  padding: 28px;
  background: #fff;
  border: 1px solid rgba(245, 63, 63, .25);
  border-radius: var(--radius-card);
}

.err-title {
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--danger);
}

.err-msg {
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

.err-tip {
  padding: 12px 14px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  font-size: 13px;
  line-height: 1.75;
  color: var(--text-muted);
}

#toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 2000;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 400;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
  transition: opacity .25s var(--ease);
}

@keyframes maskIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

body.nav-collapsed {
  --sidebar-width: 64px;
}

body.nav-collapsed .brand {
  justify-content: center;
  padding: 0;
}

body.nav-collapsed .brand > div {
  display: none;
}

body.nav-collapsed #nav {
  padding: 12px 8px 18px;
}

body.nav-collapsed #nav .group {
  height: 1px;
  margin: 12px 10px;
  padding: 0;
  font-size: 0;
  color: transparent;
  background: var(--border);
  overflow: hidden;
}

body.nav-collapsed #nav a {
  justify-content: center;
  gap: 0;
  padding: 0;
}

body.nav-collapsed #nav a .lb {
  display: none;
}

body.nav-collapsed #nav a .ico {
  width: 22px;
  height: 22px;
}

body.nav-collapsed #nav a .ico svg {
  width: 21px;
  height: 21px;
}

body.nav-collapsed #nav a .ico i {
  font-size: 21px;
}

body.nav-collapsed .sidebar .foot {
  font-size: 0;
}

body.nav-collapsed .sidebar .foot::after {
  content: "v1";
  font-size: 10px;
  letter-spacing: .08em;
}

body.theme-tabler {
  --primary: #206bc4;
  --primary-dark: #1a5aa6;
  --primary-soft: rgba(32, 107, 196, .12);
  --primary-glow: rgba(32, 107, 196, .2);
  --sidebar-bg: #1f2937;
  --sidebar-text: #a9b4c2;
  --sidebar-active-bg: rgba(255, 255, 255, .1);
  --bg-page: #f8fafc;
  --bg-soft: #f8fafc;
  --bg-hover: #f3f6fb;
  --text-primary: #182433;
  --text-secondary: #52647a;
  --text-muted: #8698ad;
  --border: #e9ecef;
  --border-strong: #dee2e6;
}

body.theme-tabler .sidebar {
  border-right-color: transparent;
  box-shadow: none;
}

body.theme-tabler .brand {
  border-bottom-color: rgba(255, 255, 255, .08);
}

body.theme-tabler .brand .name {
  color: #fff;
}

body.theme-tabler .brand .sub {
  color: rgba(255, 255, 255, .45);
}

body.theme-tabler .logo-img {
  background: rgba(255, 255, 255, .12);
}

body.theme-tabler #nav .group {
  color: rgba(255, 255, 255, .38);
}

body.theme-tabler #nav a {
  color: var(--sidebar-text);
}

body.theme-tabler #nav a:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

body.theme-tabler #nav a.active {
  background: var(--sidebar-active-bg);
  color: #fff;
  font-weight: 500;
}

body.theme-tabler .sidebar .foot {
  border-top-color: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .4);
}

body.theme-tabler.nav-collapsed #nav .group {
  background: rgba(255, 255, 255, .12);
}

body.theme-tabler .modal-mask {
  background: rgba(15, 23, 42, .5);
}

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

@media (max-width: 1024px) {
  .grid-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .grid-half {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 901px) {
  .hamburger {
    display: none;
  }
}

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: 0 0 24px rgba(29, 33, 41, .12);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main {
    margin-left: 0;
  }

  .hamburger {
    display: inline-flex;
  }

  .brand {
    padding: 0 16px;
  }

  #nav {
    padding: 10px 10px 18px;
  }

  .content {
    padding: 18px 16px 28px;
  }

  .grid-main,
  .grid-half {
    grid-template-columns: minmax(0, 1fr);
  }

  .table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table th,
  .table td {
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  :root {
    --topbar-h: 56px;
  }

  .topbar {
    padding: 0 12px;
    gap: 8px;
  }

  .bc-home,
  .bc-sep {
    display: none;
  }

  .page-title {
    font-size: 15.5px;
  }

  .user-btn .name {
    display: none;
  }

  .user-btn {
    padding: 0 8px;
  }

  .content {
    padding: 14px 12px 26px;
  }

  .card {
    padding: 16px;
    border-radius: var(--radius-card);
  }

  .card-head {
    padding-bottom: 12px;
    margin-bottom: 14px;
  }

  .page-h {
    font-size: 20px;
  }

  .kpi {
    padding: 14px 16px;
    column-gap: 12px;
  }

  .kpi-ico {
    width: 36px;
    height: 36px;
  }

  .kpi-value {
    font-size: 21px;
  }

  .table th,
  .table td {
    padding: 10px 12px;
  }

  .pager {
    justify-content: center;
  }

  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ================= 侧栏二级/三级子菜单（对齐 Art Design Pro） ================= */
#nav .nav-item {
  display: block;
}

#nav .nav-parent {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  margin-bottom: 2px;
  padding: 0 10px;
  border-radius: var(--radius);
  color: var(--sidebar-text);
  font-size: 14px;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease);
}

#nav .nav-parent:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

#nav .nav-parent .ico {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: .9;
}

#nav .nav-parent .ico svg {
  width: 17px;
  height: 17px;
  display: block;
}

#nav .nav-parent .ico i {
  font-size: 17px;
  line-height: 1;
}

#nav .nav-parent .lb {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#nav .nav-parent .caret {
  margin-left: auto;
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  color: var(--text-muted);
  transition: transform .25s var(--ease);
}

#nav .nav-parent.open {
  color: var(--text-primary);
}

#nav .nav-parent.open .caret {
  transform: rotate(180deg);
}

#nav .nav-sub {
  overflow: hidden;
  max-height: 0;
  transition: max-height .3s var(--ease);
}

#nav .nav-sub.open {
  max-height: 1600px;
}

body.nav-collapsed #nav .nav-parent {
  justify-content: center;
  gap: 0;
  padding: 0 !important;
}

body.nav-collapsed #nav .nav-parent .lb,
body.nav-collapsed #nav .nav-parent .caret {
  display: none;
}

body.nav-collapsed #nav .nav-parent .ico {
  width: 22px;
  height: 22px;
}

body.nav-collapsed #nav .nav-parent .ico svg {
  width: 21px;
  height: 21px;
}

body.nav-collapsed #nav .nav-parent .ico i {
  font-size: 21px;
}

body.nav-collapsed #nav .nav-sub {
  display: none;
}

/* ================= 工作台 Console（对齐 Art Design Pro 工作台） ================= */
.console {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ov-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
  gap: 20px;
}

@media (max-width: 1180px) {
  .ov-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.ov-big {
  font-size: 34px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -.01em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.ov-big .up {
  margin-left: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
}

.ov-rows {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ov-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ov-row .k {
  width: 76px;
  flex: 0 0 auto;
  font-size: 13px;
  color: var(--text-muted);
}

.ov-row .bar {
  flex: 1 1 auto;
  height: 6px;
  border-radius: 6px;
  background: var(--bg-hover);
  overflow: hidden;
}

.ov-row .bar i {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: var(--primary);
}

.ov-row .v {
  width: 66px;
  flex: 0 0 auto;
  text-align: right;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.u-prog {
  display: inline-block;
  vertical-align: middle;
  width: 84px;
  height: 6px;
  border-radius: 6px;
  background: var(--bg-hover);
  overflow: hidden;
}

.u-prog i {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: var(--primary);
}

/* 动态时间线 */
.tl {
  position: relative;
  padding-left: 22px;
}

.tl::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border);
}

.tl-item {
  position: relative;
  padding-bottom: 18px;
}

.tl-item:last-child {
  padding-bottom: 0;
}

.tl-item::before {
  content: '';
  position: absolute;
  left: -21px;
  top: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--primary);
}

.tl-item .t {
  font-size: 13.5px;
  color: var(--text-primary);
}

.tl-item .d {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-muted);
}

/* 待办事项 */
.todo {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: var(--radius);
  transition: background .2s var(--ease);
}

.todo-item:hover {
  background: var(--bg-hover);
}

.todo-item .chk {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
}

.todo-item.done .chk {
  background: var(--primary);
  border-color: var(--primary);
}

.todo-item .tt {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13.5px;
  color: var(--text-primary);
}

.todo-item.done .tt {
  color: var(--text-muted);
  text-decoration: line-through;
}

.todo-item .tag {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
}

/* 关于项目 */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

.about-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  transition: border-color .2s var(--ease);
}

.about-tile:hover {
  border-color: var(--primary);
}

.about-tile .ai {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
}

.about-tile .ai svg {
  width: 20px;
  height: 20px;
}

.about-tile .an {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.about-tile .as {
  font-size: 12px;
  color: var(--text-muted);
}

/* ================= 演示页通用组件 ================= */
.demo-grid {
  display: grid;
  gap: 20px;
}

.demo-grid.c2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.demo-grid.c3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.demo-grid.c4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1180px) {

  .demo-grid.c3,
  .demo-grid.c4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {

  .demo-grid.c2,
  .demo-grid.c3,
  .demo-grid.c4 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
}

.tile .th {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.tile .tb {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}

.tile-ico {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
}

.tile-ico svg {
  width: 20px;
  height: 20px;
}

.tile-ico i {
  font-size: 18px;
}

.big-stat {
  font-size: 30px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  background: var(--bg-hover);
  color: var(--text-secondary);
}

.demo-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 52px 20px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

.demo-empty svg {
  width: 34px;
  height: 34px;
  opacity: .45;
}

.code-box {
  padding: 16px 18px;
  border-radius: var(--radius-card);
  background: #0f1424;
  color: #c7d0e0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.7;
  overflow: auto;
  white-space: pre;
}

/* 结果页 / 异常页 */
.result-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 56px 20px;
  text-align: center;
}

.result-ico {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-ico svg {
  width: 44px;
  height: 44px;
}

.result-h {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
}

.result-p {
  max-width: 440px;
  font-size: 14px;
  color: var(--text-muted);
}

.err-num {
  font-size: 84px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--primary);
}

@media (max-width: 640px) {

  .modal {
    width: calc(100vw - 24px);
    max-width: none;
  }

  .m-head {
    padding: 16px;
  }

  .m-body {
    padding: 16px;
  }

  .m-foot {
    padding: 12px 16px;
  }

  .quick {
    grid-template-columns: minmax(0, 1fr);
  }

  .p-rows {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero {
    padding: 20px;
  }

  .hero-metrics {
    gap: 10px;
    margin-top: 18px;
  }

  .data-row {
    flex-wrap: wrap;
  }

  .toolbar .input,
  .toolbar select {
    flex: 1 1 140px;
    width: auto;
  }
}

@media (max-width: 400px) {
  .content {
    padding: 10px;
  }

  .kpi-value {
    font-size: 19px;
  }

  .card-title {
    font-size: 15px;
  }

  .page-h {
    font-size: 18px;
  }

  .card {
    padding: 14px;
  }
}

/* ========== 加载体验：首屏遮罩 / 顶部进度条 / 页面切换 / 骨架屏 ========== */

/* 首屏加载遮罩 */
.boot-mask {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-page);
  transition: opacity .45s var(--ease), visibility .45s var(--ease);
}

.boot-mask.is-done {
  opacity: 0;
  visibility: hidden;
}

.boot-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.boot-logo {
  position: relative;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #7ea1ff);
  box-shadow: 0 10px 30px var(--primary-glow);
  animation: bootPulse 1.8s var(--ease) infinite;
}

.boot-logo::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 22px;
  border: 2px solid rgba(93, 135, 255, .25);
  border-top-color: var(--primary);
  animation: bootSpin .9s linear infinite;
}

.boot-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .5px;
  color: var(--text-primary);
}

.boot-desc {
  margin-top: -10px;
  font-size: 12px;
  color: var(--text-muted);
}

.boot-bar {
  width: 180px;
  height: 3px;
  border-radius: 3px;
  background: var(--bg-hover);
  overflow: hidden;
}

.boot-bar i {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  animation: bootSlide 1.2s var(--ease) infinite;
}

@keyframes bootSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes bootPulse {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes bootSlide {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(320%);
  }
}

/* 顶部加载进度条 */
.top-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 10000;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s var(--ease);
}

.top-progress.is-on {
  opacity: 1;
}

.top-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  box-shadow: 0 0 8px var(--primary-glow);
  transition: width .3s var(--ease);
}

/* 页面切换入场动效 */
.content.page-enter {
  animation: pageIn .32s var(--ease) both;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* 骨架屏 */
.sk-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.sk-card {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}

.sk {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  background: var(--bg-hover);
}

.sk::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .75), transparent);
  animation: skShimmer 1.25s infinite;
}

.sk-line {
  height: 12px;
  margin-bottom: 10px;
}

.sk-line:last-child {
  margin-bottom: 0;
}

.sk-line.w30 {
  width: 30%;
}

.sk-line.w40 {
  width: 40%;
}

.sk-line.w60 {
  width: 60%;
}

.sk-line.w80 {
  width: 80%;
}

.sk-line.lg {
  height: 20px;
  margin-bottom: 14px;
}

.sk-num {
  width: 58%;
  height: 26px;
  margin-bottom: 12px;
}

.sk-block {
  height: 168px;
}

.sk-block.sm {
  height: 92px;
}

@keyframes skShimmer {
  100% {
    transform: translateX(100%);
  }
}

/* WebSocket 网关日志 */
.ws-log {
  max-height: 260px;
  overflow: auto;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 12px;
  background: #0f1424;
  color: #c9d4ea;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-all;
}

.ws-log > div {
  padding: 1px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, .05);
}

.ws-log > div:last-child {
  border-bottom: 0;
}

.ws-log .empty {
  padding: 20px 0;
  color: #7d8aa8;
}

@media (prefers-reduced-motion: reduce) {
  .boot-logo,
  .boot-logo::after,
  .boot-bar i,
  .sk::after,
  .content.page-enter {
    animation: none;
  }

  .top-progress i {
    transition: none;
  }
}