:root {
  --base-color: #0d9488;
  --base-color-light: rgba(13, 148, 136, 0.10);
  --ns-bg: #f4f6f8;
  --ns-panel: #ffffff;
  --ns-panel-2: #fafbfc;
  --ns-fg: #1d2129;
  --ns-fg-2: #4e5969;
  --ns-fg-3: #86909c;
  --ns-border: #e5e6eb;
  --ns-chrome: #ffffff;
  --ns-chrome-2: #ffffff;
  --header-height: 56px;
  --first-nav-width: 132px;
  --second-nav-width: 176px;
  --ns-radius: 8px;
  --ns-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  color: var(--ns-fg);
  background: var(--ns-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--base-color);
}

/* ---------------- 布局骨架 ---------------- */

.layui-layout-admin .admin-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--ns-chrome);
  box-shadow: 0 1px 4px rgba(0, 21, 41, 0.06);
  z-index: 1000;
}

.layui-layout-admin .admin-logo {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--first-nav-width);
  height: var(--header-height);
  background: linear-gradient(180deg, #24443e 0%, #1c3833 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.layui-layout-admin .admin-logo a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 100%;
  color: #fff;
  text-decoration: none;
}

.layui-layout-admin .admin-logo img {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #fff;
  object-fit: contain;
  padding: 2px;
}

.layui-layout-admin .admin-logo span {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.admin-header-right {
  position: absolute;
  left: var(--first-nav-width);
  right: 0;
  top: 0;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 0 18px;
}

.admin-crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ns-fg-3);
  font-size: 14px;
}

.admin-crumb #crumb-first {
  color: var(--ns-fg);
  font-weight: 600;
}

.admin-crumb .layui-icon {
  font-size: 12px;
  color: var(--ns-fg-3);
}

.layui-nav.admin-user-nav {
  background: transparent;
  padding: 0;
  height: var(--header-height);
}

.layui-nav.admin-user-nav .layui-nav-item {
  height: var(--header-height);
  line-height: var(--header-height);
}

.layui-nav.admin-user-nav .layui-nav-item > a {
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--header-height);
  padding: 0 6px;
  color: var(--ns-fg);
}

.layui-nav.admin-user-nav .layui-nav-item > a:hover {
  background: transparent;
}

.admin-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--base-color-light);
  color: var(--base-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.admin-user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  font-size: 13px;
}

.admin-user-meta small {
  color: var(--ns-fg-3);
  font-size: 11px;
}

.layui-nav.admin-user-nav .layui-nav-child {
  top: 56px;
  min-width: 150px;
  border-radius: 8px;
  box-shadow: var(--ns-shadow);
  border: 1px solid var(--ns-border);
  padding: 6px 0;
}

.layui-nav.admin-user-nav .layui-nav-child dd a {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  line-height: 36px;
  color: var(--ns-fg-2);
}

.layui-nav.admin-user-nav .layui-nav-child dd a:hover {
  background: var(--ns-panel-2);
  color: var(--base-color);
}

.layui-layout-admin .first-nav {
  position: fixed;
  top: var(--header-height);
  left: 0;
  bottom: 0;
  width: var(--first-nav-width);
  background: linear-gradient(180deg, #1c3833 0%, #162c28 100%);
  overflow: hidden;
  z-index: 900;
}

.layui-layout-admin .first-nav .layui-side-scroll {
  width: 100%;
  height: 100%;
  padding: 10px 8px;
  overflow-y: auto;
  overflow-x: hidden;
}

.layui-layout-admin .first-menu {
  background: transparent;
  width: 100%;
}

.layui-layout-admin .first-menu .layui-nav-item {
  margin: 0 0 4px;
  border-radius: 6px;
  overflow: hidden;
}

.layui-layout-admin .first-menu .layui-nav-item > a {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  line-height: 42px;
  padding: 0 12px;
  color: rgba(255, 255, 255, 0.72);
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

.layui-layout-admin .first-menu .layui-nav-item > a .layui-icon {
  font-size: 16px;
}

.layui-layout-admin .first-menu .layui-nav-item > a:hover,
.layui-layout-admin .first-menu .layui-nav-item > a.active {
  background: var(--base-color);
  color: #fff;
}

.layui-layout-admin .second-nav {
  position: fixed;
  top: var(--header-height);
  left: var(--first-nav-width);
  bottom: 0;
  width: var(--second-nav-width);
  background: var(--ns-chrome-2);
  border-right: 1px solid var(--ns-border);
  overflow: hidden;
  z-index: 899;
}

.layui-layout-admin .second-nav .layui-side-scroll {
  width: 100%;
  height: 100%;
  padding: 12px 10px;
  overflow-y: auto;
}

.layui-layout-admin .second-menu {
  background: transparent;
  width: 100%;
}

.layui-layout-admin .second-menu .layui-nav-item {
  margin-bottom: 2px;
  background: transparent;
}

.layui-layout-admin .second-menu .layui-nav-item > a {
  display: flex;
  align-items: center;
  height: 36px;
  line-height: 36px;
  padding: 0 10px;
  color: var(--ns-fg-2);
  border-radius: 6px;
  font-size: 13px;
}

.layui-layout-admin .second-menu .layui-nav-item > a:hover {
  background: var(--ns-panel-2);
  color: var(--ns-fg);
}

.layui-layout-admin .second-menu .layui-nav-itemed > a {
  color: var(--ns-fg);
  font-weight: 600;
}

.layui-layout-admin .second-menu .layui-nav-child {
  background: transparent;
  padding: 2px 0 4px;
}

.layui-layout-admin .second-menu .layui-nav-child dd a {
  display: block;
  height: 34px;
  line-height: 34px;
  padding: 0 10px 0 20px;
  margin: 1px 0;
  color: var(--ns-fg-2);
  border-radius: 6px;
  font-size: 13px;
}

.layui-layout-admin .second-menu .layui-nav-child dd a:hover {
  background: var(--ns-panel-2);
  color: var(--ns-fg);
}

.layui-layout-admin .second-menu .layui-nav-child dd.layui-this a {
  background: var(--base-color-light);
  color: var(--base-color);
  font-weight: 600;
}

.layui-layout-admin .second-menu .layui-nav-item.layui-this > a {
  background: var(--base-color-light);
  color: var(--base-color);
}

.layui-layout-admin .admin-body {
  position: fixed;
  top: var(--header-height);
  left: calc(var(--first-nav-width) + var(--second-nav-width));
  right: 0;
  bottom: 0;
  overflow: auto;
  background: var(--ns-bg);
}

.admin-content {
  padding: 18px 20px 28px;
  min-width: 900px;
}

/* ---------------- 通用页面 ---------------- */

.page-card {
  background: var(--ns-panel);
  border-radius: var(--ns-radius);
  padding: 18px 20px 20px;
  box-shadow: var(--ns-shadow);
}

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

.page-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--ns-fg);
}

