/* Ant Design 视觉覆盖：整站侧栏/顶栏/按钮/卡片，业务 DOM 与 JS 保持不变 */
:root {
  --antd-primary: #1677ff;
  --antd-primary-hover: #4096ff;
  --antd-primary-active: #0958d9;
  --antd-primary-bg: #e6f4ff;
  --antd-sider: #f7f9fb;
  --antd-sider-item: #eef2f6;
  --antd-sider-text: rgba(17, 34, 51, 0.78);
  --antd-sider-text-strong: #112233;
  --antd-sider-text-muted: rgba(17, 34, 51, 0.45);
  --antd-header-h: 56px;
}

body.ant-theme {
  --primary: #1677ff;
  --primary-hover: #4096ff;
  --primary-light: #e6f4ff;
  --primary-active: #0958d9;
  --primary-border: #91caff;
  --sidebar-width: 232px;
  --el-color-primary: #1677ff;
  --el-color-primary-light-3: #4096ff;
  --el-color-primary-light-5: #69b1ff;
  --el-color-primary-light-7: #91caff;
  --el-color-primary-light-8: #bae0ff;
  --el-color-primary-light-9: #e6f4ff;
  --el-color-primary-dark-2: #0958d9;
  --el-color-primary-rgb: 22, 119, 255;
  --el-border-radius-base: 6px;
  --el-brand-color-1: #e6f4ff;
  --el-brand-color-2: #bae0ff;
  --el-brand-color-3: #91caff;
  --el-brand-color-4: #69b1ff;
  --el-brand-color-5: #4096ff;
  --el-brand-color-6: #1677ff;
  --el-brand-color-7: #0958d9;
  --v3-sidebar-menu-hover-bg-color: #1677ff;
  --sidebarActiveTextColor: #1677ff;
  --Color-Primary-color-primary-light-9: #e6f4ff;
  --Brand-Brand-5-hover: #4096ff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* ===== 浅色侧栏（与识客页 mist 一致） ===== */
body.ant-theme .sidebar-container,
body.ant-theme .has-logo.sidebar-container {
  background: var(--antd-sider) !important;
  width: 232px !important;
  box-shadow: 1px 0 0 #e8edf2;
}
body.ant-theme .layout-logo-container {
  height: var(--antd-header-h);
  background: #eef2f6 !important;
  border-bottom: 0 !important;
}
body.ant-theme .layout-logo-brand-text {
  color: var(--antd-sider-text-strong) !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  letter-spacing: 0.2px;
}
body.ant-theme #sidebarMenu.el-menu,
body.ant-theme #sidebarMenu .el-menu {
  background: transparent !important;
  border-right: 0 !important;
}
body.ant-theme #sidebarMenu .el-menu-item,
body.ant-theme #sidebarMenu .el-sub-menu__title {
  color: var(--antd-sider-text) !important;
  height: 40px !important;
  line-height: 40px !important;
  margin: 4px 8px !important;
  width: auto !important;
  border-radius: 6px !important;
  background: transparent !important;
}
body.ant-theme #sidebarMenu .el-menu-item:hover,
body.ant-theme #sidebarMenu .el-sub-menu__title:hover {
  color: var(--antd-sider-text-strong) !important;
  background: rgba(22, 119, 255, 0.08) !important;
}
body.ant-theme #sidebarMenu .el-sub-menu.is-opened > .el-sub-menu__title {
  color: var(--antd-sider-text-strong) !important;
}
body.ant-theme #sidebarMenu .el-sub-menu__icon-arrow {
  color: var(--antd-sider-text-muted) !important;
}
body.ant-theme #sidebarMenu .el-menu-item.is-active,
body.ant-theme #sidebarMenu .el-menu-item.active,
body.ant-theme #sidebarMenu .nav-item.active,
body.ant-theme #sidebarMenu .nav-item.is-active {
  color: #1677ff !important;
  background: #e6f4ff !important;
}
body.ant-theme #sidebarMenu .el-menu--inline {
  background: var(--antd-sider-item) !important;
  padding: 0 0 8px !important;
  margin: 0 8px !important;
  border-radius: 6px;
}
body.ant-theme #sidebarMenu .el-menu--inline .el-menu-item {
  padding-left: 40px !important;
  height: 36px !important;
  line-height: 36px !important;
  margin: 2px 0 !important;
}
body.ant-theme #sidebarMenu .svg-icon {
  color: inherit !important;
}
body.ant-theme #sidebarMenu .el-scrollbar__bar,
body.ant-theme .sidebar-container .el-scrollbar__thumb {
  background: rgba(17, 34, 51, 0.2) !important;
}
body.ant-theme .layout-task-container {
  background: #eef2f6 !important;
  border-top: 1px solid #e8edf2 !important;
  padding: 12px !important;
}
body.ant-theme .sidebar-token-label,
body.ant-theme .sidebar-token-hint {
  color: var(--antd-sider-text-muted) !important;
}
body.ant-theme .sidebar-token-row input {
  background: #fff !important;
  border: 1px solid #d9d9d9 !important;
  color: var(--antd-sider-text-strong) !important;
  border-radius: 6px;
}
body.ant-theme .sidebar-token-row input::placeholder {
  color: rgba(17, 34, 51, 0.35);
}
body.ant-theme .sidebar-token-row button {
  background: var(--antd-primary) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 6px;
}
body.ant-theme .corp-switcher-trigger {
  color: var(--antd-sider-text-strong) !important;
}
body.ant-theme .running-status-entry {
  color: var(--antd-sider-text) !important;
}
body.ant-theme .corp-switcher-panel {
  background: #fff;
  color: rgba(0, 0, 0, 0.88);
}