.page-subtitle {
  margin: 4px 0 0;
  color: var(--ns-fg-3);
  font-size: 13px;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-panel {
  background: var(--ns-panel-2);
  border: 1px solid var(--ns-border);
  border-radius: 8px;
  padding: 14px 16px 2px;
  margin-bottom: 14px;
}

.filter-panel .layui-form-item {
  margin-bottom: 12px;
}

.filter-panel .layui-form-label {
  width: 78px;
  padding: 9px 10px 9px 0;
  color: var(--ns-fg-2);
  font-size: 13px;
}

.filter-panel .layui-input-inline {
  width: 190px;
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
}

.layui-btn {
  background-color: var(--base-color);
  border-radius: 6px;
}

.layui-btn:hover {
  opacity: 0.9;
}

.layui-btn-primary {
  background-color: #fff;
  border-color: var(--ns-border);
  color: var(--ns-fg-2);
}

.layui-btn-primary:hover {
  border-color: var(--base-color);
  color: var(--base-color);
}

.layui-btn-xs {
  height: 26px;
  line-height: 26px;
  padding: 0 10px;
  border-radius: 13px;
  font-size: 12px;
}

.layui-input,
.layui-select,
.layui-textarea {
  border-radius: 6px;
  border-color: var(--ns-border);
}

.layui-input:focus,
.layui-textarea:focus {
  border-color: var(--base-color) !important;
  box-shadow: 0 0 0 2px var(--base-color-light);
}

.layui-form-select dl dd.layui-this {
  background-color: var(--base-color);
}

.layui-table-view {
  border-radius: 8px;
  border: 1px solid var(--ns-border);
  overflow: hidden;
}

.layui-table th {
  background: var(--ns-panel-2);
  color: var(--ns-fg-2);
  font-weight: 600;
}

.layui-table tbody tr:hover {
  background: #f7faf9 !important;
}

.layui-table-cell {
  height: auto;
  line-height: 24px;
}

.layui-laypage .layui-laypage-curr .layui-laypage-em {
  background-color: var(--base-color);
}

.admin-loading,
.admin-empty {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--ns-fg-3);
  background: var(--ns-panel);
  border-radius: var(--ns-radius);
  box-shadow: var(--ns-shadow);
}

.admin-loading .layui-icon,
.admin-empty .layui-icon {
  font-size: 28px;
  color: var(--base-color);
}

.admin-empty .layui-icon {
  color: var(--ns-fg-3);
}

/* ---------------- 客户群发 ---------------- */

.batch-msg {
  margin-bottom: 6px;
  color: var(--ns-fg-2);
  font-size: 13px;
  line-height: 1.5;
}

.batch-msg:last-child {
  margin-bottom: 0;
}

/* ---------------- 素材库 ---------------- */

.material-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.material-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.material-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.material-filter .layui-form-select {
  width: 180px;
}

.material-filter #material-search {
  width: 220px;
}

.material-thumb {
  width: 72px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--ns-border);
  background: var(--ns-panel-2);
}

.material-video {
  width: 140px;
  max-height: 90px;
  border-radius: 6px;
  background: #000;
}

.material-text {
  max-width: 420px;
  color: var(--ns-fg-2);
  font-size: 13px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.material-image-text {
  display: flex;
  align-items: center;
  gap: 10px;
}

.material-upload-preview {
  margin-top: 8px;
  color: var(--ns-fg-3);
  font-size: 12px;
}

.material-upload-preview img {
  max-height: 90px;
  border-radius: 6px;
  border: 1px solid var(--ns-border);
}

/* ---------------- 客户群统计 ---------------- */

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

.stat-card {
  padding: 18px 20px;
  border-radius: 10px;
  color: #fff;
  min-height: 96px;
}

.stat-card.blue { background: linear-gradient(135deg, #3b9cff, #1677ff); }
.stat-card.orange { background: linear-gradient(135deg, #ffb340, #fa8c16); }
.stat-card.purple { background: linear-gradient(135deg, #9b8cff, #7c6cff); }
.stat-card.pink { background: linear-gradient(135deg, #ff7ba9, #f5568c); }

.stat-label {
  font-size: 13px;
  opacity: 0.86;
}

.stat-value {
  margin-top: 10px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.stat-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.stat-types {
  display: flex;
  gap: 8px;
}

.stat-toolbar #room-stat-date {
  width: 260px;
}

.stat-range-text {
  color: var(--ns-fg-2);
  font-size: 13px;
  margin-bottom: 14px;
}

.stat-chart {
  width: 100%;
  height: 340px;
  margin-bottom: 8px;
}

.stat-table-title {
  margin: 10px 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ns-fg);
}

.room-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1c3833 0%, #0d9488 100%);
  color: #fff;
  margin-bottom: 16px;
}

.room-detail-header h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 600;
}

.room-detail-header p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.room-detail-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.room-detail-stat {
  padding: 16px;
  border: 1px solid var(--ns-border);
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.room-detail-stat strong {
  display: block;
  font-size: 24px;
  color: var(--ns-fg);
}

.room-detail-stat span {
  color: var(--ns-fg-3);
  font-size: 12px;
}

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

/* ---------------- 流失客户 ---------------- */

.loss-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  flex-wrap: wrap;
}

.loss-filter-row > label {
  color: var(--ns-fg-2);
  font-size: 13px;
}

.loss-employee-box {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 280px;
  min-height: 34px;
  padding: 4px 10px;
  border: 1px solid var(--ns-border);
  border-radius: 6px;
  background: #fff;
}

.loss-employee-placeholder {
  color: var(--ns-fg-3);
  font-size: 13px;
}

.employee-picker {
  padding: 14px 18px 8px;
}

.employee-picker-search {
  margin-bottom: 10px;
}

.employee-picker-list {
  max-height: 420px;
  overflow-y: auto;
  border: 1px solid var(--ns-border);
  border-radius: 6px;
  padding: 4px 8px;
}

.employee-picker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 8px;
  border-bottom: 1px solid #f2f3f5;
  cursor: pointer;
}

.employee-picker-item:last-child {
  border-bottom: 0;
}

.employee-picker-item:hover {
  background: var(--ns-panel-2);
}

.employee-picker-name {
  flex: 1;
  font-size: 13px;
  color: var(--ns-fg);
}

.employee-picker-status {
  color: var(--ns-fg-3);
  font-size: 12px;
}

.employee-picker-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 0 4px;
}

/* ---------------- 客户标签 ---------------- */

.tag-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  margin-bottom: 12px;
  border: 1px solid var(--ns-border);
  border-radius: 8px;
  background: var(--ns-panel-2);
}

.tag-toolbar-sub {
  margin-top: -2px;
}

.tag-group-picker {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tag-group-picker label {
  color: var(--ns-fg-2);
  font-size: 13px;
  white-space: nowrap;
}

.tag-group-picker .layui-form-select {
  width: 220px;
}

.tag-group-picker .layui-input,
.tag-group-picker .layui-select {
  height: 34px;
  line-height: 34px;
}

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

.tag-sync-time {
  color: var(--ns-fg-3);
  font-size: 12px;
}

.tag-sync-time span {
  color: var(--ns-fg-2);
}

/* ---------------- 客户列表 ---------------- */

.customer-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.customer-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ns-panel-2);
  object-fit: cover;
  flex-shrink: 0;
}

.customer-name {
  font-weight: 600;
  color: var(--ns-fg);
  line-height: 1.3;
}

.customer-sub {
  color: var(--ns-fg-3);
  font-size: 12px;
  line-height: 1.4;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tag-item {
  display: inline-block;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 1px 7px;
  border-radius: 10px;
  background: var(--base-color-light);
  color: var(--base-color);
  font-size: 12px;
  line-height: 20px;
}

.tag-item.gray {
  background: #f2f3f5;
  color: var(--ns-fg-2);
}

.detail-grid {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px 16px;
  padding: 6px 4px 2px;
  font-size: 14px;
}

.detail-label {
  color: var(--ns-fg-3);
}

.detail-value {
  color: var(--ns-fg);
  word-break: break-all;
}

.detail-section-title {
  margin: 18px 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ns-fg);
  border-left: 3px solid var(--base-color);
  padding-left: 8px;
}

.detail-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--ns-panel-2);
}

/* ---------------- 首页 ---------------- */

.home-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px;
  border-radius: 10px;
  background:
    radial-gradient(circle at 90% 10%, rgba(255, 255, 255, 0.18), transparent 34%),
    linear-gradient(135deg, #1c3833 0%, #0d9488 100%);
  color: #fff;
  margin-bottom: 18px;
}

.home-hero h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 600;
}

.home-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.home-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 12px;
  white-space: nowrap;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.home-card {
  display: flex;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--ns-border);
  border-radius: 8px;
  background: #fff;
  transition: box-shadow 0.2s, transform 0.2s;
}

.home-card:hover {
  box-shadow: var(--ns-shadow);
  transform: translateY(-1px);
}

.home-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.home-card-icon.teal {
  background: rgba(13, 148, 136, 0.12);
  color: #0d9488;
}

.home-card-icon.blue {
  background: rgba(16, 92, 251, 0.10);
  color: #105cfb;
}

.home-card-icon.orange {
  background: rgba(250, 100, 0, 0.10);
  color: #fa6400;
}

.home-card-body {
  min-width: 0;
}

.home-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ns-fg);
  margin-bottom: 4px;
}

.home-card-body p {
  margin: 0 0 12px;
  color: var(--ns-fg-3);
  font-size: 12px;
  line-height: 1.6;
}

.home-muted {
  color: var(--ns-fg-3);
  font-size: 12px;
}

.home-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0;
  padding: 14px 16px;
  border: 1px solid #ffe0b2;
  border-radius: 8px;
  background: #fff8e6;
  color: #8a5a00;
}

.home-warning .layui-icon {
  font-size: 20px;
  color: #fa8c16;
  margin-top: 1px;
}

.home-warning strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

.home-warning p {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: #9a6a1a;
}

.home-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--ns-border);
}

.home-section-head h3 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
}

.home-user-grid {
  max-width: 720px;
}

@media (max-width: 1200px) {
  .home-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1200px) {
  :root {
    --second-nav-width: 156px;
  }
  .admin-content {
    min-width: 760px;
  }
}

/* ---------------- 标签建群 / 自动拉群 / 群欢迎语 ---------------- */

.form-section {
  padding: 8px 0 16px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--ns-border);
}

.form-section-title {
  margin: 4px 0 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ns-fg);
  border-left: 3px solid var(--base-color);
  padding-left: 9px;
  line-height: 1.2;
}

.chips-box {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 36px;
  padding: 5px 10px;
  margin-top: 8px;
  border: 1px solid var(--ns-border);
  border-radius: 6px;
  background: #fff;
}

.chips-placeholder {
  color: var(--ns-fg-3);
  font-size: 13px;
}

.chips-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--base-color-light);
  color: var(--base-color);
  font-size: 12px;
  line-height: 20px;
}

.chips-item a {
  color: var(--base-color);
  text-decoration: none;
  font-size: 14px;
}

.room-select-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.room-select-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 12px;
  border: 1px solid var(--ns-border);
  border-radius: 8px;
  background: var(--ns-panel-2);
}

.room-select-main {
  flex: 1;
  min-width: 0;
}

.room-select-name {
  font-weight: 600;
  color: var(--ns-fg);
  font-size: 13px;
}

.room-select-name span {
  font-weight: 400;
  color: var(--ns-fg-3);
  font-size: 12px;
}

.room-select-num {
  margin-top: 6px;
  color: var(--ns-fg-3);
  font-size: 12px;
}

.room-select-num .layui-input {
  display: inline-block;
  width: 80px;
  height: 28px;
  line-height: 28px;
  margin: 0 4px;
}

.room-select-upload {
  display: flex;
  align-items: center;
  gap: 8px;
}

.room-select-upload img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--ns-border);
}

.room-select-remove {
  color: #ff4d4f;
  font-size: 13px;
  white-space: nowrap;
}

.empty-tip {
  padding: 24px;
  text-align: center;
  color: var(--ns-fg-3);
  font-size: 13px;
}

.detail-overview {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 14px;
  margin-top: 4px;
}

.detail-overview-card {
  padding: 16px 18px;
  border: 1px solid var(--ns-border);
  border-radius: 10px;
  background: #fff;
}

.room-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.room-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 6px;
  background: var(--ns-panel-2);
  color: var(--ns-fg);
  font-size: 13px;
}

.room-chip em {
  font-style: normal;
  color: var(--ns-fg-3);
  font-size: 12px;
}

.status-text {
  color: var(--ns-fg-2);
  font-size: 13px;
}

.status-text.ok {
  color: #52c41a;
}

@media (max-width: 1200px) {
  .detail-overview {
    grid-template-columns: 1fr;
  }
}

.auto-qrcode {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--ns-border);
}

.auto-room-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
  font-size: 13px;
  color: var(--ns-fg);
}

.auto-room-sub {
  color: var(--ns-fg-3);
  font-size: 12px;
}

.auto-detail-head {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ns-border);
}

.auto-detail-qrcode {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border: 1px solid var(--ns-border);
  border-radius: 6px;
}

.auto-detail-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--ns-fg);
  margin-bottom: 8px;
}

.auto-detail-tags {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-tag-group-name {
  color: var(--ns-fg-2);
  font-size: 13px;
  margin-bottom: 5px;
}

.auto-detail-rooms {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auto-detail-guide {
  white-space: pre-wrap;
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--ns-panel-2);
  color: var(--ns-fg-2);
  font-size: 13px;
  line-height: 1.7;
}

/* ---------------- 入群欢迎语 ---------------- */

.welcome-msg-text {
  color: var(--ns-fg);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 5px;
  word-break: break-all;
}

.welcome-msg-image {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid var(--ns-border);
}

.welcome-msg-sub {
  color: var(--ns-fg-2);
  font-size: 12px;
  line-height: 1.6;
  word-break: break-all;
}

.welcome-detail {
  padding: 4px 4px 10px;
}

.welcome-detail-text {
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--ns-panel-2);
  color: var(--ns-fg-2);
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.welcome-detail-image {
  max-width: 100%;
  max-height: 260px;
  border-radius: 6px;
  border: 1px solid var(--ns-border);
}

.welcome-type-panel {
  padding-top: 2px;
}

.welcome-image-preview {
  margin-top: 10px;
}

.welcome-image-preview img {
  max-width: 180px;
  max-height: 180px;
  border-radius: 6px;
  border: 1px solid var(--ns-border);
}

/* ---------------- 企微裂变 ---------------- */

.fission-task-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.fission-task-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.fission-task-level {
  min-width: 68px;
  color: var(--ns-fg);
  font-size: 13px;
  font-weight: 600;
}

.fission-task-label {
  color: var(--ns-fg-3);
  font-size: 12px;
}

.fission-task-row .layui-input {
  width: 100px;
  height: 32px;
  line-height: 32px;
}

.fission-task-row .layui-input[data-prize-link],
.fission-task-row .layui-input[data-task-link] {
  width: 300px;
}

.fission-invite-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid #f2f3f5;
  font-size: 13px;
  color: var(--ns-fg-2);
}