/* ===== 顶栏 + 内容区 ===== */
body.ant-theme .main-container {
  background: #f5f5f5 !important;
  margin-left: 232px !important;
}
body.ant-theme .antd-topbar {
  height: var(--antd-header-h);
  padding: 0 24px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
  overflow: visible;
  box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
}
body.ant-theme .antd-topbar-title {
  font-size: 16px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.88);
  line-height: 1.3;
}
body.ant-theme .antd-topbar-desc {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.45);
  margin-top: 2px;
}
body.ant-theme .antd-topbar-extra {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  position: relative;
  z-index: 21;
}
body.ant-theme .antd-topbar-link {
  height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  color: rgba(0, 0, 0, 0.88);
  font-size: 14px;
  line-height: 32px;
  text-decoration: none;
  white-space: nowrap;
}
body.ant-theme .antd-topbar-link:hover {
  background: #f5f5f5;
  color: rgba(0, 0, 0, 0.88);
}
body.ant-theme .antd-shell-user {
  position: relative;
  margin-left: 4px;
}
body.ant-theme .antd-shell-user-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 8px 0 4px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(0, 0, 0, 0.88);
  font: inherit;
  cursor: pointer;
}
body.ant-theme .antd-shell-user-trigger:hover,
body.ant-theme .antd-shell-user-trigger[aria-expanded="true"] {
  background: #f5f5f5;
}
body.ant-theme .antd-shell-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--antd-primary, #1677ff);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
body.ant-theme .antd-shell-user-name {
  font-size: 14px;
  max-width: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.ant-theme .antd-shell-user-caret {
  flex-shrink: 0;
  color: rgba(0, 0, 0, 0.45);
  transition: transform 0.18s ease;
}
body.ant-theme .antd-shell-user-trigger[aria-expanded="true"] .antd-shell-user-caret {
  transform: rotate(180deg);
}
body.ant-theme .antd-shell-user-menu {
  position: fixed;
  top: 50px;
  right: 24px;
  width: 208px;
  z-index: 1100;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12),
    0 9px 28px 8px rgba(0, 0, 0, 0.05);
  padding: 4px;
}
body.ant-theme .antd-shell-user-menu.hidden {
  display: none;
}
body.ant-theme .antd-shell-user-meta {
  padding: 10px 12px 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid #f0f0f0;
}
body.ant-theme .antd-shell-user-meta-name {
  font-size: 14px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.88);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.ant-theme .antd-shell-user-meta-role {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.45);
  margin-top: 2px;
}
body.ant-theme .antd-shell-user-meta-role:empty {
  display: none;
}
body.ant-theme .antd-shell-user-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 7px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(0, 0, 0, 0.88);
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}
body.ant-theme .antd-shell-user-item:hover {
  background: #f5f5f5;
}
body.ant-theme .antd-shell-user-item.is-danger {
  color: #ff4d4f;
}
body.ant-theme .antd-shell-user-item.is-danger:hover {
  background: #fff1f0;
}
body.ant-theme .app-main,
body.ant-theme .app-scrollbar {
  background: #f5f5f5 !important;
}
body.ant-theme .app-scrollbar {
  padding: 16px 24px 24px;
}
body.ant-theme .yw-container {
  background: transparent;
}
body.ant-theme .yw-header {
  background: transparent !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
body.ant-theme .yw-header .font-16 {
  font-size: 16px !important;
  font-weight: 600 !important;
  color: rgba(0, 0, 0, 0.88);
}
body.ant-theme .yw-header.mar-bt16:has(> .font-16.font-w500:only-child) {
  display: none;
}

/* ===== 卡片 / 表格 / 按钮 ===== */
body.ant-theme .content-card {
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
body.ant-theme .card-head {
  border-bottom: 1px solid #f0f0f0;
  padding: 12px 16px;
}
body.ant-theme .card-head h2 {
  font-size: 16px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.88);
}
body.ant-theme .el-button {
  height: 32px;
  padding: 4px 15px;
  border-radius: 6px;
  font-weight: 400;
  box-shadow: none !important;
}
body.ant-theme .el-button:not(.el-button--primary):not(.el-button--danger):not(.el-button--success):not(.el-button--warning):not(.is-text):not(.is-link) {
  background: #fff !important;
  border: 1px solid #d9d9d9 !important;
  color: rgba(0, 0, 0, 0.88) !important;
}
body.ant-theme .el-button:not(.el-button--primary):not(.el-button--danger):not(.el-button--success):not(.is-text):not(.is-link):hover {
  color: #4096ff !important;
  border-color: #4096ff !important;
}
body.ant-theme .el-button--primary,
body.ant-theme .el-button.el-button--primary {
  --el-button-bg-color: #1677ff;
  --el-button-border-color: #1677ff;
  --el-button-hover-bg-color: #4096ff;
  --el-button-hover-border-color: #4096ff;
  --el-button-active-bg-color: #0958d9;
  background-color: #1677ff !important;
  border-color: #1677ff !important;
  color: #fff !important;
}
body.ant-theme .el-button--primary:hover {
  background-color: #4096ff !important;
  border-color: #4096ff !important;
}
body.ant-theme .el-button.is-text,
body.ant-theme .el-button.is-link {
  color: #1677ff !important;
  background: transparent !important;
  border-color: transparent !important;
}
body.ant-theme .el-button--danger,
body.ant-theme .el-button.el-button--danger {
  background: #fff !important;
  border-color: #ff4d4f !important;
  color: #ff4d4f !important;
}
body.ant-theme .el-table th.el-table__cell,
body.ant-theme .el-table__header th,
body.ant-theme .data-table th {
  background: #fafafa !important;
  color: rgba(0, 0, 0, 0.88) !important;
  font-weight: 600 !important;
}
body.ant-theme .data-table {
  border-color: #f0f0f0;
}
body.ant-theme .el-input__wrapper,
body.ant-theme .el-select__wrapper {
  border-radius: 6px !important;
}
body.ant-theme .el-input__wrapper.is-focus,
body.ant-theme .el-select__wrapper.is-focused {
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.1) !important;
}
body.ant-theme .el-input__wrapper.is-focus,
body.ant-theme .el-select__wrapper.is-focused,
body.ant-theme .el-input.is-focus .el-input__wrapper {
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.1) !important;
}
body.ant-theme a,
body.ant-theme .el-link {
  color: #1677ff;
}
body.ant-theme .hint {
  color: rgba(0, 0, 0, 0.45);
}