.fission-invite-user:last-child {
  border-bottom: 0;
}

.fission-invite-user img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

/* ---------------- 客户/成员统计 ---------------- */

.stat-bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  min-height: 230px;
  padding: 20px 14px 8px;
  border: 1px solid var(--ns-border);
  border-radius: 8px;
  background: #fff;
  overflow-x: auto;
  margin-bottom: 12px;
}

.stat-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-width: 44px;
  flex: 1;
}

.stat-bar-value {
  font-size: 11px;
  color: var(--ns-fg-2);
  margin-bottom: 4px;
}

.stat-bar {
  width: 100%;
  max-width: 36px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #5b8efb, #1677ff);
  transition: height .2s ease;
}

.stat-bar-label {
  margin-top: 6px;
  font-size: 11px;
  color: var(--ns-fg-3);
  white-space: nowrap;
}

/* ---------------- 子账户 / 角色 / 菜单 / 权限 ---------------- */

.role-employee-link,
.role-status-link {
  color: var(--base-color);
  text-decoration: none;
}

.permission-tree {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 16px;
  border: 1px solid var(--ns-border);
  border-radius: 8px;
  background: #fff;
}

.perm-row {
  padding: 4px 0;
  border-bottom: 1px dashed #f2f3f5;
}

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

.perm-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--ns-fg);
}

.perm-name {
  line-height: 20px;
}

/* ---------------- 公众号授权 ---------------- */

.official-list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
}

.official-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 280px;
  padding: 16px 18px;
  border: 1px solid var(--ns-border);
  border-radius: 8px;
  background: #fff;
}

.official-item img,
.official-avatar-placeholder {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.official-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ns-panel-2);
  color: var(--ns-fg-3);
  font-size: 12px;
}

.official-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ns-fg);
  margin-bottom: 4px;
}

.official-type {
  font-size: 12px;
  color: var(--ns-fg-3);
}

.official-auth-card {
  max-width: 560px;
  margin: 40px auto;
  padding: 40px 32px;
  border: 1px solid var(--ns-border);
  border-radius: 12px;
  background: #fff;
  text-align: center;
}

.official-auth-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 24px;
}

.official-auth-badge {
  padding: 14px 18px;
  border-radius: 10px;
  background: var(--ns-panel-2);
  color: var(--ns-fg-2);
  font-size: 14px;
}

.official-auth-arrow {
  color: var(--ns-fg-3);
  font-size: 22px;
}

.official-auth-tip {
  color: var(--ns-fg-2);
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 24px;
}

.official-auth-note {
  margin-top: 14px;
  color: var(--ns-fg-3);
  font-size: 12px;
}

/* ---------------- 聊天侧边栏 ---------------- */

.chat-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  margin: 14px 0;
  border-radius: 8px;
  background: #fffbe6;
  color: #ad6800;
  font-size: 13px;
}

.chat-status-ok {
  color: #52c41a;
}

.chat-intro p {
  color: var(--ns-fg-2);
  font-size: 13px;
  line-height: 1.8;
  margin: 0 0 8px;
}

.chat-note {
  padding: 8px 12px;
  border-radius: 6px;
  background: #fff1f0;
  color: #cf1322 !important;
}

.chat-agent-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 6px;
}

.chat-agent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--ns-border);
  border-radius: 8px;
  min-width: 240px;
}

.chat-agent-item img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
}

.chat-tool-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-tool-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid var(--ns-border);
  border-radius: 6px;
  font-size: 13px;
}

.chat-tool-name {
  min-width: 100px;
  font-weight: 600;
  color: var(--ns-fg);
}

.chat-tool-url {
  flex: 1;
  color: var(--ns-fg-3);
  word-break: break-all;
  font-size: 12px;
}

/* ---------------- 客户详情独立页 ---------------- */

.contact-detail-head {
  display: flex;
  gap: 22px;
  padding: 20px 22px;
  border: 1px solid var(--ns-border);
  border-radius: 10px;
  background: #fff;
}

.contact-detail-avatar {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--ns-panel-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ns-fg-3);
  font-size: 12px;
  flex-shrink: 0;
}

.contact-detail-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-detail-main {
  flex: 1;
  min-width: 0;
}

.contact-detail-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 600;
  color: var(--ns-fg);
  margin-bottom: 12px;
}

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

.contact-detail-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  color: var(--ns-fg);
}

.contact-detail-item .detail-label {
  min-width: 64px;
  flex-shrink: 0;
}

.contact-detail-item a {
  color: var(--base-color);
  font-size: 12px;
}

.contact-track-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-track-item {
  display: flex;
  gap: 16px;
  padding: 10px 14px;
  border-left: 3px solid var(--base-color);
  border-radius: 0 6px 6px 0;
  background: var(--ns-panel-2);
}

.contact-track-time {
  width: 150px;
  color: var(--ns-fg-3);
  font-size: 12px;
  flex-shrink: 0;
}

.contact-track-content {
  color: var(--ns-fg-2);
  font-size: 13px;
  line-height: 1.6;
  word-break: break-all;
}

.contact-portrait-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-portrait-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  border: 1px solid var(--ns-border);
  border-radius: 8px;
}

.contact-portrait-label {
  width: 150px;
  flex-shrink: 0;
  color: var(--ns-fg);
  font-size: 13px;
  font-weight: 600;
}

.contact-portrait-label span {
  display: block;
  color: var(--ns-fg-3);
  font-size: 11px;
  font-weight: 400;
  margin-top: 2px;
}

.contact-portrait-value {
  flex: 1;
  color: var(--ns-fg-2);
  font-size: 13px;
  min-width: 0;
}

.contact-portrait-image {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--ns-border);
  margin-top: 6px;
}

.contact-portrait-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.contact-portrait-checkboxes label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
}

@media (max-width: 1000px) {
  .contact-detail-grid {
    grid-template-columns: 1fr;
  }
}

.code-special-list,
.code-addmax-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.code-special-row,
.code-addmax-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.code-special-row .layui-input,
.code-addmax-row .layui-input {
  width: 240px;
  height: 32px;
  line-height: 32px;
}

.code-addmax-row .layui-input {
  width: 100px;
}

/* ---------------- 裂变向导 ---------------- */

.fission-steps {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.fission-step {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid var(--ns-border);
  border-radius: 20px;
  background: #fff;
  color: var(--ns-fg-2);
  font-size: 13px;
  cursor: pointer;
}

.fission-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ns-panel-2);
  color: var(--ns-fg-3);
  font-size: 12px;
}

.fission-step.active {
  border-color: var(--base-color);
  color: var(--base-color);
  background: var(--base-color-light);
}

.fission-step.active span {
  background: var(--base-color);
  color: #fff;
}

.tag-group-title {
  padding: 8px 8px 4px;
  color: var(--ns-fg-3);
  font-size: 12px;
  border-bottom: 1px solid #f2f3f5;
}

.fission-poster-canvas {
  position: relative;
  width: 224px;
  height: 398px;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid var(--ns-border);
  background: #f2f3f5;
  user-select: none;
}

.fission-poster-canvas > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fission-qr-box {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  font-size: 11px;
  border: 1px dashed #fff;
  cursor: move;
  touch-action: none;
}

/* Customer Ops */
.ops-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 14px;
}

.ops-card {
  background: var(--ns-panel);
  border: 1px solid var(--ns-border);
  border-radius: 10px;
  padding: 16px 18px;
}