/* 标签 / 开关 / 勾选 / 分页 / Tab */
body.ant-theme .el-tag {
  border-radius: 4px;
}
body.ant-theme .el-tag--primary,
body.ant-theme .el-tag.el-tag--primary {
  --el-tag-bg-color: #e6f4ff;
  --el-tag-border-color: #91caff;
  --el-tag-text-color: #1677ff;
  background-color: #e6f4ff !important;
  border-color: #91caff !important;
  color: #1677ff !important;
}
body.ant-theme .el-checkbox__input.is-checked .el-checkbox__inner,
body.ant-theme .el-checkbox__input.is-indeterminate .el-checkbox__inner {
  background-color: #1677ff !important;
  border-color: #1677ff !important;
}
body.ant-theme .el-radio__input.is-checked .el-radio__inner {
  background: #1677ff !important;
  border-color: #1677ff !important;
}
body.ant-theme .el-switch.is-checked .el-switch__core {
  background-color: #1677ff !important;
  border-color: #1677ff !important;
}
body.ant-theme .el-tabs__item.is-active {
  color: #1677ff !important;
}
body.ant-theme .el-tabs__active-bar {
  background-color: #1677ff !important;
}
body.ant-theme .el-tabs__item:hover {
  color: #4096ff !important;
}
body.ant-theme .el-pagination button:hover,
body.ant-theme .el-pager li:hover {
  color: #1677ff;
}
body.ant-theme .el-pager li.is-active {
  background-color: #1677ff !important;
  color: #fff !important;
  border-radius: 6px;
}
body.ant-theme .el-pagination .el-pager li.is-active {
  background-color: #1677ff !important;
  color: #fff !important;
}

/* 弹窗 */
body.ant-theme .el-dialog,
body.ant-theme .el-overlay-dialog .el-dialog,
body.ant-theme .distribute-tags-dialog,
body.ant-theme .modal-card {
  border-radius: 8px;
  overflow: hidden;
}
body.ant-theme .el-dialog__header,
body.ant-theme .distribute-tags-head {
  border-bottom: 1px solid #f0f0f0;
}

/* 工作台卡片 */
body.ant-theme .dashboard-cards .stat-card,
body.ant-theme .dashboard-card {
  border-radius: 8px;
  border: 1px solid #f0f0f0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

/* ===== 识客链接（官方 antd 结构） ===== */
.trk-antd .ant-card {
  margin-bottom: 16px;
}
.trk-antd .ant-page-header {
  padding: 0 0 16px;
  background: transparent;
}
.trk-antd .trk-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trk-antd .trk-short {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.trk-antd .trk-short code {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: #1677ff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trk-antd .trk-antd-select.ant-input {
  cursor: pointer;
  appearance: none;
  height: 32px;
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23000000' fill-opacity='0.45' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.trk-antd .ant-form-item {
  margin-bottom: 16px;
}

/* 链接管理：建链条 + 列表同卡 */
.trk-count {
  font-weight: 400;
  color: rgba(0, 0, 0, 0.45);
  font-size: 14px;
  margin-left: 4px;
}
#trkLinkKeyword {
  width: 240px;
}
#trkLinkGroupFilter {
  width: 160px;
}
.trk-card-extra {
  display: flex;
  align-items: center;
  gap: 8px;
}
.trk-col-check,
.trk-check-col {
  width: 40px;
  text-align: center;
}
.trk-check-col input,
.trk-link-check {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  accent-color: #1677ff;
}
.trk-links-card .ant-card-head-wrapper {
  align-items: center;
}
.trk-create-kicker {
  font-size: 13px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.88);
  margin-bottom: 10px;
}
.trk-create-wrap {
  padding: 16px 24px 14px;
  background: #fafafa;
  border-bottom: 1px solid #f0f0f0;
}
.trk-domain-bar {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px dashed #f0f0f0;
}
.trk-domain-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.trk-domain-row > label {
  flex: 0 0 auto;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.65);
  line-height: 32px;
}
#trkDomainScope {
  width: auto;
  min-width: 148px;
  max-width: 240px;
  flex: 0 0 auto;
}
.trk-domain-opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.65);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.trk-domain-opt input {
  margin: 0;
}
.trk-domain-input {
  display: flex;
  align-items: stretch;
  min-width: 0;
  flex: 1 1 280px;
  max-width: 420px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}
.trk-domain-input:focus-within {
  border-color: #1677ff;
  box-shadow: 0 0 0 2px rgba(5, 145, 255, 0.1);
}
.trk-domain-prefix {
  flex: 0 0 auto;
  padding: 0 8px 0 12px;
  line-height: 30px;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.45);
  background: #fafafa;
  border-right: 1px solid #f0f0f0;
}
.trk-domain-input .ant-input {
  border: 0;
  box-shadow: none;
  border-radius: 0;
}
.trk-domain-hint {
  margin: 8px 0 0;
  color: rgba(0, 0, 0, 0.45);
  font-size: 12px;
  line-height: 1.55;
}
.trk-domain-status {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.5;
}
.trk-domain-status:empty {
  display: none;
}
.trk-domain-status.is-ok { color: #389e0d; }
.trk-domain-status.is-warn { color: #d48806; }
.trk-domain-status.is-err { color: #cf1322; }
.trk-probe-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.trk-probe-text {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.45);
  flex: 1 1 220px;
  min-width: 0;
  line-height: 1.5;
}
.trk-probe-text.is-ok { color: #389e0d; }
.trk-probe-text.is-err { color: #cf1322; }
.trk-probe-text.is-warn { color: #d48806; }
.trk-probe-checks {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 8px;
}
.trk-probe-checks .trk-domain-opt {
  margin-left: 0;
}
.trk-probe-wecom {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.trk-probe-wecom .ant-input,
.trk-probe-wecom .trk-antd-select {
  width: auto;
  min-width: 140px;
  max-width: 260px;
}
#trkProbeWebhook,
#trkProbeWebhookMain {
  min-width: 280px;
  max-width: 520px;
  flex: 1 1 280px;
}
.trk-probe-slow-lab,
.trk-probe-slow-unit {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.65);
  white-space: nowrap;
}
#trkProbeSlowSec,
#trkProbeSlowSecMain {
  width: 72px;
  min-width: 72px;
  max-width: 80px;
  flex: 0 0 72px;
  text-align: center;
}
.trk-probe-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.trk-probe-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  height: 24px;
  border-radius: 12px;
  background: #e6f4ff;
  color: #1677ff;
  font-size: 12px;
  line-height: 24px;
}
.trk-probe-chip button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
  font-size: 14px;
  line-height: 1;
}
.trk-probe-wecom-hint {
  margin: 6px 0 0;
  color: rgba(0, 0, 0, 0.45);
  font-size: 12px;
  line-height: 1.5;
}
.trk-probe-wecom-hint.is-err { color: #cf1322; }
.trk-create-bar {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.trk-create-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  width: 168px;
  flex-shrink: 0;
}
.trk-create-field.is-remark {
  width: 280px;
}
.trk-create-field.is-group {
  width: 200px;
}
.trk-group-combo {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.trk-group-combo-main {
  position: relative;
  min-width: 0;
}
.trk-group-combo [data-group-pick],
.trk-group-combo [data-group-custom] {
  width: 100%;
}
.trk-create-field.is-grow {
  flex: 0 0 auto;
  width: 42%;
  max-width: 360px;
}
.trk-create-field.is-tag {
  width: 200px;
}
.trk-create-field.is-action {
  width: auto;
  padding-top: 22px;
  flex-direction: row;
  align-items: flex-end;
  gap: 8px;
}
.trk-create-field label {
  font-size: 13px;
  line-height: 1.2;
  color: rgba(0, 0, 0, 0.65);
}
.trk-create-field.is-action .ant-btn {
  min-width: 88px;
}
.trk-batch-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 12px;
}
.trk-batch-modes label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.85);
  cursor: pointer;
}
.trk-batch-row {
  display: flex;
  gap: 12px;
}
.trk-batch-row .ant-form-item {
  flex: 1;
  margin-bottom: 12px;
}
.trk-batch-lines {
  width: 100%;
  min-height: 240px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.7;
  white-space: pre-wrap;
}
.trk-batch-hint {
  margin: 6px 0 0;
  color: rgba(0, 0, 0, 0.45);
  font-size: 12px;
  line-height: 1.55;
}
.trk-batch-result {
  max-height: 320px;
  overflow: auto;
  border: 1px solid #f0f0f0;
  border-radius: 6px;
}
.trk-batch-result-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid #f5f5f5;
  font-size: 13px;
}
.trk-batch-result-item:last-child {
  border-bottom: 0;
}
.trk-batch-result-item .trk-muted {
  flex: 0 0 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trk-batch-result-item code {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trk-batch-box {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #f0f0f0;
}
.trk-batch-grid-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.trk-batch-filled {
  margin-left: auto;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.45);
}
.trk-batch-grid {
  border: 1px solid #f0f0f0;
  border-radius: 6px;
  max-height: 360px;
  overflow: auto;
  background: #fff;
}
.trk-batch-grid-head,
.trk-batch-grid-row {
  display: grid;
  grid-template-columns: 36px 168px minmax(0, 1fr) 32px;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
}
.trk-batch-grid-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fafafa;
  border-bottom: 1px solid #f0f0f0;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.45);
}
.trk-batch-grid-row + .trk-batch-grid-row {
  border-top: 1px solid #f5f5f5;
}
.trk-batch-grid-row .is-idx,
.trk-batch-grid-head .is-idx {
  text-align: center;
  color: rgba(0, 0, 0, 0.25);
  font-size: 12px;
}
.trk-batch-grid-row .ant-input {
  height: 28px;
  padding: 0 8px;
  font-size: 13px;
}
.trk-batch-grid-row .ant-btn {
  width: 28px;
  min-width: 28px;
  padding: 0;
  color: rgba(0, 0, 0, 0.45);
}
.trk-create-hint {
  margin: 8px 0 0;
  color: rgba(0, 0, 0, 0.45);
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
}
.trk-create-hint a {
  color: #1677ff;
}
.trk-links-table .ant-table-content {
  overflow-x: auto;
}
.trk-links-table table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
}
.trk-col-check { width: 40px; }
.trk-col-remark { width: auto; }
.trk-col-group { width: 120px; }
.trk-col-tag { width: 140px; }
.trk-col-link { width: 220px; max-width: 280px; }
.trk-col-target { width: 200px; max-width: 260px; }
.trk-col-num { width: 72px; }
.trk-col-time { width: 120px; }
.trk-col-ops { width: 108px; }
.trk-remark-col {
  white-space: nowrap;
}
.trk-tag-col {
  white-space: nowrap;
}
.trk-group-col {
  white-space: nowrap;
}
.trk-group-pill {
  display: inline-block;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  padding: 0 8px;
  height: 22px;
  line-height: 22px;
  border-radius: 4px;
  background: #f5f5f5;
  color: rgba(0, 0, 0, 0.65);
  font-size: 12px;
  cursor: pointer;
}
.trk-group-pill:hover {
  color: #1677ff;
  background: #e6f4ff;
}
.trk-group-pill.is-empty {
  background: transparent;
  color: rgba(0, 0, 0, 0.25);
  padding: 0;
  cursor: pointer;
}
.trk-tag-col .ant-tag {
  margin: 0;
}
.trk-links-main-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
}
.ant-table-content:has(.trk-links-main-table) {
  overflow-x: auto;
}
.trk-links-table .ant-table-thead > tr > th {
  padding: 12px 16px;
  vertical-align: middle;
  white-space: nowrap;
}
.trk-links-table .ant-table-tbody > tr > td {
  padding: 10px 16px;
  vertical-align: middle;
}
.trk-links-table .ant-table-placeholder .ant-empty {
  margin: 32px 0;
}
.trk-links-table .ant-table-tbody > tr.is-new > td {
  background: #e6f4ff;
  transition: background 0.6s ease;
}
.trk-num-col {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.trk-ops-col {
  text-align: right;
  white-space: nowrap;
}
.trk-remark-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.trk-remark-cell .ant-tag {
  margin: 0;
  flex: 0 0 auto;
}
.trk-link-name {
  font-weight: 500;
  color: rgba(0, 0, 0, 0.88);
  white-space: nowrap;
  line-height: 22px;
}
.trk-link-name.is-empty {
  font-weight: 400;
  color: rgba(0, 0, 0, 0.25);
}
.trk-link-url {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}
.trk-link-url code {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  line-height: 22px;
  color: #1677ff;
  background: transparent;
  padding: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trk-icon-btn.ant-btn {
  width: 22px;
  height: 22px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(0, 0, 0, 0.45);
  flex-shrink: 0;
}
.trk-icon-btn.ant-btn:hover {
  color: #1677ff;
  background: rgba(22, 119, 255, 0.08);
}
.trk-link-tags {
  margin-top: 6px;
}
.trk-link-tags .ant-tag {
  margin-right: 0;
}
.trk-target {
  color: rgba(0, 0, 0, 0.65);
  display: block;
}
.trk-target:hover {
  color: #1677ff;
}
.trk-stat-num {
  font-weight: 600;
  color: rgba(0, 0, 0, 0.88);
}
.trk-stat-num.is-zero {
  font-weight: 400;
  color: rgba(0, 0, 0, 0.25);
}
.trk-time {
  color: rgba(0, 0, 0, 0.65);
  white-space: nowrap;
}
.trk-muted {
  color: rgba(0, 0, 0, 0.25);
}
.trk-empty-sub {
  margin-top: 6px;
  color: rgba(0, 0, 0, 0.45);
  font-size: 13px;
}
.trk-modal-p {
  margin: 0;
  color: rgba(0, 0, 0, 0.85);
}
.trk-modal-code {
  margin: 8px 0 0;
  color: rgba(0, 0, 0, 0.45);
  font-size: 13px;
}

/* 点击记录：KPI + 折线 + 排行 */
.trk-kpi-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.trk-stats-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.trk-stats-bar-label {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.45);
}
.trk-stats-bar .trk-antd-select {
  width: 180px;
  max-width: 100%;
}
.trk-stats-bar-hint {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.45);
}
.trk-kpi {
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  padding: 18px 20px 16px;
  min-width: 0;
}
.trk-kpi-label {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.45);
  line-height: 1.4;
}
.trk-kpi-value {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.4px;
  color: rgba(0, 0, 0, 0.88);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.trk-kpi-sub {
  margin-top: 8px;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.45);
  line-height: 1.4;
}
.trk-kpi-sub.is-click {
  cursor: pointer;
}
.trk-kpi-sub.is-click:hover {
  color: #1677ff;
}
#trkKpiTagCard.is-click {
  cursor: pointer;
}
#trkKpiTagCard.is-click:hover {
  border-color: #91caff;
}
.trk-kpi-sub.is-up { color: #52c41a; }
.trk-kpi-sub.is-down { color: #ff4d4f; }
.trk-kpi-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}
.trk-kpi-foot .trk-kpi-sub { margin-top: 0; }
.trk-kpi-spark {
  width: 88px;
  height: 28px;
  flex-shrink: 0;
}
.trk-chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
  gap: 16px;
  margin-bottom: 16px;
  align-items: stretch;
}
.trk-chart-grid .ant-card {
  margin-bottom: 0;
}
.trk-rank-slot {
  position: relative;
  min-height: 0;
}
.trk-rank-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.trk-trend-card .ant-card-body,
.trk-rank-card .ant-card-body {
  padding: 8px 20px 16px;
}
.trk-rank-card .ant-card-head {
  flex-shrink: 0;
}
.trk-rank-card .ant-card-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.trk-trend-card .ant-card-head-wrapper,
.trk-rank-card .ant-card-head-wrapper {
  flex-wrap: wrap;
  gap: 8px 12px;
}
.trk-trend-card .ant-card-head-title {
  padding: 0;
  overflow: visible;
}
.trk-chart-extra {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.trk-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: 4px;
}
.trk-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.45);
}
.trk-legend-item::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1677ff;
}
.trk-legend-item.is-people::before { background: #13c2c2; }
.trk-legend-item.is-identified::before { background: #722ed1; }
.trk-seg {
  display: inline-flex;
  background: #f5f5f5;
  border-radius: 6px;
  padding: 2px;
}
.trk-seg-btn {
  border: 0;
  background: transparent;
  height: 26px;
  padding: 0 10px;
  border-radius: 4px;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.65);
  cursor: pointer;
  line-height: 26px;
}
.trk-seg-btn:hover { color: rgba(0, 0, 0, 0.88); }
.trk-seg-btn.is-active {
  background: #fff;
  color: #1677ff;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.trk-chart-wrap {
  position: relative;
}
.trk-trend-chart {
  width: 100%;
  height: 240px;
}
.trk-trend-chart svg {
  display: block;
  width: 100%;
  height: 240px;
}
.trk-chart-tip {
  position: absolute;
  z-index: 3;
  min-width: 128px;
  background: #fff;
  border: 1px solid #f0f0f0;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.85);
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 12px));
  white-space: nowrap;
}
.trk-chart-tip b {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
}
.trk-chart-empty {
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(0, 0, 0, 0.25);
  font-size: 13px;
}
.trk-rank-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-right: 10px;
  scrollbar-gutter: stable;
}
.trk-rank-item {
  cursor: pointer;
  border-radius: 6px;
  padding: 2px 4px 2px 0;
}
.trk-rank-item:hover .trk-rank-name { color: #1677ff; }
.trk-rank-item.is-active .trk-rank-name { color: #1677ff; font-weight: 500; }
.trk-rank-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.trk-rank-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.85);
}
.trk-rank-key {
  flex-shrink: 0;
  max-width: 38%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.45);
  font-variant-numeric: tabular-nums;
  padding-right: 2px;
}
.trk-rank-num {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: rgba(0, 0, 0, 0.88);
}
.trk-rank-track {
  height: 6px;
  background: #f5f5f5;
  border-radius: 99px;
  overflow: hidden;
}
.trk-rank-track > span {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #69b1ff, #1677ff);
}
.trk-rank-empty {
  color: rgba(0, 0, 0, 0.25);
  font-size: 13px;
  text-align: center;
  padding: 36px 8px;
}
.antd-shell-modal-panel.is-rank-zoom {
  width: 800px;
  height: min(80vh, 720px);
  max-height: calc(100vh - 64px);
}
.antd-shell-modal-panel.is-rank-zoom .antd-shell-modal-body {
  padding: 16px 20px 20px;
}
.trk-rank-list.is-zoom {
  flex: none;
  overflow: visible;
  gap: 14px;
}
.trk-rank-list.is-zoom .trk-rank-meta {
  align-items: center;
}
.trk-rank-list.is-zoom .trk-rank-name {
  flex: 1;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  font-size: 14px;
  line-height: 1.4;
}
.trk-rank-list.is-zoom .trk-rank-key {
  max-width: 36%;
  font-size: 13px;
}
.trk-rank-list.is-zoom .trk-rank-track {
  height: 10px;
}
.trk-rank-idx {
  flex-shrink: 0;
  width: 24px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: rgba(0, 0, 0, 0.45);
}
.trk-rank-people {
  flex-shrink: 0;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.45);
  font-variant-numeric: tabular-nums;
}
.trk-rank-card .ant-card-extra {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.antd-shell-modal-panel.is-rank-zoom .antd-shell-modal-head {
  position: relative;
  z-index: 2;
  gap: 12px;
}
.antd-shell-modal-panel.is-rank-zoom .antd-shell-modal-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trk-rank-zoom-extra {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.trk-date-picker {
  position: relative;
}
.trk-date-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #fff;
  color: rgba(0, 0, 0, 0.88);
  font-size: 12px;
  line-height: 24px;
  cursor: pointer;
}
.trk-date-btn:hover {
  border-color: #1677ff;
  color: #1677ff;
}
.trk-date-btn.is-open,
.trk-date-btn.is-active {
  border-color: #1677ff;
  color: #1677ff;
}
.trk-date-btn svg {
  flex-shrink: 0;
}
.trk-date-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 8;
  width: 280px;
  padding: 10px 10px 8px;
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12);
  user-select: none;
}
.trk-date-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px 8px;
}
.trk-date-month {
  font-size: 13px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.88);
}
.trk-date-nav {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(0, 0, 0, 0.45);
  font-size: 18px;
  line-height: 22px;
  cursor: pointer;
}
.trk-date-nav:hover:not(:disabled) {
  background: #f5f5f5;
  color: rgba(0, 0, 0, 0.88);
}
.trk-date-nav:disabled {
  color: rgba(0, 0, 0, 0.15);
  cursor: not-allowed;
}
.trk-date-week,
.trk-date-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.trk-date-week span {
  height: 28px;
  text-align: center;
  font-size: 12px;
  line-height: 28px;
  color: rgba(0, 0, 0, 0.45);
}
.trk-date-cell {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.88);
  cursor: pointer;
}
.trk-date-cell span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.trk-date-cell.is-other {
  color: rgba(0, 0, 0, 0.25);
}
.trk-date-cell.is-in {
  background: #e6f4ff;
}
.trk-date-cell.is-start {
  background: linear-gradient(90deg, transparent 50%, #e6f4ff 50%);
}
.trk-date-cell.is-end {
  background: linear-gradient(90deg, #e6f4ff 50%, transparent 50%);
}
.trk-date-cell.is-start.is-end {
  background: transparent;
}
.trk-date-cell.is-start span,
.trk-date-cell.is-end span {
  background: #1677ff;
  color: #fff;
}
.trk-date-cell.is-today span {
  box-shadow: inset 0 0 0 1px #1677ff;
}
.trk-date-cell:hover:not(:disabled) span {
  background: #f5f5f5;
}
.trk-date-cell.is-start:hover span,
.trk-date-cell.is-end:hover span {
  background: #1677ff;
}
.trk-date-cell:disabled,
.trk-date-cell.is-disabled {
  color: rgba(0, 0, 0, 0.15);
  cursor: not-allowed;
  background: transparent;
}
.trk-date-foot {
  display: flex;
  gap: 8px;
  padding-top: 8px;
  margin-top: 4px;
  border-top: 1px solid #f0f0f0;
}
.trk-date-foot button {
  flex: 1;
  height: 26px;
  border: 0;
  border-radius: 6px;
  background: #f5f5f5;
  color: rgba(0, 0, 0, 0.65);
  font-size: 12px;
  cursor: pointer;
}
.trk-date-foot button:hover {
  color: #1677ff;
  background: #e6f4ff;
}
#trkRankZoomBtn:hover {
  color: #1677ff;
}
.trk-visit-extra {
  display: flex;
  align-items: center;
  gap: 8px;
}
#trkVisitLinkFilter { width: 160px; }
#trkVisitKeywordStandalone { width: 220px; }
#trkVisitsPager { flex-wrap: wrap; overflow: visible; }
.trk-page-size {
  position: relative;
}
#trkVisitsPageSizeBtn {
  width: 110px;
  text-align: left;
}
.trk-page-size-menu {
  position: fixed;
  z-index: 1200;
  min-width: 110px;
  padding: 4px;
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}
.trk-page-size-item {
  display: block;
  width: 100%;
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(0, 0, 0, 0.88);
  font-size: 14px;
  line-height: 32px;
  text-align: left;
  cursor: pointer;
}
.trk-page-size-item:hover {
  background: #f5f5f5;
}
.trk-page-size-item.is-on {
  color: #1677ff;
  font-weight: 500;
}
.trk-visits-table table {
  width: 100%;
  table-layout: fixed;
}
.trk-col-visit-time { width: 132px; }
.trk-col-visit-who { width: 16%; }
.trk-col-visit-id { width: 200px; }
.trk-col-visit-how { width: 108px; }
.trk-col-visit-remark { width: 140px; }
.trk-col-visit-src { width: 12%; }
.trk-col-visit-tags { width: 12%; }
.trk-col-visit-num { width: 144px; }
.trk-visits-table .ant-table-thead > tr > th,
.trk-visits-table .ant-table-tbody > tr > td {
  padding: 12px 16px;
  vertical-align: middle;
  text-align: left;
}
.trk-visits-table .ant-table-thead th[data-sort] {
  cursor: pointer;
  user-select: none;
}
.trk-visits-table .ant-table-thead th[data-sort]:hover {
  color: rgba(0, 0, 0, 0.88);
  background: #fafafa;
}
.trk-th-sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
}
.trk-th-sort i {
  position: relative;
  width: 8px;
  height: 12px;
  flex: 0 0 8px;
}
.trk-th-sort i::before,
.trk-th-sort i::after {
  content: "";
  position: absolute;
  left: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
}
.trk-th-sort i::before {
  top: 0;
  border-bottom: 5px solid #bfbfbf;
}
.trk-th-sort i::after {
  bottom: 0;
  border-top: 5px solid #bfbfbf;
}
.trk-visits-table .ant-table-thead th.is-asc .trk-th-sort i::before {
  border-bottom-color: #1677ff;
}
.trk-visits-table .ant-table-thead th.is-desc .trk-th-sort i::after {
  border-top-color: #1677ff;
}
.trk-visits-table .ant-table-placeholder .ant-table-cell {
  text-align: center;
}
.trk-visits-table .trk-click-pill {
  text-align: left;
  min-width: 0;
}
.trk-who {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.trk-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: #1677ff;
  background: #e6f4ff;
}
.trk-avatar.is-staff {
  color: #d48806;
  background: #fff7e6;
}
.trk-avatar.is-unknown {
  color: rgba(0, 0, 0, 0.45);
  background: #f5f5f5;
  font-weight: 500;
}
.trk-who-name {
  min-width: 0;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.88);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
}
.trk-id {
  display: block;
  font-size: 12px;
  line-height: 22px;
  color: rgba(0, 0, 0, 0.65);
  background: transparent;
  padding: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trk-who-id {
  margin-top: 2px;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.45);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trk-src-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(0, 0, 0, 0.85);
}
.trk-src-more {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: left;
  color: inherit;
}
.trk-src-more .trk-src-name {
  flex: 1;
  min-width: 0;
  color: #1677ff;
}
.trk-src-count {
  flex: none;
  color: #1677ff;
  font-size: 12px;
  white-space: nowrap;
}
.trk-src-more:hover .trk-src-name,
.trk-src-more:hover .trk-src-count {
  color: #4096ff;
}
.trk-src-list {
  display: flex;
  flex-direction: column;
  border: 1px solid #f0f0f0;
  border-radius: 6px;
  overflow: hidden;
}
.trk-src-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #f5f5f5;
}
.trk-src-item:last-child {
  border-bottom: 0;
}
.trk-src-item-remark {
  flex: 0 0 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(0, 0, 0, 0.85);
}
.trk-src-item-remark.is-empty {
  color: rgba(0, 0, 0, 0.25);
}
.trk-src-item-url {
  flex: 1;
  min-width: 0;
  word-break: break-all;
  line-height: 1.5;
}
.trk-src-item-url a {
  color: #1677ff;
}
.trk-visit-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}
.trk-visit-tags .ant-tag {
  margin: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.trk-click-pill {
  display: inline-block;
  min-width: 28px;
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: rgba(0, 0, 0, 0.88);
}
.trk-click-pill.is-zero {
  font-weight: 400;
  color: rgba(0, 0, 0, 0.25);
}
#trkTagFailCard {
  margin-bottom: 16px;
}
#trkTagFailCard .ant-card-head {
  cursor: pointer;
  user-select: none;
}
#trkTagFailCard .ant-card-head-title {
  display: flex;
  align-items: center;
  gap: 6px;
}
#trkTagFailCard .trk-fold-caret {
  flex-shrink: 0;
  color: rgba(0, 0, 0, 0.45);
  transition: transform 0.18s ease;
}
#trkTagFailCard.is-collapsed .trk-fold-caret {
  transform: rotate(-90deg);
}
#trkTagFailCard.is-collapsed .ant-card-head {
  border-bottom: 0;
}
#trkTagFailCard.is-collapsed #trkTagFailTable {
  display: none;
}
.trk-col-fail-time { width: 132px; }
.trk-col-fail-who { width: 22%; }
.trk-col-fail-tag { width: 140px; }
.trk-col-fail-reason { width: auto; }
.trk-col-fail-ops { width: 132px; }
.trk-fail-reason {
  color: #cf1322;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trk-fail-ops {
  white-space: nowrap;
}
@media (max-width: 1280px) {
  .trk-kpi-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 960px) {
  .trk-create-bar {
    flex-wrap: wrap;
  }
  .trk-create-field.is-grow,
  .trk-create-field.is-action {
    flex: 1 1 100%;
    width: 100%;
    max-width: none;
  }
  .trk-create-field.is-action {
    justify-content: flex-start;
  }
  .trk-batch-row {
    flex-direction: column;
    gap: 0;
  }
  .trk-batch-grid-head,
  .trk-batch-grid-row {
    grid-template-columns: 28px 120px minmax(0, 1fr) 28px;
    gap: 6px;
    padding: 6px;
  }
  .trk-create-field:not(.is-grow):not(.is-action) {
    flex: 1 1 calc(50% - 6px);
    width: auto;
  }
  #trkLinkKeyword {
    width: 180px;
  }
  .trk-card-extra {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .trk-create-hint {
    white-space: normal;
  }
  .trk-kpi-row,
  .trk-chart-grid {
    grid-template-columns: 1fr;
  }
  .trk-rank-slot {
    position: static;
    min-height: 0;
  }
  .trk-rank-card {
    position: static;
  }
  .trk-rank-card .ant-card-body {
    overflow: visible;
  }
  .trk-rank-list {
    overflow: visible;
    flex: none;
  }
  .trk-visit-extra {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  #trkVisitLinkFilter,
  #trkVisitKeywordStandalone {
    width: 160px;
  }
}
body.trk-antd {
  margin: 0;
  background: #f5f5f5;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}
.trk-antd-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}
.antd-shell .antd-shell-content .ant-card:last-child {
  margin-bottom: 0;
}
.trk-antd .toast,
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 10px 18px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  z-index: 2000;
  max-width: 420px;
}
.hidden {
  display: none !important;
}