.ops-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.ops-card-head strong {
  display: block;
  font-size: 15px;
  color: var(--ns-fg);
}

.ops-card-head .customer-sub {
  display: block;
  margin-top: 3px;
}

.ops-form .layui-form-label {
  width: 84px;
}

.ops-form .layui-input-block {
  margin-left: 114px;
}

.ops-stats {
  display: flex;
  gap: 18px;
  padding-top: 10px;
  border-top: 1px dashed var(--ns-border);
  color: var(--ns-fg-3);
  font-size: 12px;
}

.ops-stats b {
  color: var(--ns-fg);
  font-size: 16px;
  margin-left: 4px;
}

.ops-list {
  max-height: 300px;
  overflow: auto;
}

.ops-list-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--ns-border);
}

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

.ops-list-title {
  font-weight: 600;
  color: var(--ns-fg);
  margin-bottom: 4px;
}

.ops-list-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.ops-timeline {
  max-height: 360px;
  overflow: auto;
  padding-left: 6px;
}

.ops-timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 138px 1fr;
  gap: 12px;
  padding: 8px 0 8px 18px;
  border-left: 1px solid var(--ns-border);
}

.ops-timeline-dot {
  position: absolute;
  left: -5px;
  top: 15px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--base-color);
  box-shadow: 0 0 0 3px var(--ns-panel);
}