/* ===== 客服独立页 ===== */
body.ant-theme.kf-standalone-body {
  background: #f5f5f5;
}
body.ant-theme .kf-standalone-top {
  height: auto;
  min-height: 56px;
  padding: 12px 24px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
}
body.ant-theme .kf-standalone-title {
  font-size: 16px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.88);
}
body.ant-theme .kf-standalone-sub {
  color: rgba(0, 0, 0, 0.45);
}
body.ant-theme .kf-account-select,
body.ant-theme .kf-corp-select {
  height: 32px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  padding: 0 11px;
  background: #fff;
}
body.ant-theme .kf-layout {
  border: 1px solid #f0f0f0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
body.ant-theme .kf-conv-item.has-unread .kf-conv-name {
  color: #1677ff;
}
body.ant-theme .kf-input-row textarea {
  border-radius: 6px;
  border-color: #d9d9d9;
}
body.ant-theme .kf-input-row textarea:focus {
  border-color: #1677ff;
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.1);
  outline: none;
}

.sidebar-account {
  padding: 0 0 8px;
}
.sidebar-account-kicker {
  font-size: 12px;
  color: var(--antd-sider-text-muted, rgba(17, 34, 51, 0.45));
  margin-bottom: 4px;
}
.sidebar-account-name {
  font-size: 13px;
  color: var(--antd-sider-text-strong, #112233);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 8px;
}
.sidebar-logout-btn {
  height: 28px;
  padding: 0 10px;
  border: 1px solid #e8edf2;
  border-radius: 6px;
  background: #fff;
  color: var(--antd-sider-text-strong, #112233);
  font-size: 12px;
  cursor: pointer;
}
.sidebar-logout-btn:hover {
  background: #f0f4f8;
}
.sidebar-login-link {
  display: block;
  margin-top: 8px;
  color: var(--antd-sider-text, rgba(17, 34, 51, 0.78));
  font-size: 12px;
  text-decoration: none;
}
.sidebar-login-link:hover {
  color: var(--antd-sider-text-strong, #112233);
}
.acc-corp-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 8px;
}
.acc-corp-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}

.mobile-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-right: 4px;
  flex-shrink: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(0, 0, 0, 0.88);
  cursor: pointer;
}
.mobile-nav-toggle:hover,
.mobile-nav-toggle[aria-expanded="true"] {
  background: #f5f5f5;
  color: #1677ff;
}
.antd-topbar-titles {
  min-width: 0;
  flex: 1;
}

@media (max-width: 960px) {
  html,
  body.ant-theme,
  body.yiwei-theme {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100%;
    overflow-x: hidden;
  }
  body.ant-theme #app {
    max-width: 100%;
    min-width: 0;
  }
  body.ant-theme {
    --v3-sidebar-width: 232px;
    --antd-header-h: 52px;
  }
  body.mobile-sidebar-open {
    overflow: hidden;
  }
  body.ant-theme .app-wrapper.mobile.openSidebar[data-v-514a57fe],
  body.ant-theme .app-wrapper.mobile.openSidebar {
    position: relative !important;
    top: auto !important;
  }
  body.ant-theme .app-wrapper,
  body.ant-theme .main-container,
  body.ant-theme .app-main,
  body.ant-theme .app-scrollbar {
    max-width: 100%;
    min-width: 0;
  }
  body.ant-theme .sidebar-container,
  body.ant-theme .has-logo.sidebar-container,
  body.ant-theme .app-wrapper.mobile.hideSidebar .sidebar-container {
    height: 100dvh;
    max-height: 100dvh;
    width: min(232px, 86vw) !important;
    z-index: 1200;
    transform: translate3d(-110%, 0, 0) !important;
    transition: transform 0.28s ease;
    box-shadow: none;
    pointer-events: none;
  }
  body.ant-theme .app-wrapper.mobile.openSidebar:not(.hideSidebar) .sidebar-container,
  body.ant-theme .app-wrapper.openSidebar.mobile:not(.hideSidebar) .sidebar-container {
    transform: none !important;
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.16);
    pointer-events: auto;
  }
  body.ant-theme .main-container {
    margin-left: 0 !important;
  }
  body.ant-theme .antd-topbar {
    height: auto;
    min-height: var(--antd-header-h);
    padding: calc(env(safe-area-inset-top, 0px) + 8px) 12px 8px 8px;
    gap: 8px;
  }
  body.ant-theme .antd-topbar-desc,
  body.ant-theme .antd-topbar-link {
    display: none;
  }
  body.ant-theme .antd-topbar-title {
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  body.ant-theme .antd-shell-user-name {
    display: none;
  }
  body.ant-theme .app-scrollbar {
    padding: 12px;
  }
  body.ant-theme .antd-shell-user-menu {
    right: 12px;
  }
  .mobile-nav-toggle {
    display: inline-flex;
  }
  .drawer-bg,
  .drawer-bg[data-v-514a57fe] {
    display: none;
    position: fixed !important;
    inset: 0;
    z-index: 1100;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
  }
  .app-wrapper.mobile.openSidebar:not(.hideSidebar) .drawer-bg {
    display: block;
  }
  body.ant-theme.kf-standalone-body .kf-standalone-top {
    padding: 12px 12px 10px;
  }
  body.ant-theme .layout-task-container {
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
  }
}