.ops-timeline-time {
  color: var(--ns-fg-3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.ops-timeline-body {
  color: var(--ns-fg);
  font-size: 13px;
}

.tag-item.green { background: #e8f8ef; color: #0f9d58; }
.tag-item.orange { background: #fff4e5; color: #d97706; }
.tag-item.red { background: #fdecec; color: #d93025; }
.tag-item.blue { background: #eaf2ff; color: #1677ff; }
.tag-item.gray { background: #f1f3f5; color: #6b7280; }
.text-danger { color: #d93025 !important; }

@media (max-width: 1100px) {
  .ops-grid { grid-template-columns: 1fr; }
}

/* SOP editor */
.sop-steps { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.sop-step-row { border: 1px solid var(--ns-border); border-radius: 8px; padding: 10px; background: var(--ns-panel-2); }
.sop-step-head { display: flex; align-items: center; gap: 8px; }
.sop-step-index { width: 22px; height: 22px; border-radius: 50%; background: var(--base-color); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.sop-step-type { width: 120px; height: 32px; border: 1px solid var(--ns-border); border-radius: 4px; padding: 0 6px; }
.sop-step-title { flex: 1; }
.sop-step-head .sop-step-remove { margin-left: auto; }
.sop-step-config { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.sop-inline { display: flex; gap: 8px; }
.sop-inline > * { flex: 1; }

/* SOP calendar */
.cal-legend { display:flex; gap:18px; align-items:center; margin:6px 0 12px; color:var(--ns-fg-3); font-size:12px; }
.cal-dot { display:inline-block; width:9px; height:9px; border-radius:50%; margin-right:5px; background:#3b9cff; }
.cal-dot.task { background:#1677ff; }
.cal-dot.done { background:#0f9d58; }
.cal-week { display:grid; grid-template-columns:repeat(7,1fr); gap:8px; margin-bottom:8px; color:var(--ns-fg-3); font-size:12px; text-align:center; }
.cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:8px; }
.cal-cell { min-height:120px; border:1px solid var(--ns-border); border-radius:8px; padding:8px; background:var(--ns-panel); }
.cal-cell.is-empty { background:var(--ns-panel-2); border-style:dashed; }
.cal-cell.is-today { border-color:var(--base-color); box-shadow:0 0 0 1px var(--base-color) inset; }
.cal-day { display:flex; justify-content:space-between; align-items:center; font-size:13px; font-weight:600; color:var(--ns-fg-2); margin-bottom:6px; }
.cal-add { border:0; background:transparent; color:var(--base-color); font-size:18px; line-height:1; cursor:pointer; padding:0 2px; }
.cal-items { display:flex; flex-direction:column; gap:4px; }
.cal-item { display:flex; align-items:center; justify-content:space-between; gap:4px; padding:3px 6px; border-radius:4px; font-size:11px; line-height:1.4; background:#eaf2ff; color:#1677ff; overflow:hidden; }
.cal-item span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cal-item.task { background:#f0f5ff; color:#3b5bdb; }
.cal-item.done { background:#e8f8ef; color:#0f9d58; }
.cal-item.running { background:#fff4e5; color:#d97706; }
.cal-item.danger { background:#fdecec; color:#d93025; }
.cal-item.muted { background:#f1f3f5; color:#6b7280; text-decoration:line-through; }
.cal-cancel { border:0; background:transparent; color:inherit; cursor:pointer; padding:0 2px; }
.cal-contact-results { margin-top:6px; max-height:150px; overflow:auto; border:1px solid var(--ns-border); border-radius:6px; padding:4px; }
.cal-contact-item { display:flex; justify-content:space-between; width:100%; border:0; background:transparent; text-align:left; padding:6px 8px; border-radius:4px; cursor:pointer; color:var(--ns-fg); }
.cal-contact-item:hover, .cal-contact-item.active { background:var(--ns-panel-2); color:var(--base-color); }
.cal-contact-item span { color:var(--ns-fg-3); font-size:12px; }
@media (max-width: 900px) { .cal-cell { min-height:90px; } }

/* ---------------- 单栏导航 ---------------- */
:root {
  --sidebar-width: 248px;
}

.layui-layout-admin .admin-logo {
  width: var(--sidebar-width) !important;
}

.admin-header-right {
  left: var(--sidebar-width) !important;
}

.layui-layout-admin .admin-body {
  left: var(--sidebar-width) !important;
  background: var(--ns-bg);
}

.admin-sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  z-index: 900;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #1b2a28 0%, #15211f 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.sidebar-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2px 10px 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.sidebar-scroll::-webkit-scrollbar {
  width: 6px;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 10px;
}

.admin-menu {
  padding: 2px 0 10px;
}

.menu-section {
  margin: 2px 0 5px;
}

.menu-section-head {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}

.menu-section-head:hover,
.menu-section.open .menu-section-head {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.menu-section-head .layui-icon {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.55);
}

.menu-section.open .menu-section-head .layui-icon:first-child {
  color: #63d3ae;
}

.menu-section-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-chevron {
  flex: 0 0 auto;
  font-size: 12px !important;
  transition: transform 0.18s;
}

.menu-section.open .menu-chevron {
  transform: rotate(90deg);
}

.menu-section-body {
  display: none;
  padding: 3px 0 5px;
}

.menu-section.open .menu-section-body {
  display: block;
}

.menu-link {
  display: flex;
  align-items: center;
  min-height: 34px;
  margin: 1px 0;
  padding: 7px 10px 7px 34px;
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  line-height: 1.35;
  text-decoration: none;
  position: relative;
  transition: background 0.16s, color 0.16s;
}

.menu-link:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.menu-link.active {
  background: rgba(63, 145, 121, 0.9);
  color: #fff;
  font-weight: 600;
}

.menu-link.active::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 50%;
  width: 5px;
  height: 5px;
  margin-top: -2.5px;
  border-radius: 50%;
  background: #9af0d2;
}

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

.menu-empty {
  padding: 24px 12px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 13px;
  text-align: center;
}

.admin-content {
  min-width: 720px;
}

@media (max-width: 900px) {
  :root {
    --sidebar-width: 0px;
  }

  .admin-sidebar {
    display: none;
  }

  .admin-content {
    min-width: 0;
  }
}

/* 导航二级分组 */
.menu-group {
  margin: 4px 0 6px;
}

.menu-group-title {
  padding: 7px 10px 5px 34px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.menu-group .menu-link {
  padding-left: 42px;
}

/* SOP 中心 Tabs */
.page-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--ns-border);
  margin: 6px 0 16px;
  overflow-x: auto;
}

.page-tab {
  border: 0;
  background: transparent;
  color: var(--ns-fg-2);
  font-size: 14px;
  padding: 10px 14px;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.page-tab:hover {
  color: var(--ns-fg);
}

.page-tab.active {
  color: var(--base-color);
  border-bottom-color: var(--base-color);
  font-weight: 600;
}

.sop-center #sop-tab-content > .page-card {
  box-shadow: none;
  padding: 0;
}

.sop-center #sop-tab-content > .page-card > .page-head {
  padding-top: 2px;
}

/* ---------------- EvoSCRM 工作台 ---------------- */
.dash-page {
  max-width: 1440px;
}

.dash-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  border-radius: 14px;
  padding: 28px 30px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 12%, rgba(45, 212, 191, 0.34), transparent 32%),
    linear-gradient(135deg, #0f3f3a 0%, #0d5c52 55%, #0f766e 100%);
  box-shadow: 0 12px 30px rgba(15, 118, 110, 0.18);
  margin-bottom: 22px;
}

.dash-eyebrow {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.66);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.dash-hero h2 {
  margin: 0;
  font-size: 27px;
  line-height: 1.2;
  letter-spacing: 0.2px;
}

.dash-hero p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
}

.dash-hero-actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.dash-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  background: #fff;
  color: #0f5f56;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.dash-btn.light {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.dash-btn.ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.34);
}

.dash-hero-side {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.14);
  min-width: 170px;
}

.dash-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.dash-hero-side strong,
.dash-hero-side span {
  display: block;
}

.dash-hero-side strong {
  font-size: 13px;
  margin-bottom: 3px;
}

.dash-hero-side span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.66);
}

.dash-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 2px 12px;
}

.dash-section-head h3 {
  margin: 0;
  font-size: 16px;
  color: var(--ns-fg);
}

.dash-section-head span {
  font-size: 12px;
  color: var(--ns-fg-3);
}

.dash-stat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.dash-stat-card {
  background: var(--ns-panel);
  border: 1px solid var(--ns-border);
  border-radius: 12px;
  padding: 16px 16px 14px;
  box-shadow: var(--ns-shadow);
  min-height: 98px;
}

.dash-stat-card.danger strong {
  color: #dc2626;
}

.dash-stat-label {
  display: block;
  color: var(--ns-fg-3);
  font-size: 12px;
  margin-bottom: 8px;
}

.dash-stat-card strong {
  display: block;
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ns-fg);
  font-variant-numeric: tabular-nums;
}

.dash-stat-note {
  display: block;
  margin-top: 8px;
  color: var(--ns-fg-3);
  font-size: 11px;
  line-height: 1.4;
}

.dash-grid {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

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

.dash-panel {
  background: var(--ns-panel);
  border: 1px solid var(--ns-border);
  border-radius: 12px;
  box-shadow: var(--ns-shadow);
  padding: 16px 18px;
  min-width: 0;
}

.dash-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.dash-panel-head h3 {
  margin: 0;
  font-size: 15px;
  color: var(--ns-fg);
}

.dash-panel-head a,
.dash-panel-head span {
  font-size: 12px;
  color: var(--base-color);
  text-decoration: none;
}

.dash-panel-head span {
  color: var(--ns-fg-3);
}

.dash-todo-list,
.dash-guide,
.dash-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dash-todo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ns-fg);
}

.dash-todo:hover,
.dash-list-item:hover,
.dash-guide-item:hover {
  background: var(--ns-panel-2);
}

.dash-todo-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0d9488;
  flex: 0 0 auto;
}

.dash-todo-dot.red { background: #ef4444; }
.dash-todo-dot.orange { background: #f59e0b; }
.dash-todo-dot.blue { background: #3b82f6; }

.dash-todo div {
  flex: 1;
  min-width: 0;
}

.dash-todo strong,
.dash-todo small {
  display: block;
}

.dash-todo strong {
  font-size: 13px;
  line-height: 1.4;
}

.dash-todo small {
  margin-top: 2px;
  color: var(--ns-fg-3);
  font-size: 11px;
}

.dash-todo b {
  font-size: 18px;
  color: var(--ns-fg);
  font-variant-numeric: tabular-nums;
}

.dash-guide-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 7px;
  border-radius: 8px;
  color: var(--ns-fg-2);
  text-decoration: none;
  font-size: 13px;
}

.dash-guide-item span:nth-child(2) {
  flex: 1;
}

.dash-guide-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--ns-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  flex: 0 0 auto;
}

.dash-guide-check.done {
  background: #0d9488;
  border-color: #0d9488;
}

.dash-guide-item em {
  font-style: normal;
  font-size: 11px;
  color: var(--ns-fg-3);
}

.dash-guide-item .dash-guide-check.done + span + em {
  color: #0d9488;
}

.dash-chart {
  width: 100%;
  height: 270px;
}

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

.dash-quick {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 15px 16px;
  border-radius: 12px;
  border: 1px solid var(--ns-border);
  background: var(--ns-panel);
  box-shadow: var(--ns-shadow);
  text-decoration: none;
  color: var(--ns-fg);
  transition: transform 0.16s, border-color 0.16s;
}

.dash-quick:hover {
  transform: translateY(-2px);
  border-color: rgba(13, 148, 136, 0.45);
}

.dash-quick .layui-icon {
  font-size: 20px;
  color: var(--base-color);
}

.dash-quick span {
  font-size: 13px;
  font-weight: 600;
}

.dash-quick small {
  color: var(--ns-fg-3);
  font-size: 11px;
}

.dash-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 8px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ns-fg);
}

.dash-list-item div {
  min-width: 0;
}

.dash-list-item strong,
.dash-list-item small {
  display: block;
}

.dash-list-item strong {
  font-size: 13px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-list-item small {
  margin-top: 2px;
  color: var(--ns-fg-3);
  font-size: 11px;
}

.dash-empty {
  padding: 28px 10px;
  text-align: center;
  color: var(--ns-fg-3);
  font-size: 12px;
}

@media (max-width: 1280px) {
  .dash-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .dash-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .dash-hero-side {
    align-self: flex-start;
  }

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

@media (max-width: 680px) {
  .dash-stat-grid,
  .dash-grid.two,
  .dash-quick-grid {
    grid-template-columns: 1fr;
  }
}

/* EvoSCRM 品牌 */
.layui-layout-admin .admin-logo img {
  width: 28px;
  height: 28px;
  background: transparent;
  padding: 0;
  border-radius: 0;
}

.layui-layout-admin .admin-logo span {
  font-size: 16px;
  letter-spacing: 0.4px;
}

/* ---------------- 全局视觉精修 ---------------- */
:root {
  --ns-bg: #f5f7f9;
  --ns-border: #e8edf3;
  --ns-fg: #17202a;
  --ns-fg-2: #4b5563;
  --ns-fg-3: #8a94a3;
  --ns-radius: 12px;
  --ns-shadow: 0 1px 2px rgba(15, 23, 42, 0.03), 0 8px 24px rgba(15, 23, 42, 0.04);
}

body {
  color: var(--ns-fg);
}

.page-card {
  border: 1px solid var(--ns-border);
  border-radius: 14px;
  padding: 22px 24px 24px;
  box-shadow: var(--ns-shadow);
}

.page-head {
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
}

.page-title {
  font-size: 21px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.page-subtitle {
  margin-top: 6px;
  color: var(--ns-fg-3);
  font-size: 13px;
}

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

.filter-panel {
  border: 1px solid var(--ns-border);
  border-radius: 12px;
  background: #fff;
  padding: 16px 18px 12px;
  margin-bottom: 16px;
}

.filter-panel .layui-form-item {
  margin-bottom: 8px;
}

.filter-panel .layui-form-label {
  color: var(--ns-fg-2);
  font-size: 13px;
}

.filter-panel .layui-input,
.filter-panel .layui-select,
.filter-panel .layui-textarea {
  border-color: #e3e9f0;
  border-radius: 8px;
  background: #fbfcfe;
}

.layui-input,
.layui-textarea,
.layui-select {
  border-radius: 8px;
}

.layui-input:focus,
.layui-textarea:focus {
  border-color: rgba(13, 148, 136, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.08);
}

.layui-btn {
  border-radius: 8px;
  font-weight: 500;
}

.layui-btn-sm {
  border-radius: 7px;
}

.layui-btn-primary {
  border-color: #e3e9f0;
  color: var(--ns-fg-2);
  background: #fff;
}

.layui-btn-primary:hover {
  border-color: rgba(13, 148, 136, 0.45);
  color: var(--base-color);
}

/* 统计卡：从高饱和色块改为白底 + 色彩强调 */
.stat-cards {
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat-card {
  position: relative;
  min-height: 98px;
  padding: 17px 18px 15px;
  border: 1px solid var(--ns-border);
  border-radius: 12px;
  color: var(--ns-fg);
  background: linear-gradient(180deg, #fff 0%, #fbfcfd 100%);
  box-shadow: var(--ns-shadow);
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--stat-accent, var(--base-color));
}

.stat-card.blue { --stat-accent: #3b82f6; }
.stat-card.orange { --stat-accent: #f59e0b; }
.stat-card.purple { --stat-accent: #8b5cf6; }
.stat-card.pink { --stat-accent: #ec4899; }

.stat-label {
  color: var(--ns-fg-3);
  opacity: 1;
  font-size: 12px;
}

.stat-value {
  margin-top: 10px;
  color: var(--ns-fg);
  font-size: 27px;
  font-weight: 650;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* 表格统一 */
.layui-table-view {
  border: 1px solid var(--ns-border);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 0;
}

.layui-table-header {
  background: #f8fafc;
}

.layui-table th {
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  border-color: #eef2f7 !important;
}

.layui-table td {
  color: #334155;
  font-size: 13px;
  border-color: #f2f5f8 !important;
}

.layui-table tbody tr:hover {
  background: #f8fbfa;
}

.layui-table-page {
  border-top: 1px solid #eef2f7;
  padding: 10px 12px;
}

.layui-table-page .layui-laypage a,
.layui-table-page .layui-laypage span {
  border-radius: 6px;
}

/* 空状态 */
.layui-none {
  min-height: 300px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: var(--ns-fg-3) !important;
  border: 0 !important;
  background: transparent;
}

.table-empty {
  text-align: center;
  padding: 30px 16px;
  color: var(--ns-fg-3);
}

.table-empty-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #f1f6f5;
  color: var(--base-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 10px;
}

.table-empty strong {
  display: block;
  color: var(--ns-fg-2);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 5px;
}

.table-empty p {
  margin: 0;
  color: var(--ns-fg-3);
  font-size: 12px;
  line-height: 1.6;
}

/* 弹层 */
.layui-layer {
  border-radius: 12px;
  overflow: hidden;
}

.layui-layer-title {
  border-bottom: 1px solid #eef2f7;
  background: #fff;
  color: var(--ns-fg);
  font-weight: 600;
}

/* SOP 中心嵌套页头：保留操作，隐藏重复标题 */
.sop-center #sop-tab-content > .page-card > .page-head {
  justify-content: flex-end;
  min-height: 32px;
  margin-bottom: 10px;
}

.sop-center #sop-tab-content > .page-card > .page-head > div:first-child {
  display: none;
}

/* 灯塔导航图标 */
.menu-section-head .layui-icon-user {
  color: inherit;
}

/* 统计卡色彩变体统一白底，避免高饱和色块 */
.stat-card.blue,
.stat-card.orange,
.stat-card.purple,
.stat-card.pink {
  background: linear-gradient(180deg, #fff 0%, #fbfcfd 100%);
  color: var(--ns-fg);
}

.stat-card:hover {
  border-color: rgba(13, 148, 136, 0.28);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

/* 表单：避免中文标签换行 */
.page-card > form.layui-form:not(.filter-panel) .layui-form-label,
.layui-layer form.layui-form .layui-form-label {
  width: 112px;
  padding-left: 8px;
  padding-right: 8px;
  white-space: nowrap;
}

.page-card > form.layui-form:not(.filter-panel) .layui-input-block,
.layui-layer form.layui-form .layui-input-block {
  margin-left: 140px;
}

/* 表单区块标题 */
.form-section-title {
  font-size: 14px;
  letter-spacing: 0.01em;
}

/* 表格操作列按钮更紧凑 */
.layui-table-cell .layui-btn-xs {
  margin-right: 3px;
}

.sop-center #sop-tab-content > .page-card {
  border: 0;
  box-shadow: none;
  background: transparent;
}

.customer-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0d9488;
  background: #e7f5f2;
  font-weight: 600;
  font-size: 13px;
  line-height: 1;
}

img.customer-avatar {
  background: #f1f5f9;
}

.code-slot-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 7px 0;
}

.code-slot-row .code-time-input {
  width: 96px;
  flex: 0 0 96px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.code-slot-members {
  flex: 1;
  min-width: 150px;
  color: var(--ns-fg-3);
  font-size: 12px;
}

/* 经营漏斗 */
.funnel-box {
  border: 1px solid var(--ns-border);
  border-radius: 12px;
  background: #fff;
  margin-bottom: 12px;
}

.funnel-list {
  padding: 10px 18px;
}

.funnel-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 62px 64px;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #f2f5f8;
}

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

.funnel-name {
  color: var(--ns-fg-2);
  font-size: 13px;
}

.funnel-track {
  height: 10px;
  border-radius: 999px;
  background: #f1f5f9;
  overflow: hidden;
}

.funnel-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0d9488, #2dd4bf);
  transition: width 0.35s ease;
}

.funnel-count {
  text-align: right;
  color: var(--ns-fg);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.funnel-rate {
  text-align: right;
  color: var(--ns-fg-3);
  font-size: 12px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.stat-bar {
  background: linear-gradient(180deg, #2dd4bf, #0d9488);
}

.layui-table-cell .table-empty {
  width: 100%;
}

.table-empty .layui-btn {
  margin-top: 14px;
}

/* 列宽不足时自动铺满，避免右侧出现空白条 */
.layui-table-view.table-fill .layui-table-main table,
.layui-table-view.table-fill .layui-table-header table {
  width: 100% !important;
}

.official-empty {
  padding: 70px 20px;
  border: 1px dashed #dce5ef;
  border-radius: 12px;
  background: #fbfcfe;
}

/* 选择器弹层：列表填满、减少空白 */
.layui-layer-page:has(.employee-picker) .layui-layer-content {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.layui-layer-page:has(.employee-picker) .employee-picker {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
}

.layui-layer-page:has(.employee-picker) .employee-picker-list {
  flex: 1;
  max-height: none;
  min-height: 0;
}

.employee-picker-item input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--base-color);
  flex: 0 0 auto;
}

.employee-picker-item:has(input:checked) {
  background: #f0faf7;
}

.employee-picker-item:has(input:checked) .employee-picker-name {
  color: var(--brand-dark, #0f766e);
  font-weight: 600;
}

/* 权限树 */
.permission-tree {
  border: 1px solid var(--ns-border);
  border-radius: 12px;
  background: #fff;
  padding: 8px 10px;
  max-height: calc(100vh - 250px);
  overflow-y: auto;
}

.perm-row {
  border-bottom: 1px dashed #f1f5f9;
  border-radius: 6px;
}

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

.perm-row:hover {
  background: #f8fbfa;
}

.perm-row:has(input:checked) {
  background: #f3fbf8;
}

.perm-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px;
  width: 100%;
  cursor: pointer;
}

.perm-row input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--base-color);
  flex: 0 0 auto;
}

.perm-name {
  color: var(--ns-fg-2);
  font-size: 13px;
}

.perm-row .tag-item {
  padding: 1px 6px;
  font-size: 10px;
}

/* ---------------- 站内通知 ---------------- */
.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--header-height);
}

.admin-notify {
  position: relative;
  height: var(--header-height);
  display: flex;
  align-items: center;
}

.admin-notify-trigger {
  position: relative;
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--ns-fg-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-notify-trigger:hover {
  background: var(--ns-panel-2);
  border-color: var(--ns-border);
  color: var(--base-color);
}

.admin-notify-trigger .layui-icon {
  font-size: 18px;
}

.admin-notify-badge {
  position: absolute;
  top: 1px;
  right: 0;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.admin-notify-panel {
  position: absolute;
  top: 52px;
  right: -8px;
  width: 360px;
  max-width: calc(100vw - 24px);
  background: #fff;
  border: 1px solid var(--ns-border);
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
  z-index: 1200;
  overflow: hidden;
}

.admin-notify-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px 10px;
  border-bottom: 1px solid var(--ns-border);
}

.admin-notify-head strong {
  font-size: 14px;
  color: var(--ns-fg);
}

.admin-notify-head button {
  border: 0;
  background: transparent;
  color: var(--base-color);
  font-size: 12px;
  cursor: pointer;
  padding: 2px 0;
}

.admin-notify-list {
  max-height: 360px;
  overflow-y: auto;
}

.admin-notify-item {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
  text-align: left;
  padding: 12px 15px;
  cursor: pointer;
  display: block;
}

.admin-notify-item:hover {
  background: #f8fbfa;
}

.admin-notify-item.is-unread {
  background: #f4fbf9;
}

.admin-notify-item strong {
  display: block;
  color: var(--ns-fg);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.admin-notify-item p {
  margin: 4px 0 0;
  color: var(--ns-fg-3);
  font-size: 12px;
  line-height: 1.55;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.admin-notify-item time {
  display: block;
  margin-top: 6px;
  color: #a0aec0;
  font-size: 11px;
}

.admin-notify-empty {
  padding: 36px 16px;
  text-align: center;
  color: var(--ns-fg-3);
  font-size: 13px;
}

.admin-notify-foot {
  padding: 10px 15px;
  text-align: center;
  border-top: 1px solid var(--ns-border);
}

.admin-notify-foot a {
  color: var(--base-color);
  font-size: 12px;
}

@media (max-width: 1100px) {
  .admin-user-meta {
    display: none;
  }
}

/* 线索转客户选择器 */
.lead-contact-list {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--ns-border);
  border-radius: 10px;
  padding: 4px;
  background: #fff;
}

.lead-contact-item {
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
}

.lead-contact-item:hover {
  background: var(--ns-panel-2);
}

.lead-contact-item.is-selected {
  background: #f0faf7;
}

.lead-contact-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--base-color-light);
  color: var(--base-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex: 0 0 auto;
}

.lead-contact-main {
  flex: 1;
  min-width: 0;
}

.lead-contact-main strong {
  display: block;
  color: var(--ns-fg);
  font-size: 13px;
}

.lead-contact-main small {
  display: block;
  margin-top: 2px;
  color: var(--ns-fg-3);
  font-size: 11px;
}

.lead-contact-check {
  color: var(--base-color);
  font-weight: 700;
  width: 18px;
  text-align: center;
}

/* 素材库操作列紧凑按钮，避免挤占内容列 */
.material-action.layui-btn-xs {
  padding: 0 6px;
  margin-right: 2px;
}

.material-action.layui-btn-xs {
  font-size: 11px;
  padding: 0 5px;
  margin: 0 2px 0 0;
}

.layui-table-cell .material-action + .material-action {
  margin-left: 0;
}

/* 欢迎语中心 */
.welcome-center-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  margin-bottom: 16px;
  border: 1px solid #bae6fd;
  background: #f0f9ff;
  border-radius: 8px;
  color: #0c4a6e;
}
.welcome-center-note .layui-icon { margin-top: 3px; }
.welcome-center-note p { margin: 4px 0 0; color: #475569; font-size: 13px; }
.welcome-center-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.welcome-center-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 18px;
  background: #fff;
}
.welcome-center-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #ecfdf5;
  color: #0d9488;
  font-size: 20px;
}
.welcome-center-card h3 { margin: 12px 0 6px; font-size: 16px; color: #0f172a; }
.welcome-center-card p { min-height: 42px; margin: 0 0 14px; color: #64748b; font-size: 13px; line-height: 1.6; }
.welcome-center-footer {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
}
.welcome-center-footer-title { font-weight: 600; margin-bottom: 8px; color: #0f172a; }
.welcome-center-priority { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.welcome-center-priority span { padding: 3px 8px; border-radius: 5px; background: #fff; border: 1px solid #e2e8f0; font-size: 12px; }
.welcome-center-footer p { margin: 8px 0 0; font-size: 12px; }
@media (max-width: 760px) {
  .welcome-center-grid { grid-template-columns: 1fr; }
}

/* 数据中心：口径提示与成员分页 */
.stat-scope-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  line-height: 1.6;
}
.stat-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 38px;
  margin: 8px 0 6px;
  color: #64748b;
  font-size: 12px;
}
.stat-pager .layui-btn[disabled] {
  opacity: .55;
  cursor: not-allowed;
}
.stat-pager-current {
  min-width: 48px;
  text-align: center;
  color: #475569;
}
.stat-pager-total {
  margin-right: 4px;
}

/* 客户统计趋势图：累计用折线，每日用柱状 */
.stat-chart-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0 12px;
}
.stat-chart-head .stat-table-title { margin: 0; }
.stat-chart-note {
  color: #94a3b8;
  font-size: 12px;
}
.stat-echart {
  width: 100%;
  height: 320px;
  min-height: 320px;
  padding: 8px;
  margin-bottom: 12px;
  border: 1px solid var(--ns-border);
  border-radius: 8px;
  background: #fff;
}
